Copyright (C) 2008 James Grant This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; see the file COPYING. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ ?> $id)); } if($id) { $exec="UPDATE sponsors SET ". "organization='".mysql_escape_string(stripslashes($_POST['organization']))."', ". "address='".mysql_escape_string(stripslashes($_POST['address']))."', ". "city='".mysql_escape_string(stripslashes($_POST['city']))."', ". "province_code='".mysql_escape_string(stripslashes($_POST['province_code']))."', ". "postalcode='".mysql_escape_string(stripslashes($_POST['postalcode']))."', ". "phone='".mysql_escape_string(stripslashes($_POST['phone']))."', ". "tollfree='".mysql_escape_string(stripslashes($_POST['tollfree']))."', ". "fax='".mysql_escape_string(stripslashes($_POST['fax']))."', ". "email='".mysql_escape_string(stripslashes($_POST['email']))."', ". "website='".mysql_escape_string(stripslashes($_POST['website']))."', ". "notes='".mysql_escape_string(stripslashes($_POST['notes']))."', ". "donationpolicyurl='".mysql_escape_string(stripslashes($_POST['donationpolicyurl']))."', ". "fundingselectiondate='".mysql_escape_string(stripslashes($_POST['fundingselectiondate']))."', ". "waiveraccepted='".mysql_escape_string(stripslashes($_POST['waiveraccepted']))."', ". "taxreceiptrequired='".mysql_escape_string(stripslashes($_POST['taxreceiptrequired']))."' ". "WHERE id='$id'"; mysql_query($exec); //FIXME accept the logo //"logo='".mysql_escape_string(stripslashes($_POST['logo']))."', ". } exit; break; case 'sponsorshipinfo_load': $id=intval($_GET['id']); $ret=array(); echo json_encode($ret); exit; break; case 'contactsinfo_load': $sponsors_id=intval($_GET['id']); $q=mysql_query("SELECT id, uid, year, firstname, lastname, deleted, salutation, email, phonework, phonecell, `primary` FROM users,users_sponsor WHERE `types` LIKE '%sponsor%' AND sponsors_id='$sponsors_id' AND users_sponsor.users_id=users.id AND users.deleted='no' ORDER BY year DESC"); echo mysql_error(); echo ""; echo ""; echo " "; echo " "; echo " "; echo " "; echo " "; echo " "; echo " "; echo "\n"; while($r=mysql_fetch_object($q)) { echo "\n"; echo " \n"; echo " \n"; echo " "; echo " \n"; echo " \n"; $p = i18n(($r->primary=='yes')?'Yes':'No'); echo " \n"; echo " \n"; echo "\n"; } echo "
".i18n("Year")."".i18n("Name")."".i18n("Email")."".i18n("Phone (Work)")."".i18n("Phone (Cell)")."".i18n("Primary")."Actions
$r->year"; if($r->salutation) echo $r->salutation." "; echo "$r->firstname $r->lastname"; if($r->email) { list($eb,$ea)=split("@",$r->email); echo $r->email; } else echo " "; echo " $r->phonework$r->phonecell$p"; //FIXME: should we just go to /user_personal.php here instead? echo "id\">"; echo " "; echo "id\">"; echo "
\n"; exit; break; } send_header("Donor Management", array('Committee Main' => 'committee_main.php', 'Administration' => 'admin/index.php', 'Fundraising' => 'admin/fundraising.php') ); ?> "; echo ""; echo "Add New Donor(s)\n"; echo ""; echo ""; echo "View/Modify Donor(s)\n"; echo ""; echo ""; echo "
"; ?>