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; while ($search_element = $search_results->FetchRow()) { if ($bg_color_change) { $http_buffer .= "<tr bgcolor='#ffffaa' id='hovv'>"; $bg_color_change = 0; } else { $http_buffer .= "<tr bgcolor='#ffffdd' id='hovv'>"; $bg_color_change = 1; } $item_id = $search_element['item_id']; $part_code = $search_element['partcode']; $item_plausibility = $search_element['plausibility']; $item_description = $product_obj->get_description($item_id); $item_number = $product_obj->get_itemnumber($item_id); $item_classification = $product_obj->get_item_classification($item_id); $item_unit_price = $product_obj->get_all_prices($item_id); $inuse = $search_element['not_in_use']; $check = $inuse == 1 ? 'checked=\\"checked\\"' : ''; $http_buffer .= " <td class=\"b r\">" . $item_number . "</td>\r\n <td class=\"b r\">" . $part_code . " </td>\r\n <td class=\"b r\">" . str_replace(strtolower(trim($keyword)), "<b>" . trim($keyword) . "</b>", strtolower($item_description)) . "</td>\r\n\t\t \t\t\t<td class=\"b r\">" . $item_classification . " </td>\r\n\t\t\t\t\t<td class=\"b r\" align=\"right\">" . $item_unit_price . " </td>\r\n <td class=\"b r\" align=\"right\">" . $item_plausibility . " </td>\r\n <td class=\"b r\"><div align=\"center\"><a href=\"pharmacy_tz_new_product.php?mode=show&item_id=" . $item_id . "&keyword=" . $keyword . "\"><img src=\"" . $root_path . "gui/img/common/default/common_infoicon.gif\" width=\"16\" height=\"16\" border=\"0\"></a></td>\r\n <td class=\"b r\"><div align=\"center\"><a href=\"pharmacy_tz_new_product.php?mode=edit&item_id=" . $item_id . "&GOBACKTOSEARCH=TRUE&category=" . $category . "&keyword=" . $keyword . "\"><img src=\"" . $root_path . "gui/img/common/default/hammer.gif\" width=\"16\" height=\"16\" border=\"0\"></a></td>\r\n <td class=\"b r\"><div align=\"center\"><a href=\"pharmacy_tz_new_product.php?mode=erase&item_id=" . $item_id . "&keyword=" . $keyword . "\"><img src=\"" . $root_path . "gui/img/common/default/delete.gif\" width=\"16\" height=\"16\" border=\"0\"></a></td>\r\n <td class=\"b\" nowrap id=\"nav" . $item_id . "\" class=\"redd\"><input type=\"checkbox\" id=\"itemx" . $item_id . "\" value=\"itemx" . $item_id . "\" " . $check . " onclick=\"sendQest(" . $item_id . ")\" ></td>"; $http_buffer .= "</tr>"; } } require "gui/gui_pharmacy_tz_search.php"; exit;