HOME ELEVATOR ESCALATOR SPARE PART SERVICES JOB REFERENCE ABOUT US CONTACT US
.
.

<% PageSize=40 if Request.QueryString("pageno")="" then pageno=1 else pageno=cint(Request.QueryString("pageno")) end if Set Conn = Server.CreateObject("ADODB.Connection") Conn.Open "Driver={Microsoft Access Driver (*.mdb)};DBQ=" & Server.MapPath("webboard.mdb") Set RS = Server.CreateObject("ADODB.Recordset") sql = "select count(*) as totnum from post where car <> '' " RS.Open sql, Conn, 1, 3 TotalRec = RS("totnum") RS.close sql = "select * from post where car <> '' order by -(id)" RS.Open sql, Conn, 1, 3 no=1 Rs.PageSize=PageSize PageCount=cint(Rs.PageCount) Rs.AbsolutePage=pageno %> <% zero1="" if rs("id") < 10000 then zero1="0" end if if rs("id") < 1000 then zero1="00" end if if rs("id") < 100 then zero1="000" end if if rs("id") < 10 then zero1="0000" end if %> <% acdate1 = Month(rs("date")) if acdate1 = 1 then ddd = "ม.ค." end if if acdate1 = 2 then ddd = "ก.พ." end if if acdate1 = 3 then ddd = "มี.ค." end if if acdate1 = 4 then ddd = "เม.ย." end if if acdate1 = 5 then ddd = "พ.ค." end if if acdate1 = 6 then ddd = "มิ.ย." end if if acdate1 = 7 then ddd = "ก.ค." end if if acdate1 = 8 then ddd = "ส.ค." end if if acdate1 = 9 then ddd = "ก.ย." end if if acdate1 = 10 then ddd = "ต.ค." end if if acdate1 = 11 then ddd = "พ.ย." end if if acdate1 = 12 then ddd = "ธ.ค." end if %>    Admin Page

<% recno = 1 Do While not RS.eof and recno<=PageSize id = rs("id") poem = rs("subject") iname = rs("name") 'seno = TotalRec - recno +1 seno = abs(((Pageno-1)*PageSize)-(TotalRec - recno +1)) %> <% if recno MOD 2 = 1 then coror = "#BDF0FD" position = "left" else coror = "cornsilk" position = "right" end if %>   - <%=zero1%><%=rs("id")%> - " target=""><%=rs("subject")%>  - โดย : <%=rs("name")%> [ <%=Day(rs("date"))%> <%=ddd%>]  <%if rs("count") > 0 then%> ( ตอบแล้ว ) <%else%> <%end if%>
<% recno = recno+1 RS.MoveNext Loop %>

<% If pageno > 1 or NOT rs.EOF Then response.write "มีจำนวนทั้งหมด "&TotalRec&" รายการ" Response.Write vbCrLf & "หน้านี้เป็นหน้าที่: " & pageno & " จากทั้งหมด " & PageCount & " หน้า  

" End If If pageno > 1 Then Response.Write vbCrLf & " << หน้าแรก" Response.Write vbCrLf & " < หน้าก่อน " End If LRPages = 4 TotalPageCount = PageCount if PageCount > 1 then PageCount = TotalPageCount if pageno > PageCount then if request("showall") = "" then intForLoopToShowAllPages = pageno - LRPages PageCount = TotalPageCount - pageno PageCount = pageno + PageCount else PageCount = pageno + LRPages end if else if request("showall") = "" then intForLoopToShowAllPages = 1 else intForLoopToShowAllPages = pageno PageCount = TotalPageCount end if end if If pageno > 1 or NOT Rs.EOF Then For intLinkPageNum = intForLoopToShowAllPages to PageCount If intLinkPageNum = pageno Then Response.Write vbCrLf&""&intLinkPageNum&"" Else Response.Write vbCrLf & " " & intLinkPageNum & " " End If Next end If If NOT Rs.EOF then Response.Write vbCrLf & " หน้าต่อไป >" Response.Write vbCrLf & " หน้าสุดท้าย >>" end If end If %>

Copyright © 2010 IBC. Technical Lift Co.,Ltd. All rights reserved.