Location: PHPKode > projects > Prsaar Social Networking Platform > PrsaarColour-0.7.alpha.6.3/pr-admin/admin.php
<?php
	require_once("../pr-config/config.php");
	require_once("../pr-inside/database-connect.php");
	session_start();
	if((empty($_SESSION['admin'])) || ($_SESSION['admin'] !== true))
	{
		session_destroy();
		if(isset($_GET['redir']))
			$Redir = $_GET['redir'];
		elseif(isset($_POST['redir']))
			$Redir = $_POST['redir'];
		else
			$Redir = 'index.php';
		header("Location: signin.php?redir={$Redir}");
		exit();
	}
	else
	{
		require_once('admin-display-frame.php');
		require_once('admin-form.php');
		//get the requested filename
		$File = $_SERVER['REQUEST_URI'];
		$File = rtrim($File, '/');
		$File = strrchr($File, '/');
		$File = ltrim($File, '/');
		$QMark = strpos($File, '?'); //if there is some 'get' data
		if(!empty($QMark))
			$File = substr($File, 0, $QMark);
		$File = rtrim($File, '.php');//and we get it
	}
	
	//functions exculsive for administration---------------------------------------------------------------
	function _head() //this function just doesn't works, since 'admin-dislplay-header.php' uses an object '$Display'. Hope someday i'll know why.
	{
		require('./admin-display-header.php');
	}
	function _foot()
	{
		require('./admin-display-footer.php');
	}
	
	
	//if got to update-----------------------------------------------------------------------------------------
	if(isset($_GET['action']))
		$Action = $_GET['action'];
	require_once('../pr-inside/validate.php');
?>
Return current item: Prsaar Social Networking Platform