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/nec-enterprise.com/index.php
<?php

	/*
	 * Include config  files
	 */
	$security_key = 'akz2TaXRfaZ4dAqEeugt';
	require_once "includes/main.inc.php";
	
	
	/*
	 * create csrf token
	 */
	$_SESSION["csrf_token"] = md5(uniqid(mt_rand(), true));


	/*
	 * Cassette object
	 */
	$cassette = new cassetteFrontend();
	$cassette->connectDB();
	
	$cassette->wrap = 0;
	
	/*
	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_entry 	= (isset($_GET["entry"])) ? $_GET["entry"] : 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;
	$show_breadcrumbs = true;
	
	$preview		= isset($_GET["preview"]) && $_GET["token"] == $security_key ? true : false;

	/*
	HTML title
	*/
	if($section == "home") $title 	= "Business Phone Systems for Small to Global Entities | SMB Remote Contact Center Solutions";//$client[0]["html_title"]." - ".$client[0]["bedrijfsnaam"];
	elseif($post_name == null) $title 	= ucfirst($meta_title)." - ".$client[0]["bedrijfsnaam"];
	else $title 	= ucfirst($post_name) ." - ". $client[0]["bedrijfsnaam"];

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

		// 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);
		}
		
		
		//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) &&  !empty($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) || count($e) == 0 && !in_array(strtolower($section),array("home","search","newsroom")))
	{
		header('HTTP/1.1 404 Not Found');
		$page_name = "404";
	}
	if($section == "zoeken")
	{
		$sectionArr["stramien_id"] = 0;	
	}

	/*
	build pages
	*/
	require_once ROOT_DIR."includes/header.inc.php";
	
	if(file_exists(ROOT_DIR."pages/page.". $page_name .".php")) include_once ROOT_DIR."pages/page.". $page_name .".php" ;
	else include_once ROOT_DIR."pages/page.404.php";

	include_once ROOT_DIR."includes/footer.inc.php";
	
?>