All pastes #470792 Raw Edit

Untitled

public php v1 · immutable
·published 2007-05-04 14:20 UTC
rendered paste body
function search()	{				$data = array();		foreach ($_POST as $key => $value)		{			if ($this->input->post($key, TRUE) != "" and $this->input->post($key, TRUE) != "any" and $this->input->post($key, TRUE) != "Any")				$data[$key] = $this->input->post($key, TRUE);		}				$qstr = md5(serialize($data)); 		$_SESSION[$qstr] = $data;				redirect('mls_listing/search_results/' . $qstr . '/');					}		function search_results()	{		$search_terms = $this->uri->segment(3);		$page = ($this->uri->segment(4)) ? $this->uri->segment(4) : 0;		$results = $this->mls_listingmodel->search($search_terms, $page);				$this->load->library('pagination');		$config['base_url'] = 'http://www.century21white.com/mls_listing/search_results/' . $this->uri->segment(3) . '/';		$config['total_rows'] = $results['found_rows'];		$config['per_page'] = '10'; 		$config['uri_segment'] = 4;		$config['num_links'] = 5;		$config['full_tag_open'] = '<p>';		$config['full_tag_close'] = '</p>';		$config['num_tag_close'] = ' |';		$config['cur_tag_close'] = '</b> |';		$this->pagination->initialize($config);		 		$data = array(	"view" => "mls_listing/search",						"header" => "header",						"left_menu" => $this->left_menu,						"top_menu" => null,						"page" => null,						"whats_new" => null,						"results" => $results['houses'],						"images" => $results['images'],						"found_rows" => $results['found_rows'],						"title" => "century21white.com :: MLS Search"						);		$this->load->view('layout', $data);	}