diff --git a/admin/fundraising.php b/admin/fundraising.php index d2f3d42..707a02e 100644 --- a/admin/fundraising.php +++ b/admin/fundraising.php @@ -25,46 +25,9 @@ require_once("../user.inc.php"); user_auth_required('committee', 'admin'); - - send_header("Fundraising", - array('Committee Main' => 'committee_main.php', - 'Administration' => 'admin/index.php', - 'Fundraising' => 'admin/fundraising.php'), - "fundraising" - ); - -function getUserForSponsor($sponsor_id) { - // loop through each contact and draw a form with their data in it. - $q = mysql_query("SELECT *,MAX(year) FROM users LEFT JOIN users_sponsor ON users_sponsor.users_id=users.id - WHERE - sponsors_id='" . $sponsor_id . "' - AND types LIKE '%sponsor%' - GROUP BY uid - HAVING deleted='no' - ORDER BY users_sponsor.primary DESC,lastname,firstname - LIMIT 1 - "); - $r=mysql_fetch_object($q); - return user_load_by_uid($r->uid); -} +if($_GET['action']=="refresh") { ?> -


+

".i18n("Date Received")."\n"; echo "".i18n("Amount")."\n"; echo "".i18n("Generate Thank You")."\n"; + echo "".i18n("Thanked")."\n"; echo "\n"; while($r=mysql_fetch_object($q)) { @@ -188,6 +153,7 @@ if(mysql_num_rows($q)) { } else { echo i18n("No contact"); } + echo "id\" onclick=\"return thanked($r->id)\">\n"; echo "\n"; } echo "\n"; @@ -196,6 +162,7 @@ if(mysql_num_rows($q)) { echo "
\n"; } ?> +

@@ -284,5 +251,49 @@ if(mysql_num_rows($q)) { echo i18n("No proposals upcoming"); } + exit; +} +else if (count($_POST['thanked'])) { + foreach($_POST['thanked'] AS $t) { + mysql_query("UPDATE fundraising_donations SET thanked='yes' WHERE id='$t'"); + } +} + +send_header("Fundraising", + array('Committee Main' => 'committee_main.php', + 'Administration' => 'admin/index.php', + 'Fundraising' => 'admin/fundraising.php'), + "fundraising" + ); +?> + + +
+ +