Example #1
0
 /**
  * This function is used to show search page
  * 
  * 
  * @return string
  */
 function dispSearch()
 {
     $search = $_SESSION['search_option'];
     foreach (array_values($search) as $val) {
         $arr[] = $val;
     }
     $cnt = count($arr);
     for ($i = 0; $i < $cnt; $i++) {
         $sql = "select t1.attrib_name,t2.attrib_value from attribute_table t1, attribute_value_table t2 where t2.attrib_value_id=" . $arr[$i] . " and t1.attrib_id=t2.attrib_id";
         $query = new Bin_Query();
         if ($query->executeQuery($sql)) {
             $tmp[] = $query->records;
         }
     }
     if (array_key_exists("Brand", $search)) {
         $brand = $search['Brand'];
     } else {
         $brand = "";
     }
     if (array_key_exists("Price", $search)) {
         $price = $search['Price'];
     } else {
         $price = "";
     }
     return Display_DFeaturedItems::dispSearch($tmp, $brand, $price);
 }