<%
connstr="DBQ="+server.mappath("data/data.mdb")+";DefaultDir=;DRIVER={Microsoft Access Driver (*.mdb)};"
set conn=Server.CreateObject("ADODB.connection")
conn.open connstr
set u4=conn.execute("select top 10 * from book where type=0 order by id desc")                                                                                                                                                                                                                                               
if u4.eof and u4.bof then                                                                                                                                                                                                                                               
response.write"document.write('<center>暂时没有帖子！</center>');"                                                                                                                                                                                                                                               
else
do while not u4.eof
Response.Write "document.write(" & chr(34) & "·<a href=bbs/show.asp?id="&u4("id")&"&name=最新帖子 style='font-size:13px;line-height:140%; color:#FFFFFF'>"&left(u4("title"),10)&"</a><br>" & chr(34) & ");"
u4.movenext                                                                                                                                                                                                                                                                                         
loop                                                                                                                                                                                                                                                                        
   u4.Close                                                                                                                                                                                                                                                                    
set u4=nothing                                                                                                                                                                                                                                                                  
 end if                                                                                                                                                                                                                                                           
%>                                                                                                                                           
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
