HEX
Server: Apache
System: Linux v38079.2is.nl 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64
User: democfellows (10015)
PHP: 8.1.34
Disabled: opcache_get_status
Upload Files
File: /var/www/vhosts/creativefellows.nl/test.creativefellows.nl/oudlondon.nl/index.php
<?php

	/*
	 * Include config  files
	 */
	$security_key = 'akz2TaXRfaZ4dAqEeugt';
	require_once "includes/main.inc.php";
	
	/*
	 * Cassette object
	 */
	$cassette = new cassetteFrontend();
	$cassette->connectDB();
	
	
	/*
	 * Set visibility of Paxxio panel
	 */
	$show_paxxio = true;
		
	
	/*
	Client Settings
	 */
	$client 	= $cassette->run("SELECT * FROM `instellingen` WHERE `id`='1'");
	
	
	/*
	Read post
	 */
	$section 		= (isset($_GET["section"])) ? $_GET["section"] : "home";
	$category 		= (isset($_GET["category"])) ? dp($_GET["category"]) : null;
	$sub_category 	= (isset($_GET["sub_category"])) ? dp($_GET["sub_category"]) : null;
	$post_eid 		= (isset($_GET["uid"])) ? $_GET["uid"] : null ;
	$nav_label 		= (isset($_GET["nav_label"])) ? $_GET["nav_label"] : null ;
	$meta_title		= (isset($_GET["meta_title"])) ? dp($_GET["meta_title"]) : 0;
	$post_name		= (isset($_GET["name"])) ? dp($_GET["name"]) : null;

	if(isset($_GET["permalink"]) && $_GET["permalink"] == 1)
	{
		$category = $cassette->getEntryCategory($post_eid);	
	} 
	
	/*
	 * HTML title
	 */
	if($section == "home") $title 	= $client[0]["html_title"];
	elseif($post_name == null) $title 	= ucfirst($meta_title)." - ".$client[0]["html_title"];
	else $title 	= ucfirst($post_name)." | ".$client[0]["html_title"];
	

	if($section != "home"){
				
		// do search
		if(isset($_REQUEST["q"])) require_once "includes/do.search.php";
		
		$cassette->wrap = 0;
		
		
			
		$search	= $sub_category == null ? $category : $sub_category;
		$page	= isset($_REQUEST["p"]) ? $_REQUEST["p"] : 1;
		$force_view = false;
		
		//if(isset($_GET["cms_link"]) && $_GET["cms_link"] == 1) $force_view = true;
		$e 		= $cassette->entries($section,$search,$post_eid,$page,null,null,$force_view);
		
		if(isset($_GET["cms_link"]) && isset($_GET["permalink"]))
		{	

			$e = $cassette->entries($section,$search,$post_eid,$pagenull,null,true,true);
		//	d($e);
		//	die();
		}

		
		// current section if used permalink
		if(isset($_REQUEST["permalink"]) && $_REQUEST["permalink"] == 1){
			$section = $cassette->get("secties","sectie_id",$e[0]->sectie_id,"naam");
		}	
			
			
		// redirect to other page
		if($e[0]->page_redirect){
			header("HTTP/1.1 301 Moved Permanently"); 
			header("Location: ".$e[0]->page_redirect);
			exit();
		}
		
		
		//redirect old urls to new
		$redirect_to = $cassette->checkRedirect($_SERVER["REQUEST_URI"]);
		if($redirect_to != false)
		{
			header("HTTP/1.1 301 Moved Permanently");
			header("Location: ". $redirect_to);					
			exit();
		}		
			
	}

	
	/*
	section info
	*/
	$sectionArr 		= $cassette->sectieInfo($section);
	$cassette->pageStrm	= isset($e) && $e[0]->stramien_id != 0 ? $e[0]->stramien_id : $sectionArr["stramien_id"];
	$page_name			= $cassette->get("stramiens","stramien_id",$cassette->pageStrm,"naam");

	
	/* 
	check if section exists
	*/
	if(empty($sectionArr) || isset($e) && count($e) == 0 && !in_array(strtolower($section),array("actueel","home")))
	{
		header('HTTP/1.1 404 Not Found');
		$page_name 	= "404";	
		$title 		= $client[0]["html_title"];				
	}

	
	if($section == "zoeken")
	{
		$sectionArr["stramien_id"] = 0;	
	}
		
	
	/*
	build pages
	*/
	require_once "includes/header.inc.php";
	
	
	
	if(file_exists("pages/page.". $page_name .".php")) include_once "pages/page.". $page_name .".php" ;
	else include_once "pages/page.default.php";
	
	// Promo
	//require_once 'includes/reveal-promo.php';
	
	// footer
	include_once "includes/footer.inc.php";
	
?>