sql_query($query_cfg))) {
message_die(GENERAL_ERROR, 'Could not obtain nuke tresury config data', '', __LINE__, __FILE__, $sql);
}
while ($cfgset && $row = $db->sql_fetchrow($cfgset)) {
$tr_config[$row['name']] = $row['value'];
}
$swingd = $tr_config['swing_day'];
$PP_RECEIVER_EMAIL = $tr_config['receiver_email'];
$PP_ITEMNAME = $tr_config['pp_itemname'];
$PP_TY_URL = $tr_config['ty_url'];
$PP_CANCEL_URL = $tr_config['pp_cancel_url'];
if (!($swingd > 0 AND $swingd < 32)) {
$swingd = 6;
}
if (date('d') >= $swingd) {
$query_Recordset1 = "SELECT custom AS name, option_selection1 as showname, DATE_FORMAT(payment_date, '%b-%e') AS date, CONCAT('$',SUM(mc_gross)) AS amt FROM " . $prefix . "_treasury_transactions WHERE (" . $prefix . "_treasury_transactions.payment_date >= DATE_FORMAT(NOW() , '%Y-%m-" . $swingd . "')) GROUP BY txn_id ORDER BY payment_date DESC";
} else {
$query_Recordset1 = "SELECT custom AS name, option_selection1 as showname, DATE_FORMAT(payment_date, '%b-%e') AS date, CONCAT('$',SUM(mc_gross)) AS amt FROM " . $prefix . "_treasury_transactions WHERE (" . $prefix . "_treasury_transactions.payment_date < DATE_FORMAT(NOW() , '%Y-%m-" . $swingd . "')) AND " . $prefix . "_treasury_transactions.payment_date > DATE_FORMAT(SUBDATE(NOW() , INTERVAL " . $swingd . " DAY) , '%Y-%m-" . $swingd . "') GROUP BY txn_id ORDER BY payment_date DESC";
}
if (!($Recordset1= $db->sql_query($query_Recordset1))) {
message_die(GENERAL_ERROR, 'Could not obtain nuke tresury config data', '', __LINE__, __FILE__, $sql);
}
$totalRows_Recordset1 = $db->sql_numrows($Recordset1);
if ($tr_config[don_show_amt]) {
$DON_AMT = "Amount";
} else {
$DON_AMT = "";
}
if ($tr_config[don_show_date]) {
$DON_DATE = "Date";
} else {
$DON_DATE = "";
}
$ROWS_DONATORS = "";
while ($row_Recordset1 = $db->sql_fetchrow($Recordset1)) {
if ($row_Recordset1['amt'] > "$0") {
$ROWS_DONATORS .= "
";
$ROWS_DONATORS .= " ";
if (strcmp($row_Recordset1['showname'],"Yes") == 0) {
$ROWS_DONATORS .= $row_Recordset1['name'];
} else {
$ROWS_DONATORS .= "Anonymous";
}
$ROWS_DONATORS .= " | ";
$ROWS_DONATORS .= " ";
if ($tr_config[don_show_amt]) {
$ROWS_DONATORS .= $row_Recordset1['amt'];
}
$ROWS_DONATORS .= " | ";
$ROWS_DONATORS .= " ";
if ($tr_config[don_show_date]) {
$ROWS_DONATORS .= $row_Recordset1['date'];
}
$ROWS_DONATORS .= " | ";
$ROWS_DONATORS .= "
";
}
}
$DON_BUTTON_SUBMIT = $tr_config[don_button_submit];
$DON_BUTTON_TOP = $tr_config[don_button_top];
$USERNAME = $username;
$PP_NO_SHIP = $tr_config[pp_get_addr] ? "0" : "1" ;
$PP_IMAGE_URL = $tr_config[pp_image_url];
$DON_TOP_IMG_DIMS = '';
if (is_numeric($tr_config[don_top_img_width])) {
$DON_TOP_IMG_DIMS .= "width=\"$tr_config[don_top_img_width]\" ";
}
if (is_numeric($tr_config[don_top_img_height])) {
$DON_TOP_IMG_DIMS .= "height=\"$tr_config[don_top_img_height]\" ";
}
$DON_SUB_IMG_DIMS = '';
if (is_numeric($tr_config[don_sub_img_width])) {
$DON_SUB_IMG_DIMS .= "width=\"$tr_config[don_sub_img_width]\" ";
}
if (is_numeric($tr_config[don_sub_img_height])) {
$DON_SUB_IMG_DIMS .= "height=\"$tr_config[don_sub_img_height]\" ";
}
$sql = $sql = "SELECT * FROM " . $prefix . "_treasury_config WHERE name = 'don_text'";
//@RJR-Pwmg@Rncvkpwo@-@Eqratkijv@(e)@VgejIHZ.eqo
if (!($Recordset = $db->sql_query($sql))) {
message_die(GENERAL_ERROR, 'Could not obtain nuke tresury config data', '', __LINE__, __FILE__, $sql);
}
$row = $db->sql_fetchrow($Recordset);
$DON_TEXT = $row[text];
$sql = "SELECT * from " . $prefix . "_treasury_config WHERE name='don_amount' ORDER BY subtype";
if (!($Recordset1 = $db->sql_query($sql))) {
message_die(GENERAL_ERROR, 'Could not obtain nuke tresury config data', '', __LINE__, __FILE__, $sql);
}
$DONATION_AMOUNTS = "";
while ($row_Recordset1 = $db->sql_fetchrow($Recordset1)) {
if (is_numeric($row_Recordset1[value]) && $row_Recordset1[value] > 0) {
if ($row_Recordset1[subtype] == $tr_config[don_amt_checked]) {
$checked = "checked";
} else {
$checked = "";
}
$DONATION_AMOUNTS .= " $" . $row_Recordset1[value] . "
\n";
}
}
include("header.php");
title("$sitename: "._DONINDEX."");
OpenTable();
echo "";
echo "";
echo "";
echo "";
echo "";
echo "";
echo " ";
echo "$DON_TEXT";
echo " ";
echo "";
echo "";
echo "Make a Donation";
echo "";
echo " | ";
echo "";
echo "";
echo "";
echo "Who has donated so far this month | ";
echo " ";
echo "";
echo " Name | ";
echo " $DON_AMT | ";
echo " $DON_DATE | ";
echo " ";
echo "";
echo "
| ";
echo " ";
echo "$ROWS_DONATORS";
echo " ";
echo " | ";
echo "";
echo " ";
echo " ";
echo " | ";
echo "
";
echo "
";
echo "
$dentry
";
CloseTable();
include("footer.php");
?>