📄 admin_list.asp
字号:
ArticleSortName=rsLi2("So_Name")
rsLi2.close
set rsLi2=Nothing
end if
if Trim(Request.QueryString("So"))="" and Trim(Request.QueryString("AS"))="" then
SortID=""
AsSortID=""
ArticleSortName="所有分类"
end if
dim rsLi3
set rsLi3=Server.CreateObject("Adodb.RecordSet")
if not isnull(GuKeyword) and GuKeyword<>"" then
GuSQL="select * from "&GuTablePrefix&"_Article where Ar_Name like '%"&GuKeyword&"%' or Ar_Keyword like '%"&GuKeyword&"%'"
elseif Trim(Request.QueryString("CT"))<>"" then
GuSQL="select * from "&GuTablePrefix&"_Article where "&Trim(Request.QueryString("CT"))&"='1' "
elseif Trim(Request.QueryString("NC"))<>"" then
GuSQL="select * from "&GuTablePrefix&"_Article where Ar_NameColor='"&Trim(Request.QueryString("NC"))&"' "
elseif Trim(Request.QueryString("SH"))<>"" then
GuSQL="select * from "&GuTablePrefix&"_Article where Ar_Show='"&Trim(Request.QueryString("SH"))&"' "
elseif Trim(Request.QueryString("UP"))<>"" then
GuSQL="select * from "&GuTablePrefix&"_Article where Ar_UserPublish='"&Trim(Request.QueryString("UP"))&"' "
else
if Request.QueryString("So")<>"" and Request.QueryString("AS")<>"" then
GuSQL="select * from "&GuTablePrefix&"_Article where "&SortID&" "&AsSortID&" "
elseif Request.QueryString("So")<>"" and Request.QueryString("AS")="" then
GuSQL="select * from "&GuTablePrefix&"_Article where "&SortID&" "
else
GuSQL="select * from "&GuTablePrefix&"_Article "
end if
end if
GuSQL=GuSQL&" order by Ar_ID desc"
rsLi3.open GuSQL,GuConn,1,3
GuPageCount=rsLi3.RecordCount
if GuPageCount mod GuPageSize=0 then
GuPageTotal=GuPageCount\GuPageSize
else
GuPageTotal=GuPageCount\GuPageSize+1
end if
if GuPage<1 then
GuPage=1
end if
if GuPage>GuPageTotal then
GuPage=GuPageTotal
end if
%>
<table border="0" cellpadding="0" cellspacing="1" width="600" height="10" bgcolor="#CEEFE7">
<form name="Admin_List" method="post" action="<%Response.write "Admin_List.asp?So="&Trim(Request.QueryString("So"))&"&AS="&Trim(Request.QueryString("AS"))&"&CT="&Trim(Request.QueryString("CT"))&"&NC="&Trim(Request.QueryString("NC"))&"&SH="&Trim(Request.QueryString("SH"))&"&UP="&Trim(Request.QueryString("UP"))&"&GuKeyword="&Trim(Request.QueryString("GuKeyword"))&"&GuPage="&Trim(Request.QueryString("GuPage"))&""%>" onSubmit="return Admin_List_Check();">
<tr>
<td width="600" height="30" background="Images/Admin_T_Bg1.gif" align="center" colspan="7"><font class="BlackS12"><b>文 章 资 源 管 理</b></font></td>
</tr>
<tr>
<td width="600" height="10" bgcolor="#FFFFFF" colspan="7"></td>
</tr>
<tr>
<td width="41" height="26" bgcolor="#EAFBF5" align="center"><font class="BlackS12">编号</font></td>
<td width="38" height="26" bgcolor="#EAFBF5" align="center"><font class="BlackS12">选择</font></td>
<td width="270" height="26" bgcolor="#EAFBF5" align="center"><font class="BlackS12">文章标题</font></td>
<td width="68" height="26" bgcolor="#EAFBF5" align="center"><font class="BlackS12">整理日期</font></td>
<td width="68" height="26" bgcolor="#EAFBF5" align="center"><font class="BlackS12">所属类别</font></td>
<td width="68" height="26" bgcolor="#EAFBF5" align="center"><font class="BlackS12">所属分类</font></td>
<td width="38" height="26" bgcolor="#EAFBF5" align="center"><font class="BlackS12">编辑</font></td>
</tr>
<%
if rsLi3.bof and rsLi3.eof then
Response.write "<tr><td width=""600"" height=""40"" bgcolor=""#FFFFFF"" colspan=""9""> <font class=""SilverS12"">没有找到相关数据</font></td></tr>"
else
dim GuPagei:GuPagei=1
GuPageStart=(GuPage-1)*GuPageSize
do while not rsLi3.eof
if GuPagei>GuPageStart then
%>
<tr bgcolor="#FFFFFF" onMouseOver="this.style.backgroundColor='#EAFBF5'" onMouseOut="this.style.backgroundColor='#FFFFFF'">
<td width="41" height="26" align="center"><%if rsLi3("Ar_Show")=1 then%><font class="BlackS12" title="编号:<%=rsLi3("Ar_ID")%> 状态:显示"><%else%><font class="SilverS12" title="编号:<%=rsLi3("Ar_ID")%> 状态:已设隐藏"><%end if%><%=rsLi3("Ar_ID")%></font></td>
<td width="38" height="26" align="center"><input type="checkbox" name="GuResourceID" value="<%=rsLi3("Ar_ID")%>"></td>
<td width="270" height="26"> <a href="Article.asp?ID=<%=rsLi3("Ar_ID")%>" target="_blank" style="color:<%=rsLi3("Ar_NameColor")%>" class="BlackV12" title="<%=rsLi3("Ar_Name")%> [<%=rsLi3("Ar_Username")%>][<%=rsLi3("Ar_IP")%>]"><%=GuStringCut(rsLi3("Ar_Name"),38)%></a></td>
<td width="68" height="26" align="center"><%
if rsLi3("Ar_DateTime")=Date() then
Response.write "<font class=""RedS12"" title="""&year(rsLi3("Ar_DateTime"))&"年"&month(rsLi3("Ar_DateTime"))&"月"&day(rsLi3("Ar_DateTime"))&"日"">"&right(year(rsLi3("Ar_DateTime")),2)&"-"&month(rsLi3("Ar_DateTime"))&"-"&day(rsLi3("Ar_DateTime"))&""
else
Response.write "<font class=""BlackS12"" title="""&year(rsLi3("Ar_DateTime"))&"年"&month(rsLi3("Ar_DateTime"))&"月"&day(rsLi3("Ar_DateTime"))&"日"">"&right(year(rsLi3("Ar_DateTime")),2)&"-"&month(rsLi3("Ar_DateTime"))&"-"&day(rsLi3("Ar_DateTime"))&""
end if
%></font></td>
<td width="68" height="26" align="center"><%
dim rsSo2
set rsSo2=Server.CreateObject("Adodb.RecordSet")
GuSQL="select So_ID,So_Name from "&GuTablePrefix&"_Sort where So_ID="&rsLi3("Ar_SortID")
rsSo2.open GuSQL,GuConn,1,1
if Len(rsSo2("So_Name"))>4 then
Response.write "<a href=""Admin_List.asp?So="&rsSo2("So_ID")&""" title="""&rsSo2("So_Name")&""" class=""BlackS12"">"&Left(rsSo2("So_Name"),3)&"..</a>"
else
Response.write "<a href=""Admin_List.asp?So="&rsSo2("So_ID")&""" title="""&rsSo2("So_Name")&""" class=""BlackS12"">"&rsSo2("So_Name")&"</a>"
end if
rsSo2.close
set rsSo2=Nothing
%></td>
<td width="68" height="26" align="center"><%
dim rsAS2
set rsAS2=Server.CreateObject("Adodb.RecordSet")
GuSQL="select AS_ID,AS_SortID,AS_Name from "&GuTablePrefix&"_AsSort where AS_ID="&rsLi3("Ar_AsSortID")
rsAS2.open GuSQL,GuConn,1,1
if Len(rsAS2("AS_Name"))>4 then
Response.write "<a href=""Admin_List.asp?So="&rsAS2("AS_SortID")&"&AS="&rsAS2("AS_ID")&""" title="""&rsAS2("AS_Name")&""" class=""BlackS12"">"&Left(rsAS2("AS_Name"),3)&"..</a>"
else
Response.write "<a href=""Admin_List.asp?So="&rsAS2("AS_SortID")&"&AS="&rsAS2("AS_ID")&""" title="""&rsAS2("AS_Name")&""" class=""BlackS12"">"&rsAS2("AS_Name")&"</a>"
end if
rsAS2.close
set rsAS2=Nothing
%></td>
<td width="38" height="26" align="center"><a href="Admin_Article.asp?GuComm=Mo&ArticleID=<%=rsLi3("Ar_ID")%>"><img src="Images/Admin_Modify.gif" border="0" width="16" height="16" title="编辑文章详细信息"></a></td>
</tr>
<%
end if
GuPagei=GuPagei+1
if GuPagei>GuPageStart+GuPageSize then
exit do
end if
rsLi3.movenext
loop
end if
rsLi3.close
set rsLi3=Nothing
%>
<tr>
<td width="600" height="4" bgcolor="#FFFFFF" colspan="7"></td>
</tr>
<tr>
<td width="600" height="32" bgcolor="#FFFFFF" colspan="7"><table border="0" width="580" height="20"><tr><td height="20" width="200"> <select name="GuComm" size="1" style="width:;background-color:#FFFFFF;" class="Admin_Select" onchange="JavaScript:AdminListMenuShow();">
<option value="" selected>操作选项...</option>
<option value="CommNameColor">设置文章标题颜色</option>
<option value="CommSortAsSort">更改文章类别分类</option>
<option value="CommDateTime">更改文章整理日期</option>
<option value="CommShow1">设置文章显示</option>
<option value="CommShow0">设置文章隐藏</option>
<option value="CommCommend">设置栏目推荐</option>
<option value="CommReadClear">清除文章阅读次数</option>
<option value="CommDelete">删除文章</option>
</select></td><td height="20" width="380"><div id="Admin_List_Ar_Commend" style="display:none;"><input type="checkbox" name="Ar_CommendB" id="Ar_CommendB" value="1"><label for="Ar_CommendB"><span id="JS_Ar_CommendB" class="BlackS12" title="设置在首页推荐栏目显示">首页推荐</span></label></div><div id="Admin_List_Ar_NameColor" style="display:none;"><select name="Ar_NameColor_Select" size="1" class="Admin_Select" style="width:;background-color:#FFFFFF;">
<option value="" selected>选择...</option>
<%
dim ArticleNameColor3,lii2
ArticleNameColor3=split(GuNameColorDefault,"|")
for lii2 = 0 to ubound(ArticleNameColor3)
Response.write "<option value="""&Trim(ArticleNameColor3(lii2))&""" style=""color:"&Trim(ArticleNameColor3(lii2))&""">"&Trim(ArticleNameColor3(lii2))&"</option>"
next
%>
</select></div><div id="Admin_List_Ar_DateTime" style="display:none;"><input type="text" name="Ar_DateTime" Maxlength="10" value="<%=date()%>" class="Admin_InputText" style="width:80;background-color:#FFFFFF;" onclick="GuDateSelect(Ar_DateTime,'','',Ar_DateTime)" readonly></div><div id="Admin_List_Ar_SOAS" style="display:none;"><%
dim rsAS3,count
set rsAS3=Server.CreateObject("Adodb.RecordSet")
GuSQL="select * from "&GuTablePrefix&"_AsSort order by AS_Order asc"
rsAS3.open GuSQL,GuConn,1,1
%><Script Language = "JavaScript">
<!--
var onecount;
onecount=0;
AsSortID_L = new Array();
<%count = 0
do while not rsAS3.eof %>
AsSortID_L[<%=count%>] = new Array("<%=rsAS3("AS_Name")%>","<%=rsAS3("AS_SortID")%>","<%=rsAS3("AS_ID")%>");<%count = count + 1
rsAS3.movenext
loop
rsAS3.close
set rsAS3=Nothing
%>
onecount=<%=count%>;
function Sort_Select(AsSortID_S){
document.Admin_List.AsSortID_Select.length = 0;
var AsSortID_S=AsSortID_S;
var i;
for (i=0;i < onecount; i++)
{
if (AsSortID_L[i][1] == AsSortID_S)
{
document.Admin_List.AsSortID_Select.options[document.Admin_List.AsSortID_Select.length] = new Option(AsSortID_L[i][0], AsSortID_L[i][2]);
}
}
}
//-->
</Script><select name="SortID_Select" onChange="Sort_Select(document.Admin_List.SortID_Select.options[document.Admin_List.SortID_Select.selectedIndex].value)" size="1" class="Admin_Select" style="background-color:#FFFFFF;"><option value="">文章类别</option><%
dim rsSo4
set rsSo4=Server.CreateObject("Adodb.RecordSet")
GuSQL="select * from "&GuTablePrefix&"_Sort where So_Type='Sort' order by So_Order asc"
rsSo4.open GuSQL,GuConn,1,1
if rsSo4.eof and rsSo4.bof then
Response.write "..."
else
do while not rsSo4.eof
Response.write "<option value="""&rsSo4("So_ID")&""">"&rsSo4("So_Name")&"</option>"
rsSo4.movenext
loop
end if
rsSo4.close
set rsSo4=Nothing
%></select>
<select name="AsSortID_Select" size="1" class="Admin_Select" style="background-color:#FFFFFF;"><option value="">分类...</option><%
dim rsAS4
set rsAS4=Server.CreateObject("Adodb.RecordSet")
GuSQL="select * from "&GuTablePrefix&"_AsSort order by AS_Order asc"
rsAS4.open GuSQL,GuConn,1,1
if rsAS4.eof and rsAS4.bof then
Response.write "..."
else
do while not rsAS4.eof
Response.write "<option value="""&rsAS4("AS_ID")&""">"&rsAS4("AS_Name")&"</option>"
rsAS4.MoveNext
Loop
end if
rsAS4.close
set rsAS4=Nothing
%></select></div></td></tr></table></td>
</tr>
<tr>
<td width="600" height="38" bgcolor="#FFFFFF" colspan="7" align="right"><input type="button" name="Admin_Button_Reload" class="Admin_Button_Reload" onclick="window.location.reload();"> <input type="submit" name="Submit" value="" class="Admin_Button_OK"> <input type="button" name="Admin_Button_SelectAll" onclick="JavaScript:GuSelectAll(document.Admin_List.GuResourceID);" class="Admin_Button_SelectAll"> <input type="button" name="Admin_Button_SelectReverse" Class="Admin_Button_SelectReverse" onclick="JavaScript:GuSelectReverse(document.Admin_List.GuResourceID);"> <input type="button" name="Admin_Button_SelectClear" class="Admin_Button_SelectClear" onclick="JavaScript:GuSelectClear(document.Admin_List.GuResourceID);"> </td>
</tr>
<tr>
<td width="600" height="28" bgcolor="#FFFFFF" colspan="7" align="right"><table border="0" width="500" height="22"><tr><td align="right" valign="bottom"><%
if GuPage>1 then
Response.write "<a href=""Admin_List.asp?So="&Trim(Request.QueryString("So"))&"&AS="&Trim(Request.QueryString("AS"))&"&CT="&Trim(Request.QueryString("CT"))&"&NC="&Trim(Request.QueryString("NC"))&"&SH="&Trim(Request.QueryString("SH"))&"&UP="&Trim(Request.QueryString("UP"))&"&GuKeyword="&Trim(Request.QueryString("GuKeyword"))&"&GuPage=1"" class=""BlackS12"">『首页』</a>"
Response.write "<a href=""Admin_List.asp?So="&Trim(Request.QueryString("So"))&"&AS="&Trim(Request.QueryString("AS"))&"&CT="&Trim(Request.QueryString("CT"))&"&NC="&Trim(Request.QueryString("NC"))&"&SH="&Trim(Request.QueryString("SH"))&"&UP="&Trim(Request.QueryString("UP"))&"&GuKeyword="&Trim(Request.QueryString("GuKeyword"))&"&GuPage="&(GuPage-1)&""" class=""BlackS12"">『上页』</a>"
else
Response.write "<font class=""SilverS12"">『首页』『上页』</font>"
end if
if GuPage<GuPageTotal then
Response.write "<a href=""Admin_List.asp?So="&Trim(Request.QueryString("So"))&"&AS="&Trim(Request.QueryString("AS"))&"&CT="&Trim(Request.QueryString("CT"))&"&NC="&Trim(Request.QueryString("NC"))&"&SH="&Trim(Request.QueryString("SH"))&"&UP="&Trim(Request.QueryString("UP"))&"&GuKeyword="&Trim(Request.QueryString("GuKeyword"))&"&GuPage="&(GuPage+1)&""" class=""BlackS12"">『下页』</a>"
Response.write "<a href=""Admin_List.asp?So="&Trim(Request.QueryString("So"))&"&AS="&Trim(Request.QueryString("AS"))&"&CT="&Trim(Request.QueryString("CT"))&"&NC="&Trim(Request.QueryString("NC"))&"&SH="&Trim(Request.QueryString("SH"))&"&UP="&Trim(Request.QueryString("UP"))&"&GuKeyword="&Trim(Request.QueryString("GuKeyword"))&"&GuPage="&GuPageTotal&""" class=""BlackS12"">『尾页』</a>"
else
Response.write "<font class=""SilverS12"">『下页』『尾页』</font>"
end if
%></td></tr></table></td>
</tr>
<tr>
<td width="600" height="30" bgcolor="#FFFFFF" colspan="7" align="right"><%
Response.write "<font class=""BlackS12"">当前分类:"&ArticleSortName&"</font>"
Response.write " <font class=""BlackS12"">共有<font class=""LightgrayG12"">"&GuPageCount&"</font>篇文章</font> <font class=""LightgrayG12"">"&GuPageSize&"</font><font class=""BlackS12"">篇文章/页</font>"
Response.write " <font class=""BlackS12"">页次:</font><font class=""BlueG12"">"&GuPage&"</font><font class=""BlackG12"">/"&GuPageTotal&"</font>"
Response.write " <font class=""BlackS12"">转到:</font>"
Response.write "<select name=""GuPage"" size=""1"" style=""width:;background-color:#FFFFFF;"" class=""Admin_Select"" onChange=""JavaScript:window.open(this.options[this.selectedIndex].value,'_self')"">"
for GuPagei=1 to GuPageTotal
if GuPagei=GuPage then
Response.write "<option value=""Admin_List.asp?So="&Trim(Request.QueryString("So"))&"&AS="&Trim(Request.QueryString("AS"))&"&CT="&Trim(Request.QueryString("CT"))&"&NC="&Trim(Request.QueryString("NC"))&"&SH="&Trim(Request.QueryString("SH"))&"&UP="&Trim(Request.QueryString("UP"))&"&GuKeyword="&Trim(Request.QueryString("GuKeyword"))&"&GuPage="&GuPagei&""" selected>第"&GuPagei&"页</option>"
else
Response.write "<option value=""Admin_List.asp?So="&Trim(Request.QueryString("So"))&"&AS="&Trim(Request.QueryString("AS"))&"&CT="&Trim(Request.QueryString("CT"))&"&NC="&Trim(Request.QueryString("NC"))&"&SH="&Trim(Request.QueryString("SH"))&"&UP="&Trim(Request.QueryString("UP"))&"&GuKeyword="&Trim(Request.QueryString("GuKeyword"))&"&GuPage="&GuPagei&""">第"&GuPagei&"页</option>"
end if
next
Response.write "</select>"
%> </td>
</tr>
</form>
</table>
<%end sub%>
<br><br>
<!--#include file="Include/Message.asp"-->
</body>
</html>
<%CloseDatabase%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -