Advertisement
Advertisement
| 08.24.2008 at 02:33PM PDT, ID: 23674092 | Points: 90 |
|
[x]
Attachment Details
|
||
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45: 46: 47: 48: 49: 50: 51: 52: 53: 54: 55: 56: 57: 58: 59: 60: 61: 62: 63: 64: 65: 66: 67: 68: 69: 70: 71: 72: 73: 74: 75: 76: 77: 78: 79: |
<?php
function my_session_start()
{
if (isset($_COOKIE['PHPSESSID']))
{
$sessid = $_COOKIE['PHPSESSID'];
}
else if (isset($_GET['PHPSESSID']))
{
$sessid = $_GET['PHPSESSID'];
}
else
{
session_start();
return false;
}
if (!preg_match('/^[a-z0-9]{32}$/', $sessid))
{
return false;
}
session_start();
return true;
}
//This line is explained at PHP.net SESSIONS (Session issue with different domains)
//ini_set("session.cookie_domain",substr($_SERVER[HTTP_HOST],3));
my_session_start();
//Increase error output
error_reporting(E_ALL);
ini_set('display_errors','1');
//Establish if logout is required and session destroy
if(empty($_GET['logout']))
{
$_SESSION['logout'] = "empty";
}
else if(!empty($_GET['logout']))
{
$_SESSION['logout'] = $_GET['logout'];
}
//Establish page cell, if first visit to site go to home.php as default
if(empty($_GET['cellname']))
{
$_SESSION['cellname'] = 'pagecells/home.php';
}
else if (!empty($_GET['cellname']) && $_SESSION['logout'] == "killsession")
{
$_SESSION['cellname'] = $_GET['cellname'];
//session_destroy();
}
else
{
$_SESSION['cellname'] = $_GET['cellname'];
}
include('inc/globalconfig.inc'); //Settings for site controlled by master pages
include ('inc/doctype.inc');
include ('starrater/_drawrating.php'); //Page rater with stars
?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>WebTG</title>
</head>
<body onLoad="new Accordian('basic-accordian',5,'header_highlight'); MM_preloadImages('../Images/WebDesign Nav/webdesign_button_1b.jpg','Images/WebDesign Nav/webdesign_button_2b.jpg')"; onmousemove="closesubnav(event);">
<?php
include ('headerglobal.php');
include (''.$_SESSION['cellname'].'');
include ('footerglobal.php');
?>
</body>
</html>
<?php include 'inc/docdetails.inc'; ?>
|