Exemplo n.º 1
0
 function XFrameWork(&$conn, &$main_conn, $mode = NORMAL_WORK)
 {
     $this->SetTimeMark('start');
     // óñòàíàâàëèàåì ñîåäèíåíèå
     $this->_conn =& $conn;
     $this->_main_conn =& $main_conn;
     // ñîçäàåì ãðóïïû
     $groups = array();
     $groups[1] = "visitors";
     $groups[2] = "clients";
     // èíèöèàëèçèðóåì îáúåêòû
     $this->PageInfo = new XPageInfo();
     $this->PageInfo->setGroups($groups);
     $this->EntityCache = new XEntityCache($this->_conn, $this->_main_conn, 'en');
     //Prepare XML tree for work
     $this->_tree = array();
     //Init user
     if (!empty($_SESSION['User'])) {
         $this->User =& $_SESSION['User'];
     } else {
         $this->User = new XUser();
         $_SESSION['User'] =& $this->User;
         $this->User->setConn($this->_conn);
     }
     // снятие статистики
     $this->MarkAttendance();
     // óñòàíîâèòü ðåæèìû ïî íàñòðîéêàì
     // $this->SetModes();
     // $this->Dictionary = new XDictionary( $this->User->Lang, $this->_conn );
 }