/** * Performs the box view * * @return null */ function showThreeBoxes() { global $_ARRAYLANG; $objEventManager = new \Cx\Modules\Calendar\Controller\CalendarEventManager($this->startDate, $this->endDate, $this->categoryId, $this->searchTerm, true, $this->needAuth, true, 0, 'n', $this->sortDirection, true, $this->author); $objEventManager->getEventList(); $this->_objTpl->setTemplate($this->pageContent); if ($_REQUEST['cmd'] == 'boxes') { $objEventManager->calendarBoxUrl = \Cx\Core\Routing\Url::fromModuleAndCmd('Calendar', 'boxes')->toString() . "?act=list"; $objEventManager->calendarBoxMonthNavUrl = \Cx\Core\Routing\Url::fromModuleAndCmd('Calendar', 'boxes')->toString(); } else { $objEventManager->calendarBoxUrl = \Cx\Core\Routing\Url::fromModuleAndCmd('Calendar', '')->toString() . "?act=list"; $objEventManager->calendarBoxMonthNavUrl = \Cx\Core\Routing\Url::fromModuleAndCmd('Calendar', '')->toString(); } if (empty($_GET['catid'])) { $catid = 0; } else { $catid = $_GET['catid']; } if (isset($_GET['yearID']) && isset($_GET['monthID']) && isset($_GET['dayID'])) { $day = $_GET['dayID']; $month = $_GET['monthID']; $year = $_GET['yearID']; } elseif (isset($_GET['yearID']) && isset($_GET['monthID']) && !isset($_GET['dayID'])) { $day = 0; $month = $_GET['monthID']; $year = $_GET['yearID']; } elseif (isset($_GET['yearID']) && !isset($_GET['monthID']) && !isset($_GET['dayID'])) { $day = 0; $month = 0; $year = $_GET['yearID']; } else { $day = date("d"); $month = date("m"); $year = date("Y"); } $calendarbox = $objEventManager->getBoxes($this->boxCount, $year, $month, $day, $catid); $objCategoryManager = new \Cx\Modules\Calendar\Controller\CalendarCategoryManager(true); $objCategoryManager->getCategoryList(); $this->_objTpl->setVariable(array("TXT_{$this->moduleLangVar}_ALL_CAT" => $_ARRAYLANG['TXT_CALENDAR_ALL_CAT'], "{$this->moduleLangVar}_BOX" => $calendarbox, "{$this->moduleLangVar}_JAVA_SCRIPT" => $objEventManager->getCalendarBoxJS(), "{$this->moduleLangVar}_CATEGORIES" => $objCategoryManager->getCategoryDropdown($catid, 1))); }