jBlogHome->searchKeywordInContent('BLOG_CALENDAR', $page_template); $blogHomeCalendarInTheme = $objBlogHome->searchKeywordInContent('BLOG_CALENDAR', $themesPages['index']); $blogHomeCalendarInSidebar = $objBlogHome->searchKeywordInContent('BLOG_CALENDAR', $themesPages['sidebar']); if ($blogHomeCalendarInContent || $blogHomeCalendarInTemplate || $blogHomeCalendarInTheme || $blogHomeCalendarInSidebar) { $strCalendarSource = $objBlogHome->getHomeCalendar(); $page_content = $objBlogHome->fillVariableIfActivated('BLOG_CALENDAR', $strCalendarSource, $page_content, $blogHomeCalendarInContent); $page_template = $objBlogHome->fillVariableIfActivated('BLOG_CALENDAR', $strCalendarSource, $page_template, $blogHomeCalendarInTemplate); $themesPages['index'] = $objBlogHome->fillVariableIfActivated('BLOG_CALENDAR', $strCalendarSource, $themesPages['index'], $blogHomeCalendarInTheme); $themesPages['sidebar'] = $objBlogHome->fillVariableIfActivated('BLOG_CALENDAR', $strCalendarSource, $themesPages['sidebar'], $blogHomeCalendarInSidebar); } //Blog-TagCloud $blogHomeTagCloudInContent = $objBlogHome->searchKeywordInContent('BLOG_TAG_CLOUD', $page_content); $blogHomeTagCloudInTemplate = $objBlogHome->searchKeywordInContent('BLOG_TAG_CLOUD', $page_template); $blogHomeTagCloudInTheme = $objBlogHome->searchKeywordInContent('BLOG_TAG_CLOUD', $themesPages['index']); $blogHomeTagCloudInSidebar = $objBlogHome->searchKeywordInContent('BLOG_TAG_CLOUD', $themesPages['sidebar']); if ($blogHomeTagCloudInContent || $blogHomeTagCloudInTemplate || $blogHomeTagCloudInTheme || $blogHomeTagCloudInSidebar) { $strTagCloudSource = $objBlogHome->getHomeTagCloud(); $page_content = $objBlogHome->fillVariableIfActivated('BLOG_TAG_CLOUD', $strTagCloudSource, $page_content, $blogHomeTagCloudInContent); $page_template = $objBlogHome->fillVariableIfActivated('BLOG_TAG_CLOUD', $strTagCloudSource, $page_template, $blogHomeTagCloudInTemplate); $themesPages['index'] = $objBlogHome->fillVariableIfActivated('BLOG_TAG_CLOUD', $strTagCloudSource, $themesPages['index'], $blogHomeTagCloudInTheme); $themesPages['sidebar'] = $objBlogHome->fillVariableIfActivated('BLOG_TAG_CLOUD', $strTagCloudSource, $themesPages['sidebar'], $blogHomeTagCloudInSidebar); } //Blog-TagHitlist $blogHomeTagHitlistInContent = $objBlogHome->searchKeywordInContent('BLOG_TAG_HITLIST', $page_content); $blogHomeTagHitlistInTemplate = $objBlogHome->searchKeywordInContent('BLOG_TAG_HITLIST', $page_template); $blogHomeTagHitlistInTheme = $objBlogHome->searchKeywordInContent('BLOG_TAG_HITLIST', $themesPages['index']); $blogHomeTagHitlistInSidebar = $objBlogHome->searchKeywordInContent('BLOG_TAG_HITLIST', $themesPages['sidebar']); if ($blogHomeTagHitlistInContent || $blogHomeTagHitlistInTemplate || $blogHomeTagHitlistInTheme || $blogHomeTagHitlistInSidebar) { $strTagHitlistSource = $objBlogHome->getHomeTagHitlist(); $page_content = $objBlogHome->fillVariableIfActivated('BLOG_TAG_HITLIST', $strTagHitlistSource, $page_content, $blogHomeTagHitlistInContent); $page_template = $objBlogHome->fillVariableIfActivated('BLOG_TAG_HITLIST', $strTagHitlistSource, $page_template, $blogHomeTagHitlistInTemplate); $themesPages['index'] = $objBlogHome->fillVariableIfActivated('BLOG_TAG_HITLIST', $strTagHitlistSource, $themesPages['index'], $blogHomeTagHitlistInTheme); $themesPages['sidebar'] = $objBlogHome->fillVariableIfActivated('BLOG_TAG_HITLIST', $strTagHitlistSource, $themesPages['sidebar'], $blogHomeTagHitlistInSidebar); } //Blog-Categories (Select) $blogHomeCategorySelectInContent = $objBlogHome->searchKeywordInContent('BLOG_CATEGORIES_SELECT', $page_content); $blogHomeCategorySelectInTemplate = $objBlogHome->searchKeywordInContent('BLOG_CATEGORIES_SELECT', $page_template); $blogHomeCategorySelectInTheme = $objBlogHome->searchKeywordInContent('BLOG_CATEGORIES_SELECT', $themesPages['index']); $blogHomeCategorySelectInSidebar = $objBlogHome->searchKeywordInContent('BLOG_CATEGORIES_SELECT', $themesPages['sidebar']); if ($blogHomeCategorySelectInContent || $blogHomeCategorySelectInTemplate || $blogHomeCategorySelectInTheme || $blogHomeCategorySelectInSidebar) { $strCategoriesSelect = $objBlogHome->getHomeCategoriesSelect(); $page_content = $objBlogHome->fillVariableIfActivated('BLOG_CATEGORIES_SELECT', $strCategoriesSelect, $page_content, $blogHomeCategorySelectInContent); $page_template = $objBlogHome->fillVariableIfActivated('BLOG_CATEGORIES_SELECT', $strCategoriesSelect, $page_template, $blogHomeCategorySelectInTemplate); $themesPages['index'] = $objBlogHome->fillVariableIfActivated('BLOG_CATEGORIES_SELECT', $strCategoriesSelect, $themesPages['index'], $blogHomeCategorySelectInTheme); $themesPages['sidebar'] = $objBlogHome->fillVariableIfActivated('BLOG_CATEGORIES_SELECT', $strCategoriesSelect, $themesPages['sidebar'], $blogHomeCategorySelectInSidebar); } //Blog-Categories (List) $blogHomeCategoryListInContent = $objBlogHome->searchKeywordInContent('BLOG_CATEGORIES_LIST', $page_content); $blogHomeCategoryListInTemplate = $objBlogHome->searchKeywordInContent('BLOG_CATEGORIES_LIST', $page_template); $blogHomeCategoryListInTheme = $objBlogHome->searchKeywordInContent('BLOG_CATEGORIES_LIST', $themesPages['index']); $blogHomeCategoryListInSidebar = $objBlogHome->searchKeywordInContent('BLOG_CATEGORIES_LIST', $themesPages['sidebar']); if ($blogHomeCategoryListInContent || $blogHomeCategoryListInTemplate || $blogHomeCategoryListInTheme || $blogHomeCategoryListInSidebar) { $strCategoriesList = $objBlogHome->getHomeCategoriesList(); $page_content = $objBlogHome->fillVariableIfActivated('BLOG_CATEGORIES_LIST', $strCategoriesList, $page_content, $blogHomeCategoryListInContent); $page_template = $objBlogHome->fillVariableIfActivated('BLOG_CATEGORIES_LIST', $strCategoriesList, $page_template, $blogHomeCategoryListInTemplate); $themesPages['index'] = $objBlogHome->fillVariableIfActivated('BLOG_CATEGORIES_LIST', $strCategoriesList, $themesPages['index'], $blogHomeCategoryListInTheme); $themesPages['sidebar'] = $objBlogHome->fillVariableIfActivated('BLOG_CATEGORIES_LIST', $strCategoriesList, $themesPages['sidebar'], $blogHomeCategoryListInSidebar); } } } //------------------------------------------------------- // Load design template //------------------------------------------------------- $objTemplate->setTemplate($themesPages['index']); $objTemplate->addBlock('CONTENT_FILE', 'page_template', $page_template); $boolShop = false; //------------------------------------------------------- // set global content variables //------------------------------------------------------- $page_content = str_replace('{PAGE_URL}', htmlspecialchars($objInit->getPageUri()), $page_content); $page_content = str_replace('{PRINT_URL}', $objInit->getPrintUri(), $page_content); $page_content = str_replace('{PDF_URL}', $objInit->getPDFUri(), $page_content); $page_content = str_replace('{TITLE}', $page_title, $page_content); //------------------------------------------------------- // start module switches //------------------------------------------------------- switch ($plainSection) { //------------------------------------------------------- // Login module //------------------------------------------------------- case "access": $modulespath = "core_modules/access/index.class.php"; if (file_exists($modulespath)) require_once($modulespath); else die($_CORELANG['TXT_THIS_MODULE_DOESNT_EXISTS']); $objAccess = new Access($page_content); $objTemplate->setVariable('CONTENT_TEXT', $objAccess->getPage($page_metatitle, $page_title)); break; //------------------------------------------------------- // Login module //------------------------------------------------------- case "login": $modulespath = "core_modules/login/index.class.php"; /** * @ignore */ if (file_exists($modulespath)) require_once($modulespath); else die($_CORELANG['TXT_THIS_MODULE_DOESNT_EXISTS']); if (!isset($sessionObj) || !is_object($sessionObj)) $sessionObj = new cmsSession(); $objLogin = new Login($page_content); $objTemplate->setVariable('CONTENT_TEXT', $objLogin->getContent()); break; //------------------------------------------------------- // Nettools //------------------------------------------------------- case "nettools": $modulespath = "core_modules/nettools/index.class.php"; /** * @ignore */ if (file_exists($modulespath)) require_once($modulespath); else die ($_CORELANG['TXT_THIS_MODULE_DOESNT_EXISTS']); $objNetTools = new NetTools($page_content); $objTemplate->setVariable('CONTENT_TEXT', $objNetTools->getPage()); break; //------------------------------------------------------- // eCommerce Module //------------------------------------------------------- case "shop": $modulespath = "modules/shop/index.class.php"; /** * @ignore */ if (file_exists($modulespath)) require_once($modulespath); else die($_CORELANG['TXT_THIS_MODULE_DOESNT_EXISTS']); if (shopUseSession() && (!isset($sessionObj) || !is_object($sessionObj))) $sessionObj = new cmsSession(); $shopObj = new Shop($page_content); $objTemplate->setVariable('CONTENT_TEXT', $shopObj->getShopPage()); $objTemplate->setVariable('SHOPNAVBAR_FILE', $shopObj->getShopNavbar($themesPages['shopnavbar'])); $boolShop = true; break; //------------------------------------------------------- // News module //------------------------------------------------------- case "news": $modulespath = "core_modules/news/index.class.php"; /** * @ignore */ if (file_exists($modulespath)) require_once($modulespath); else die ($_CORELANG['TXT_THIS_MODULE_DOESNT_EXISTS']); $newsObj= new news($page_content); $objTemplate->setVariable('CONTENT_TEXT', $newsObj->getNewsPage()); $newsObj->getPageTitle($page_title); $page_title = $newsObj->newsTitle; $page_metatitle = $page_title; break; //------------------------------------------------------- // Livecam //------------------------------------------------------- case "livecam": $modulespath = "modules/livecam/index.class.php"; /** * @ignore */ if (file_exists($modulespath)) require_once($modulespath); else die ($_CORELANG['TXT_THIS_MODULE_DOESNT_EXISTS']); $objLivecam = new Livecam($page_content); $objTemplate->setVariable('CONTENT_TEXT', $objLivecam->getPage()); //$moduleStyleFile = 'modules/calendar'.MODULE_INDEX.'/frontend_style.css'; $moduleStyleFile = 'modules/livecam/datepicker/datepickercontrol.css'; break; //------------------------------------------------------- // Guestbook //------------------------------------------------------- case "guestbook": $modulespath = "modules/guestbook/index.class.php"; /** * @ignore */ if (file_exists($modulespath)) require_once($modulespath); else die ($_CORELANG['TXT_THIS_MODULE_DOESNT_EXISTS']); $objGuestbook = new Guestbook($page_content); $objTemplate->setVariable('CONTENT_TEXT', $objGuestbook->getPage()); break; //------------------------------------------------------- // Memberdir //------------------------------------------------------- case "memberdir": $modulespath = "modules/memberdir/index.class.php"; /** * @ignore */ if (file_exists($modulespath)) require_once($modulespath); else die ($_CORELANG['TXT_THIS_MODULE_DOESNT_EXISTS']); $objMemberDir = new memberDir($page_content); $objTemplate->setVariable('CONTENT_TEXT', $objMemberDir->getPage()); break; //------------------------------------------------------- // Data Module //------------------------------------------------------- case "data": $modulespath = "modules/data/index.class.php"; /** * @ignore */ if (file_exists($modulespath)) require_once($modulespath); else die ($_CORELANG['TXT_THIS_MODULE_DOESNT_EXISTS']); //if (!isset($sessionObj) || !is_object($sessionObj)) $sessionObj = new cmsSession(); #if (!isset($objAuth) || !is_object($objAuth)) $objAuth = &new Auth($type = 'frontend'); $objData = new Data($page_content); $objTemplate->setVariable('CONTENT_TEXT', $objData->getPage()); break; //------------------------------------------------------- // Download //------------------------------------------------------- case "download": $modulespath = "modules/download/index.class.php"; /** * @ignore */ if (file_exists($modulespath)) require_once($modulespath); else die ($_CORELANG['TXT_THIS_MODULE_DOESNT_EXISTS']); $objDownload = new Download($page_content); $objTemplate->setVariable('CONTENT_TEXT', $objDownload->getPage()); break; //------------------------------------------------------- // Recommend //------------------------------------------------------- case "recommend": $modulespath = "modules/recommend/index.class.php"; /** * @ignore */ if (file_exists($modulespath)) require_once($modulespath); else die ($_CORELANG['TXT_THIS_MODULE_DOESNT_EXISTS']); $objRecommend = new Recommend($page_content); $objTemplate->setVariable('CONTENT_TEXT', $objRecommend->getPage()); break; //------------------------------------------------------- // E-Card //------------------------------------------------------- case "ecard": $modulespath = "modules/ecard/index.class.php"; /** * @ignore */ if (file_exists($modulespath)) require_once($modulespath); else die ($_CORELANG['TXT_THIS_MODULE_DOESNT_EXISTS']); $objEcard = new Ecard($page_content); $objTemplate->setVariable('CONTENT_TEXT', $objEcard->getPage()); break; //------------------------------------------------------- // Tools //------------------------------------------------------- case "tools": $modulespath = "modules/tools/index.class.php"; /** * @ignore */ if (file_exists($modulespath)) require_once($modulespath); else die ($_CORELANG['TXT_THIS_MODULE_DOESNT_EXISTS']); $objTools = new Tools($page_content); $objTemplate->setVariable('CONTENT_TEXT', $objTools->getPage()); break; //------------------------------------------------------- // Dataviewer //------------------------------------------------------- case "dataviewer": $modulespath = "modules/dataviewer/index.class.php"; /** * @ignore */ if (file_exists($modulespath)) require_once($modulespath); else die ($_CORELANG['TXT_THIS_MODULE_DOESNT_EXISTS']); $objDataviewer = new Dataviewer($page_content); $objTemplate->setVariable('CONTENT_TEXT', $objDataviewer->getPage()); break; //------------------------------------------------------- // DocumentSystem module //------------------------------------------------------- case "docsys": $modulespath = "modules/docsys/index.class.php"; /** * @ignore */ if (file_exists($modulespath)) require_once($modulespath); else die ($_CORELANG['TXT_THIS_MODULE_DOESNT_EXISTS']); $docSysObj= new docSys($page_content); $objTemplate->setVariable('CONTENT_TEXT', $docSysObj->getDocSysPage()); $docSysObj->getPageTitle($page_title); $page_title = $docSysObj->docSysTitle; $page_metatitle = $docSysObj->docSysTitle; break; //------------------------------------------------------- // Search Module //------------------------------------------------------- case "search": $modulespath = "core_modules/search/index.class.php"; /** * @ignore */ if (file_exists($modulespath)) require_once($modulespath); else die ($_CORELANG['TXT_THIS_MODULE_DOESNT_EXISTS']); $pos = (isset($_GET['pos'])) ? intval($_GET['pos']) : ""; $objTemplate->setVariable('CONTENT_TEXT', search_getSearchPage($pos, $page_content)); unset($pos); break; //------------------------------------------------------- // Contact Module //------------------------------------------------------- case "contact": $modulespath = "core_modules/contact/index.class.php"; /** * @ignore */ if (file_exists($modulespath)) require_once($modulespath); else die ($_CORELANG['TXT_THIS_MODULE_DOESNT_EXISTS']); $contactObj= new Contact($page_content); $objTemplate->setVariable('CONTENT_TEXT', $contactObj->getContactPage()); $moduleStyleFile = "core_modules/contact/frontend_style.css"; break; //------------------------------------------------------- // Sitemap Core //------------------------------------------------------- case "ids": $objTemplate->setVariable('CONTENT_TEXT', $page_content); break; //------------------------------------------------------- // Sitemapping //------------------------------------------------------- case "sitemap": $modulespath = "core_modules/sitemap/index.class.php"; /** * @ignore */ if (file_exists($modulespath)) require_once($modulespath); else die ($_CORELANG['TXT_THIS_MODULE_DOESNT_EXISTS']); $sitemap = new sitemap($page_content); $objTemplate->setVariable('CONTENT_TEXT', $sitemap->getSitemapContent()); break; //------------------------------------------------------- // media Core //------------------------------------------------------- case "media": $modulespath = ASCMS_CORE_MODULE_PATH . '/media/index.class.php'; /** * @ignore */ if (file_exists($modulespath)) require_once($modulespath); else die ($_CORELANG['TXT_THIS_MODULE_DOESNT_EXISTS']); $objMedia = new MediaManager($page_content, $plainSection.MODULE_INDEX); $objTemplate->setVariable('CONTENT_TEXT', $objMedia->getMediaPage()); break; //------------------------------------------------------- // newsletter Module //------------------------------------------------------- case "newsletter": $modulespath = "modules/newsletter/index.class.php"; /** * @ignore */ if (file_exists($modulespath)) require_once($modulespath); else die ($_CORELANG['TXT_THIS_MODULE_DOESNT_EXISTS']); $newsletter = new newsletter($page_content); $objTemplate->setVariable('CONTENT_TEXT', $newsletter->getPage()); break; //------------------------------------------------------- // gallery Module //------------------------------------------------------- case "gallery": $modulespath = "modules/gallery/index.class.php"; /** * @ignore */ if (file_exists($modulespath)) require_once($modulespath); else die ($_CORELANG['TXT_THIS_MODULE_DOESNT_EXISTS']); $objGallery = new Gallery($page_content); $objTemplate->setVariable("CONTENT_TEXT", $objGallery->getPage()); $topGalleryName = $objGallery->getTopGalleryName(); if ($topGalleryName) { $page_title = $topGalleryName; $page_metatitle = $topGalleryName; } break; //------------------------------------------------------- // Voting //------------------------------------------------------- case "voting": $modulespath = "modules/voting/index.class.php"; /** * @ignore */ if (file_exists($modulespath)) require_once($modulespath); else die ($_CORELANG['TXT_THIS_MODULE_DOESNT_EXISTS']); $objTemplate->setVariable("CONTENT_TEXT", votingShowCurrent($page_content)); break; //------------------------------------------------------- // file uploader //------------------------------------------------------- case 'fileUploader': $modulespath = ASCMS_MODULE_PATH.'/fileUploader/index.class.php'; if (file_exists($modulespath)) require_once($modulespath); else die($_CORELANG['TXT_THIS_MODULE_DOESNT_EXISTS']); $objFileUploader = new FileUploader(); $objFileUploader->getPage(); exit; break; //------------------------------------------------------- // News Feed Module //------------------------------------------------------- case "feed": $modulespath = "modules/feed/index.class.php"; /** * @ignore */ if (file_exists($modulespath)) require_once($modulespath); else die ($_CORELANG['TXT_THIS_MODULE_DOESNT_EXISTS']); $objFeed = new feed($page_content); $objTemplate->setVariable('CONTENT_TEXT', $objFeed->getFeedPage()); break; //------------------------------------------------------- // immo Module //------------------------------------------------------- case "immo": $modulespath = "modules/immo/index.class.php"; /** * @ignore */ if (file_exists($modulespath)) require_once($modulespath); else die ($_CORELANG['TXT_THIS_MODULE_DOESNT_EXISTS']); $objImmo = new Immo($page_content); $objTemplate->setVariable("CONTENT_TEXT", $objImmo->getPage()); if(!empty($_GET['cmd']) && $_GET['cmd'] == 'showObj'){ $page_title = $objImmo->getPageTitle($page_title); $page_metatitle = $page_title; } break; //------------------------------------------------------- // Calendar Module //------------------------------------------------------- case 'calendar': $modulespath = 'modules/calendar'.MODULE_INDEX.'/index.class.php';; $moduleStyleFile = 'modules/calendar'.MODULE_INDEX.'/frontend_style.css'; define('CALENDAR_MANDATE', MODULE_INDEX); /** * @ignore */ if (file_exists($modulespath)) require_once($modulespath); else die ($_CORELANG['TXT_THIS_MODULE_DOESNT_EXISTS']); $objCalendar = new Calendar($page_content, MODULE_INDEX); $objTemplate->setVariable('CONTENT_TEXT', $objCalendar->getCalendarPage()); if(!empty($objCalendar->pageTitle)) { $page_metatitle = $objCalendar->pageTitle; $page_title = $objCalendar->pageTitle; } break; //------------------------------------------------------- // Reservation Module //------------------------------------------------------- case "reservation": $modulespath = "modules/reservation/index.class.php"; /** * @ignore */ if (file_exists($modulespath)) require_once($modulespath); else die ($_CORELANG['TXT_THIS_MODULE_DOESNT_EXISTS']); $objReservationModule = new reservations($page_content); $objTemplate->setVariable('CONTENT_TEXT', $objReservationModule->getPage()); $moduleStyleFile = "modules/reservation/frontend_style.css"; break; //------------------------------------------------------- // Directory Module //------------------------------------------------------- case "directory": $modulespath = "modules/directory/index.class.php"; /** * @ignore */ if (file_exists($modulespath)) require_once($modulespath); else die ($_CORELANG['TXT_THIS_MODULE_DOESNT_EXISTS']); $directory = new rssDirectory($page_content); $objTemplate->setVariable("CONTENT_TEXT", $directory->getPage()); $directory_pagetitle = $directory->getPageTitle(); if(!empty($directory_pagetitle)) { $page_metatitle = $directory_pagetitle; $page_title = $directory_pagetitle; } break; //------------------------------------------------------- // Market Module //------------------------------------------------------- case "market": $modulespath = "modules/market/index.class.php"; /** * @ignore */ if (file_exists($modulespath)) require_once($modulespath); else die ($_CORELANG['TXT_THIS_MODULE_DOESNT_EXISTS']); $market = new Market($page_content); $objTemplate->setVariable("CONTENT_TEXT", $market->getPage()); break; //------------------------------------------------------- // Podcast Module //------------------------------------------------------- case "podcast": $modulespath = "modules/podcast/index.class.php"; /** * @ignore */ if (file_exists($modulespath)) require_once($modulespath); else die ($_CORELANG['TXT_THIS_MODULE_DOESNT_EXISTS']); $objPodcast = new podcast($page_content); $objTemplate->setVariable("CONTENT_TEXT", $objPodcast->getPage($podcastFirstBlock)); break; //------------------------------------------------------- // Forum Module //------------------------------------------------------- case "forum": $modulespath = "modules/forum/index.class.php"; /** * @ignore */ if (file_exists($modulespath)) require_once($modulespath); else die ($_CORELANG['TXT_THIS_MODULE_DOESNT_EXISTS']); $objForum = new Forum($page_content); $objTemplate->setVariable('CONTENT_TEXT', $objForum->getPage()); // $moduleStyleFile = "modules/forum/css/frontend_style.css"; break; //------------------------------------------------------- // Blog Module //------------------------------------------------------- case "blog": $modulespath = "modules/blog/index.class.php"; /** * @ignore */ if (file_exists($modulespath)) require_once($modulespath); else die ($_CORELANG['TXT_THIS_MODULE_DOESNT_EXISTS']); $objBlog = new Blog($page_content); $objTemplate->setVariable('CONTENT_TEXT', $objBlog->getPage()); break; //------------------------------------------------------- // Knowledge Module //------------------------------------------------------- case "knowledge": $modulespath = "modules/knowledge/index.class.php"; /** * @ignore */ if (file_exists($modulespath)) require_once($modulespath); else die ($_CORELANG['TXT_THIS_MODULE_DOESNT_EXISTS']); $objKnowledge = &new Knowledge($page_content); $objTemplate->setVariable("CONTENT_TEXT", $objKnowledge->getPage()); if (!empty($objKnowledge->pageTitle)) { $page_title = $objKnowledge->pageTitle; $page_metatitle = $objKnowledge->pageTitle; } break; //------------------------------------------------------- // jobs module //------------------------------------------------------- case "jobs": $modulespath = "modules/jobs/index.class.php"; /** * @ignore */ if (file_exists($modulespath)) require_once($modulespath); else die ($_CORELANG['TXT_THIS_MODULE_DOESNT_EXISTS']); $jobsObj= new jobs($page_content); $objTemplate->setVariable('CONTENT_TEXT', $jobsObj->getJobsPage()); $jobsObj->getPageTitle($page_title); $page_title = $jobsObj->jobsTitle; $page_metatitle = $jobsObj->jobsTitle; break; //------------------------------------------------------- // logout //------------------------------------------------------- case "logout": if (isset($objFWUser) && is_object($objFWUser) && $objFWUser->objUser->login()) { $objFWUser->logout(); } break; //------------------------------------------------------- // error module //------------------------------------------------------- case "error": $modulespath = "core/error.class.php"; /** * @ignore */ if (file_exists($modulespath)) require($modulespath); else die ($_CORELANG['TXT_THIS_MODULE_DOESNT_EXISTS']); $errorObj= new error($page_content); $objTemplate->setVariable('CONTENT_TEXT', $errorObj->getErrorPage()); break; //------------------------------------------------------- // E-Government Module //------------------------------------------------------- case "egov": $modulespath = "modules/egov/index.class.php"; /** * @ignore */ if (file_exists($modulespath)) require_once($modulespath); else die ($_CORELANG['TXT_THIS_MODULE_DOESNT_EXISTS']); $objEgov = new eGov($page_content); $objTemplate->setVariable("CONTENT_TEXT", $objEgov->getPage()); break; case "support": /** * Support System Module * @author Reto Kohli * @since 1.2.0 * @version 0.0.1 alpha */ $modulespath = ASCMS_MODULE_PATH."/support/index.class.php"; if (file_exists($modulespath)) { /** @ignore */ require_once($modulespath); } else { die ($_CORELANG['TXT_THIS_MODULE_DOESNT_EXISTS']); } $objSupport = new support($page_content); $objTemplate->setVariable("CONTENT_TEXT", $objSupport->getPage()); break; //------------------------------------------------------- // Partners Module //------------------------------------------------------- case "partners": $modulespath = "modules/partners/index.class.php"; /** * @ignore */ if (file_exists($modulespath)) require_once($modulespath); else die ($_CORELANG['TXT_THIS_MODULE_DOESNT_EXISTS']); $objPartners = new Partners($page_content); $objTemplate->setVariable('CONTENT_TEXT', $objPartners->getPage()); break; //------------------------------------------------------- // U2U Module //------------------------------------------------------- case "u2u": $modulespath = "modules/u2u/index.class.php"; if (file_exists($modulespath)) require_once($modulespath); else die($_CORELANG['TXT_THIS_MODULE_DOESNT_EXISTS']); $objAccess = new u2u($page_content); $objTemplate->setVariable('CONTENT_TEXT', $objAccess->getPage($page_metatitle, $page_title)); break; //------------------------------------------------------- // Auction Module //------------------------------------------------------- case "auction": $modulespath = "modules/auction/index.class.php"; /** * @ignore */ if (file_exists($modulespath)) require_once($modulespath); else die ($_CORELANG['TXT_THIS_MODULE_DOESNT_EXISTS']); $auction = new Auction($page_content); $objTemplate->setVariable("CONTENT_TEXT", $auction->getPage()); break; //------------------------------------------------------- // Download Module //------------------------------------------------------- case "downloads": $modulespath = "modules/downloads/index.class.php"; if (file_exists($modulespath)) require_once($modulespath); else die ($_CORELANG['TXT_THIS_MODULE_DOESNT_EXISTS']); $objDownloadsModule = new downloads($page_content); $objTemplate->setVariable('CONTENT_TEXT', $objDownloadsModule->getPage()); $downloads_pagetitle = $objDownloadsModule->getPageTitle(); if(!empty($downloads_pagetitle)) { $page_metatitle = $downloads_pagetitle; $page_title = $downloads_pagetitle; } break; //------------------------------------------------------- // default case //------------------------------------------------------- default: $objTemplate->setVariable('CONTENT_TEXT', $page_content); } //------------------------------------------------------- // show shop navbar on each page //------------------------------------------------------- if (isset($_CONFIGURATION['custom']['shopnavbar']) AND $_CONFIGURATION['custom']['shopnavbar'] == TRUE) { if (!is_object($shopObj)){ $modulespath = "modules/shop/index.class.php"; if (file_exists($modulespath)){ /** * @ignore */ require_once($modulespath); if (!is_object($sessionObj)) $sessionObj=new cmsSession(); $_ARRAYSHOPLANG = $objInit->loadLanguageData('shop'); $_ARRAYLANG = array_merge($_ARRAYLANG, $_ARRAYSHOPLANG); $boolShop = true; $shopObj = new Shop(); $objTemplate->setVariable('SHOPNAVBAR_FILE', $shopObj->getShopNavbar($themesPages['shopnavbar'])); } } } //------------------------------------------------------- // Calendar //------------------------------------------------------- // print_r($objTemplate->getPlaceholderList()); $calendarCheck1 = $objTemplate->placeholderExists('CALENDAR'); $calendarCheck2 = $objTemplate->placeholderExists('CALENDAR_EVENTS'); if(!empty($calendarCheck1) OR !empty($calendarCheck2)) { $modulespath = "modules/calendar/HomeCalendar.class.php"; if (file_exists($modulespath)){ /** * @ignore */ require_once($modulespath); $objHomeCalendar = new HomeCalendar(); if(!empty($calendarCheck1)) { $objTemplate->setVariable('CALENDAR', $objHomeCalendar->getHomeCalendar()); } if(!empty($calendarCheck2)) { $objTemplate->setVariable('CALENDAR_EVENTS', $objHomeCalendar->getHomeCalendarEvents()); } } } //------------------------------------------------------- // Directory Show Latest //------------------------------------------------------- //$directoryCheck = $objTemplate->blockExists('directoryLatest_row_1'); $directoryCheck = array(); for($i = 1; $i <= 10; $i++){ if($objTemplate->blockExists('directoryLatest_row_'.$i)){ array_push($directoryCheck, $i); } } if(!empty($directoryCheck)) { $modulespath = "modules/directory/index.class.php"; if (file_exists($modulespath)){ /** * @ignore */ require_once($modulespath); $objDirectory = new rssDirectory(''); if(!empty($directoryCheck)) { $objTemplate->setVariable('TXT_DIRECTORY_LATEST', $_CORELANG['TXT_DIRECTORY_LATEST']); $objDirectory->getBlockLatest($directoryCheck); } } } //------------------------------------------------------- // Market Show Latest //------------------------------------------------------- $marketCheck = $objTemplate->blockExists('marketLatest'); if(!empty($marketCheck)) { $modulespath = "modules/market/index.class.php"; if (file_exists($modulespath)){ /** * @ignore */ require_once($modulespath); $objMarket = new Market(''); if(!empty($marketCheck)) { $objTemplate->setVariable('TXT_MARKET_LATEST', $_CORELANG['TXT_MARKET_LATEST']); $objMarket->getBlockLatest(); } } } //------------------------------------------------------- // Set banner variables //------------------------------------------------------- if ($_CONFIG['bannerStatus'] == '1') { $modulespath = "core_modules/banner/index.class.php"; if (file_exists($modulespath)) { /** * @ignore */ include_once($modulespath); $objBanner = new Banner(); $objTemplate->setVariable(array( 'BANNER_GROUP_1' => $objBanner->getBannerCode(1, $pageId), 'BANNER_GROUP_2' => $objBanner->getBannerCode(2, $pageId), 'BANNER_GROUP_3' => $objBanner->getBannerCode(3, $pageId), 'BANNER_GROUP_4' => $objBanner->getBannerCode(4, $pageId), 'BANNER_GROUP_5' => $objBanner->getBannerCode(5, $pageId), 'BANNER_GROUP_6' => $objBanner->getBannerCode(6, $pageId), 'BANNER_GROUP_7' => $objBanner->getBannerCode(7, $pageId), 'BANNER_GROUP_8' => $objBanner->getBannerCode(8, $pageId), 'BANNER_GROUP_9' => $objBanner->getBannerCode(9, $pageId), 'BANNER_GROUP_10' => $objBanner->getBannerCode(10, $pageId) )); } if(isset($_REQUEST['bannerId'])){ $objBanner->updateClicks(intval($_REQUEST['bannerId'])); } } //------------------------------------------------------- // Frontend Editing: prepare needed code-fragments //------------------------------------------------------- $strFeInclude = $strFeLink = $strFeContent = null; if ($_CONFIG['frontendEditingStatus'] == 'on') { $modulespath = "core_modules/frontendEditing/frontendEditingLib.class.php"; if (file_exists($modulespath)) { /** * @ignore */ include_once($modulespath); $strFeInclude = frontendEditingLib::getIncludeCode(); $strFeLink = frontendEditingLib::getLinkCode(); $strFeContent = frontendEditingLib::getContentCode($pageId, $section, $command); } } //------------------------------------------------------- // set global template variables //------------------------------------------------------- $objTemplate->setVariable(array( 'CHARSET' => $objInit->getFrontendLangCharset(), 'TITLE' => $page_title, 'METATITLE' => $page_metatitle, 'NAVTITLE' => $page_catname, 'GLOBAL_TITLE' => $_CONFIG['coreGlobalPageTitle'], 'DOMAIN_URL' => $_CONFIG['domainUrl'], 'BASE_URL' => ASCMS_PROTOCOL.'://'.$_CONFIG['domainUrl'].ASCMS_PATH_OFFSET, 'METAKEYS' => $page_keywords, 'METADESC' => $page_desc, 'METAROBOTS' => $page_robots, 'CONTENT_TITLE' => ''.$page_title.'', 'CSS_NAME' => $pageCssName, 'PRINT_URL' => $objInit->getPrintUri(), 'PDF_URL' => $objInit->getPDFUri(), 'PAGE_URL' => htmlspecialchars($objInit->getPageUri()), 'CURRENT_URL' => $objInit->getCurrentPageUri(), 'DATE' => showFormattedDate(), 'TIME' => date("H:i", time()), 'NAVTREE' => $objNavbar->getTrail(), 'SUBNAVBAR_FILE' => $objNavbar->getNavigation($themesPages['subnavbar'],$boolShop), 'SUBNAVBAR2_FILE' => $objNavbar->getNavigation($themesPages['subnavbar2'],$boolShop), 'SUBNAVBAR3_FILE' => $objNavbar->getNavigation($themesPages['subnavbar3'],$boolShop), 'NAVBAR_FILE' => $objNavbar->getNavigation($themesPages['navbar'],$boolShop), 'ONLINE_USERS' => $objCounter->getOnlineUsers(), 'VISITOR_NUMBER' => $objCounter->getVisitorNumber(), 'COUNTER' => $objCounter->getCounterTag(), 'BANNER' => isset($objBanner) ? $objBanner->getBannerJS() : '', 'VERSION' => $_CONFIG['coreCmsName'], 'LANGUAGE_NAVBAR' => $objNavbar->getFrontendLangNavigation(), 'ACTIVE_LANGUAGE_NAME' => $objInit->getFrontendLangName(), 'RANDOM' => md5(microtime()), 'TXT_SEARCH' => $_CORELANG['TXT_SEARCH'], 'MODULE_INDEX' => MODULE_INDEX, 'LOGIN_INCLUDE' => (isset($strFeInclude) ? $strFeInclude : ''), 'LOGIN_URL' => (isset($strFeLink) ? $strFeLink : ''), 'LOGIN_CONTENT' => (isset($strFeContent) ? $strFeContent : ''), 'JAVASCRIPT' => "javascript_inserting_here" )); if ($objTemplate->blockExists('access_logged_in')) { $objFWUser = FWUser::getFWUserObject(); if ($objFWUser->objUser->login()) { $objFWUser->setLoggedInInfos(); $objTemplate->parse('access_logged_in'); } else { $objTemplate->hideBlock('access_logged_in'); } } if ($objTemplate->blockExists('access_logged_out')) { $objFWUser = FWUser::getFWUserObject(); if ($objFWUser->objUser->login()) { $objTemplate->hideBlock('access_logged_out'); } else { $objTemplate->touchBlock('access_logged_out'); } } // currently online users if (FWUser::showCurrentlyOnlineUsers()) { if ($objTemplate->blockExists('access_currently_online_member_list')) { if ($objTemplate->blockExists('access_currently_online_female_members')) { // TODO: // $objAccessBlocks is never even mentioned in the code above! // Just inititialize the object when either males or females are shown. if (isset($objAccessBlocks) && is_object($objAccessBlocks) || ($modulespath = 'core_modules/access/lib/blocks.class.php') && file_exists($modulespath) && (include_once($modulespath)) && ($objAccessBlocks = new Access_Blocks()) ) { $objAccessBlocks->setCurrentlyOnlineUsers('female'); } } if ($objTemplate->blockExists('access_currently_online_male_members')) { if (isset($objAccessBlocks) && is_object($objAccessBlocks) || ($modulespath = 'core_modules/access/lib/blocks.class.php') && file_exists($modulespath) && (include_once($modulespath)) && ($objAccessBlocks = new Access_Blocks()) ) { $objAccessBlocks->setCurrentlyOnlineUsers('male'); } } if ($objTemplate->blockExists('access_currently_online_members')) { if (isset($objAccessBlocks) && is_object($objAccessBlocks) || ($modulespath = 'core_modules/access/lib/blocks.class.php') && file_exists($modulespath) && (include_once($modulespath)) && ($objAccessBlocks = new Access_Blocks()) ) { $objAccessBlocks->setCurrentlyOnlineUsers(); } } } } elseif ($objTemplate->blockExists('access_currently_online_member_list')) { $objTemplate->hideBlock('access_currently_online_member_list'); } // last active users if (FWUser::showLastActivUsers()) { if ($objTemplate->blockExists('access_last_active_member_list')) { if ($objTemplate->blockExists('access_last_active_female_members')) { if (isset($objAccessBlocks) && is_object($objAccessBlocks) || ($modulespath = 'core_modules/access/lib/blocks.class.php') && file_exists($modulespath) && (include_once($modulespath)) && ($objAccessBlocks = new Access_Blocks()) ) { $objAccessBlocks->setLastActiveUsers('female'); } } if ($objTemplate->blockExists('access_last_active_male_members')) { if (isset($objAccessBlocks) && is_object($objAccessBlocks) || ($modulespath = 'core_modules/access/lib/blocks.class.php') && file_exists($modulespath) && (include_once($modulespath)) && ($objAccessBlocks = new Access_Blocks()) ) { $objAccessBlocks->setLastActiveUsers('male'); } } if ($objTemplate->blockExists('access_last_active_members')) { if (isset($objAccessBlocks) && is_object($objAccessBlocks) || ($modulespath = 'core_modules/access/lib/blocks.class.php') && file_exists($modulespath) && (include_once($modulespath)) && ($objAccessBlocks = new Access_Blocks()) ) { $objAccessBlocks->setLastActiveUsers(); } } } } elseif ($objTemplate->blockExists('access_last_active_member_list')) { $objTemplate->hideBlock('access_last_active_member_list'); } // latest registered users if (FWUser::showLatestRegisteredUsers()) { if ($objTemplate->blockExists('access_latest_registered_member_list')) { if ($objTemplate->blockExists('access_latest_registered_female_members')) { if (isset($objAccessBlocks) && is_object($objAccessBlocks) || ($modulespath = 'core_modules/access/lib/blocks.class.php') && file_exists($modulespath) && (include_once($modulespath)) && ($objAccessBlocks = new Access_Blocks()) ) { $objAccessBlocks->setLatestRegisteredUsers('female'); } } if ($objTemplate->blockExists('access_latest_registered_male_members')) { if (isset($objAccessBlocks) && is_object($objAccessBlocks) || ($modulespath = 'core_modules/access/lib/blocks.class.php') && file_exists($modulespath) && (include_once($modulespath)) && ($objAccessBlocks = new Access_Blocks()) ) { $objAccessBlocks->setLatestRegisteredUsers('male'); } } if ($objTemplate->blockExists('access_latest_registered_members')) { if (isset($objAccessBlocks) && is_object($objAccessBlocks) || ($modulespath = 'core_modules/access/lib/blocks.class.php') && file_exists($modulespath) && (include_once($modulespath)) && ($objAccessBlocks = new Access_Blocks()) ) { $objAccessBlocks->setLatestRegisteredUsers(); } } } } elseif ($objTemplate->blockExists('access_latest_registered_member_list')) { $objTemplate->hideBlock('access_latest_registered_member_list'); } // birthday users if (FWUser::showBirthdayUsers()) { if ($objTemplate->blockExists('access_birthday_member_list')) { if ( ( isset($objAccessBlocks) && is_object($objAccessBlocks) || ($modulespath = 'core_modules/access/lib/blocks.class.php') && file_exists($modulespath) && (include_once($modulespath)) && ($objAccessBlocks = new Access_Blocks()) ) && $objAccessBlocks->isSomeonesBirthdayToday() ) { if ($objTemplate->blockExists('access_birthday_female_members')) { $objAccessBlocks->setBirthdayUsers('female'); } if ($objTemplate->blockExists('access_birthday_male_members')) { $objAccessBlocks->setBirthdayUsers('male'); } if ($objTemplate->blockExists('access_birthday_members')) { $objAccessBlocks->setBirthdayUsers(); } $objTemplate->touchBlock('access_birthday_member_list'); } else { $objTemplate->hideBlock('access_birthday_member_list'); } } } elseif ($objTemplate->blockExists('access_birthday_member_list')) { $objTemplate->hideBlock('access_birthday_member_list'); } //------------------------------------------------------- // parse system //------------------------------------------------------- $parsingtime = explode(' ', microtime()); $time = round(((float)$parsingtime[0] + (float)$parsingtime[1]) - ((float)$starttime[0] + (float)$starttime[1]), 5); $objTemplate->setVariable('PARSING_TIME', $time); //Allow PRINT_URL & PDF_URL in sidebar $themesPages['sidebar'] = str_replace('{PRINT_URL}',$objInit->getPrintUri(), $themesPages['sidebar']); $themesPages['sidebar'] = str_replace('{PDF_URL}',$objInit->getPDFUri(), $themesPages['sidebar']); $objTemplate->setVariable(array( 'SIDEBAR_FILE' => $themesPages['sidebar'], 'JAVASCRIPT_FILE' => $themesPages['javascript'], 'BUILDIN_STYLE_FILE' => $themesPages['buildin_style'] )); $objTemplate->setVariable(array( 'JAVASCRIPT_LIGHTBOX' => ' ' )); $objTemplate->setVariable(array( 'JAVASCRIPT_MOBILE_DETECTOR' => '' )); if (!empty($moduleStyleFile)) { $objTemplate->setVariable(array( 'STYLE_FILE' => "" )); } if (isset($_GET['pdfview']) && intval($_GET['pdfview']) == 1) { require_once ASCMS_CORE_PATH.'/pdf.class.php'; $objPDF = new PDF(); $objPDF->title = $page_title.(!empty($page_title) ? '.pdf' : null); $objPDF->content = $objTemplate->get(); $objPDF->Create(); } else { /** * Get all javascripts in the code, replace them with nothing, and register the js file * to the javascript lib. This is because we don't want something twice, and there could be * a theme that requires a javascript, which then could be used by a module too and therefore would * be loaded twice. */ $endcode = $objTemplate->get(); /* Finds all uncommented script tags, strips them out of the HTML and * stores them internally so we can put them in the placeholder later * (see JS::getCode() below) */ JS::findJavascripts($endcode); /* * Proposal: Use this * $endcode = preg_replace_callback('/