require_once $root_path . 'include/care_api_classes/class_tz_pharmacy.php'; $debug = FALSE; $product_obj = new Product(); if ($debug) { function print_debug_info($name, $value) { if (isset($value)) { echo $name . " is set to value: " . $value . "<br>"; } } print_debug_info("Search pattern", $keyword); print_debug_info("Category", $category); } // prepare the category-select box: $classfication_options = ''; $all_cassifications_array = $product_obj->get_all_categories(); while ($classification_array = $all_cassifications_array->FetchRow()) { if ($category == $classification_array[0]) { $classfication_options = $classfication_options . "<option selected>" . $classification_array[0] . "</option>\n"; } else { $classfication_options = $classfication_options . "<option>" . $classification_array[0] . "</option>\n"; } } if (!empty($keyword) || !empty($category)) { // We have work... if (empty($keyword)) { $keyword = "*"; } $search_results = $product_obj->get_array_search_results($keyword, $category); $number_of_search_results = $search_results->RecordCount(); $bg_color_change = 1;