2009-06-30 09:22:30 +00:00
|
|
|
<?php
|
2009-06-30 10:40:03 +00:00
|
|
|
// $Header: /cvsroot/phpldapadmin/phpldapadmin/htdocs/purge_cache.php,v 1.8 2005/12/17 00:00:11 wurley Exp $
|
2009-06-30 09:29:51 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @package phpLDAPadmin
|
|
|
|
*/
|
|
|
|
/**
|
|
|
|
*/
|
2009-06-30 09:22:30 +00:00
|
|
|
|
|
|
|
require './common.php';
|
|
|
|
include './header.php';
|
|
|
|
|
2009-06-30 10:26:08 +00:00
|
|
|
$purge_session_keys = array('cache');
|
2009-06-30 09:22:30 +00:00
|
|
|
|
2009-06-30 10:26:08 +00:00
|
|
|
echo '<body>';
|
|
|
|
echo '<h3 class="title">Purging Caches</h3><br /><br /><br />';
|
2009-06-30 09:22:30 +00:00
|
|
|
|
|
|
|
$size = 0;
|
2009-06-30 09:29:51 +00:00
|
|
|
foreach ($purge_session_keys as $key) {
|
2009-06-30 10:26:08 +00:00
|
|
|
if (isset($_SESSION[$key])) {
|
|
|
|
$size += strlen(serialize($_SESSION[$key]));
|
|
|
|
unset($_SESSION[$key]);
|
|
|
|
}
|
2009-06-30 09:22:30 +00:00
|
|
|
}
|
2009-06-30 10:26:08 +00:00
|
|
|
pla_session_close();
|
2009-06-30 09:22:30 +00:00
|
|
|
|
2009-06-30 10:26:08 +00:00
|
|
|
echo '<center>';
|
2009-06-30 09:29:51 +00:00
|
|
|
if (! $size)
|
2009-06-30 10:26:08 +00:00
|
|
|
echo _('No cache to purge.');
|
2009-06-30 09:22:30 +00:00
|
|
|
else
|
2009-06-30 10:26:08 +00:00
|
|
|
printf(_('Purged %s bytes of cache.'),number_format($size));
|
|
|
|
|
|
|
|
echo '</center>';
|
2009-06-30 09:22:30 +00:00
|
|
|
|
2009-06-30 10:26:08 +00:00
|
|
|
echo '<!-- refresh the tree view (with the new DN renamed)and redirect to the edit_dn page -->';
|
|
|
|
echo '<script type="text/javascript" language="javascript">parent.left_frame.location.reload();</script>';
|
|
|
|
echo '</body></html>';
|
|
|
|
?>
|