Location: PHPKode > projects > Modular Site Manager > htdocs/index.php
<?php
session_start();
include "./inc/functions.inc.php";
include "refererloger.php";
if(!isset($_SESSION['lastvisit']) && isset($_COOKIE['lastvisit']))
{
	$_SESSION['lastvisit'] = $_COOKIE['lastvisit'];
} elseif(!isset($_SESSION['lastvisit']) && !isset($_COOKIE['lastvisit']) && isset($_COOKIE['mid']))
{
	$_SESSION['lastvisit'] = getuserinfoid('lastvisit');
	setcookie('lastvisit', time(), time()+(60*60*24*365), '/');
}
if($_SESSION['lastvisit']+3600 == time() || !isset($_COOKIE['lastvisit']))
{
	setcookie('lastvisit', time(), time()+(60*60*24*365), '/');
	$_SESSION['lastvisit'] = time();
}
if(isset($_COOKIE['mid']))
{
	$mysql->update(PRE."members", "lastvisit='".time()."'", "id='".$_COOKIE['mid']."'");
} else {
	$_SESSION['lastvisit'] = time()+(60*60*24*365);
}
if(!isset($_GET['phpinfo']))
{
	$start = microtime_float();
	include SITE_PATH."ndstats/stat_calc.php3";
	$cont = new content;

	$cont->dotheme();

	$end = microtime_float();
	echo '<!--
This page took '.($end - $start).' seconds to parse.
-->
';
}
else{
	ob_clean();
	phpinfo();
}
ob_end_flush();

$mysql->close();
?>
Return current item: Modular Site Manager