addhw1.jsp
上传用户:helenhuo66
上传日期:2007-06-01
资源大小:865k
文件大小:6k
源码类别:

百货/超市行业

开发平台:

Java

  1. <%
  2. if session("admin_name")="" then response.end
  3. dim count
  4. set rs=server.createobject("adodb.recordset")
  5. %>
  6. <!--#include file="conn.asp"--><head>
  7. <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
  8. <link href=../css.css rel=STYLESHEET type=text/css>
  9. </head>
  10. <table border="0" width="500" cellspacing="1" height="392" align="left">
  11.   <tr>
  12.     <td>
  13.       <div align="center"><b>所有选项都必须填写</b></div>
  14.     </td>
  15.   </tr><tr>
  16.     <td width="100%" height="395"> 
  17.       <form method="POST" action="addhw.asp?action=save">
  18.         <table border="0" width="100%" cellspacing="1">
  19.           <tr> 
  20.             <td width="27%"><font color="#FF0000">型号名称</font> 
  21.               <input type="text" name="hw_name" size="20" class=input>
  22.               <font color="#FF0000"> &nbsp;&nbsp;&nbsp;&nbsp; </font></td>
  23.             <td width="10%"><font color="#FF0000">商品类别 </font> </td>
  24.             <td width="63%"> 
  25.               <%
  26.         sql = "select * from sort"
  27.         rs.open sql,conn,1,1
  28. if rs.eof and rs.bof then
  29. response.write "请先添加栏目。"
  30. response.end
  31. else
  32. %>
  33. <%
  34. set rs=server.createobject("adodb.recordset")
  35. sql = "select * from  Nsort  order by Nsort_id asc"
  36. rs.open sql,conn,1,1
  37. %>
  38. <script language = "JavaScript">
  39. var onecount;
  40. onecount=0;
  41. subcat = new Array();
  42.         <%
  43.         count = 0
  44.         do while not rs.eof 
  45.         %>
  46. subcat[<%=count%>] = new Array("<%= trim(rs("Nsort_name"))%>","<%= trim(rs("sort_id"))%>","<%= trim(rs("Nsort_id"))%>");
  47.         <%
  48.         count = count + 1
  49.         rs.movenext
  50.         loop
  51.         rs.close
  52.         %>
  53. onecount=<%=count%>;
  54. function changelocation(locationid)
  55.     {
  56.     document.myform.Nsort_id.length = 0; 
  57.     var locationid=locationid;
  58.     var i;
  59.     for (i=0;i < onecount; i++)
  60.         {
  61.             if (subcat[i][1] == locationid)
  62.             { 
  63.                 document.myform.Nsort_id.options[document.myform.Nsort_id.length] = new Option(subcat[i][0], subcat[i][2]);
  64.             }        
  65.         }
  66.         
  67.     }    
  68. </script>
  69.               <select name="sort_id" onChange="changelocation(document.myform.sort_id.options[document.myform.sort_id.selectedIndex].value)" size="1">
  70.         <option selected value="<%=trim(rs("sort_id"))%>"><%=trim(rs("sort_name"))%></option>
  71. <%      dim selclass
  72.          selclass=rs("sort_id")
  73.         rs.movenext
  74.         do while not rs.eof
  75. %>
  76.         <option value="<%=trim(rs("sort_id"))%>"><%=trim(rs("sort_name"))%></option>
  77.        
  78. <%
  79.         rs.movenext
  80.         loop
  81. end if
  82.         rs.close
  83. %>
  84.        </select> 
  85.     
  86.     <select name="Nsort_id">                  
  87. <%sql="select * from Nsort where sort_id="&selclass
  88. rs.open sql,conn,1,1
  89. if not(rs.eof and rs.bof) then
  90. %>
  91.         <option selected value="<%=rs("Nsort_ID")%>"><%=rs("Nsort_name")%></option>
  92. <% rs.movenext
  93. do while not rs.eof%>
  94.         <option value="<%=rs("Nsort_ID")%>"><%=rs("Nsort_name")%></option>
  95. <% rs.movenext
  96. loop
  97. end if
  98.         rs.close
  99.         set rs = nothing
  100.         conn.Close
  101.         set conn = nothing
  102. %>
  103.     </select>**</td>
  104.           </tr>
  105.           <tr> 
  106.             <td colspan="3"><font color="#FF0000">市场价</font> 
  107.               <input type="text" name="pifa" size="7" class=input>
  108.               元 <font color="#FF0000">&nbsp;&nbsp;&nbsp;&nbsp;会员价</font> 
  109.               <input type="text" name="hw_cash" size="7" class=input>
  110.               元 <font color="#FF0000">&nbsp;&nbsp;&nbsp;&nbsp;VIP价</font> 
  111.               <input type="text" name="daili" size="7" class=input>
  112.               元 </td>
  113.           </tr>
  114.           <tr> 
  115.             <td height="5" colspan="3"> 
  116.               <hr noshade size="1">
  117.             </td>
  118.           </tr>
  119.           <tr> 
  120.             <td colspan="2"><font color="#CCCCCC">录入</font> 
  121.               <input type="text" name="hwsn" size="10" class=input value="不详">
  122.             </td>
  123.             <td width="63%"><font color="#CCCCCC">出品公司</font> 
  124.               <input type="text" name="chubsh" size="30" class=input value="不详">
  125.             </td>
  126.           </tr>
  127.           <tr> 
  128.             <td colspan="2"><font color="#CCCCCC">尺码</font> 
  129.               <input type="text" name="kaiben" size="10" class=input value="16">
  130.             </td>
  131.             <td width="63%"><font color="#CCCCCC">出品日期</font> 
  132.               <input type="text" name="data" size="24" class=input value="2002-10-10">
  133.               格式:2002-10-10</td>
  134.           </tr>
  135.           <tr> 
  136.             <td colspan="2"><font color="#CCCCCC">颜色</font> 
  137.               <input type="text" name="yeshu" size="10" class=input value="100">
  138.             </td>
  139.             <td width="63%"><font color="#CCCCCC">编号</font> 
  140.               <input type="text" name="isbn" size="30" class=input value="不详">
  141.             </td>
  142.           </tr>
  143.           <tr> 
  144.             <td height="5" colspan="3"> 
  145.               <hr noshade size="1">
  146.             </td>
  147.           </tr>
  148.           <tr> 
  149.             <td colspan="3"> <font color="#CCCCCC">包装类型</font> 
  150.               <input type="text" name="zhuang" size="30" class=input value="普通">
  151.             </td>
  152.           </tr>
  153.           <tr> 
  154.             <td colspan="3"> <font color="#FF0000">内容简介 </font></td>
  155.           </tr>
  156.           <tr> 
  157.             <td valign="top" colspan="3"> 
  158.               <textarea rows="3" name="hw_content" cols="50" class=input>暂时没有……</textarea>
  159.             </td>
  160.           </tr>
  161.           <tr> 
  162.             <td colspan="3"> <font color="#FF0000">商品图片</font> 
  163.               <input type="text" name="hw_pic" size="46" class=input value="http://wa169.com/book/pic/">
  164.               <a href="../up/index.asp" target="_blank"><font color="#FF0000">图形上传</font></a></td>
  165.           </tr>
  166.         </table>
  167.         <p><input type="submit" value="提交" name="B1" class=input><input type="reset" value="全部重写" name="B2" class=input></p>
  168.       </form>
  169.       
  170.     </td>
  171.   </tr>
  172. </table>