Forum Moderators: coopster
<?php
$login_real_path = "./";
include($login_real_path . "common.php");$db->sql = "SELECT * FROM ".$prefix."_config";
$result = $db->query($db->sql);
while($row = $db->fetch($result)) {
$domain = $row['site_url'];
$script_path = $row['script_path'];
}
if($HTTP_GET_VARS['logmeout'] == 'yes') {
setcookie("loged","no",time()-3700, $script_path, $domain);
setcookie("username","",time()-3700, $script_path, $domain);
setcookie("user_level","",time()-3700, $script_path, $domain);
$session = uniqid('logout_');
if(!session_is_registered('user_level')) {
header("Location: index.php");
}
} else {
include($login_real_path . 'includes/page_header.php');
$display = "<center><font class=\"text\">Are you sure you want to logout?</font></center><br><center><a href=\"logout.php?logmeout=yes\">Yes</a> ¦ <a href=\"javascript:history.back()\">No</a></center>";
$template->getFile(array(
'logout_body' => 'logout_body.tpl')
);
$template->addVar("logout_body", array(
'DISPLAY' => $display)
);
$template->parse("logout_body");
include($login_real_path . 'includes/page_footer.php');
}
?>
[edited by: jatar_k at 5:17 pm (utc) on Mar. 29, 2005]
[edit reason] removed links [/edit]