} */ if (!is_numeric($entered)) { $query = "select upc, description, normal_price, special_price, advertised, scale from products where " . "inUse = 1 AND description like '%" . $entered . "%' " . "order by description"; $boxSize = 15; } else { $query = "select upc, description, normal_price, special_price, advertised, scale from products where " . "upc = '" . $entered . "' AND inUse = 1"; $boxSize = 3; } $result = sql_query($query, $db); $num_rows = sql_num_rows($result); if ($num_rows == 0) { echo "<BODY onLoad='document.forms[0].elements[0].focus();'>\n"; printheaderb(); // productsearchbox(); productsearchbox("no match found<BR>next search or enter upc"); } else { echo "<HTML>\n" . "<HEAD>\n"; echo "" . "<SCRIPT type=\"text/javascript\">\n" . "document.onkeydown = keyDown;\n" . "function keyDown(e) {\n" . "if ( !e ) { e = event; };\n" . "var ieKey=e.keyCode;\n" . "if (ieKey==13) { document.selectform.submit();}\n" . "else if (ieKey != 0 && ieKey != 38 && ieKey != 40) { window.top.location = 'pos.php';};\n" . "}\n" . "</SCRIPT>\n"; echo "</HEAD>\n" . "<BODY onLoad='document.selectform.selectlist.focus();'>\n"; printheaderb(); echo "<TABLE>\n" . "<TR><TD height='295' align='center' valign='center' width='560'>\n" . "<FORM name='selectform' method='post' action='productselected.php'>\n" . "<SELECT name='selectlist' size=" . $boxSize . " onBlur='document.selectform.selectlist.focus();'>\n"; $selected = "selected"; for ($i = 0; $i < $num_rows; $i++) { $row = sql_fetch_array($result); if ($row["advertised"] != 0) { $price = $row["special_price"]; } else { $price = $row["normal_price"]; } if ($row["scale"] != 0) {
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License in the file license.txt along with IS4C; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *********************************************************************************/ ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title></title> </head> <body onLoad='document.searchform.search.focus();'> <? if (!function_exists("printfooter")) include("drawscreen.php"); $_SESSION["away"] = 1; printheaderb(); productsearchbox("product search<br />by description or upc"); $_SESSION["scan"] = "noScan"; $_SESSION["beep"] = "noBeep"; printfooter(); ?> </body> </html>