"); if (!$log_dir) { exit("Error: couldn't get log_dir from config file."); } if (!$f || !preg_match("/^ *([a-z_*]+[.]out *)+$/", $f)) { $f = '*.out'; } if ($s) { page_head("Grep logs for \"$s\""); } else { page_head("Show logs"); } echo "
"; passthru("cd $log_dir && ./grep_logs -html '$s' $f 2>&1"); page_tail(); } ?>