📄 edit.asp
字号:
<!--#include file="conn.asp"-->
<!--#include file=const.asp -->
<%
dim xxid
dim exec, rs
xxid=encodestr(request.querystring("id"))
if xxid="" or not theUser.reged then
connclose()
session("errmsg")="非法操作!!!"
response.redirect "admin_error.asp"
end if
%>
<html>
<head>
<META name="Author" content="木鸟">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title><%=sitetitle%></title>
<link rel="stylesheet" href="style/<%=skin%>.css" type="text/css">
</head>
<body onkeydown="if(event.keyCode==13 && event.ctrlKey)check()">
<!--#include file="head.asp"-->
<form method="POST" action="editsave.asp" name="form1">
<script>
function check()
{
if (document.form1.title.value=="")
{
alert("请填写主题!");
document.form1.title.focus();
return;
}
if (document.form1.nei.value=="")
{
alert("请填写留言内容!");
document.form1.nei.focus();
return;
}
document.forms[0].submit();
}
</script>
<%
exec="select * from ly where id="&xxid
set rs=conn.execute(exec)
if rs.eof and rs.bof then
rsclose()
connclose()
session("errmsg")="该留言不存在!!!"
response.redirect "admin_error.asp"
end if
if rs("bl")<>1 and not theUser.master then
rsclose()
connclose()
session("errmsg")="这个留言不是注册用户发的!!!"
response.redirect "admin_error.asp"
end if
if rs("name")<>theUser.name and not theUser.master then
rsclose()
connclose()
session("errmsg")="这个留言不是你发的!!!"
response.redirect "admin_error.asp"
end if
%>
<table class=table004 width="650" border="0" cellpadding="0" cellspacing="0" align="center">
<tr>
<td>
<table class=table001 border="0" width="650" cellspacing="0" cellpadding="3" align="center">
<tr>
<td width="19%" align="center">发 言 标 题:</td>
<td width="81%">
<input type="text" name="title" size="40" class="input1" value="<%=rs("title")%>" maxlength=40>
<font color="#FF0000">*</font>(标题限制 <b>20</b> 个汉字以内)</td>
</tr>
<tr>
<td width="19%" align="center">发 表 人:</td>
<td width="81%"><%=rs("name")%></td>
</tr>
<tr>
<td width="19%" align="center">电 子 邮 件:</td>
<td width="81%">
<input type="text" name="email" size="20" class="input1" value="<%=rs("email")%>">
</td>
</tr>
<tr>
<td width="19%" align="center"> Q Q :</td>
<td width="81%">
<input type="text" name="qq" size="20" class="input1" value="<%=rs("qq")%>">
</td>
</tr>
<tr>
<td width="19%" align="center">主 页 地 址:</td>
<td width="81%">
<input type="text" name="url" size="30" value="<%=rs("url")%>" class="input1">
</td>
</tr>
<tr>
<td width="19%" align="center">
<a href=### onclick=showUbb() title="点击开关">Ubb标签 (开)</a>:
</td>
<td width="81%" valign="top">
<script src=code.js></script>
<script>
function showUbb()
{
if(document.all.ubbDiv.innerText!="")
{window.ubbFrame.location="about:blank";document.all.ubbDiv.innerText="";window.event.srcElement.innerText="Ubb标签 (开)";}
else
{window.ubbFrame.location="ubb.htm";window.event.srcElement.innerText="Ubb标签 (关)";}
}
</script>
<IFRAME NAME="ubbFrame" width=0 height=0 marginwidth=0 marginheight=0 frameborder=0 scrolling=no SRC="about:blank" ></IFRAME>
<div id="ubbDiv"></div>
</td>
</tr>
<tr>
<td width="19%" align="center">
Q 帖图:
</td>
<td width="81%" valign="top">
<a href=### onclick=window.open("Qpic.asp?num=20&path=qpic/1","q","width=400,height=400,resizable=1")>Q帖图一</a>
<a href=### onclick=window.open("Qpic.asp?num=30&path=qpic/2","q","width=400,height=400,resizable=1")>Q帖图二</a>
<a href=### onclick=window.open("Qpic.asp?num=19&path=qpic/3","q","width=400,height=400,resizable=1")>Q帖图三</a>
</td>
</tr>
<tr>
<td width="19%" align="center">
<p style="line-height: 200%">留<br>
言<br>
内<br>
容
</td>
<td width="81%" valign="top">
<textarea rows="10" name="nei" cols="70" class="input1" ><%=replace(rs("nei"),"</textarea>","</textarea>")%></textarea>
<input type="hidden" name="id" value="<%=rs("id")%>">
<%
rsclose()
connclose()
%>
</td>
</tr>
<tr>
<td width="100%" colspan="2">
<p align="center">
<input type="button" value="提交" name="B1" onclick=check() class="input2" >
<input type="reset" value="清除" name="B2" class="input2" >
(Ctrl+Enter提交)
</td>
</tr>
</table>
</td>
</tr>
</table>
</form>
<!--#include file="foot.asp"-->
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -