Esempio n. 1
0
 function __construct()
 {
     $visitor = new Visitor();
     $visitor->add(Helper::getIP(), Helper::getBrowser());
     $page = new Page();
     if (isset($_GET['adress']) && !isset($_POST)) {
         $page->register($_GET['adress']);
         Route::get($_GET['adress']);
     } else {
         if (isset($_GET['adress']) && isset($_POST)) {
             $page->register($_GET['adress']);
             Route::get($_GET['adress'], $_POST);
         } else {
             $page->register('/');
             Route::get('/');
         }
     }
 }
Esempio n. 2
0
 function stats()
 {
     if (Session::isSession('user')) {
         $getstat = new Visitor();
         $daily = $getstat->getDaily();
         $bpercent = $getstat->getBrowser();
         $getstat2 = new Page();
         $pages = $getstat2->getDaily();
         $this->view->addIp($_SERVER['REMOTE_ADDR']);
         $this->view->addBrowser(Helper::getBrowser());
         $this->view->addDaily($daily);
         $this->view->addPages($pages);
         $this->view->addBrowserpercent($bpercent);
         $this->view->forAjax('stats');
     } else {
         Error::authFail();
     }
 }