Make your own free website on Tripod.com
   
  <% Set Conn=Server.CreateObject("ADODB.Connection") Conn.Provider="Microsoft.Jet.OLEDB.4.0" Conn.Open Server.MapPath("\portfolio\webboard\webboard.mdb") Sql="Select * from question order by ID desc" Set RS =Server.CreateObject("ADODB.Recordset") RS.open Sql,Conn,1,3 %> <%total=RS.RecordCount if total=0 then%>
ยังไม่มีคนโพสกระทู้นะค่ะ
ตั้งกระทู้ใหม่
<%else if request("no") ="" then pageno =1 else pageno=int(request("no")) end if pagesize=10 totalpage=total\pagesize if (total mod pagesize) <> "0" then totalpage= totalpage+1 end if RS.Move pagesize*(pageno-1) if pageno <> totalpage then endrecord = pagesize else if (total mod pagesize)=0 then endrecord=pagesize else endrecord=(total mod pagesize) end if end if end if %> <%For list=1 to endrecord%> <% if list mod 2 = 0 then color = "#BDEAFF" else color = "#DDF4FF" end if %> > <%RS.MoveNext Next%>
" align="absmiddle" width="15" height="15"> <<%=right("0000" & RS("ID"),5)%>> &VIEW=<%=RS("NVIEW")%>" target="_blank"> <%=RS("TOPIC")%>
<%=RS("NAME")%>
<%=RS("DATE")%>
<%=RS("NANSWER")%>
<% rs.Close : Set rs = Nothing Conn.Close : Set Conn = Nothing %>
 
     
   จำนวนผู้เข้าชมเว็บเพจ <% Set Conn=Server.CreateObject("ADODB.Connection") Conn.Provider="Microsoft.Jet.OLEDB.4.0" Conn.Open Server.MapPath("\portfolio\counter\counter.mdb") Sql="Select * from statistic" Set rs = Server.CreateObject("ADODB.Recordset") rs.open Sql,Conn,1,3 counter = rs("COUNT") if Session("visitor") = "" then counter = counter + 1 rs("COUNT") = counter rs.Update Session("visitor") = counter Session.Timeout = 30 End If rs.Close : Set rs = Nothing Conn.Close : Set Conn = Nothing StrCount=Right("000000" & counter,6) For i = 1 to Len(StrCount) Response.Write "" Next %>
   จำนวนคนออนไลน์ : <%=Application("User")%> คน