M5 A3 fertig

This commit is contained in:
S170H
2023-12-20 17:21:49 +01:00
parent aa921725c9
commit a605ce4d34
35 changed files with 1970 additions and 19 deletions

View File

@@ -4,6 +4,7 @@
"license": "proprietary",
"require": {
"eftec/bladeone": "^4.1",
"ext-mysqli": "*"
"ext-mysqli": "*",
"monolog/monolog": "^3.5"
}
}

153
M5/emensa/composer.lock generated
View File

@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "0a19be8f09bdc5d4e2b07ba9e95a5801",
"content-hash": "56e35407c924fe62af5e2eb164530d54",
"packages": [
{
"name": "eftec/bladeone",
@@ -64,6 +64,157 @@
"source": "https://github.com/EFTEC/BladeOne/tree/4.9"
},
"time": "2023-05-01T12:48:42+00:00"
},
{
"name": "monolog/monolog",
"version": "3.5.0",
"source": {
"type": "git",
"url": "https://github.com/Seldaek/monolog.git",
"reference": "c915e2634718dbc8a4a15c61b0e62e7a44e14448"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/Seldaek/monolog/zipball/c915e2634718dbc8a4a15c61b0e62e7a44e14448",
"reference": "c915e2634718dbc8a4a15c61b0e62e7a44e14448",
"shasum": ""
},
"require": {
"php": ">=8.1",
"psr/log": "^2.0 || ^3.0"
},
"provide": {
"psr/log-implementation": "3.0.0"
},
"require-dev": {
"aws/aws-sdk-php": "^3.0",
"doctrine/couchdb": "~1.0@dev",
"elasticsearch/elasticsearch": "^7 || ^8",
"ext-json": "*",
"graylog2/gelf-php": "^1.4.2 || ^2.0",
"guzzlehttp/guzzle": "^7.4.5",
"guzzlehttp/psr7": "^2.2",
"mongodb/mongodb": "^1.8",
"php-amqplib/php-amqplib": "~2.4 || ^3",
"phpstan/phpstan": "^1.9",
"phpstan/phpstan-deprecation-rules": "^1.0",
"phpstan/phpstan-strict-rules": "^1.4",
"phpunit/phpunit": "^10.1",
"predis/predis": "^1.1 || ^2",
"ruflin/elastica": "^7",
"symfony/mailer": "^5.4 || ^6",
"symfony/mime": "^5.4 || ^6"
},
"suggest": {
"aws/aws-sdk-php": "Allow sending log messages to AWS services like DynamoDB",
"doctrine/couchdb": "Allow sending log messages to a CouchDB server",
"elasticsearch/elasticsearch": "Allow sending log messages to an Elasticsearch server via official client",
"ext-amqp": "Allow sending log messages to an AMQP server (1.0+ required)",
"ext-curl": "Required to send log messages using the IFTTTHandler, the LogglyHandler, the SendGridHandler, the SlackWebhookHandler or the TelegramBotHandler",
"ext-mbstring": "Allow to work properly with unicode symbols",
"ext-mongodb": "Allow sending log messages to a MongoDB server (via driver)",
"ext-openssl": "Required to send log messages using SSL",
"ext-sockets": "Allow sending log messages to a Syslog server (via UDP driver)",
"graylog2/gelf-php": "Allow sending log messages to a GrayLog2 server",
"mongodb/mongodb": "Allow sending log messages to a MongoDB server (via library)",
"php-amqplib/php-amqplib": "Allow sending log messages to an AMQP server using php-amqplib",
"rollbar/rollbar": "Allow sending log messages to Rollbar",
"ruflin/elastica": "Allow sending log messages to an Elastic Search server"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-main": "3.x-dev"
}
},
"autoload": {
"psr-4": {
"Monolog\\": "src/Monolog"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Jordi Boggiano",
"email": "j.boggiano@seld.be",
"homepage": "https://seld.be"
}
],
"description": "Sends your logs to files, sockets, inboxes, databases and various web services",
"homepage": "https://github.com/Seldaek/monolog",
"keywords": [
"log",
"logging",
"psr-3"
],
"support": {
"issues": "https://github.com/Seldaek/monolog/issues",
"source": "https://github.com/Seldaek/monolog/tree/3.5.0"
},
"funding": [
{
"url": "https://github.com/Seldaek",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/monolog/monolog",
"type": "tidelift"
}
],
"time": "2023-10-27T15:32:31+00:00"
},
{
"name": "psr/log",
"version": "3.0.0",
"source": {
"type": "git",
"url": "https://github.com/php-fig/log.git",
"reference": "fe5ea303b0887d5caefd3d431c3e61ad47037001"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/php-fig/log/zipball/fe5ea303b0887d5caefd3d431c3e61ad47037001",
"reference": "fe5ea303b0887d5caefd3d431c3e61ad47037001",
"shasum": ""
},
"require": {
"php": ">=8.0.0"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "3.x-dev"
}
},
"autoload": {
"psr-4": {
"Psr\\Log\\": "src"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "PHP-FIG",
"homepage": "https://www.php-fig.org/"
}
],
"description": "Common interface for logging libraries",
"homepage": "https://github.com/php-fig/log",
"keywords": [
"log",
"psr",
"psr-3"
],
"support": {
"source": "https://github.com/php-fig/log/tree/3.0.0"
},
"time": "2021-07-14T16:46:02+00:00"
}
],
"packages-dev": [],

View File

@@ -21,10 +21,19 @@ class AnmeldungController
$anmeldung = anmelden($email, sha1($passwort));
if($anmeldung){
$log = logger('anmeldung', '../storage/logs');
$log->info('Anmeldung erfolgreich!');
}
else{
$log = logger('anmeldung', '../storage/logs');
$log->warning('Anmeldung fehlgeschlagen!');
}
return view(
'm5_a1.anmeldung_verifizieren',
[
'email' => $email,
'passwort' => $passwort,
@@ -58,13 +67,9 @@ class AnmeldungController
session_unset();
session_destroy();
return view(
$log = logger('anmeldung', '../storage/logs');
$log->info('Abmeldung erfolgreich!');
'm5_a1.abmeldung',
[
]
);
return view('m5_a1.abmeldung', []);
}
}

View File

@@ -10,6 +10,9 @@ class MainController
so dass Sie die Aufgabe löst
*/
$log = logger('werbeseite_log', '../storage/logs');
$log->info('werbeseite aufgerufen!');
$data = db_gericht_select_karte();
return view('main.index', [

View File

@@ -360,4 +360,14 @@ function assert_blade(): void
}
}
use Monolog\Level;
use Monolog\Logger;
use Monolog\Handler\StreamHandler;
function logger($name, $path){
$fullpath = $path . '\\' . $name . '.txt';
$log = new Logger($name);
$log->pushHandler(new StreamHandler($fullpath), Level::Warning);
return $log;
}

View File

@@ -0,0 +1,3 @@
[2023-12-20T16:18:29.055116+00:00] anmeldung.WARNING: Anmeldung fehlgeschlagen! [] []
[2023-12-20T16:18:56.231427+00:00] anmeldung.INFO: Anmeldung erfolgreich! [] []
[2023-12-20T16:19:05.370972+00:00] anmeldung.INFO: Abmeldung erfolgreich! [] []

View File

@@ -0,0 +1,3 @@
[2023-12-20T16:17:52.471118+00:00] werbeseite_log.INFO: werbeseite aufgerufen! [] []
[2023-12-20T16:18:56.302288+00:00] werbeseite_log.INFO: werbeseite aufgerufen! [] []
[2023-12-20T16:19:05.430442+00:00] werbeseite_log.INFO: werbeseite aufgerufen! [] []

View File

@@ -7,4 +7,6 @@ $baseDir = dirname($vendorDir);
return array(
'eftec\\bladeone\\' => array($vendorDir . '/eftec/bladeone/lib'),
'Psr\\Log\\' => array($vendorDir . '/psr/log/src'),
'Monolog\\' => array($vendorDir . '/monolog/monolog/src/Monolog'),
);

View File

@@ -11,6 +11,14 @@ class ComposerStaticInit0a19be8f09bdc5d4e2b07ba9e95a5801
array (
'eftec\\bladeone\\' => 15,
),
'P' =>
array (
'Psr\\Log\\' => 8,
),
'M' =>
array (
'Monolog\\' => 8,
),
);
public static $prefixDirsPsr4 = array (
@@ -18,6 +26,14 @@ class ComposerStaticInit0a19be8f09bdc5d4e2b07ba9e95a5801
array (
0 => __DIR__ . '/..' . '/eftec/bladeone/lib',
),
'Psr\\Log\\' =>
array (
0 => __DIR__ . '/..' . '/psr/log/src',
),
'Monolog\\' =>
array (
0 => __DIR__ . '/..' . '/monolog/monolog/src/Monolog',
),
);
public static $classMap = array (

View File

@@ -61,6 +61,163 @@
"source": "https://github.com/EFTEC/BladeOne/tree/4.9"
},
"install-path": "../eftec/bladeone"
},
{
"name": "monolog/monolog",
"version": "3.5.0",
"version_normalized": "3.5.0.0",
"source": {
"type": "git",
"url": "https://github.com/Seldaek/monolog.git",
"reference": "c915e2634718dbc8a4a15c61b0e62e7a44e14448"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/Seldaek/monolog/zipball/c915e2634718dbc8a4a15c61b0e62e7a44e14448",
"reference": "c915e2634718dbc8a4a15c61b0e62e7a44e14448",
"shasum": ""
},
"require": {
"php": ">=8.1",
"psr/log": "^2.0 || ^3.0"
},
"provide": {
"psr/log-implementation": "3.0.0"
},
"require-dev": {
"aws/aws-sdk-php": "^3.0",
"doctrine/couchdb": "~1.0@dev",
"elasticsearch/elasticsearch": "^7 || ^8",
"ext-json": "*",
"graylog2/gelf-php": "^1.4.2 || ^2.0",
"guzzlehttp/guzzle": "^7.4.5",
"guzzlehttp/psr7": "^2.2",
"mongodb/mongodb": "^1.8",
"php-amqplib/php-amqplib": "~2.4 || ^3",
"phpstan/phpstan": "^1.9",
"phpstan/phpstan-deprecation-rules": "^1.0",
"phpstan/phpstan-strict-rules": "^1.4",
"phpunit/phpunit": "^10.1",
"predis/predis": "^1.1 || ^2",
"ruflin/elastica": "^7",
"symfony/mailer": "^5.4 || ^6",
"symfony/mime": "^5.4 || ^6"
},
"suggest": {
"aws/aws-sdk-php": "Allow sending log messages to AWS services like DynamoDB",
"doctrine/couchdb": "Allow sending log messages to a CouchDB server",
"elasticsearch/elasticsearch": "Allow sending log messages to an Elasticsearch server via official client",
"ext-amqp": "Allow sending log messages to an AMQP server (1.0+ required)",
"ext-curl": "Required to send log messages using the IFTTTHandler, the LogglyHandler, the SendGridHandler, the SlackWebhookHandler or the TelegramBotHandler",
"ext-mbstring": "Allow to work properly with unicode symbols",
"ext-mongodb": "Allow sending log messages to a MongoDB server (via driver)",
"ext-openssl": "Required to send log messages using SSL",
"ext-sockets": "Allow sending log messages to a Syslog server (via UDP driver)",
"graylog2/gelf-php": "Allow sending log messages to a GrayLog2 server",
"mongodb/mongodb": "Allow sending log messages to a MongoDB server (via library)",
"php-amqplib/php-amqplib": "Allow sending log messages to an AMQP server using php-amqplib",
"rollbar/rollbar": "Allow sending log messages to Rollbar",
"ruflin/elastica": "Allow sending log messages to an Elastic Search server"
},
"time": "2023-10-27T15:32:31+00:00",
"type": "library",
"extra": {
"branch-alias": {
"dev-main": "3.x-dev"
}
},
"installation-source": "source",
"autoload": {
"psr-4": {
"Monolog\\": "src/Monolog"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Jordi Boggiano",
"email": "j.boggiano@seld.be",
"homepage": "https://seld.be"
}
],
"description": "Sends your logs to files, sockets, inboxes, databases and various web services",
"homepage": "https://github.com/Seldaek/monolog",
"keywords": [
"log",
"logging",
"psr-3"
],
"support": {
"issues": "https://github.com/Seldaek/monolog/issues",
"source": "https://github.com/Seldaek/monolog/tree/3.5.0"
},
"funding": [
{
"url": "https://github.com/Seldaek",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/monolog/monolog",
"type": "tidelift"
}
],
"install-path": "../monolog/monolog"
},
{
"name": "psr/log",
"version": "3.0.0",
"version_normalized": "3.0.0.0",
"source": {
"type": "git",
"url": "https://github.com/php-fig/log.git",
"reference": "fe5ea303b0887d5caefd3d431c3e61ad47037001"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/php-fig/log/zipball/fe5ea303b0887d5caefd3d431c3e61ad47037001",
"reference": "fe5ea303b0887d5caefd3d431c3e61ad47037001",
"shasum": ""
},
"require": {
"php": ">=8.0.0"
},
"time": "2021-07-14T16:46:02+00:00",
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "3.x-dev"
}
},
"installation-source": "source",
"autoload": {
"psr-4": {
"Psr\\Log\\": "src"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "PHP-FIG",
"homepage": "https://www.php-fig.org/"
}
],
"description": "Common interface for logging libraries",
"homepage": "https://github.com/php-fig/log",
"keywords": [
"log",
"psr",
"psr-3"
],
"support": {
"source": "https://github.com/php-fig/log/tree/3.0.0"
},
"install-path": "../psr/log"
}
],
"dev": true,

View File

@@ -1,9 +1,9 @@
<?php return array(
'root' => array(
'name' => 'emensa/mvc',
'pretty_version' => 'dev-ac3eb12ab743c0c1f7fa1538586ff366402d472a',
'version' => 'dev-ac3eb12ab743c0c1f7fa1538586ff366402d472a',
'reference' => 'ac3eb12ab743c0c1f7fa1538586ff366402d472a',
'pretty_version' => 'dev-main',
'version' => 'dev-main',
'reference' => 'aa921725c9c2f33a570d442d9549fdb9ebad6611',
'type' => 'library',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
@@ -20,13 +20,37 @@
'dev_requirement' => false,
),
'emensa/mvc' => array(
'pretty_version' => 'dev-ac3eb12ab743c0c1f7fa1538586ff366402d472a',
'version' => 'dev-ac3eb12ab743c0c1f7fa1538586ff366402d472a',
'reference' => 'ac3eb12ab743c0c1f7fa1538586ff366402d472a',
'pretty_version' => 'dev-main',
'version' => 'dev-main',
'reference' => 'aa921725c9c2f33a570d442d9549fdb9ebad6611',
'type' => 'library',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
'dev_requirement' => false,
),
'monolog/monolog' => array(
'pretty_version' => '3.5.0',
'version' => '3.5.0.0',
'reference' => 'c915e2634718dbc8a4a15c61b0e62e7a44e14448',
'type' => 'library',
'install_path' => __DIR__ . '/../monolog/monolog',
'aliases' => array(),
'dev_requirement' => false,
),
'psr/log' => array(
'pretty_version' => '3.0.0',
'version' => '3.0.0.0',
'reference' => 'fe5ea303b0887d5caefd3d431c3e61ad47037001',
'type' => 'library',
'install_path' => __DIR__ . '/../psr/log',
'aliases' => array(),
'dev_requirement' => false,
),
'psr/log-implementation' => array(
'dev_requirement' => false,
'provided' => array(
0 => '3.0.0',
),
),
),
);

View File

@@ -4,8 +4,8 @@
$issues = array();
if (!(PHP_VERSION_ID >= 70205)) {
$issues[] = 'Your Composer dependencies require a PHP version ">= 7.2.5". You are running ' . PHP_VERSION . '.';
if (!(PHP_VERSION_ID >= 80100)) {
$issues[] = 'Your Composer dependencies require a PHP version ">= 8.1.0". You are running ' . PHP_VERSION . '.';
}
if ($issues) {

1
M5/emensa/vendor/monolog/monolog vendored Submodule

Submodule M5/emensa/vendor/monolog/monolog added at c915e26347

1
M5/emensa/vendor/psr/log vendored Submodule

Submodule M5/emensa/vendor/psr/log added at fe5ea303b0