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

📄 subpage.asp

📁 本系统采用ASP作为开发环境
💻 ASP
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<% If session("Admin")<>"" Then %>
<script  language="javascript">
	alert("登录后台后不再允许进入前台");
	history.back();
</script>
<% End if %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>新闻分类展示</title>
</head>
<link rel="stylesheet" href="Css/Style.css">
<script src="Js/Status.js"></script>
<script src="Js/Manage.js"></script>
<script src="Js/Win.js"></script>
<body> 
<%
	riqi=cint(Request.QueryString("date"))	
	Response.Buffer=true 
	If Request.Form("add")<>"" Then 
		Session("month")=cint(Session("month"))+1
		If Session("month")=13 Then 
			Session("month")=1 
			Session("year")=cint(Session("year"))+1
		End If 	
	End If
	If Request.Form("minus")<>"" Then 
		Session("month")=Session("month")-1 
		If Session("month")=0 Then 
			Session("month")=12 
			Session("year")=Session("year")-1
		End If 	
	End If
	If Session("year")="" Then 
		Session("year")=cint(year(date()))
		Session("month")=cint(month(date()))
		Session("day")=cint(day(date()))
	End If 
	If Request.Querystring("date")<>"" Then 
		Session("day")=riqi
	End If 
	months=Session("month")
	If months=1 or months=3 or months=5 or months=7 or months=8 or months=10 or months=12 Then 
		sum=31
	Else
		If months=2 Then
			If years Mod 100=0 and years Mod 4=0 Then
				sum=29
			Else
				sum=28
			End If 
		Else 
			sum=30
		End If 
	End If 
	if Session("day")>sum then 
		Session("day")=sum 
		riqi=sum 
	end if 
	times=cdate(Session("year")&"-"&Session("month")&"-"&Session("day"))	
 %> 
<%
 select case cint(request.QueryString("id"))
	case 1
		table="时政要闻"
	case 2 
		table="经济动向"
	case 3
		table="世界军事"
	case 4
		table="科学教育"
	case 5
		table="法治道德"
	case 6 
		table="社会现象"
	case 7
		table="体育世界"
	case 8 
		table="时尚娱乐"
end select 
%> 
<!-- #include file="Top.asp" --> 
<table width="800" height="600" border="0" align="center" cellpadding="0" cellspacing="0"> 
  <tr> 
    <td background="Image/center.gIf"> <table width="700" height="600" border="0" align="center" cellpadding="0" cellspacing="0"> 
        <tr> 
          <td valign="top"> <table width="700" height="625" border="0" cellpadding="0" cellspacing="0"> 
              <tr> 
                <td colspan="2" valign="top"> <table width="647" height="171" align="center" cellpadding="0" cellspacing="0"> 
                    <tr> 
                      <td height="15"> <div align="left"></div></td> 
                    </tr> 
                    <tr> 
                      <td height="20" bgcolor="#336699"><B><font color="#FFFFFF">&nbsp;<%=table%></font></B></td> 
                    </tr> 
                    <tr> 
                      <td> <table width="600" height="20" border="0" align="center" cellpadding="3" cellspacing="3"> 
                        <!-- #include File="Conn/conn.asp" --> 
                        <% 
						rs.Pagesize=40
						pages=Request.Querystring("page")
						If pages="" Then pages=1 End If 
						If Request.Form("id")="" Then
							sql="Select * from tb_News where Style='"&table&"' and IssueDate=#"&times&"#"
						Else
							sql="Select * from tb_News where Style='"&table&"' and IssueDate=#"&times&_
							"# and (Title like '%"&Request.Form("keyword")&"%' or Content like '%"&_
							Request.Form("keyword")&"%' or Type like '%"&Request.Form("keyword")&"%')"
						End If	 	
						rs.Open sql,conn,1,3
						If Not rs.Eof Or Not rs.Bof Then 
							rs.Absolutepage=CInt(pages)
							row=0
							While Not rs.Eof And row<rs.Pagesize 
					%> 
                          <tr> 
                            <td width="111">&nbsp;【<%=rs("Type")%>】</td> 
                            <td width="489">&nbsp;
							<a href="#" onclick="window.open('Show.asp?id=<%=rs("ID")%>','详细内容查看','width=630,height=400,scrollbars=yes,toolbar=no,location=no,status=no,menubar=no,resized=yes')">
							<%=rs("Title")%></a></td> 
                          </tr> 
                          <% 
								rs.MoveNext
								row=row+1
							Wend 
					%> 
                        </table></td> 
                    </tr> 
                    <% 	If pages=1 Then %> 
                    <% If pages<>rs.PageCount Then %> 
                    <tr>
					 	<%typeID=Request.Querystring("id")%>
                        <td  align="right"> <a href="Subpage.asp?id=<%=typeID%>&page=<%=(pages+1)%>">下一页</a>
					   <a href="Subpage.asp?id=<%=typeID%>&page=<%=(rs.PageCount)%>">最后一页</a> </td> 
                    </tr> 
                    <% End If %> 
                    <% 	Else%> 
                    <% If pages<rs.PageCount Then %> 
                    <tr>
							 <%typeID=Request.Querystring("id")%>
                      <td align="right"> <a href="Subpage.asp?id=<%=typeID%>&page=1">第一页</a>
					  <a href="Subpage.asp?id=<%=typeID%>&page=<%=(pages-1)%>">上一页</a>
					  <a href="Subpage.asp?id=<%=typeID%>&page=<%=(pages+1)%>">下一页</a>
					  <a href="Subpage.asp?id=<%=typeID%>&page=<%=(rs.PageCount)%>">最后一页</a> </td> 
                    </tr> 
                    <% Else %> 
                    <tr> 
							<%typeID=Request.Querystring("id")%>
                      <td  align="right"> <a href="Subpage.asp?id=<%=typeID%>&page=1">第一页</a>
					  <a href="Subpage.asp?id=<%=typeID%>&page=<%=(pages-1)%>">上一页</a> </td> 
                    </tr> 
                    <% End If %> 
                    <% 	
					End If
					Set rs=Nothing
					conn.Close
					Set conn=Nothing
					End If 
				%> 
                  </table></td> 
              </tr> 
            </table></td> 
        </tr> 
      </table></td> 
  </tr> 
</table> 
<!-- #include file="Bottom.asp" --> 
</body>
</html>

⌨️ 快捷键说明

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