JB_do_upgrade(true); JB_cache_flush(); } if (JB_do_upgrade(false)) { echo "<p><input style='font-size: 24px;' type='button' value='Upgrade Database' onclick=\"window.location='" . htmlentities($_SERVER['PHP_SELF']) . "?do_upgrade=Y'\" ></p>"; } } JBPLUG_do_callback('admin_main', $A = false); if ($_REQUEST['clear_cache']) { if (!function_exists('jb_search_category_tree_for_posts')) { require_once jb_basedirpath() . 'include/posts.inc.php'; } JB_init_category_tables(0); JB_update_post_count(); // update the total, eg. number of approved posts, number of expired posts, premium approved, expired & waiting JB_build_post_count(); JB_cache_flush(); $JBMarkup->ok_msg('Cache refreshed.'); } echo "<p> </p><div>"; JB_theme_check_compatibility(); if (JB_DEMO_MODE != 'YES') { if (JB_CRON_EMULATION_ENABLED == 'YES') { echo '<p><font color="maroon">- Attention: Cron Emulation - The system has detected that you have Cron Emulation enabled. Cron Emulation is intended for testing purposes and not recommended for live sites. Please go to <A href="edit_config.php#cron">Admin->Main Config</a> and see the Cron options</p></font>'; } if (is_writable(jb_get_config_dir() . 'config.php')) { //echo "- config.php is writeable.<br>"; } else { echo "<p><font color='maroon'>- config.php is not writable. Give write permissions to config.php if you want to save any changes</p></font>"; } if (is_writable("../rss.xml")) {
function update_counters() { // rebuild categories count... JB_build_post_count(); JB_update_post_count(); // update the total, eg. number of approved posts, number of expired posts, premium approved, expired & waiting // clear categories cache JB_cache_del_keys_for_all_cats(1); }