MessageEdit.asp
上传用户:dbstep
上传日期:2022-08-06
资源大小:2803k
文件大小:8k
源码类别:
WEB源码(ASP,PHP,...)
开发平台:
ASP/ASPX
- <HTML>
- <HEAD>
- <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8" />
- <TITLE>审核、修改、回复留言</TITLE>
- <link rel="stylesheet" href="Images/CssAdmin.css">
- <script language="javascript" src="../skweb/JS/Admin.js"></script>
- </HEAD>
- <!--#include file="../skweb/Const.asp" -->
- <!--#include file="../skweb/ConnSiteData.asp" -->
- <!--#include file="CheckAdmin.asp"-->
- <%
- if Instr(session("AdminPurview"),"|92,")=0 then
- response.write ("<font color='red')>你不具有该管理模块的操作权限,请返回!</font>")
- response.end
- end if
- '========判断是否具有管理权限
- %>
- <BODY>
- <%
- dim Result
- Result=request.QueryString("Result")
- dim ReplyContent,ReplyTime,ID,MesName,Content,ViewFlag,SecretFlag
- dim Linkman,Company,Address,ZipCode,Telephone,Fax,Mobile,Email,AddTime
- ID=request.QueryString("ID")
- call MesEdit()
- %>
- <table width="100%" border="0" cellpadding="5" cellspacing="1" bgcolor="#CCCCCC">
- <tr>
- <td height="29" nowrap background="Images/menutitle.gif"><font color="#FFFFFF"> </font><STRONG>留言信息:审核,修改,回复留言信息相关的内容</STRONG></td>
- </tr>
- <tr>
- <td height="24" align="center" nowrap bgcolor="#EBF2F9"><a href="MessageList.asp" onClick='changeAdminFlag("留言信息列表")'>查看留言信息</a> </td>
- </tr>
- </table>
- <br>
- <table width="100%" border="0" cellpadding="3" >
- <form name="editForm" method="post" action="MessageEdit.asp?Action=SaveEdit&Result=<%=Result%>&ID=<%=ID%>">
- <tr>
- <td height="24" nowrap bgcolor="#EBF2F9"><table width="100%" border="0" cellpadding="5" cellspacing="1" bgcolor="#CCCCCC" id=editProduct idth="100%">
- <tr>
- <td height="29" colspan="2" background="Images/menutitle.gif" bgcolor="#FFFFFF"><strong><font color="#000000" size="2">留言内容</font></strong></td>
- </tr>
- <tr>
- <td height="20" align="right" bgcolor="#FFFFFF">留言主题:</td>
- <td bgcolor="#FFFFFF"><input name="MesName" type="text" class="textfield" id="MesName" style="WIDTH: 240;" value="<%=MesName%>"> *</td>
- </tr>
- <tr>
- <td height="20" align="right" valign="top" bgcolor="#FFFFFF">留言内容:
- <td bgcolor="#FFFFFF"><textarea name="Content" rows="6" class="textfield" id="Content" style="WIDTH: 76%;"><%=Content%></textarea> *</td>
- </tr>
- <tr>
- <td height="20" align="right" bgcolor="#FFFFFF">留 言 者:</td>
- <td bgcolor="#FFFFFF"><%=Linkman%></td>
- </tr>
- <tr>
- <td height="20" align="right" bgcolor="#FFFFFF">单位名称:</td>
- <td bgcolor="#FFFFFF"><input name="Company" type="text" class="textfield" id="Company" style="WIDTH: 240;" value="<%=Company%>" readonly></td>
- </tr>
- <tr>
- <td height="20" align="right" bgcolor="#FFFFFF">通信地址:</td>
- <td bgcolor="#FFFFFF"><input name="Address" type="text" class="textfield" id="Address" style="WIDTH: 240;" value="<%=Address%>" readonly></td>
- </tr>
- <tr>
- <td height="20" align="right" bgcolor="#FFFFFF">邮 编:</td>
- <td bgcolor="#FFFFFF"><input name="ZipCode" type="text" class="textfield" id="ZipCode" style="WIDTH: 120" value="<%=ZipCode%>" readonly></td>
- </tr>
- <tr>
- <td height="20" align="right" bgcolor="#FFFFFF">电 话:</td>
- <td bgcolor="#FFFFFF"><input name="Telephone" type="text" class="textfield" id="Telephone" style="WIDTH: 240;" value="<%=Telephone%>" readonly></td>
- </tr>
- <tr>
- <td height="20" align="right" bgcolor="#FFFFFF">传 真:</td>
- <td bgcolor="#FFFFFF"><input name="Fax" type="text" class="textfield" id="Fax" style="WIDTH: 120" value="<%=Fax%>" readonly></td>
- </tr>
- <tr>
- <td height="20" align="right" bgcolor="#FFFFFF">移动电话:</td>
- <td bgcolor="#FFFFFF"><input name="Mobile" type="text" class="textfield" id="Mobile" style="WIDTH: 120" value="<%=Mobile%>" readonly></td>
- </tr>
- <tr>
- <td height="20" align="right" bgcolor="#FFFFFF">电子邮箱:</td>
- <td bgcolor="#FFFFFF"><input name="Email" type="text" class="textfield" id="Email" style="WIDTH: 240" value="<%=Email%>" readonly></td>
- </tr>
- <tr>
- <td height="20" align="right" bgcolor="#FFFFFF">状 态:</td>
- <td bgcolor="#FFFFFF"><input name="SecretFlag" type="checkbox" id="SecretFlag" value="1" style="HEIGHT: 13px;WIDTH: 13px;" <%if SecretFlag then response.write ("checked")%>> 悄悄话 <input name="ViewFlag" type="checkbox" id="ViewFlag" value="1" style="HEIGHT: 13px;WIDTH: 13px;" <%if ViewFlag then response.write ("checked")%>> 通过审核</td>
- </tr>
- <tr>
- <td height="20" align="right" bgcolor="#FFFFFF">留言时间:</td>
- <td bgcolor="#FFFFFF"><input name="AddTime" type="text" class="textfield" id="AddTime" style="WIDTH: 240" value="<%=AddTime%>" readonly></td>
- </tr>
- <tr>
- <td height="20" align="right" bgcolor="#FFFFFF">回复时间:</td>
- <td bgcolor="#FFFFFF"><input name="ReplyTime" type="text" class="textfield" id="ReplyTime" style="WIDTH: 240" value="<%=ReplyTime%>" readonly></td>
- </tr>
- <tr>
- <td height="20" align="right" valign="top" bgcolor="#FFFFFF">回复内容:</td>
- <td bgcolor="#FFFFFF"><textarea name="ReplyContent" rows="6" class="textfield" id="ReplyContent" style="WIDTH: 76%;"><%=ReplyContent%></textarea></td>
- </tr>
- <tr>
- <td height="30" align="right" bgcolor="#FFFFFF"> </td>
- <td valign="bottom" bgcolor="#FFFFFF"><input name="submitSaveEdit" type="submit" class="button" id="submitSaveEdit" value="保存" style="WIDTH: 80;" ></td>
- </tr>
- </table></td>
- </tr>
- </form>
- </table>
- </BODY>
- </HTML>
- <%
- sub MesEdit()
- dim Action,rsCheckAdd,rs,sql
- Action=request.QueryString("Action")
- if Action="SaveEdit" then '保存编辑管理员信息
- set rs = server.createobject("adodb.recordset")
- if len(trim(request.Form("MesName")))<3 then
- response.write ("<script language=javascript> alert('""留言主题""为必填项目,且不少于3个字符!');history.back(-1);</script>")
- response.end
- end if
- if len(trim(request.Form("Content")))<10 then
- response.write ("<script language=javascript> alert('""留言内容""为必填项目,且不少于10个字符!');history.back(-1);</script>")
- response.end
- end if
- if Result="Modify" then '修改网站管理员
- sql="select * from sk_Message where ID="&ID
- rs.open sql,conn,1,3
- rs("MesName")=trim(Request.Form("MesName"))
- rs("Content")= StrReplace(Request.Form("Content"))
- if Request.Form("ViewFlag")=1 then
- rs("ViewFlag")=Request.Form("ViewFlag")
- else
- rs("ViewFlag")=0
- end if
- if Request.Form("SecretFlag")=1 then
- rs("SecretFlag")=Request.Form("SecretFlag")
- else
- rs("SecretFlag")=0
- end if
- rs("ReplyContent")=StrReplace(Request.Form("ReplyContent"))
- if not (trim(request.Form("ReplyContent"))="" or trim(request.Form("ReplyTime"))<>"") then
- rs("ReplyTime")=now()
- end if
- end if
- rs.update
- rs.close
- set rs=nothing
- Response.Redirect("Tips/ly.asp")
- else '提取留言信息
- if Result="Modify" then
- set rs = server.createobject("adodb.recordset")
- sql="select * from sk_Message where ID="& ID
- rs.open sql,conn,1,1
- MesName=rs("MesName")
- Content=ReStrReplace(rs("Content"))
- Linkman=GuestInfo(rs("MemID"),rs("Linkman"),rs("Sex"))
- Company=rs("Company")
- Address=rs("Address")
- ZipCode=rs("ZipCode")
- Telephone=rs("Telephone")
- Fax=rs("Fax")
- Mobile=rs("Mobile")
- Email=rs("Email")
- ViewFlag=rs("ViewFlag")
- SecretFlag=rs("SecretFlag")
- AddTime=rs("AddTime")
- ReplyContent=ReStrReplace(rs("ReplyContent"))
- ReplyTime=rs("ReplyTime")
- rs.close
- set rs=nothing
- end if
- end if
- end sub
- function GuestInfo(ID,Guest,Sex)
- Dim rs,sql
- Set rs=server.CreateObject("adodb.recordset")
- sql="Select * From sk_Members where ID="&ID
- rs.open sql,conn,1,1
- if rs.bof and rs.eof then
- GuestInfo=Guest & " " & Sex
- else
- GuestInfo="<font color='green'>会员 </font><a href='MemEdit.asp?Result=Modify&ID="&ID&"' onClick='changeAdminFlag(""前台会员资料"")'>"&Guest&"</a>"&Sex
- end if
- rs.close
- set rs=nothing
- end function
- %>