function main() { global $log; //this script can take a long time to run //we don't want it ending early set_time_limit(0); $timer = new timer(); $log->writeLine("============================================"); $log->writeLine("Begin upload processing."); $timer->start(); //process all files in the upload directory do_process(); $timer->stop(); $log->writeLine("--------------------------------------------"); $log->writeLine("End upload processing. Took " . $timer->taken() . " seconds."); $log->writeLine("============================================"); $log->saveLog("blah.txt"); }
$movetrail = ""; setcookie("ltrLoginAs", "", time() + 2592000); $HTTP_COOKIE_VARS['ltrLoginAs'] = ""; page_close(); Header("Location: " . $PATH_INFO); exit; } if ($dologin == "1") { Header("Location: " . $sess->url("/?dologin=1")); exit; } include "dbapi/comutils.inc"; if ($REQUEST_METHOD == "GET") { display_form($HTTP_GET_VARS); } else { do_process(); } function do_process() { global $HTTP_POST_VARS; $cond_array = array(); for ($x = 0; $x < count($HTTP_POST_VARS['term']); $x++) { $cond_array[] = array("text" => $HTTP_POST_VARS['term'][$x], "loc" => $HTTP_POST_VARS['location'][$x], "conn" => ($x > 0 and isset($HTTP_POST_VARS['connection'][$x - 1])) ? $HTTP_POST_VARS['connection'][$x - 1] : ""); } if (isset($HTTP_POST_VARS['find'])) { search($cond_array); exit; } if ($HTTP_POST_VARS['buildaction'] == "add_condition") { $cond_array[] = array("text" => "", "loc" => "", "conn" => "a"); }