当前位置: 首页>>代码示例>>PHP>>正文


PHP MailTemplate::getAdvertisingAgencyEmailNotificationMessage方法代码示例

本文整理汇总了PHP中MailTemplate::getAdvertisingAgencyEmailNotificationMessage方法的典型用法代码示例。如果您正苦于以下问题:PHP MailTemplate::getAdvertisingAgencyEmailNotificationMessage方法的具体用法?PHP MailTemplate::getAdvertisingAgencyEmailNotificationMessage怎么用?PHP MailTemplate::getAdvertisingAgencyEmailNotificationMessage使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在MailTemplate的用法示例。


在下文中一共展示了MailTemplate::getAdvertisingAgencyEmailNotificationMessage方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: createadvertisingagencyAction

 public function createadvertisingagencyAction()
 {
     $config = Zend_Registry::get('config');
     $this->view->headScript()->appendFile($config->baseurl . '/js/jquery.validate.min.js');
     $this->view->headScript()->appendFile($config->baseurl . '/js/agency.js');
     $city = $this->_getParam('city');
     $next = $this->_getParam('next');
     $cityObj = $this->city->findByName($city);
     if (isset($cityObj)) {
         $form = new CreateAdvertisingAgency($cityObj, $next);
         $this->view->form = $form;
         if ($this->getRequest()->isPost()) {
             $formData = $this->getRequest()->getPost();
             if ($form->isValid($formData)) {
                 //					$isValid = $this->_helper->common->validReCaptcha($this->_getAllParams());
                 //                	if ($isValid) {
                 $city_id = $this->_getParam(AdvertisingAgency::CITY);
                 $name = $this->_getParam(User::NAME);
                 $email = $this->_getParam(User::EMAIL);
                 $mobile = $this->_getParam(User::MOBILE);
                 $description = $this->_getParam(AdvertisingAgency::DESCRIPTION);
                 $comment = $this->_getParam(AdvertisingAgency::COMMENT);
                 $db = Zend_Registry::get("db");
                 $db->beginTransaction();
                 $data = array(User::NAME => $name, User::EMAIL => $email, User::MOBILE => $mobile);
                 $user = $this->user->addUser($data);
                 $data = array(AdvertisingAgency::CITY => $city_id, AdvertisingAgency::USER => $user->id, AdvertisingAgency::DESCRIPTION => $description, AdvertisingAgency::COMMENT => $comment, AdvertisingAgency::CREATED => $this->_helper->generator->generateCurrentTime(), AdvertisingAgency::MODIFIED => $this->_helper->generator->generateCurrentTime(), AdvertisingAgency::STATUS => PostStatus::ACTIVE);
                 $advertisingAgency = $this->advertisingAgency->addEntry($data);
                 // send out emails
                 $message = MailTemplate::getAdvertisingAgencyEmailNotificationMessage($user, $advertisingAgency, MailTemplate::ADVERTISING_AGENCY_REQUEST_BODY);
                 $this->mailQueue->addToQueue(MailType::SYSINFO, null, MailTemplate::SUBJECT_ADVERTISING_AGENCY_REQUEST, Constant::SYSTEM_MAIL, Constant::ADVERTISING_AGENCY_RECIPIENTS, $message, $this->_helper->generator->generateCurrentTime());
                 $message = MailTemplate::getAdvertisingAgencyEmailNotificationMessage($user, $advertisingAgency, MailTemplate::ADVERTISING_AGENCY_REQUEST_RECEIPT_BODY);
                 $this->mailQueue->addToQueue(MailType::SYSINFO, null, MailTemplate::SUBJECT_ADVERTISING_AGENCY_REQUEST_RECEIPT, Constant::SYSTEM_MAIL, $user->email, $message, $this->_helper->generator->generateCurrentTime());
                 $db->commit();
                 $this->_flashMessenger->addMessage("您的需求已经发送,我们会尽快与您取得联系!谢谢!");
                 if (empty($next)) {
                     $this->_redirect("/" . $cityObj->name . "/bulletin/list");
                 } else {
                     $this->_redirect(urldecode($next));
                 }
                 //					} else {
                 //						echo "Capthca is not correct!";
                 //					}
             } else {
                 echo "invalid form";
             }
         }
     } else {
         throw new Exception('暂时不支持所在城市!');
     }
 }
开发者ID:BGCX262,项目名称:zufangzi-svn-to-git,代码行数:51,代码来源:BulletinController.php


注:本文中的MailTemplate::getAdvertisingAgencyEmailNotificationMessage方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。