set('cachestatus', 1) ->save(false); } if(!is_writable(e_CACHE_CONTENT)) { $mes->addError(CACLAN_10." (".e_CACHE.")"); e107::getRender()->tablerender(CACLAN_3, $mes->render()); require_once("footer.php"); exit; } if (isset($_POST['submit_cache'])) { e107::getConfig()->set('cachestatus', intval($_POST['cachestatus'])) ->set('syscachestatus', intval($_POST['syscachestatus'])) ->set('jscsscachestatus', intval($_POST['jscsscachestatus'])) ->save(false); } if (isset($_POST['trigger_empty_cache'])) { e107::getLog()->addSuccess(CACLAN_6); $triggerName = $_POST['option_clear_cache']; switch ($_POST['option_clear_cache']) { case 'empty_contentcache': e107::getCache()->clearAll('content'); e107::getLog()->flushMessages(CACLAN_5); break; case 'empty_syscache': e107::getCache()->clearAll('system'); e107::getLog()->flushMessages(CACLAN_16); e107::getSession()->clear('addons-update-status'); break; case 'empty_dbcache': e107::getCache()->clearAll('db'); e107::getLog()->flushMessages(CACLAN_24); break; case 'empty_imgcache': e107::getCache()->clearAll('image'); e107::getLog()->flushMessages(CACLAN_25); break; // used in standard page output and internal JS includes case 'empty_browsercache': e107::getCache()->clearAll('browser'); e107::getLog()->flushMessages(CACLAN_25); break; case 'empty_jscss': e107::getCache()->clearAll('js'); e107::getCache()->clearAll('css'); // e107::getAdminLog()->flushMessages(CACLAN_5); break; // all default: e107::getCache()->clearAll('content'); e107::getCache()->clearAll('system'); e107::getCache()->clearAll('db'); e107::getCache()->clearAll('image'); e107::getCache()->clearAll('browser'); e107::getCache()->clearAll('js'); e107::getCache()->clearAll('css'); e107::getSession()->clear('addons-update-status'); e107::getLog()->flushMessages(CACLAN_26); $triggerName = 'default'; break; } e107::getEvent()->trigger('admin_after_clear_cache', $triggerName); } $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'); $jscsscache_files = glob(e_WEB.'cache/*.{css,js}',GLOB_BRACE); $syscache_files_num = count($syscache_files); $cache_files_num = count($cache_files); $imgcache_files_num = count($imgcache_files); $dbcache_files_num = count($dbcache_files); $jscsscache_files_num = count($jscsscache_files); $syscache_label = $syscache_files_num.' '.($syscache_files_num != 1 ? CACLAN_19 : CACLAN_18); $contentcache_label = $cache_files_num.' '.($cache_files_num != 1 ? CACLAN_19 : CACLAN_18); $imgcache_label = $imgcache_files_num.' '.($imgcache_files_num != 1 ? CACLAN_19 : CACLAN_18); $dbcache_label = $dbcache_files_num.' '.($dbcache_files_num != 1 ? CACLAN_19 : CACLAN_18); $jscsscache_label = $jscsscache_files_num.' '.($jscsscache_files_num != 1 ? CACLAN_19 : CACLAN_18); $text = "
"; e107::getRender()->tablerender(CACLAN_3, $mes->render().$text); require_once("footer.php"); ?>