Location: PHPKode > scripts > ECW commerce shop > ecw-commerce-shop-6-03/menu.php
<?
require ("./conf.php");

$serv=getenv("SERVER_NAME");
if ( $https=='1')
{ $url="https://$serv/$path/index.php";}
  else
{   $url="./index.php";  }

echo "<script language=JavaScript>
<!---
function login()
 {
wl=window.open(\"./index.php?c=login\",\"login\",\"toolbar=0,scrollbar,height=300,width=350\");
wl.focus();
}
function jumpTo (URL_List)
    {var URL = URL_List.options[URL_List.selectedIndex].value;
    window.location.href=\"./index.php?c=srch&ctg=\"+URL;
    }

// -->
</script>";

$sql="SELECT category FROM $table_prod GROUP BY category";
@$res_cat=mysql_query("$sql");

while ( @$cat_tov=mysql_fetch_array($res_cat) )
 {
 $cat_tov[0]=ereg_replace(" ","_",$cat_tov[0]);
$ctg=ereg_replace(" ","_",$ctg);
 if ($cat_tov[0]=="$ctg")
 {
  $cat_t=$cat_t."<option value=\"$cat_tov[0]\" selected>$cat_tov[0]</option>";}
 else {   $cat_t=$cat_t."<option value=\"$cat_tov[0]\">$cat_tov[0]</option>";}
 }
 $ctg=ereg_replace("_"," ",$ctg);
 if (($ctg=='') or ($ctg=='None'))
 {$sql="SELECT firm FROM $table_prod GROUP BY firm";}
 else{ $sql="SELECT firm FROM $table_prod WHERE (category='$ctg') GROUP BY firm";}
 @$res_comp=mysql_query("$sql");

while ( @$comp_tov=mysql_fetch_array($res_comp) )
 {
 if ($comp_tov[0]==$comp)
 {$comp_t=$comp_t."<option value='$comp_tov[0]' selected>$comp_tov[0]</option>";}
 else {   $comp_t=$comp_t."<option value='$comp_tov[0]'>$comp_tov[0]</option>";}
 }


echo "
<form action='./index.php' method='GET'>
<input type='hidden' name='c' value='srch'>
<input type='hidden' name='id' value='$id'>
<table width='750' align='center' cellpadding='1' cellspacing='0'><td width=300>
<a href='./index.php?id=$id'>$lang[Top]:</a> <font size=+1 color='#000088'><b>$ctg</b></font>
 </td><td class=hd2>";

$dija=3;
require ("./memmenu.php");


echo " </td></tr></table>
 <center>
<table width='750' align='center' cellpadding='0' cellspacing='0'>
<tr><td class='mainmenu'>&nbsp;$lang[keyword]:</td>
<td class='mainmenu'><input type='text' name='key' value='$key' size=10></td>
<td class='mainmenu'> &nbsp; $lang[category]: </td>
<td class='mainmenu'><SELECT NAME=\"ctg\" OnChange=\"jumpTo(this);\"><option value=''>None</option>$cat_t</SELECT></td>
<td class='mainmenu'> &nbsp; $lang[company]: </td>
<td class='mainmenu'><SELECT NAME=\"comp\"><option value=''>None</option>$comp_t</SELECT></td>
<td class='mainmenu'> &nbsp; $lang[pricemin]:</td>
<td class='mainmenu'><input type='text' name='min' size=3 value=$min></td>
<td class='mainmenu'> &nbsp; $lang[pricemax]:</td>
<td class='mainmenu'><input type='text' name='max' size=3 value=$max></td>
<td class='mainmenu' align='center'><input type='submit' value='$lang[Search]'>

</td></tr></form></table>

";
mysql_free_result;
?>
Return current item: ECW commerce shop