"; // Declare Required configuration files require("/home/crown/www.crownmotorsredding.com_includes/global.php"); // Rotate header image files $rand_header_seed = rand(1, 3); $rand_header_model = array("", "index_01_ford.gif", "index_01_honda.gif", "index_01_dodge.gif"); $rand_header_foot = array("", "index_08_ford.gif", "index_08_honda.gif", "index_08_dodge.gif"); $img_heaader_model = $rand_header_model[$rand_header_seed]; $img_heaader_foot = $rand_header_foot[$rand_header_seed]; /* - Check for Page Forward Variables and process -*/ $cselect = ''; $pnum = '0'; $show_search_tools = 'display: none;'; $show_search_tools = ''; if($_POST['cselect'] != '') { /* echo ""; */ $cselect = convert_uudecode(urldecode($_POST['cselect'])); $pnum = (($_POST['pn'] - 1) * 25) + 1; } /* - Post Method Search Opeations - */ if($_POST['process'] == 'true' or $_GET['topic'] != '' or $_GET['user_search'] != '') { if($_POST['process'] == 'true') { $bad_chars = array("'", ";", ","); $customsearch = addslashes(str_replace($bad_chars, "", $_POST['customsearch'])); $makeselect = addslashes(str_replace($bad_chars, "", $_POST['makeDropDown'])); $modelselect = addslashes(str_replace($bad_chars, "", $_POST['selectModelcontrol'])); $price_from = addslashes(str_replace($bad_chars, "", $_POST['price_from'])); $price_to = addslashes(str_replace($bad_chars, "", $_POST['price_to'])); $year_from = addslashes(str_replace($bad_chars, "", $_POST['year_from'])); $year_to = addslashes(str_replace($bad_chars, "", $_POST['year_to'])); if($customsearch != '') { $ssv = explode(" ", $customsearch); foreach($ssv as $svar) { $custom_select .= " make like '%".$svar."%' or"; $custom_select .= " carline like '%".$svar."%' or"; $custom_select .= " model_desc like '%".$svar."%' or"; $custom_select .= " year like '%".$svar."%' or"; $custom_select .= " stock_number like '%".$svar."%' or"; } $custom_select = substr($custom_select, 0, (count($custom_select) - 3)); if($custom_select != '' ) { $custom_select = "( ".$custom_select." ) "; } else { $custom_select = "( 1 = 1 ) "; } } else { $custom_mod = false; if($makeselect != 'any') { $custom_select .= " make like '%".$makeselect."%' and"; $custom_mod = true; } if($modelselect != 'any') { $modelselect = str_replace(" ", "%' '%", $modelselect); $custom_select .= " carline like '%".$modelselect."%' and"; $custom_mod = true; } if($price_from != 'low' and $price_to != 'high') { $custom_select .= " coded_cost between '".$price_from."' and '".$price_to."' and"; $custom_mod = true; } if($year_from != 'low' and $year_to != 'high') { $custom_select .= " year between '".$year_from."' and '".$year_to."' and"; $custom_mod = true; } if($custom_mod == true) { $custom_select = substr($custom_select, 0, (strlen($custom_select) - 4)); $custom_select = "( ".$custom_select." ) "; } else { $custom_select = " ( 1 = 1 ) "; } } } else if($_GET['topic'] != '') { $topic = addslashes(str_replace($bad_chars, "", $_GET['topic'])); switch ($topic) { case "car": $custom_select = " model_num = 'P' "; break; case "truck": $custom_select = " categ = 'TK' "; break; case "trucks": $custom_select = " categ = 'TK' "; break; case "suv": $custom_select = " categ = 'SV' "; break; case "van": $custom_select = " categ = 'VN' "; break; case "10k": $custom_select = " coded_cost <= '10000' "; break; case "diesel": $custom_select = " fuel = 'D' "; break; default: $custom_select = ""; } } if($_GET['user_search'] != '') { $user_defined_search = addslashes(str_replace("'", "%", $_GET['user_search'])); $custom_select = " ( make like '%".$user_defined_search."%' or carline like '%".$user_defined_search."%' ) "; } // If in Page Forward mode - overwrite $custom_select and $pn if($cselect != '') { $custom_select = $cselect; } // If POST headers include process = true, structure and comlete query, Format results and send to browser $select .= " select * from V_INVENTORY where "; $select .= " (status_code = '1' or status_code = '8') and nuo = 'u' and coded_cost != 0 and year != '0' and "; $select .= $custom_select; $select .= " limit ".$pnum.", 25 "; //echo $select."
"; $get_count_sql = "select count(1) from V_INVENTORY where "; $get_count_sql .= " (status_code = '1' or status_code = '8') and nuo = 'u' and coded_cost != 0 and year != '0' and "; $get_count_sql .= $custom_select; $results_count = $DB_site->query_first($get_count_sql); if($results_count[0] >= 24) { $ins_text = "the first 25 of"; if($pnum > 1) { if(($pnum + 25) > $results_count[0]) { $next_inc = $results_count[0]; } else { $next_inc = $pnum + 24; } $ins_text = $pnum." to ".$next_inc." of"; } } else { $ins_text = "all"; } $showing_results_text = "Showing ".$ins_text." ".$results_count[0]." results. "; $number_of_pages = number_format((($results_count[0] / 25) +.5), 0); $page_links = "Pages "; if($number_of_pages == 0 or $number_of_pages == 1) { $page_links .= "1  "; } else { for($nn = 1; $nn <= $number_of_pages; $nn++) { $page_links .= "".$nn."  "; } } // echo $select; // echo $select; $data = $DB_site->query($select); while($rd = $DB_site->fetch_array($data)) { // Row Structure $real_path = "/home/crown/public_html/crownmotorsredding.com/preowned_images/"; $public_path = "http://www.crownmotorsredding.com/preowned_images/"; $thumb_image = $rd['stock_number']."_".last_eight($rd['vin'])."_01_100.JPG"; // Image Assignemtn if(file_exists($real_path.$thumb_image) == true) { $thumb = $public_path.$thumb_image; } else { $thumb = "http://img.crownmotors.biz/noimages.png"; } $items = array(" ", "/"); $link = $rd['year']."-".$rd['make']."-".str_replace($items, "", $rd['carline'])."-".$rd['stock_number']; $link = strtoupper($link); $link = "/".$used_directory."/".$link.".html"; // Format Data for Functional Output. if($rd['fuel'] == 'D') { $rd['fuel'] = 'Diesel'; } else { $rd['fuel'] = 'Gas'; } /*if($rd['int_manufacturer_color'] == '') { $rd['int_manufacturer_color'] = 'N/A'; } if($rd['manufacturer_color'] == ''){ $rd['manufacturer_color'] = 'N/A'; }*/ unset($vehicle_disclaimer); if(strpos($rd['rental'], "RENTAL") != false) { $vehicle_disclaimer = "This vehicle has been a prior rental. This vehicle includes dealer or factory "; $vehicle_disclaimer .= "coverage, please ask a sales associate for details!"; } if(strpos($rd['memo2'], "CHEAP") != false) { $vehicle_disclaimer .= "
Don't miss this incredible deal!"; } // Build row $row .= "
".$rd['year']." ".$rd['make']." ".$rd['carline']." ".$rd['model_desc']."

Mileage: ".$rd['mileage']."
VIN: ".$rd['vin']."
Stock# ".$rd['stock_number']."
".$vehicle_disclaimer."
$".number_format($rd['coded_cost'])."

"; } // Parent Table Structure $results_table = " ".$row."
  Description      Price 
"; echo ""; } /* - End Post Method Search Operations - */ ?> Used Car Search Results in Redding California
Crown Motors Used Car Department
Crown Motors Ford of Northern California Crown Motors Lincoln of Northern California Crown Motors Mercury - Northern California Crown Motors Honda - Northern California Crown Motors Used Cars and Used Trucks Crown Motors
 
Click Here to Show Search Tools
Search by Topic
Show all Cars
Show all Trucks
Show all SUV's
Show all Vans
Under $10,000
Show Diesels
 
Inventory Search Utility
 
Make
Custom Search
Example: "ram 1500" or "ford escape"
 
Model
  Advanced Search Tools  
 
Price
 
 
Year
 


 
Contact Pre-Owned Sales:
   
  Email
  Questions / Comments
 

Need help with financing a vehicle?  We help hundreds of shoppers each month establish credit with a vehicle loan Crown Motors accepts many forms of payment including, Cash, Check, Visa, Mastercard as well as Discover cards.

CrownMotorsRedding.com
is the online home of Crown Ford, Crown Dodge and Crown Honda making up Shasta Motor Corp., the fastest growing automotive group in Northern California.

At CrownMotorsRedding.com you can research, view exterior and interior photos, build, price and get quotes on new cars and trucks.

You also have access to all our inventory of used cars and trucks. Feel free to search our new Ford, Dodge, Honda, Lincoln and Mercury or search our huge selection of used Cars and Trucks from the comfort of your personal computer.
Average Gas Price
Per Gallon
  
Prices by automotive.com
 
Our web services work hard to be cross-browser friendly

 
Search Crown Motors