";
echo i18n("Appeal").":";
@@ -989,6 +989,10 @@ function donortypechange() {
$("#organizationinfo_save_button").attr('disabled','');
}
+function adddonation() {
+ var id=sponsor_id;
+ $("#debug").load("$_SERVER['PHP_SELF']?>?action=donation_add", $("#donationaddform").serializeArray(),function() { update_contactsinfo(); });
+}
diff --git a/admin/fundraising_campaigns.php b/admin/fundraising_campaigns.php
index 4b6690f..660be69 100644
--- a/admin/fundraising_campaigns.php
+++ b/admin/fundraising_campaigns.php
@@ -399,6 +399,50 @@ switch($_GET['action']){
if($r=mysql_fetch_object($q)) {
}
+ $communications=array("initial"=>"Initial Communication",
+ "followup"=>"Follow-Up Communication");
+
+ foreach($communications as $key=>$name) {
+ echo "".i18n($name)."\n";
+ //check if they have one in the emails database
+ $q=mysql_query("SELECT * FROM emails WHERE fundraising_campaigns_id='$campaign_id' AND val='$key'");
+ if($email=mysql_fetch_object($q)) {
+ echo "";
+
+
+ echo "";
+ echo "".i18n("Subject")." | $email->subject | \n";
+ echo "".i18n("From")." | $email->from | \n";
+ echo "".$email->bodyhtml." | \n";
+ echo "";
+ echo "\n";
+ echo " | \n";
+ echo " \n";
+
+ }
+ else {
+ echo "\n";
+ }
+ echo " ";
+ }
exit;
break;
@@ -430,6 +474,22 @@ switch($_GET['action']){
exit;
break;
+ case "communication_remove":
+ $emails_id=$_POST['id'];
+ //check if its been sent, if so, it cannot be deleted, sorry!
+ $q=mysql_query("SELECT * FROM emails WHERE id='$emails_id'");
+ $e=mysql_fetch_object($q);
+ if($e->lastsent) {
+ error_("Cannot remove an email that has already been sent");
+ }
+ else {
+ mysql_query("DELETE FROM emails WHERE id='$emails_id'");
+ happy_("Communicaton removed");
+ }
+
+
+ break;
+
}
function save_campaign_info(){
@@ -601,6 +661,43 @@ function prospect_removeall() {
return false;
}
+//key is initial or followup
+//start is either 'new' to start with a blank, or 'existing' to load an existing email to start from
+function opencommunicationeditor(key,id) {
+ if(id) {
+ $("#dialog").load("communication.php?action=dialog_edit&id="+id,null,function() {
+ });
+ } else {
+ $("#dialog").load("communication.php?action=dialog_edit&key="+key,null,function() {
+ });
+ }
+}
+
+function opencommunicationchooser() {
+ $("#dialog").load("communication.php?action=dialog_choose&type=fundraising",null,function() {
+ });
+}
+
+function removecommunication(id) {
+ $("#debug").load("fundraising_campaigns.php?action=communication_remove",{id:id},function() {
+ update_tab_communications();
+ });
+ return false;
+}
+
+function comm_dialog_choose_select(id) {
+ alert('im back with email id: '+id);
+ //get rid of hte html
+ $("#dialog").html("");
+
+ $("#dialog").load("communication.php?action=dialog_edit&cloneid="+id,null,function() {
+ });
+}
+
+function comm_dialog_choose_cancel() {
+ alert('im cancelled');
+}
+
@@ -657,8 +754,8 @@ function display_campaign_form($r=null) {
Appeal Management
|