📄 edit.asp
字号:
<!--#include file="config.asp"-->
<!--#include file="ubb.asp"-->
<!--#include file="pub.asp"-->
<%
ChkAdmin
DelLy
IF Request("POST")<>"" Then
Call WriteData
End IF
id=request.querystring("id")
edit=request.querystring("edit")
if edit="ture" then
set ccc=conn.execute("select*from gb where id="&id&"")
content=unhtml(ccc("content"))
title=unhtml(ccc("title"))
reply=unhtml(ccc("reply"))
if ccc("top")="9" then
tt="留言置顶"
elseif ccc("top")="5" then
tt= "普通留言"
else
tt="留言置底"
end if
if ccc("type")="wait" then
ttt="等待审核"
elseif ccc("type")="waitopen" then
ttt= "待审留言"
elseif ccc("type")="waitclose" then
ttt= "待审私密"
elseif ccc("type")="waitregister" then
ttt= "待审认证"
elseif ccc("type")="open" then
ttt= "公开留言"
elseif ccc("type")="close" then
ttt= "私密留言"
else
ttt="禁止显示"
end if
%>
<!--#include file="header.asp"-->
<div align="center">
<form name="form1" method="post" action="">
<input type="hidden" name="POST" value="True">
<center>
<table class="table0" cellSpacing="1" cellPadding="0" width="500" border="0"><tbody>
<tr>
<td width="100%" height="26" onmouseover="javascript:this.bgColor='#fff0ff'" onmouseout="javascript:this.bgColor='#f8ffff'" bgColor=#f8ffff> <%name=unhtml(ccc("name"))%>我是:<%response.write name%>
</td>
</tr>
<tr>
<td width="100%" height="26" onmouseover="javascript:this.bgColor='#fff0ff'" onmouseout="javascript:this.bgColor='#f8ffff'" bgColor=#f8ffff> <%oicq=unhtml(ccc("oicq"))%>OICQ:<%response.write oicq%>
</td>
</tr>
<tr>
<td width="100%" height="26" onmouseover="javascript:this.bgColor='#fff0ff'" onmouseout="javascript:this.bgColor='#f8ffff'" bgColor=#f8ffff> <%site=unhtml(ccc("site"))%>主页:<%response.write site%>
</td>
</tr>
<tr>
<td width="100%" height="26" onmouseover="javascript:this.bgColor='#fff0ff'" onmouseout="javascript:this.bgColor='#f8ffff'" bgColor=#f8ffff> <%mail=unhtml(ccc("mail"))%>邮箱:<%response.write mail%></td>
</tr>
<tr>
<td width="100%" height="26" onmouseover="javascript:this.bgColor='#fff0ff'" onmouseout="javascript:this.bgColor='#f8ffff'" bgColor=#f8ffff>
留言标题:<input type="text" name="title" size=34 value="<%=title%>">
</td>
</tr>
<tr>
<td width="100%" height="26" onmouseover="javascript:this.bgColor='#fff0ff'" onmouseout="javascript:this.bgColor='#f8ffff'" bgColor=#f8ffff>
留言内容:<textarea name="content" rows="4" cols="42" maxlength="800"><%response.write content %></textarea></td>
</tr>
<tr>
<td width="100%" height="26" onmouseover="javascript:this.bgColor='#fff0ff'" onmouseout="javascript:this.bgColor='#f8ffff'" bgColor=#f8ffff>
回复留言:<textarea name="reply" rows="5" cols="42"><%response.write reply%></textarea></td>
</tr>
<tr>
<td width="100%" height="26" onmouseover="javascript:this.bgColor='#fff0ff'" onmouseout="javascript:this.bgColor='#f8ffff'" bgColor=#f8ffff>
留言等级: <select name=top size=1><OPTION value='<%=ccc("top")%>'
selected><%=tt%></OPTION><OPTION value=9>留言置顶</OPTION><OPTION value=5>普通留言</OPTION><OPTION value=0>留言置底</OPTION></select>
留言类型: <select name="type" size=1><OPTION value='<%=ccc("type")%>' selected><%=ttt%></OPTION><OPTION value="open">公开留言</OPTION><OPTION value="close">私密留言</OPTION><OPTION value="no">禁止公开</OPTION></select></td>
</tr>
<tr>
<td align="center" width="100%" height="26" onmouseover="javascript:this.bgColor='#fff0ff'" onmouseout="javascript:this.bgColor='#f8ffff'" bgColor=#f8ffff>
<input type="submit" class=sd1 value=" 提 交 " name="submit">
<input type="reset" class=sd1 value=" 重 来 " name="reset"> <a href="index.asp">[查看留言]</a>
</td>
</tr>
</table>
</center>
</div>
<%
set ccc=nothing
end if
Bottom
Function WriteData
IF Request("content")="" or Request("title")="" Then
response.write "<script language='javascript'>"
response.write "alert('留言错误:请填写标题或留言内容!');"
response.write "history.go(-1);"
response.write "</script>"
response.end
Else
if Len(sos)<>53 then
Response.End
end if
ID=Request("id")
content=HTMLcode(Request("content"))
title=Request("title")
top=Request("top")
lytype=Request("type")
reply=HTMLcode(Request("reply"))
if Request("bj")="" then
bj=now
else
bj=Request("bj")
end if
Set canl = Server.CreateObject("ADODB.Recordset")
Sql = "Select * From gb where id="&id&""
canl.Open Sql,conn,1,3
canl("content")=content
canl("title")=title
canl("top")=top
canl("reply")=reply
canl("bj")=bj
canl("type")=lytype
canl.Update
canl.Close
Set canl=Nothing
Call CloseDB
Response.Redirect "index.asp"
End IF
End Function
Function DelLy
IF Request("del")<>"" Then
Sql = "Delete From gb Where id="&Request("del")
Conn.Execute(Sql)
Response.Redirect "index.asp"
End IF
IF Request("delall")<>"" Then
Sql = "Delete From gb Where name='"&Request("delall")&"'"
Conn.Execute(Sql)
Response.Redirect "index.asp"
End IF
END Function
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -