SHARE
TWEET

View.php

a guest Jun 19th, 2017 49 in 21 days
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2. defined('BASEPATH') OR exit('No direct script access allowed');
  3.  
  4. class View extends CI_Controller {
  5.  
  6.     public function __construct() {
  7.         parent::__construct();
  8.         $this->load->model('home_model', 'home');
  9.         $this->load->model('supplier_model', 'supplier');
  10.         $this->load->model('trader_model', 'trader');
  11.         $this->load->model('buyer_model', 'buyer');
  12.         $this->load->helper('url');
  13.         $this->load->helper('form');
  14.         $this->load->library('session');
  15.         $this->load->library('Pagination1');
  16.         $this->load->library('Pagination2');
  17.         $this->load->library('form_validation');
  18.         $this->load->helper('captcha');
  19.         $this->load->helper('html');
  20.         date_default_timezone_set('UTC');
  21.     }
  22.    
  23.     public function index()
  24.     {
  25.         $data['flash_month'] = $this->home->get_home_flash_month();
  26.         $data['buying_leads_count'] = $this->home->get_all_buying_leads_count();
  27.         $data['buying_leads'] = $this->home->get_home_buying_leads();
  28.         $data['flash_day'] = $this->home->get_home_flash_day();
  29.         $data['success_products'] = $this->home->get_home_success_products();
  30.        
  31.         $meta = $this->db->query("SELECT * FROM meta_settings WHERE url = 1 ")->row();
  32.        
  33.         if($meta){
  34.             $meta = array(
  35.                 array('name' => 'title', 'content' => $meta->title),
  36.                 array('name' => 'description', 'content' => $meta->description),
  37.                 array('name' => 'keywords', 'content' => $meta->keywords),
  38.             );
  39.            
  40.             echo meta($meta);
  41.         }
  42.        
  43.         $this->load->view('homepage',$data);
  44.     }
  45. }
RAW Paste Data
Top