[eluser]Unknown[/eluser]
Code:
if($make != null && $model == null && $FromnewPrice == null && $TonewPrice == null && $states == null && $cities == null && $year == null)
{
if($make == 786)
{
//$data['newcar'] = $this->Buy_Model->search_newcarALL();
$this->load->library('pagination');
$config['base_url'] = base_url().'index.php?buy/newcar/maketype=';
$config['total_rows'] = count($this->Home_Model->getnewall());//get the number of records
$config['per_page'] = 5 ;
$config['full_tag_open'] = '<p>';
$config['full_tag_close'] = '</p>';
$config['uri_segment']= 3;
$config['num_links'] = 20;
$this->pagination->initialize($config);
$data['newcar'] = $this->Home_Model->getnewall_det($config['per_page'],$this->uri->segment($config['uri_segment']));
$data['pagination'] = $this->pagination->create_links();
}
else if($make != 786)
{
$data['newcar'] = $this->Buy_Model->search_newcarbymake($make);
}
}//only year selection
elseif($make == null && $model == null && $FromnewPrice == null && $TonewPrice == null && $states == null && $cities == null && $year != null)
{
if($year == 200014)
{
$data['newcar'] = $this->Buy_Model->search_newcarALL();
}
else
{
$data['newcar'] = $this->Buy_Model->search_newcarbyyear($year);
}
}//only price selection