array( 'OldCurrency' => "OldCurrency", 'NewCurrency' => "NewCurrency", 'Key' => "Key" ), 'numeric' => array( 'SubscriptionId' => "SubscriptionId", 'CampaignId' => "CampaignId", 'OldAmount' => "OldAmount", 'NewAmount' => "NewAmount" ), 'boolean' => array( 'IsConfirmed' => "Confirmed" ), 'timestamp' => array( 'Date' => "Date" ), 'campaign' => array( 'Campaign' => "CampaignId" ), 'subscription' => array( 'Subscription' => "SubscriptionId" ) ); public function GenerateEmail() { global $locale; $sText = NewTemplater::Render("email/change.txt", $locale->strings, array( "campaign-name" => $this->sCampaign->sName, "confirmation-url" => "http://redonate.net/change/{$this->sSubscription->sEmailAddress}/{$this->sId}/{$this->sKey}", "unsubscribe-url" => "http://redonate.com/manage/{$this->sSubscription->sEmailAddress}/{$this->sSubscription->sSettingsKey}", "old" => Currency::Format($this->sOldCurrency, $this->sOldAmount), "new" => Currency::Format($this->sNewCurrency, $this->sNewAmount) )); $sHtml = NewTemplater::Render("email/layout.html", $locale->strings, array( "contents" => NewTemplater::Render("email/change.html", $locale->strings, array( "campaign-name" => $this->sCampaign->sName, "confirmation-url" => "http://redonate.net/change/{$this->sSubscription->sEmailAddress}/{$this->sId}/{$this->sKey}", "unsubscribe-url" => "http://redonate.com/manage/{$this->sSubscription->sEmailAddress}/{$this->sSubscription->sSettingsKey}", "old" => Currency::Format($this->sOldCurrency, $this->sOldAmount), "new" => Currency::Format($this->sNewCurrency, $this->sNewAmount) )) )); return array("text" => $sText, "html" => $sHtml); } }