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

📄 index首页.asp

📁 这是我个人用ASP制作 的一个动态网页,也是我的主页,谢谢大家的使用~~~`
💻 ASP
字号:
<%@LANGUAGE="VBSCRIPT"%> 
<%
if session("UserName")="" then
 session("UserName")="游客"
end if
 %>
<!--#include file="conn/conn.asp" -->
<%
set rsmybbs = Server.CreateObject("ADODB.Recordset")
sql_bbs= "SELECT ID, Title, Author, Hit, Reply, ReplyTime FROM Topic order by createtime DESC"
rsmybbs.open sql_bbs,conn,1,3
%>
<html>
<head>
<script language="JavaScript">
function clockon()
{thistime=new Date()
var hours=thistime.getHours()
var minutes=thistime.getMinutes()
var seconds=thistime.getSeconds()
if (eval(hours)<10) {hours="0"+hours}
if (eval(minutes)<10){minutes="0"+minutes}
if (seconds<10){seconds="0"+seconds}
thistime=hours+":"+minutes+":"+seconds
if (document.all){bgclock.innerHTML=thistime}
var timer=setTimeout("clockon()",200)}
</script>
<title>计机0252第二小组论坛</title>
 
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style>
<!--
td           { font-size: 9pt;font_name:宋体;; line-height: 16pt}
a:hover      { color: #ff0000; text-decoration: underline; font-size: 9pt }
a            { font-size: 9pt; color: #FFFFFF; text-decoration: none }
p {  font-size: 9pt; font-family: "宋体"; line-height: 11pt}
.l {  font-size: 9pt; color: #0000FF}
.style1 {color: #000000}
.style2 {
	color: #00CCFF;
	font-size: 16pt;
}
-->
</style>
</head>
<body bgcolor="#FFFFFF" text="#000000" background="../../../images/bg.gif" onLoad="clockon()">
<table width="700" height="165" border="0" align="center" cellpadding="-2" cellspacing="-2">
  <tr> 
    <td height="40" valign="top"> 
      <table width="770" height="34" border="0" align="center" cellpadding="-2" cellspacing="-2" background="images/banner/bbs_1.gif">
        <tr> 
          <td height="34" background="images/BJ2.gif"> 
            <pre class="style2"><marquee>欢迎你来到计机0252第二小组论坛</marquee></pre></td>
        </tr>
      </table>
      <table width="777" height="35" cellpadding="-2"  cellspacing="-2">
        <tr>
          <td width="570" background="images/banner/bbs_2.gif"><table width="568" border="0" cellspacing="-2" cellpadding="-2" height="27">
            <tr>
             <td width="142"><font color="#666699">
                <script language="JavaScript">
   var today=new Date();                                                                                                                                                                          
      var month=today.getMonth()+1                                                                                                                                                                          
      if (today.getDay()==1)                                                                                                                                                                          
      {document.write("&nbsp;"+today.getYear()+"年"+month+"月"+today.getDate()+"日 星期一");}                                                                                                                                                                            
      if (today.getDay()==2)                                                                                                                                                                          
      {document.write("&nbsp;"+today.getYear()+"年"+month+"月"+today.getDate()+"日 星期二");}                                                                                                                                                                          
      if (today.getDay()==3)                                                                                                                                                                          
      {document.write("&nbsp;"+today.getYear()+"年"+month+"月"+today.getDate()+"日 星期三");}                                                                                                                                                                          
      if (today.getDay()==4)                                                                                                                                                                          
      {document.write("&nbsp;"+today.getYear()+"年"+month+"月"+today.getDate()+"日 星期四");}                                                                                                                                                                          
      if (today.getDay()==5)                                                                                                                                                                          
      {document.write("&nbsp;"+today.getYear()+"年"+month+"月"+today.getDate()+"日 星期五");}                                                                                                                                                                          
      if (today.getDay()==6)                                                                                                                                                                          
      {document.write("&nbsp;"+today.getYear()+"年"+month+"月"+today.getDate()+"日 星期六");}                                                                                                                                                                          
      if (today.getDay()==0)                                                                                                                                                                          
      {document.write("&nbsp;"+today.getYear()+"年"+month+"月"+today.getDate()+"日 星期日");}         
          </script>
              </font></td>
              <td width="92"><font color="#666699"><div id="bgclock"></div></font></td>
              <td width="32" align="center" valign="top"><img src="images/Face/icon_smile.gif" width="15" height="15"></td>
			  <td height="27" valign="top" width="186"> <a href="./post.asp"><font size="2"></font></a> [ <%=session("UserName")%> ] 
              <script language="JavaScript">
var today=new Date()
if (today.getHours()>=7&&today.getHours()<13)
{document.write ("上午好!")}
else
{if (today.getHours()>=13 &&today.getHours()<18)
{document.write("下午好!")}
else
{document.write("晚上好!")}
}
            </script>
              </td>
              <td valign="top" width="116">
			  <%if session("username")="游客" then %>
			  <a href="#" onClick="window.open('register.asp','','width=550,height=280')" class="l">[用户注册]</a>
			   &nbsp;<a href="#" onClick="window.open('login.asp','','width=400,height=226')" class="l">[登录]</a>
			   <%end if%>
			   </td>
            </tr>
          </table></td>
          <td width="205"><img src="images/banner/bbs_3.gif" width="200" height="35" border="0" usemap="#Map" href="./newtopic.asp"></td>
        </tr>
      </table>
      <div align="right"> 
	<%if rsmybbs.eof then%>
	<table align="center"><tr><td>无信息!</td></tr></table>
	<%else%>
        <table width="777" border=1 bordercolor=#CAE4FF bordercolordark=#ffffff cellpadding=-1 cellspacing=0 height="54">
          <tr bgcolor="#DDEEFF"> 
            <td width="483" height="27" bgcolor="#DDEEFF"> 
            <div align="center" class="style1">讨论主题</div>            </td>
            <td width="77" height="27"> 
            <div align="center" class="style1">发起人</div>            </td>
            <td width="30" height="27"> 
            <div align="center" class="style1">回复</div>            </td>
            <td width="30" height="27"> 
            <div align="center" class="style1">人气</div>            </td>
            <td width="147" height="27"> 
            <div align="center" class="style1">最新回复</div>            </td>
          </tr>
          <%'分页
		rsmybbs.pagesize=10
		page=CLng(Request("page"))
		if page<1 then page=1
		rsmybbs.absolutepage=page
		flag=0
		for i=1 to rsmybbs.pagesize %>
          <tr bgcolor="#F0F8FF"> 
            <td width="483" bgcolor="#F0F8FF"><A HREF="./browse.asp?ID=<%= rsmybbs("ID") %>" class="l" style="padding:5px;"><%=rsmybbs("Title")%></A></td>
            <td width="77" bgcolor="#F0F8FF"> 
            <div align="center"><font color="#336699"><%=rsmybbs("Author")%></font></div>            </td>
            <td width="30" bgcolor="#F0F8FF"> 
            <div align="center"><font color="#FF0000"><%=rsmybbs("Reply")%></font></div>            </td>
            <td width="30" bgcolor="#F0F8FF"> 
            <div align="center"><font color="#FF0000"><%=rsmybbs("Hit")%></font></div>            </td>
            <td width="147" bgcolor="#F0F8FF"> 
            <div align="center"><font color="#006699"><%=rsmybbs("ReplyTime")%></font></div>            </td>
          </tr>
        <% rsmybbs.movenext
		flag=flag+1
		if rsmybbs.eof then exit for 
		next %>
        </table>
        <table width="777" border="0" cellspacing="-2" cellpadding="-2" bgcolor="#DDEEFF">
          <tr> 
            <td height="10"></td>
          </tr>
        </table>
        <table width="777" border="0" cellspacing="-2" cellpadding="-2" height="43">
          <tr> 
            <td colspan="2">&nbsp; <font color="#660000">当前显示第<%=((page-1)*rsmybbs.pagesize+1)%> 到 <%=((page-1)*rsmybbs.pagesize+flag)%> 个主题,共有<%=rsmybbs.recordcount%>个主题</font></td>
            <td width="214"> 
              <div align="right"> 
			<% if page<>1 then %><a href=<%=path%>?page=1 class="l">第一页</a>
				<a href=<%=path%>?page=<%=(page-1)%> class="l">上一页</a> 
			<%end if
			if page<>rsmybbs.pagecount then %>
   			<a href=<%=path%>?page=<%=(page+1)%> class="l">下一页</a> 
			<a href=<%=path%>?page=<%=rsmybbs.pagecount%> class="l">最后一页</a> 
			<%end if %>
              </div>
            </td>
          </tr>
          <tr> 
            <td width="356">
              <div align="right"><a href="JScript:window.close();" class="l"><img src="images/quit.gif" width="26" height="23" border="0"></a></div></td>
            <td width="207"><a href="#" onclick="window.location.href='logout.asp'" class="l">[退出]</a></td>
            <td>&nbsp;</td>
          </tr>
        </table>
      </div>    </td>
  </tr>
</table>
<%end if %>

<table width="777" border="0" align="center" cellpadding="-2" cellspacing="-2">
  <tr>
    <td background="images/BACK.GIF">      <div align="center">本站请用IE5.0或以上版本浏览,800*600为最佳效果 <br>
</div>    </td>
  </tr>
</table>
<map name="Map">
  <area shape="rect" coords="56,7,155,26" href="newtopic.asp">
</map>
</body>
</html>

⌨️ 快捷键说明

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