?? 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 + -