<!--#include file="conn.asp"-->
<%
strCurrMenu=GetVariable("mnid")
%>
							<%
							strSQL="Select * From v_web_product Where id=" & GetVariable("id")
							Set rs=Server.CreateObject("ADODB.RecordSet")
							rs.open strSQL,conn,1,1
							%>

<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html;">
<link rel="stylesheet" href="common/style.css" type="text/css">
<script language="JavaScript" src="common/JS_CheckForm.js"></script>
<script language="JavaScript">
function checkform(theform){
	if(!CheckEmpty(theform.key, "Key")) return false;
	if(!CheckInteger(theform.price1, "The low price")) return false;
	if(!CheckInteger(theform.price2, "the high price")) return false;
}
</script>
<script language="JavaScript">
	function PutWare(strID){
		Shopwin=window.open("shopping.asp?action=add&spid=" + strID+ "&PtCount=1&mnid=<%=strCurrMenu%>",'WareList','width=580,height=250,scrollbars=yes,resizable=yes');
		Shopwin.focus();
	}

</script>

</head>
<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" BodyBegin>
<!--#include file="top.asp"-->
<table width="780" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr> 
    <td colspan="2" height="2" valign="top"><img src="images/mega_1_047.gif" width="208" height="12"></td>
  </tr>
  <tr> 
    <td width="208" height="46"> 
      <table width="208" border="0" cellspacing="0" cellpadding="0" height="100%">
        <tr> 
          <td width="198" height="44" bgcolor="f3f2f2" valign="top"> 
            <table width="198" border="0" cellspacing="0" cellpadding="0">
              <tr> 
                <td> 
                  <table width="100%" border="0" cellspacing="0" cellpadding="0" height="3" bgcolor="#CCCCCC">
                    <tr> 
                      <td bgcolor="#FFFFFF"></td>
                    </tr>
                  </table>
                  <table width="100%" border="0" cellspacing="1" cellpadding="0" height="5" bgcolor="#CCCCCC">
                    <tr> 
                      <td bgcolor="#FFFFFF"></td>
                    </tr>
                  </table>
                </td>
              </tr>
              <tr> 
                <td background="images/lin-bg.gif" height="33">
                  <div align="center"><font face="Verdana, Arial, Helvetica, sans-serif"><b><font color="#FFFFFF">Productions 
                    Class</font></b></font></div>
                </td>
              </tr>
              <tr> 
                <td height="215"> 
                  <table width="90%" border="0" cellspacing="0" cellpadding="0" align="center">
                    <tr> 
                      <td height="168" valign="top"> <table width="100%" height="36" border="0" cellpadding="0" cellspacing="0">
                          <tr> 
                            <td height="10" colspan="2"></td>
                          </tr>
              <%
									'开始输出分类
									SourCode=trim(rs("c_code"))
									strcode=""
									for i=1 to Len(SourCode) \ 4
									strcode=strcode&" or c_code like '"&left(SourCode,i*4)&"____'"
									next
									if strcode<>"" then
									strcode="(1<>1"&strcode&" or Len(c_code)=4)"
									else
									strcode=" Len(c_code)=4"
									end if
									strSQL="Select * From web_product_class Where mn_id=" & strCurrMenu&" and " & strcode & "  Order by c_code"
									'response.Write(strsql)
									Set rsclass=Server.CreateObject("ADODB.RecordSet")
									rsclass.open strSQL,conn,1,1
									for i=1 to rsclass.recordcount
									Level=(Len(rsclass("c_code"))/4-1)*3
									%>
                          <tr> 
                            <td width="46" height="26" align="right" > 
                              <li></td>
                            <td width="148" > 
                              <%
			If Len(rsclass("c_code"))>4 Then Response.Write "├"
			Response.Write String(Level,"-")
			%>
                              <a href="<%=request.QueryString("uppage")%>?class=<%=rsclass("id")%>&classname=<%=trim(rsclass("c_name"))%>"><%=trim(rsclass("c_name"))%></a></td>
                          </tr>
                          <%
									rsClass.movenext
								next
								%>
                        </table></td>
                    </tr>
                    <tr>
                      <td height="20"> 
                        <div align="center"> </div>
                      </td>
                    </tr>
                  </table>
                </td>
              </tr>
            </table>
            <table width="198" border="0" cellspacing="0" cellpadding="0">
              <tr> 
                <td> <table width="100%" border="0" cellspacing="0" cellpadding="0" height="3" bgcolor="#CCCCCC">
                    <tr> 
                      <td bgcolor="#FFFFFF"></td>
                    </tr>
                  </table>
                  <table width="100%" border="0" cellspacing="1" cellpadding="0" height="5" bgcolor="#CCCCCC">
                    <tr> 
                      <td bgcolor="#FFFFFF"></td>
                    </tr>
                  </table></td>
              </tr>
              <tr> 
                <td background="images/lin-bg.gif" height="33"> <div align="center"><font face="Verdana, Arial, Helvetica, sans-serif"><b><font color="#FFFFFF">Productions 
                    Search</font></b></font></div></td>
              </tr>
              <tr> 
                <td height="215"> <table width="90%" border="0" cellspacing="0" cellpadding="0" align="center">
                    <tr> 
                      <td height="168" valign="top"><form name="form1" method="post" action="<%=request.QueryString("uppage")%>" onSubmit="return checkform(this)">
                          <table width="175" border="0" align="center" cellpadding="0" cellspacing="0">
                            <tr> 
                              <td width="58" height="8" align="right"></td>
                              <td width="117" height="8"></td>
                            </tr>
                            <tr> 
                              <td width="58" height="26" align="right">Class:</td>
                              <td width="117" height="26"> <select name="class" id="class" style="width:80px">
                                  <option value="">Show all prducts</option>
                                  <%Sql="select id,c_name,c_code from web_product_class where mn_id="&strCurrMenu&" order by c_code"
        set rsclass=conn.execute(sql)
        Do While Not rsclass.eof
			Level=(Len(rsclass(2))/4-1)*3
			Response.Write "<option value="""&rsclass(0)&""""
			Response.Write ">"
			If Len(rsclass(2))>4 Then Response.Write "├"
			Response.Write String(Level,"-")
			Response.Write rsclass(1)&"</option>"
			rsclass.movenext
		Loop
		rsclass.close%>
                                </select> </td>
                            </tr>
                            <tr> 
                              <td height="26" align="right">Key Word:</td>
                              <td height="26"> <input name="key" type="text" id="key" size="15" maxlength="50" style="width:80px"> 
                              </td>
                            </tr>
                            <% if showPrice<>"none" then %>
                            <tr> 
                              <td height="26" align="right">Price:</td>
                              <td height="26"> 
                                <input name="price1" type="text" id="price1" size="2" maxlength="5" style="width:30px">
                                To 
                                <input name="price2" type="text" id="price2" size="2" style="width:30px"> 
                              </td>
                            </tr>
                            <%end if%>
                            <tr align="left"> 
                              <td height="30" colspan="2"> <table width="173" height="40" border="0" align="center" cellpadding="0" cellspacing="0">
                                  <tr> 
                                    <td width="173" height="40" align="center"> 
                                      <input type="submit" name="Submit" value=" Search "><input type="reset" name="Submit2" value=" Reset "></td>
                                  </tr>
                                </table></td>
                            </tr>
                          </table>
                        </form> </td>
                    </tr>
                    <tr> 
                      <td height="20"> <div align="center"> </div></td>
                    </tr>
                  </table></td>
              </tr>
            </table>
            <!--Link Begin-->
            <%
							isLink=GetKey("Enable",WebUserID,"link")
							if isLink="Yes" then
							%>
            <table width="198" border="0" cellspacing="0" cellpadding="0">
              <tr> 
                <td> 
                  <table width="100%" border="0" cellspacing="0" cellpadding="0" height="3" bgcolor="#CCCCCC">
                    <tr> 
                      <td bgcolor="#FFFFFF"></td>
                    </tr>
                  </table>
                  <table width="100%" border="0" cellspacing="1" cellpadding="0" height="5" bgcolor="#CCCCCC">
                    <tr> 
                      <td bgcolor="#FFFFFF"></td>
                    </tr>
                  </table>
                </td>
              </tr>
              <tr> 
                <td background="images/lin-bg.gif" height="33"> 
                  <div align="center"><font face="Verdana, Arial, Helvetica, sans-serif"><b><font color="#FFFFFF">links</font></b></font></div>
                </td>
              </tr>
              <tr> 
                <td height="215"> 
                  <table width="90%" border="0" cellspacing="0" cellpadding="0" align="center">
                    <tr> 
                      <td height="169" align="center"><script language="JavaScript" src="admin/link/link.asp"></script></td>
                    </tr>
                    <tr> 
                      <td height="20"> 
                        <div align="center"> </div>
                      </td>
                    </tr>
                  </table>
                </td>
              </tr>
            </table>
            <%
							  end if
							  %>
            <!--Link End-->
          </td>
          <td width="9" height="44">&nbsp;</td>
        </tr>
      </table>
    </td>
    <td height="46" width="572" valign="top"> 
      <table width="96%" border="0" cellspacing="0" cellpadding="0" align="center">
        <tr> 
          <td height="21"> 
            <table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr> 
                <td background="images/lin-bg.gif" height="33" width="1%"><img src="images/left.gif" width="9" height="33"></td>
                <td background="images/lin-bg.gif" height="33" width="4%"><font color="#000000" face="Verdana, Arial, Helvetica, sans-serif"><b><font color="#FFFFFF"><img src="images/ys-j2g.gif" width="14" height="14"></font></b></font></td>
                <td background="images/lin-bg.gif" height="33" width="91%"><font color="#000000" face="Verdana, Arial, Helvetica, sans-serif"><b><font color="#FFFFFF"><%=request("classname")%></font></b></font></td>
                <td background="images/lin-bg.gif" height="33" width="4%"> 
                  <div align="right"><img src="images/right.gif" width="10" height="33"></div>
                </td>
              </tr>
            </table>
          </td>
        </tr>
        <tr> 
          <td height="18">&nbsp;</td>
        </tr>
        <tr> 
          <td> 
            <%
									'读取产品展示的属性，以确定显示那个字段
									showPrice=GetKey("Price",WebUserID,"product_" & strCurrMenu )
									showSize=GetKey("Size",WebUserID,"product_" & strCurrMenu )
									showSymbol=GetKey("Symbol",WebUserID,"product_" & strCurrMenu )
									showWeight=GetKey("Weight",WebUserID,"product_" & strCurrMenu )
									showFace=GetKey("Face",WebUserID,"product_" & strCurrMenu )
									showPlace=GetKey("Place",WebUserID,"product_" & strCurrMenu )
									showProducer=GetKey("Place",WebUserID,"product_" & strCurrMenu )
									showShop=GetKey("showShop",WebUserID,"product_" & strCurrMenu )
									%>
                     <!--Product Begin-->
            <table width="100%" border="0" cellspacing="1" cellpadding="0">
              <tr> 
                <td width="64%" valign="top"><table width="88%" height="100%" border="0" align="center" cellpadding="0" cellspacing="1">
                    <tr align="center"> 
                      <td height="56" colspan="2"><a href="UpFile/<%=trim(rs("p_pic"))%>" target="_blank"><img src="UpFile/<%=trim(rs("p_pic"))%>" alt="点击看大图" width="280" hspace="8" vspace="5" border="0"></a></td>
                    </tr>
                    <tr align="center"> 
                      <td height="31" colspan="2"><strong><font color="#006699" style="font-size:14px"><%=trim(rs("p_name"))%></font></strong></td>
                    </tr>
                    <tr> 
                      <td height="24" align="right"><strong>Classification:</strong></td>
                      <td height="24"> 
                        <%
							  if showSymbol<>"none" then
							  	response.Write trim(rs("p_symbol"))
							  end if
							  %>
                      </td>
                    </tr>
                    <tr> 
                      <td height="24" align="right"><font color="#FF0000">&nbsp;</font><strong>Type:</strong></td>
                      <td height="24"><%=trim(rs("c_name"))%></td>
                    </tr>
                    <%if showPrice<> "none" then%>
                    <tr> 
                      <td width="25%" height="24" align="right"><font color="#FF0000"><strong>Price: 
                        </strong></font></td>
                      <td width="75%" height="24"><font color="#FF0000">$<%=trim(rs("p_price"))%><strong> 
                        <%if showShop<>"none" then %>
                        <a href="javascript:;" onClick="PutWare('<%=trim(rs("id"))%>')"><img src="images/buyprotect2.gif" width="88" height="12" hspace="10" border="0"></a> 
                        <%end if%>
                        </strong></font></td>
                    </tr>
                    <%end if%>
                    <%if showSize<> "none" then%>
                    <tr> 
                      <td height="24" align="right"><strong>Size: </strong></td>
                      <td height="24"><%=trim(rs("p_size"))%></td>
                    </tr>
                    <%end if%>
                    <%if showFace<> "none" And showFace<>"Null" then%>
                    <tr> 
                      <td height="24" align="right"><strong>Appearance:</strong> 
                      </td>
                      <td height="24"><%=trim(rs("p_face"))%></td>
                    </tr>
                    <%end if%>
                    <%if showWeight<> "none" And  showWeight<>"Null" then%>
                    <tr> 
                      <td height="24" align="right"><strong>weight:</strong></td>
                      <td height="24"><%=trim(rs("p_weight"))%></td>
                    </tr>
                    <%end if%>
                    <%if showPlace<> "none" And showPlace<>"Null" then%>
                    <tr> 
                      <td height="24" align="right"><strong>yieldly:</strong></td>
                      <td height="24"><%=trim(rs("p_weight"))%></td>
                    </tr>
                    <%end if%>
                    <%if showProducer<> "none" then%>
                    <tr> 
                      <td height="24" align="right"><strong>producer:</strong></td>
                      <td height="24"><%=trim(rs("p_producer"))%></td>
                    </tr>
                    <%end if%>
                  </table></td>
              </tr>
              <tr> 
                <td>&nbsp;</td>
              </tr>
              <tr> 
                <td><hr width="98%" size="1" noshade></td>
              </tr>
              <tr valign="top"> 
                <td height="100" align="center"> <table width="96%" border="0" cellspacing="1" cellpadding="0">
                    <tr> 
                      <td height="96" valign="top"><%=trim(rs("p_detail"))%></td>
                    </tr>
                    <tr> 
                      <td height="16" align="right"><font color="#888888">UpDate 
                        Time：<%=trim(rs("p_createtime"))%></font></td>
                    </tr>
                  </table></td>
              </tr>
            </table>
            <!--Product End-->
            <br>
          </td>
        </tr>
        <tr>
          <td>&nbsp;</td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0" height="3" bgcolor="#CCCCCC">
  <tr> 
    <td bgcolor="#FFFFFF"></td>
  </tr>
</table>
<table width="780" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr> 
    <td height="54" align="center" background="images/foot-bg.gif"> <font color="#FFFFFF">未设置<br></font><br>
      <script language="JavaScript" src="admin/count/counter.asp"></script></td>
  </tr>
</table>
<script language="JavaScript" src="common/init.js"></script>
</body>
</html>

