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

📄 news.asp

📁 这次自已做的美工,可能很难看,但主要是为提高效率,这次全部生成了静态,只有一个链接查看最新文章的列表没有生成,因为我觉得没必要生成,浪费空间大小,那是一个很少用到的功能!这次去掉了很多功能,这个版本主
💻 ASP
字号:
<!--#include file="setep.asp"-->
><html><head>
<title>最新文章-<%=chaddr%></title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta http-equiv=<%=chaddr%> content=no-cache>
<style type="text/css">
<!--
body,td,th {
	font-size: 12px;
	color: #000000;
}
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
	background-image: url(../../images/cgame412.gif);
}
a {
	font-size: 12px;
	color: #FF66CC;
}
a:link {
	text-decoration: none;
	color: #000000;
}
a:visited {
	text-decoration: none;
	color: #333333;
}
a:hover {
	text-decoration: none;
	color: #990000;
}
a:active {
	text-decoration: none;
	color: #FF0000;
}
.style1 {color: #FFFFFF}
-->
</style><meta http-equiv="Content-Type" content="text/html; charset=gb2312"></head>


<script language="JavaScript">
var timerID = null;
var timerRunning = false;
function stopclock (){
if(timerRunning)
clearTimeout(timerID);
timerRunning = false;}
function startclock () {
stopclock();
showtime();}
function showtime () {
var now = new Date();
var year = now.getYear();
var month = now.getMonth()+1;
var day = now.getDate();
var hours = now.getHours();
var minutes = now.getMinutes();
var seconds = now.getSeconds()
var timeValue =year +"年"
timeValue += month+"月"
timeValue += day+"日 "
timeValue += "" +((hours >= 12) ? "下午 " : "上午 " )
timeValue += ((hours >12) ? hours -12 :hours)
timeValue += ((minutes < 10) ? ":0" : ":") + minutes
timeValue += ((seconds < 10) ? ":0" : ":") + seconds
liveclock.innerHTML=timeValue
timerID = setTimeout("showtime()",1000);
timerRunning = true;}

</script>
<body onload="startclock()">
<table width="800" height="60" border="0" align="center" cellpadding="0" cellspacing="0">
          <tr><td background="images/webtop_bg.gif" width="332"><%=k_logo%></td>
<td  background="images/webtop_bg.gif" width="455"><%=k_banner%></td>
          </tr></table>
<table width="800" border="1" align="center" cellpadding="0" cellspacing="0">
  <tr><% set rsfen=conn.execute("select id,art_type from art_type where sid=-1 order by pid")
%>    <td width="100%" height="25" align="left" background="images/22.gif" bgcolor="#FFCC00">&nbsp;&nbsp;&nbsp;<a href="index.htm">首页</a>
    <% do while not rsfen.eof %> | <a href="artical/<%=rsfen("id")%>/1.htm"><%=rsfen("art_type")%></a><% rsfen.movenext 
loop %></td>
  </tr>
</table>
<table width="800" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td scope="col"><%=k_sg%></td>
  </tr>
</table>
<table width="800" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td height="20" width="614" bgcolor="#CCCCCC" scope="col">当前位置:<a href="index.htm" target="_self">首页</a>
            --> 最新文章 </td>
    <td width="180" bgcolor="#CCCCCC"><span id="liveclock"></span></td>
  </tr>
</table>
<table width="800" height="460" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#F9C250" bgcolor="#FFFFFF">

  <tr>
    <td width="182" height="458" valign="top" bgcolor="#DCEDDA"><table width="100%" height="280"  border="0" cellpadding="0" cellspacing="0">
     <script src="ads/index_ads.js"></script> <tr>
     <td height="50" valign="top"><TABLE width="182" border=0>
          <TBODY>
            <TR> 
              <TD height="30" bgColor=#CC9900><STRONG> 最新文章</STRONG></TD>
            </TR>
            <TR> 
              <TD bgColor=#f2f3f7><SPAN style="LINE-HEIGHT: 13pt"> 
                <TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
                  <TBODY> <%
						 set rs=conn.execute("select top 15 * from art_file order by id desc")
						 do while not rs.eof
						 %>
                    <TR> 
                      <TD height=15 bgcolor="#DCEDDA"><img src="images/Point.gif" width="12" height="9"><a href='news/<%=rs("type")%>/<%=rs("filename")%>' title="<%=rs("title")%>" target="_blank"><%=left(rs("title"),13)%></a></TD>
                    </TR><%
					rs.movenext
					loop
					rs.close
					set rs=nothing
					%>
                  </TBODY>
                </TABLE>
              
          
              
                </SPAN></TD>
            </TR>
          </TBODY>
        </TABLE></td>
      </tr>
	  <tr>
     <td height="225" valign="top"><TABLE width="182" border=0>
          <TBODY>
            <TR> 
              <TD height="30" bgColor=#CC9900><STRONG> 热点文章</STRONG></TD>
            </TR>
            <TR> 
              <TD bgColor=#f2f3f7><SPAN style="LINE-HEIGHT: 13pt"> 
                <TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
                  <TBODY><% 
	set new2=conn.execute("select top 15 * from art_file order by tick desc")
		do while not new2.eof %>
                     <TR> 
                      <TD height=15 bgcolor="#DCEDDA"><img src="images/article_common.gif"><a href='news/<%=new2("type")%>/<%=new2("filename")%>' title="<%=new2("title")%>" target="_blank"><%=left(new2("title"),14)%></a></TD>
                    </TR><%
					new2.movenext
					loop
					new2.close
					set new2=nothing
					%>
                  </TBODY>
                </TABLE>
           
                
                </SPAN></TD>
            </TR>
          </TBODY>
        </TABLE></td>
      </tr>
    </table></td><td width="612" valign="top"><table width="100%" height="182"  border="0" cellpadding="0" cellspacing="0">
      
	   <tr>
        <td valign="top"><table>
		<tr>
		  <td width="474" height="20" bgcolor="#0099CC">新闻标题</td>
		  <td width="80" height="20" align="center" bgcolor="#0099CC">添加时间</td>
		  <td width="40" height="20" align="center" bgcolor="#0099CC">人气</td>
		</tr>
<script language="javascript">
function pageii(i){
document.gopage.currentpage.value=i;
document.gopage.submit();
}
</script>
			   <%
strsql9="select * from art_file order by id desc"
set rs9=Server.createObject("adodb.recordset")
rs9.open strsql9,conn,1,1
    if rs9.eof then
    %><tr> <td></td>
        <td bgcolor="#FFFFFF" colspan="17"> 
         暂时没有任何资料记录!
        </td><td></td>
      </tr>
            
			 <%
else
const maxperpage=35 '定义每一页显示的数据记录的常量
dim currentpage '定义当前页的变量
rs9.pagesize=maxperpage
currentpage=request("currentpage")
if currentpage="" or not Isnumeric(currentpage) then
currentpage=1
elseif currentpage<1 then
c1urrentpage=1
else
currentpage=clng(currentpage)
	if currentpage > rs9.pagecount then
	currentpage=rs9.pagecount
	end if
end if
'如果变量c1urrentpage的数据类型不是数值型
'就1赋给变量c1urrentpage
if not isnumeric(currentpage) then
currentpage=1
end if
dim totalput,n '定义变量
totalput=rs9.recordcount
if totalput mod maxperpage=0 then
n=totalput\maxperpage
else
n=totalput\maxperpage+1
end if
if n=0 then
n=1
end if
rs9.move(currentpage-1)*maxperpage
i=0
%>
 
				
				<% do while i< maxperpage and not rs9.eof
				ttime=rs9("arttime")
%>
		<tr>
		  <td width="474" height="20" bgcolor="#CCCCCC"><img src="images/article_elite.gif" width="9" height="15"> <a href="news/<%=rs9("type")%>/<%=rs9("filename")%>" target="_blank" title="<%=rs9("title")%>"><%=rs9("title")%></a></td>
		  <td width="80" height="20" align="center" bgcolor="#CCCCCC"><%=ttime%></td>
		  <td width="40" height="20" align="center" bgcolor="#CCCCCC"><script src="showcount.asp?id=<%=rs9("id")%>"></script></td>
		</tr> <%
      i=i+1
    rs9.movenext
    loop
    end if
    %>
		</table></td>
      </tr>
	  <tr><td><table border="0" width="606" cellspacing="0" cellpadding="0">
    <tr>
    <td width="503">页数:<font color="red"><%=currentpage%></font>/<% =n%>
   	<% k=currentpage                    
   	if k<>1 then%>
   	[<a class="link" href="javascript:pageii(1);">首页</a>]                    
   	[<a class="link" href="javascript:pageii(<%=k-1%>);">上一页</a>]                    
   	<%else%>
   	[首页]&nbsp;[上一页]                    
   	<%end if%>
   	<%if k<>n then%>                    
   	[<a class="link" href="javascript:pageii(<%=k+1%>);">下一页</a>]                    
   	[<a class="link" href="javascript:pageii(<%=n%>);">尾页</a>]                    
   	<%else%>
   	[下一页]&nbsp;[尾页]                    
   	<%end if%>
        共有<font color="red"><%=totalput%></font>条记录 <font color="red"><%=maxperpage%></font>个/页
		共有<font color="red"><%=n%></font>页                       
      </td> 
    <form action="" method="post" name="pag">
    
      <td width="103" height="23">  
        <p align="right">
        <select onChange="javascript:pageii(document.pag.pag.value)" size="1" id="pag" name="pag" style="background-attachment: scroll; background-repeat: repeat; font-size: 9pt; height: 23; width: 96; background-color: #FFFFFF; border: 1 solid #000000; background-position: none 0%">  
          <%
          i=1
          do while not i > n
          %>
          <option value="<%=I%>" <%if i=currentpage then %>selected<%end if%>>第 <%=i%> 页</option>
          <%
          i=i+1
          loop
          %>
        </select>

        </td>
			  </form>
                
              <TR> 
                  
              </TR>
             
          </table></td></tr>
    </table></td>
  </tr>
</table>
<table width="800" border="1" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
  <tr>   <td height="12" colspan="2"><table width="100%" height="62"  border="0" align="right" cellpadding="0" cellspacing="0">
         <TBODY> <tr>
            <td bordercolor="#ECE9D8" bgcolor="#0B4996"><div align="center" color="#FFFFFF"><span class="style1">Copyright @ <%=chtime%>&nbsp; <%=chaddr%> <%=chcopy%>版权所有<br>
                    公司地址:<%=chcom%> 电话:<%=chtel%> 邮编:<%=chyou%><br>
                  email:<%=chemail%></span><br>
</div></td>
          </tr></TBODY><form action="" method="post" name="gopage">
<input type="hidden" name="currentpage" value="">

</form>
</table></td></tr></table></body></html>

⌨️ 快捷键说明

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