Location: PHPKode > projects > phpSC > index.php
<?php
session_start();
ini_set('display_errors', 0); // CHANGE VALUE TO 1 FOR RELEASES //
error_reporting(E_ALL); // UNCOMMENT FOR DEBUGGING //
if(!file_exists("config.php")) {
$location = $_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];
$render = "http://".$location."install";
echo "Make sure you CHMOD the entire script folder 0777 and then run the install file located at: <a href='$render'>$render</a>";
die();
}

// Make sure users are logged in //
if(!isset($_SESSION['id'])) {
	if($_GET['module'] != "login") {
		header("Location:index.php?module=login");
		}
}
require_once('config.php');
$conn = _MYSQL_CONNECT;
mysql_select_db(_MYSQL_DB,$conn);

// ALL REQUIRES and IF statements go here //
require_once('core/functions.php');
// END REQUIRES and IF statements //

if(isset($_GET['module'])) {
define("_INCLUDE_MODULE","modules/".$_GET['module'].".php");
} else {
define("_INCLUDE_MODULE","modules/main.php");
}
require_once('layout.html');
?>
Return current item: phpSC