📄 post.asp
字号:
<!-- #include file="const.asp" -->
<!-- #include file="matrix3_upload_config.asp" -->
<%
call opendb()
checkuser()
dim FID,forumtitle,rs,sql,continue,flag,authent,authentlist
authent=0
FID=nrequest("forumid")
continue=trim(request.QueryString("continue"))
if continue="" then
continue=0
else
continue=cint(continue)
end if
flag=trim(request.QueryString("flag"))
if flag="" then
flag=0
else
flag=cint(flag)
end if
if FID="" then
response.Redirect("error.asp?id=3")
response.End()
else
FID=cint(FID)
sql="select FTitle,authent,authentlist 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
rs.close
set rs=nothing
call closedb()
response.Redirect("error.asp?id=3")
response.End()
else
forumtitle=rs("FTitle")
authent=cint(rs("authent"))
authentlist=rs("authentlist")
end if
rs.close
set rs=nothing
end if
position "在论坛:"&forumtitle&" 撰写新帖",0
call closedb()
if authent=1 then
if inlist(authentlist)=0 then
response.Redirect("error.asp?id=11")
response.End()
end if
end if
dim face,rnum
face=request.QueryString("face")
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/skin.css" rel="stylesheet" type="text/css">
<script language="JavaScript">
function chkTopicField()
{
if(document.topicform.topic.value==""){
alert("请填写帖子的主题");
document.topicform.topic.focus();
return false;
}
if(document.topicform.content.value==""){
alert("请填写帖子内容");
document.topicform.content.focus();
return false;
}<%if trim1(request.Cookies("matrix3")("matrix3_admin"))<>"matrix3" then response.Write("else if(strLength(document.topicform.content.value)>16240) {alert('发言内容不得大于16240bytes。');return false;}")%>
document.topicform.submit();
document.topicform.Submit1.disabled=true;
}
function strLength(str) {
var WINNT_CHINESE;
WINNT_CHINESE = (("论坛").length==2)
if(WINNT_CHINESE) {
var l,t,c;
var i;
l=str.length;
t=l;
for(i=0;i<l;i++) {
c=str.charCodeAt(i);
if(c<0 || c>255) t=t+1;
}
return t;
} else {
return str.length;
}
}
function ow(src,win_width,win_height)
{
window.open(src,'','width='+win_width+',height='+win_height+',resizable=no,scrollbars=auto,status=no,toolbar=no,menubar=no,location=no');
return false;
}
</script>
<script language="JavaScript" src="images/ubbcode.js"></script>
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="10" align="center" valign="top">
<!-- #include file="topbar.asp" -->
</td>
</tr>
<tr>
<td align="center" valign="top"> <table width="100%" height="100%" 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%" height="26"><span class="v8"><img src="images/btn_face.gif" width="10" height="7">
<a href="index.asp"><%=sitename%></a>
<%if forumtitle<>"" then %>
<FONT face=Webdings color="#660000">8</FONT>
<a href="list.asp?forumid=<%=FID%>"><%=forumtitle%></a>
<%end if%>
<FONT face=Webdings color="#660000">8</FONT>
发表帖子</span></td>
</tr>
<tr>
<td height="1" bgcolor="#ECE9D9"></td>
</tr>
</table>
<br> <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="v7"><font color="#FFFFFF"> 填写以下:</font></span></td>
<td height="12" nowrap bgcolor="#CCCCCC" class="v8b"> </td>
</tr>
</table>
<TABLE cellSpacing=1 cellPadding=3 width=100% align=center bgColor=#eeeeee
border=0>
<FORM action="savepost.asp" method=post enctype="multipart/form-data" name="topicform" id="topicform" onsubmit="javascript:chkTopicField();return false;">
<TBODY>
<TR>
<TD width=18% height="25" align="center" nowrap bgcolor="#ffffff" class=v7b>主题标题</TD>
<TD width="82%" height="25" bgcolor="#ffffff"><INPUT name="topic" class=input1 id="topic" value="<%=request.QueryString("topic")%>" size=75 maxLength=100>
<select name=font onChange=DoTitle(this.options[this.selectedIndex].value) class=input1 >
<option selected value="">选择话题</option>
<%if flag=1 then%>
<option value=[JSP]>[JSP]</option>
<option value=[ASP]>[ASP]</option>
<option value=[PHP]>[PHP]</option>
<option value=[.NET]>[.NET]</option>
<option value=[XML]>[XML]</option>
<option value=[JS]>[JS]</option>
<option value=[VBS]>[VBS]</option>
<%end if%>
<option value=[原创]>[原创]</option>
<option value=[转帖]>[转载]</option>
<option value=[灌水]>[灌水]</option>
<option value=[讨论]>[讨论]</option>
<option value=[求助]>[求助]</option>
<option value=[推荐]>[推荐]</option>
<option value=[公告]>[公告]</option>
<option value=[注意]>[注意]</option>
<option value=[帖图]>[帖图]</option>
<option value=[建议]>[建议]</option>
<option value=[下载]>[下载]</option>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -