예제 #1
0
파일: jade.php 프로젝트: just-paja/fudjan
 public function construct($attrs)
 {
     \System\Directory::check(BASE_DIR . self::DIR_CACHE);
     $cache = \System\Settings::getSafe(array('cache', 'templates'), true);
     if (class_exists('Jade\\Jade')) {
         $this->jade = new \Jade\Jade(array('cache' => $cache ? BASE_DIR . self::DIR_CACHE : null));
     } else {
         throw new \System\Error\MissingDependency('Could not find jade template compiler.', 'Please install ronan-gloo/jadephp');
     }
 }
예제 #2
0
 public function mail_payment_update()
 {
     $check = $this->check;
     if (!$check) {
         return;
     }
     $payments = $check->payments->fetch();
     $paid = 0;
     foreach ($payments as $p) {
         $paid += $p->amount;
     }
     $ren = new \System\Template\Renderer\Txt();
     $ren->reset_layout();
     $ren->partial('mail/signup/payment-update', array("item" => $this, "check" => $check, "paid" => $paid, "payments" => $payments));
     $mail = new \Helper\Offcom\Mail(array('rcpt' => array($this->email), 'subject' => 'Improtřesk 2016 - Přihláška, platební aktualizace', 'reply_to' => \System\Settings::getSafe(array('offcom', 'default', 'reply_to'), null), 'message' => $ren->render_content()));
     $mail->send();
     $this->sent_notif = true;
     $this->save();
 }
예제 #3
0
파일: status.php 프로젝트: just-paja/fudjan
 public static function init()
 {
     $whoops = new \Whoops\Run();
     if (static::on_cli()) {
         $whoops->pushHandler(new \Whoops\Handler\PlainTextHandler());
     } else {
         $whoops->pushHandler(new \Whoops\Handler\PrettyPageHandler());
     }
     $whoops->pushHandler(function ($exc, $inspector, $run) {
         $debug = \System\Settings::getSafe(array('dev', 'debug', 'backend'), true);
         static::filterException($exc, $debug);
         static::report('error', static::getExceptionMessage($exc));
     });
     $whoops->register();
 }