public function generateCaptcha()
 {
     require_once '../core/Captcha.php';
     $cap = new Captcha();
     $src = $cap->draw_captcha();
     $time = $cap->time;
     print $time . '#' . $src;
 }
 public function show($id)
 {
     $this->view->title = 'Абітурієнт';
     $captcha = new Captcha();
     $this->view->src = $captcha->draw_captcha();
     $this->view->time = $captcha->time;
     $this->view->meta_k = '<META NAME="Keywords" CONTENT="Абітурієнти,компютерні системи та мережі, інженерія, ТНЕУ, КІТ, computer systems, networks">';
     $this->view->meta_d = '<META NAME="Description" CONTENT="Кафедра КІ, компютерні системи та мережі, computer systems, networks">';
     $this->view->css = array('menu');
     $this->view->js = array('registration', 'guestbook/addEvent');
     //$this->view->data = $this->model->getInfo($id);
     $this->view->render('showAbiturient/show');
 }
 /**
  * Перевірка введених даних
  */
 public function check()
 {
     if (isset($_POST['captime'])) {
         $error = $this->model->check($_POST);
         if ($error != 0) {
             $captcha = new Captcha();
             $this->view->src = $captcha->draw_captcha();
             $this->view->time = $captcha->time;
             $this->view->error = $error;
             $this->view->data = $_POST;
             $this->view->title = 'Реєстрація';
             $this->view->css = array('registration', 'sidebar', 'registration');
             $this->view->js = array('registration', 'jquery-1.7.1.min', 'registration', 'sidebar_menu');
             $this->view->render('registration/index');
         }
     } else {
         header('Location: ' . URL . '?c=registration');
     }
 }