Пример #1
0
 public function __construct()
 {
     $oModel = $this->getModel();
     $this->oTemplate = $oModel->getActive();
     $oRouter = App::get()->getRouter();
     $this->aRoutes = $oRouter->getAllRouteObjects();
 }
Пример #2
0
 public function getDb()
 {
     if (!$this->oDb) {
         $app = App::get();
         $this->oDb = $app->getDb();
     }
     return $this->oDb;
 }
Пример #3
0
 public function display()
 {
     $aInputs = App::get()->getInput();
     if (isset($aInputs['form_sent_' . $this->contact_id])) {
         if (isset($aInputs['contact_sp_' . $this->contact_id]) && $aInputs['contact_sp_' . $this->contact_id] == $_SESSION['contact_' . $this->contact_id . '_sp']) {
             $_SESSION['contact_' . $this->contact_id . '_sp'] = NULL;
             $oContactModel = $this->getModel();
             $oForm = $oContactModel->get($this->contact_id);
             $oInputs = $oContactModel->getInputs($this->contact_id);
             mail($oForm->recipient, $oForm->subject, $this->buildHtml($oInputs, $aInputs), 'From: ' . $oForm->sender);
             $oBlock = new BlockController('/Jab/Component/Contact/Template/');
             echo $oBlock->render('thankyou.phtml');
         }
     }
     $oContact = $this->get();
     return $this->render($oContact);
 }
Пример #4
0
<?php

require_once '../config/bootstrap.php';
use Jab\App;
use Jab\Misc\Redirect\RedirectException;
$app = App::get();
try {
    $app->handle();
} catch (RedirectException $exc) {
} catch (Exception $exc) {
    l($exc->getTraceAsString());
}