Ejemplo n.º 1
0
 function advanced_search_view()
 {
     $manufacture_service = new Manufacture_service();
     $vehicle_model_service = new Vehicle_model_service();
     $body_type_service = new Body_type_service();
     $fuel_type_service = new Fuel_Type_service();
     $transmission_service = new Transmission_service();
     $district_service = new District_service();
     $vehicle_advertisments_service = new Vehicle_advertisments_service();
     $advanced_search_content_service = new Advanced_search_content_service();
     $data['manufactures'] = $manufacture_service->get_all_active_manufactures_for_home();
     $data['models'] = $vehicle_model_service->get_all_active_vehicle_models();
     $data['body_types'] = $body_type_service->get_all_active_body_types();
     $data['fuel_types'] = $fuel_type_service->get_all_active_fuel_types();
     $data['transmissions'] = $transmission_service->get_all_active_transmissions();
     $data['locations'] = $district_service->get_all_districts();
     $data['latest_vehicles'] = $vehicle_advertisments_service->get_new_arrival(2);
     $fields = $advanced_search_content_service->get_user_advanced_search_field($this->session->userdata('USER_ID'));
     $data['fields'] = $fields;
     $fields_arr = array();
     $i = 0;
     foreach ($fields as $field) {
         $fields_arr[$i] = $field->field_name;
         $i++;
     }
     $data['fields_arr'] = $fields_arr;
     $parials = array('content' => 'vehicle_adds/advanced_search', 'new_arrivals' => 'vehicle_adds/new_arrivals');
     $this->template->load('template/main_template', $parials, $data);
 }
Ejemplo n.º 2
0
 function post_new_commercial_advertisement()
 {
     $vehicle_advertisement_service = new Vehicle_advertisments_service();
     $data['latest_vehicles'] = $vehicle_advertisement_service->get_new_arrival(2);
     $data['heading'] = "Promote your business";
     $parials = array('content' => 'website_advertisements/add_new_website_advertisement', 'new_arrivals' => 'vehicle_adds/new_arrivals');
     $this->template->load('template/main_template', $parials, $data);
 }
Ejemplo n.º 3
0
 function site_map()
 {
     $vehicle_advertisments_service = new Vehicle_advertisments_service();
     $data[''] = '';
     $data['latest_vehicles'] = $vehicle_advertisments_service->get_new_arrival(2);
     //author-Ishani
     $parials = array('content' => 'content_pages/site_map_view', 'new_arrivals' => 'vehicle_adds/new_arrivals');
     $this->template->load('template/main_template', $parials, $data);
 }
Ejemplo n.º 4
0
 function list_website_comments()
 {
     $comments_service = new Comments_service();
     $vehicle_advertisments_service = new Vehicle_advertisments_service();
     $data['website_comments_list'] = $comments_service->get_all_comments_list();
     $data['latest_vehicles'] = $vehicle_advertisments_service->get_new_arrival(2);
     $parials = array('content' => 'vehicle_news/website_reviews_view', 'new_arrivals' => 'vehicle_adds/new_arrivals');
     $this->template->load('template/main_template', $parials, $data);
 }
Ejemplo n.º 5
0
 function load_registration()
 {
     $vehicle_advertisments_service = new Vehicle_advertisments_service();
     $data['latest_vehicles'] = $vehicle_advertisments_service->get_new_arrival(2);
     if ($this->session->userdata('USER_LOGGED_IN')) {
         redirect(site_url() . '/home/index');
     } else {
         $parials = array('content' => 'register_user/register', 'new_arrivals' => 'vehicle_adds/new_arrivals');
         $this->template->load('template/main_template', $parials, $data);
     }
 }
Ejemplo n.º 6
0
 function list_faq_questions()
 {
     $faq_service = new faq_service();
     $vehicle_advertisments_service = new Vehicle_advertisments_service();
     $website_advertisement_service = new Website_advertisements_service();
     $data['faq_question_list'] = $faq_service->get_all_questions_list();
     $data['latest_vehicles'] = $vehicle_advertisments_service->get_new_arrival(2);
     $data['commercial_images'] = $website_advertisement_service->get_advertisement_image();
     $parials = array('content' => 'content_pages/faq_view', 'new_arrivals' => 'vehicle_adds/new_arrivals');
     $this->template->load('template/main_template', $parials, $data);
 }
Ejemplo n.º 7
0
 function index()
 {
     $reg_user_service = new Reg_User_Service();
     $vehicle_advertisements_service = new Vehicle_advertisments_service();
     $comments_service = new Comments_service();
     $data['heading'] = 'Dashboard';
     $data['reg_user_count'] = count($reg_user_service->get_reg_user_details());
     $data['approved_count'] = count($vehicle_advertisements_service->get_approved_advertisements());
     $data['pending_count'] = count($vehicle_advertisements_service->get_pending_advertisements());
     $data['reviews_count'] = count($comments_service->get_all_comments());
     $partials = array('content' => 'dashboard/dashboard_view');
     $this->template->load('template/main_template', $partials, $data);
 }
Ejemplo n.º 8
0
 function load_my_advertisements($start = "0")
 {
     $vehicle_advertisements_service = new Vehicle_advertisments_service();
     $config = array();
     $config["base_url"] = site_url() . "/dashboard/load_my_advertisements/";
     $config["per_page"] = 8;
     $config["uri_segment"] = 3;
     $config["num_links"] = 4;
     $config["total_rows"] = count($vehicle_advertisements_service->get_advertisements_for_user('', '', $this->session->userdata('USER_ID')));
     $this->pagination_custome->initialize($config);
     $data['my_advertisements'] = $vehicle_advertisements_service->get_advertisements_for_user($config["per_page"], $start, $this->session->userdata('USER_ID'));
     $data["links"] = $this->pagination_custome->create_links();
     echo $this->load->view('my_dashboard/my_advertisements', $data);
 }
Ejemplo n.º 9
0
 public function search_advertisements($start = 0)
 {
     if ($this->is_first_time) {
         $data = $this->load_data();
         $this->is_first_time = FALSE;
     }
     $vehicle_advertisments_model = new Vehicle_advertisments_model();
     $vehicle_advertisments_service = new Vehicle_advertisments_service();
     $data['latest_vehicles'] = $vehicle_advertisments_service->get_new_arrival(2);
     $config = array();
     $config["base_url"] = site_url() . "/vehicle_search/search_advertisements/";
     $config["per_page"] = 12;
     $config["uri_segment"] = 3;
     $config["num_links"] = 4;
     $manufacture = trim($this->input->post('manufacturer', TRUE));
     $model = trim($this->input->post('model', TRUE));
     $body_type = trim($this->input->post('body_type', TRUE));
     $maxyear = trim($this->input->post('maxyear', TRUE));
     $minyear = trim($this->input->post('minyear', TRUE));
     $fuel_type = trim($this->input->post('fuel_type', TRUE));
     $sale_type = trim($this->input->post('sale_type', TRUE));
     $color = trim($this->input->post('color', TRUE));
     $maxprice = trim($this->input->post('maxprice', TRUE));
     $minprice = trim($this->input->post('minprice', TRUE));
     $transmission = trim($this->input->post('transmission', TRUE));
     $kilometers = trim($this->input->post('kilometers', TRUE));
     $location = trim($this->input->post('location', TRUE));
     $keyword = trim($this->input->post('keyword', TRUE));
     $view_no = trim($this->input->post('view_no', TRUE));
     $data['results'] = $vehicle_advertisments_service->search_vehicle_limit($manufacture, $model, $body_type, $maxyear, $minyear, $fuel_type, $sale_type, $color, $maxprice, $minprice, $transmission, $kilometers, $location, $keyword, $config["per_page"], $start, 'half');
     $config["total_rows"] = count($vehicle_advertisments_service->search_vehicle_limit($manufacture, $model, $body_type, $maxyear, $minyear, $fuel_type, $sale_type, $color, $maxprice, $minprice, $transmission, $kilometers, $location, $keyword, $config["per_page"], 0, 'all'));
     $this->pagination->initialize($config);
     $data["links"] = $this->pagination->create_links();
     $data['is_advance_search'] = '0';
     if ($view_no == 1) {
         echo $this->load->view('vehicle_adds/search_result', $data);
     } else {
         $parials = array('content' => 'vehicle_adds/search_advertisement', 'new_arrivals' => 'vehicle_adds/new_arrivals');
         $this->template->load('template/main_template', $parials, $data);
     }
 }
Ejemplo n.º 10
0
 function index()
 {
     $manufacture_service = new Manufacture_service();
     $vehicle_model_service = new Vehicle_model_service();
     $body_type_service = new Body_type_service();
     $fuel_type_service = new Fuel_Type_service();
     $transmission_service = new Transmission_service();
     $district_service = new District_service();
     $content_service = new Content_service();
     $vehicle_advertisments_service = new Vehicle_advertisments_service();
     $vehicle_news_service = new Vehicle_news_service();
     $comment_service = new Comments_service();
     $data['website_comments'] = $comment_service->get_all_comments();
     $data['manufactures'] = $manufacture_service->get_all_active_manufactures_for_home();
     //$data['models']        = $vehicle_model_service->get_all_active_vehicle_models();
     $data['body_types'] = $body_type_service->get_all_active_body_types();
     $data['fuel_types'] = $fuel_type_service->get_all_active_fuel_types();
     $data['transmissions'] = $transmission_service->get_all_active_transmissions();
     $data['locations'] = $district_service->get_all_districts();
     $data['why_us'] = $content_service->get_content_by_hcodes('WHYUS');
     if (isset($this->session)) {
         $vehicle_results = $vehicle_advertisments_service->get_recently_viewed_vehicles($this->session->userdata('USER_ID'));
     }
     $data['vehicle_results'] = $vehicle_results;
     $data['names'] = $manufacture_service->get_manufacture_name();
     //        $data['logos'] = $manufacture_service->get_manufacture_logo();
     $data['price_drop_vehicles'] = $vehicle_advertisments_service->get_price_drop_vehicles(4);
     //Ashani
     $data['latest_vehicles'] = $vehicle_advertisments_service->get_new_arrival(2);
     //author-Ishani
     $data['vehicle_news_results'] = $vehicle_news_service->get_vehicle_news();
     //author-Ishani
     $data['featured_vehicles'] = $vehicle_advertisments_service->get_featured_advertisements(4);
     $data['popular_vehicles'] = $vehicle_advertisments_service->get_popular_advertisements();
     //Ashani
     $parials = array('content' => 'content_pages/home_content', 'new_arrivals' => 'vehicle_adds/new_arrivals');
     $this->template->load('template/main_template', $parials, $data);
 }
Ejemplo n.º 11
0
 function request_featured()
 {
     $vehicle_advertisments_model = new Vehicle_advertisments_model();
     $vehicle_advertisments_service = new Vehicle_advertisments_service();
     $vehicle_advertisments_model->set_id(trim($this->input->post('id', TRUE)));
     $vehicle_advertisments_model->set_is_published(trim($this->input->post('value', TRUE)));
     echo $vehicle_advertisments_service->request_featured_advertisement($vehicle_advertisments_model);
 }
Ejemplo n.º 12
0
 function change_featured_status()
 {
     $vehicle_advertisments_model = new Vehicle_advertisments_model();
     $vehicle_advertisments_service = new Vehicle_advertisments_service();
     $vehicle_advertisments_model->set_id(trim($this->input->post('id', TRUE)));
     $vehicle_advertisments_model->set_is_featured(trim($this->input->post('value', TRUE)));
     echo $vehicle_advertisments_service->feature_advertisement($vehicle_advertisments_model);
 }
Ejemplo n.º 13
0
 /**
  * this is the controller function to load compare vehicles section on dashboard directly for unregistered user
  * compare button click event
  */
 function load_compare_vehicles_dashboard_unreg_user($key_array)
 {
     $saved_vehicle_list = array();
     $saved_vehicle_id_list = array();
     //split and extract vehicle list from jStorage key list (key list comes as one string)
     $saved_vehicle_list = explode(',', $key_array);
     //extract vehicle id from vehicle list
     for ($i = 0; $i < count($saved_vehicle_list); $i++) {
         $vehicle_id = explode('_', $saved_vehicle_list[$i]);
         $saved_vehicle_id_list[$i] = $vehicle_id[1];
     }
     $vehicle_compare_service = new Vehicle_compare_service();
     $equipment_service = new Equipment_service();
     $data['vehicle_list'] = $vehicle_compare_service->get_vehicle_to_compare_for_unregistered_user($saved_vehicle_id_list);
     $data['equipments'] = $equipment_service->get_all_active_equipment();
     $data['vehicle_equipments'] = array();
     foreach ($data['vehicle_list'] as $vehicle) {
         $data['equipment_arr'] = $equipment_service->get_equiments_in_vehicle($vehicle->id);
         array_push($data['vehicle_equipments'], $data['equipment_arr']);
     }
     $data['my_advertisements'] = 0;
     $vehicle_advertisments_service = new Vehicle_advertisments_service();
     $data['latest_vehicles'] = $vehicle_advertisments_service->get_new_arrival(2);
     //author-Ishani
     $parials = array('content' => 'my_dashboard/my_dashboard', 'new_arrivals' => 'vehicle_adds/new_arrivals');
     $this->template->load('template/main_template', $parials, $data);
 }