special_news.asp

来自「这是一个学生毕业时做的教务系统」· ASP 代码 · 共 132 行

ASP
132
字号
<%@ Language=VBScript%>

<!--#include file=include/conn.asp -->
<%
request_SpecialID=Request.QueryString("SpecialID")
request_SpecialName=trim(Request.QueryString("SpecialName"))

'Response.Write request_SpecialID
'Response.End

p=Request.QueryString("p")
if p="" then p=1



set rs=server.CreateObject("ADODB.RecordSet")
rs.Source="select * from BigClass"
rs.Open rs.Source,conn,1,1

dim ArrayBigClassID(20),ArrayBigClassName(20)
BigClassCount=rs.RecordCount
for i=1 to BigClassCount
ArrayBigClassID(i)=rs("BigClassID")
ArrayBigClassName(i)=trim(rs("BigClassName"))
rs.MoveNext
next
rs.Close

set rs2=server.CreateObject("ADODB.RecordSet")
rs2.Source="select * from News where SpecialID=" & request_SpecialID & " order by NewsID DESC "
rs2.Open rs2.Source,conn,1,1


%>
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title><%=request_SpecialName%>_专题信息__<%=redcaff%></title>
<LINK href=news.css rel=stylesheet>
<link href="../css.css" rel="stylesheet" type="text/css">
<link href="css.css" rel="stylesheet" type="text/css">
</head>

<body background="../image/beijing2.jpg" topmargin="0">
<!--#include file=include/top.asp -->
<div align="center">
  <table width="778" border="0" cellspacing="0" cellpadding="0">
    <tr>
      <td width="5" background="images/bgimg_left.gif">&nbsp;</td>
      <td><table width="768" border="0" cellspacing="0" cellpadding="0" align="center" bgcolor="#ffffff">
          <tr> 
            <td> <table width="768" border="0" align="center" cellpadding="0" cellspacing="0">
                <tr class="box"> 
                  <td width="160" bgcolor="f4f4f4">&nbsp;</td>
                  <td width="509" height="25" bgcolor="f4f4f4"><font color="#000000">当前位置:<a href=./ class=bai1>首页</a>>><a class=bai1 href=Special.asp>专题</a>>></font><%=request_SpecialName%></td>
                  <td width="95" bgcolor="f4f4f4">&nbsp;</td>
                </tr>
              </table></td>
          </tr>
        </table>
        <table width="768" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#F4f4f4">
          <tr> 
            <td width="160" align="center" valign="top" bgcolor="#f4f4f4"> <table width="100%" height="360" border="0" cellpadding="0" cellspacing="0">
                <tr> 
                  <td width="160" height="40" background="images/paihang.gif"><font color="#FFFFFF">&nbsp; 
                    </font></td>
                </tr>
                <tr> 
                  <td valign="top"> <table border="0" width="100%" cellspacing="0" cellpadding="0">
                      <tr> 
                        <td width="100%" align="right" valign="top"> 
                          <%
rs.Source="select top 10 NewsID,Title,BigClassName,SmallClassName,SpecialID,click from News where (SpecialID=" & request_SpecialID & " and image=0 ) order by click DESC"
rs.Open rs.Source,conn,1,1
while not rs.EOF
%>
                          <table width="95%" height="18" border="0" cellpadding="0" cellspacing="0">
                            <tr> 
                              <td width="14%" valign="top"> <img src="images/icon_arrow_04.gif" width="9" height="10"></td>
                              <td width="86%"><font color="#FF0000"><a class=bai1 href="ReadNews.asp?NewsID=<%=rs("NewsID")%>&BigClassName=<%=rs("BigClassName")%>&SmallClassName=<%=rs("SmallClassName")%>&SpecialID=<%=rs("SpecialID")%>" target=_blank><%=trim(rs("Title"))%></a></font></td>
                            </tr>
                          </table>
                          <%
rs.MoveNext
wend
rs.close
%>
                        </td>
                      </tr>
                    </table></td>
                </tr>
              </table></td>
            <td bgcolor="#FFFFFF" width="6" ></td>
            <td width="603" align="center" valign="top" bgcolor="#FFFFFF"> <br>
              <table border="0" width="98%">
                <tr> 
                  <td width="69%" height="20" align="center" valign="top" bgcolor="#FFFFFF"> 
                    <table border="0" cellpadding="3" cellspacing="0" width="100%">
                      <tr> </tr>
                      <%while not rs2.EOF

TrString="<tr><td width=100% height=15>&nbsp;<a class=bai1 href='ReadNews.asp?NewsID=" & rs2("NewsID") & "&BigClassName=" & rs2("BigClassName") & "&SmallClassName=" & rs2("SmallClassName") & "&SpecialID=" & rs2("SpecialID") & "' target=_blank><img src=images/arrow.gif border=0> " & trim(rs2("Title")) & "</a>(" & trim(rs2("UpdateTime")) & ")[<font color=#ff3333>"& rs2("click") &"</font>]</font></td</tr>"
Response.Write TrString
rs2.MoveNext

wend
rs2.Close
set rs2=nothing
%>
                    </table></td>
                </tr>
              </table>
              <br>
            </td>
          </tr>
        </table></td>
      <td width="5" background="images/bgimg_right.gif">&nbsp;</td>
    </tr>
  </table>
  <table width="780" height="1" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td width="5" height="1" background="images/bgimg_left.gif"></td>
    <td height="1" bgcolor="cccccc"></td>
    <td width="5" height="1" background="images/bgimg_right.gif"></td>
  </tr>
</table>
  <!--#include file=include/bottom.asp -->
</div>
</body>

</html>

⌨️ 快捷键说明

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