All pastes #286974 Raw Edit

Mine

public php v1 · immutable
#286974 ·published 2006-12-21 01:14 UTC
rendered paste body
<?php#================================================================## index.php							 ##================================================================## Created:		Wed 20 Dec 2006				 ## Author:		Tom Crosby (tommy@spaceminers.net)	 ##								 ## Description:		Spaceminers base script			 ##================================================================##--------------------------------## Include config and init files#--------------------------------#require('../inc/config.inc.php');require('init.inc.php');#--------------------------------## Check auth#--------------------------------#require('auth.php');if (!$login['auth']) {	if ($login['errno'] > 0) {		print($error[$login['errno']]);	}	$page = 'login';}#--------------------------------## Check page validity#--------------------------------#else {	$page = 'overview';	if (isset($_REQUEST['page'])) {		if (preg_match('/[a-zA-Z]+/',$_REQUEST['page'])) {			$file = PATH_INC . 'pages/' . $_REQUEST['page'] . '.php';			if (file_exists($file)) {				$page = $_REQUEST['page'];			}		}	}}#--------------------------------## Clear cookies if login page#--------------------------------#if ($page == 'logout') {	$page = 'login';}if ($page == 'login') {	setcookie('l','',0);	setcookie('u','',0);}#--------------------------------## Finish headers and serve page#--------------------------------#if (XHTML) {	if (stristr($_SERVER['HTTP_ACCEPT'],'application/xhtml+xml') !== FALSE) {		header('Content-type: application/xhtml+xml');	}}require('header.php');require('pages/' . $page . '.php');require('footer.php');#--------------------------------## Output#--------------------------------#require('output.inc.php');?>