📄 index.asp
字号:
<%@ Language=VBScript %>
<!--#INCLUDE FILE="inc_Conn.asp" -->
<%
Dim strSql
strSql="Select * from Class order by Class_Desc"
set rs=MyCon.execute(strSql)
strSql="Select top 1 * from News where News_Banner=1"
set rs2=MyCon.execute(strSql)
%>
<HTML>
<HEAD>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="VI60_defaultClientScript" content="JavaScript">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>新闻主页</title>
<link rel="stylesheet" href="css.css" type="text/css">
</HEAD>
<BODY>
<div align="center">
<center>
<table border="0" cellpadding="0" cellspacing="0" width="755">
<tr>
<td width="214"><font face>
<table align="center" border="0" cellPadding="0" cellSpacing="0" width="10%">
<tbody>
<tr>
<td vAlign="top" width="50%"><img alt="中南学子" border="0" src="IMAGES/0001.gif"></td>
</tr>
</tbody>
</table>
</font></td>
<td width="281"></td>
<td width="254"></td>
</tr>
</table>
</center>
</div>
<div align="center">
<center>
<table border="0" width="755">
<tr>
<td width="100%" align="left" bgcolor="#6699FF">
首页<b><font color="#FFFFFF"> |</font></b>
<% Do while not rs.eof %>
<a href="ListNews.asp?ClassID=<%=rs("ClassID")%>" Class=title1><%=rs("Class_Name")%></a>
<b><font color="#FFFFFF"> |</font></b>
<% rs.movenext %>
<% Loop %>
</td>
</tr>
</table>
</center>
</div>
<div align="center">
<center>
<table border="0" cellpadding="0" cellspacing="0" width="755">
<tr>
<td width="221" valign="top" align="left" bgcolor="#F5F5F5">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td width="100%">
<form method="POST" action="Search.asp?active=DoIt">
<table border="1" cellpadding="0" cellspacing="0" width="98%" bordercolorlight="#6699FF" bordercolordark="#6699FF">
<tr>
<td width="100%">标题:<input type="text" name="title" size="20"></td>
</tr>
<tr>
<td width="100%">范围:<select size="1" name="Class">
<option value="0">所有类别</option>
<% rs.movefirst %>
<% Do while not rs.eof %>
<option value="<%=rs("ClassID")%>"><%=rs("Class_Name")%></option>
<% rs.movenext %>
<% Loop %>
</select></td>
</tr>
<tr>
<td width="100%" align="center"><input type="submit" value=" 查 找 " name="search"></td>
</tr>
</table>
</form>
</td>
</tr>
<tr>
<td width="100%"></td>
</tr>
<tr>
<td width="100%" bgcolor="#6699FF" align="center"><font class="title1">...本站热点新闻...</font></td>
</tr>
<tr>
<td width="100%">
<%
strSql="SELECT top 20 * from News order by News_Click Desc"
set rs3=MyCon.execute(strSql)
%>
<% Do while not rs3.eof %>
<a href="ReadNews.asp?NewsID=<%=rs3("NewsID")%>" title="<%=rs3("News_Post_Time")%>"><%=rs3("News_Title")%></a>
(<%=rs3("News_Click")%>)
<br>
<% rs3.movenext %>
<% Loop %>
<% %>
</td>
</tr>
<tr>
<td width="100%" bgcolor="#6699FF"><font class="title1">本周热点新闻</font></td>
</tr>
<tr>
<td width="100%">
4321
</td>
</tr>
<tr>
<td width="100%"></td>
</tr>
</table>
</td>
<td width="355" valign="top" align="center">
<table border="0" cellpadding="0" cellspacing="0" width="96%">
<tr>
<% If not rs2.eof Then %>
<%
Dim strImageName
strImageName=rs2("NewsID") & "_" & "1"
%>
<td width="48%" align="left"><a href="ReadImages.asp?ImageName=<%=strImageName%>" target="_blank" title="<%=rs2("News_Post_Time")%>"><img border="0" src="tools/IMAGES/<%=strImageName%>.jpg" width="160" height="180" align="top"></a></td>
<% End If %>
</center>
<% If not rs2.eof Then %>
<td width="52%" valign="top" align="left"><div align="center">
<b><%=rs2("News_Title")%></b></div>
<%=Mid(rs2("News_Content"),1,77)%>...
<div style="width: 174; height: 13" align="right">
<a href="ReadNews.asp?NewsID=<%=rs2("NewsID")%>" title="<%=rs2("News_Post_Time")%>">详细内容...</a></div></td>
<% End If %>
</tr>
<center>
<tr>
<td width="100%" colspan="2" height="6"></td>
</tr>
<%
rs.movefirst
Do while not rs.eof
%>
<tr>
<td width="100%" bgcolor="#6699FF" colspan="2">
<a href="ListNews.asp?ClassID=<%=rs("ClassID")%>" Class=title1><%=rs("Class_Name")%></a>
</td>
</tr>
<%
strRs=rs("ClassID")
strSql="Select top 8 * from News where News_Class="
strSql=strSql & strRs
strSql=strSql & " order by NewsID Desc"
set rs1=MyCon.execute(strSql)
%>
<% Do while not rs1.eof %>
<tr>
<td width="100%" colspan="2">
<a href="ReadNews.asp?NewsID=<%=rs1("NewsID")%>" title="<%=rs1("News_Post_Time")%>"><%=rs1("News_Title")%></a>
</td>
</tr>
<%
rs1.movenext
Loop
%>
<tr>
<td width="100%" colspan="2" align="Right">
<a href="ListNews.asp?ClassID=<%=rs("ClassID")%>">更多内容...</a>
</td>
</tr>
<%
rs1.close
set rs1=nothing
rs.movenext
Loop
%>
<tr>
<td width="100%" colspan="2"></td>
</tr>
</table>
</center>
</td>
<td width="173" valign="top" align="left" bgcolor="#F5F5F5">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td width="100%" height="9"></td>
</tr>
<tr>
<td width="100%" bgcolor="#6699FF"><font class="title1">本站最新图片新闻</font></td>
</tr>
<%
strSql="SELECT top 2 * from News where (News_Image>0 and News_Banner=0)"
strSql=strSql & " order by NewsID Desc"
set rs4=MyCon.execute(strSql)
%>
<% Do while not rs4.eof %>
<%
strImageName=rs4("NewsID") & "_" & "1"
%>
<tr>
<td width="100%"><div align="center"><a href="ReadImages.asp?ImageName=<%=strImageName%>" target="_blank"><img border="0" src="tools/Images/<%=strImageName%>.jpg" width="180" height="120"></a></div></td>
</tr>
<tr>
<td width="100%"><div align="center"><a href="ReadNews.asp?NewsID=<%=rs4("NewsID")%>" title="<%=rs4("News_Post_Time")%>"><%=rs4("News_Title")%></a></div></td>
</tr>
<% rs4.movenext %>
<% Loop %>
<tr>
<td width="100%" bgcolor="#6699FF"><font class="title1">本周热点图片新闻</font></td>
</tr>
<tr>
<td width="100%">
1234
</td>
</tr>
<tr>
<td width="100%"></td>
</tr>
</table>
</td>
</tr>
</table>
</div>
<div align="center">
<center>
<table border="0" cellpadding="0" cellspacing="0" width="755">
<tr>
<td width="100%" bgcolor="whitesmoke"> </td>
</tr>
</table>
</center>
</div>
<div align="center">
<center>
<table border="0" cellpadding="0" cellspacing="0" width="755">
<tr>
<td width="100%" align="right"><img border="0" src="IMAGES/logo_3rom_by.gif" alt="又要考试了,真累人啊!"></td>
</tr>
</table>
</center>
</div>
</BODY>
</HTML>
<%
rs4.close
set rs4=nothing
rs3.close
set rs3=nothing
rs2.close
set rs2=nothing
rs.close
set rs=nothing
MyCon.close
set MyCon=nothing
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -