diff --git a/admin/fundraising_campaigns.php b/admin/fundraising_campaigns.php
index 89b0702..c76387b 100644
--- a/admin/fundraising_campaigns.php
+++ b/admin/fundraising_campaigns.php
@@ -117,12 +117,13 @@ switch($_GET['action']){
echo "\n";
}
?>
-
exit;
break;
+
+
case "manage":
if(!$_GET['id']) {
error_("Missing campaign to manage");
@@ -157,6 +158,44 @@ switch($_GET['action']){
exit;
break;
+
+ case "manage_tab_overview":
+ $campaign_id=intval($_GET['id']);
+
+ $q=mysql_query("SELECT * FROM fundraising_campaigns WHERE id='$campaign_id' AND fiscalyear='{$config['FISCALYEAR']}'");
+
+ if($r=mysql_fetch_object($q)) {
+
+ $goalq=mysql_query("SELECT * FROM fundraising_goals WHERE goal='{$r->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->budget)
+ $percent=round($received/$r->target*100,1);
+ else
+ $percent=0;
+ $col=colour_to_percent($percent);
+ echo "
Type | $r->type | Start Date | ".format_date($r->startdate)." | \n"; + echo "\n"; + echo "Follow-Up Date | ".format_date($r->enddate)." | "; + echo "\n"; + echo "Default Goal | $goalr->name | "; + echo "\n"; + echo "Target | ".format_money($r->target,false)." | \n"; + echo "\n"; + echo "Received | ".format_money($received,false)." | \n"; + echo "\n"; + echo "% to Budget | {$percent}% | \n"; + echo "\n"; + echo "