\n"); $error_message = getLanguageText('ERRORMSG-ACCESS-DENIED'); include "form.messages.php"; return; } // Determine if there are any schedules $num_schedules = db_getVal("SELECT count(*) FROM hotlunch_schedules WHERE school_num = $school_num"); // Determine if there are any suppliers $num_suppliers = db_getVal("SELECT count(*) FROM suppliers WHERE school_num = $school_num"); $cutoff = date("Y-m-d",time() - 60 * 60 * 24 * 5); $numSaved = db_getVal("SELECT count(*) FROM user_balance_save WHERE school_num = $school_num"); if ($numSaved > 0) $saved_date = db_getVal("SELECT max(saved_date) FROM user_balance_save WHERE school_num = $school_num"); if (isset($saved_date)) { $numParents = db_getVal("SELECT count(*) FROM users WHERE school_num = $base_school_num AND type = 'Parent' AND date_added < '$saved_date'"); } else { $numParents = db_getVal("SELECT count(*) FROM users WHERE school_num = $base_school_num AND type = 'Parent' AND date_added < '$cutoff'"); } if (!isset($form_message)) $form_message = array(); if (!is_array($form_message)) $form_message = array($form_message); if (intval($numParents) > 0 && (isset($saved_date) && $saved_date >= $cutoff)) $form_message[] = getLanguageText('TEXT-CURRENT-USER-BALANCES-HAVE-BEEN-SAVED'); include "form.messages.php"; ?>
'$now' OR schedule_end_date > '$today') " . "AND start_order_datetime < '$cutoff'"; $active = db_getVal($query); if ($active > 0) { $error_message = getLanguageText('ERRORMSG-RESET-NOT-POSSIBLE-ACTIVE-SCHEDULE'); echo("
"); echo("

$error_message

"); echo("
"); } else { $dt = date("md",time()); if (($dt <= '0501' || $dt >= '1101') && $_SESSION['UserInfo']['type'] != 'SuperUser') { $error_message = getLanguageText('TEXT-SYSTEM-RESET-AVAILABILITY'); echo("
"); echo("

$error_message

"); echo("
"); } else { ?>

'>

0) { ?>

\n"; } ?>

'>




'>

0) { ?>

'>



'>


'>


'>