addhw1.jsp
上传用户:szlmxq
上传日期:2014-01-31
资源大小:740k
文件大小:6k
源码类别:

Applet

开发平台:

Java

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