Ejemplo n.º 1
0
 public function processQuery()
 {
     try {
         $page = $_GET["page"];
         $GLOBALS['working_dir'] = dirname("PHP/");
         /*	on préviens le cas ou $_GET["action"] n'est pas spécifié
         				ou pas définit, on lui donne par défaut la valeur "home"
         			*/
         if (!isset($page) || $page == "") {
             $page = "home";
         }
         if (!in_array($page, $this->authKey)) {
             $page = "home";
         }
         switch ($page) {
             /*	AFFICHAGE DE PAGES	*/
             case 'home':
                 $controller = new ControllerHome();
                 $controller->displayHome();
                 break;
             case 'about':
                 $controller = new ControllerAbout();
                 $controller->displayAbout();
                 break;
             case 'user':
                 $routerUserPage = new RouterUser();
                 $routerUserPage->processQuery();
                 break;
             case 'connection':
                 $controller = new ControllerConnection();
                 $controller->displayConnection();
                 break;
             case 'registration':
                 $controller = new ControllerRegistration();
                 $controller->displayRegistration();
                 break;
             case 'research':
                 $controller = new ControllerResearch();
                 $controller->displayResearch();
                 break;
                 /*	TRAITER LES DONNEES	*/
             /*	TRAITER LES DONNEES	*/
             case 'connect':
                 $controller = new ControllerConnection();
                 $controller->connect($_GET["from"]);
                 break;
             case 'disconnect':
                 $controller = new ControllerDisconnection();
                 $controller->disconnect();
                 break;
             case 'register':
                 $controller = new ControllerRegistration();
                 $controller->register($_GET["from"]);
                 break;
         }
     } catch (Exception $error) {
         $this->processError($error->getMessage());
     }
 }
Ejemplo n.º 2
0
 public function processQuery()
 {
     try {
         $page = $_GET["page"];
         if (!isset($page) || $page == "") {
             $page = "home";
         }
         if (!in_array($page, $this->authKey)) {
             header('Location: index.php');
         }
         switch ($page) {
             //	page
             case 'home':
                 $controller = new ControllerHome();
                 $controller->displayHome();
                 break;
             case 'signin':
                 $controller = new ControllerSignin();
                 $controller->displaySignin();
                 break;
             case 'signup':
                 $controller = new ControllerSignup();
                 $controller->displaySignup();
                 break;
             case 'signupsuccess':
                 $controller = new ControllerSignup();
                 $controller->displaySignupSuccess();
                 break;
             case 'foreground':
                 $routerForeground = new RouterForeground();
                 $routerForeground->processQuery();
                 break;
             case 'background':
                 $routerBackground = new RouterBackground();
                 $routerBackground->processQuery();
                 break;
                 //	traitement
             //	traitement
             case 'connect':
                 $controller = new ControllerSignin();
                 $controller->processConnect();
                 break;
             case 'disconnect':
                 $controller = new ControllerSignout();
                 $controller->processDisconnect();
                 break;
             case 'processsignup':
                 $controller = new ControllerSignup();
                 $controller->processSignup();
                 break;
         }
     } catch (Exception $error) {
         $this->processError($error->getMessage());
     }
 }
Ejemplo n.º 3
0
 public function initialize()
 {
     parent::initialize();
     $this->tag->setTitle('Giáo xứ Trại Gạo - Cổng thông tin điện tử');
 }