function switch_tabs() { if (trim($_GET["tab"] == null)) { die; } switch ($_GET["tab"]) { case "frontend": main_admin(); break; case "add-tab": main_add_tab(); exit; break; default: perso_page($_GET["tab"]); } }
function scan_temp_queue() { $workingDir = "/home/artica/squid/META_UPLOADED_QUEUE"; if (!is_dir($workingDir)) { return; } $unix = new unix(); if (!($handle = opendir($workingDir))) { meta_events("{$workingDir} failed to parse"); return; } while (false !== ($file = readdir($handle))) { if ($file == ".") { continue; } if ($file == "..") { continue; } if (!preg_match("#^(.+?)-([A-Z_]+)\\.gz#", $file, $re)) { meta_events("{$file} not correcly named..."); continue; } $FILEBASE = $re[2]; $uuid = $re[1]; meta_events("Checking {$uuid} ({$FILEBASE})"); switch ($FILEBASE) { case "ARTICA_DAEMONS": articadaemons_client($uuid); break; case "TABLE_NICS": uuid_TABLE_NICS($uuid); break; case "META_CLIENT_EVENTS": uuid_META_CLIENT_EVENTS($uuid); break; case "SQUID_PERFS": articasquid_perf_client($uuid); break; case "add-tab": main_add_tab(); exit; break; default: break; } } }