⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 admin_specialmana.asp

📁 青岛dj站程序,带后台管理 名字和密码都是:admin
💻 ASP
字号:
<!--#include file="function.asp"-->
<%CheckAdmin1%>
<!--#include file="conn.asp"-->
<!--#include file="const.asp"-->
<%
if not isempty(request("page")) and request("page")<>"" then
	currentPage=cint(request("page"))
else
	currentPage=1
end if
if request.QueryString("classid")<>"" then
	classid=int(request.QueryString("classid"))
else
	classid=""
end if
%>
<!--#include file="top.asp"-->

<div align="center">
  <center>

<table border="0" width="750" cellspacing="0" cellpadding="0" style="border-collapse: collapse" bordercolor="#111111" height="145">
  <tr>
    <td valign=top width="5" background="images/line_bg02.gif" height="163"></td>
    <td valign=top width="175" height="163"><!--#include file="admin_left.asp"--></td>
    <td valign=top width="5" background="images/line_bg02.gif" height="163"> </td>
    <td align=center valign=top width="551" height="163">
<%
if Classid<>"" then
	sql="select * from special where classid="+cstr(Classid)+" order by Specialid desc" 
else
	sql="select * from special order by Specialid desc" 
end if
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1
if rs.eof and rs.bof then 
	showlist
	response.write "<p align='center'>暂时没有收集</p>" 
else 
	MaxPerPage=MaxSpecialList
	PageUrl="admin_SpecialMana.asp"
	totalPut=rs.recordcount 
	if currentpage<1 then currentpage=1
	if (currentpage-1)*MaxPerPage>totalput then 
		if (totalPut mod MaxPerPage)=0 then 
			currentpage= totalPut \ MaxPerPage 
		else 
			currentpage= totalPut \ MaxPerPage + 1 
		end if 
	end if 
	if currentPage=1 then 
		showlist
		showpage totalput,MaxPerPage,PageUrl
		showContent 
		showpage totalput,MaxPerPage,PageUrl
	else 
		if (currentPage-1)*MaxPerPage<totalPut then 
			rs.move  (currentPage-1)*MaxPerPage 
			dim bookmark 
			bookmark=rs.bookmark 
			showlist
			showpage totalput,MaxPerPage,PageUrl
			showContent 
			showpage totalput,MaxPerPage,PageUrl
		else 
			currentPage=1 
			showlist
			showpage totalput,MaxPerPage,PageUrl
			showContent 
			showpage totalput,MaxPerPage,PageUrl
		end if 
	end if 
end if 
rs.close 
set rs=nothing
			
sub showContent 
i=0 
%>
            <table border="1" width="100%" cellspacing="0" cellpadding="0" class="TableLine" style="border-collapse: collapse" bordercolor="#408AC1">
              <tr>
                <td width="5%" height=22 align=center class=TFColor>序号</td>
                <td width="15%" height=22 align=center >专辑名</td>
                <td width="20%" height=22 align=center >更新日期</td>
                <td width="5%" height=22 align=center >点击</td>
                <td width="9%" height=22 align=center >首页推荐</td>
                <td width="5%" height=22 align=center >修改</td>
                <td width="5%" height=22 align=center >删除</td>
              </tr>
<%
do while not rs.eof
	i=i+1
%>
              <tr height=20>
                <td width="5%" align=center><%=totalPut-(i+MaxPerPage*(currentpage-1)-1)%> </td>
                <td width="15%"><%=rs("name")%> </td>
                <td width="20%" align=center><%=rs("dateandtime")%> </td>
                <td width="5%" align=center><%=rs("hits")%> </td>
                <td width="9%" align=center><a href="admin_SpecialSave.asp?act=SetIsGood&specialid=<%=rs("Specialid")%>&Classid=<%=rs("classid")%>&page=<%=CurrentPage%>"><%if rs("IsGood")=true then%>撤销<%else%>推荐<%end if%></a></td> 
                <td width="5%" align=center><a href="admin_Specialmodify.asp?specialid=<%=rs("specialid")%>&Classid=<%=rs("classid")%>&page=<%=CurrentPage%>">修改</a></td> 
                <td width="5%" align=center><a href="admin_SpecialDel.asp?specialid=<%=rs("specialid")%>&Classid=<%=rs("classid")%>&page=<%=CurrentPage%>">删除</a></td> 
              </tr>
<%
	if i>=MaxPerPage then exit do
rs.movenext
loop
%>
            </table>
<%
end sub 

function showpage(totalnumber,maxperpage,filename)
if totalnumber mod maxperpage=0 then
	n= totalnumber \ maxperpage
else
	n= totalnumber \ maxperpage+1
end if
%>
<form method=Post action="<%=filename%>?classid=<%=classid%>">
  <center>共<font color="<%=AlertFColor%>"><b><%=totalnumber%></b></font>个专辑
<%if CurrentPage<2 then%>
  &nbsp;首页 上一页&nbsp;
<%else%>
  &nbsp<a href="<%=filename%>?page=1&classid=<%=classid%>">首页</a>&nbsp;
  <a href="<%=filename%>?page=<%=CurrentPage-1%>&classid=<%=classid%>">上一页</a>&nbsp;
<%
end if
if n-currentpage<1 then
%>
  下一页 末页
<%else%>
  <a href="<%=filename%>?page=<%=CurrentPage+1%>&classid=<%=classid%>">下一页</a>
  <a href="<%=filename%>?page=<%=n%>&classid=<%=classid%>&">末页</a>
<%end if%>
  &nbsp;页次:<strong><font color="<%=AlertFColor%>"><%=CurrentPage%>/<%=n%></font></strong>页
  转到:<select name="page" size="1" onchange="javascript:submit()">
<%for i = 1 to n%>           
  <option value="<%=i%>" <%if cint(CurrentPage)=cint(i) then%> selected <%end if%>>第<%=i%>页</option>   
<%next%>   
  </select>        
</form>        
<%end function%>
<%
sub showList
%>
      <table border="1" width="100%" cellspacing="0" cellpadding="0" class="TableLine" style="border-collapse: collapse" bordercolor="#408AC1">
        <tr>
          <td colspan=2 width="100%" height=22 align=center class=TFColor><b>栏 目 列 表</b></td>
        <tr>
<%
'-----------------目录列表-----------------------
set Trs=server.createobject("adodb.recordset")
Tsql="select Classid,Class from Class"
Trs.open Tsql,conn,1,1
if not Trs.eof then
%>
        <tr>
          <td width=10% height=20>栏目:</td>
          <td>
<%	do while not Trs.eof%>
            <a href="admin_SpecialMana.asp?Classid=<%=Trs("Classid")%>"><%if Trs("Classid")=Classid then%><font color=<%=AlertFColor%>><%=Trs("Class")%></font><%else%><%=Trs("Class")%><%end if%></a>
<%
	Trs.movenext
	loop
%>  </td>
        </tr>
<%
end if
Trs.close
set Trs=nothing
%>
      </td>
    </table><br>
    <%end sub%>
    </td>
    <td align=center valign=top width="5" background="images/line_bg02.gif" height="163">
 </td>
  </tr>
  <tr>
    <td valign=top width="741" background="images/line_bg01.gif" colspan="5" height="1">
    <img border="0" src="images/line_bg01.gif"></td>
    </tr>
  </table>

  </center>
</div>

</div>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -