Exemple #1
0
 public function dispatch()
 {
     if (!\Difra\Debugger::isEnabled()) {
         throw new \Difra\View\HttpError(404);
     }
     \Difra\View::$instance = 'adm';
 }
Exemple #2
0
    public function indexAction()
    {
        echo <<<EOH
<html>
\t<head></head>
\t<body></body>
</html>
EOH;
        \Difra\View::$rendered = true;
    }
Exemple #3
0
 /**
  * View image
  * @param Difra\Param\AnyInt $id
  * @throws Difra\View\HttpError
  */
 public function tmpAction(\Difra\Param\AnyInt $id)
 {
     $data = \Difra\Libs\Vault::get($id->val());
     if (!$data) {
         throw new \Difra\View\HttpError(404);
     }
     \Difra\View::$rendered = true;
     header('Content-type: image/png');
     echo $data;
 }
Exemple #4
0
 /**
  * View capcha
  */
 public function indexAction()
 {
     $capcha = \Difra\Plugins\Capcha::getInstance();
     $capcha->setSize(105, 36);
     //$Capcha->setKeyLength( 4 );
     header('Content-type: image/png');
     header("Expires: Sat, 26 Jul 1997 05:00:00 GMT");
     // Some time in the past
     header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
     header("Cache-Control: no-store, no-cache, must-revalidate");
     header("Cache-Control: post-check=0, pre-check=0", false);
     header("Pragma: no-cache");
     echo $capcha->viewCapcha();
     \Difra\View::$rendered = true;
 }
Exemple #5
0
 public function dispatch()
 {
     \Difra\View::$instance = 'adm';
 }