OrderEdit.asp
上传用户:dbstep
上传日期:2022-08-06
资源大小:2803k
文件大小:8k
源码类别:

WEB源码(ASP,PHP,...)

开发平台:

ASP/ASPX

  1. <HTML>
  2. <HEAD>
  3. <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8" />
  4. <TITLE>查看、修改、回复订单</TITLE>
  5. <link rel="stylesheet" href="Images/CssAdmin.css">
  6. <script language="javascript" src="../skweb/JS/Admin.js"></script>
  7. </HEAD>
  8. <!--#include file="../skweb/Const.asp" -->
  9. <!--#include file="../skweb/ConnSiteData.asp" -->
  10. <!--#include file="CheckAdmin.asp"-->
  11. <%
  12. if Instr(session("AdminPurview"),"|81,")=0 then 
  13.   response.write ("<script language=javascript> alert('你不具有该管理模块的操作权限,请返回!');history.back(-1);</script>")
  14. end if
  15. %>
  16. <%
  17. if Instr(session("AdminPurview"),"|94,")=0 then 
  18.   response.write ("<font color='red')>你不具有该管理模块的操作权限,请返回!</font>")
  19.   response.end
  20. end if
  21. '========判断是否具有管理权限
  22. %>
  23. <BODY>
  24. <% 
  25. dim Result
  26. Result=request.QueryString("Result")
  27. dim ReplyContent,ReplyTime,ID,ProductName,ProductNo,Amount,Remark,start_date
  28. dim Linkman,Company,Address,ZipCode,Telephone,Fax,Mobile,Email,AddTime
  29. ID=request.QueryString("ID")
  30. call OrderEdit() 
  31. %>
  32. <table width="100%" border="0" cellpadding="3"  >
  33.   <form name="editForm" method="post" action="OrderEdit.asp?Action=SaveEdit&Result=<%=Result%>&ID=<%=ID%>">
  34.   <tr>
  35.     <td height="24" nowrap bgcolor="#EBF2F9"><table width="100%" border="0" cellpadding="5" cellspacing="1" bgcolor="#CCCCCC" id=editProduct idth="100%">
  36.    <tr>
  37.         <td height="29" colspan="2" background="Images/menutitle.gif" bgcolor="#FFFFFF"><table width="470" border="0" cellspacing="0" cellpadding="0">
  38.           <tr>
  39.             <td width="121"><strong><font color="#000000" size="2">产品管理</font></strong></td>
  40.             <td width="87"><a href="ProductEdit.asp?Result=Add"><img src="Images/x1.gif" width="52" height="17" border="0"></a></td>
  41.             <td width="87"><a href="ProductList.asp"><img src="Images/xlm.gif" width="52" height="17" border="0"></a></td>
  42.             <td width="87"><a href="ProductSort.asp"><img src="Images/xx.gif" width="52" height="17" border="0"></a></td>
  43.             <td width="88"><a href="OrderList.asp"><img src="Images/xdd.gif" width="52" height="17" border="0"></a></td>
  44.           </tr>
  45.         </table></td>
  46.       </tr>
  47.       <tr>
  48.         <td height="20" align="right" bgcolor="#FFFFFF">产品名称:</td>
  49.         <td bgcolor="#FFFFFF"><input name="ProductName" type="text" class="textfield" id="ProductName" style="WIDTH: 240;" value="<%=ProductName%>" readonly></td>
  50.       </tr>
  51.       <tr>
  52.         <td height="20" align="right" bgcolor="#FFFFFF">预定时间:</td>
  53.         <td bgcolor="#FFFFFF"><input name="start_date" type="text" class="textfield" id="ProductNo" style="WIDTH: 240;" value="<%=start_date%>" readonly></td>
  54.       </tr>
  55.       <tr>
  56.         <td height="20" align="right" bgcolor="#FFFFFF">产品编号:</td>
  57.         <td bgcolor="#FFFFFF"><input name="ProductNo" type="text" class="textfield" id="ProductNo" style="WIDTH: 240;" value="<%=ProductNo%>" readonly></td>
  58.       </tr>
  59.       <tr>
  60.         <td height="20" align="right" bgcolor="#FFFFFF">订购数量:</td>
  61.         <td bgcolor="#FFFFFF"><input name="Amount" type="text" class="textfield" id="Amount" style="WIDTH: 120;" value="<%=Amount%>" readonly></td>
  62.       </tr>
  63.       <tr>
  64.         <td height="20" align="right" valign="top" bgcolor="#FFFFFF">补充说明:
  65.         <td bgcolor="#FFFFFF"><textarea name="Remark" rows="6" class="textfield" id="Remark" style="WIDTH: 76%;" readonly><%=Remark%></textarea></td>
  66.       </tr>
  67.       <tr>
  68.         <td height="20" align="right" bgcolor="#FFFFFF">订&nbsp;购&nbsp;者:</td>
  69.         <td bgcolor="#FFFFFF"><%=Linkman%></td>
  70.       </tr>
  71.       <tr>
  72.         <td height="20" align="right" bgcolor="#FFFFFF">单位名称:</td>
  73.         <td bgcolor="#FFFFFF"><input name="Company" type="text" class="textfield" id="Company" style="WIDTH: 240;" value="<%=Company%>" readonly></td>
  74.       </tr>
  75.       <tr>
  76.         <td height="20" align="right" bgcolor="#FFFFFF">通信地址:</td>
  77.         <td bgcolor="#FFFFFF"><input name="Address" type="text" class="textfield" id="Address" style="WIDTH: 240;" value="<%=Address%>" readonly></td>
  78.       </tr>
  79.       <tr>
  80.         <td height="20" align="right" bgcolor="#FFFFFF">邮  编:</td>
  81.         <td bgcolor="#FFFFFF"><input name="ZipCode" type="text" class="textfield" id="ZipCode" style="WIDTH: 120" value="<%=ZipCode%>" readonly></td>
  82.       </tr>
  83.       <tr>
  84.         <td height="20" align="right" bgcolor="#FFFFFF">电  话:</td>
  85.         <td bgcolor="#FFFFFF"><input name="Telephone" type="text" class="textfield" id="Telephone" style="WIDTH: 240;" value="<%=Telephone%>" readonly></td>
  86.       </tr>
  87.       <tr>
  88.         <td height="20" align="right" bgcolor="#FFFFFF">传  真:</td>
  89.         <td bgcolor="#FFFFFF"><input name="Fax" type="text" class="textfield" id="Fax" style="WIDTH: 120" value="<%=Fax%>" readonly></td>
  90.       </tr>
  91.       <tr>
  92.         <td height="20" align="right" bgcolor="#FFFFFF">移动电话:</td>
  93.         <td bgcolor="#FFFFFF"><input name="Mobile" type="text" class="textfield" id="Mobile" style="WIDTH: 120" value="<%=Mobile%>" readonly></td>
  94.       </tr>
  95.       <tr>
  96.         <td height="20" align="right" bgcolor="#FFFFFF">电子邮箱:</td>
  97.         <td bgcolor="#FFFFFF"><input name="Email" type="text" class="textfield" id="Email" style="WIDTH: 240" value="<%=Email%>" readonly></td>
  98.       </tr>
  99.       <tr>
  100.         <td height="20" align="right" bgcolor="#FFFFFF">订购时间:</td>
  101.         <td bgcolor="#FFFFFF"><input name="AddTime" type="text" class="textfield" id="AddTime" style="WIDTH: 240" value="<%=AddTime%>" readonly></td>
  102.       </tr>
  103.       <tr>
  104.         <td height="20" align="right" bgcolor="#FFFFFF">回复时间:</td>
  105.         <td bgcolor="#FFFFFF"><input name="ReplyTime" type="text" class="textfield" id="ReplyTime" style="WIDTH: 240" value="<%=ReplyTime%>" readonly></td>
  106.       </tr>
  107.       <tr>
  108.         <td height="20" align="right" valign="top" bgcolor="#FFFFFF">回复内容:</td>
  109.         <td bgcolor="#FFFFFF"><textarea name="ReplyContent" rows="6" class="textfield" id="ReplyContent" style="WIDTH: 76%;"><%=ReplyContent%></textarea></td>
  110.       </tr>
  111.       <tr>
  112.         <td height="30" align="right" bgcolor="#FFFFFF">&nbsp;</td>
  113.         <td valign="bottom" bgcolor="#FFFFFF"><input name="submitSaveEdit" type="submit" class="button"  id="submitSaveEdit" value="保存" style="WIDTH: 80;" ></td>
  114.       </tr>
  115.     </table></td>
  116.   </tr>
  117.   </form>
  118. </table>
  119. </BODY>
  120. </HTML>
  121. <%
  122. sub OrderEdit()
  123.   dim Action,rsCheckAdd,rs,sql
  124.   Action=request.QueryString("Action")
  125.   if Action="SaveEdit" then '保存编辑管理员信息
  126.     set rs = server.createobject("adodb.recordset")
  127. if Result="Modify" then '修改网站管理员
  128.       sql="select * from sk_Order where ID="&ID
  129.       rs.open sql,conn,1,3
  130.   rs("ReplyContent")=StrReplace(Request.Form("ReplyContent"))
  131.   if not (trim(request.Form("ReplyContent"))="" or trim(request.Form("ReplyTime"))<>"") then
  132.     rs("ReplyTime")=now()
  133.       end if
  134. end if
  135. rs.update
  136. rs.close
  137.     set rs=nothing 
  138.      Response.Redirect("Tips/dd.asp")
  139.   else '提取留言信息
  140. if Result="Modify" then
  141.       set rs = server.createobject("adodb.recordset")
  142.       sql="select * from sk_Order where ID="& ID
  143.       rs.open sql,conn,1,1
  144.   start_date=rs("start_date")
  145.   ProductName=rs("ProductName")
  146.   ProductNo=rs("ProductNo")
  147.   Amount=rs("Amount")
  148.   Remark=ReStrReplace(rs("Remark"))
  149.   Linkman=GuestInfo(rs("MemID"),rs("Linkman"),rs("Sex"))
  150.   Company=rs("Company")
  151.   Address=rs("Address")
  152.   ZipCode=rs("ZipCode")
  153.   Telephone=rs("Telephone")
  154.   Fax=rs("Fax")
  155.   Mobile=rs("Mobile")
  156.   Email=rs("Email")
  157.   AddTime=rs("AddTime")
  158.   ReplyContent=ReStrReplace(rs("ReplyContent"))
  159.   ReplyTime=rs("ReplyTime")
  160.   rs.close
  161.       set rs=nothing 
  162. end if
  163.   end if
  164. end sub
  165. function GuestInfo(ID,Guest,Sex)
  166.   Dim rs,sql
  167.   Set rs=server.CreateObject("adodb.recordset")
  168.   sql="Select * From sk_Members where ID="&ID
  169.   rs.open sql,conn,1,1
  170.   if rs.bof and rs.eof then
  171.     GuestInfo=Guest & "&nbsp;" & Sex
  172.   else
  173.     GuestInfo="<font color='green'>会员&nbsp;</font><a href='MemEdit.asp?Result=Modify&ID="&ID&"' onClick='changeAdminFlag(""前台会员资料"")'>"&Guest&"</a>"&Sex
  174.   end if
  175.   rs.close
  176.   set rs=nothing
  177. end function 
  178. %>