📄 admin.article.asp
字号:
<html>
<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>后台管理</title>
<style>
<!--
table, body, tr, td, main, a, input, textarea, select { font-family: 宋体; font-size: 9pt; text-decoration: none }
-->
</style>
</head>
<body>
<!--#include file="conn.asp"-->
<!--#include file="admin.Asp" -->
<%
'-------------------open del
if Request("id")<>"" and Request("del")="del" then
Response.Write("你确定删除吗?<a href=?del=yes&id="&Request("id")&"&title="&Request("title")&"&>[Yes]</a> <a href=?>[No]</a>")
Response.End
End if
if Request("del")="yes" and Request("id")<>"" then
set rsdel=server.createobject("adodb.recordset")
rsdel.open "Delete * from title where id = "&Request("id")&" ",conn,1,3
Response.Write("删除成功! <a href=?>返回</a> ")
Response.End
rsdel.close
set rsdel = nothing
End if
'-------------------open see
if Request("post")="see" and Request("id")<>"" and isnumeric(Request("id")) then
set rssee=server.createobject("adodb.recordset")
rssee.open "select * from title where id = "&Request("id")&" ",conn,1,3
if rssee("tshow")=false then
rssee("tshow")=True
else
rssee("tshow")=false
End if
rssee.update
Response.Write("修改成功! <a href=?>返回</a> ")
Response.End
rssee.close
set rssee = nothing
End if
'-------------------open book
if Request("post")="book" and Request("id")<>"" and isnumeric(Request("id")) then
set rssee=server.createobject("adodb.recordset")
rssee.open "select * from title where id = "&Request("id")&" ",conn,1,3
if rssee("book")=false then
rssee("book")=True
else
rssee("book")=false
End if
rssee.update
Response.Write("修改成功! <a href=?>返回</a> ")
Response.End
rssee.close
set rssee = nothing
End if
%>
<div align="center">
<center>
<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse; border: 4px double #808080; padding: 3" bordercolor="#111111" width="95%">
<tr>
<td width="100%">
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%">
<tr>
<td width="100%" height="35" align="center"><a href="admin.title.asp">
栏目分类管理</a> <a href="admin.article.asp">文章管理</a>
<a href="admin.link.asp">友情链接管理</a> <a href="admin.user.asp">
管理员管理</a> <a href="admin.login.asp?post=quit">退出系统</a></td>
</tr>
<tr>
<td width="100%" align="center"><hr noshade color="#808080" size="1"></td>
</tr>
<tr>
<td width="100%" align="center">
<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse; padding-left:6; padding-right:6" bordercolor="#808080" width="100%">
<tr>
<td width="671" height="25" bgcolor="#F7F7F7" align="center">文章标题
[ <a href="admin.post.asp">添加新的文章</a> ]</td>
<td width="225" height="25" bgcolor="#F7F7F7" align="center">操作</td>
</tr>
<%
set rs=server.createobject("adodb.recordset")
if Request("title_1")="" and Request("title_2")="" then
rs.open "select * from title order by id desc ",conn,1,3
Elseif Request("title_1")<>"" then
rs.open "select * from title where title_1='"&HTMLEncode(Request("title_1"))&"' order by id desc ",conn,1,3
Elseif Request("title_2")<>"" then
rs.open "select * from title where title_2='"&HTMLEncode(Request("title_2"))&"' order by id desc ",conn,1,3
End if
if not rs.eof then
rs.pagesize=10
if not isnumeric(Request("Page")) then
Page=1
else
page = cint(request("page"))
End if
if page = "" then page = 1
if page < 1 then page=1
if page >= rs.pagecount then page = rs.pagecount
rs.absolutepage = page
for i=1 to rs.PageSize
%>
<tr>
<td width="671" align="center" height="30">
<p align="left">
<a href="?title_1=<%=rs("title_1")%>">[<%=rs("title_1")%>]</a>-<a href="?title_2=<%=rs("title_2")%>">[<%=rs("title_2")%>]</a>-<%=rs("title")%>-<font color="#808080">[<%=rs("name")%>]</font></td>
<td width="225" align="center" height="30">
<a href="?post=see&id=<%=rs("id")%>"><%if rs("tshow")=false then%>显示文章<%else%>关闭文章<%End if%></a>
<a href="?post=book&id=<%=rs("id")%>"><%if rs("book")=false then%>关闭评论<%Else%>允许评论<%End if%></a>
<a href="admin.post.asp?id=<%=rs("id")%>&title=<%=rs("title")%>">修改</a> <a href="?del=yes&id=<%=rs("id")%>">删除</a></td>
</tr>
<%
rs.movenext
if rs.eof then exit for
next
End if
%>
</table>
</td>
</tr>
<tr>
<td width="100%" align="center" height="35">
共有记录<%=rs.recordcount%>
条 <%=page%>
/<%=rs.pagecount%>
<a href="<%request.servervariables("document_name")%>?post=<%=Request("post")%>&page=<%=page-1%>">上一页</a>
<a href="<%request.servervariables("document_name")%>?post=<%=Request("post")%>&page=<%=page+1%>">下一页</a>
转到第 <select onchange="window.location='?post=<%=Request("post")%>&page='+this.value" name="gopage">
<%for x=1 to rs.pagecount%>
<option <%if x=page then%>selected<%end if%> value="<%=x%>"><%=x%></option>
<%next
rs.close
set rs = nothing
%>
</select> 页
</td>
</tr>
<tr>
<td width="100%" align="center" height="30"> </td>
</tr>
</table>
</td>
</tr>
</table>
</center>
</div>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -