You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Scripted/WEB/Controller/AdminController.php

87 lines
2.6 KiB

<?php
class AdminController extends UserController
{
function __construct()
{
try {
global $dsn, $rep, $vues, $error;
// parent::__construct();
$action = $_REQUEST['action'];
switch ($action) {
case NULL:
$this->goToHome();
break;
case "goToHome":
$this->goToHome();
break;
case "goToAdmin":
$this->goToAdmin();
break;
case "goToPresentation":
$this->goToPresentation();
break;
case "goToEnigme":
$this->goToEnigme();
break;
case "goToTest":
$this->goToTest();
break;
case "goToChouette":
$this->goToChouette();
break;
case "goToCesarEncrypt":
$this->goToCesarEncrypt();
break;
case "goToCesarDecrypt":
$this->goToCesarDecrypt();
break;
case "goToChuckNorris":
$this->goToChuckNorris();
break;
case "goToHanoi":
$this->goToHanoi();
break;
case "goToTrianglePascal":
$this->goToTrianglePascal();
break;
case "goToDoubleElement":
$this->goToDoubleElement();
break;
case "goToNext":
$this->goToNext();
break;
case "goToQueue":
$this->goToQueue()();
break;
case "logout":
$this->logout();
break;
case "addNewEnigme":
$this->addNewEnigme();
break;
default:
$error = "Action non valide";
require($rep . $vues['erreur']);
break;
}
} catch (PDOException $e) {
$error = $e->getMessage();
require($rep . $vues['erreur']);
} catch (Exception $e2) {
$error = $e2->getMessage();
require($rep . $vues['erreur']);
}
}
function goToAdmin()
{
global $rep, $vues;
require($rep . $vues['admin']);
}
function addNewEnigme()
{
}
}