<?php $attributes['page_size'] = empty($attributes['page_size']) ? $oSettingsManager->getValue("GalleriesPageSize", 10, "INT", "Number of elements in galleries list") : intval($attributes['page_size']); $attributes['page'] = empty($attributes['page']) ? 1 : intval($attributes['page']); $oPaging = new Paging($attributes['page_size'], $ogGalleryManager->getGalleriesCount(), $attributes['page']); $oPaging->setLinkFormat($here . "&page=%d"); $arrAllGalleries = $ogGalleryManager->getGalleries("id", "DESC", $oPaging->getOffSet(), $oPaging->getPageSize()); _assign("arrPages", $oPaging->getPages()); _assign("arrAllGalleries", $arrAllGalleries); _display("home/dspGalleries.tpl");
<?php $attributes['order'] = empty($attributes['order']) ? "code" : $attributes['order']; $attributes['pagesize'] = empty($attributes['pagesize']) ? $oSettingsManager->getValue("AdminTableSize", 25, "INT", "Number of elements in tables of administrator backend") : (int) $attributes['pagesize']; if (!isset($attributes['sort'])) { $attributes['sort'] = "ASC"; } else { if (!in_array($attributes['sort'], array("ASC", "DESC"))) { $attributes['sort'] = "ASC"; } } $attributes['asort'] = $attributes['sort'] == "ASC" ? "DESC" : "ASC"; $attributes['page'] = empty($attributes['page']) ? 1 : (int) $attributes['page']; $oPaging = new Paging($attributes['pagesize'], $oLanguageManager->getLanguagesCount(), $attributes['page']); $oPaging->setLinkFormat($here . "&page=%d"); $arrPageSizes = array(10, 25, 50, 100, 200); if ($arrLanguages = $oLanguageManager->getLanguages($attributes['order'], $attributes['sort'], $oPaging->getOffSet(), $oPaging->getPageSize())) { _assign("arrLanguages", $arrLanguages); _assign("arrPages", $oPaging->getPages()); _assign("arrPageSizes", $arrPageSizes); } _display("admin/dspLanguages.tpl");
<?php $attributes['order'] = empty($attributes['order']) ? "moment" : $attributes['order']; $attributes['pagesize'] = empty($attributes['pagesize']) ? $oSettingsManager->getValue("AdminTableSize", 100, "INT", "Number of elements in tables of administrator backend") : (int) $attributes['pagesize']; if (!isset($attributes['sort'])) { $attributes['sort'] = "DESC"; } else { if (!in_array($attributes['sort'], array("ASC", "DESC"))) { $attributes['sort'] = "DESC"; } } $attributes['asort'] = $attributes['sort'] == "ASC" ? "DESC" : "ASC"; $attributes['page'] = empty($attributes['page']) ? 1 : (int) $attributes['page']; $oPaging = new Paging($attributes['pagesize'], $oLogManager->getLogCount(), $attributes['page']); $oPaging->setLinkFormat($here . "&page=%d"); $arrPageSizes = array(10, 25, 50, 100, 200); if ($arrLog = $oLogManager->getLog($attributes['order'], $attributes['sort'], $oPaging->getOffSet(), $oPaging->getPageSize())) { _assign("arrLog", $arrLog); _assign("arrPages", $oPaging->getPages()); _assign("arrPageSizes", $arrPageSizes); } _display("admin/dspLog.tpl");
<?php $attributes['xcode'] = array_key_exists("xcode", $attributes) ? $attributes['xcode'] : ""; $attributes['order'] = empty($attributes['order']) ? "pos" : $attributes['order']; $attributes['sort'] = empty($attributes['sort']) ? "DESC" : $attributes['sort']; $attributes['pagesize'] = empty($attributes['pagesize']) ? $oSettingsManager->getValue("AdminTableSize", 25, "INT", "Number of elements in tables of administrator backend") : (int) $attributes['pagesize']; $attributes['asort'] = $attributes['sort'] == "ASC" ? "DESC" : "ASC"; $attributes['page'] = empty($attributes['page']) ? 1 : (int) $attributes['page']; if (!empty($attributes['code'])) { $oPaging = new Paging($attributes['pagesize'], $oPropertyManager->getDictionaryCount($attributes['code'], $attributes['xcode']), $attributes['page']); $oPaging->setLinkFormat($here . "&page=%d"); $arrPageSizes = array(10, 25, 50, 100, 200); if ($arrProperty = $oPropertyManager->getProperty($attributes['code'])) { _assign("arrProperty", $arrProperty); } if ($arrPropertyDictionary = $oPropertyManager->getDictionary($attributes['code'], $attributes['xcode'], $attributes['order'], $attributes['sort'], $oPaging->getOffSet(), $oPaging->getPageSize())) { _assign("arrPages", $oPaging->getPages()); _assign("arrPageSizes", $arrPageSizes); _assign("arrPropertyDictionary", $arrPropertyDictionary); } } else { _error("ENoPropertyFound", "No property found"); } _display("admin/dspPropertyDictionary.tpl");
<?php $attributes['order'] = empty($attributes['order']) ? "login" : $attributes['order']; $attributes['pagesize'] = empty($attributes['pagesize']) ? $oSettingsManager->getValue("AdminTableSize", 25, "INT", "Number of elements in tables of administrator backend") : (int) $attributes['pagesize']; if (!isset($attributes['sort'])) { $attributes['sort'] = "ASC"; } else { if (!in_array($attributes['sort'], array("ASC", "DESC"))) { $attributes['sort'] = "ASC"; } } $attributes['asort'] = $attributes['sort'] == "ASC" ? "DESC" : "ASC"; $attributes['page'] = empty($attributes['page']) ? 1 : (int) $attributes['page']; $oPaging = new Paging($attributes['pagesize'], $oUserManager->getUsersCount(), $attributes['page']); $oPaging->setLinkFormat($here . "&page=%d"); $arrPageSizes = array(10, 25, 50, 100, 200); if ($arrUsers = $oUserManager->getUsers($attributes['order'], $attributes['sort'], $oPaging->getOffSet(), $oPaging->getPageSize())) { foreach ($arrUsers as $k => $u) { $arrUsers[$k]->setGroups($oSecurityManager->pullUserGroups($u->getID())); } _assign("arrUsers", $arrUsers); _assign("arrPages", $oPaging->getPages()); _assign("arrPageSizes", $arrPageSizes); } $arrGroups = $oSecurityManager->getGroups(); _assign("arrGroups", $arrGroups); _display("admin/dspUsers.tpl");
<?php $attributes['order'] = empty($attributes['order']) ? "description" : $attributes['order']; $attributes['sort'] = empty($attributes['sort']) ? "ASC" : $attributes['sort']; $attributes['pagesize'] = empty($attributes['pagesize']) ? $oSettingsManager->getValue("AdminTableSize", 25, "INT", "Number of elements in tables of administrator backend") : (int) $attributes['pagesize']; $attributes['asort'] = $attributes['sort'] == "ASC" ? "DESC" : "ASC"; $attributes['page'] = empty($attributes['page']) ? 1 : (int) $attributes['page']; $oPaging = new Paging($attributes['pagesize'], $oSettingsManager->getSettingsCount(), $attributes['page']); $oPaging->setLinkFormat($here . "&page=%d"); $arrPageSizes = array(10, 25, 50, 100, 200); if ($arrSettings = $oSettingsManager->getSettings($attributes['order'], $attributes['sort'], $oPaging->getOffSet(), $oPaging->getPageSize())) { _assign("arrSettings", $arrSettings); _assign("arrPages", $oPaging->getPages()); _assign("arrPageSizes", $arrPageSizes); } _display("admin/dspSettings.tpl");
<?php $attributes['page_size'] = empty($attributes['page_size']) ? $oSettingsManager->getValue("ArticlesPageSize", 10, "INT", "Number of elements in galleries list") : intval($attributes['page_size']); $attributes['page'] = empty($attributes['page']) ? 1 : intval($attributes['page']); $oPaging = new Paging($attributes['page_size'], $ogArticleManager->getTokensCount(0), $attributes['page']); $oPaging->setLinkFormat($here . "&page=%d"); $arrAllArticles = $ogArticleManager->pullTokens(0, "", "id", "DESC", $oPaging->getOffSet(), $oPaging->getPageSize()); _assign("arrPages", $oPaging->getPages()); _assign("arrAllArticles", $arrAllArticles); _display("home/dspArticles.tpl");
<?php $attributes['order'] = empty($attributes['order']) ? "code" : $attributes['order']; $attributes['pagesize'] = empty($attributes['pagesize']) ? $oSettingsManager->getValue("AdminTableSize", 25, "INT", "Number of elements in tables of administrator backend") : (int) $attributes['pagesize']; if (!isset($attributes['sort'])) { $attributes['sort'] = "ASC"; } else { if (!in_array($attributes['sort'], array("ASC", "DESC"))) { $attributes['sort'] = "ASC"; } } $attributes['asort'] = $attributes['sort'] == "ASC" ? "DESC" : "ASC"; $attributes['page'] = empty($attributes['page']) ? 1 : (int) $attributes['page']; $oPaging = new Paging($attributes['pagesize'], $oSecurityManager->getGroupsCount(), $attributes['page']); $oPaging->setLinkFormat($here . "&page=%d"); $arrPageSizes = array(10, 25, 50, 100, 200); if ($arrGroups = $oSecurityManager->getGroups($attributes['order'], $attributes['sort'], $oPaging->getOffSet(), $oPaging->getPageSize())) { _assign("arrGroups", $arrGroups); _assign("arrPages", $oPaging->getPages()); _assign("arrPageSizes", $arrPageSizes); } _display("admin/dspGroups.tpl");
<?php $attributes['order'] = empty($attributes['order']) ? "relevance" : $attributes['order']; if (!isset($attributes['sort']) || !in_array($attributes['sort'], array("ASC", "DESC"))) { if ($attributes['order'] == "title") { $attributes['sort'] = "ASC"; } else { $attributes['sort'] = "DESC"; } } $attributes['page'] = empty($attributes['page']) ? 1 : intval($attributes['page']); $attributes['page_size'] = empty($attributes['page_size']) ? $oSettingsManager->getValue("SearchResultsPageSize", 10, "INT", "Number of elements in search results") : intval($attributes['page_size']); $attributes['asort'] = $attributes['sort'] == "ASC" ? "DESC" : "ASC"; $oPaging = new Paging($attributes['page_size'], $ogArticleManager->getSearchCount($attributes['fSearch']), $attributes['page']); $oPaging->setLinkFormat($here . "&page=%d"); $arrSearchResults = $ogArticleManager->searchContent($attributes['fSearch'], true, $attributes['order'], $attributes['sort'], $oPaging->getOffSet(), $oPaging->getPageSize()); _assign("arrPages", $oPaging->getPages()); _assign("arrSearchResults", $arrSearchResults); _display("home/dspSearchResults.tpl");
<?php $attributes['order'] = empty($attributes['order']) ? "code" : $attributes['order']; $attributes['sort'] = empty($attributes['sort']) ? "DESC" : $attributes['sort']; $attributes['pagesize'] = empty($attributes['pagesize']) ? $oSettingsManager->getValue("AdminTableSize", 25, "INT", "Number of elements in tables of administrator backend") : (int) $attributes['pagesize']; $attributes['asort'] = $attributes['sort'] == "ASC" ? "DESC" : "ASC"; $attributes['page'] = empty($attributes['page']) ? 1 : (int) $attributes['page']; $oPaging = new Paging($attributes['pagesize'], $oPropertyManager->getPropertyCount(), $attributes['page']); $oPaging->setLinkFormat($here . "&page=%d"); $arrPageSizes = array(10, 25, 50, 100, 200); if ($arrProperties = $oPropertyManager->getProperties($attributes['order'], $attributes['sort'], $oPaging->getOffSet(), $oPaging->getPageSize())) { _assign("arrProperties", $arrProperties); _assign("arrPages", $oPaging->getPages()); _assign("arrPageSizes", $arrPageSizes); } _display("admin/dspProperties.tpl");
<?php $attributes['order'] = empty($attributes['order']) ? "name" : $attributes['order']; $attributes['pagesize'] = empty($attributes['pagesize']) ? $oSettingsManager->getValue("AdminTableSize", 25, "INT", "Number of elements in tables of administrator backend") : (int) $attributes['pagesize']; $attributes['page'] = empty($attributes['page']) ? 1 : (int) $attributes['page']; if (!isset($attributes['sort'])) { $attributes['sort'] = "DESC"; } else { if (!in_array($attributes['sort'], array("ASC", "DESC"))) { $attributes['sort'] = "DESC"; } } $attributes['asort'] = $attributes['sort'] == "ASC" ? "DESC" : "ASC"; $sql = "SELECT COUNT(DISTINCT p.id) AS cnt \n FROM " . $fusebox['tableFuseactions'] . " p \n INNER JOIN " . $fusebox['tableContentTokens'] . " ct \n ON p.id = ct.id_fuseaction"; $numPages = $oDB->getQueryField($sql); $oPaging = new Paging($attributes['pagesize'], $numPages, $attributes['page']); $oPaging->setLinkFormat($here . "&page=%d"); $arrPageSizes = array(10, 25, 50, 100, 200); $sql = "SELECT DISTINCT p.id, p.name, p.description, p.is_devonly \n FROM " . $fusebox['tableFuseactions'] . " p \n INNER JOIN " . $fusebox['tableContentTokens'] . " ct \n ON p.id = ct.id_fuseaction \n ORDER BY " . $attributes['order'] . " " . $attributes['sort'] . " LIMIT " . $oPaging->getOffSet() . ", " . $oPaging->getPageSize(); $arrContentPages = $oDB->getQueryRecordSet($sql);
<?php $attributes['order'] = empty($attributes['order']) ? "name" : $attributes['order']; $attributes['pagesize'] = empty($attributes['pagesize']) ? $oSettingsManager->getValue("AdminTableSize", 25, "INT", "Number of elements in tables of administrator backend") : (int) $attributes['pagesize']; $attributes['page'] = empty($attributes['page']) ? 1 : (int) $attributes['page']; if (!isset($attributes['sort'])) { $attributes['sort'] = "DESC"; } else { if (!in_array($attributes['sort'], array("ASC", "DESC"))) { $attributes['sort'] = "DESC"; } } $attributes['asort'] = $attributes['sort'] == "ASC" ? "DESC" : "ASC"; $oPaging = new Paging($attributes['pagesize'], $oFuseManager->getFuseactionsCount(), $attributes['page']); $oPaging->setLinkFormat($here . "&page=%d"); $arrPageSizes = array(10, 25, 50, 100, 200); if ($arrFuseactions = $oFuseManager->getFuseactions($attributes['order'], $attributes['sort'], $oPaging->getOffSet(), $oPaging->getPageSize())) { _assign("arrFuseactions", $arrFuseactions); _assign("arrPages", $oPaging->getPages()); _assign("arrPageSizes", $arrPageSizes); } else { _error("ECannotGetFuseactions", "Cannot retrieve fuseactions from DB"); } if ($arrGroups = $oSecurityManager->getGroups()) { _assign("arrGroups", $arrGroups); } else { _error("ECannotGetGroups", "Cannot retrieve security groups from DB"); } _display("admin/dspFuseactions.tpl");
<?php $attributes['page_size'] = empty($attributes['page_size']) ? $oSettingsManager->getValue("GalleryPicutresOnPage", 12, "INT", "Number of pictures in gallery page") : intval($attributes['page_size']); $attributes['page'] = empty($attributes['page']) ? 1 : intval($attributes['page']); if (!empty($attributes['gallery'])) { if ($ogGalleryManager->checkGallery($attributes['gallery'])) { $arrGalleries = $ogGalleryManager->getGalleries(); $oPaging = new Paging($attributes['page_size'], $ogGalleryManager->getImagesCount($attributes['gallery']), $attributes['page']); $arrImages = $ogGalleryManager->getImages($attributes['gallery'], $oPaging->getOffSet(), $oPaging->getPageSize()); $oPaging->setLinkFormat($attributes['gallery'] . '.gallery/' . "%d"); $intAuthorID = $ogGalleryManager->getGalleryAuthorID($attributes['gallery']); $intEditorID = $ogGalleryManager->getGalleryEditorID($attributes['gallery']); $oAuthor = false; $oEditor = false; if ($intAuthorID) { $oAuthor = $oUserManager->getUserByID($intAuthorID); } if ($intEditorID) { $oEditor = $oUserManager->getUserByID($intEditorID); } if ($oAuthor) { _assign('oAuthor', $oAuthor); } if ($oEditor) { _assign('oEditor', $oEditor); } _assign("arrPages", $oPaging->getPages()); _assign("arrGalleries", $arrGalleries); _assign("arrImages", $arrImages); _display("home/dspGallery.tpl"); } else {