Example #1
0
 public static function curPageURLEnc()
 {
     return URLEncrypter::Encrypt(Tools::curPageURL());
 }
Example #2
0
 protected function addBrowseButtons($tpl)
 {
     $curPage = Tools::curPageURL();
     if ($this->browseable) {
         if ($this->month > 1) {
             $tpl->setVars("BROWSEBUTTONS", "PREV", Tools::addParam(Tools::curPageURL(), "calmonth" . $this->ID, $this->month - 1));
         }
         if ($this->month < 12) {
             $tpl->setVars("BROWSEBUTTONS", "NEXT", Tools::addParam(Tools::curPageURL(), "calmonth" . $this->ID, $this->month + 1));
         }
         if ($this->month == 1) {
             $lastMonthLastYear = Tools::addParam($curPage, "calmonth" . $this->ID, 12);
             $lastMonthLastYear = Tools::addParam($lastMonthLastYear, "year" . $this->ID, $this->year - 1);
             $tpl->setVars("BROWSEBUTTONS", "PREV", $lastMonthLastYear);
         }
         if ($this->month == 12) {
             $lastMonthLastYear = Tools::addParam($curPage, "calmonth" . $this->ID, 1);
             $lastMonthLastYear = Tools::addParam($lastMonthLastYear, "year" . $this->ID, $this->year + 1);
             $tpl->setVars("BROWSEBUTTONS", "NEXT", $lastMonthLastYear);
         }
         $tpl->setVars("BROWSEBUTTONS", "MONTH", date("F", mktime(0, 0, 0, $this->month, 1, 2000)));
         $tpl->setVars("BROWSEBUTTONS", "YEAR", $this->year);
         $tpl->setVars("CALENDAR", "BROWSEBUTTONS", $tpl->ParseBlock("BROWSEBUTTONS"));
     } else {
         $tpl->setVars("CALENDAR", "YEAR", $this->year);
         $tpl->setVars("CALENDAR", "MONTH", date("F", mktime(0, 0, 0, $this->month, 1, 2000)));
     }
 }
Example #3
0
 protected function addPrevPage($tpl)
 {
     if (isset($_GET[$this->pageVar])) {
         $curPagenumb = $_GET[$this->pageVar];
     } else {
         $curPagenumb = 0;
     }
     $urlNextPage = Tools::addParam(Tools::curPageURL(), $this->pageVar, $this->page - 1);
     $numberOfPages = ceil($this->totalCollectionSize / $this->pageSize);
     if ($numberOfPages > 1) {
         if ($this->page != 0) {
             $tpl->setVars("PAGELINK", "TEXT", "&#171; " . "Previous");
             $tpl->setVars("PAGELINK", "LINK", $urlNextPage);
             return $tpl->ParseBlock("PAGELINK");
         } else {
             $tpl->setVars("PAGETEXT", "CLASS", "previous-off");
             $tpl->setVars("PAGETEXT", "TEXT", "&#171; " . "Previous");
             return $tpl->ParseBlock("PAGETEXT");
         }
     } else {
         return false;
     }
 }