Location: PHPKode > projects > ZompLog > index.php
<?php
#### sec patch 
#### index.php
include("admin/includes/security_class.php");
$sec_index = new sec_patch();
$sec_index->sec_globals();
###


// some general xxs protection
$_GET['search'] = str_replace('script', '', $_GET['search']);
$_GET['username'] = str_replace('script', '', $_GET['username']);



include_once("admin/functions.php");
include('admin/config.php');
include_once("admin/functions_menu.php");
include('admin/loadsettings.php');
include("language/$settings[language].php");
include("spamwords.php");



/* TIP: this script includes the default layout in every type of page, but you can easily make custom layouts for every type of page.
Let's say you want to make a different lay-out for the archive. Just create a layout, name it archive.php (or anything else) and put it 
in the skins folder of your skin. After that, just change the lines:

elseif ($_GET[page] == 'archive'){
$content = "archive";
include("skins/$settings[skin]/index.php");
}

to

elseif ($_GET[page] == 'archive'){
$content = "archive";
include("skins/$settings[skin]/archive.php");
}

 */


// error when using none existing theme (skin)
if (!file_exists ("themes/$settings[skin]/index.php")){
	die ("<p><strong>Note to the administrator:</strong><br />Your theme is currently set to $settings[skin], but that theme does not exist.<br />Please <a href=\"login.php\">login</a> and change your theme settings to an existing theme.</p><p><strong>Note to the visitors of this website:</strong><br />SORRY, we're temporarily out of sight!<br />We'll fix the problem as soon as possible.</p>");
}


// if url is empty
if (!$_GET[content] && !$_GET['catid'] && !$_GET['search']){
// check if a page has been set to mainpage
$query = "SELECT * FROM $table_pages WHERE mainpage = '1'";
$result = mysql_query ($query, $link) or die("Died getting info from db.  Error returned if any: ".mysql_error());
$numrows = mysql_num_rows($result);

if($numrows){
$content = "mainpage";
$hide_nav = 1;
include("themes/$settings[skin]/index.php");
} 
else
{
$content = "entry";
include("themes/$settings[skin]/index.php");
}
}

elseif($_GET['catid']){
$content = "entry";
include("themes/$settings[skin]/index.php");
}

elseif($_GET['search']){
$content = "entry";
include("themes/$settings[skin]/index.php");
}

elseif ($_GET[content] == 'detail'){
$content = "detail";
include("themes/$settings[skin]/index.php");
}

elseif ($_GET[content] == 'page'){
$content = "page";
include("themes/$settings[skin]/index.php");
}

elseif ($_GET[content] == 'archive'){
$content = "archive";
include("themes/$settings[skin]/index.php");
}

elseif($_GET[content] == 'profile'){
$content = "profile";
include("themes/$settings[skin]/index.php");
}

elseif($_GET[content] == 'login'){
$content = "login";
include("themes/$settings[skin]/index.php");
}


elseif($_GET[content] == 'plugin'){
	$hook = "extra_content"; 
	include("admin/loadplugins.php");
	}


else {
$content = "error";
include("themes/$settings[skin]/index.php");
}



?>
Return current item: ZompLog