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

📄 special.asp

📁 一套设计精美的学校网站全站系统
💻 ASP
字号:
<%@ Language=VBScript%>

<!--#include file=include/conn.asp -->
<!--#include file=include/config.asp -->
<%
set rs=server.CreateObject("ADODB.RecordSet")
rs.Source="select * from type order by typeorder"
rs.Open rs.Source,conn,1,1

dim ArraytypeID(10000),ArraytypeName(10000),Arraytypecontent(10000)
typeCount=rs.RecordCount
for i=1 to typeCount
ArraytypeID(i)=rs("typeID")
ArraytypeName(i)=rs("typeName")
Arraytypecontent(i)=rs("typecontent")
rs.MoveNext
next
rs.Close
PageShowSize = 10            '每页显示多少个页
MyPageSize   = 20           '每页显示多少条新闻
	
If Not IsNumeric(Request("page")) Or IsEmpty(Request("page")) Or Request("page") <=0 Then
MyPage=1
Else
MyPage=Int(Abs(Request("page")))
End if
%>
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>专题__<%=jjgn%></title>
<LINK href=index.css rel=stylesheet>
<style type="text/css">
<!--
body {
	margin-left: 0px;
	margin-right: 0px;
}
-->
</style></head>

<body topmargin="0" background="img/bg.gif">
<!--#include file=include/top1.asp -->
<table width="778" align="center" bgcolor="#FFFFFF" cellpadding="0" cellspacing="0" style="border: 1px solid #cccccc">
  <tr valign="top"> 
    <td width="200"> 
      <table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#f4f4f4">
        <tr> 
          <td bgcolor="#f4f4f4"><img src="IMAGES/kb.gif" width="1" height="8"></td>
        </tr>
        <tr> 
          <td valign="top"><table width="90%" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" id="AutoNumber2" style="border: 1px solid #cccccc">
              <tr> 
                <td width="100%" valign="middle"> 
                  <p align="center"><img src="img/type_left_04.gif" width="180" height="29"></td>
              </tr>
              <tr> 
                <td width="100%"><div align="center"> 
                    <table width="90%" border="0" cellspacing="0" cellpadding="3">
                      <tr> 
                        <td> 
                          <%
set rs=server.CreateObject("ADODB.RecordSet")
if uselevel=1 then
if Request.cookies("key")="super" or Request.cookies("key")="typemaster" or Request.cookies("key")="bigmaster" or Request.cookies("key")="smallmaster" or Request.cookies("key")="check" then
rs.Source="select top "& top_txt &" * from News where  checkked=1 order by click DESC,newsid desc"
end if
if Request.cookies("key")="" then
rs.Source="select top "& top_txt &" * from News where (checkked=1 and newslevel=0) order by click DESC,newsid desc"
end if
if Request.cookies("key")="selfreg" then
	if Request.cookies("reglevel")=3 then
rs.Source="select top "& top_txt &" * from News where (checkked=1 and newslevel<=3) order by click DESC,newsid desc"
	end if
	if Request.cookies("reglevel")=2 then
rs.Source="select top "& top_txt &" * from News where (checkked=1 and newslevel<=2) order by click DESC,newsid desc"
	end if
	if Request.cookies("reglevel")=1 then
rs.Source="select top "& top_txt &" * from News where (checkked=1 and newslevel<=1) order by click DESC,newsid desc"
	end if
end if
else
rs.Source="select top "& top_txt &" * from News where  checkked=1 order by click DESC,newsid desc"
end if
rs.Open rs.Source,conn,1,1
while not rs.EOF
title=trim(rs("title"))
title=replace(title,"<br>","")
%>
                           · <a class=middle href="ReadNews.asp?NewsID=<%=rs("NewsID")%>" target="_blank" title="<%=title%>"><font color="<%=rs("titlecolor")%>"> 
                          <%if len(title)>20 then%>
                          <%=left(title,20)%> 
                          <%else%>
                          <%=title%> 
                          <%end if%>
                          </font></a> <font color=red><%=rs("click")%></font><br> 
                          <%
rs.MoveNext
wend
rs.close
%>
                        </td>
                      </tr>
                    </table>
                  </div></td>
              </tr>
            </table>
            <table width="90%" border="0" align="center" cellpadding="0" cellspacing="0" id="AutoNumber4">
              <tr>
                <td width="100%" align=center><img name="" src="" width="1" height="8" alt=""></td>
              </tr>
            </table>
            <table width="90%" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" id="AutoNumber4" style="border: 1px solid #cccccc">
              <tr>
                <td width="100%" align=center><img src="img/type_left_05.gif" width="180" height="29"></td>
              </tr>
              <tr>
                <td align=center><table border="0" cellpadding="3" cellspacing="0" style="border-collapse: collapse" width="90%" id="AutoNumber5">
                  <% 
 dim ii
ii = 0
if uselevel=1 then
if Request.cookies("key")="" then
rs.Source="select top " & top_txt & " * from News where year(updatetime)=year(now()) and month(updatetime)=month(now()) and checkked=1 and newslevel=0 order by click DESC"   '选择本月
end if
if Request.cookies("key")="selfreg" then
	if Request.cookies("reglevel")="3" then
	rs.Source="select top " & top_txt & " * from News where year(updatetime)=year(now()) and month(updatetime)=month(now()) and checkked=1 and newslevel<=3 order by click DESC"   '选择本月
	end if
	if Request.cookies("reglevel")="2" then
	rs.Source="select top " & top_txt & " * from News where year(updatetime)=year(now()) and month(updatetime)=month(now()) and checkked=1 and newslevel<=2 order by click DESC"   '选择本月
	end if
	if Request.cookies("reglevel")="1" then
	rs.Source="select top " & top_txt & " * from News where year(updatetime)=year(now()) and month(updatetime)=month(now()) and checkked=1 and newslevel<=1 order by click DESC"   '选择本月
	end if
end if
if Request.cookies("key")="super" or Request.cookies("key")="typemaster" or Request.cookies("key")="bigmaster" or Request.cookies("key")="smallmaster" or Request.cookies("key")="check" then
rs.Source="select top " & top_txt & " * from News where year(updatetime)=year(now()) and month(updatetime)=month(now()) and checkked=1 order by click DESC"   '选择本月
end if
else
rs.Source="select top " & top_txt & " * from News where year(updatetime)=year(now()) and month(updatetime)=month(now()) and checkked=1 order by click DESC"   '选择本月
end if
rs.Open rs.Source,conn,1,1
	if rs.bof and rs.eof then 
		response.write "<td align=center>无</td>" 
	else 
	do while not rs.eof 
%>
                  <tr>
                    <td height=18> ·
                        <%if rs("picnews")=1 then%>
                        <img src="IMAGES/IMG.gif">
                        <%end if%>
                        <a class=middle href="ReadNews.asp?NewsID=<%=rs("NewsID")%>" title="<%=rs("title")%>" target="_blank" > <%=rs("title")%></a><font color="#666666">[<%=rs("click")%>]</font> </td>
                  </tr>
                  <%  ii = ii + 1
    if ii>50 then exit do
	rs.movenext     
	loop
	end if  
	rs.close   
	set rs=nothing
%>
                </table></td>
              </tr>
            </table>
            <table width="90%" border="0" align="center" cellpadding="0" cellspacing="0" id="AutoNumber4">
              <tr>
                <td width="100%" align=center><img name="" src="" width="1" height="8" alt=""></td>
              </tr>
            </table></td>
        </tr>
        <tr> 
          
        </tr>
      </table>
    </td>
    <td bgcolor="#CCCCCC"><img src="IMAGES/kb.gif" width="1" height="1"></td>
    <td> 
      <table width="100%" border="0" cellpadding="0" cellspacing="0">
        <tr> 
          <td bgcolor="#f4f4f4"><img src="IMAGES/kb.gif" width="1" height="8"></td>
        </tr>
        <tr> 
          <td height="30" background="img/type_bg.gif"><span class="6">  <img src="img/type01.gif" width="12" height="12" align="absmiddle">  当前位置: <a href="./">网站首页 - </a></span><b>专题</b></td>
        </tr>
        <tr> 
          <td><div align="center"> 
              <script language=javascript src=./admin/banner/ads.asp?place=1></script> </b> 
            </div></td>
        </tr>
        <tr> 
          <td> <table width="100%" height="74" border="0" align="center" cellpadding="0" cellspacing="0" id="AutoNumber3" style="border-collapse: collapse">
              <tr> 
                <td height="52" valign=top class="6"> <table width="90%" border="0" align="center" cellpadding="3" cellspacing="0">
                    <%
set rs2=server.CreateObject("ADODB.RecordSet")  '专题
rs2.Source="select * from Special  order by SpecialID DESC "
rs2.Open rs2.Source,conn,3,1

if rs2.eof and rs2.bof then
response.write "<p align=center>&nbsp;&nbsp;还没有任何专题</p>"
else
end if

if not rs2.eof then

Rs2.PageSize     = MyPageSize
MaxPages         = Rs2.PageCount
Rs2.absolutepage = MyPage
total            = Rs2.RecordCount
%>
                    <tr> 
                      <td width=100% height="25" valign="middle"></td>
                    </tr>
                    <%

i = 0
do until Rs2.Eof or i = Rs2.PageSize
%>
                    <tr> 
                      <td width="100%" height="20" background="img/line1.gif">  <img src="images/006.gif" width="8" height="10" border="0"> <a href="Special_News.asp?SpecialID=<%=rs2("SpecialID")%>"><%=trim(rs2("SpecialName"))%></a></td>
                    </tr>
                    <%
Rs2.MoveNext
i = i + 1
loop
%>
                    <tr> 
                      <td width="100%" height="24" align=center>第 <%=Mypage%>/<%=Maxpages%> 
                        页,每页 <%=MyPageSize%> 项 
                        <%
url="Special.asp?"
PageNextSize=int((MyPage-1)/PageShowSize)+1
Pagetpage=int((total-1)/Rs2.PageSize)+1

if PageNextSize >1 then
PagePrev=PageShowSize*(PageNextSize-1)
Response.write "<a class=black href='" & Url & "page=" & PagePrev & "' title='上" & PageShowSize & "页'>上一翻页</a> "
Response.write "<a class=black href='" & Url & "page=1' title='第1页'>页首</a> "
end if
if MyPage-1 > 0 then
Prev_Page = MyPage - 1
Response.write "<a class=black href='" & Url & "page=" & Prev_Page & "' title='第" & Prev_Page & "页'>上一页</a> "
end if

if Maxpages>=PageNextSize*PageShowSize then
PageSizeShow = PageShowSize
Else
PageSizeShow = Maxpages-PageShowSize*(PageNextSize-1)
End if
If PageSizeShow < 1 Then PageSizeShow = 1
for PageCounterSize=1 to PageSizeShow
PageLink = (PageCounterSize+PageNextSize*PageShowSize)-PageShowSize
if PageLink <> MyPage Then
Response.write "<a class=black href='" & Url & "page=" & PageLink & "'>[" & PageLink & "]</a> "
else
Response.Write "<B>["& PageLink &"]</B> "
end if
If PageLink = MaxPages Then Exit for
Next

if Mypage+1 <=Pagetpage  then
Next_Page = MyPage + 1
Response.write "<a class=black href='" & Url & "page=" & Next_Page & "' title='第" & Next_Page & "页'>下一页</A>"
end if

if MaxPages > PageShowSize*PageNextSize then
PageNext = PageShowSize * PageNextSize + 1
Response.write " <A class=black href='" & Url & "page=" & Pagetpage & "' title='第"& Pagetpage &"页'>页尾</A>"
Response.write " <a class=black href='" & Url & "page=" & PageNext & "' title='下" & PageShowSize & "页'>下一翻页</a>"
End if

				
End If
Rs2.close

%>
                      </td>
                    </tr>
                  </table></td>
              </tr>
              <tr> 
                <td height="16" valign=top> </td>
              </tr>
            </table></td>
        </tr>
        <tr> 
          
        </tr>
      </table>
    </td>
  </tr>
</table>
<!--#include file=include/bottom.asp -->

</body>

</html>

⌨️ 快捷键说明

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