Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /****************************************
- * action.php Datei
- ***************************************/
- declare(strict_types=1);
- //echo 'display_errors = ' . ini_get('display_errors') . "\n";
- //echo 'display_startup_errors = ' . ini_get('display_startup_errors') . "\n";
- ini_set('display_errors', '1');
- ini_set('display_startup_errors', '1');
- error_reporting(E_ALL);
- include('classes/Core.php');
- echo "Start der action.php:\n";
- echo "Session ID: " . session_id() . "\nPOST: ";
- var_dump($_POST);
- echo "\nSESSION: ";
- var_dump($_SESSION);
- echo "\nCOOKIE: ";
- var_dump($_COOKIE);
- /**
- * Benutzername
- * @var string $userName
- */
- $userName = $_SESSION['name'] ?? 'undefiniert';
- /**
- * Per POST Request übergebener Name einer \
- * aufzurufenden Funktion.
- * @var string $action
- */
- $action = $_POST['action'] ?? 'undefiniert';
- switch($action){
- case 'get_stafflist':
- echo Core::getStaffList($userName);
- break;
- default:
- echo "Das ist keine gültige Aktion: $action\n";
- break;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement