📄 admin_softclass.asp
字号:
<!--#include file="conn.asp"-->
<!--#include file="config.asp"-->
<!--#include file="admin_loginchk.asp"-->
<%admin2%>
<%if request("action")="setshow" then
set rs=server.createobject("adodb.recordset")
sql="select show from download where id="&request("id")
rs.open sql,conn,1,3
if not rs.eof then
if rs("show")=true then
rs("show")=false
else
rs("show")=true
end if
rs.update
end if
rs.close
end if
%>
<%if request("action")="del" then
conn.execute("delete * from download where id="&request("id")&"")
end if
%>
<%
classid=request("classid")
nclassid=request("nclassid")
showname=trim(request("showname"))
%>
<title>flash动画管理</title>
<!--#include file="top.asp"-->
<table border="0" width="99%" cellspacing="1" cellpadding="1" style="margin-top:6px;margin-bottom:6px" align="center">
<tr>
<td valign=top width="20%" style="border:1px solid black;" bgcolor="#999999">
<!--#include file="admin_left.asp"-->
</td>
<td align=center valign=top>
<table border="0" cellpadding="4" cellspacing="1" width="98%" align="center" bgcolor="#333333">
<tr align="center" bgcolor="#999999">
<td colspan="2">flash动画管理</td>
</tr>
<tr align="center" bgcolor="#CCCCCC">
<td align="center" valign="top" bgcolor="#CCCCCC" width="83%"> <br>
<form name="form1" method="post" action="admin_softclass.asp?classid=<%=classid%>&nclassid=<%=nclassid%>">
<table border="0" cellpadding="4" cellspacing="1" width="99%" align="center" bgcolor="#333333">
<tr align="left" bgcolor="#999999">
<td bgcolor="#99CCFF" width="26%" align="right" >flash动画名:</td>
<td bgcolor="#99CCFF" width="56%" >
<input type="text" name="showname" size="16">
<input type="submit" name="Submit" value="查询">
</td>
<td bgcolor="#FFFFCC" width="5%" align="center" > </td>
<td bgcolor="#9966FF" width="13%" ><a href="admin_softclass.asp"><font color="#FFFFFF"><b>全部动画</b></font></a></td>
</tr>
</table>
</form>
<br>
<table border="0" cellpadding="4" cellspacing="1" width="99%" align="center" bgcolor="#333333">
<tr align="left" bgcolor="#999999">
<td height="24">
<%if showname="" then%>
<%if nclassid<>"" then %>
你当前看到的flash动画位于<font color="#FF0000">
<%classname(classid)%>
</font>>><font color="#FF0000">
<%nclass(nclassid)%>
</font>
<%elseif classid<>"" then %>
你当前看到的flash动画位于<font color="#FF0000">
<%classname(classid)%>
</font>
<%else %>
你当前看到的flash动画是本站的<font color="#FF0000">全部flash动画</font>
<%end if %>
<%else %>
<%if nclassid<>"" then %>
你当前看到的flash动画位于<font color="#FF0000">
<%classname(classid)%>
</font>>><font color="#FF0000">
<%nclass(nclassid)%>
</font>>>你查询的关键字为<b><font color="#FF0000"><%=showname%></font> </b>
<%elseif classid<>"" then %>
你当前看到的flash动画位于<font color="#FF0000">
<%classname(classid)%>
</font>>>你查询的关键字为<b><font color="#FF0000"><%=showname%></font> </b>
<%else %>
你当前看到的flash动画是本站的<font color="#FF0000">全部flash动画</font>>>你查询的关键字为<b><font color="#FF0000"><%=showname%></font> </b>
<%end if %>
<%end if %>
</td>
</tr>
<tr align="center" bgcolor="#CCCCCC">
<td align="center" valign="top">
<table width="99%" border="0" cellpadding="2">
<tr>
<td bgcolor="#CCCCCC" align="center">
<%
if not isempty(request("page")) then
currentPage=cint(request("page"))
else
currentPage=1
end if
const MaxPerPage=5
if showname="" then
if nclassid<>"" then
sql="select * from download where nclassid="&nclassid&" order by id desc"
elseif classid<>"" then
sql="select * from download where classid="&classid&" order by id desc"
else
sql="select * from download order by id desc"
end if
else
cxun="%"&showname&"%"
if nclassid<>"" then
sql="select * from soft where nclassid="&nclassid&" and showname like '"&cxun&"' order by id desc"
elseif classid<>"" then
sql="select * from soft where classid="&classid&" and showname like '"&cxun&"' order by id desc"
else
sql="select * from soft where showname like '"&cxun&"' order by id desc"
end if
end if
Set rs= Server.CreateObject("ADODB.Recordset")
rs.open sql,conn,1,1
if rs.eof and rs.bof then
response.write "<p align='center'> 还 没 有 任 何 软 件 </p>"
else
urlname="admin_softclass.asp"
totalPut=rs.recordcount
if currentpage<1 then
currentpage=1
end if
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
showpage totalput,MaxPerPage,urlname
showContent
showpage totalput,MaxPerPage,urlname
else
if (currentPage-1)*MaxPerPage<totalPut then
rs.move (currentPage-1)*MaxPerPage
dim bookmark
bookmark=rs.bookmark
showpage totalput,MaxPerPage,urlname
showContent
showpage totalput,MaxPerPage,urlname
else
currentPage=1
showpage totalput,MaxPerPage,urlname
showContent
showpage totalput,MaxPerPage,urlname
end if
end if
rs.close
end if
sub showContent
dim i
i=0
%>
<table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#0066FF">
<tr bgcolor="#99CCFF" align="center">
<td width="47%">flash动画名称</td>
<td width="8%">显示</td>
<td width="12%">大分类</td>
<td width="13%">小分类</td>
<td width="10%">修改</td>
<td width="10%">删除</td>
</tr>
<%do while not rs.eof%>
<tr bgcolor="#CCCCCC">
<td width="47%"><%=rs("showname" )%></td>
<td width="8%" align="center">
<a href="admin_softclass.asp?id=<%=rs("id")%>&action=setshow">
<%'if rs("show")=true then%>
否
<%'else %>
是
<%'end if %></a>
</td>
<td width="12%" align="center">
<%'classname(rs("classid"))%>
</td>
<td width="13%" align="center">
<%'nclass(rs("nclassid"))%>
</td>
<td width="10%" align="center"><a href="admin_softmodi.asp?id=<%=rs("id")%>&classid=<%=rs("classid")%>&sid=<%'=rs("sid")%>&nclassid=<%=rs("nclassid")%>">修改</a></td>
<td width="10%" align="center"><a href="admin_softclass.asp?id=<%=rs("id")%>&action=del">删除</a></td>
</tr>
<%
i=i+1
if i>=MaxPerPage then exit do
rs.movenext
loop%>
</table>
<BR>
<%
end sub
%>
</td>
</tr>
</table>
</td>
</tr>
<tr align="left" valign="top" bgcolor="#CCCCCC">
<td><font color="#990033">说明:</font><br>
1.你点击右边的flash动画栏目中的紫色的大分类后,显示的将是对应的大分类下面的flash动画,你可以对其进行操作。<br>
2.同样,你点击浅红色的小分类后,显示的将是对应小分类下面的flash动画。<br>
3.如果要返回到全部flash动画的状态下,点击查询后面的全部flash动画<br>
4.查询功能:在对应的栏目下显示的将是对应目录下的查询,比喻说,在大分类下,键入查询,查询后,出现的都是在本大分类的flash动画,如果在全部flash动画状态下,显示的也就是对全部flash动画的查询。<br>
</td>
</tr>
</table>
</td>
<td align="center" valign="top" bgcolor="#CCCCCC" width="17%"> <br>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td bgcolor="#0000FF" align="center"><b><font color="#FFFFFF">动画栏目</font></b></td>
</tr>
<tr>
<td>
<%set ms=server.createobject("adodb.recordset")
sql="select * from Aclass"
ms.open sql,conn,1,1
do while not ms.eof %>
<br>
<table width="90%" border="0" cellspacing="1" cellpadding="1" align="center" bgcolor="#333333">
<tr>
<td bgcolor="#CC99FF" align="center"><a href="admin_softclass.asp?classid=<%=ms("classid")%>"><%=ms("class")%></a></td>
</tr> <% set ts=server.createobject("adodb.recordset")
sql="select * from ANclass where classid="&ms("classid")
ts.open sql,conn,1,1
do while not ts.eof %><tr>
<td height="16" align="center" bgcolor="#FFCCCC"><a href="admin_softclass.asp?nclassid=<%=ts("nclassid")%>&classid=<%=ms("classid")%>"><%=ts("Nclass")%></a></td>
</tr>
<% ts.movenext
loop
ts.close
%>
</table><br>
<% ms.movenext
loop
ms.close
%>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
<!--#include file="copyright.asp"-->
<%
function showpage(totalnumber,maxperpage,filename)
dim n
if totalnumber mod maxperpage=0 then
n= totalnumber \ maxperpage
else
n= totalnumber \ maxperpage+1
end if
response.write "<p align='center'> "
if CurrentPage<2 then
response.write "<font color='#000080'>首页 上一页</font> "
else
response.write "<a href="&filename&"?classid="&classid&"&nclassid="&nclassid&"&showname="&showname&"&page=1>首页</a> "
response.write "<a href="&filename&"?classid="&classid&"&nclassid="&nclassid&"&showname="&showname&"&page="&CurrentPage-1&">上一页</a> "
end if
if n-currentpage<1 then
response.write "<font color='#000080'>下一页 尾页</font>"
else
response.write "<a href="&filename&"?classid="&classid&"&nclassid="&nclassid&"&showname="&showname&"&page="&(CurrentPage+1)&">"
response.write "下一页</a> <a href="&filename&"?classid="&classid&"&nclassid="&nclassid&"&showname="&showname&"&page="&n&">尾页</a>"
end if
response.write "<font color='#000080'> 页次:</font><strong><font color=red>"&CurrentPage&"</font><font color='#000080'>/"&n&"</strong>页</font> "
response.write "<font color='#000080'> 共<b>"&totalnumber&"</b>个flash动画 <b>"&maxperpage&"</b>个flash动画/页</font> "
end function
%>
<br>
<% conn.close
set conn=nothing
%>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -