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

IP电话/视频会议

开发平台:

ASP/ASPX

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