Ejemplo n.º 1
0
 public function a_start($par = null)
 {
     if (!empty($par)) {
         $id_test = (int) $par;
         $allow = false;
         if (isset($_SESSION['allow_test'])) {
             foreach ($_SESSION['allow_test'] as $al_t) {
                 if ((int) $al_t === $id_test) {
                     $allow = true;
                     break;
                 }
             }
             if ($allow) {
                 $this->model = new m_test_start($id_test);
                 $this->view = new v_test_start('layout', 'test_start', $this->model->getData());
                 return $this->view->generate();
             } else {
                 return c_main::error404();
             }
         } else {
             return c_main::error404();
         }
     } else {
         return c_main::error404();
     }
 }
Ejemplo n.º 2
0
function goError()
{
    echo c_main::error404();
    die;
}