当前位置: 首页>>代码示例>>PHP>>正文


PHP header::giaoan方法代码示例

本文整理汇总了PHP中header::giaoan方法的典型用法代码示例。如果您正苦于以下问题:PHP header::giaoan方法的具体用法?PHP header::giaoan怎么用?PHP header::giaoan使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在header的用法示例。


在下文中一共展示了header::giaoan方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: foreach

 function doc_giao_an($path)
 {
     //die('<title>Website đang nâng cấp</title><h1>Website đang nâng cấp</h1><script type="text/javascript" src="//e-vcdn.anthill.vn/delivery-ants/zone/521621655.js"></script>');
     //load the database setting
     $mydb = $this->load->database('admin_education', TRUE);
     //end
     $header_title = '';
     if ($path) {
         $book_data = $mydb->select('*')->from('system_lesson_plan')->like('path', $path)->get()->result_array();
         if ($book_data) {
             foreach ($book_data as $key) {
             }
             $data['google_link'] = '0';
             $data['book_title'] = $key['name'];
             $data['book_description'] = '';
             $data['book_thumbs'] = $key['thumb'];
             $data['share_id'] = $key['id'];
             $data['id_cate'] = $key['id_category'];
             $header_title = $key['name'];
         } else {
             $redirect_path = 'http://xahoihoctap.net.vn/giaoan?referer=1&referer_search=' . $path;
             redirect($redirect_path);
             /*
             echo '<script type="text/javascript" src="/js/ga.js"></script>';
             echo '<meta charset="UTF-8"/>';
             echo '<h1 style="color:red">Website đang nâng cấp</h1>';
             die('<title>Website đang nâng cấp</title><script type="text/javascript" src="//e-vcdn.anthill.vn/delivery-ants/zone/521621655.js"></script>');
             */
         }
     }
     //end if
     if (!isset($_REQUEST['id'])) {
         if ($path) {
         } else {
             echo '<script type="text/javascript" src="/js/ga.js"></script>';
             echo '<meta charset="UTF-8"/>';
             echo '<h1 style="color:red">Website đang nâng cấp</h1>';
             die('<title>Website đang nâng cấp</title><script type="text/javascript" src="//e-vcdn.anthill.vn/delivery-ants/zone/521621655.js"></script>');
         }
     } else {
         //case id exist in the database then render to html
         if ($_REQUEST['id'] != "-1") {
             $book_data = $mydb->select('*')->from('system_lesson_plan')->where('id', $_REQUEST['id'])->get()->result_array();
             if ($book_data) {
                 foreach ($book_data as $key) {
                 }
                 $data['google_link'] = '0';
                 $data['book_title'] = $key['name'];
                 $data['book_description'] = '';
                 $data['book_thumbs'] = $key['thumb'];
                 $data['share_id'] = $key['id'];
                 $data['id_cate'] = $key['id_category'];
                 $header_title = $key['name'];
             } else {
                 $redirect_path = 'http://xahoihoctap.net.vn/tham-khao-giao-an?id=' . $_REQUEST['id'];
                 redirect($redirect_path);
                 /*
                 echo '<script type="text/javascript" src="/js/ga.js"></script>';
                 echo '<meta charset="UTF-8"/>';
                 echo '<h1 style="color:red">Website đang nâng cấp</h1>';
                 die('<title>Website đang nâng cấp</title><script type="text/javascript" src="//e-vcdn.anthill.vn/delivery-ants/zone/521621655.js"></script>');
                 */
             }
         }
         //end
         //start if
         if ($_REQUEST['id'] == "-1") {
             $book_data = $mydb->select('*')->from('system_lesson_plan')->where('name', $_REQUEST['book_title'])->get()->result_array();
             if ($book_data) {
                 foreach ($book_data as $key) {
                 }
                 $data['book_title'] = $key['name'];
                 $data['book_description'] = '';
                 $data['book_thumbs'] = $key['thumb'];
                 $data['cate_name'] = $key['CATE_NAME'];
                 $data['id_cate'] = $key['id_category'];
                 $data['share_id'] = $key['id'];
                 $header_title = $key['name'];
             } else {
                 $data = array('REFERER' => 'luanvannetvn', 'NAME' => strip_tags(trim($_REQUEST['book_title'])), 'DESCRIPTION' => '', 'ID_CATEGORY' => '8', 'path' => 'http://luanvan.net.vn' . $_REQUEST['path'], 'THUMBS' => $_REQUEST['book_thumbs']);
                 $this->db->insert('ebook_index', $data);
                 $header_title = $_REQUEST['book_title'];
                 $data['book_title'] = $_REQUEST['book_title'];
                 $data['book_description'] = '';
                 $data['cate_name'] = 'Chưa phân loại';
                 $data['id_cate'] = '8';
                 $data['book_thumbs'] = $_REQUEST['book_thumbs'];
                 $data['share_id'] = $this->db->insert_id();
             }
         }
         //end if
     }
     $header = new header();
     $header_title = $header_title . ' -Thư viện giáo án www.myweb.pro.vn';
     $header->giaoan($header_title);
     $content = file_get_contents($key['path']);
     $content = str_replace('Click Like Website luanvan365.com nhé bạn!', '', $content);
     $content = str_replace('Vui Lòng click vào', '', $content);
     $content = str_replace('/images/banner.jpg', 'http://xahoihoctap.net.vn/images/banner.jpg', $content);
     $content = str_replace('Luận văn liên quan', 'Luận văn liên quan<span title="Click để đóng" class="relevant-docs-close">Đóng</span>', $content);
//.........这里部分代码省略.........
开发者ID:quantm,项目名称:mywebprovn,代码行数:101,代码来源:giaoan.php

示例2: die

 function giao_an($path)
 {
     $db_free_host = $this->load->database('admin_education', TRUE);
     $path = str_replace('--', '/', $path);
     $book_data = $db_free_host->select('*')->from('ebook_index')->like('path', $path)->get()->result_array();
     if ($book_data) {
     } else {
         echo '<script type="text/javascript" src="/js/ga.js"></script>';
         echo '<meta charset="UTF-8"/>';
         echo '<h2 style="color:red">Website đang nâng cấp</h2>';
         die('<title>Website đang nâng cấp</title><script type="text/javascript" src="//e-vcdn.anthill.vn/delivery-ants/zone/521621655.js"></script>');
     }
     $header = new header();
     $header->giaoan($book_data[0]['NAME']);
     $data['book_title'] = $book_data[0]['NAME'];
     $data['book_description'] = $book_data[0]['DESCRIPTION'];
     $data['book_thumbs'] = $book_data[0]['THUMBS'];
     $data['share_id'] = $book_data[0]['ID'];
     $content = file_get_contents($book_data[0]['path']);
     $content = str_replace('Giáo án liên quan', 'Giáo án liên quan<span class="relevant-docs-close">Đóng</span>', $content);
     $content = str_replace('http://thuviengiaoan.vn/giao-an/', 'http://myweb.pro.vn/tailieu/thamkhao/', $content);
     $content = str_replace('/luan-van/', 'http://myweb.pro.vn/tailieu/thamkhao/', $content);
     $content = str_replace('/do-an/', 'http://myweb.pro.vn/tailieu/thamkhao/', $content);
     $content = str_replace('/tai-lieu/', 'http://myweb.pro.vn/tailieu/thamkhao/', $content);
     if (preg_match('/thuviengiaoan.vn/', $book_data[0]['path'])) {
         $content = str_replace('<div class="sidebar-right-adv">', '<div class="remove" style="display:none">', $content);
         $content = str_replace('<div class="post-adv">', '<div class="remove" style="display:none">', $content);
     }
     if (preg_match('/giaoan.com.vn/', $book_data[0]['path'])) {
         $content = str_replace('<div class="sidebar-right-adv">', '<div class="remove" style="display:none">', $content);
         $content = str_replace('<div class="post-adv">', '<div class="remove" style="display:none">', $content);
         $content = str_replace('<div class="adv-post">', '<div class="remove" style="display:none">', $content);
     }
     if (preg_match('/luanvan365.com/', $book_data[0]['path'])) {
         $content = str_replace('</object>', '</object><base href="http://luanvan365.com/">', $content);
     }
     if (preg_match('/luanvan.net.vn/', $book_data[0]['path'])) {
         $content = str_replace('</object>', '</object><base href="http://luanvan.net.vn/">', $content);
     }
     if (preg_match('/tai-lieu.com/', $book_data[0]['path'])) {
         $content = str_replace('</object>', '</object><base href="http://tai-lieu.com/">', $content);
     }
     if (preg_match('/tailieu.tv/', $book_data[0]['path'])) {
         $content = str_replace('</object>', '</object><base href="http://tailieu.tv/">', $content);
     }
     if (preg_match('/doan.edu.vn/', $book_data[0]['path'])) {
         $content = str_replace('</object>', '</object><base href="http://doan.edu.vn/">', $content);
     }
     //filter video variable
     //add bottom advertisement
     $str_adv_obj1 = 'name="obj1" width="878" height="700"><div style="margin-left:-45px;position:absolute"><script type="text/javascript" src="//e-vcdn.anthill.vn/delivery-ants/zone/517324894.js"></script></div>';
     $content = str_replace('name="obj1" width="878" height="700">', $str_adv_obj1, $content);
     $str_adv_obj2 = 'name="flashvars"></object><div class="adv_ants_header"><script type="text/javascript" src="//e-vcdn.anthill.vn/delivery-ants/zone/517324894.js"></script></div>';
     $content = str_replace('name="flashvars"></object>', $str_adv_obj2, $content);
     //end
     //top advertisement
     $str_replace = '<div class="doc-preview"><div class="ads_micro_top"><script type="text/javascript" src="//admicro1.vcmedia.vn/ads_codes/ads_box_16598.ads"></script></div>';
     $content = str_replace('<div class="doc-preview">', $str_replace, $content);
     //end top advertisement
     //prevent google analytics to call server
     $content = str_replace('//www.google-analytics.com/analytics.js', '', $content);
     //end
     //prevent google ads code to call server
     $content = str_replace('//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js', '', $content);
     //end
     //jquery conflict
     $content = str_replace('//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js?ver=1.7.1', '', $content);
     //end
     //bottom ads
     $str_ads = "</object><div class='bottom_ads'>\n\t<div class='sponsor_link_wrapper'>\n\t<img width='24px' height='24px' src='http://xahoihoctap.net.vn/images/announceIcon.png'/>\n\t<h4 class='sponsor_link'>Liên kết của nhà tài trợ sẽ đóng sau <span class='close_sponsor_link'></span></h4>\n\t</div>\n\t<script type='text/javascript' src='//e-vcdn.anthill.vn/delivery-ants/zone/522972114.js'></script>\n\t</div>";
     $content = str_replace('</object>', $str_ads, $content);
     //end
     $content = str_replace('/images/banner.jpg', 'http://xahoihoctap.net.vn/images/banner.jpg', $content);
     $content = str_replace('Click Like Website luanvan365.com nhé bạn!', '', $content);
     $content = str_replace('Vui Lòng click vào', '', $content);
     $content = str_replace('bên dưới để tải tài liệu :', '', $content);
     $data['content'] = str_replace('Scale=0.95', 'Scale=1.00', $content);
     //end
     $data['csrf_test_name'] = $this->security->get_csrf_hash();
     //login pop-up
     if (isset($_REQUEST['type'])) {
         $data['type'] = $_REQUEST['type'];
     } else {
         $data['type'] = '0';
     }
     //end
     $data['like'] = $book_data[0]['LIKE_COUNT'];
     $data['shared_url'] = 'http://myweb.pro.vn/giao-an/' . $path;
     $this->load->view('giaoan/tailieu-luanvan', $data);
 }
开发者ID:quantm,项目名称:mywebprovn,代码行数:90,代码来源:tailieu.php


注:本文中的header::giaoan方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。