connect(); $domain = CmsDomain::GetDomain(); if(!$domain) { echo 'Domain not found'; exit; } ## Catch CMS ## if(strtolower($url_depth[0]) == 'sitemap.xml') { echo ''; echo ''; GetSitemapPages($domain->url, $domain->id, 0); echo ''; } else if(strtolower($url_depth[0]) == 'style') { header('Content-Type: text/css'); $name = str_replace(".css", "", $url_depth[1]); $style = CmsStyle::GetStyleByName($name, $domain->id); if($style) { $content = $style->content; $content = str_replace("

", "", $content); $content = str_replace("

", "", $content); $content = str_replace("
", "", $content); } else { $content = "/* Onbekend CSS bestand */"; } echo $content; } else if(strtolower($url_depth[0]) == 'img') { $file = file_get_contents($domain->uploadfolder.$url_depth[1]); echo $file; } else if(strtolower($url_depth[0]) == 'documents') { $file = file_get_contents($domain->documentfolder.$url_depth[1]); echo $file; } else if(strtolower($url_depth[0]) == 'cms') { require_once('classes/general/module.class.php'); if(strtolower($url_depth[1]) == 'sraorders.php') { CmsTemplate::LoadDefaultFile("designs/php/fixit.cms.fullwidth.php"); } else { CmsTemplate::LoadDefaultFile("designs/php/fixit.cms.design.php"); } if(!isset($_SESSION[cms_user])) { CmsTemplate::Replace('CONTENT', CmsTemplate::LoadTemplateFile('./cmspages/login.php')); } else { $arr_Image = explode('/',$domain->uploadfolder); $imagedirectory = '/'.$arr_Image[6].'/'.$arr_Image[7]; if(!isset($_SESSION["upload_folder"])) { $_SESSION["upload_folder"] = $imagedirectory; } $pageurl = ""; for($i=1; $iGetDesignFile()); if(strtolower($url_depth[0]) == 'news') { if($url_depth[1] == '') { CmsTemplate::Replace('CONTENT', CmsTemplate::LoadTemplateFile('./templates/newslist.php')); } else { $news = CmsNews::GetNewsByUrl($domain->id, $url_depth[1]); if(isset($news)) { CmsTemplate::Replace('CONTENT', CmsTemplate::LoadTemplateFile('./templates/newsitem.php')); } else { CmsTemplate::Replace('CONTENT', ''); } } } else { $page = CmsPage::GetPage(); if($page != null) { CmsTemplate::Replace('CONTENT', CmsTemplate::LoadTemplateFile($page->GetTemplateFile(''))); } else { CmsTemplate::Replace('CONTENT', ''); } } CmsTemplate::Publish(); } $db->close(); ob_end_flush(); function GetSitemapPages($url, $domainId, $parentId) { $db = Database::obtain(); $sql = "SELECT id, url FROM cms_page WHERE enabled=1 AND parentId=".$parentId." AND fkdomainid=".$domainId; $rows = $db->fetch_array($sql); foreach($rows as $record) { echo "".$url."/".$record["url"].""; GetSitemapPages($url."/".$record["url"], $domainId, $record["id"]); } } ?>