<% 'executes everytime this page opens 'this line of code sets "active" field to "N" if the "closing date" of item to bid has passed sql = "UPDATE eproc_for_bidding SET active='N' WHERE closing_date < now()" dim cn,cmd set cn=Server.CreateObject("ADODB.Connection") cn.Open=MM_PGBOnline_STRING 'response.write(sql) cn.Execute(sql) cn.close Sub Display_expiredbids(noticetype) dim rs_forbidding Set rs_forbidding=Server.CreateObject("ADODB.Recordset") rs_forbidding.ActiveConnection=MM_PGBOnline_STRING 'rs_forbidding.Source = "SELECT reference_id, published_date, closing_date, description, file FROM eproc_for_bidding WHERE notice_type='"¬icetype&"' AND active='N' ORDER BY published_date, closing_date DESC" rs_forbidding.Source = "SELECT eproc_for_bidding.reference_id, published_date, closing_date, description, count(bidid) as cnt, file FROM eproc_for_bidding left join eproc_quotation_bids ON eproc_for_bidding.reference_id = eproc_quotation_bids.reference_id WHERE notice_type='"¬icetype&"' AND active='N' Group By eproc_for_bidding.reference_id, awarding_date, closing_date, description" rs_forbidding.Open() If noticetype = "q" then td_size = "10%" added_td = "
 
" colspan = 4 else td_size = "50%" added_td = "" colspan = 3 End if if not rs_forbidding.eof or not rs_forbidding.bof then Response.Write("") Response.Write("") Response.Write("") Response.Write("") Response.Write("") Response.Write("") 'Response.Write(added_td) Response.Write("") Response.Write("") Response.Write("") Response.Write("") Response.Write("
Date PublishedDate
Closed
Title/DescriptionBids
") Response.Write("") row = 0 While not rs_forbidding.eof 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("") 'If noticetype = "q" then ' Response.Write("") 'End If row = row + 1 rs_forbidding.movenext() Wend Response.Write("
" & Month(rs_forbidding("published_date")) & "/" & Day(rs_forbidding("published_date")) & "/" & Year(rs_forbidding("published_date")) & "" & Month(rs_forbidding("closing_date")) & "/" & Day(rs_forbidding("closing_date")) & "/" & Year(rs_forbidding("closing_date")) & "" & rs_forbidding("description") & "
Reference No.: " & rs_forbidding("reference_id")& "
"& rs_forbidding("cnt") & "PGB Registered Companies click here to submit your bid on this item!
") Else Response.Write("
No notice posted!
") End If rs_forbidding.Close() Set rs_forbidding = nothing End Sub Sub ExpBids_PageList(conection,SQL,bidtype) ' 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)) 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 bidtype = "q" then td_size = "10%" added_td = "
 
" colspan = 4 else td_size = "50%" added_td = "" colspan = 3 End if If not rs_pagelist.eof then Response.Write("") Response.Write("") Response.Write("") Response.Write("") Response.Write("") Response.Write("") Response.Write("") 'Response.Write(added_td) Response.Write("") Response.Write("") Response.Write("") Response.Write("") Response.Write("
No.Date PublishedDate
Closed
Title/DescriptionBidder
") 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 CINT(rs_pagelist("cnt")) > 0 then If rs_pagelist("isthereaWinner") = "Y" then response.Write("") Response.write(""&rs_pagelist("cnt")&"") If rs_pagelist("isthereaWinner") = "Y" then response.Write("") Else Response.Write(rs_pagelist("cnt")) 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 QUOTATIONS

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

<%'call Display_expiredbids("q") noticetype = "q" query = "SELECT eproc_for_bidding.reference_id, published_date, closing_date, description, count(bidid) as cnt, file, isthereaWinner FROM eproc_for_bidding left join eproc_quotation_bids ON eproc_for_bidding.reference_id = eproc_quotation_bids.reference_id WHERE notice_type='"¬icetype&"' AND active='N' Group By eproc_for_bidding.reference_id, awarding_date, closing_date, description ORDER BY closing_date DESC" call ExpBids_PageList(MM_PGBOnline_STRING,query,noticetype) %>

<%If Session("EProcUser")<>"" or Session("CompanyUname")<>"" then%> <%If Session("EProcUser")<>"" then%> <%ElseIf Session("CompanyUname")<>"" then%> <%End If%> <%Else%>
 
| Post Invitation to Bid | View All Active Biddings | View Pre-Registered Companies |
| Reactivate Accounts | Download Supplier's Bids | Post Winner | Change Password | Post Your Bid here! | Change Your Password here! | Edit Company ProfileCompany Pre-Registration | Registration Requirements Admin Login | Company Login <%End If%>