set('cachestatus', 1)
->save(false);
}
if(!is_writable(e_CACHE_CONTENT))
{
e107::getRender()->tablerender(CACLAN_3, CACLAN_10."
(".$CACHE_DIRECTORY.")");
require_once("footer.php");
exit;
}
if (isset($_POST['submit_cache']))
{
e107::getConfig()->set('cachestatus', intval($_POST['cachestatus']))
->set('syscachestatus', intval($_POST['syscachestatus']))
->save(false);
}
if (isset($_POST['trigger_empty_cache']))
{
e107::getAdminLog()->logSuccess(CACLAN_6);
switch ($_POST['option_clear_cache'])
{
case 'empty_contentcache':
$ec->clear();
e107::getAdminLog()->flushMessages(CACLAN_5);
break;
case 'empty_syscache':
$ec->clear_sys();
e107::getAdminLog()->flushMessages(CACLAN_16);
break;
case 'empty_dbcache':
admin_page_cache_erase(e_CACHE_DB, '*.php');
e107::getAdminLog()->flushMessages(CACLAN_24);
break;
case 'empty_imgcache':
admin_page_cache_erase(e_CACHE_IMAGE, '*.cache\.bin');
e107::getAdminLog()->flushMessages(CACLAN_25);
break;
// used in standard page output and internal JS includes
case 'empty_browsercache':
e107::getConfig()->set('e_jslib_browser_cache', time())->save(false);
e107::getAdminLog()->flushMessages(CACLAN_25);
break;
// all
default:
$ec->clear();
$ec->clear_sys();
admin_page_cache_erase(e_CACHE_DB, '*.php');
admin_page_cache_erase(e_CACHE_IMAGE, '*.cache\.bin');
e107::getConfig()->set('e_jslib_browser_cache', time())->save(false);
e107::getAdminLog()->flushMessages(CACLAN_26);
break;
}
}
$syscache_files = glob(e_CACHE_CONTENT.'S_*.*');
$cache_files = glob(e_CACHE_CONTENT.'C_*.*');
$imgcache_files = glob(e_CACHE_IMAGE.'*.cache.bin');
$dbcache_files = glob(e_CACHE_DB.'*.php');
$syscache_files_num = count($syscache_files);
$cache_files_num = count($cache_files);
$imgcache_files_num = count($imgcache_files);
$dbcache_files_num = count($dbcache_files);
$syscache_label = CACLAN_17.' '.$syscache_files_num.' '.($syscache_files_num != 1 ? CACLAN_19 : CACLAN_18).'';
$contentcache_label = CACLAN_17.' '.$cache_files_num.' '.($cache_files_num != 1 ? CACLAN_19 : CACLAN_18).'';
$imgcache_label = CACLAN_17.' '.$imgcache_files_num.' '.($imgcache_files_num != 1 ? CACLAN_19 : CACLAN_18).'';
$dbcache_label = CACLAN_17.' '.$dbcache_files_num.' '.($dbcache_files_num != 1 ? CACLAN_19 : CACLAN_18).'';
$text = "