Exemple #1
0
 function index()
 {
     if ($this->args[0] == "index") {
         $this->smarty->setCacheID("MAINPAGE|offset_0");
         if (!$this->smarty->isCached()) {
             $sqlData = index::mainPage();
             $this->smarty->assign("posts", $sqlData);
         }
     } else {
         system::setParam("page", "static/" . $this->args[0]);
     }
 }
Exemple #2
0
 function offset()
 {
     $offset = system::HTTPGet("offset");
     if (!$offset) {
         return system::redirect('/');
     }
     $cacheID = "MAINPAGE|offset_{$offset}";
     $this->smarty->setCacheID($cacheID);
     if (!$this->smarty->isCached($cacheID)) {
         $sqlData = index::mainPage();
         $this->smarty->assign("posts", $sqlData);
     }
 }