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


PHP UserPeer::getAllContact方法代码示例

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


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

示例1: executeIndex

 /**
  * Executes index action
  *
  * @param sfRequest $request A request object
  */
 public function executeIndex(sfWebRequest $request)
 {
     $params = $request->getParameter('phone');
     $form = new CallbackForm();
     if ($request->isMethod('post')) {
         $phone = $params;
         try {
             if (empty($obj)) {
                 $obj = new Callback();
                 $obj->setPhone($phone)->save();
             }
         } catch (Exception $e) {
         }
         $contacts = UserPeer::getAllContact();
         $backEmail = $contacts->getEmail();
         $message = "Телефон: " . $phone . "<br/>";
         // почта, на которую придет письмо
         $mail_to = $backEmail;
         // тема письма
         $subject = "Заказ звонка";
         // заголовок письма
         $headers = "Content-type: text/html; charset=utf-8\r\n";
         // кодировка письма
         // отправляем письмо
         mail($mail_to, $subject, $message, $headers);
     }
     $this->form = $form;
 }
开发者ID:alexspark21,项目名称:symfony_bisM,代码行数:33,代码来源:actions.class.php

示例2: executeSubscription

 public function executeSubscription(sfWebRequest $request)
 {
     $params = $request->getParameter('email');
     $form = new SubscriptionForm();
     if ($request->isMethod('post')) {
         $email = $params;
         try {
             if (empty($obj)) {
                 $obj = new Subscription();
                 $obj->setEmail($email)->save();
             }
         } catch (Exception $e) {
         }
         $contacts = UserPeer::getAllContact();
         $backEmail = $contacts->getEmail();
         $message = "E-mail: " . $email . "<br/>";
         // почта, на которую придет письмо
         $mail_to = $backEmail;
         // тема письма
         $subject = "Новый подписчик";
         // заголовок письма
         $headers = "Content-type: text/html; charset=utf-8\r\n";
         // кодировка письма
         // отправляем письмо
         mail($mail_to, $subject, $message, $headers);
     }
     $this->form = $form;
 }
开发者ID:alexspark21,项目名称:symfony_bisM,代码行数:28,代码来源:components.class.php

示例3: executeIndex

 /**
  * Executes index action
  *
  * @param sfRequest $request A request object
  */
 public function executeIndex(sfWebRequest $request)
 {
     $params = $request->getParameter('orders');
     $form = new OrdersForm();
     if ($request->isMethod('post')) {
         $form->bind($params);
         if ($form->isValid()) {
             $name = $params['name'];
             $phone = $params['phone'];
             $email = $params['email'];
             $comment = $params['comment'];
             try {
                 if (empty($obj)) {
                     $obj = new Orders();
                     $obj->setName($name)->setPhone($phone)->setEmail($email)->setComment($comment)->save();
                 }
             } catch (Exception $e) {
             }
             $contacts = UserPeer::getAllContact();
             $backEmail = $contacts->getEmail();
             $message = "Имя пользователя: " . $name . "<br/>";
             $message .= "Телефон: " . $phone . "<br/>";
             $message .= "E-mail пользователя: " . $email . "<br/>";
             $message .= "Сообщение: " . $comment . "<br/>";
             // почта, на которую придет письмо
             $mail_to = $backEmail;
             // тема письма
             $subject = "Bis-M";
             // заголовок письма
             $headers = "Content-type: text/html; charset=utf-8\r\n";
             // кодировка письма
             // отправляем письмо
             mail($mail_to, $subject, $message, $headers);
         }
     }
     $this->form = $form;
 }
开发者ID:alexspark21,项目名称:symfony_bisM,代码行数:42,代码来源:actions.class.php


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