<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="Inc/syscode.asp" -->
<%
function cutstr(tempstr,tempwid)
if len(tempstr)>tempwid then
cutstr=left(tempstr,tempwid)&"..."
else
cutstr=tempstr
end if
end function
%>
 <html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>上海锦承汽车租赁有限公司</title>
<link href="style.css" rel="stylesheet" type="text/css" />
</head>

<body>
<!--#include file="head.asp"-->
 <table width="1000" border="0" align="center" cellpadding="0" cellspacing="0">
   <tr>
     <td><img src="img/banner_news.jpg" width="1000" height="190" alt="" /></td>
   </tr>
 </table>
<table width="1000" border="0" align="center" cellpadding="0" cellspacing="0">
   <tr>
     <td><img src="images/index_13.jpg" width="997" height="11" alt="" /></td>
   </tr>
 </table>
<table width="1000" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td height="5"></td>
  </tr>
</table>
<table width="1000" border="0" align="center" cellpadding="0" cellspacing="0">
 <tr>
     <td width="7" height="123">&nbsp; </td>
     <td width="177" valign="top"><!--#include file="left_menu.asp"-->&nbsp; </td>
   <td width="10">&nbsp;  </td>
     <td width="806" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0" class="line">
       <tr>
         <td width="2%" height="42">&nbsp;</td>
         <td width="64%" class="bt">租车新闻</td>
         <td width="34%" class="bt">&nbsp;</td>
       </tr>
     </table>
       <table width="100%" border="0" cellspacing="0" cellpadding="0">
         <tr>
           <td height="5"> </td>
         </tr>
     </table>
       <table width="731" border="0" align="center" cellpadding="0" cellspacing="0" class="bbb">
         <tr>
           <td width="731"><table width="100%" height="0%" border="0" align="center" cellpadding="5" cellspacing="0">
             <tr>
               <td width="100%" height="100%" valign="top"><%
set rs=server.createobject("adodb.recordset")
sqltext="select * from news where BigClassName='新闻' order by ArticleID desc"
rs.open sqltext,conn,1,1	

dim MaPerPage
MaPerPage=30
dim text,checkpage
text="0123456789"
Rs.PageSize=MaPerPage
for i=1 to len(request("page"))
checkpage=instr(1,text,mid(request("page"),i,1))
if checkpage=0 then
exit for
end if
next

If checkpage<>0 then
 If NOT IsEmpty(request("page")) Then
   CurrentPage=Cint(request("page"))
   If CurrentPage < 1 Then CurrentPage = 1
   If CurrentPage > Rs.PageCount Then CurrentPage = Rs.PageCount
 Else
   CurrentPage= 1
 End If
  If not Rs.eof Then Rs.AbsolutePage = CurrentPage end if
Else
 CurrentPage=1
End if

call list

'显示帖子的子程序
Sub list()%>
                 <table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
                   <tr>
                     <td width="100%" height="38" valign="top"  ><table width="100%" border="0" cellpadding="0" cellspacing="0">
                       <tr>
                         <td valign="top"><table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
                           <tr>
                             <td valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                               <%i=1 %>
                               <tr>
                                 <td><table width="100%" border="0" cellspacing="1" cellpadding="0">
                                   <%i=1 %>
                                   <tr>
                                     <% Do While Not rs.EOF%>
                                     <td><table width="100%" border="0" cellpadding="0" cellspacing="0" class="line3">
                                       <tr>
                                         <td width="4%" height="25"><div align="center"><span class="bbb"><img src="img/gif-0170.gif" width="9" height="6" /></span></div></td>
                                         <td width="70%" height="25"class="bbb"><a href="shownews.asp?ArticleID=<%=rs("ArticleID")%>" ><%=rs("title")%></a></td>
                                         <td width="26%"class="bbb"><%=rs("UpdateTime")%></td>
                                       </tr>
                                       <tr> </tr>
                                     </table></td>
                                     <% if i mod 1 =0 then%>
                                   </tr>
                                   <tr>
                                     <%end if%>
                                     <%
i=i+1 
if i >= 31 then exit do 
rs.MoveNext 
loop
end sub
%>
                                   </tr>
                                 </table></td>
                               </tr>
                             </table></td>
                           </tr>
                           <tr>
                             <td align="center"  
                 ><div align="right" class="ccc">
                               <div align="center" class="bbb">
                                 <%
Response.write "<font color='#ffffff'>-> 全部-</font>"
Response.write "共</font>" & "<font color=#000000>" & Cstr(Rs.RecordCount) & "</font>" & "<font color='#000000'>条</font>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"
Response.write "<font color='#fff'>第</font>" & "<font color=#000000>" & Cstr(CurrentPage) &  "</font>" & "<font color='#000000'>/" & Cstr(rs.pagecount) & "</font>&nbsp;"
If currentpage > 1 Then
response.write "<a href='?&page="+cstr(1)+"'><font color='#000000'>首页</font></a> "
Response.write "<a href='?page="+Cstr(currentpage-1)+"'><font color='#000000'>上一页</font></a> "
Else
Response.write "<font color='#000000'>上一页 </font>"
End if
If currentpage < Rs.PageCount Then
Response.write "<a href='?page="+Cstr(currentPage+1)+"'><font color='#000000'>下一页</font></a><font color='#000000'> </font>"
Response.write "<a href='?page="+Cstr(Rs.PageCount)+"'><font color='#000000'>尾页</font></a></strong>&nbsp;&nbsp;"
Else
Response.write ""
Response.write "<font color='#000000'>下一页</font>&nbsp;&nbsp;"
End if
%>
                               </div>
                             </div></td>
                           </tr>
                         </table></td>
                       </tr>
                     </table></td>
                   </tr>
                 </table></td>
             </tr>
           </table></td>
         </tr>
     </table></td>
   </tr>
 </table>
  
<table width="1000" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td height="5"></td>
  </tr>
</table>
<!--#include file="end.asp"-->
</body>
</html>
