コード例 #1
0
ファイル: v_test_start.php プロジェクト: allok/PhpTS
 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);
     }
 }
コード例 #2
0
ファイル: v_admin_addtest.php プロジェクト: allok/PhpTS
 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);
 }
コード例 #3
0
ファイル: v_main.php プロジェクト: allok/PhpTS
 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}
 }
コード例 #4
0
ファイル: action.class.php プロジェクト: laiello/ffphp
 function __construct()
 {
     parent::__construct();
     if (DEVE) {
         debug::$action['m'] = $_GET['m'];
         debug::$action['a'] = $_GET['a'];
     }
 }
コード例 #5
0
ファイル: v_admin_users_edit.php プロジェクト: allok/PhpTS
 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);
 }
コード例 #6
0
 function __construct($blockName)
 {
     parent::__construct();
     $this->model = baseModel::getInstance();
     $this->name = $blockName;
     $this->request = request::getInstance();
     $this->init();
     $this->renderHtml();
 }
コード例 #7
0
ファイル: v_admin_users.php プロジェクト: allok/PhpTS
 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);
 }
コード例 #8
0
ファイル: v_admin_set.php プロジェクト: allok/PhpTS
 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);
 }
コード例 #9
0
ファイル: module.php プロジェクト: EGArian/sarkesh
 function __construct()
 {
     parent::__construct();
 }
コード例 #10
0
ファイル: login.php プロジェクト: yusukehirohara0903/test
 function __construct()
 {
     // smartyインスタンスの作成
     $this->smarty = parent::__construct();
 }
コード例 #11
0
ファイル: view_public.php プロジェクト: sea75300/affiliat_r
 public function __construct($viewName = '', $viewPath = '')
 {
     $viewPath = 'public/' . $viewPath;
     parent::__construct($viewName, $viewPath);
 }
コード例 #12
0
ファイル: v_admin.php プロジェクト: allok/PhpTS
 public function __construct($l, $c, $d = null)
 {
     parent::__construct($l, $c, $d);
 }
コード例 #13
0
ファイル: vhome.php プロジェクト: carlos195/template
 function __construct()
 {
     parent::__construct();
     //echo 'vista creada';
 }
コード例 #14
0
ファイル: module.php プロジェクト: EGArian/sarkesh
 function __construct()
 {
     parent::__construct();
     $this->body = [];
 }
コード例 #15
0
ファイル: vhome.php プロジェクト: elizabethml/Frameworkcontr
 function __construct()
 {
     parent::__construct();
     //echo 'vista creada';
     $this->template = template::load('home');
 }