本文整理汇总了PHP中header::index方法的典型用法代码示例。如果您正苦于以下问题:PHP header::index方法的具体用法?PHP header::index怎么用?PHP header::index使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类header
的用法示例。
在下文中一共展示了header::index方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: index
function index()
{
$header = new header();
$header->index("Karaoke");
$url = 'http://sannhac.com/';
$trans = new web_transfer();
$indexpage = '?film';
$base = '/';
$trans->initiate_news($url, $indexpage);
$trans->converturl($url, $base);
$content = '';
$trans->start_transfer("sannhac.com");
$trans->getcontent($content);
var_dump($content);
die;
$content = str_replace("<a", "<span", $content);
$content = str_replace("Phim3s.Home.init();", "", $content);
preg_match_all('/<div id="content">(.*?)<div id="sidebar">/s', $content, $matches, PREG_SET_ORDER);
foreach ($matches as $key) {
}
$data['content'] = $key[1];
// form security
$data['csrf_test_name'] = $this->security->get_csrf_hash();
$this->load->view('karaoke/sannhac', $data);
}
示例2: 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);
}
}
示例3: contact
function contact()
{
$this->load->model('log_model');
$user_id = '';
//header
$header = new header();
$header->index("Liên hệ", '', '');
//proccessing
$is_logged_in = $this->session->userdata('is_logged_in');
if (!isset($is_logged_in) || $is_logged_in != true) {
$user_id = '0';
$data['name'] = '';
$data['email'] = '';
} else {
$user_id = $this->log_model->getId();
$user_data = $this->db->select('NAME,EMAIL')->from('qtht_users')->where('ID_U', $user_id)->get()->result_array();
foreach ($user_data as $key) {
}
$data['name'] = $key['NAME'];
$data['email'] = $key['EMAIL'];
}
//end proccessing
if (isset($_REQUEST['csrf_test_name'])) {
$date = getdate();
$date_send = $date['year'] . '-' . $date['mon'] . '-' . $date['mday'] . ' ' . $date['hours'] . ':' . $date['minutes'] . ':' . $date['seconds'];
$data = array('DATE_SEND' => $date_send, 'ID_U' => $user_id, 'EMAIL' => $_REQUEST['email'], 'NAME' => $_REQUEST['name'], 'CONTENT' => $_REQUEST['content']);
$this->db->insert('qtht_contact', $data);
}
//view
$data['csrf_test_name'] = $this->security->get_csrf_hash();
$this->load->view('home/contact', $data);
}
示例4: detail
function detail()
{
if (!isset($_REQUEST['link'])) {
redirect('/lap_trinh/web/');
}
//hightlight selected item
if (isset($_REQUEST['item_selected'])) {
$data['item_selected'] = $_REQUEST['item_selected'];
} else {
$data['item_selected'] = '';
}
//end
$header = new header();
$header->index($_REQUEST['item_title'], "", "");
$trans = new web_transfer();
$post = $this->input->post();
$url = 'http://www.w3schools.com/' . $_REQUEST['link'];
$indexpage = '/';
$base = '/';
$trans->initiate_news($url, $indexpage);
$trans->converturl($url, $base);
$content = '';
$trans->start_transfer("www.w3schools.com");
$trans->getcontent($content);
$content = str_replace("Try it Yourself", "Run", $content);
$content = str_replace('href', 'data-href', $content);
preg_match_all('/<div>(.*?)<div style="clear:both;">/s', $content, $matches, PREG_SET_ORDER);
foreach ($matches as $key_left) {
}
$data['left_col'] = $key_left[0];
$data['link'] = $url;
$data['try_it_url'] = $post['link'];
$data['csrf_test_name'] = $this->security->get_csrf_hash();
$this->load->view('lap_trinh/web_detail', $data);
}
示例5: football
function football()
{
$header = new header();
$header->index("LINK TRỰC TIẾP TRẬN CHELSEA VS CRYSTAL PALACE ...", "", "");
//$data['lich_phat_song'] = $this->transfer('mybongda.com');
$data['title'] = '';
$this->load->view('webcast/football');
//$this->output->cache(3);
}
示例6: football
function football()
{
$header = new header();
$header->index("Trực tiếp bóng đá K+", "", "");
//$data['lich_phat_song'] = $this->transfer('mybongda.com');
$data['title'] = '';
$this->load->view('webcast/football');
$this->output->cache(3);
}
示例7: account
function account()
{
$this->is_logged_in();
$this->load->model('log_model');
$this->load->model('social_model');
$header = new header();
$header->index('Tài khoản', '', '');
$user_log = $this->log_model->getIdUserLogin();
foreach ($user_log as $key) {
}
if ($key['facebook_id'] != '' && $key['USER_IMAGE'] == '') {
$data['user_avatar'] = 'https://graph.facebook.com/' . $key['facebook_id'] . '/picture';
}
if ($key['facebook_id'] == '' && $key['USER_IMAGE'] != '' && $key['facebook_id'] != $key['USER_IMAGE']) {
$data['user_avatar'] = $key['USER_IMAGE'];
}
if ($key['facebook_id'] == '' && $key['USER_IMAGE'] == '') {
$data['user_avatar'] = '/images/no_avatar.png';
}
if ($key['facebook_id'] != '' && $key['USER_IMAGE'] != '' && $key['facebook_id'] != $key['USER_IMAGE']) {
$data['user_avatar'] = $key['USER_IMAGE'];
}
if ($key['facebook_id'] == $key['USER_IMAGE'] && $key['USER_IMAGE'] != '') {
$data['user_avatar'] = 'https://graph.facebook.com/' . $key['facebook_id'] . '/picture';
}
if ($this->session->userdata('username')) {
$data['user_data'] = $user_log;
} else {
$data['user_data'] = "-1";
}
if (isset($_REQUEST['friend_request'])) {
echo '<script>alert("Đã gửi lời mời kết bạn")</script>';
}
$data['all_message'] = $this->social_model->select_all_message();
$data['csrf_test_name'] = $this->security->get_csrf_hash();
$data['tab'] = $_REQUEST['tab'];
if (isset($_REQUEST['lib_book_id'])) {
$data_mylib = array("ID_U" => $key['ID_U'], "ID_BOOK" => $_REQUEST['lib_book_id']);
$this->db->insert('fk_user_book', $data_mylib);
}
$this->load->view('users/account', $data);
}
示例8: music
function music()
{
$header = new header();
$header->index("Nhạc quê hương");
/*
if(isset($_REQUEST['id'])){
$path=str_replace('http://mp3.zing.vn/','',$_REQUEST['id']);
$url=$_REQUEST['id'];
}
else {
$path = "/";
$url="http://mp3.zing.vn/tim-kiem/bai-hat.html";
}
$indexpage = "?quehuong";
$trans= new web_transfer();
$indexpage='/';
$base='/';
$trans->initiate_news ($url,$indexpage);
$trans->converturl($url,$base);
$content ='';
$trans->start_transfer("mp3.zing.vn");
$trans->getcontent($content);
$data['content']=$content;
var_dump($content);
die();
*/
$zing_data = file_get_contents('http://mp3.zing.vn/tim-kiem/bai-hat.html?q=a%20time%20for%20us');
preg_match_all('/<div class="search-content">(.*?)<div class="sidebar">/s', $zing_data, $matches, PREG_SET_ORDER);
foreach ($matches as $key) {
}
$data['content'] = $key[1];
$this->load->view('test/music', $data);
}
示例9: view
function view()
{
if (!isset($_REQUEST['book_id'])) {
redirect('/book/index/');
}
$data_book = $this->db->select('*')->from('ebook_index')->where('path', $_REQUEST['book_id'])->or_where('id', $_REQUEST['book_id'])->get()->result_array();
foreach ($data_book as $key) {
}
$header = new header();
$header->index($key['NAME'], "/book/index", "Enter để tìm sách tham khảo, luận văn...");
$data['book_title'] = $key['NAME'];
$data['book_thumbs'] = $key['THUMBS'];
$data['embed_src'] = $key['path'];
$data['book_description'] = $key['DESCRIPTION'];
$data['share_id'] = $key['ID'];
$this->load->view('book/view', $data);
}
示例10: header
function get_web_game()
{
$header = new header();
$header->index("Ebog Game", "/game/play/", "Tìm kiếm game");
$url = 'http://www.ebog.com/unity-3d-racing-games.html';
/*
$trans= new web_transfer();
$indexpage='?miniclip';
$base='/';
$trans->initiate_news ($url,$indexpage);
$trans->converturl($url,$base);
$content ='';
$trans->start_transfer("ebog.com");
$trans->getcontent($content);
$content=str_replace("<a","<span",$content);
preg_match_all('/<div class="MainGameBtom mtb20">(.*?)<div class="cate_tag_hot">/s',$content,$matches_left,PREG_SET_ORDER);
foreach($matches_left as $key);
$data['content']=$key[0];
*/
$data['content'] = str_replace('<a', '<span', file_get_contents($url));
$this->load->view('game/get_web_game_temp', $data);
}
示例11: fun
function fun()
{
$header = new header();
$header->index("Học từ vựng tiếng Anh", "", "");
$this->load->view('english/vocabulary');
}
示例12: fetch
function fetch()
{
$get = $this->input->get();
$header = new header();
$header->index($get['name'], "/game/play", "Tìm kiếm game");
$data['w'] = "100%";
$data['h'] = "100%";
$data['src'] = 'http://www.miniclip.com' . $get['link'] . 'webgame.php';
$data['title'] = $get['link'];
$this->load->view('game/frame', $data);
}
示例13: header
function game_unity()
{
$header = new header();
$header->index("Hướng dẫn cài box game Unity", '', '');
$this->load->view('guide/game_unity');
}
示例14: index
function index($offset = 0)
{
$limit = 12;
$view = 'grid';
if (isset($_REQUEST['view'])) {
if ($_REQUEST['view']) {
$view = $_REQUEST['view'];
}
}
/* one order more product
$is_post=$this->input->get_post('is_post');
if($is_post==0) {$data['is_post']=0;}
if($is_post == null) {$data['is_post']=1;}
*/
//new model
$this->load->model('product_model');
$this->load->model('log_model');
//load header
$header = new header();
$header->index('', '0');
//asign model value
$result = $this->product_model->selectall($limit, $offset);
$data['product'] = $result['all'];
if (isset($_REQUEST['price_value_to'])) {
$data['price_from'] = $result['price_from'];
}
if (isset($_REQUEST['price_value_from'])) {
$data['price_to'] = $result['price_to'];
}
$min = $this->db->query('select MIN(product.price_out) as min from product')->result_array();
foreach ($min as $key_min) {
}
if (!isset($_REQUEST['price_value_from'])) {
$data['price_from'] = $key_min['min'];
}
$max = $this->db->query('select MAX(product.price_out) as max from product')->result_array();
foreach ($max as $key_max) {
}
if (!isset($_REQUEST['price_value_to'])) {
$data['price_to'] = $key_max['max'];
}
$data['price_range'] = $this->db->query('select DISTINCT(product.price_out) from product ORDER BY price_out ASC')->result_array();
$cate = $this->db->select('*')->from('product_category')->where('id', $this->input->get_post('id_category'))->get()->result_array();
foreach ($cate as $cate_name) {
}
if (!isset($_REQUEST['id_category'])) {
$data['name_cate'] = '';
}
if (isset($_REQUEST['id_category'])) {
$data['name_cate'] = $cate_name['name'];
}
/*
// pagination
$this->load->library('pagination');
$config = array();
$config['base_url'] = site_url("/product/index/");
$config['total_rows'] = $result['num_rows'];
$config['per_page'] = $limit;
$config['uri_segment'] = 5;
$this->pagination->initialize($config);
$data['pagination'] = $this->pagination->create_links();
*/
$data['price_result'] = count($result['all']);
if (!isset($_REQUEST['price_value_to']) || !isset($_REQUEST['price_value_from'])) {
$data['str_result'] = "Kho hàng";
}
if (isset($_REQUEST['price_value_to']) || isset($_REQUEST['price_value_from'])) {
$data['str_result'] = "K?t qu? t?m ki?m";
}
/* md5 encryption
$this->load->library('session');
$md5_time = $this->session->userdata('md5_time');
*/
$sessions = new sessions();
$p_session = $sessions->getSession();
$md5_time = $p_session['s_home'];
$data['is_post'] = $p_session['is_post'];
$data['md5_time'] = $md5_time;
$data['auto'] = '';
$data['price'] = 'Giá';
$data['header'] = '';
if ($view == 'list') {
$this->load->view('product/list_view', $data);
}
if ($view == 'grid') {
$this->load->view('product/grid_view', $data);
}
$this->load->view('footer');
}
示例15: karaoke
function karaoke()
{
$content = '';
if (isset($_REQUEST['search'])) {
$url = "http://webzone.vn/karaoke/tim-kiem.html?keyword=" . $_REQUEST['search'];
}
if (!isset($_REQUEST['search'])) {
$url = "http://webzone.vn/karaoke/";
}
$indexpage = "?karaoke";
$trans = new web_transfer();
$indexpage = '/';
$base = '/';
$trans->initiate_news($url, $indexpage);
$trans->converturl($url, $base);
$trans->start_transfer("webzone.vn");
$trans->getcontent($content);
if (!isset($_REQUEST['search'])) {
for ($i = 1; $i < 809; $i++) {
$content = str_replace('webzone.vn/karaoke/page/' . $i, 'myweb.pro.vn/music/karaoke?search=A', $content);
}
}
$content = str_replace('http://webzone.vn/karaoke/tim-kiem.html?keyword', '/music/karaoke?search', $content);
$content = str_replace('Kết quả tìm được', '', $content);
$content = str_replace('Hiển thị kết quả trang thứ', 'Trang', $content);
$content = str_replace('class="adsence"', 'class="adsence" style="display: none;', $content);
$content = str_replace('glyphicon glyphicon-thumbs-up', 'fa fa-hand-o-up fa-2x', $content);
preg_match_all('/<div class="main-content">(.*?)<footer class="footer">/s', $content, $matches, PREG_SET_ORDER);
foreach ($matches as $key) {
}
$data['content'] = $key[1];
$this->load->view('music/karaoke', $data);
//start analytic
$analytic = new analytic();
$analytic->myweb('general');
//end analytic
//for web crawler
$header = new header();
$header->index("Tra mã số karaoke", "/music/karaoke/", "Nhập tên, lời đầu bài hát hoặc ca sỹ");
}