List_Add.asp
上传用户:xxtaishan
上传日期:2022-01-02
资源大小:4063k
文件大小:4k
源码类别:

IP电话/视频会议

开发平台:

ASP/ASPX

  1. <!--#include file="../../inc/conn.asp"-->
  2. <%
  3. dim rs,sql
  4. sql="select * from nclass"
  5. set rs=conn.execute(sql)
  6. %>
  7. <script language = "JavaScript">
  8. var onecount;
  9. onecount=0;
  10. subcat = new Array();
  11. <%
  12. dim count
  13. count=0
  14. do while not rs.eof 
  15. %>
  16. subcat[<%=count%>] = new Array("<%= trim(rs("nclassname"))%>","<%= trim(rs("classid"))%>","<%= trim(rs("id"))%>");
  17. <%
  18. count = count + 1
  19. rs.movenext
  20. loop
  21. rs.close
  22. %>
  23. onecount=<%=count%>;
  24. function changelocation(locationid)
  25.     {
  26.     document.form1.nclassid.length = 0; 
  27.     var locationid=locationid;
  28.     var i;
  29.     for (i=0;i < onecount; i++)
  30.         {
  31.             if (subcat[i][1] == locationid)
  32.             { 
  33.                 document.form1.nclassid.options[document.form1.nclassid.length] = new Option(subcat[i][0], subcat[i][2]);
  34.             }        
  35.         }
  36.         
  37.     } 
  38. </script>
  39. <LINK REL="stylesheet" HREF="../images/style.css" TYPE="text/css"> <META content="text/html;charset=gb2312" http-equiv="Content-Type">
  40. <style type="text/css">
  41. <!--
  42. .style1 {
  43. color: #FFFFFF;
  44. font-weight: bold;
  45. }
  46. -->
  47. </style>
  48. <form name="form1" method="post" action="List_Save.asp" enctype="multipart/form-data">
  49.   <table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" bordercolorlight="#000000" bordercolordark="#ffffff" bgcolor="#660000">
  50.     <tr bgcolor="#23458B"> 
  51.       <td height="25" colspan="2"> 
  52.       <div align="center" class="style1">信息添加</div>      </td>
  53.     </tr>
  54.     <tr> 
  55.       <TD WIDTH="21%" height="12" bgcolor="#FFFFFF"> 
  56.       <div align="right"><FONT COLOR="#FF0000"> * </FONT>产品货号:</div></TD>
  57.       <td width="79%" height="12" bgcolor="#FFFFFF"> 
  58.       <input type="text" name="hh" size="40">      </td>
  59.     </tr>
  60.     <tr> 
  61.       <TD WIDTH="21%" height="12" bgcolor="#FFFFFF"> 
  62.       <div align="right"><FONT COLOR="#FF0000"> * </FONT>产品名称:</div></TD>
  63.       <td width="79%" height="12" bgcolor="#FFFFFF"> 
  64.       <input type="text" name="title" size="50">      </td>
  65.     </tr>
  66.     <tr>
  67.       <TD height="13" bgcolor="#FFFFFF"><div align="right"><FONT COLOR="#FF0000">* </FONT>产品类别:</div></TD>
  68.       <td width="79%" height="13" bgcolor="#FFFFFF"><%
  69.     sql="select * from class"
  70.     set rs=conn.execute(sql)
  71.     if not rs.eof then
  72.     %>一类:
  73.         <select name="classid" onChange="changelocation(document.form1.classid.options[document.form1.classid.selectedIndex].value)">
  74.           <option selected value="<%=trim(rs("id"))%>"><%=trim(rs("classname"))%></option>
  75.           <%
  76. dim selclass
  77.     selclass=rs("id")
  78.     rs.movenext
  79.     %>
  80.           <%do while not rs.eof%>
  81.           <option value="<%=rs("id")%>"><%=rs("classname")%></option>
  82.           <%rs.movenext
  83.         loop
  84. rs.close
  85.         %>
  86.         </select>
  87.         二类:
  88.         <select name="nclassid">
  89.           <%
  90.     sql="select * from nclass where classid="&selclass&" "
  91.     set rs=conn.execute(sql)
  92.       if not(rs.eof and rs.bof) then
  93.     do while not rs.eof%>
  94.           <option value="<%=rs("id")%>"><%=rs("nclassname")%></option>
  95.           <% rs.movenext
  96.     loop
  97.      end if
  98.         rs.close
  99.      %>
  100.         </select>
  101.         <%else%>
  102.         添加类别
  103.       <%end if%>&nbsp;</td>
  104.     </tr>
  105.     <tr> 
  106.       <TD WIDTH="21%" height="25" bgcolor="#FFFFFF"> 
  107.       <div align="right"><FONT COLOR="#FF0000">*</FONT> 产品信息:</div></TD>
  108.       <td width="79%" height="25" bgcolor="#FFFFFF"><IFRAME ID="eWebEditor1" SRC="../eWebEditor/ewebeditor.asp?id=content&style=s_light" FRAMEBORDER="0" SCROLLING="no" WIDTH="630" HEIGHT="420"> 
  109.         </IFRAME>
  110.       <input name="content" type="hidden" id="content"></td>
  111.     </tr>
  112.     <tr> 
  113.       <TD WIDTH="21%" height="12" bgcolor="#FFFFFF">
  114.       <div align="right"><FONT COLOR="#FF0000">*</FONT> 产品图片(大):</div></TD>
  115.       <td width="79%" height="12" bgcolor="#FFFFFF">
  116.       <input type="file" name="file" size="35">      </td>
  117.     </tr>
  118.     <tr> 
  119.       <td height="25" colspan="2" bgcolor="#FFFFFF"> 
  120.         <div align="center"> 
  121.           <input type="submit" name="Submit" value="添加">
  122.           <input type="button" value="取消" onClick="history.go(-1)">
  123.           <input type="hidden" name="operation" value="add">
  124.       </div>      </td>
  125.     </tr>
  126.   </table>
  127.   <table width="75%" border="0" cellspacing="0" cellpadding="0" align="center" height="34"> 
  128. <tr> <td> <div align="center">说明:<font color="#FF0000">*</font> 为必须填写的内容</div></td></tr> 
  129. </table></form>