diff --git a/admin/fundraising.php b/admin/fundraising.php index 6a1bed17..93ebccf3 100644 --- a/admin/fundraising.php +++ b/admin/fundraising.php @@ -53,7 +53,7 @@ require_once("../dialog.inc.php"); while($r=mysql_fetch_object($q)) { echo ""; - echo "id',300,200)\" href=\"#\">"; + echo "id',300,230)\" href=\"#\">"; if($r->system=="no") { echo "id\">"; } @@ -75,7 +75,7 @@ require_once("../dialog.inc.php"); ORDER BY status DESC, probability DESC, organization"); while($sr=mysql_fetch_object($sq)) { echo "id\" class=\"fundraising{$sr->status}\">"; - echo "id&fundraising_type=$r->type',400,200)\" href=\"#\">"; + echo "id&fundraising_type=$r->type',400,250)\" href=\"#\">"; echo "id\">"; echo ""; @@ -112,7 +112,7 @@ require_once("../dialog.inc.php"); $typetotal+=$probval; } echo ""; - echo "type',400,200)\" href=\"#\">add"; + echo "type',400,250)\" href=\"#\">add"; echo "".i18n("%1 Total",array($r->name),array("Fundraising type total, eg) Award Sponsorship Total"))."\n"; echo "".format_money($typetotal)."\n"; $typediff=$typetotal-$r->goal; @@ -124,7 +124,7 @@ require_once("../dialog.inc.php"); echo " \n"; } echo ""; - echo "add fund type"; + echo "add fund type"; echo "".i18n("Total Net Position")."".format_money($totaldiff)."\n"; echo "\n"; echo "
\n"; diff --git a/admin/fundraising_sponsorship.php b/admin/fundraising_sponsorship.php index f8b0cb30..1fbac799 100644 --- a/admin/fundraising_sponsorship.php +++ b/admin/fundraising_sponsorship.php @@ -28,7 +28,7 @@ if($_GET['id']) { $id=intval($_GET['id']); - $q=mysql_query("SELECT * FROM sponsorships WHERE id='$id'"); + $q=mysql_query("SELECT sponsorships.*, sponsors.organization FROM sponsorships,sponsors WHERE sponsorships.id='$id' AND sponsorships.sponsors_id=sponsors.id"); echo "

Edit Sponsorship

"; $sponsorship=mysql_fetch_object($q); $formaction="sponsorshipedit"; @@ -46,6 +46,7 @@ echo "".i18n("Sponsor").""; echo ""; + if($formaction=="sponsorshipadd") { $q=mysql_query("SELECT * FROM sponsors ORDER BY organization"); echo mysql_error(); echo " ".i18n("Add")."\n"; + } + else { + echo $sponsorship->organization; + } echo "\n"; echo "".i18n("Type").""; diff --git a/admin/sponsors.php b/admin/sponsors.php index 5142a40b..aeb947af 100644 --- a/admin/sponsors.php +++ b/admin/sponsors.php @@ -4,7 +4,7 @@ SFIAB Website: http://www.sfiab.ca Copyright (C) 2005 Sci-Tech Ontario Inc - Copyright (C) 2005 James Grant + 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 @@ -50,9 +50,16 @@ "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']))."', ". - "notes='".mysql_escape_string(stripslashes($_POST['notes']))."' ". + "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']))."', ". + "logo='".mysql_escape_string(stripslashes($_POST['logo']))."', ". + "waiveraccepted='".mysql_escape_string(stripslashes($_POST['waiveraccepted']))."', ". + "taxreceiptrequired='".mysql_escape_string(stripslashes($_POST['taxreceiptrequired']))."' ". "WHERE id='$id'"; mysql_query($exec); @@ -64,20 +71,10 @@ if($_GET['action']=="delete" && $_GET['delete']) { - mysql_query("DELETE FROM sponsors WHERE id='".$_GET['delete']."'"); - echo happy("Sponsor successfully deleted"); - } - - if($_GET['action']=="confirm" && $_GET['confirm']) - { - mysql_query("UPDATE sponsors SET confirmed='yes' WHERE id='".$_GET['confirm']."'"); - echo happy("Sponsor successfully confirmed"); - - } - if($_GET['action']=="unconfirm" && $_GET['unconfirm']) - { - mysql_query("UPDATE sponsors SET confirmed='no' WHERE id='".$_GET['unconfirm']."'"); - echo happy("Sponsor successfully unconfirmed"); + //dont allow any deleting until we figure out what we need to do, infact, i think we never should hard delete + //this should only soft-delete so things like awards from previous years are still all linked correctly. + // mysql_query("DELETE FROM sponsors WHERE id='".$_GET['delete']."'"); +// echo happy("Sponsors cannot be deleted"); } if($_GET['action']=="edit" || $_GET['action']=="add") @@ -113,8 +110,28 @@ echo "\n"; echo "".i18n($config['postalzip'])."postalcode\" size=\"8\" maxlength=\"7\" />\n"; echo "".i18n("Phone")."phone)."\" size=\"16\" maxlength=\"32\" />\n"; + echo "".i18n("Toll Free")."tollfree)."\" size=\"16\" maxlength=\"32\" />\n"; echo "".i18n("Fax")."fax)."\" size=\"16\" maxlength=\"32\" />\n"; echo "".i18n("Email")."email)."\" size=\"60\" maxlength=\"128\" />\n"; + echo "".i18n("Website")."website)."\" size=\"60\" maxlength=\"128\" />\n"; + echo "".i18n("Donation Policy URL")."donationpolicyurl)."\" size=\"60\" maxlength=\"128\" />\n"; + echo "".i18n("Funding Selection Date").""; + emit_date_selector("fundingselectiondate",$r->fundingselectiondate); + echo "\n"; + echo "".i18n("Logo")."\n"; + echo "".i18n("Waiver Accepted").""; + if($r->waiveraccepted=="no") $ch="checked=\"checked\""; else $ch=""; + echo "".i18n("No")."   "; + if($r->waiveraccepted=="yes") $ch="checked=\"checked\""; else $ch=""; + echo "".i18n("Yes")."   "; + echo "\n"; + echo "".i18n("Tax Receipt Required").""; + if($r->taxreceiptrequired=="no") $ch="checked=\"checked\""; else $ch=""; + echo "".i18n("No")."   "; + if($r->taxreceiptrequired=="yes") $ch="checked=\"checked\""; else $ch=""; + echo "".i18n("Yes")."   "; + echo "\n"; + echo "".i18n("Notes")."\n"; echo "\n"; @@ -175,9 +192,10 @@ echo ""; echo " "; echo "id\">"; + /* cannot delete sponsors, we need to be able to link to them from other years, etc... this could be turned back on as a soft delete eventually echo " "; echo "id\">"; - +*/ echo " \n"; echo "\n";