📄 admin_wzshow.asp
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<%
option explicit
response.buffer=true
Const PurviewLevel=2
Const CheckChannelID=2
Const PurviewLevel_Article=3
%>
<!--#include file="inc/conn.asp"-->
<!--#include file="inc/config.asp"-->
<!--#include file="Admin_ChkPurview.asp"-->
<!--#include file="inc/function.asp"-->
<!--#include file="inc/admin_code_article.asp"-->
<SCRIPT language=javascript>
function ConfirmDel()
{
if(confirm("确定要删除选中的文章吗?本操作将把选中的文章移到回收站中。必要时您可从回收站中恢复!"))
return true;
else
return false;
}
</SCRIPT>
<%
dim ArticleID,sql,rs,FoundErr,ErrMsg,PurviewChecked,PurviewChecked2
dim ClassID,tClass,ClassName,RootID,ParentID,ParentPath,Depth,ClassMaster,ClassChecker
ArticleID=trim(request("ArticleID"))
FoundErr=False
PurviewChecked=False
PurviewChecked2=False
call main()
if FoundErr=True then
WriteErrMsg()
end if
call CloseConn()
sub main()
if ArticleId="" then
FoundErr=True
ErrMsg=ErrMsg & "<br><li>参数不足</li>"
exit sub
else
ArticleID=Clng(ArticleID)
end if
sql="select * from caifuw where Deleted=False and ArticleID=" & ArticleID & ""
Set rs= Server.CreateObject("ADODB.Recordset")
rs.open sql,conn,1,1
if rs.bof and rs.eof then
FoundErr=True
ErrMsg=ErrMsg & "<br><li>找不到文章</li>"
else
ClassID=rs("ClassID")
set tClass=conn.execute("select ClassName,RootID,ParentID,Depth,ParentPath,ClassMaster,ClassChecker From caifuwClass where ClassID=" & ClassID)
if tClass.bof and tClass.eof then
founderr=True
ErrMsg=ErrMsg & "<br><li>找不到指定的栏目</li>"
else
ClassName=tClass(0)
RootID=tClass(1)
ParentID=tClass(2)
Depth=tClass(3)
ParentPath=tClass(4)
ClassMaster=tClass(5)
ClassChecker=tClass(6)
end if
set tClass=nothing
end if
if FoundErr=True then
rs.close
set rs=nothing
exit sub
end if
if AdminPurview=1 or AdminPurview_Article<=2 then
PurviewChecked=True
else
PurviewChecked=CheckClassMaster(ClassMaster,AdminName)
if PurviewChecked=False and ParentID>0 then
set tClass=conn.execute("select ClassMaster from caifuwClass where ClassID in (" & ParentPath & ")")
do while not tClass.eof
PurviewChecked=CheckClassMaster(tClass(0),AdminName)
if PurviewChecked=True then exit do
tClass.movenext
loop
end if
PurviewChecked2=CheckClassMaster(ClassChecker,AdminName)
if PurviewChecked2=False and ParentID>0 then
set tClass=conn.execute("select ClassMaster from caifuwClass where ClassID in (" & ParentPath & ")")
do while not tClass.eof
PurviewChecked2=CheckClassMaster(tClass(0),AdminName)
if PurviewChecked2=True then exit do
tClass.movenext
loop
end if
end if
%>
<html>
<head>
<title><%=rs("Title")%></title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="Admin_Style.css" rel="stylesheet" type="text/css">
</head>
<body leftmargin="2" topmargin="0" marginwidth="0" marginheight="0">
<table width="100%" border="0" align="center" cellpadding="2" cellspacing="0" class="border">
<tr align="center" class="tdbg">
<td height="40" colspan="2" valign="bottom"><font size="5"><%=rs("Title")%></font></td>
</tr>
<tr align="center" class="tdbg">
<td colspan="2">
<%
dim Author,CopyFrom
Author=rs("Author")
CopyFrom=rs("CopyFrom")
response.write "作者:"
if instr(Author,"|")>0 then
response.write "<a href='mailto:" & right(Author,len(Author)-instr(Author,"|")) & "'>" & left(Author,instr(Author,"|")-1) & "</a>"
else
response.write Author
end if
response.write " 转贴自:"
if instr(CopyFrom,"|")>0 then
response.write "<a href='" & right(CopyFrom,len(CopyFrom)-instr(CopyFrom,"|")) & "'>" & left(CopyFrom,instr(CopyFrom,"|")-1) & "</a>"
else
response.write CopyFrom
end if
response.write " 点击数:" & rs("Hits") & " 文章录入:<a href='Admin_ArticleManage.asp?Field=Editor&Keyword=" & rs("Editor") & "'>" & rs("Editor") & "</a>"
%>
</td>
</tr>
<tr class="tdbg">
<td colspan="2"><table width="100%" height="100%" border="0" cellpadding="0" cellspacing="5">
<tr>
<td height="200" valign="top"><p><%=rs("Content")%></p></td>
</tr>
</table>
</td>
</tr>
<tr class="tdbg"><td colspan="2">
<li>上一篇文章:
<%
dim rsPrev
sql="Select Top 1 ArticleID,Title From caifuw Where Deleted=False and ArticleID<" & rs("ArticleID") & " order by ArticleID desc"
Set rsPrev= Server.CreateObject("ADODB.Recordset")
rsPrev.open sql,conn,1,1
if rsPrev.Eof then
response.write "没有了"
else
response.write "<a href='Admin_ArticleShow.asp?ArticleID="&rsPrev("ArticleID")& "'>"&rsPrev("Title") & "</a>"
end if
rsPrev.close
set rsPrev=nothing
%>
</li>
<br> <li> 下一篇文章:
<%
dim rsNext
sql="Select Top 1 ArticleID,Title From caifuw Where Deleted=False and ArticleID>" & rs("ArticleID") & " order by ArticleID asc"
Set rsNext= Server.CreateObject("ADODB.Recordset")
rsNext.open sql,conn,1,1
if rsNext.Eof then
response.write "没有了"
else
response.write "<a href='Admin_ArticleShow.asp?ArticleID="&rsNext("ArticleID")& "'>"&rsNext("Title") & "</a>"
end if
rsNext.close
set rsNext=nothing
%>
</li></td>
</tr>
<tr align="right" class="tdbg">
<td height="21" colspan="2"> </td>
</tr>
</table>
<%
rs.close
set rs=nothing
%>
<br>
</body>
</html>
<%
end sub
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -