?? messageedit.asp
字號:
?<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<% Option Explicit %>
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8" />
<META NAME="copyright" CONTENT="Copyright 2006-2009" />
<META NAME="Author" CONTENT="迅易網站建設開發、www.ameav.com" />
<META NAME="Keywords" CONTENT="" />
<META NAME="Description" CONTENT="" />
<TITLE>審核、修改、回復留言</TITLE>
<link rel="stylesheet" href="Images/CssAdmin.css">
<script language="javascript" src="../Script/Admin.js"></script>
</HEAD>
<!--#include file="../Include/Const.asp" -->
<!--#include file="../Include/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="3" cellspacing="1" bgcolor="#6298E1">
<tr>
<td height="24" nowrap><font color="#FFFFFF"><img src="Images/Explain.gif" width="18" height="18" border="0" align="absmiddle"> <STRONG>留言信息:審核,修改,回復留言信息相關的內容</STRONG></font></td>
</tr>
<tr>
<td height="24" align="center" nowrap bgcolor="#EBF2F9"><a href="MessageList.asp" onClick='changeAdminFlag("留言信息列表")'>查看留言信息</a><font color="#0000FF"> | </font><a href="SetSite.asp#Message" target="mainFrame" onClick='changeAdminFlag("網站信息設置")'>設置是否自動審核</a></td>
</tr>
</table>
<br>
<table width="100%" border="0" cellpadding="3" cellspacing="1" bgcolor="#6298E1">
<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="0" cellspacing="0" id=editProduct idth="100%">
<tr>
<td width="160" height="20" align="right"> </td>
<td> </td>
</tr>
<tr>
<td height="20" align="right">留言主題:</td>
<td><input name="MesName" type="text" class="textfield" id="MesName" style="WIDTH: 240;" value="<%=MesName%>"> *</td>
</tr>
<tr>
<td height="20" align="right" valign="top">留言內容:
<td><textarea name="Content" rows="6" class="textfield" id="Content" style="WIDTH: 76%;"><%=Content%></textarea> *</td>
</tr>
<tr>
<td height="20" align="right">留 言 者:</td>
<td><%=Linkman%></td>
</tr>
<tr>
<td height="20" align="right">單位名稱:</td>
<td><input name="Company" type="text" class="textfield" id="Company" style="WIDTH: 240;" value="<%=Company%>" readonly></td>
</tr>
<tr>
<td height="20" align="right">通信地址:</td>
<td><input name="Address" type="text" class="textfield" id="Address" style="WIDTH: 240;" value="<%=Address%>" readonly></td>
</tr>
<tr>
<td height="20" align="right">郵 編:</td>
<td><input name="ZipCode" type="text" class="textfield" id="ZipCode" style="WIDTH: 120" value="<%=ZipCode%>" readonly></td>
</tr>
<tr>
<td height="20" align="right">電 話:</td>
<td><input name="Telephone" type="text" class="textfield" id="Telephone" style="WIDTH: 240;" value="<%=Telephone%>" readonly></td>
</tr>
<tr>
<td height="20" align="right">傳 真:</td>
<td><input name="Fax" type="text" class="textfield" id="Fax" style="WIDTH: 120" value="<%=Fax%>" readonly></td>
</tr>
<tr>
<td height="20" align="right">移動電話:</td>
<td><input name="Mobile" type="text" class="textfield" id="Mobile" style="WIDTH: 120" value="<%=Mobile%>" readonly></td>
</tr>
<tr>
<td height="20" align="right">電子郵箱:</td>
<td><input name="Email" type="text" class="textfield" id="Email" style="WIDTH: 240" value="<%=Email%>" readonly></td>
</tr>
<tr>
<td height="20" align="right">狀 態:</td>
<td><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">留言時間:</td>
<td><input name="AddTime" type="text" class="textfield" id="AddTime" style="WIDTH: 240" value="<%=AddTime%>" readonly></td>
</tr>
<tr>
<td height="20" align="right">回復時間:</td>
<td><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">回復內容:</td>
<td><textarea name="ReplyContent" rows="6" class="textfield" id="ReplyContent" style="WIDTH: 76%;"><%=ReplyContent%></textarea></td>
</tr>
<tr>
<td height="30" align="right"> </td>
<td valign="bottom"><input name="submitSaveEdit" type="submit" class="button" id="submitSaveEdit" value="保存" style="WIDTH: 80;" ></td>
</tr>
<tr>
<td height="20" align="right"> </td>
<td valign="bottom"></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 ameav_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.write "<script language=javascript> alert('成功審核、編輯、回復留言信息!');changeAdminFlag('留言信息列表');location.replace('MessageList.asp');</script>"
else '提取留言信息
if Result="Modify" then
set rs = server.createobject("adodb.recordset")
sql="select * from ameav_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 ameav_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
%>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -