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


PHP header::loadheader方法代码示例

本文整理汇总了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);
 }
开发者ID:quantm,项目名称:mywebprovn,代码行数:54,代码来源:product.php


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