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("../ajax.inc.php"); ?> type','".mysql_real_escape_string($r->name)."','$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,type"); echo ""; /* echo ""; echo " \n"; echo " \n"; echo "\n"; */ while($r=mysql_fetch_object($q)) { echo ""; echo "\n"; echo "\n"; echo "\n"; if($r->type=="general") $orsql.="OR fundraising_type IS NULL"; $typetotal=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']}'"); while($sr=mysql_fetch_object($sq)) { echo "id\" class=\"fundraising{$sr->status}\">\n"; echo ""; echo ""; echo ""; } else echo "\n"; $probval=$sr->probability/100*$sr->value; echo ""; echo "\n"; echo "\n"; $typetotal+=$probval; } echo ""; echo ""; echo "\n"; echo "\n"; $typediff=$typetotal-$r->goal; echo "\n"; echo "\n"; $totalgoal+=$r->goal; $totaldiff+=$typediff; echo "\n"; } echo "\n"; echo "
".i18n("Fund")."".i18n("Goal")."
".i18n($r->name)."".format_money($r->goal)."
id&fundraising_type=$r->type',300,200)\" href=\"#\">edit$sr->organization$sr->status"; if($sr->status=="pending") { echo "$sr->probability%"; echo "".format_money($sr->value)."".format_money($probval)."
type',300,200)\" href=\"#\">add".i18n("%1 Total",array($r->name),array("Fundraising type total, eg) Award Sponsorship Total"))."".format_money($typetotal)."".format_money($typediff)."
 
".i18n("Total Net Position")."".format_money($totaldiff)."
\n"; echo "".i18n("Edit fund types and goals")."\n"; send_footer(); ?>