0 && $_REQUEST['type'] == 'deleted') { $TitleText .= " (" . getLanguageText('TEXT-DELETED') . ")"; } // Start the template and output buffering startTemplate(); $templatePageTitle = $TitleText; // Ensure that only valid user types have access to this module if (!in_array($_SESSION['UserInfo']['type'],array('SuperUser'))) { echo("
\n"); $error_message = getLanguageText('ERRORMSG-ACCESS-DENIED'); include "form.messages.php"; return; } ?>
0) { if (array_key_exists('start_date',$_POST) && strlen($_POST['start_date']) > 0) $start_date = date("Y-m-d 00:00:00",strtotime($_POST['start_date'])); if (array_key_exists('end_date',$_POST) && strlen($_POST['end_date']) > 0) { $end_date = $_POST['end_date']; if ($end_date < substr($start_date,0,10)) { $end_date = substr($start_date,0,10); $error_message = getLanguageText('ERRORMSG-INVALID-DATE-RANGE'); } $end_date = date("Y-m-d 23:59:59",strtotime($end_date)); } $sdate = substr($start_date,0,10); $edate = substr($end_date,0,10); $twhere = "AND posting_time BETWEEN '$start_date' AND '$end_date' "; // Build argument string for GET $args = "&start_date=" . urlencode($start_date); $args .= "&end_date=" . urlencode($end_date); $args .= "&selected_user=$selected_user"; $args .= "&error_message=" . urlencode($error_message); header("Location: /?action=$action$args"); exit(); } if (array_key_exists('action',$_GET) && array_key_exists('start_date', $_GET)) { $start_date = $_GET['start_date']; $end_date = $_GET['end_date']; $selected_user = $_GET['selected_user']; $sdate = substr($start_date,0,10); $edate = substr($end_date,0,10); $twhere = "AND posting_time BETWEEN '$start_date' AND '$end_date' "; } $message_width = 600; include "form.messages.php"; ?>
:
:
0) { ?>

-

0) $mc_gross = "$" . number_format($mc_gross,2); if ($mc_fee > 0) $mc_fee = "$" . number_format($mc_fee,2); // Add info tips if ($payment_status == 'Pending') { $span_id = "status_$record_num"; $otipSpans .= "
\n"; $otipSpanIDs[] = $span_id; $payment_status = "Pending"; } // Unknown posting results if ($posting_result == '') { $results = db_query("SELECT * FROM user_account WHERE school_num = $school_num AND payment_reference = '$txn_id'"); if (db_num_rows($results) > 0) { $posting_result = 'Posted'; } else { $posting_result = 'Error'; } } // Error postings if ($posting_result == 'Error') { $span_id = "result_$record_num"; if (strlen($posting_message) == 0) $posting_message = "Unknown Posting Error"; $otipSpans .= "\n"; $otipSpanIDs[] = $span_id; $posting_result = "Error"; } // Successful postings if ($posting_result == 'Posted') { $span_id = "result_$record_num"; $results = db_query("SELECT * FROM user_account WHERE school_num = $school_num AND payment_reference = '$txn_id'"); if (db_num_rows($results) > 0) { $otipSpanIDs[] = $span_id; $otipSpans .= "\n"; $posting_result = "Posted"; } else { if ($row['payment_status'] != 'Pending') { $otipSpanIDs[] = $span_id; $otipSpans .= "\n"; $posting_result = "" . "Warning"; } else { $posting_result = "Pending"; } } } // Format name $name = "$first_name $last_name"; if (is_numeric($user_num) && $user_num > 0) { $results = db_query("SELECT * FROM users WHERE record_num = $user_num"); $row = db_fetch_array($results); $span_id = "user_$user_num"; if (!in_array($span_id,$otipSpanIDs)) { $user_balance = db_getVal("select sum(transaction_amount) as balance from user_account where school_num = $school_num and user_num = $user_num AND (deleted != 'Y' OR deleted IS NULL)"); $user_balance = floatval($user_balance); $otipSpans .= "\n"; $otipSpanIDs[] = $span_id; } $name = "$name"; $payer_email = "$payer_email"; } ?>