Location: PHPKode > projects > Warp.cms - php/mysql content management > warp_121/xindex.php
<?php

// [session init module v.1.2.1]
// xantis.warp.cms - version 1.2
// (c) 2002 xantis - all rights reserved
// this code is registered and protected by international copyrights laws


//####### Register Globals !

extract($HTTP_ENV_VARS);
extract($HTTP_GET_VARS);
extract($HTTP_POST_VARS);
extract($HTTP_COOKIE_VARS);
extract($HTTP_SERVER_VARS);

//#########################


$xnt_control_var = 'xnt2002warp.cms';
require("lib_adv.php");


if (!$HTTP_COOKIE_VARS["zxywarpsessidvvv"] && !$first) {
	$zini_local_sess_xyz_typ = 'xnew';
} //end if
else {
	$zini_local_sess_xyz_typ = 'xold';
	$zini_local_sess_xyz_val = $HTTP_COOKIE_VARS["zxywarpsessidvvv"];
} //end else


//##################################################


function xinit_sess () {
//---------------------------------

global 	$ywebsite_addr, $ysite_back_color, 
	$zini_local_sess_xyz_typ, $zini_local_sess_xyz_val,
	$ywarp_count_timeout ;

//---------------------------------


if ($zini_local_sess_xyz_typ == 'xnew') {
	//generate new session
	$warp_session_id_mtime = microtime();
	$warp_session_id_uniqq = uniqid(rand(),1);
	$warp_session_id_final = $warp_session_id_uniqq.$warp_session_id_mtime ;
	$warp_session_id = md5($warp_session_id_final);
	setcookie("zxywarpsessidvvv", $warp_session_id, time()+$ywarp_count_timeout);
} //end if
else {
	//get old session
	$warp_session_id = $zini_local_sess_xyz_val;
	setcookie("zxywarpsessidvvv", $warp_session_id, time()+$ywarp_count_timeout);
} //end else


//---------------------------------------------------------page header
xheader ('wait...', '');
xcenter_start ();
xnewline ();
//---------------------------------------------------------END page header


xwriteflash_bg_var ("$ywebsite_addr"."page_redir.swf",
	"&xurl=".rawurlencode("$ywebsite_addr"."xw_main.php?wpsid=$warp_session_id").
	"&"
, '75', '50', "$ysite_back_color");

xnewline ();


echo ( 
	"<script language=\"JavaScript\">\n".
	"window.focus('');\n".
	"</script>\n"
);



//---------------------------------------------------------page footer
xcenter_end ();
xfooter ();
//---------------------------------------------------------END page footer

} //END FUNCTION


//---------------------------------

xinit_sess ();

//---------------------------------

// end of php code
?>
Return current item: Warp.cms - php/mysql content management