\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"; ?>
|
0) { ?>
0) { ?> |