diff --git a/admin/fundraising_campaigns.php b/admin/fundraising_campaigns.php
index 7b92ca7..89b0702 100644
--- a/admin/fundraising_campaigns.php
+++ b/admin/fundraising_campaigns.php
@@ -31,7 +31,7 @@ switch($_GET['action']){
exit;
break;
- case "display":
+ case "modify":
echo "
\n";
$q=mysql_query("SELECT * FROM fundraising_campaigns WHERE fiscalyear='{$config['FISCALYEAR']}' ORDER BY name");
while($r=mysql_fetch_object($q)) {
@@ -71,6 +71,92 @@ switch($_GET['action']){
exit;
break;
+
+
+ case "managelist":
+ echo i18n("Select a campaign");
+?>
+
+
+ =i18n("Name")?> |
+ =i18n("Type")?> |
+ =i18n("Start Date")?> |
+ =i18n("End Date")?> |
+ =i18n("Goal")?> |
+ =i18n("Target($)")?> |
+ =i18n("Received")?> |
+ =i18n("% to Budget")?> |
+
+
+
+ $q=mysql_query("SELECT * FROM fundraising_campaigns WHERE fiscalyear='{$config['FISCALYEAR']}'");
+
+ while($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 "id)\">\n";
+ echo " $r->name | \n";
+ echo " $r->type | \n";
+ echo " ".format_date($r->startdate)." | \n";
+ echo " ".format_date($r->enddate)." | ";
+ echo " $goalr->name | ";
+ echo " ".format_money($r->target,false)." | \n";
+ echo " ".format_money($received,false)." | \n";
+ echo " {$percent}% | \n";
+ echo "
\n";
+ }
+ ?>
+
+
+
+
+ exit;
+ break;
+ case "manage":
+ if(!$_GET['id']) {
+ error_("Missing campaign to manage");
+ exit;
+ }
+ $id=intval($_GET['id']);
+ $q=mysql_query("SELECT * FROM fundraising_campaigns WHERE id='$id'");
+ $campaign=mysql_fetch_object($q);
+ echo "
$campaign->name
\n";
+ ?>
+
+
+
+ overview tab
+
+
+ donations tab
+
+
+ prospects tab
+
+
+ communications tab
+
+
+
+
+ exit;
+ break;
}
function save_campaign_info(){
@@ -112,15 +198,26 @@ send_header("Campaign Management",