<?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 $arrArticleComments = $ogArticleManager->getComments($attributes['token']); _assign('arrArticleComments', $arrArticleComments); _display("admin/dspArticlesComments.tpl");
<?php if (!empty($attributes['token'])) { $arrArticleAttachments = $ogArticleAttachmentManager->getAttachments($attributes['token']); _assign('arrArticleAttachments', $arrArticleAttachments); } if (!empty($attributes['id'])) { $arrAttachment = $ogArticleAttachmentManager->getAttachment(intval($attributes['id'])); } if (isset($arrAttachment)) { _assign('arrAttachment', $arrAttachment); } _display('admin/dspArticleAttachments.tpl');
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 { _error("EGalleryNotExists", "Gallery not exists"); } } else { _error("ENoGalleryGiven", "No gallery given"); }
<?php _assign("arrContentPages", $arrContentPages); _assign("arrPageSizes", $arrPageSizes); _assign("arrPages", $oPaging->getPages()); _display("admin/dspContentPages.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 if (!$oUser->isDefaultUser()) { $tmpUser = $oUser; } else { $tmpUser = new User(); if (isset($attributes['fLogin']) && isset($attributes['fPwd']) && isset($attributes['fPwd2']) && isset($attributes['fEmail'])) { if (!$tmpUser->setLogin($attributes['fLogin'])) { _warning("WInvalidLogin", "Login is invalid or empty"); } if (!$tmpUser->setEmail($attributes['fEmail'])) { _warning("WInvalidEmail", "Email address is invalid or empty"); } $tmpUser->setFirstName($attributes['fFirstName']); $tmpUser->setMiddleName($attributes['fMiddleName']); $tmpUser->setLastName($attributes['fLastName']); $tmpUser->setBirthDate($attributes['fBirthDate']); } } $oCaptcha = new Captcha($fusebox['pathAssets'] . "fonts"); if (!$oCaptcha->initialize()) { _warning("WCaptchaNotInitialized", "Captcha not initialized"); } _assign("arrCountries", $oPropertyManager->getDictionary("fCountry")); _assign("tmpUser", $tmpUser); _display("home/dspRegistrationForm.tpl");
<?php $tmpoGroup = new Group(); if (!empty($attributes['id'])) { if (!($tmpoGroup = $oSecurityManager->getGroupByID($attributes['id']))) { _error("ENoGroupFound", "No security group with ID={$attributes['id']} found"); } } if (isset($attributes['fCode'])) { $tmpoGroup->setCode($attributes['fCode']); } if (isset($attributes['fName'])) { $tmpoGroup->setName($attributes['fName']); } if (isset($attributes['fDescription'])) { $tmpoGroup->setDescription($attributes['fDescription']); } if (isset($attributes['fHomePage'])) { $tmpoGroup->setHomePage($attributes['fHomePage']); } _assign("tmpoGroup", $tmpoGroup); _display("admin/dspGroupForm.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 $filter = array(); _assign('arrItems', $oSitemap->getItems($filter)); _display("admin/dspSitemap.tpl");
<?php // sending content headers header("Content-Type: text/html; charset=" . $oLanguage->getEncoding()); header("Content-Language: " . $oLanguage->getCode()); $arrHeaderLanguages = $oLanguageManager->getLanguages(); _assign("arrHeaderLanguages", $arrHeaderLanguages); $arrRootArticle = $ogArticleTree->getRootNode(array('token')); if (isset($attributes['article']) && $attributes['article'] != $arrRootArticle['token']) { $article_id = $ogArticleManager->checkToken($ogFuseaction->getID(), $attributes['article'], "", false); $sql = "SELECT id, level FROM " . $fusebox['tableArticlesTree'] . " WHERE data_id = " . $article_id; $node_id = $oDB->getQueryField($sql, 0, 0); $arrArticleFamily = $ogArticleTree->getNodeFamily($node_id, array('token')); } else { $arrArticleFamily = $ogArticleTree->getNodeFamily(0, array('token')); } _assign("arrRootArticle", $arrRootArticle); _assign("arrArticleFamily", $arrArticleFamily); _display("home/layHeader.tpl");
<?php if (!empty($attributes['key'])) { if ($arrSetting = $oSettingsManager->getSetting($attributes['key'])) { _assign("arrSetting", $arrSetting); _display("admin/dspSettingForm.tpl"); } else { _error("ENoSettingRetrieved", "No setting retrieved from DB"); } } else { _error("ENoSettingGiven", "No setting given to edit"); }
<?php if (!empty($attributes['id'])) { if (is_numeric($attributes['id'])) { if ($arrLogRecord = $oLogManager->getLogByID($attributes['id'])) { _assign("arrLogRecord", $arrLogRecord); } else { _error("ECannotGetLogRecord", "Cannot get log record"); } } else { _error("EInvalidLogID", "Invalid log record ID"); } } else { _error("ENoLogIDGiven", "No log record ID given"); } _display("admin/dspLogRecord.tpl");
<?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['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 $arrGalleries = $ogGalleryManager->getGalleries(); _assign("arrGalleries", $arrGalleries); _display("admin/dspGalleries.tpl");
$attributes['article'] = $arrRootArticle['token']; } if (isset($article_id)) { $arrRelatedArticles = $ogArticleTree->getChildNodes($article_id, array('token')); $arrBranch = $ogArticleTree->getBranch($node_id, array('token')); _assign('arrBranch', $arrBranch); _assign('arrRelatedArticles', $arrRelatedArticles); } if (!empty($attributes['article'])) { $arrArticleAttachments = $ogArticleAttachmentManager->getAttachments($attributes['article']); _assign('arrArticleAttachments', $arrArticleAttachments); $intCommentsCount = $ogArticleManager->getCommentsCount($attributes['article']); _assign('intCommentsCount', $intCommentsCount); } $intAuthorID = $ogArticleManager->getAuthorID($attributes['article']); $intEditorID = $ogArticleManager->getEditorID($attributes['article']); $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); } _display("home/dspArticle.tpl");
<?php $arrLanguages = $oLanguageManager->getLanguages(); $arrImages = $ogGalleryManager->getImages($attributes['gallery']); $intLanguageID = $oLanguage->getID(); _assign("intLanguageID", $intLanguageID); _assign("arrImages", $arrImages); _assign("arrLanguages", $arrLanguages); if (!empty($attributes['gallery'])) { if ($ogGalleryManager->checkGallery($attributes['gallery'])) { _display("admin/dspGallery.tpl"); } else { _error("EGalleryNotExists", "Gallery not exists"); } } else { _error("EGalleryNotGiven", "Gallery not given"); }
<?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 if (isset($attributes['code'])) { if ($arrProperty = $oPropertyManager->getProperty($attributes['code'])) { _assign("arrProperty", $arrProperty); } else { _error("ENoPropertyFound", "No property found with this code"); } } else { _error("ENoPropertyGiven", "No property given to edit"); } _display("admin/dspPropertyForm.tpl");
<? if($arrFuseactions = $oFuseManager->getFuseactions()){ _assign("arrFuseactions", $arrFuseactions); }else{ _error("ECannotGetFuseactions", "Cannot retrieve fuseactions from DB"); } _display("admin/dspSpecification.tpl"); ?>
<? if(isset($imageFileName)){ _assign("imageFileName", $imageFileName); }else{ _error("ENoImageFileName", "No image file name given"); } _display("util/dspUploadContentResult.tpl"); ?>
<?php if (isset($attributes['token']) && isset($attributes['fuseactionid'])) { $arrLanguages = array(); if (isset($attributes['languageid'])) { $arrLanguages[] = $oLanguageManager->getLanguageByID($attributes['languageid']); } else { $arrLanguages = $oLanguageManager->getLanguages(); } _assign("arrLanguages", $arrLanguages); if ($attributes['fuseactionid'] == 0) { $tmpoFuseaction =& $ogFuseaction; _assign("tmpoFuseaction", $tmpoFuseaction); } elseif (is_numeric($attributes['fuseactionid'])) { if ($tmpoFuseaction = $oFuseManager->getFuseactionByID($attributes['fuseactionid'])) { _assign("tmpoFuseaction", $tmpoFuseaction); } else { _error("ECannotGetFuseaction", "Cannot get page or action"); } } else { _error("EInvalidFuseaction", "Invalid page/action ID given"); } _display("admin/dspSEOContentForm.tpl"); } else { _error("ENoContentGiven", "No valid content item given to edit"); }
<?php $arrRootNode = $ogArticleTree->getRootNodeInfo(); $arrArticlesTree = $ogArticleTree->select($arrRootNode['id'], array('token'), NSTREE_AXIS_DESCENDANT_OR_SELF); _assign("arrArticlesTree", $arrArticlesTree); _display("admin/dspArticlesTree.tpl");
<?php $formvars = $attributes; if (isset($attributes['id']) && !_gotWarnings() && !_gotErrors()) { if ($arrItem = $oSitemap->getItemByID($attributes['id'])) { $formvars = $arrItem; } else { _warning("WSitemapItemNotFound", "Sitemap Item not found, probably deleted"); } } if (empty($formvars['url'])) { $formvars['url'] = 'http://'; } if (!isset($formvars['priority']) || strlen($formvars['priority']) == 0) { $formvars['priority'] = 0.5; } _assign("formvars", $formvars); _display("admin/dspSitemapItemForm.tpl");