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

📄 newfilm.asp

📁 顶级影视站ASP源代码系统。很全面很强大。数据库用access
💻 ASP
字号:
<!--#include file="primary_admin.asp"-->
<!--#include file="HMconnection.asp"-->
<%dim action,nfID
action=request.QueryString("action")
nfID=request("nfID")
if action<>"" then%>
<!--#include file="super_admin.asp"-->
<% select case action
  case "del"
   if nfID<>"" then conn.execute "delete from NewFilm where nfID in ("&nfID&")"
  case "notnew"
   if nfID<>"" then conn.execute "update NewFilm set ifNew=False where nfID in ("&nfID&")"
 end select
end if
%>
<html>
<head>
<title>公告信息管理</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" type="text/css" href="../style/style.css">
</head>
<body>
<table width="80%" border="1" cellspacing="0" cellpadding="1" bordercolor="#CCCCCC" align="center">
  <tr> 
    <td> 
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr> 
          <td width="9" background="../images/back_3.gif" rowspan="2"></td>
          <td class="12v"> 
            <table width="100%" border="0" cellspacing="0" cellpadding="0" class="12v">
              <tr> 
                <td class="12v" > 
                  <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" id="AutoNumber3" height="0" width="100%">
                    <tr> 
                      <td> 
                        <table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#0099FF">
                          <tr bgcolor="#006600"> 
                            <td height="16" bgcolor="#0099FF"> <div align="center"><font color="#FFFFFF">公告信息管理</font></div></td>
                          </tr>
                          <tr bgcolor="#E8F1FF"> 
                            <form name="form2" method="post">
                              <td height="90"> 
                                <%'开始分页
				Const MaxPerPage=40 
   				dim totalPut,fornewRS  
   				dim CurrentPage
   				dim TotalPages
   				dim j
    				if Not isempty(request("page")) then
      				currentPage=Cint(request("page"))
   				else
      				currentPage=1
   				end if 
                set fornewRS=server.createobject("adodb.recordset")
                fornewSQL="select nfID,filmName,mainactors,proDay,filmlevel,ifNew from NewFilm order by proDay DESC" 
                fornewRS.open fornewSQL,conn,1,1 
 				if err.number<>0 then
				response.write "数据库中无数据"
				end if
				if fornewRS.eof And fornewRS.bof then
       			Response.Write "<p align='center' class='contents'> 目前还没有任何信息!</p>"
   				else
	  				totalPut=fornewRS.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
            			showContent
            			showpage totalput,MaxPerPage,"newfilm.asp"
       				else
          				if (currentPage-1)*MaxPerPage<totalPut then
            				fornewRS.move  (currentPage-1)*MaxPerPage
            				dim bookmark
            				bookmark=fornewRS.bookmark
            				showContent
             				showpage totalput,MaxPerPage,"newfilm.asp"
        				else
	        				currentPage=1
           					showContent
           					showpage totalput,MaxPerPage,"newfilm.asp"
	      				end if
	   				end if
   				   				end if

   				sub showContent
       			dim i
	   			i=0
			response.write "<table width=12 height=7 border=0 cellpadding=0 cellspacing=0><tr><td height=7></td></tr></table>"
			%>
                                <table width="95%" border="0" align="center" cellpadding="1" cellspacing="1" bgcolor="#CCCCCC">
                                  <tr bgcolor="#E8F1FF" align="center"> 
                                    <td width="8%" ><font color="#FF0000">选 取</font></td>
                                    <td width="20%"><font color="#FF0000">片 名</font></td>
                                    <td width="28%"><font color="#FF0000">主 演</font></td>
                                    <td width="10%"><font color="#FF0000">影片类型</font></td>
                                    <td width="14%"><font color="#FF0000">推出日期</font></td>
                                    <td width="8%"><font color="#FF0000">新 增</font></td>
                                    <td width="12%"><font color="#FF0000">操 作</font></td>
                                  </tr>
                                  <%fornewRS.movefirst
								  do while not fornewRS.eof%>
                                  <tr bgcolor="#E8F1FF" align="center"> 
                                    <td> <input type="checkbox" name="nfID" id="nfID" value="<%=fornewRS("nfID")%>"></td>
                                    <td><a href="#" onClick="javascript:window.open('../diebao.asp?nfID=<%=fornewRS("nfID")%>','detailpron','width=500,height=330,toolbar=no, status=no, menubar=no, resizable=yes, scrollbars=yes')"><%=fornewRS("filmName")%></a></td>
                                    <td><%=fornewRS("mainactors")%></td>
                                    <td><%=fornewRS("filmlevel")%></td>
                                    <td><%=fornewRS("proDay")%></td>
                                    <td><%=fornewRS("ifNew")%></td>
                                    <td><input type="button" style="height:18px;fontsize:18px;" value="更 改" name="modify" onClick="javascript:document.URL='editforcast.asp?nfID=<%=fornewRS("nfID")%>';"></td>
                                  </tr>
                                  <%i=i+1
		  if i>=MaxPerPage then Exit Do
		  fornewRS.movenext
		  loop
		  fornewRS.close
		  set fornewRS=nothing
		  set conn=nothing
		  %>
                                  <tr bgcolor="#E8F1FF" align="center"> 
                                    <td height="30" colspan="7"> 选中所显示评论 
                                      <input type="checkbox" name="checkbox" value="Check All" onClick="CheckAll(this.form);"> 
                                      &nbsp;&nbsp; <input type="submit" name="Submit2" value="删 除" onClick="return test(1,'确认要删除所选影片预告吗?');"> 
                                      &nbsp;&nbsp; <input type="submit" name="Submit2" value="旧的了" onClick="return test(2,'确认所选影片预告不是新增的吗?');">	
                                    </td>
                                  </tr>
                                </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&">"  
				Response.Write "<p align='center' class='contents'> "  
				If CurrentPage<2 Then  
					Response.Write "<font class='contents'>首页 上一页</font> "  
				Else  
					Response.Write "<a href="&filename&"?page=1 class='contents'>首页</a> "  
					Response.Write "<a href="&filename&"?page="&CurrentPage-1&" class='contents'>上一页</a> "  
				End If
				
				If n-currentpage<1 Then  
					Response.Write "<font class='contents'>下一页 尾页</font>"  
				Else  
					Response.Write "<a href="&filename&"?page="&(CurrentPage+1)&" class='contents'>"  
					Response.Write "下一页</a> <a href="&filename&"?page="&n&" class='contents'>尾页</a>"  
				End If  
					Response.Write "<font class='contents'> 页次:</font><font class='contents'>"&CurrentPage&"</font><font class='contents'>/"&n&"页</font> "  
					Response.Write "<font class='contents'> 共有"&totalnumber&"条记录 " 
					Response.Write "<font class='contents'>" 
					Response.Write "</form>"  
				End Function  
			%>
                              </td>
                            </form>
                          </tr>
                          <tr bgcolor="#E8F1FF" align="center"> 
                            <td height="25">
                            <input type="button" value="添加影片预告" name="addforcast" onClick="javascript:document.URL='addforcast.asp'">
							</td>
                          </tr>
                        </table>
                      </td>
                    </tr>
                  </table>
                </td>
              </tr>
            </table>
          </td>
          <td class="12v" background="../images/back_3.gif" width="9" rowspan="2"></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<!--#include file="copyright.asp"-->
</body>
</html>
<script language=javascript>
function CheckAll(form)
  {
  for (var i=0;i<form.elements.length;i++)
    {
    var e = form.elements[i];
    if (e.name != 'checkbox')
       e.checked = form.checkbox.checked;
    }
  }
  
function test(n,s)
{
 var copula,msg
  copula=n;
  msg=s;
  switch(copula)
  { 
   case 1:
    document.form2.action="newfilm.asp?action=del";
	break;
   case 2:
    document.form2.action="newfilm.asp?action=notnew";
	break;
   }
     if(!confirm(msg)) return false;
   
  
}
</script>

⌨️ 快捷键说明

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