示例#1
0
 function run()
 {
     $view = new View_Index();
     $this->registry->set('view', $view);
     $ui = new Model_Ui();
     $loginSession =& $_SESSION["login"];
     if (isset($loginSession["id"])) {
         $ui->getInfo($loginSession);
         $mailClass = new Model_Mail();
         $folders = $mailClass->getFolders();
         $this->registry["view"]->setFolders($folders);
     } else {
         $login = new Controller_Login();
         $login->index();
         exit;
     }
 }
示例#2
0
文件: Preload.php 项目: rosko/workapp
 function start()
 {
     $view = new View_Index();
     $this->registry->set('view', $view);
     $view->setDescription($this->registry["keywords"]);
     $view->setKeywords($this->registry["description"]);
     $ui = new Model_Ui();
     if (isset($_POST[session_name()])) {
         session_id($_POST[session_name()]);
     }
     session_start();
     $loginSession =& $_SESSION["login"];
     if (isset($loginSession["id"])) {
         $ui->getInfo($loginSession);
         $this->registry["logs"] = new Model_Logs();
         $this->registry["user"] = new Model_User();
         $this->registry["user"]->setOnline();
         $ui = new Model_Ui();
         $this->registry->set("users_sets", $ui->getSet("bu"));
         $this->registry->set("ajax_notice_sets", $ui->getSet("ajax_notice"));
     } else {
         if (mb_substr($this->registry["url"], 1, 3) == "api") {
             $api = new Model_Api();
             if (!$api->login()) {
                 return false;
             }
         } else {
             $login = new Controller_Login();
             $login->index();
             return false;
         }
     }
     $modules = new Modules_Modules();
     $modules->load();
     return true;
 }
示例#3
0
 function start()
 {
     $view = new View_Index();
     $this->registry->set('view', $view);
     $ui = new Model_Ui();
     if (isset($_POST[session_name()])) {
         session_id($_POST[session_name()]);
     }
     session_start();
     $loginSession =& $_SESSION["login"];
     if (isset($loginSession["id"])) {
         $ui->getInfo($loginSession);
     } else {
         if (mb_substr($this->registry["url"], 1, 8) == "download") {
             $download = new Controller_Download();
             $download->index();
             exit;
         } else {
             $login = new Controller_Login();
             $login->index();
             exit;
         }
     }
 }
示例#4
0
文件: Preload.php 项目: norayrx/otms
 function run()
 {
     $view = new View_Index();
     $this->registry->set('view', $view);
     $view->setDescription($this->registry["keywords"]);
     $view->setKeywords($this->registry["description"]);
     $ui = new Model_Ui();
     $loginSession =& $_SESSION["login"];
     if (isset($loginSession["id"])) {
         $ui->getInfo($loginSession);
     } else {
         if (mb_substr($this->registry["url"], 1, 3) == "api") {
             $api = new Api_Model_Login();
             if (!$api->login()) {
                 exit;
             }
         } else {
             $login = new Controller_Login();
             $login->index();
             exit;
         }
     }
     Modules_Modules::load();
 }