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

📄 manage.asp

📁 《Web数据库技术》-高晗-vod点播系统程序源代码
💻 ASP
字号:
<!--#include file="conn.asp"-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 6.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<link rel="stylesheet" type="text/css" href="css/css.css">
<title>电影修改</title>
</head>
<LINK href="images/forum_admin.css" type=text/css rel=stylesheet>
<body  leftmargin="0" topmargin="0">
<TABLE class=tableBorder height=1 cellSpacing=1 cellPadding=5 width="100%" 
align=center border=0>
  <TBODY>
<TR>
    <TH height=25 style="background-image: url('images/admin_bg_1.gif')">&nbsp;&nbsp;<b><font style="font-size: 9pt">影 片 修 改 页 面</font></span></b></TH></TR></tbody></table>
<%
   MaxPerPage=10
   dim totalPut   
   dim CurrentPage
   dim TotalPages
   dim i,j
   dim typename
   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>
<table border="0" width="95%" cellspacing="0" cellpadding="0" >
  <tr>
    <td width="100%">
    <hr size="1" color="#000080">
    <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>
     </div>
    <hr size="1" color="#000080">
    <div align="center">
      <div align="center">
      </div>
    </div>
    </td>
  </tr>
</table>
<%
if typeid="" and request("moviename")="" then  
 sql="select pro_id,title,name from Playbill order by dateandtime desc"
else  if request("moviename")<>"" then
 sql="select pro_id,title,name from Playbill where title like '%"&request("moviename")&"%' order by dateandtime desc"
else
 sql="select pro_id,title,serverip,name from Playbill where typeid='"+typeid+"' order by dateandtime 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,"manage.asp"
            showContent
            showpage totalput,MaxPerPage,"manage.asp"
       else
          if (currentPage-1)*MaxPerPage<totalPut then
            rs.move  (currentPage-1)*MaxPerPage
            dim bookmark
            bookmark=rs.bookmark
            showpage totalput,MaxPerPage,"manage.asp"
            showContent
            showpage totalput,MaxPerPage,"manage.asp"
        else
	         currentPage=1
           showpage totalput,MaxPerPage,"manage.asp"
           showContent
           showpage totalput,MaxPerPage,"manage.asp"
	      end if
	   end if
   end if
   sub showContent
     dim i
	   i=0
  %>
 <form method="POST" action="manage.asp">
  <p align="center"><b>按电影名查询:</b><input type="text" name="moviename" size="20">
  <input type="submit" value="查询"><br>
</form>
<table border="0" cellspacing="1" width="440" bordercolorlight="#000000" bordercolordark="#FFFFFF" cellpadding="0" height="48">
    <tr bgcolor="#CCCCCC">
    <td width="55" align="center" bgcolor="#0099FF" height="21"><b>
    <font color="#000000"><br>
    ID号</font></b></td>
    <td width="316" align="center" bgcolor="#0099FF" height="21"><b>
    <font color="#000000">电影名称</font></b></td>
	  <td width="58" align="center" bgcolor="#0099FF" height="21"><b>
    <font color="#000000">修改</font></b></td>
    <td width="66" align="center" bgcolor="#0099FF" height="21"><b>
    <font color="#000000">删除电影</font></b></td>
    </tr>
  <%do while not rs.eof%>
  <tr>
    <td height="23" width="55" bgcolor="#FFFFFF">
    <p align="center"><%=rs("pro_id")%> </td>
    <td width="316" height="23" bgcolor="#FFFFFF">·<%=rs("title")%></td>
    <td width="58" height="23" bgcolor="#FFFFFF">
    <p align="center"><a href="edit.asp?id=<%=rs("pro_id")%>">
    <font color="#000000">修改</font></a></td>
    <td width="66" height="23" bgcolor="#FFFFFF">
    <p align="center"><a href="delete.asp?pro_id=<%=rs("pro_id")%>">
    <font color="#000000">删除</font></a></td>
  </tr>
  <% i=i+1
	   if i>=MaxPerPage then exit do
	   rs.movenext
	   loop
	 %>
</table>
<div align="center">
  
</div>
<%
  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&">"
    if CurrentPage<2 then
    response.write "<font color='#000080'>首页 上一页</font>&nbsp;"
  else
    response.write "<a href="&filename&"?page=1&typeid="&typeid&">首页</a>&nbsp;"
    response.write "<a href="&filename&"?page="&CurrentPage-1&"&typeid="&typeid&">上一页</a>&nbsp;"
  end if
  if n-currentpage<1 then
    response.write "<font color='#000080'>下一页 尾页</font>"
  else
    response.write "<a href="&filename&"?page="&(CurrentPage+1)&"&typeid="&typeid&">"
    response.write "下一页</a> <a href="&filename&"?page="&n&"&typeid="&typeid&">尾页</a>"
  end if
   response.write "<font color='#000080'>&nbsp;页次:</font><strong><font color=red>"&CurrentPage&"</font><font color='#000080'>/"&n&"</strong>页</font> "
    response.write "<font color='#000080'>&nbsp;共<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="&currentpage&">"
   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
  %> 
</center>
</body>
</html>

⌨️ 快捷键说明

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