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. */ ?> 'committee_main.php', 'Administration' => 'admin/index.php'), "fundraising" ); require_once("../dialog.inc.php"); //first, insert any defaults $q=mysql_query("SELECT * FROM fundraising WHERE year='".$config['FAIRYEAR']."'"); if(!mysql_num_rows($q)) { $q=mysql_query("SELECT * FROM fundraising WHERE year='-1'"); while($r=mysql_fetch_object($q)) { mysql_query("INSERT INTO fundraising (`type`,`name`,`description`,`system`,`goal`,`year`) VALUES ('$r->type','".mysql_real_escape_string($r->name)."','".mysql_real_escape_string($r->description)."','$r->system','$r->goal','".$config['FAIRYEAR']."')"); } } //this table is eventually going to be massive, and probably not in a tableview format, it'll show goals as well as all ongoing fund pledges, probabilities, etc as well as over/under, etc, all prettily colour coded.. basically a good overview of the total fundraising status of the fair. $q=mysql_query("SELECT * FROM fundraising WHERE year='{$config['FAIRYEAR']}' ORDER BY system DESC,type"); echo ""; while($r=mysql_fetch_object($q)) { echo ""; echo "\n"; echo "\n"; echo "\n"; echo "\n"; if($r->type=="general") $orsql.="OR fundraising_type IS NULL"; $typetotal=0; $typeprobtotal=0; $sq=mysql_query("SELECT sponsorships.id, sponsors.organization, sponsorships.value, sponsorships.status, sponsorships.probability FROM sponsorships JOIN sponsors ON sponsorships.sponsors_id=sponsors.id WHERE (sponsorships.fundraising_type='$r->type' $orsql) AND sponsorships.year='{$config['FAIRYEAR']}' ORDER BY status DESC, probability DESC, organization"); while($sr=mysql_fetch_object($sq)) { echo "id\" class=\"fundraising{$sr->status}\">"; echo ""; echo "\n"; /* echo "id\">"; //only user emails can be deleted, system ones are required and cannot be removed if($r->type=="user") { echo " "; echo "id\">"; echo " "; echo "id\">Send"; } */ echo ""; echo ""; echo ""; } else echo "\n"; $probval=$sr->probability/100*$sr->value; echo ""; echo "\n"; echo "\n"; $typeprobtotal+=$probval; $typetotal+=$sr->value; } echo ""; echo ""; echo "\n"; echo "\n"; echo "\n"; $typediff=$typeprobtotal-$r->goal; echo "\n"; echo "\n"; $totalgoal+=$r->goal; $totaldiff+=$typediff; echo "\n"; } echo ""; echo ""; echo "\n"; echo "
id',400,250)\" href=\"#\">"; if($r->system=="no") { echo "id\">"; } echo "".i18n($r->name)."".format_money($r->goal)."
"; echo "id\">"; echo "id&fundraising_type=$r->type',400,250)\" href=\"#\">$sr->organization$sr->status"; if($sr->status=="pending") { echo "$sr->probability%"; echo "".format_money($sr->value)."".format_money($probval)."
type',400,250)\" href=\"#\">add".i18n("%1 Total",array($r->name),array("Fundraising type total, eg) Award Sponsorship Total"))."".format_money($typetotal)."".format_money($typeprobtotal)."".format_money($typediff)."
 
add fund type".i18n("Total Net Position")."".format_money($totaldiff)."
\n"; echo "
\n"; echo "
\n"; echo "Manage Sponsorship Levels\n"; echo "
\n"; echo "Manage Sponsors\n"; echo "
\n"; send_footer(); ?>