Exemple #1
0
 public function __construct($l, $c, $d = null)
 {
     parent::__construct($l, $c, $d);
     if (!empty($d['FINISH_TEST']['if']) && $d['FINISH_TEST']['if'] == 1) {
         $this->content = preg_replace("/{TEST_GO_INFO}[\\s\\S]*{TEST_GO_INFO_END}/Ui", '', $this->content);
         $this->content = preg_replace("/{TEST_FINISH_INFO}/Ui", '', $this->content);
         $this->content = preg_replace("/{TEST_FINISH_INFO_END}/Ui", '', $this->content);
         $this->content = preg_replace("/{PROC}/Ui", $d['FINISH_TEST']['th_proc'] . '%', $this->content);
         if ($d['FINISH_TEST']['th_result'] == 1) {
             $this->content = preg_replace("/{RESULT}/Ui", '{LABEL="test_res_good"}', $this->content);
         } else {
             $this->content = preg_replace("/{RESULT}/Ui", '{LABEL="test_res_bad"}', $this->content);
         }
     } else {
         $this->content = preg_replace("/{TEST_FINISH_INFO}[\\s\\S]*{TEST_FINISH_INFO_END}/Ui", '', $this->content);
         $this->content = preg_replace("/{TEST_GO_INFO}/Ui", '', $this->content);
         $this->content = preg_replace("/{TEST_GO_INFO_END}/Ui", '', $this->content);
         $type = (int) $d['now']['quest']['id_question_type'];
         $dop = file_get_contents('tpl/test_type_' . $type . '.tpl');
         $this->content = preg_replace("/{Q_MESSTYPE}/Ui", 'test_type_' . $type, $this->content);
         $this->content = preg_replace("/{Q_TEXT}/Ui", $d['now']['quest']['q_text'], $this->content);
         $cont = null;
         foreach ($d['now']['answers'] as $ans) {
             $temp = $dop;
             $temp = preg_replace("/{ANS_ID}/Ui", $ans['id_answer'], $temp);
             $temp = preg_replace("/{ANS_VALUE}/Ui", $ans['a_text'], $temp);
             $cont .= $temp;
         }
         $this->content = preg_replace("/{Q_ANS}/Ui", $cont, $this->content);
     }
 }
Exemple #2
0
 public function __construct($l, $c, $d = null)
 {
     parent::__construct($l, $c, $d);
     $dop = file_get_contents('tpl/part_categ.tpl');
     $this->content = preg_replace("/{CATEGORY}/Ui", $dop, $this->content);
     $this->content = preg_replace("/{CAT_ITEM}/Ui", $d['category'], $this->content);
 }
Exemple #3
0
 public function __construct($l, $c, $d = null)
 {
     parent::__construct($l, $c, $d);
     if ($d['user_login'] === false) {
         $this->content = preg_replace("/{LOGININFO_START}/Ui", '', $this->content);
         $this->content = preg_replace("/{LOGININFO_END}/Ui", '', $this->content);
     } else {
         $this->content = preg_replace("/{LOGININFO_START}[\\s\\S]*{LOGININFO_END}/Ui", '', $this->content);
     }
     $dop = file_get_contents('tpl/main_info.tpl');
     //$t_spec = '<span class="label label-warning">{LABEL="test_spec"}</span>';
     //$t_free = '<span class="label label-default">{LABEL="test_free"}</span>';
     $cont = null;
     foreach ($d['tests'] as $ts) {
         $temp = $dop;
         if (!empty($ts['t_allow_guest'])) {
             $temp = preg_replace("/{SPEC_START}[\\s\\S]*{SPEC_END}/Ui", '', $temp);
             $temp = preg_replace("/{FREE_START}/Ui", '', $temp);
             $temp = preg_replace("/{FREE_END}/Ui", '', $temp);
         } else {
             $temp = preg_replace("/{FREE_START}[\\s\\S]*{FREE_END}/Ui", '', $temp);
             $temp = preg_replace("/{SPEC_START}/Ui", '', $temp);
             $temp = preg_replace("/{SPEC_END}/Ui", '', $temp);
         }
         $temp = preg_replace("/{TEST_NAME}/Ui", $ts['t_test_name'], $temp);
         $temp = preg_replace("/{TEST_ID}/Ui", $ts['id_test'], $temp);
         $cont .= $temp;
     }
     $this->content = preg_replace("/{TEST_GO}/Ui", $cont, $this->content);
     //{TEST_GO}
     //{SPEC_START}<span class="label label-warning">{LABEL="test_spec"}</span>{SPEC_END}
     //  {FREE_START}<span class="label label-default">{LABEL="test_free"}</span>{FREE_END}
 }
Exemple #4
0
 function __construct()
 {
     parent::__construct();
     if (DEVE) {
         debug::$action['m'] = $_GET['m'];
         debug::$action['a'] = $_GET['a'];
     }
 }
Exemple #5
0
 public function __construct($l, $c, $d = null)
 {
     parent::__construct($l, $c, $d);
     $cont = null;
     foreach ($d['stud_group'] as $gr) {
         $cont .= '<option value="' . $gr['id_student_group'] . '">' . $gr['sg_name'] . '</option>';
     }
     $this->content = preg_replace("/{TRAINS}/Ui", $cont, $this->content);
 }
 function __construct($blockName)
 {
     parent::__construct();
     $this->model = baseModel::getInstance();
     $this->name = $blockName;
     $this->request = request::getInstance();
     $this->init();
     $this->renderHtml();
 }
Exemple #7
0
 public function __construct($l, $c, $d = null)
 {
     parent::__construct($l, $c, $d);
     $dop = file_get_contents('tpl/admin_users_info.tpl');
     $cont = null;
     foreach ($d['users'] as $user) {
         $temp = $dop;
         foreach ($user as $k => $item) {
             if ($k == 'id_group') {
                 switch ((int) $item) {
                     case 1:
                         $item = $this->setLabel('danger', '{LABEL="group_adm"}');
                         break;
                     case 2:
                         $item = $this->setLabel('warning', '{LABEL="group_rd"}');
                         break;
                     case 3:
                         $item = $this->setLabel('success', '{LABEL="group_tr"}');
                         break;
                     case 4:
                         $item = $this->setLabel('default', '{LABEL="group_sl"}');
                         break;
                 }
             }
             $temp = preg_replace("/{" . $k . "}/Ui", $item, $temp);
         }
         $cont .= $temp;
     }
     $this->content = preg_replace("/{USER_INFO}/Ui", $cont, $this->content);
     $cont = null;
     if (isset($d['group'])) {
         foreach ($d['group'] as $t) {
             $temp = '<option value="{SID}">{SN}</option>' . "\n";
             $temp = preg_replace("/{SN}/Ui", $t['sg_name'], $temp);
             $temp = preg_replace("/{SID}/Ui", $t['id_student_group'], $temp);
             $cont .= $temp;
         }
     }
     $this->content = preg_replace("/{GROUP_INFO}/Ui", $cont, $this->content);
 }
Exemple #8
0
 public function __construct($l, $c, $d = null)
 {
     parent::__construct($l, $c, $d);
     $dop = file_get_contents('tpl/admin_set_info.tpl');
     $cont = null;
     foreach ($d['set'] as $s) {
         $temp = $dop;
         foreach ($s as $k => $item) {
             $temp = preg_replace("/{" . $k . "}/Ui", $item, $temp);
         }
         $cont .= $temp;
     }
     $this->content = preg_replace("/{SET_INFO}/Ui", $cont, $this->content);
     $cont = null;
     if (isset($d['test'])) {
         foreach ($d['test'] as $t) {
             $temp = '<option value="{SID}">{SN}</option>' . "\n";
             $temp = preg_replace("/{SN}/Ui", $t['t_test_name'], $temp);
             $temp = preg_replace("/{SID}/Ui", $t['id_test'], $temp);
             $cont .= $temp;
         }
     }
     $this->content = preg_replace("/{TEST_INFO}/Ui", $cont, $this->content);
 }
Exemple #9
0
 function __construct()
 {
     parent::__construct();
 }
Exemple #10
0
 function __construct()
 {
     // smartyインスタンスの作成
     $this->smarty = parent::__construct();
 }
Exemple #11
0
 public function __construct($viewName = '', $viewPath = '')
 {
     $viewPath = 'public/' . $viewPath;
     parent::__construct($viewName, $viewPath);
 }
Exemple #12
0
 public function __construct($l, $c, $d = null)
 {
     parent::__construct($l, $c, $d);
 }
Exemple #13
0
 function __construct()
 {
     parent::__construct();
     //echo 'vista creada';
 }
Exemple #14
0
 function __construct()
 {
     parent::__construct();
     $this->body = [];
 }
Exemple #15
0
 function __construct()
 {
     parent::__construct();
     //echo 'vista creada';
     $this->template = template::load('home');
 }