"cron_admin"); function cron_save($edit) { foreach ($edit as $key=>$value) { db_query("UPDATE crons SET scheduled = '$value' WHERE module = '$key'"); } } function cron_display() { $intervals = array(300, 900, 1800, 3600, 7200, 10800, 21600, 43200, 86400, 172800, 259200, 604800, 1209600, 2419200); // Perform query: $result = db_query("SELECT * FROM crons"); // Generate output: $output .= "
\n"; $output .= "\n"; $output .= " \n"; while ($cron = db_fetch_object($result)) { foreach ($intervals as $value) $period .= "\n"; $output .= " \n"; unset($period); } $output .= "
moduleperiodlast executionoperations
". check_output($cron->module) ."". format_interval(time() - $cron->timestamp) ." agoexecute
\n"; $output .= "\n"; $output .= "
\n"; print $output; } function cron_admin() { global $op, $edit, $name; switch($op) { case "Save crons": cron_save($edit); break; } cron_display(); } ?>