<!-- #include file="conn.asp" -->
<!-- #include file="cookies.asp" -->
<%
Dim rst
			set rst=server.createobject("adodb.recordset")
		    sqlt="select * from type order by xu"
			rst.open sqlt,conn,1,1

Dim rsts

			set rsts=server.createobject("adodb.recordset")
		    sqlts="select * from type_son ORDER BY xu"
			rsts.open sqlts,conn,1,1

Dim rsb
			set rsb=server.createobject("adodb.recordset")
		    sqlb="select * from brand ORDER BY xu"
			rsb.open sqlb,conn,1,1
%>
<html>
<head>
<title>增加报价--PCBaoJia.com</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<%
dim mm_jsmenu
dim i 
i = -1
mm_jsmenu = "<script language="&chr(34)&"javascript"&chr(34)&">"&chr(13)
mm_jsmenu = mm_jsmenu&"<!--"&chr(13)
mm_jsmenu = mm_jsmenu&"var subcat = new Array();"&chr(13)
do while not rsts.eof
i = i + 1
mm_jsmenu = mm_jsmenu&"subcat["&i&"] = new Array('"&(rsts.Fields.Item("type_id").Value)&"','"&(rsts.Fields.Item("type_son_name").Value)&"','"&(rsts.Fields.Item("type_son_id").Value)&"')"&chr(13)
rsts.movenext
loop
mm_jsmenu = mm_jsmenu&chr(13)&"function changeselect1(locationid)"&chr(13)
mm_jsmenu = mm_jsmenu&"{"&chr(13)
mm_jsmenu = mm_jsmenu&"document.myform.new_type_son_id.length = 0; "&chr(13)
mm_jsmenu = mm_jsmenu&"document.myform.new_type_son_id.options[0] = new Option('请选择','');"&chr(13) 
mm_jsmenu = mm_jsmenu&"for (i=0; i<subcat.length; i++) "&chr(13)
mm_jsmenu = mm_jsmenu&"{"&chr(13)
mm_jsmenu = mm_jsmenu&"if (subcat[i][0] == locationid) "&chr(13)
mm_jsmenu = mm_jsmenu&"{document.myform.new_type_son_id.options[document.myform.new_type_son_id.length] = new Option(subcat[i][1], subcat[i][2]);} "&chr(13) 
mm_jsmenu = mm_jsmenu&"}"&chr(13)
mm_jsmenu = mm_jsmenu&"}"&chr(13)
response.Write mm_jsmenu

dim mm_jsmenu2
dim j 
j = -1
mm_jsmenu2 = mm_jsmenu2&"var subbrand = new Array();"&chr(13)
do while not rsb.eof
j = j + 1
mm_jsmenu2 = mm_jsmenu2&"subbrand["&j&"] = new Array('"&(rsb.Fields.Item("type_son_id").Value)&"','"&(rsb.Fields.Item("brand_name").Value)&"','"&(rsb.Fields.Item("brand_id").Value)&"')"&chr(13)
rsb.movenext
loop
mm_jsmenu2 = mm_jsmenu2&chr(13)&"function changeselect2(locationid)"&chr(13)
mm_jsmenu2 = mm_jsmenu2&"{"&chr(13)
mm_jsmenu2 = mm_jsmenu2&"document.myform.new_brand_id.length = 0; "&chr(13)
mm_jsmenu2 = mm_jsmenu2&"document.myform.new_brand_id.options[0] = new Option('请选择类型','');"&chr(13) 
mm_jsmenu2 = mm_jsmenu2&"for (j=0; j<subbrand.length; j++) "&chr(13)
mm_jsmenu2 = mm_jsmenu2&"{"&chr(13)
mm_jsmenu2 = mm_jsmenu2&"if (subbrand[j][0] == locationid) "&chr(13)
mm_jsmenu2 = mm_jsmenu2&"{document.myform.new_brand_id.options[document.myform.new_brand_id.length] = new Option(subbrand[j][1], subbrand[j][2]);} "&chr(13) 
mm_jsmenu2 = mm_jsmenu2&"}"&chr(13)
mm_jsmenu2 = mm_jsmenu2&"}"&chr(13)
mm_jsmenu2 = mm_jsmenu2&"//-->"&chr(13)&"</script>"&chr(13)
response.Write mm_jsmenu2
%>
<body bgcolor="#FFFFFF" text="#000000" background="blue.gif">
<form name="myform" method="post" action="pro_add_save.asp">
<div align="center">
  <p>&nbsp;</p>
    <table width="96%" height="10" border="0" cellpadding="10" cellspacing="1" bgcolor="#000066">
      <tr align="center" bgcolor="#FFCC33">
  <td colspan="2">增加报价</td>
  </tr><tr bgcolor="#FDFEF5">
      <td align="right">名称：</td>
      <td> 
          <input type="text" name="pro_name" size="50"></td>
    </tr>
      <tr bgcolor="#FDFEF5"> 
      <td align="right">分类：</td>
        <td>
			<select name="new_type_id" style="font-family: 宋体; font-size: 9pt" onChange="changeselect1(this.value)">
	  <option value="" selected >请选择</option>
          <%
While (NOT rst.EOF)
%>
          <option value="<%=(rst.Fields.Item("type_id").Value)%>"><%=(rst.Fields.Item("type_name").Value)%></option>
          <%
  rst.MoveNext()
Wend
If (rst.CursorType > 0) Then
  rst.MoveFirst
Else
  rst.Requery
End If
%>
        </select> 
        <select name="new_type_son_id" class="px12" id="new_type_son_id" onChange="changeselect2(this.value)">
		<option selected>请选择</option>
        </select> 
		<select name="new_brand_id" class="px12" id="new_brand_id">
		<option selected>请选择</option>
        </select>
        </td>
      </tr>
      <tr bgcolor="#FDFEF5"> 
      <td align="right">官方资料地址：</td>
      <td>
        <input name="pro_url" type="text" size="50">
      </td>
    </tr>
<tr bgcolor="#FDFEF5">
        <td align="right" bgcolor="#FDFEF5">搜索关键字：</td>
        <td>
		  <input name="keyword" type="text" value="" size="50">
        </td>
      </tr>
<tr align="center" bgcolor="#FDFEF5">
  <td colspan="2"><input type="submit" name="yes" value="确定">
    <input type="submit" name="no" value="重写"></td>
  </tr>

  </table>
  </div>
</form>
</body>
</html>
<%
rst.Close()
Set rst = Nothing
rsts.Close()
Set rsts = Nothing
rsb.Close()
Set rsb = Nothing
%>