📄 print.asp
字号:
<!-- #include file="const.asp" -->
<%
dim ID,rid
dim sql,rs,topic,addtime,author,content,tmpsiteurl,html,FID,authent,authentlist
html=0
ID=nrequest("id")
if ID="" then
response.write("缺少帖子ID!")
response.End()
end if
call opendb()
sql="select addtime,topic,name,content,html,FID from m3_bbs where ID="&ID&" and valid=1"
set rs = Server.CreateObject("ADODB.Recordset")
rs.open sql,conn,1,1
if rs.eof and rs.bof then
response.write("invalid Parameter")
response.End()
else
topic=rs("topic")
author=rs("name")
addtime=rs("addtime")
html=cint(rs("html"))
content=rs("content")
FID=rs("FID")
end if
rs.close
sql="select 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
response.Redirect("error.asp?id=12")
response.End()
else
authent=cint(rs("authent"))
authentlist=rs("authentlist")
end if
rs.close
set rs=nothing
if authent=1 then
if inlist(authentlist)=0 then
response.Redirect("error.asp?id=13")
response.End()
end if
end if
tmpsiteurl=getpath123("http://"&request.ServerVariables("SERVER_NAME")&":"&request.ServerVariables("SERVER_PORT")&request.ServerVariables("URL"))
tmpsiteurl=replace(tmpsiteurl,":80","")
if right(tmpsiteurl,1)<>"/" then tmpsiteurl=tmpsiteurl&"/"
function getpath123(str123)
if isnull(str123) then exit function
if instr(str123,"/")>0 then
getpath123=lcase(left(str123,instrRev(str123,"/")-1))
else
getpath123=""
end if
end function
position "浏览帖子(打印模式):"&topic&"",0
%>
<html>
<head>
<title><%=sitename%></title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style><!--
a:link {color:#000000;text-decoration:underline}
a:visited {color:#0000FF;text-decoration:underline}
a:hover {color:#FF0000;text-decoration:underline}
a:active {color:#FF0000;text-decoration:underline}
.spnMessageText a:link {color:#00008B;text-decoration:underline}
.spnMessageText a:visited {color:#0000FF;text-decoration:underline}
.spnMessageText a:hover {color:#FF0000;text-decoration:underline}
.spnMessageText a:active {color:#FF0000;text-decoration:underline}
input.radio {background:#8199DA;color:#000000}
-->
</style>
</head>
<script language="JavaScript">
<!--
function runit(obj)
{
var winname=window.open("","test","");
winname.document.open("text/html", "replace");
winname.document.write(obj.value);
winname.document.close();
}
function copyit(obj){
obj.select();
js=obj.createTextRange();
js.execCommand("Copy");
}
function saveAs(obj){
var winname=window.open('','test','top=10000');
winname.document.open("text/html", "replace");
winname.document.write(obj.value);
winname.document.execCommand('saveas','','code.html');
winname.close();
}
function SymError()
{
return true;
}
window.onerror = SymError;
//-->
</script>
<body bgColor="#FFFFFF" text="#191970" link="#00008B" aLink="#FF0000" vLink="#FF0000" onLoad="window.focus();">
<table width="100%" height="100%" align="center" style="word-break:break-all;WORD-WRAP: break-word;">
<tr>
<td height="30" align="center" valign="top"><font face="Verdana, Arial, Helvetica" size="2">
<a href="javascript:onClick=window.print()">打印页面</a> | <a href="JavaScript:onClick=window.close()">关闭窗口</a></font></td>
</tr>
<tr>
<td align="left" valign="top"><p><font size="3" face="Verdana, Arial, Helvetica, sans-serif"><strong><%=topic%></strong></font></p>
<p><font size="2">页面来源: <%=sitename%><br>
主题地址: <a href="<%=tmpsiteurl%>bbs.asp?id=<%=id%>" target="_blank"><%=tmpsiteurl%>bbs.asp?id=<%=id%></a><br>
打印时间: <%=now%></font></p>
<p align="left"><b>主题</b><br>
<hr>
<p align="left"><b><font size="2">作者:</font></b> <font size="2"><%=author%>
<b> <br>
主题:</b> <%=topic%><br>
<b>时间:</b> <%=addtime%><br>
<b>内容:</b><br>
</font>
<p align="left"> <font size="2"><%
if html=0 then
response.write(ubb(content))
else
response.write(content)
end if
%><br>
</font></p>
<br>
<%
sql="select addtime,topic,name,content,html from m3_bbs where RootID="&ID&" and ID<>"&ID&" and valid=1 order by addtime asc"
set rs=server.CreateObject("ADODB.RecordSet")
rs.open sql,conn,1,1
if not (rs.eof and rs.bof) then
%>
<b>回复</b>
<%
do while not rs.eof
%>
<hr>
<p align="left"><b><font size="2">回复作者:</font></b> <font size="2"><%=rs("name")%><b> <br>
回复主题:</b> <%=rs("topic")%><br>
<b>回复时间:</b> <%=rs("addtime")%><br>
<b>内容:</b></font></p>
<p align="left"> <%
if cint(rs("html"))=0 then
response.write(ubb(rs("content")))
else
response.write(rs("content"))
end if
%></p>
<%
rs.movenext
loop
end if
rs.close
set rs=nothing
%>
<hr>
<p align="left"><b><font size="2"><%=sitename%></font></b><font size="2">:<a href="<%=tmpsiteurl%>" target="_blank"><%=tmpsiteurl%></a></font></p>
<p align="left"><font face="Verdana, Arial, Helvetica" size="2"><b>©
2003-
<%response.write(year(date()))%>
<%=sitename%></b></font></p>
</td>
</tr>
<tr>
<td align="center" valign="middle">
<div align="center"><center>
<font face="Verdana, Arial, Helvetica" size="2">
<p><font face="Verdana, Arial, Helvetica" size="2"><a href="JavaScript:onClick=window.close()">关闭窗口</a></font></p>
</font>
</div>
</td>
</tr>
</table>
</body>
</html>
<!-- #include file="ubb.asp" -->
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -