reworked etemplate to have static methods and use the new features of egw_db- & html-class

This commit is contained in:
Ralf Becker 2008-03-09 14:37:57 +00:00
parent 0da675bf6e
commit b16e63fd6f

View File

@ -54,4 +54,59 @@
$GLOBALS['egw']->session->egw_setcookie('kp3'); $GLOBALS['egw']->session->egw_setcookie('kp3');
$GLOBALS['egw']->session->egw_setcookie('domain'); $GLOBALS['egw']->session->egw_setcookie('domain');
$GLOBALS['egw']->redirect($redirectTarget); // $GLOBALS['egw']->redirect($redirectTarget);
?>
<head>
<script language="javascript">
function clearAuthenticationCache(page)
{
// Default to a non-existing page (give error 500).
// An empty page is better, here.
if (!page) page = '.force_logout';
try
{
var agt=navigator.userAgent.toLowerCase();
if (agt.indexOf("msie") != -1)
{
// IE clear HTTP Authentication
document.execCommand("ClearAuthenticationCache");
}
else
{
var xmlhttp;
if (window.XMLHttpRequest)
{
xmlhttp = new XMLHttpRequest();
}
else if (window.ActiveXObject)
{
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
}
else
{
return;
}
// Let's prepare invalid credentials
xmlhttp.open("GET", page, true, "logout", "logout");
// Let's send the request to the server
xmlhttp.send("");
// Let's abort the request
xmlhttp.abort();
}
}
catch(e)
{
alert("An exception occurred in the script. Error name: " + e.name + ". Error message: " + e.message);
// There was an error
return;
}
}
</script>
<meta http-equiv="refresh" content="1;url=<?php echo $redirectTarget ?>">
</head>
<body onload="clearAuthenticationCache()">
<a href="<?php echo $redirectTarget ?>">Logout in progress...</a>
</body>