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


PHP Render::msg方法代码示例

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


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

示例1: update

 function update($params)
 {
     $c = $this->updated_companies[0];
     $c->save();
     Render::msg($c->getName() . ' Updated.');
     $this->redirectTo(array('controller' => 'Company', 'action' => 'show', 'id' => $c->id));
 }
开发者ID:radicaldesigns,项目名称:gtd,代码行数:7,代码来源:CompanyController.php

示例2: destroy

 function destroy($params)
 {
     $params['id'] ? $clientuser = new ClientUser($params['id']) : bail('no company selected');
     $name = $clientuser->getName();
     $clientuser->destroy();
     Render::msg($name . ' Deleted.', 'bad');
     $this->redirectTo(array('controller' => 'ClientUser', 'action' => 'index'));
 }
开发者ID:radicaldesigns,项目名称:gtd,代码行数:8,代码来源:ClientUserController.php

示例3: update

 function update($params)
 {
     $staff = $this->updated_staffs[0];
     if (!empty($params['new_password'])) {
         Render::msg('Password Changed');
         $staff->setPassword($params['new_password']);
     }
     $staff->save();
     $this->redirectTo(array('controller' => 'Staff', 'action' => 'show', 'id' => $staff->id));
 }
开发者ID:radicaldesigns,项目名称:gtd,代码行数:10,代码来源:StaffController.php

示例4: create

 function create($params)
 {
     $p = $this->new_payments[0];
     $p->save();
     if ($params['noemail'] == 1) {
         Render::msg('No Email Sent');
     } else {
         $p->sendEmail();
     }
     isset($params['redirect']) ? $redirect = $params['redirect'] : ($redirect = array('controller' => 'Payment', 'action' => 'index'));
     $this->redirectTo($redirect);
     Render::msg('Payment Saved');
 }
开发者ID:radicaldesigns,项目名称:gtd,代码行数:13,代码来源:PaymentController.php

示例5: create_session

 function create_session($params)
 {
     $email = $params['email'];
     $password = sha1($params['password']);
     // search for users in this order
     $user_classes = array('ClientUser', 'Staff');
     foreach ($user_classes as $user_class) {
         $user = $user_class::getOne(array('email' => $email, 'password' => $password));
         if ($user) {
             Session::startSession($user->id, $user->getUserType());
             if ($user_class == 'Staff') {
                 $this->redirectTo(array('controller' => 'Staff', 'action' => 'show', 'id' => $user->id));
             } else {
                 if ($user_class == 'ClientUser') {
                     $this->redirectTo(array('controller' => 'Client', 'action' => 'index'));
                 }
             }
             return;
         }
     }
     // no user found
     Render::msg('Invalid Email or Password', 'bad');
     $this->redirectTo(array('controller' => 'Authenticate', 'action' => 'login', 'email' => $email));
 }
开发者ID:radicaldesigns,项目名称:gtd,代码行数:24,代码来源:AuthenticateController.php

示例6: sendEmail

 function sendEmail()
 {
     //if(!isset($this->id)) bail("must haz id to do that!");
     $d = new PHP5_Accessor();
     $d->payment = $this;
     $d->company = $this->getCompany();
     $r = getRenderer();
     $htmlcontent = $r->view('paymentReceiptEmail', $d);
     $plaincontent = $r->view('paymentReceiptEmailPlain', $d);
     $email_address = $this->getBillingEmailAddress();
     $subject = 'Radical Designs Payment Receipt ' . Util::pretty_date($this->get('date'));
     $boundary = "nextPart";
     $headers = 'From: ' . BILLING_EMAIL_ADDRESS . "\r\n";
     $headers .= "MIME-Version: 1.0\r\n";
     $headers .= "Content-Type: multipart/alternative; boundary = {$boundary}\r\n\r\n";
     $headers .= "This is a MIME encoded message.\r\n\r\n";
     $headers .= "\r\n--{$boundary}\r\n";
     // beginning \n added to separate previous content
     $headers .= "Content-type: text/plain; charset=iso-8859-1\r\n";
     $headers .= $plaincontent;
     $headers .= "\r\n\r\n--{$boundary}\r\n";
     $headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
     $headers .= $htmlcontent;
     $email_sent = mail($email_address, $subject, "", $headers);
     if ($email_sent) {
         Render::msg('Email Sent');
     } else {
         Render::msg('Email Failed To Send', 'bad');
     }
 }
开发者ID:radicaldesigns,项目名称:gtd,代码行数:30,代码来源:Payment.php

示例7: sendEmail

 function sendEmail()
 {
     if (!isset($this->id)) {
         bail("must haz id to do that!");
     }
     //trigger_error('Invoice #'.$this->id.' preparing to send email');
     $d = new PHP5_Accessor();
     $d->invoice = $this;
     $d->company = $this->getCompany();
     $r = getRenderer();
     $htmlcontent = $r->view('invoiceEmail', $d);
     $plaincontent = $r->view('invoiceEmailPlain', $d);
     $email_address = $this->getBillingEmailAddress() . $this->getAdditionalRecipients();
     if ($this->getType() == 'dated') {
         $subject = 'Radical Designs Invoice ' . Util::pretty_date($this->get('end_date'));
     } else {
         $subject = 'Radical Designs Invoice ' . Util::pretty_date($this->get('date'));
     }
     $boundary = "nextPart";
     $headers = 'From: ' . BILLING_EMAIL_ADDRESS . "\n";
     $headers .= "MIME-Version: 1.0\n";
     $headers .= "Content-Type: multipart/alternative; boundary = {$boundary}\n\n";
     $headers .= "This is a MIME encoded message.\n\n";
     $headers .= "\n--{$boundary}\n";
     // beginning \n added to separate previous content
     $headers .= "Content-type: text/plain; charset=iso-8859-1\n";
     $headers .= $plaincontent;
     $headers .= "\n\n--{$boundary}\n";
     $headers .= "Content-type: text/html; charset=iso-8859-1\n";
     $headers .= $htmlcontent;
     $email_sent = mail($email_address, $subject, "", $headers);
     if ($email_sent) {
         $this->set(array('sent_date' => Util::date_format(), 'status' => 'sent'));
         Render::msg('Email Sent');
     } else {
         $this->set(array('status' => 'failed'));
         Render::msg('Email Failed To Send', 'bad');
     }
     $this->save();
 }
开发者ID:radicaldesigns,项目名称:gtd,代码行数:40,代码来源:Invoice.php


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