Пример #1
0
 function index()
 {
     $header = new header();
     $data['csrf_test_name'] = $this->security->get_csrf_hash();
     if (!isset($_REQUEST['render'])) {
         if (!isset($_REQUEST['category'])) {
             $header->programing("Lập trình web với HTML,CSS và Javascript");
             $this->load->view('lap_trinh/html/html', $data);
         }
         if (isset($_REQUEST['category'])) {
             switch ($_REQUEST['category']) {
                 case 'editor':
                     $header->programing("Trình soạn thảo HTML");
                     $this->load->view('lap_trinh/html/editor', $data);
                     break;
                 case 'basic':
                     $header->programing("HTML căn bản");
                     $this->load->view('lap_trinh/html/basic', $data);
                     break;
                 case 'element':
                     $header->programing("Thành phần của trang HTML");
                     $this->load->view('lap_trinh/html/element', $data);
                     break;
             }
         }
     }
     if (isset($_REQUEST['render'])) {
         $content = $_REQUEST['render'];
         $data['render'] = $content;
         $data['return'] = $_REQUEST['return'];
         $this->load->view('runcode/html', $data);
     }
 }
Пример #2
0
 function web()
 {
     redirect('http://myweb.pro.vn/html');
     $header = new header();
     $header->programing("Học lập trình");
     $this->load->view('lap_trinh/web');
 }
Пример #3
0
 function index()
 {
     header("X-XSS-Protection: 0");
     $header = new header();
     $data['csrf_test_name'] = $this->security->get_csrf_hash();
     if (!isset($_REQUEST['render'])) {
         if (!isset($_REQUEST['category'])) {
             $header->programing("Lập trình web với Javascript");
             $this->load->view('lap_trinh/javascript/javascript', $data);
         }
         if (isset($_REQUEST['category'])) {
             switch ($_REQUEST['category']) {
                 case 'intro':
                     $header->programing("Giới thiệu JavaScript");
                     $this->load->view('lap_trinh/javascript/intro_javascript', $data);
                     break;
                 case 'js_where_to':
                     $header->programing("JavaScript có thể đặt ở đâu");
                     $this->load->view('lap_trinh/javascript/js_where_to', $data);
                     break;
                 case 'js_output':
                     $header->programing("Xuất kết quả bằng JavaScript");
                     $this->load->view('lap_trinh/javascript/js_output', $data);
                     break;
             }
         }
     }
     if (isset($_REQUEST['render'])) {
         $content = $_REQUEST['render'];
         $data['render'] = $content;
         if (isset($_REQUEST['in_page_rel'])) {
             $data['return'] = $_REQUEST['return'] . $_REQUEST['in_page_rel'];
         }
         if (!isset($_REQUEST['in_page_rel'])) {
             $data['return'] = $_REQUEST['return'];
         }
         $this->load->view('runcode/html', $data);
     }
 }