header("Expires: 0"); header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); header("Cache-Control: no-cache, must-revalidate"); $user=new usersMenus(); if(!$user->AsSquidAdministrator){ $tpl=new templates(); echo "alert('".$tpl->javascript_parse_text("{ERROR_NO_PRIVS}").");"; exit; } if(isset($_GET["scripts"])){echo scripts();exit;} if(isset($_GET["tabs"])){tabs();exit;} if(isset($_GET["databases"])){databases_status();exit;} if(isset($_GET["ufdbg-community"])){community_status();exit;} if(isset($_GET["maintenance"])){maintenance_status();exit;} if(isset($_GET["CompileMissingdb"])){CompileMissingdb();exit;} if(isset($_GET["MaintenanceReCompileDB"])){maintenance_status_list_compile();exit;} if(isset($_GET["CompileAlldbs"])){CompileAlldbs();exit;} if(isset($_GET["schedule"])){schedule();exit;} if(isset($_GET["EnableSchedule"])){schedule_save();exit;} if(isset($_GET["maintenance-status-list"])){maintenance_status_list();exit;} if(isset($_GET["config-file"])){config_file();exit;} if(isset($_GET["events"])){events();exit;} popup(); function popup(){ $page=CurrentPageName(); $html="<div id='ufdbguard-tabs'></div> <script>LoadAjax('ufdbguard-tabs','$page?tabs=yes');</script>";echo $html;
if (isset($gvars[$var])) { unset($data[$k]); } else { $gvars[$var] = 1; } } } else { if (!trim($l)) { unset($data[$k]); } } } if ($olc != count($data)) { $fp = fopen($GLOBALS['INCLUDE'] . 'GLOBALS.php', 'w'); fwrite($fp, implode('', $data)); if (strpos(array_pop($data), '?>') === false) { fwrite($fp, "\n?>"); } fclose($fp); } draw_stat('Done: Validate GLOBALS.php'); if ($FUD_OPT_1 & 1 || isset($_GET['enable_forum'])) { draw_stat('Re-enabling the forum.'); maintenance_status($DISABLED_REASON, 0); } else { echo '<font size="+1" color="red">Your forum is currently disabled, to re-enable it go to the <a href="admglobal.php?' . _rsid . '">Global Settings Manager</a> and re-enable it.</font><br>'; } draw_stat('DONE'); echo 'It is recommended that you run SQL table optimizer after completing the consistency check. To do so <a href="consist.php?opt=1&' . _rsid . '">click here</a>, keep in mind that this process make take several minutes to perform.'; echo '<script language="Javascript1.2">clearInterval(intervalID);</script>'; require $WWW_ROOT_DISK . 'adm/admclose.php';
exit; } if (isset($_GET["tabs"])) { tabs(); exit; } if (isset($_GET["databases"])) { databases_status(); exit; } if (isset($_GET["ufdbg-community"])) { community_status(); exit; } if (isset($_GET["maintenance"])) { maintenance_status(); exit; } if (isset($_GET["CompileMissingdb"])) { CompileMissingdb(); exit; } if (isset($_GET["MaintenanceReCompileDB"])) { maintenance_status_list_compile(); exit; } if (isset($_GET["CompileAlldbs"])) { CompileAlldbs(); exit; } if (isset($_GET["schedule"])) {
$tbl =& $DBHOST_TBL_PREFIX; db_lock($tbl . 'search_cache WRITE, ' . $tbl . 'search WRITE, ' . $tbl . 'index WRITE, ' . $tbl . 'title_index WRITE, ' . $tbl . 'msg WRITE'); if (!($sid = q_singleval("SELECT MIN(query_type) FROM " . $tbl . "search_cache WHERE srch_query='' AND query_type<0"))) { q('DELETE FROM ' . $tbl . 'search'); q('DELETE FROM ' . $tbl . 'index'); q('DELETE FROM ' . $tbl . 'title_index'); q('DELETE FROM ' . $tbl . 'search_cache'); } $c = q('SELECT id, subject, length, foff, file_id FROM ' . $tbl . 'msg WHERE ' . ($sid ? ' id>' . $sid . ' AND ' : '') . ' apr=1 ORDER BY subject'); $old_subject = ''; while ($r = db_rowarr($c)) { if ($old_subject != $r[1]) { $subj = $old_subject = $r[1]; } else { $subj = ''; } q('INSERT INTO ' . $tbl . 'search_cache (srch_query, query_type, expiry, msg_id, n_match) VALUES(\'\', -' . $r[0] . ', 0,0,0)'); index_text($subj, read_msg_body($r[3], $r[2], $r[4]), $r[0]); } unset($c); un_register_fps(); q('DELETE FROM ' . $tbl . 'search_cache'); db_unlock(); echo 'Done<br>'; if ($FUD_OPT_1 & 1) { echo '<br>Re-enabling the forum.<br>'; maintenance_status($GLOBALS['DISABLED_REASON'], 0); } else { echo '<br><font size=+1 color="red">Your forum is currently disabled, to re-enable it go to the <a href="admglobal.php?' . _rsidl . '">Global Settings Manager</a> and re-enable it.</font>'; } require $WWW_ROOT_DISK . 'adm/admclose.php';