These are chat archives for straweb/codeigniter-quickstart

23rd
Jul 2016
lego
@legobillyjoe
Jul 23 2016 19:03
Hi! I am trying to move a CI site to new server and I see in a browser stuff like:
load->library('session'); $this->load->helper('html'); $this->load->helper('url'); $this->load->helper('form'); $this->load->helper('functions'); } function index(){ //$data['css'] = ""; //$data['js'] = "home.js"; $data['title'] = "Home"; /$this->db->select('ad_order'); $this->db->select('url'); $this->db->select('image'); $query = $this->db->get('ads'); $ads1 = $query->result_array(); $data["ads"] = $ads1; $data["ads1"] = $ads1; $images1 = array(); $images2 = array(); $images3 = array(); $images4 = array(); $images5 = array(); $images6 = array(); foreach ($ads1 as $row) { $i = $row["ad_order"]; //echo $i; $values = array(); $values["url"] = $row["url"]; $values["image"] = $row["image"]; switch($i){ case 1: array_push($images1, $values); break; case 2: array_push($images2, $values); break; case 3: array_push($images3, $values); break; case 4: array_push($images4, $values); break; case 5: array_push($images5, $values); break; case 6: array_push($images6, $values); break; } } $data["ads1"] = $images1; $data["ads2"] = $images2; $data["ads3"] = $images3; $data["ads4"] = $images4; $data["ads5"] = $images5; $data["ads6"] = $images6; $this->db->order_by('specialty'); $this->db->limit(9); $data["specialties"] = $this->db->get("specialty"); $sql = "SELECT r.company_name, f.id, f.recruiter_id, f.feature_order FROM featured_recruiter f LEFT JOIN recruiter r ON f.recruiter_id=r.id ORDER BY feature_order"; $data["featured_employers"] = $this->db->query($sql); $sql = "SELECT j.id, j.title FROM job j ORDER BY j.id DESC LIMIT 10"; $data["featured_jobs"] = $this->db->query($sql); //GET RECORDS OF STATES AND SPECIALTIES FOR FILTERS $data['states_search'] = $this->db->get('states'); $this->db->order_by("specialty"); $data['specialties_search'] = $this->db->get('specialty'); //$this->load->view('header_home.php', $data); //$this->load->view('home.php', $data); //$this->load->view('footer_home.php', $data); $data["obj_flash"] = "index"; $data["fbutton"] = 1; / include('commonload.php'); $this->load->view('bluewhite/header.php', $data); $this->load->view('bluewhite/home.php', $data); $this->load->view('bluewhite/sidebar.php', $data); $this->load->view('bluewhite/footer.php', $data); } }//END OF CLASS ?>
What is wrong?