$roothost = "http://www.webhire.com.au";
$rootdir = "/";
$rootpath = $roothost . $rootdir;
$secureroothost = "http://www.webhire.com.au";
$js_domain = "webhire.com.au";
//define(ROOT_HOST, $roothost);
//define(ROOT_DIR, $rootdir);
//define(SECURE_ROOT_HOST, $secureroothost);
//define(JS_DOMAIN, $js_domain);
function logout() {
GLOBAL $roothost;
GLOBAL $rootdir;
setcookie("logincookie[0]","","","");
setcookie("logincookie[1]","","","");
setcookie("logincookie[2]","","","");
setcookie("logincookie[3]","","","");
setcookie("sessioncookie[0]","","","");
setcookie("sessioncookie[1]","","","");
setcookie("sessioncookie[2]","","","");
setcookie("sessioncookie[3]","","","");
header("Location: " . $roothost.$rootdir . "/index.php");
}
function getheaderdefault() {
header ("Expires: Mon, 1 Jan 1970 00:00:00 GMT");
header ("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
header ("Cache-Control: no-cache, must-revalidate");
header ("Pragma: no-cache");
}
function show_error($file, $line, $message) {
print("An error occured in $file on line $line: $message. Check your code!");
}
function createcookie($HTTP_USER_AGENT) {
GLOBAL $roothost;
GLOBAL $rootdir;
mysql_connect( "localhost", "rg", "g8J2ke.,") or die("unable to connect to SQL server");
mysql_select_db("dbUsers") or die("unable to select database");
$qsess = "SELECT MAX(id) FROM tblSessions";
$rsess = mysql_query($qsess);
if (!$rsess) {
show_error(__FILE__, __LINE__, "Error in query: $qsess");
}
list($idmax) = mysql_fetch_row($rsess);
$id = $idmax+1;
srand((double)microtime()*10000000);
$token = rand();
$session = md5(uniqid ($token));
$mkdate = mktime(date("H"),date("i"),date("s"),date("m") ,date("d"),date("Y"));
$date = date("H:i:s d F Y",$mkdate);
$browser = strstr($HTTP_USER_AGENT, 'MSIE');
$bt = strtoupper(substr($browser,2 ,3));
$cbt = chop($bt);
if ($cbt == 'IE') {
$expire = "7200";
} else {
$expire = (time()+7200);
}
if (isset($REMOTE_HOST)) {
$host = gethostbyname($_SERVER["REMOTE_HOST"]);
} else {
$host = gethostbyaddr($_SERVER["REMOTE_ADDR"]);
}
setcookie("sessioncookie[0]",$session,$expire,$rootdir);
setcookie("sessioncookie[1]",$date,$expire,$rootdir);
setcookie("sessioncookie[2]",$host,$expire,$rootdir);
setcookie("sessioncookie[3]",$id,$expire,$rootdir);
$query = "INSERT into tblSessions(id,date,session,host) VALUES ('$id','$date','$session','$host')";
$result = mysql_query($query);
if (!$result) {
show_error(__FILE__, __LINE__, "Error in query: $query");
}
mysql_close();
header("Location: " . $roothost.$rootdir . "?session=$session");
}
?>
webhire.com.au
|
|
|
Welcome
to webhire.com.au!
This web site contains :
- All
late breaking news concerning WinHire - the ultimate rental system
- Online
demo version of WinHire. Register for a free online demo with the WinHire
development team !!!
- Marketing
material on WinHire and contact references
- On
line hiring carts from all types of hiring companies
- An
on-line demonstration hiring cart for evaluation of the
advanced features of our e-commerce solutions
- A
search facility on hiring companies by name, hiring industry,
suburb or postcode
|
|
|
| |
©2005
WebHire Pty Ltd | web design by webstra
|
|