Ejemplo n.º 1
0
 public function setPage()
 {
     if (file_exists("Includes/config.inc.php")) {
         require_once "Includes/config.inc.php";
         $logged = -1;
         $session = new USession();
         $VIndex = new VIndex();
         $controller = $VIndex->getController();
         $task = $VIndex->getTask();
         if ($controller == "log" && ($task == "in" || $task == "out")) {
             $CLog = new CLog();
             $CLog->mux();
             $VIndex->deleteController();
             $VIndex->deleteTask();
         }
         $logged = $session->getValue('type');
         if ($logged === false) {
             $logged = -1;
         }
         if ($VIndex->isClient()) {
             $CAjax = new CAjax();
             $CAjax->mux($logged);
         } else {
             $content = $this->mux($logged);
             $logged = $session->getValue('type');
             if ($logged === false) {
                 $logged = -1;
             }
             $VIndex->setContent($content);
             if ($logged >= 0) {
                 $VIndex->setLoggedPage();
             } else {
                 $VIndex->setGuestPage();
             }
             $VIndex->showPage();
         }
     } else {
         $CSetup = new CSetup();
         $CSetup->mux();
     }
 }