0) $start_date = date("Y-m-d 00:00:00",strtotime($_REQUEST['start_date']));
if (array_key_exists('end_date',$_REQUEST) && strlen($_REQUEST['end_date']) > 0) {
$end_date = $_REQUEST['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 = "";
$twhere .= "AND transaction_datetime BETWEEN '$start_date' AND '$end_date' ";
$print_cmd .= "&start_date=$sdate&end_date=$edate";
// View only a selected userid
$uwhere = "";
unset($selected_usernum);
if (array_key_exists('selected_usernum',$_REQUEST) && strlen($_REQUEST['selected_usernum']) > 0) {
$selected_usernum = intval($_REQUEST['selected_usernum']);
$userid = db_getVal("SELECT userid FROM users WHERE record_num = $selected_usernum");
$uwhere = "AND ua.user_num = $selected_usernum ";
$print_cmd .= "&selected_usernum=$selected_usernum";
}
// View only selected payment methods
unset($selected_payment_method);
if (array_key_exists('selected_payment_method',$_REQUEST) && strlen($_REQUEST['selected_payment_method']) > 0) {
if (isset($selected_transaction_type) && $selected_transaction_type != 'Payment') unset($selected_payment_method);
else {
$selected_payment_method = db_escape_string($_REQUEST['selected_payment_method']);
$uwhere .= "AND ua.payment_method = '$selected_payment_method' ";
$print_cmd .= "&selected_payment_method=$selected_payment_method";
}
}
// View only selected schedule
$swhere = "";
$selected_schedule_num = 0;
if (array_key_exists('selected_schedule_num',$_REQUEST) && strlen($_REQUEST['selected_schedule_num']) > 0) {
$selected_schedule_num = intval($_REQUEST['selected_schedule_num']);
$uwhere .= "AND ud.posted_schedule = '$selected_schedule_num' ";
$print_cmd .= "&selected_schedule_num=$selected_schedule_num";
}
// Set query sort order
$order_by = "ORDER BY transaction_datetime,ua.record_num,ud.record_num";
$sort = "Date";
if (array_key_exists('sort',$_REQUEST) && strlen($_REQUEST['sort'])) {
$sort = $_REQUEST['sort'];
if ($sort == 'Name') $order_by = "ORDER BY last_name,first_name,transaction_datetime,ua.record_num,ud.record_num";
}
$message_width = 600;
include "form.messages.php";
?>
\n");
echo(" | $userid | \n");
echo(" $trx_date | \n");
echo(" $transaction_type | \n");
echo(" $amt | \n");
echo(" $method | \n");
echo(" -$currencySymbol$pAmt | \n");
echo(" $trx_type | \n");
}
else {
echo(" \n");
echo(" | \n");
echo(" | \n");
echo(" | \n");
echo(" | \n");
echo(" $method | \n");
echo(" -$currencySymbol$pAmt | \n");
echo(" $trx_type | \n");
}
echo("
\n");
}
?>
$value) {
$method = $key;
$pAmt = number_format(abs($value),2);
$class = 'data-even';
if ($count % 2) $class = 'data-odd';
$count++;
echo(" \n");
echo(" | $method | \n");
echo(" -$currencySymbol$pAmt | \n");
echo("
\n");
}
?>