本文整理匯總了PHP中header::loadheader方法的典型用法代碼示例。如果您正苦於以下問題:PHP header::loadheader方法的具體用法?PHP header::loadheader怎麽用?PHP header::loadheader使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類header
的用法示例。
在下文中一共展示了header::loadheader方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: detail
function detail($id_product)
{
$url = '/index.php/order/getOrderData/';
//post variable
$order_panel = $this->input->post('dispatch');
//new model
$this->load->model('product_model');
//captcha
$this->load->helper('captcha');
$vals = array('img_path' => './captcha/', 'img_url' => 'http://khanlen.vn/captcha/', 'font_patht' => './captcha/fonts/Heineken.ttf', 'expiration' => 7200, 'img_width' => '200', 'img_height' => 30);
$cap = create_captcha($vals);
$data = array('captcha_time' => $cap['time'], 'ip_address' => $this->input->ip_address(), 'word' => $cap['word']);
$query = $this->db->insert_string('captcha', $data);
$this->db->query($query);
$expiration = time() - 7200;
// Two hour limit
$this->db->query("DELETE FROM captcha WHERE captcha_time < " . $expiration);
$data['captcha'] = $cap;
//new model
$this->load->model('order_model');
$order_data = $this->order_model->SelectAll($encryption);
$data['encrypt'] = $encryption;
$data['ordered'] = $order_data['rows_order'];
$data['paid_row'] = $order_data['paid_row'];
$data['total_quantity'] = $order_data['total_quantity'];
$data['row_product'] = '';
//load header
$header = new header();
$header->loadheader('Chi ti?t s?n ph?m');
//sql
$district = $this->db->select('*')->from('district')->get()->result_array();
if ($order_panel == 1) {
$data['order_panel'] = "<script>loadDivFromUrl('order','{$url}" . "',1); </script>";
}
if ($order_panel == null) {
$data['order_panel'] = "";
}
$result = $this->product_model->get_comment($id_product);
$height = 715 + $result['num_rows'] * 15;
$data['comment'] = $result['data_rows'];
$data['footer_height'] = 980 + $result['num_rows'] * 15;
$data['num_rows'] = $result['num_rows'];
$data['height'] = $height;
$data['datadistrict'] = $district;
$data['err'] = '';
$data['detail'] = $this->product_model->get_detail($id_product);
$data['city'] = $this->db->select('*')->from('city')->get()->result_array();
$data['id_product'] = $id_product;
//session
$this->load->library('session');
$encryption = $this->session->userdata('md5_time');
$data['encrypt'] = $encryption;
$this->load->view('product/detail', $data);
}