newslx.asp
上传用户:btntkt
上传日期:2021-04-16
资源大小:5296k
文件大小:7k
源码类别:

WEB源码(ASP,PHP,...)

开发平台:

DOS

  1. <!--#include file="conn.asp"-->
  2. <!--#include file="config.asp"-->
  3. <html><head><title>网软天下购物系统,网络购物系统,asp购物系统,免费购物系统,网上商城购物系统。--商城新闻</title>
  4. <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
  5. <meta name="description" content="<%=des%>">
  6. <meta name="keywords" content="<%=keya%>">
  7. <link href="skin/skin<%=skinid%>/css.css" rel="stylesheet" type="text/css">
  8. </head>
  9. <body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
  10. <!--#include file="include/head.asp"-->
  11. <table width="1000" border="0" align="center" cellpadding="0" cellspacing="0">
  12.   <tr>
  13.     <td width="39" valign="top"><table width="100%" height="184" border="0" cellpadding="0" cellspacing="0">
  14.       <tr>
  15.         <td height="30" align="right" valign="top"><img src="skin/skin<%=skinid%>/jiao.gif" width="15" height="17"></td>
  16.       </tr>
  17.       <tr>
  18.         <td height="90"><div align="right"><img src="images/ttts.gif" width="26" height="110" /></div></td>
  19.       </tr>
  20.       <tr>
  21.         <td height="30">&nbsp;</td>
  22.       </tr>
  23.     </table></td>
  24. <td width="190"valign="top" style="BORDER-bottom:<%=skincolor%> 1px solid;BORDER-left:<%=skincolor%> 1px solid; BORDER-right:<%=skincolor%> 1px solid;">
  25. <table width="100%" border="0" cellspacing="0" cellpadding="0">
  26.       <tr>
  27.         <td><table width="190" height="190" border="0" cellpadding="0" cellspacing="0">
  28.           <tr>
  29.             <td align="center" valign="middle" background="skin/skin<%=skinid%>/index_2.gif"><!--#include file="logins.asp"--></td>
  30.           </tr>
  31.         </table></td>
  32.       </tr>
  33.       <tr>
  34.         <td><img src="images/index_4.gif" width="190" height="12"></td>
  35.       </tr>
  36.       <tr>
  37.         <td><% if sltype=1 then %><!--#include file="include/info_class1.asp"--><%else %><!--#include file="include/sort.asp"--><%end if %></td>
  38.       </tr>
  39.       <tr>
  40.         <td>&nbsp;</td>
  41.       </tr>
  42.     </table></td>
  43.     <td valign="top"><table width="100%" align="center" border="0" cellspacing="0" cellpadding="0" >
  44.       <tr>
  45.         <td background="skin/skin<%=skinid%>/pdbg01.gif" height=28>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a href=index.asp>网软天下购物系统,网络购物系统,asp购物系统,免费购物系统,网上商城购物系统。</a> >> 商城新闻</td>
  46.       </tr>
  47.       <tr>
  48.         <td valign="top" bordercolor="#FFFFFF" bgcolor="#FFFFFF"><table width="100%" border="0" cellspacing="0" cellpadding="0">
  49.           <tr>
  50.             <td>&nbsp;</td>
  51.           </tr>
  52.           <tr>
  53.                 <td align=center><span class="style12">
  54.                   <a href="trend.asp">全部新闻</a><% 
  55.   
  56.   
  57.   set rs2=server.CreateObject("adodb.recordset")
  58.   rs2.open "select * from newslei order by id",conn,1,1
  59.   do while not rs2.eof
  60.   response.write "| <A href=newslx.asp?newstype="&rs2("danweiname")&">"&trim(rs2("danweiname"))&"</A>  "
  61.   rs2.movenext   
  62.   loop
  63.   rs2.close
  64.   set rs2=nothing 
  65.  %>
  66.                   </span></td>
  67.           </tr>
  68.         </table>
  69.           <br>
  70.           <table width="580" border="0" align="center" cellpadding="0" cellspacing="0">
  71.             <tr>
  72.               <td><img src="images/mingle/informtop.gif" width="580" height="35"></td>
  73.             </tr>
  74.           </table>
  75.           <br>
  76.           <%
  77.   newslx=request.querystring("newstype")
  78.   set rs=server.createobject("adodb.recordset")
  79. rs.open "select * from news  where newstype='"&newslx&"'  order by adddate desc",conn,1,1
  80. if rs.recordcount=0 then 
  81. %>
  82.             <table width="100%" border="0" cellspacing="0" cellpadding="5" align="center">
  83.               <tr>
  84.                 <td align=center>暂无新闻</td>
  85.               </tr>
  86.             </table>
  87.             <%
  88. else
  89.    rs.PageSize =20 
  90. iCount=rs.RecordCount 
  91. iPageSize=rs.PageSize
  92.      maxpage=rs.PageCount 
  93.      page=request("page")
  94.     if Not IsNumeric(page) or page="" then
  95.         page=1
  96.     else
  97.         page=cint(page)
  98.     end if
  99.     if page<1 then
  100.         page=1
  101.     elseif  page>maxpage then
  102.         page=maxpage
  103.     end if
  104.     rs.AbsolutePage=Page
  105. if page=maxpage then
  106. x=iCount-(maxpage-1)*iPageSize
  107. else
  108. x=iPageSize
  109. end if
  110. %>
  111.             <table width="580" border="0" align="center" cellpadding="2" cellspacing="1">
  112.               <%
  113. For i=1 To x
  114. %>
  115.               <tr>
  116.                 <td width="6%" height=24 align=center bgcolor="#FFFFFF" ><img src="images/body/dian3.gif"></td>
  117.                 <td  height=24 bgcolor="#FFFFFF" ><a href="trends.asp?id=<%=rs("newsid")%>"><%=trim(rs("newsname"))%></a>&nbsp<font color=red>(<%=rs("viewcount")%>)</font></td>
  118.                 <td width="19%" height=24 align=center bgcolor="#FFFFFF" ><%=year(rs("adddate"))&"."&month(rs("adddate"))&"."&day(rs("adddate"))%></td>
  119.               </tr>
  120.               <tr>
  121.                 <td height=1 colspan="3"background="images/mingle/inbg.gif"></td>
  122.               </tr>
  123.               <%
  124. rs.movenext
  125.     next
  126. %>
  127.             </table>
  128.             <%
  129. call PageControl(iCount,maxpage,page,"border=0 align=center","<p align=center>")
  130. end if
  131. rs.close
  132. set rs=nothing
  133. Sub PageControl(iCount,pagecount,page,table_style,font_style)
  134.     Dim query, a, x, temp
  135.     action = "http://" & Request.ServerVariables("HTTP_HOST") & Request.ServerVariables("SCRIPT_NAME")
  136.     query = Split(Request.ServerVariables("QUERY_STRING"), "&")
  137.     For Each x In query
  138.         a = Split(x, "=")
  139.         If StrComp(a(0), "page", vbTextCompare) <> 0 Then
  140.             temp = temp & a(0) & "=" & a(1) & "&"
  141.         End If
  142.     Next
  143.     Response.Write("<table width=90% border=0 cellpadding=0 cellspacing=0  align=center >" & vbCrLf )        
  144.     Response.Write("<form method=get onsubmit=""document.location = '" & action & "?" & temp & "Page='+ this.page.value;return false;""><TR>" & vbCrLf )
  145.     Response.Write("<TD align=center height=35>" & vbCrLf )
  146.     Response.Write(font_style & vbCrLf )    
  147.     if page<=1 then
  148.         Response.Write ("首页 " & vbCrLf)        
  149.         Response.Write ("上页 " & vbCrLf)
  150.     else        
  151.         Response.Write("<A HREF=" & action & "?" & temp & "Page=1>首页</A> " & vbCrLf)
  152.         Response.Write("<A HREF=" & action & "?" & temp & "Page=" & (Page-1) & ">上页</A> " & vbCrLf)
  153.     end if
  154.     if page>=pagecount then
  155.         Response.Write ("下页 " & vbCrLf)
  156.         Response.Write ("尾页 " & vbCrLf)            
  157.     else
  158.         Response.Write("<A HREF=" & action & "?" & temp & "Page=" & (Page+1) & ">下页</A> " & vbCrLf)
  159.         Response.Write("<A HREF=" & action & "?" & temp & "Page=" & pagecount & ">尾页</A> " & vbCrLf)            
  160.     end if
  161.     Response.Write(" 页次:" & page & "/" & pageCount & "页" &  vbCrLf)
  162.     Response.Write(" 共有" & iCount & "条新闻" &  vbCrLf)
  163.     Response.Write(" 转到" & "<INPUT TYEP=TEXT CLASS=wenbenkuang NAME=page SIZE=2 Maxlength=5 VALUE=" & page & ">" & "页"  & vbCrLf & "<INPUT CLASS=go-wenbenkuang type=submit value=GO>")
  164.     Response.Write("</TD>" & vbCrLf )                
  165.     Response.Write("</TR></form>" & vbCrLf )        
  166.     Response.Write("</table>" & vbCrLf )        
  167. End Sub
  168. %>
  169.         </td>
  170.       </tr>
  171.     </table></td>
  172. <td width="68"style="BORDER-left:<%=skincolor%> 1px solid;">&nbsp;</td>
  173.   </tr>
  174. </table>
  175. <!--#include file="include/foot.asp"-->
  176. </body>
  177. </html>