📄 edit.asp
字号:
<%@ Language=VBScript %>
<% option explicit %>
<!-- #include file="conn_forum.asp" -->
<!-- #include file="conn_member.asp" -->
<!-- #include file="inc_session.asp" -->
<%
dim uid
uid=GetSession()
dim iArea
dim iParentId
dim iThemeId
iArea=clng(Request("areaid"))
iParentId =clng(Request("ParentId"))
iThemeId =clng(Request("tId"))
dim sAreaName
dim sThemeTitle
dim sThemeContent
dim bLock
dim rs
set rs=Server.CreateObject ("ADODB.Recordset")
rs.Open "SELECT areaName FROM tIndex WHERE areaID=" & iArea,connf,1 ,1
sAreaName=rs("areaName")
rs.Close
rs.Open "SELECT Theme,Content,Lock FROM tcontent WHERE ThemeID=" & iThemeId,connf,1 ,1
if rs.BOF and rs.EOF then
Response.Write "The theme has been deleted!"
Response.End
end if
sThemeTitle=rs("Theme")
sThemeContent=rs("Content")
bLock=rs("Lock")
rs.Close
dim iLevel
iLevel=0
if uid<>"" then
rs.Open "SELECT * FROM tmember WHERE uid='" & uid & "'",connm,1 ,1
if not(rs.BOF and rs.EOF) then
iLevel=rs("level")
end if
rs.Close
end if
set rs=nothing
call closeconnf
call closeconnm
%>
<html>
<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>
<%
if iParentId=-1 then
Response.Write "编辑主题 - " & sAreaName
else
Response.Write "编辑回复 - " & sThemeTitle
end if
%>
</title>
<link rel="stylesheet" type="text/css" href="../main.css">
</head>
<body bgcolor="#FFFFFF">
<SCRIPT language="JavaScript" src="../include/header.inc" type="text/javascript"></SCRIPT>
<center>
<table border="0" width="760" cellspacing="0" ID="Table1">
<tr>
<td width="43%"><a href="index.asp"><img border="0" src="images/logo_forum.gif" alt="论坛首页"></a></td>
<td width="57%" align="left" valign="top">
<img src="images/f_root.gif" border="0" align="top"><a href="index.asp">论坛首页</a><br>
<img src="images/f_theme.gif" border="0" align="top"><a href="listtheme.asp?area=<%=iArea%>"><%=sAreaName%></a><br>
<img src="images/f_content.gif" border="0" align="top"><a href="viewtheme.asp?area=<%=iArea%>&id=<%=iParentId%>"><%=sThemeTitle%></a>
</td>
</tr>
<tr>
<td width="43%"></td>
<td width="57%"> </td>
</tr>
</table>
<form method="POST" action="update.asp" name="frmWrite">
<input type="hidden" name="areaid" value="<%=iArea%>" ID="Hidden1">
<input type="hidden" name="parentid" value="<%=iParentId%>" ID="Hidden2">
<input type="hidden" name="tid" value="<%=iThemeId%>" ID="Hidden3">
<table border="0" width="760" cellspacing="1" bgcolor="#F3F3F3" ID="Table2">
<tr>
<td width="21%" bgcolor="#E0E0E0" height="25" align="right"><b><font COLOR="#000000"></font></b></td>
<td width="79%" bgcolor="#E0E0E0" height="25">
<b><font COLOR="#000000">编辑帖子</font></b>
</td>
</tr>
<tr>
<td width="21%" bgcolor="#EAEAEA" height="25" align="right">用户名:</td>
<td width="79%" bgcolor="#FFFFFF" height="25">
<%
if uid="" then
Response.Write "<img src='images/question.gif'>"
else
Response.Write uid
end if
%>
</td>
</tr>
<tr>
<td width="21%" bgcolor="#EAEAEA" height="25" align="right">文章主题:</td>
<td width="79%" bgcolor="#FFFFFF" height="25">
<input type="text" name="Title" size="67" value="<%=sThemeTitle%>" style="border: 1 solid #000000"></td>
</tr>
<tr>
<td width="21%" bgcolor="#EAEAEA" height="25" align="right">标题符号:</td>
<td width="79%" bgcolor="#FFFFFF" height="25">
<table border="0" width="480" cellspacing="0" cellpadding="0">
<tr>
<td width="25%"><input type="radio" name="face" value="0" checked>(无)</td>
<td width="25%"><input type="radio" name="face" value="1"><img border="0" src="images/titleicon/f001.gif"></td>
<td width="25%"><input type="radio" name="face" value="2"><img border="0" src="images/titleicon/f002.gif"></td>
<td width="25%"><input type="radio" name="face" value="3"><img border="0" src="images/titleicon/f003.gif"></td>
</tr>
<tr>
<td width="25%"><input type="radio" name="face" value="4"><img border="0" src="images/titleicon/f004.gif"></td>
<td width="25%"><input type="radio" name="face" value="5"><img border="0" src="images/titleicon/f005.gif"></td>
<td width="25%"><input type="radio" name="face" value="6"><img border="0" src="images/titleicon/f006.gif"></td>
<td width="25%"><input type="radio" name="face" value="7"><img border="0" src="images/titleicon/f007.gif"></td>
</tr>
<tr>
<td width="25%"><input type="radio" name="face" value="8"><img border="0" src="images/titleicon/f008.gif"></td>
<td width="25%"><input type="radio" name="face" value="9"><img border="0" src="images/titleicon/f009.gif"></td>
<td width="25%"><input type="radio" name="face" value="10"><img border="0" src="images/titleicon/f010.gif"></td>
<td width="25%"><input type="radio" name="face" value="11"><img border="0" src="images/titleicon/f011.gif"></td>
</tr>
<tr>
<td width="25%"><input type="radio" name="face" value="12"><img border="0" src="images/titleicon/f012.gif"></td>
<td width="25%"><input type="radio" name="face" value="13"><img border="0" src="images/titleicon/f013.gif"></td>
<td width="25%"><input type="radio" name="face" value="14"><img border="0" src="images/titleicon/f014.gif"></td>
<td width="25%"><input type="radio" name="face" value="15"><img border="0" src="images/titleicon/f015.gif"></td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="21%" bgcolor="#EAEAEA" height="25" align="right">内容:</td>
<td width="79%" bgcolor="#FFFFFF" height="25">
<textarea rows="14" name="content" cols="66" style="border: 1 solid #000000"><%=trim(sThemeContent)%></textarea>
</td>
</tr>
<tr>
<td width="21%" bgcolor="#EAEAEA" height="85" align="right">插入表情符号:</td>
<td width="79%" bgcolor="#FFFFFF" height="85" valign="bottom">
<table border="0" width="490" bgcolor="#E0E0E0" cellspacing="1" ID="Table4">
<%
dim x
dim y
dim iNum
iNum=0
for x=1 to 2
Response.Write "<tr>"
for y=1 to 16
iNum=iNum+1
%>
<td bgcolor="#FFFFFF"><a href="javascript:void(0);" onclick="InsertFace('<%=iNum%>')"> <img border="0" src="images/face/<%=iNum%>.gif" alt="<%=iNum%>" width="26" height="26"></a></td>
<%
Response.Write vbcrlf
next
Response.Write "</tr>" & vbcrlf
next
%>
</table>
</td>
</tr>
<tr>
<td width="21%" bgcolor="#EAEAEA" height="35" align="right">功能:</td>
<td width="79%" bgcolor="#FFFFFF" height="35">
<a href="javascript:void(0);" onclick="Insert('请输入链接的完整URL:','[LINK]','[/LINK]');">插入链接</a>
<% if iLevel>1 then %>
| <a href="javascript:void(0);" onclick="Insert('请输入图片的完整URL:','[IMG]','[/IMG]');">贴图片</a> |
<a href="javascript:void(0);" onclick="Insert('请输入媒体文件的完整URL:','[EMB]','[/EMB]');">插入媒体文件</a>
<% else %>
| <font color="#CCCCCC">贴图片</font> | <font color="#CCCCCC">插入媒体文件</font>
<% end if %>
</td>
</tr>
</table>
<p align="center">
<%
if bLock=1 then
Response.Write "<img src='images/notice.gif'> "
Response.Write "该主题已经锁定,不能编辑。"
else
if uid="" then
Response.Write "<img src='images/notice.gif'> "
Response.Write "请先<a href='login.asp'>登录</a>或<a href='../reg/index.asp'>注册</a>成为新会员。 "
else
Response.Write "<input type='submit' value='发表咯!' name='CmdSubmit'>"
end if
end if
%>
<a href="#" onclick="history.back()">返 回</a>
</p>
</form>
</center>
<p>
</p>
<SCRIPT language="JavaScript" src="../include/buttom.inc" type="text/javascript"></SCRIPT>
</body>
</html>
<script language="javascript">
function Insert(sPrompt,sPrefix,sPostfix)
{
var sURL = prompt(sPrompt, "");
if (sURL)
{
var sTmp;
sTmp=sPrefix + sURL + sPostfix;
document.frmWrite.content.value+=sTmp;
document.frmWrite.content.focus();
}
return;
}
function InsertFace(inum)
{
var sTmp;
sTmp='[FACE]' + inum + '[/FACE]';
document.frmWrite.content.value+=sTmp;
document.frmWrite.content.focus();
return;
}
</script>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -