📄 matrix3_post.asp
字号:
<!-- #include file="const.asp" -->
<%
call opendb()
checkadmin()
dim fid,sql,rs,topic,id,content,pid,poststr,rootid,rnum,face,forumtitle
fid=request.QueryString("forumid")
id=request.QueryString("id")
pid=request.QueryString("pid")
poststr="发新帖子"
face=""
forumtitle=""
if id<>"" then
if not isnumeric(id) then call msg("ID必须为数字值")
sql="select topic,FID,content,face from m3_bbs where id="&id&""
set rs=server.CreateObject("adodb.recordset")
rs.open sql,conn,1,1
if rs.eof and rs.bof then
response.Redirect("error.asp?id=2")
response.End()
else
topic=rs("topic")
fid=cint(rs("FID"))
content=rs("content")
face=trim(rs("face"))
end if
rs.close
set rs=nothing
poststr="编辑帖子"
pid=""
else
if pid<>"" then
if not isnumeric(pid) then call msg("PID必须为数字值")
sql="select topic,fid,rootid from m3_bbs where id="&pid&""
set rs=server.CreateObject("adodb.recordset")
rs.open sql,conn,1,1
if rs.eof and rs.bof then
pid=""
else
topic=rs("topic")
fid=rs("FID")
rootid=rs("RootID")
end if
rs.close
set rs=nothing
poststr="回复帖子"
end if
content=""
end if
if fid<>"" then
if not isnumeric(fid) then call msg("Forumid必须为数字值")
sql="select FTitle from m3_forum where FID="&fid&""
set rs=server.CreateObject("adodb.recordset")
rs.open sql,conn,1,1
if rs.eof and rs.bof then
fid=""
else
forumtitle=rs("FTitle")
end if
rs.close
set rs=nothing
end if
if face="" then
randomize
rnum=int(9000*rnd)+1000
rnum=rnum mod 24
if rnum<10 then
face="0"&cstr(rnum)
else
face=cstr(rnum)
end if
end if
%>
<html>
<head>
<title><%=sitename%></title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="images/css.css" rel="stylesheet" type="text/css">
<script language="JavaScript">
var pic_url="";
function Preview0(val)
{
pic_url=val;
}
function Preview(win_width,win_width)
{
if(pic_url!=""){
window.open(pic_url,'','width='+win_width+',height='+win_width+',resizable=yes,scrollbars=yes,status=no,toolbar=no,menubar=no,location=no');
}
}
function chkTopicField()
{
if(document.topicform.title.value==""){
alert(" 请输入标题 ...");
return false;
}
<%if pid="" then%>
if(document.topicform.forumid.options[document.topicform.forumid.selectedIndex].value=="0")
{
alert(" 请选择发表论坛 ...");
return false;
}
<%end if%>
document.topicform.content.value=document.frames.EditBox.get_html(true);
document.topicform.Submit.disabled=true;
document.topicform.submit();
return true;
}
</script>
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onLoad="writehtml();">
<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="18" align="center" valign="top"> <!-- #include file="topbar.asp" --></td>
</tr>
<tr>
<td align="center" valign="middle"> <table width="100%" height="80%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="12" bgcolor="#ECE9D9"> </td>
<td width="1" bgcolor="#E8BC3C"></td>
<td width="10"> </td>
<td valign="top"> <table width="100%" border="0" cellspacing="0" cellpadding="3">
<tr>
<td width="100%"><span class="v8"><img src="images/btn_face.gif" width="10" height="7">
<a href="index.asp"><%=sitename%></a> <FONT face=Webdings color="#660000">8</FONT><a href="matrix3_admin.asp">BBS管理</a>
<%if forumtitle<>"" then %>
<FONT face=Webdings color="#660000">8</FONT>
论坛: <a href="list.asp?forumid=<%=fid%>"><%=forumtitle%></a>
<%end if%>
<%if id<>"" then %>
<FONT face=Webdings color="#660000">8</FONT>
帖子: <a href="bbs.asp?id=<%=id%>"><%=topic%></a>
<%end if%>
<FONT face=Webdings color="#660000">8</FONT>
<%=poststr%>
</span></td>
</tr>
<tr>
<td height="1" bgcolor="#ECE9D9"></td>
</tr>
</table>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="12"><table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="120" height="12" bgcolor="#990000"> <span class="v8b"> <img src="images/fang-1.gif" align="absmiddle">
</span><span class="v7b"><font color="#FFFFFF">
<%=poststr%>
</font></span></td>
<td height="12" nowrap bgcolor="#CCCCCC" class="v8b"> </td>
</tr>
</table>
<TABLE cellSpacing=1 cellPadding=2 width=100% align=center bgColor=#eeeeee
border=0>
<FORM name=topicform onsubmit="javascript:chkTopicField();return false;" action="matrix3_savepost.asp" method=post>
<TBODY>
<TR bgColor=#ffffff>
<TD height="24" align="center" nowrap bgcolor="#FAFAF5"><span class="v8b"><font color="#990000">
<%if pid="" then
response.write("论坛")
else
response.write("回复")
end if
%>
</font></span></TD>
<TD height="24" bgcolor="#FAFAF5"><table width="96%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="76%">
<%if pid="" then%>
<select name="forumid" class="select" id="forumid">
<%
dim tmprs1,tmprs2,tmpcid,tmpsql
tmpsql="select * from m3_category order by CIndex asc"
set tmprs1=server.CreateObject("adodb.recordset")
set tmprs2=server.CreateObject("adodb.recordset")
tmprs1.open tmpsql,conn,1,1
do while not tmprs1.eof
response.write("<option value=""0"">"&tmprs1("CTitle")&"</option>")
tmpsql="select FID,FTitle from m3_forum where CID="&tmprs1("CID")&" order by FIndex asc"
tmprs2.open tmpsql,conn,1,1
do while not tmprs2.eof
response.write("<option value="""&tmprs2("FID")&"""")
if fid=cint(tmprs2("FID")) then response.write(" selected")
response.write("> - "&tmprs2("FTitle")&"</option>")
tmprs2.movenext
loop
tmprs2.close
tmprs1.movenext
loop
tmprs1.close
set tmprs1=nothing
set tmprs2=nothing
else
response.write(topic)
response.write("<input type='hidden' name='forumid' id='forumid' value="&fid&">")
topic="回复:"&topic
end if
call closedb()
%>
</select></td>
<td width="24%" align="right">
<%if id="" then
if pid<>"" then
response.write"<a href='reply.asp?id="&pid&"&rootid="&rootid&"'>用户编辑器</a>"
else
response.write"<a href='post.asp?forumid="&fid&"'>用户编辑器</a>"
end if
end if%>
</td>
</tr>
</table></TD>
</TR>
<TR bgColor=#ffffff>
<TD height="24" align=center nowrap class=v8b>主题</TD>
<TD height="24"> <INPUT class=input1 maxLength=250 size="100" name="topic" id="topic" value="<%=topic%>">
<font color="#FF0000"> **</font> </TD>
</TR>
<TR>
<TD align="center" nowrap bgcolor="#FAFAF5" class=v7><strong>图标<br>
</strong> <li>将放在帖子的前面</li></TD>
<TD bgcolor="#FAFAF5" class=A14C><INPUT type=radio value=00 name=faceid <%if face="00" then response.write("checked")%>>
<IMG src="images/f00.gif" align="absmiddle"> <INPUT type=radio value=01 name=faceid <%if face="01" then response.write("checked")%>>
<IMG
src="images/f01.gif" align="absmiddle"> <INPUT type=radio
value=02 name=faceid <%if face="02" then response.write("checked")%>>
<IMG src="images/f02.gif" align="absmiddle"> <INPUT type=radio value=03 name=faceid <%if face="03" then response.write("checked")%>>
<IMG
src="images/f03.gif" align="absmiddle"> <INPUT type=radio
value=04 name=faceid <%if face="04" then response.write("checked")%>>
<IMG src="images/f04.gif" align="absmiddle"> <INPUT type=radio value=05 name=faceid <%if face="05" then response.write("checked")%>>
<IMG
src="images/f05.gif" align="absmiddle"> <INPUT type=radio
value=06 name=faceid <%if face="06" then response.write("checked")%>>
<IMG src="images/f06.gif" align="absmiddle"> <INPUT type=radio value=07 name=faceid <%if face="07" then response.write("checked")%>>
<IMG
src="images/f07.gif"> <INPUT
type=radio value=08 name=faceid <%if face="08" then response.write("checked")%>>
<IMG
src="images/f08.gif"> <INPUT type=radio
value=09 name=faceid <%if face="09" then response.write("checked")%>>
<IMG src="images/f09.gif" align="absmiddle"> <INPUT type=radio value=10 name=faceid <%if face="10" then response.write("checked")%>>
<IMG
src="images/f10.gif"> <INPUT type=radio
value=11 name=faceid <%if face="11" then response.write("checked")%>>
<IMG src="images/f11.gif" align="absmiddle"> <br>
<INPUT type=radio value=12 name=faceid <%if face="12" then response.write("checked")%>>
<IMG
src="images/f12.gif"> <INPUT type=radio
value=13 name=faceid <%if face="13" then response.write("checked")%>>
<IMG src="images/f13.gif" align="absmiddle"> <INPUT type=radio value=14 name=faceid <%if face="14" then response.write("checked")%>>
<IMG
src="images/f14.gif"> <INPUT type=radio
value=15 name=faceid <%if face="15" then response.write("checked")%>>
<IMG src="images/f15.gif" align="absmiddle"> <INPUT type=radio value=16 name=faceid <%if face="16" then response.write("checked")%>>
<IMG
src="images/f16.gif"> <INPUT type=radio
value=17 name=faceid <%if face="17" then response.write("checked")%>>
<IMG src="images/f17.gif" align="absmiddle"> <INPUT type=radio value=18 name=faceid <%if face="18" then response.write("checked")%>>
<IMG
src="images/f18.gif"> <INPUT type=radio
value=19 name=faceid <%if face="19" then response.write("checked")%>>
<IMG src="images/f19.gif" align="absmiddle"> <INPUT type=radio value=20 name=faceid <%if face="20" then response.write("checked")%>>
<IMG
src="images/f20.gif"> <INPUT type=radio
value=21 name=faceid <%if face="21" then response.write("checked")%>>
<IMG src="images/f21.gif" align="absmiddle"> <INPUT type=radio value=22 name=faceid <%if face="22" then response.write("checked")%>>
<IMG
src="images/f22.gif"> <INPUT type=radio
value=23 name=faceid <%if face="23" then response.write("checked")%>>
<IMG src="images/f23.gif" align="absmiddle"> </TD>
</TR>
<TR bgColor=#ffffff>
<TD align=center valign="top" nowrap class=v8b><br>
<br> <br>
内容</TD>
<TD><IFRAME NAME=EditBox src="edit.html" marginwidth="0" frameborder="0" WIDTH=90% HEIGHT=335 scrolling="no"></IFRAME>
<input type=hidden name="content" id="content"> </TD>
</TR>
<TR bgColor=#FAFAF5>
<TD height="20" align=center nowrap class=v8b>上传图片</TD>
<TD height="20" bgcolor="#FAFAF5"><IFRAME NAME=uploadfrm src="upload.htm" marginwidth="0" frameborder="0" WIDTH=100% HEIGHT=24 scrolling="no"></IFRAME></TD>
</TR>
<TR bgColor=#ffffff>
<TD height=20 colSpan=2 align="center"> <P>
<input name="id" type="hidden" id="id" value="<%=id%>">
<input name="pid" type="hidden" id="pid" value="<%=pid%>">
<INPUT class=input type=submit value="确定" name=Submit>
<INPUT class=input onclick="window.close()" type=button value="关闭" name=cancel>
</P></TD>
</TR>
</FORM>
</TABLE></td>
</tr>
</table></td>
<td width="10"> </td>
<td width="1" bgcolor="#E8BC3C"></td>
<td width="100" bgcolor="#ECE9D9" valign="top">
<!-- #include file="matrix3_right.asp" -->
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td height="10" align="center" valign="middle">
<!-- #include file="bottombar.asp" -->
</td>
</tr>
</table>
<script language="JavaScript">
function writehtml()
{
<% if content<>"" then %>
document.frames.EditBox.document.frames.idEdit.document.body.innerHTML="<%=replace(replace(replace(replace(replace(content,CHR(10),""),CHR(13),""),"""","'"),"\","\\"),chr(34),"\"&chr(34))%>";
<% end if %>
}
//setTimeout("writehtml()",1000)
</script>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -