Example #1
0
 public function send_notif(\System\Http\Response $res)
 {
     $ren = \System\Template\Renderer\Txt::from_response($res);
     $ren->reset_layout();
     $ren->partial('mail/car/offer', array("admin" => $res->url_full('carshare.admin', array($this->ident))));
     $mail = new \Helper\Offcom\Mail(array('rcpt' => array($this->email), 'subject' => 'Improtřesk 2016 - Sdílení auta', 'reply_to' => \System\Settings::get('offcom', 'default', 'reply_to'), 'message' => $ren->render_content()));
     $mail->send();
     $this->sent_notif = true;
     $this->save();
 }
Example #2
0
 public function send_notif_author(\System\Http\Response $res)
 {
     if ($this->status == self::STATUS_APPROVED) {
         $partial = 'mail/car/approved';
     } else {
         if ($this->status == self::STATUS_DENIED) {
             $partial = 'mail/car/denied';
         } else {
             if ($this->status == self::STATUS_CANCELED) {
                 $partial = 'mail/car/canceled';
             } else {
                 return $this;
             }
         }
     }
     $ren = \System\Template\Renderer\Txt::from_response($res);
     $ren->reset_layout();
     $ren->partial($partial, array("item" => $this, "offer" => $this->car, "full" => $this->car->is_full(), "admin" => $res->url_full('carshare.admin', array($this->car->ident))));
     $mail = new \Helper\Offcom\Mail(array('rcpt' => array($this->email), 'reply_to' => $this->car->email, 'subject' => 'Improtřesk 2016 - Odpověď od řidiče', 'message' => $ren->render_content()));
     $mail->send();
     $this->sent_notif = true;
     $this->save();
 }
Example #3
0
 public function mail_confirm(\System\Http\Response $res)
 {
     $ren = \System\Template\Renderer\Txt::from_response($res);
     $ren->reset_layout();
     $ren->partial('mail/signup/confirm', array("item" => $this, "check" => $this->check, "workshops" => $this->workshops->sort_by('id_workshop_signup_has_workshop')->fetch()));
     $mail = new \Helper\Offcom\Mail(array('rcpt' => array($this->email), 'subject' => 'Improtřesk 2016 - Potvrzení přihlášky', 'reply_to' => \System\Settings::getSafe(array('offcom', 'default', 'reply_to'), null), 'message' => $ren->render_content()));
     $mail->send();
     $this->sent_confirm = true;
     $this->save();
 }