本文整理汇总了PHP中header::book方法的典型用法代码示例。如果您正苦于以下问题:PHP header::book方法的具体用法?PHP header::book怎么用?PHP header::book使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类header
的用法示例。
在下文中一共展示了header::book方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: index
function index()
{
redirect('/');
if (!isset($_REQUEST['id'])) {
$db_init = $this->load->database('admin_education', TRUE);
$data['mbook'] = $db_init->select('*')->from('mbook')->get()->result_array();
$this->load->view('/mbook/index', $data);
$this->output->cache(3);
$header = new header();
$header->index("Mbook", "/mbook/index", "Tìm kiếm Mbook");
} else {
$book_data = $this->db->select('*')->from('ebook_index')->where('REFERER', 'mbook')->where('id', $_REQUEST['id'])->get()->result_array();
foreach ($book_data as $key) {
}
$data['title'] = $key['NAME'];
$data['share_id'] = $_REQUEST['id'];
$data['description'] = $key['DESCRIPTION'];
$data['path'] = $key['path'];
$data['thumbs'] = $key['THUMBS'];
//header
$header = new header();
$header->book($key['NAME']);
//body
$data['csrf_test_name'] = $this->security->get_csrf_hash();
$this->load->view('mbook/pdf', $data);
}
}
示例2: view
function view($path_element_1, $path_element_2, $path_element_3)
{
$db = $this->load->database('default', TRUE);
switch ($path_element_3) {
case 'vndoccom':
//begin proccess delete file on server one time per 3 minutes
$date = getdate();
$minutes = $date['minutes'];
if ($minutes % 2) {
//do nothing
} else {
//start delete file on server
for ($doc_index = 0; $doc_index < 1000000; $doc_index++) {
if (file_exists('./pdf/file_vndoccom_' . $doc_index . '.pdf')) {
unlink('./pdf/file_vndoccom_' . $doc_index . '.pdf');
}
}
//end delete file on server
}
//end proccess delete file on server one time per 3 minutes
$path = 'http://vndoc.com/' . $path_element_1 . '/' . $path_element_2;
$q = $db->select('*')->from('pdf')->where('fetch_link', $path)->get()->result_array();
copy($q['0']['view_pdf_link'], './pdf/file_vndoccom_' . $q['0']['id'] . '.pdf');
$pdf_path = 'http://myweb.pro.vn/pdf/file_vndoccom_' . $q['0']['id'] . '.pdf';
break;
}
$header = new header();
$header->book($q[0]['name']);
echo '<div style="clear:both;height:75px"></div>';
//render html view
$data['book_thumbs'] = 'http://myweb.pro.vn/images/fb/logo.jpg';
$data['book_title'] = $q['0']['name'];
$data['book_description'] = 'Thư viện PDF';
$data['share_id'] = $q['0']['id'];
$data['embed_src'] = 'http://myweb.pro.vn/pdf/pdfviewer?path=' . $pdf_path;
$this->load->view('book/view', $data);
//begin proccess delete file on server one time per day
$date = getdate();
$hour = $date['hours'];
if ($hour % 12) {
//do nothing
} else {
//start delete file on server
for ($doc_index = 0; $doc_index < 1000000; $doc_index++) {
if (file_exists('./pdf/file_' . $doc_index . '.pdf')) {
unlink('./pdf/file_' . $doc_index . '.pdf');
}
if (file_exists('./pdf/file_vndoccom_' . $doc_index . '.pdf')) {
unlink('./pdf/file_vndoccom_' . $doc_index . '.pdf');
}
if (file_exists('./images/tailieuvn/thumb_' . $doc_index . '.jpg')) {
unlink('./images/tailieuvn/thumb_' . $doc_index . '.jpg');
}
}
//end delete file on server
}
//end proccess delete file on server one time per 15 minutes
}
示例3: header
function get_luan_van()
{
if ($_REQUEST['page'] == "6408") {
exit;
}
$header = new header();
$header->book('LUAN_VAN');
$content = file_get_contents('http://luanvan.net.vn/default.aspx?page=' . $_REQUEST['page']);
//$content=file_get_contents('http://luanvan.net.vn/luan-van/ngoai-ngu/?page=6');
$data['main'] = $content;
$data['pagination'] = '';
$data['left'] = '';
$data['csrf_test_name'] = $this->security->get_csrf_hash();
$data['type'] = '';
$data['page'] = $_REQUEST['page'] + 1;
$this->load->view('luanvan/get', $data);
}
示例4: header
function download_tai_lieu()
{
if (isset($_REQUEST['download'])) {
if ($_REQUEST['pc_doc_download_link'] != '0') {
header("Pragma: public");
header("Expires: 0");
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header("Content-type:application/pdf");
header('Content-Disposition: attachment; filename=myweb.pro.vn - ' . $_REQUEST['doc_name'] . '.pdf');
echo file_get_contents($_REQUEST['pc_doc_download_link']);
} else {
echo "<script>alert('File này đã bị người dùng xóa')</script>";
}
}
if (!isset($_REQUEST['id'])) {
redirect('/');
} else {
$mydb = $this->load->database('admin_education', TRUE);
$data = $mydb->select('*')->from('ebook_index')->where('ebook_index.ID', $_REQUEST['id'])->get()->result_array();
if ($data) {
foreach ($data as $key) {
}
} else {
echo file_get_contents('http://www.xahoihoctap.net.vn/download-tai-lieu?referer=1&id=' . $_REQUEST['id']);
}
}
$header = new header();
$header->book($key['NAME']);
if (isset($_REQUEST['type'])) {
$data['type_login'] = $_REQUEST['type'];
} else {
$data['type_login'] = '';
}
$data['content'] = '';
$data['book_id'] = '';
$data['is_download'] = '';
$data['id'] = $_REQUEST['id'];
$data['name'] = $key['NAME'];
$data['link'] = $key['direct_link'];
$data['description'] = strip_tags($key['DESCRIPTION']);
$data['book_thumbs'] = str_replace('http://myweb.pro.vn/images/tailieu/', 'http://quantmbook.net46.net/tailieu/', $key['THUMBS']);
$data['csrf_test_name'] = $this->security->get_csrf_hash();
//pdf
if ($key['REFERER'] == 'tailieuhoctapvn' || $key['REFERER'] == 'tailieuvn') {
$data['type'] = 'pdf';
if ($key['direct_link'] == '' || $key['direct_link'] == '0') {
$data['error'] = '1';
} else {
$data['error'] = '0';
}
$data['embed_url'] = 'http://myweb.pro.vn/book/pdfviewer?id=' . $_REQUEST['id'];
}
//end
//flash
if ($key['REFERER'] == 'luanvannetvn' || $key['REFERER'] == 'thuviengiaoanvn' || $key['REFERER'] == 'giaoancomvn') {
$data['error'] = '0';
$data['type'] = 'flash';
$data['doc_view'] = 'http://xahoihoctap.net.vn/bridge/mywebprovn/' . $_REQUEST['id'];
}
//end flash
//start html
if ($key['REFERER'] == 'voereduvn') {
$data['doc_view'] = file_get_contents($key['path']) . '<base href="http://voer.edu.vn">';
$data['type'] = 'html';
$data['error'] = '0';
}
if ($key['REFERER'] == 'dokovn') {
$content = file_get_contents($key['path']);
$content = str_replace('<div class="page-advertise">', '<div class="adv_header_no_border" ><script type="text/javascript" src="//admicro1.vcmedia.vn/ads_codes/ads_box_16658.ads"></script></div><div class="remove" style="display:none">', $content);
preg_match_all('/<div class="container">(.*?)<div class="doc-reference">/s', $content, $matches_doko, PREG_SET_ORDER);
if ($matches_doko) {
foreach ($matches_doko as $key_doko) {
}
} else {
redirect('/luanvan/index/');
}
//render view
$referer_id = end(explode('-', $key['path']));
$str_ouput = '<input type="hidden" id="referer_id" value=' . $referer_id . '>';
$data['doc_view'] = $key_doko['0'] . $str_ouput;
$data['type'] = 'html';
$data['error'] = '0';
}
//end html
//start pdf window open download
if ($key['REFERER'] == 'tailieuhoceduvn') {
$data['doc_view'] = '';
$data['type'] = 'tailieuhoceduvn';
}
//end
$data['share'] = 'http://myweb.pro.vn/download-tai-lieu?id=' . $_REQUEST['id'];
$this->load->view('ebook/file_download', $data);
}
示例5: pdf
function pdf($path_element_1, $path_element_2, $path_element_3)
{
switch ($path_element_3) {
case 'vndoccom':
$path = 'http://vndoc.com/' . $path_element_1 . '/' . $path_element_2;
$q = $this->db->select('*')->from('pdf')->where('fetch_link', $path)->get()->result_array();
copy($q['0']['view_pdf_link'], './pdf/file_vndoccom_' . $q['0']['id'] . '.pdf');
$pdf_path = 'http://xahoihoctap.net.vn' . '/pdf/file_vndoccom_' . $q['0']['id'] . '.pdf';
//begin proccess delete file on server five time per one hour
$date = getdate();
$minutes = $date['minutes'];
if ($minutes % 12) {
//do nothing
} else {
//start delete file on server
for ($doc_index = 0; $doc_index < 100000; $doc_index++) {
if (file_exists('./pdf/file_vndoccom_' . $doc_index . '.pdf')) {
unlink('./pdf/file_vndoccom_' . $doc_index . '.pdf');
}
}
//end delete file on server
}
//end proccess delete file on server five time per one hour
break;
case 'vinadocnet':
$path = 'http://vinadoc.net/' . $path_element_1 . '/';
$content = file_get_contents($path);
$content = str_replace('UA-62826214-1', '', $content);
$content = str_replace('<a class="name navbar-brand" href="/" title="Nhà">VinaDoc.net</a>', '<a class="name navbar-brand" href="/" title="Nhà">myweb.pro.vn</a>', $content);
$content = str_replace('http://vinadoc.net/sites/all/themes/banana/favicon.ico', 'http://xahoihoctap.net.vn/images/icons/graduate_hat.png', $content);
$content = str_replace('//www.google-analytics.com/analytics.js', 'http://raovatnhanh.net.co/js/jquery-2.1.0.min.js', $content);
$content = str_replace('//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js', '', $content);
//reset advertisement
$str_ads_728 = '<div class="ads_redirect"><script async src="//e-vcdn.anthill.vn/delivery-ants/asset/1.0/ants.js"></script><div class="517324894" data-ants-zone-id="517324894"></div></div>';
$content = str_replace('<!-- vinadoc_728x90 -->', $str_ads_728, $content);
$str_ads_250 = '<div class="ads_redirect"><script async src="//e-vcdn.anthill.vn/delivery-ants/asset/1.0/ants.js"></script><div class="528921829" data-ants-zone-id="528921829"></div></div>';
$content = str_replace('<!-- h2l_336x280 -->', $str_ads_250, $content);
echo $content;
exit;
}
//end switch
$header = new header();
$header->book($q[0]['name']);
//render html view
$data['book_thumbs'] = 'http://myweb.pro.vn/images/fb/logo.jpg';
$data['book_title'] = $q['0']['name'];
$data['book_description'] = 'Thư viện PDF';
$data['share_id'] = $q['0']['id'];
$data['embed_src'] = 'http://xahoihoctap.net.vn/tailieu/pdfviewer?path=' . $pdf_path;
$this->load->view('book/view', $data);
}
示例6: cse
function cse()
{
$header = new header();
$header->book("Kết quả tìm kiếm");
$this->load->view('google/cse');
}
示例7: tusach
function tusach($sort_by = 'NAME', $sort_order = 'asc', $offset = 0)
{
//new model instance
$this->load->model('bookcase_model');
$per_page = 25;
$offset = $this->uri->segment(2) == '' ? 0 : $this->uri->segment(2);
$results = $this->bookcase_model->SelectAll($per_page, $offset, $sort_by, $sort_order);
//pagination
$this->load->library('pagination');
$config['total_rows'] = $results['num_rows'];
$config['per_page'] = $per_page;
$config['next_link'] = 'Trang tiếp »';
$config['prev_link'] = '« Trang sau';
$config['num_tag_open'] = '';
$config['num_tag_close'] = '';
$config['num_links'] = 10;
$config['cur_tag_open'] = '<a class="currentpage">';
$config['cur_tag_close'] = '</a>';
$config['first_link'] = 'Trang đầu';
$config['last_link'] = 'Trang cuối';
$config['base_url'] = "http://myweb.pro.vn/tu-sach-tham-khao/";
$config['uri_segment'] = 2;
$this->pagination->initialize($config);
$pagination = $this->pagination->create_links();
//top-bottom book and left category
if (isset($_REQUEST['id_category'])) {
foreach ($this->db->select('*')->from('ebook_category')->where('id', $_REQUEST['id_category'])->get()->result_array() as $key) {
}
$data['id_category'] = $_REQUEST['id_category'];
$data['category_name'] = $key['name'];
$top_row = $this->db->select('*')->from('ebook_index')->where('ID_CATEGORY', $_REQUEST['id_category'])->where('VIEW !=', '')->order_by('VIEW', 'desc')->limit(4)->get()->result_array();
$data['book_top_row'] = $top_row;
$last_row = $this->db->select('*')->from('ebook_index')->where('ID_CATEGORY', $_REQUEST['id_category'])->where('VIEW !=', '')->order_by('VIEW', 'asc')->limit(4)->get()->result_array();
$data['book_last_row'] = $last_row;
} else {
$data['id_category'] = '0';
$data['category_name'] = 'Danh mục sách tham khảo';
$top_row = $this->db->select('*')->from('ebook_index')->where('VIEW !=', '')->order_by('VIEW', 'desc')->limit(4)->get()->result_array();
$data['book_top_row'] = $top_row;
$last_row = $this->db->select('*')->from('ebook_index')->where('VIEW !=', '')->order_by('VIEW', 'asc')->limit(4)->get()->result_array();
$data['book_last_row'] = $last_row;
}
if (isset($_REQUEST['category'])) {
foreach ($this->db->select('*')->from('ebook_category')->where('name', $_REQUEST['category'])->get()->result_array() as $key) {
}
redirect('/book/?id_category=' . $key['id']);
}
//end
$data['elib'] = $results['rows'];
$data['count_elib'] = $results['num_rows'];
$data['pagination'] = $pagination;
$data['category_names'] = $this->db->query("select DISTINCT ebook_category.`name` as CATEGORY from ebook_index INNER JOIN ebook_category on ebook_category.id=ebook_index.ID_CATEGORY where ebook_index.REFERER='tailieuhoctapvn' order by ebook_category.name asc")->result_array();
$header = new header();
$header->book('Danh mục sách tham khảo');
$this->load->view('book/category', $data);
}