<% Sub ExpBids_PageList(conection,SQL) ' Define variables dim recordsonpage, requestrecords, offset, allrecords, hiddenrecords, showrecords, lastrecord, recordcounter, pagelist, pagelistcounter ' DB connection dim Conn Set Conn = Server.CreateObject("ADODB.Connection") sConnection = conection Conn.Open(sConnection) ' records per page recordsonpage = 20 ' count all records 'var1 = Instr(query, "FROM") ' character position, start from word "FROM" in SQL string 'var2 = Instr(query, "Group")-1 ' character position, start from word "Group" in SQL String 'var3 = Instr(query, "WHERE")-1 ' character position, start from word "WHERE" in SQL String 'var4 = Instr(query, "left")-1 ' character position, start from word "Left Join" in SQL String 'response.Write(mid(query,var1, var2-var1)) 'response.Write( mid(query, var1, var4-var1) & mid(query, var3, var2-var3)&"

") 'response.write(query&"

") 'response.Write(mid(query, var3, var2-var3)&"
") 'response.write(var1&" "&var2&" "&var3&" "&var4) 'set rs_pagelist = conn.Execute("SELECT count(*) " & mid(query, var1, var4-var1) & mid(query, var3, var2-var3)) set rs_pagelist = conn.Execute("SELECT count(*) " & right( SQL,len(SQL)-InstrRev(SQL,"FROM")+1 )) allrecords = CINT(rs_pagelist(0)) ' if offset is zero then the first page will be loaded offset = request.querystring("offset") if offset = 0 OR offset = "" then requestrecords = 0 else requestrecords = requestrecords + offset end if ' opens database set rs_pagelist = conn.Execute(SQL) ' reads first records (offset) without showing them (can't find another solution!) hiddenrecords = requestrecords do until hiddenrecords = 0 OR rs_pagelist.EOF hiddenrecords = hiddenrecords - 1 rs_pagelist.movenext if rs_pagelist.EOF then lastrecord = 1 end if loop If not rs_pagelist.eof then Response.Write("") Response.Write("") Response.Write("") Response.Write("") Response.Write("") Response.Write("") Response.Write("") Response.Write("") Response.Write("") Response.Write("") Response.Write("") Response.Write("
No.Date PublishedDate ClosedTitle/DescriptionDeclaration
of Winner
") Response.Write("") ' prints records in the table showrecords = recordsonpage recordcounter = requestrecords row = 1 do until showrecords = 0 OR rs_pagelist.EOF recordcounter = recordcounter + 1 'Displays the content per page If row mod 2 = 1 then rowcolor = "#E9E9E9" myimg = "folderpaperinsert2.jpg" else rowcolor = "#FFFFFF" myimg = "folderpaperinsert.jpg" End if Response.Write("") Response.Write("") Response.Write("") Response.Write("") Response.Write("") Response.Write("") 'If noticetype = "q" then ' Response.Write("") 'End If row = row + 1 showrecords = showrecords - 1 rs_pagelist.movenext if rs_pagelist.EOF then lastrecord = 1 loop Response.Write("
"&recordcounter&"" & Month(rs_pagelist("published_date")) & "/" & Day(rs_pagelist("published_date")) & "/" & Year(rs_pagelist("published_date")) & "" & Month(rs_pagelist("closing_date")) & "/" & Day(rs_pagelist("closing_date")) & "/" & Year(rs_pagelist("closing_date")) & "" & rs_pagelist("description") & "
Reference No.: " & rs_pagelist("reference_id")& "
") If rs_pagelist("winner_file") <> "" AND not isnull(rs_pagelist("winner_file")) then Response.write("click here") End If Response.Write("PGB Registered Companies click here to submit your bid on this item!
") Else 'call noRecord Response.Write("
No notice posted!
") End if 'Displays the Navigation Area With Response .Write("") .Write("") .Write("") .Write("") .Write("") .Write("") .Write("") .Write("") .Write("") .Write("") Response.Write("") Response.Write("
 

") End With if requestrecords <> 0 then Response.Write("<< Prev Page") else Response.Write("<< Prev Page") end if With Response .Write("
 
") End With if lastrecord <> 1 AND not rs_pagelist.EOF then Response.Write("Next Page >>") else Response.Write("Next Page >>") end if if allrecords > 0 then With Response .Write("
Page List : ") End With End If '************** pagelistcounter = 0 MM_offset = Request("offset") For i = 1 to allrecords Step recordsonpage pagelistcounter = pagelistcounter + 1 'TM_PageEndCount = i + recordsonpage - 1 'if TM_PageEndCount > allrecords Then TM_PageEndCount = allrecords if i <> MM_offset + 1 then Response.Write("" & pagelistcounter& " ") else Response.Write(""&pagelistcounter&" ") 'pagelistcounter End if 'if(TM_PageEndCount <> allrecords) then Response.Write(" ") next '************** Response.Write("
") ' Closes connection rs_pagelist.close Conn.close End Sub %>

PGB Online Procurement


<%'If Session("EProcUser")<>"" or Session("CompanyUname")<>"" then%> <%'End if%> <%'call Display_forbidding("b")%>

EXPIRED BID INVITATIONS

E-Procurement Home <%If Session("EProcUser")<>"" or Session("CompanyUname")<>"" then%> | LOGOUT <%End if%>

<% query = "SELECT reference_id, published_date, closing_date, description, invitation_file, winner_file FROM eproc_for_closedbidding ORDER BY closing_date DESC" call ExpBids_PageList(MM_PGBOnline_STRING,query) %>

<%If Session("EProcUser")<>"" or Session("CompanyUname")<>"" then If Session("EProcUser")<>"" then%>
<%ElseIf Session("CompanyUname")<>"" then%>
<%End If Else%>
<%End If%>