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' => '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); } ?>

goal' AND fiscalyear='{$config['FISCALYEAR']}' AND status='received'"); echo mysql_error(); $recr=mysql_fetch_object($recq); $received=$recr->received; if($r->budget) $percent=round($received/$r->budget*100,1); else $percent=0; echo ""; echo ""; echo ""; $col=colour_to_percent($percent); echo ""; echo "\n"; } ?>
$r->name".format_money($r->budget,false)."".format_money($received,false)."{$percent}%".format_date($r->deadline)."

fundraising_goal}' AND fiscalyear='{$config['FISCALYEAR']}'"); $goalr=mysql_fetch_object($goalq); $recq=mysql_query("SELECT SUM(value) AS received FROM fundraising_donations WHERE fundraising_campaigns_id='$r->id' AND fiscalyear='{$config['FISCALYEAR']}' AND status='received'"); echo mysql_error(); $recr=mysql_fetch_object($recq); $received=$recr->received; if($r->target) $percent=round($received/$r->target*100,1); else $percent=0; $col=colour_to_percent($percent); echo "id'\">\n"; echo " \n"; echo " \n"; echo " \n"; echo " "; echo " \n"; echo " \n"; echo " \n"; echo " "; echo "\n"; } ?>
$r->name$r->type".format_date($r->startdate)."".format_date($r->enddate)."".format_money($r->target,false)."".format_money($received,false)."{$percent}%$goalr->name

"; echo "".i18n("Name")."\n"; echo "".i18n("Date Received")."\n"; echo "".i18n("Amount")."\n"; echo "".i18n("Generate Thank You")."\n"; echo "\n"; while($r=mysql_fetch_object($q)) { $dq=mysql_query("SELECT organization AS name FROM sponsors WHERE id='$r->sponsors_id'"); $dr=mysql_fetch_object($dq); if($r->twomonth) $s="style=\"background-color: ".colour_to_percent(0).";\""; else if($r->onemonth) $s="style=\"background-color: ".colour_to_percent(50).";\""; else $s=""; $u=getUserForSponsor($r->sponsors_id); echo ""; echo " $dr->name"; echo " ".format_date($r->datereceived).""; echo " ".format_money($r->value).""; echo " "; if($u) { echo "".i18n("Generate Thank You").""; } else { echo i18n("No contact"); } echo "\n"; } echo "\n"; }else { echo i18n("No Thank You's pending"); echo "
\n"; } ?>

"; echo "".i18n("Name")."\n"; echo "".i18n("Date Received")."\n"; echo "".i18n("Amount")."\n"; echo "".i18n("Generate Receipt")."\n"; echo "\n"; while($r=mysql_fetch_object($q)) { $dq=mysql_query("SELECT organization AS name FROM sponsors WHERE id='$r->sponsors_id'"); $dr=mysql_fetch_object($dq); if($r->twomonth) $s="style=\"background-color: ".colour_to_percent(0).";\""; else if($r->onemonth) $s="style=\"background-color: ".colour_to_percent(50).";\""; else $s=""; echo ""; echo " $dr->name"; echo " ".format_date($r->datereceived).""; echo " ".format_money($r->value).""; echo " "; echo "".i18n("Generate Receipt").""; echo "\n"; } echo "\n"; }else { echo i18n("No Receipts pending"); echo "
\n"; } ?>

=NOW() ORDER BY followupdate LIMIT 5"); echo mysql_error(); if(mysql_num_rows($q)) { echo ""; echo ""; echo " \n"; echo " \n"; echo " \n"; echo "\n"; while($r=mysql_fetch_object($q)) { echo "\n"; } echo "
".i18n("Appeal")."".i18n("Start Date")."".i18n("Follow-Up Date")."
$r->name".format_date($r->startdate)."".format_date($r->followupdate)."
\n"; } else { echo i18n("No appeal follow-ups"); echo "
\n"; } ?>

Upcoming Proposals

=NOW() OR proposalsubmissiondate>=NOW() ORDER BY fundingselectiondate LIMIT 5"); echo mysql_error(); if(mysql_num_rows($q)) { echo ""; echo ""; echo " \n"; echo " \n"; echo " \n"; echo "\n"; while($r=mysql_fetch_object($q)) { echo ""; echo ""; echo ""; echo "\n"; } echo "
".i18n("Name")."".i18n("Proposal Submission Date")."".i18n("Funding Selection Date")."
$r->organization".format_date($r->proposalsubmissiondate)."".format_date($r->fundingselectiondate)."
\n"; } else { echo i18n("No proposals upcoming"); } send_footer(); ?>