listserver.asp
资源名称:qnmov30.rar [点击查看]
上传用户:qyswxdl
上传日期:2013-06-01
资源大小:1373k
文件大小:11k
源码类别:
家庭/个人应用
开发平台:
ASP/ASPX
- <!--#include file="articleconn.asp"-->
- <!--#include file="../checkpost.asp"-->
- <!--#include file="security.asp"-->
- <%if session("flag")>2 then
- response.write "<br><p align=center>您的操作权限不够!</p>"
- response.end
- end if
- %>
- <html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
- <meta name="GENERATOR" content="Microsoft FrontPage 5.0">
- <meta name="ProgId" content="FrontPage.Editor.Document">
- <link rel="stylesheet" type="text/css" href="inc/Admin_STYLE.CSS">
- <title>管理页</title>
- <script language="javascript">
- function makesort(typeid)
- {
- var filename="makesort.asp?page=1&typeid="+typeid;
- window.open(filename,"显示窗口","scrollbars=yes,width=300,height=100,status=yes,resizable=no");
- }
- function makesoft(id)
- {
- var filename="makesoft.asp?id="+id;
- window.open(filename,"显示窗口","scrollbars=yes,width=300,height=100,status=yes,resizable=no");
- }
- function makeallsort(id)
- {
- if(confirm("确定要使用本功能吗?将占用大量CPU时间")==true)
- {
- var filename="makeallsort.asp"
- window.open(filename,"显示窗口","scrollbars=yes,width=300,height=100,status=yes,resizable=no");
- }
- }
- function makeallsoft()
- {
- if(confirm("确定要使用本功能吗?将占用大量CPU时间")==true)
- {
- var filename="makeallsoft.asp?Dtype=all";
- window.open(filename,"显示窗口","scrollbars=yes,width=300,height=100,status=yes,resizable=no");
- }
- }
- function dfile(id)
- {
- if(confirm("确定要删除吗?")==true)
- {
- var filename="delfile.asp?id="+id;
- window.open(filename,"显示窗口","scrollbars=yes,width=300,height=100,status=yes,resizable=no");
- }
- }
- function CheckAll(v)
- {
- var i;
- for (i=0;i<document.forms.elements.length;i++)
- {
- var e = document.forms.elements[i];
- e.checked = v;
- }
- }
- function OnDelete()
- {
- var del, a, i;
- del = new String("");
- for(i = 0; i < document.forms.elements.length ; i ++)
- {
- var e = document.forms.elements[i];
- if(e.name == 'selAnnounce')
- {
- if ( e.checked == true)
- {
- a = e.value;
- del = del + a + ";";
- }
- };
- }
- if(del == "")
- {
- alert("请选择要删除的电影")
- }
- else
- {
- if(confirm("确定要删除吗?")==true)
- {
- document.forms.submit();
- }
- }
- }
- //-->
- </script>
- <style type="text/css">
- <!--
- .样式1 {
- color: #FFFFFF;
- font-weight: bold;
- }
- .样式2 {color: #FFFFFF}
- -->
- </style>
- </head>
- <body leftmargin="0" topmargin="0">
- <%
- MaxPerPage=20
- dim totalPut
- dim CurrentPage
- dim TotalPages
- dim i,j
- dim typename
- serv=request("serv")
- typename=""
- if not isempty(request("page")) then
- currentPage=cint(request("page"))
- else
- currentPage=1
- end if
- dim sql
- dim rs
- dim rstype
- dim typesql
- dim typeid,typename1
- if not isEmpty(Replace(request("typeid"), "'", "''")) then
- typeid=Replace(request("typeid"), "'", "''")
- else
- typeid=""
- end if
- if request("page")="" then
- page=0
- end if
- %> <center>
- <!--#include file="top1.asp"-->
- <table border="0" width="100%" cellspacing="0" cellpadding="0">
- <tr>
- <td width="100%" height="83">
- <form method="POST" action="manage.asp">
- <div align="center"><b>电影名称:</b>
- <input type="text" name="moviename" size="20">
- <input type="submit" value="查询">
- </div>
- </form>
- <table cellpadding="2" cellspacing="1" border="0" width="100%" class="border" align=center>
- <tr>
- <td><div align="left">
- <div align="center">|
- <%
- set rst=server.createobject("adodb.recordset")
- rst.open "select * from type",conn,1
- if rst.EOF then
- response.write "没有栏目:"
- else
- %>
- <a href="manage.asp">全部电影</a>|
- <%do while NOT rst.EOF%>
- <a href="manage.asp?typeid=<%=rst("type")%>"><%=rst("type")%></a>|
- <%
- rst.MoveNext
- loop
- end if
- rst.close
- set rst=nothing
- %>
- </div>
- <br>
- <div align="center"> |
- <%
- set rst1=server.createobject("adodb.recordset")
- rst1.open "select * from movie",conn,1
- if rst1.EOF then
- response.write "没有服务器"
- else
- do while NOT rst1.EOF
- i=i+1
- %>
- <a href="listserver.asp?serv=<%=rst1("id")%>">第<%=i%>号服务器</a>|
- <%
- rst1.MoveNext
- loop
- end if
- rst1.close
- set rst1=nothing
- %>
- </div>
- </div></td>
- </tr>
- </table>
- </td>
- </tr>
- </table>
- <%
- if typeid="" and request("moviename")="" then
- sql="select * from learning where serverip="&serv&" order by articleid desc"
- else if request("moviename")<>"" then
- sql="select articleid,title,serverip,name from learning where title like '%"&request("moviename")&"%' order by articleid desc"
- else
- sql="select articleid,title,serverip,name from learning where typeid='"+typeid+"' order by articleid 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
- totalPut=rs.recordcount
- 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,"listserver.asp"
- showContent
- showpage totalput,MaxPerPage,"listserver.asp"
- else
- if (currentPage-1)*MaxPerPage<totalPut then
- rs.move (currentPage-1)*MaxPerPage
- dim bookmark
- bookmark=rs.bookmark
- showpage totalput,MaxPerPage,"listserver.asp"
- showContent
- showpage totalput,MaxPerPage,"listserver.asp"
- else
- currentPage=1
- showpage totalput,MaxPerPage,"listserver.asp"
- showContent
- showpage totalput,MaxPerPage,"listserver.asp"
- end if
- end if
- end if
- sub showContent
- dim i
- i=0
- %>
- <table border="0" cellspacing="1" width="100%" class="border" bordercolorlight="#000000" bordercolordark="#FFFFFF" cellpadding="0" height="48">
- <form method="Post" action="gmovie.asp?page=<%=request("page")%>&typeid=<%=request("typeid")%>" name="forms">
- <tr>
- <td width="76" height="21" align="center" bgcolor="#429AEF"><span class="样式1"> ID号</span></td>
- <td width="327" height="21" align="center" bgcolor="#429AEF"><span class="样式1"> 电影名称</span></td>
- <td width="233" height="21" align="center" bgcolor="#429AEF"><span class="样式1">隶属服务器 </span></td>
- <td width="104" height="21" align="center" bgcolor="#429AEF"><div align="center" class="样式1">修改 </div></td>
- <td width="109" height="21" align="center" bgcolor="#429AEF"><span class="样式2"><b>删除 </b></span></td>
- <td width="135" height="21" align="center" bgcolor="#429AEF"> <font color="#FFFFFF">
- <input name="chkall" onClick="CheckAll(document.forms.chkall.checked)" type="checkbox" value="on">
- 全 选/
- <input name="act" type="submit" title="生成选定软件的HTML页" onClick="{if(confirm('确定删除选定电影吗!?')){this.document.forms.submit();return true;}return false;}" value="删除">
- </font></td>
- </tr>
- <%do while not rs.eof%>
- <tr>
- <td width="76" height="23" class="tdbg">
- <p align="center"><%=rs("articleid")%>
- </td>
- <td width="327" height="23" align=center class="tdbg"><div align="left">·<a href="../movie.asp?id=<%=rs("articleid")%>." target="_blank"><%=rs("title")%></a></div></td>
- <td width="233" height="23" class="tdbg"><div align="center">
- <div align="center"><%
- set rs4=server.createobject("adodb.recordset")
- rs4.open "select * from movie",conn,1,1
- dim c
- c=1
- do while not rs4.eof
- if rs4("id")=rs("serverip") then%> <a href=listserver.asp?serv=<%=rs("serverip")%>><%=c%>号服务器</a> <% end if
- c=c+1
- rs4.movenext
- loop
- rs4.close
- set rs4=nothing
- %></div>
- </div></td>
- <td width="104" height="23" class="tdbg">
- <p align="center">
- </a><a href="edit.asp?id=<%=rs("articleid")%>"><font color="#000000">修改</font></a></td>
- <td width="109" height="23" class="tdbg"> <div align="center"><a href="delete.asp?articleid=<%=rs("articleid")%>"><font color="#000000">删除</font></a></div></td>
- <td width="135" height="23" align="center" class="tdbg"><input type="checkbox" name="selAnnounce" value="<%=rs("articleid")%>">
- </td>
- </tr>
- <% i=i+1
- if i>=MaxPerPage then exit do
- rs.movenext
- loop
- %>
- </form>
- </table>
- <%
- end sub
- 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 "<form method=Post action="&filename&"?typeid="&typeid&"&serv="&serv&">"
- if CurrentPage<2 then
- response.write "<font color='#000080'>首页 上一页</font> "
- else
- response.write "<a href="&filename&"?page=1&typeid="&typeid&"&serv="&serv&">首页</a> "
- response.write "<a href="&filename&"?page="&CurrentPage-1&"&typeid="&typeid&"&serv="&serv&">上一页</a> "
- end if
- if n-currentpage<1 then
- response.write "<font color='#000080'>下一页 尾页</font>"
- else
- response.write "<a href="&filename&"?page="&(CurrentPage+1)&"&typeid="&typeid&"&serv="&serv&">"
- response.write "下一页</a> <a href="&filename&"?page="&n&"&typeid="&typeid&"&serv="&serv&">尾页</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>个电影 <b>"&maxperpage&"</b>个电影/页</font> "
- response.write " <font color='#000080'>转到:</font><input type='text' name='page' size=4 maxlength=10 class=smallInput value="¤tpage&">"
- response.write " <input class=buttonface type='submit' value='Goto' name='cndok'></span></p></form>"
- end function
- rs.close
- set rs=nothing
- conn.close
- set conn=nothing
- %></p>
- </body>
- </html>