<% dim needReprint, gotReprint, reprintDate, reprintPage, reprintCh passed_session = replace(Request.QueryString("session"),"'","''") q_session=passed_session passed_bill = replace(Request.QueryString("bill"),"'","''") nice_session = CardSess(passed_session) 'get all chars in bill string and remove spaces fixed_bill ="" 'TODO: FIND REFS TO CHECK BILL AND REPLACE WITH VERROOT.ROOT for x = 1 to len(passed_bill) some_char = mid(passed_bill,x,1) if some_char = " " then 'do this else 'do that fixed_bill = fixed_bill & some_char end if next new_fixed_bill ="" var_new_len = len(fixed_bill) if var_new_len < 6 then for x1 = 1 to var_new_len some_new_char = mid(fixed_bill,x1,1) if isnumeric(some_new_char) = false then new_fixed_bill = new_fixed_bill & some_new_char else theend = mid(fixed_bill,x1,var_new_len) spaces_to_add = 6 - var_new_len new_fixed_bill = new_fixed_bill & space(spaces_to_add) & theend exit for end if next else new_fixed_bill = fixed_bill end if do_page_top "Full Text of " & ucase(new_fixed_bill), passed_session,"" dim fso set fso = server.CreateObject("Scripting.FileSystemObject") dim pdfBasePath, blnShowPDF db_name = "BASIS" & passed_session & "1" DB1.open getserver(db_name,"iu","") Is_Bill_Reprinted(new_fixed_bill) ' this sets needreprint to 1 or 0 if passed_session >= 21 then sql_str = "select *,(select [xfrWoVersion] from aldexall.dbo.aldex_docxfer_ndx where xfrmeaid=hsid) as woVer from basis_wox where bill_root = '"&new_fixed_bill&"' and avail_flag = 'Y' order by hsid ASC" else sql_str = "select *,(select [xfrWoVersion] from aldexall.dbo.aldex_docxfer_ndx where xfrmeaid=hsid) as woVer from basis_wox where bill_root = '"&new_fixed_bill&"' and avail_flag = 'Y' order by hsid ASC" end if %>
<% set rs_text1 = db1.Execute(sql_str) if rs_text1.EOF then %><% else %> <% dim blnEnrolledBill do until rs_text1.eof 'get all chars in hsid string and remove spaces fixed_hsid ="" some_char="" for x = 1 to len(rs_text1("hsid")) some_char = mid(rs_text1("hsid"),x,1) if some_char = " " then 'do this else 'do that fixed_hsid = fixed_hsid & some_char end if next if right(trim(rs_text1("hsid")),1) = "Z" then blnEnrolledBill = true %><% end if 'link to full text col(2) %> <% ' Bill PDF stuff - new (1-20-2001) logic - wde some_server = Request.ServerVariables("SERVER_NAME") 'plm 11/15/2003 pdfBasePath = getpdfdir blnShowPDF = BillIsAvailable(passed_session, new_fixed_bill) if blnShowPDF then MaybeCopyPDF pdfBasePath, passed_session, fixed_hsid else MaybeDeletePDF pdfBasePath, passed_session, fixed_hsid end if ' build local path some_pdf_path = pdfBasePath & "\" & passed_session & "\Bills\" & fixed_hsid & ".PDF" if fso.FileExists(some_pdf_path) then ' build web path some_vir_pdf_path = some_server & "/PDF/" & passed_session & "/Bills/" & fixed_hsid & ".PDF" ' 01/04/05 PLM changed from pdf_viewer.asp to regular link because of MAC/IE problem. %> <% else %><% end if if blnEnrolledBill = true then dim rs_basis_bil sql_str = "select status_text from basis_bil where bill_root = '" & rs_text1("bill_root") & "'" set rs_basis_bil = db1.Execute(sql_str) %> <% 'Add Technical Correction line when version id's match get_line_item_vetoes_and_reductions rs_text1("bill_root"), rs_text1("hsid") else %> <% end if 'Add Technical Correction line when version id's match get_technical_correction rs_text1("bill_root"), rs_text1("hsid") if needReprint = 1 then if gotReprint = 0 then get_bill_reprinted rs_text1("bill_root"), rs_text1("hsid") end if end if rs_text1.movenext loop end if set fso = nothing 'TODO: FIGURE OUT IF THIS IS NEEDED OR NOT sub MaybeCopyPDF(pdfBasePath, passed_session, hsid) dim strSourceName, strDestName, f1, f2, blnNeedCopy strSourceName = pdfBasePath & passed_session & "\Bills\all\" & hsid & ".pdf" strDestName = pdfBasePath & passed_session & "\Bills\" & hsid & ".pdf" ' Need to copy if: ' Source exists and: ' ' ((dest doesn't exist) or (datestamps differ) or (sizes differ)) if fso.FileExists(strSourceName) then blnNeedCopy = not fso.FileExists(strDestName) if not blnNeedCopy then set f1 = fso.GetFile(strSourceName) set f2 = fso.GetFile(strDestName) if f1.Size <> f2.Size then blnNeedCopy = true else if f1.DateCreated > f2.DateCreated then blnNeedCopy = true end if end if end if set f2 = nothing ' Do I need this? if blnNeedCopy then fso.CopyFile strSourceName, strDestName, true end if end if end sub sub MaybeDeletePDF(pdfBasePath, passed_session, hsid) dim strName strName = pdfBasePath & "\" & passed_session & "\Bills\" & hsid & ".pdf" if fso.FileExists(strName) then fso.DeleteFile(strName), true end if end sub function hs_pretty_date(strDate) 'get date as yyyymmdd some_mm = "" some_dd = "" some_yy = "" some_mm = mid(strDate,5,2) some_dd = mid(strDate,7,2) some_year = mid(strDate,1,4) some_new_date = some_mm & "/" & some_dd & "/" & some_year if some_new_date = " / / " then some_new_date = "" hs_pretty_date = some_new_date end function function get_technical_correction(bill_root, hsid) '01/23/04 . PLM 'input = bill_root & hsid eg(HB100, HB0100D) 'output = "TECHNICAL CORRECTION(S)" 'notes = TECHNICAL CORRECTION(S) will link to the journal page if basis_bac.bill_jour_page <> 0 dim rs_basis_wox dim strPassed '07/26/04 PLM simple resolutions only need to pass one body 'used in sql_str. select case mid(UCASE(hsid),1,2) case "HR" strPassed = " psd_house_date <> '' " case "SR" strPassed = " psd_senate_date <> '' " case else strPassed = " psd_house_date <> '' AND psd_senate_date <> '' " end select sql_str = "select basis_wox.hsid, basis_bac.bill_hse_flag, bill_jour_page = right(bill_jour_page,4),case when exists (select * from basis" & q_session & "4.dbo.basis_jrt where jrt_page=right(bill_jour_page,4)) then 'yes' else 'no' end as link_active " & _ "from basis_wox, basis_bac " & _ "where " & strPassed & _ "and basis_wox.bill_root = '" & bill_root & "' " & _ "and basis_wox.bill_root = basis_bac.bill_root " & _ "and basis_bac.bill_act_code in('043') " & _ "and exists (select bill_act_text from basis_bac where basis_bac.bill_root = basis_wox.bill_root and basis_bac.bill_act_code in('043'))" set rs_basis_wox = db1.Execute(sql_str) do while not rs_basis_wox.eof if rs_basis_wox("hsid") = hsid then dim strTC, strID strTC = "MANIFEST ERROR(S)" 'Changed from TECHNICAL CORRECTIONS(S) 04/14/2004 PLM strID = "ManifestErrors" if cint(rs_basis_wox("bill_jour_page")) = 0 or rs_basis_wox("link_active")="no" then checkpdf strTC, passed_session & "\" & strid, replace(bill_root," ",""), strid else %><% end if end if rs_basis_wox.movenext loop end function ''''''''''' function Is_Bill_Reprinted(bill_root) ' just find out if we need to put in the reprinted line dim rs1 dim s dim bits,bits2 dim yr s = "select * from basis_bac where bill_root = '" & bill_root & "' " s = s & " AND bill_act_code = '077' and bill_act_text like '%reprinted%' " s = s & " AND bill_act_text_public <> 'N' " set rs1 = db1.execute(s) if not rs1.eof then needReprint = 1 'response.write "

It was reprinted.

" reprintActText = trim(rs1("bill_act_text") & "") if trim(rs1("bill_act_text") & "") <> "" then bits = split(trim(rs1("bill_act_text"))," " ) s = bits(ubound(bits)) ' should be the date... if instr(s, "/" ) > 0 then bits2 = split(s,"/") if ubound(bits2) = 2 then if len(bits2(2)) = 2 then yr = cint(bits2(2)) if yr >79 then yr = yr + 1900 if yr <= 79 then yr = yr + 2000 bits2(2) = cstr(yr) elseif len(bits2(2)) <> 4 then needreprint = 0 end if if len(bits2(0)) = 1 then bits2(0) = "0" & bits2(0) if len(bits2(1)) = 1 then bits2(1) = "0" & bits2(1) reprintDate = bits2(2) & bits2(0) & bits2(1) reprintPage = right(trim(rs1("bill_jour_page") ),4) reprintCh = trim(rs1("bill_hse_flag") & "") else needReprint = 0 end if else needReprint = 0 end if else needreprint = 0 end if else needReprint = 0 end if gotReprint = 0 end function function get_bill_reprinted(a_root, a_hsid) ' 02/07/2007 GER 'input = bill_root & hsid eg(HB100, HB0100D) 'output = "bill reprinted link to journal page if available" dim rs1 dim s dim strTC, strID dim bits,bits2, dt if mid(ucase(a_root),2,1) = "B" then strTC = "BILL REPRINTED" else strTC = "RESOLUTION REPRINTED" end if strID = "reprint" s = "select * " s= s & " ,(SELECT TOP 1 intro_date FROM basis_wox as b WHERE b.intro_date > basis_wox.intro_date AND b.bill_root = basis_wox.bill_root) AS next_date" s= s & " from basis_wox where hsid = '" & a_hsid & "' " s = s & " AND avail_flag in ('Y', 'A') " s = s & " ORDER BY hsid desc" set rs1 = db1.execute(s) if not rs1.eof then do while not rs1.eof 'response.write "

intro date = " & rs1("intro_date") & " for " & rs1("hsid") & ". reprint date = " & reprintdate & "

" if rs1("intro_date") <= reprintdate and (rs1("next_date")>=reprintdate or isnull(rs1("next_date"))) then s = "get_jrn_page.asp?session=" & passed_session & "&bill=" & replace(a_root, " ", "") s = s & "&jrn=" & reprintPage & "&hse=" & reprintCh %><% gotreprint = 1 exit do end if rs1.movenext loop end if end function '''''''''''''' function get_line_item_vetoes_and_reductions(bill_root, hsid) '07/23/04 . PLM 'input = bill_root & hsid eg(HB100, HB0100D) 'output = "LINE ITEM VETOES AND REDUCTIONS" 'notes = "LINE ITEM VETOES AND REDUCTIONS" will link to the journal page if basis_bac.bill_jour_page <> 0 ' otherwise it will show up without a link. ' If there is a scanned PDF then an additional PDF icon will be available. dim rs_basis_wox sql_str = "select basis_bac.bill_act_code,basis_wox.hsid, basis_bac.bill_hse_flag, bill_jour_page = right(bill_jour_page,4) " & _ "from basis_wox, basis_bac " & _ "where basis_wox.hsid = '" & hsid & "' " & _ "and basis_wox.bill_root = '" & bill_root & "' " & _ "and basis_wox.bill_root = basis_bac.bill_root " & _ "and basis_bac.bill_act_code in('035','038') " & _ "and exists (select bill_act_text from basis_bac where basis_bac.bill_root = basis_wox.bill_root and basis_bac.bill_act_code in('035','038'))" set rs_basis_wox = db1.Execute(sql_str) if not rs_basis_wox.eof then if rs_basis_wox("hsid") = hsid then dim strTC, strID strTC = "LINE ITEM VETOES AND REDUCTIONS" if rs_basis_wox("bill_act_code")="038" then strTC="Veto Information" end if strID = "Vetoes" %><% if rs_basis_wox("bill_jour_page") = 0 then %><% else %><% end if ' build local path dim our_server, our_pdf_path our_server = Request.ServerVariables("SERVER_NAME") our_pdf_path = pdfBasePath & "\" & passed_session & "\" & strID & "\" & replace(bill_root," ","") & ".PDF" if fso.FileExists(our_pdf_path) then %> <% else %><% end if %><% end if end if end function %>
Nothing Found
Intro/OfferedPassed
Version
Amended Name
PDF
Date
House
Senate

<%=rs_text1("hsid")%><%=rs_text1("bill_id")%> Full Text PDF of bill <%=rs_text1("hsid")%> <%=rs_basis_bil("status_text")%><%=hs_pretty_date(rs_text1("intro_date"))%> <%=hs_pretty_date(rs_text1("psd_house_date"))%><%=hs_pretty_date(rs_text1("psd_senate_date"))%>
&jrn=<%=rs_basis_wox("bill_jour_page")%>&hse=<%=rs_basis_wox("bill_hse_flag")%>"><%=strTC%>
<%=strTC%>
<%=strTC%>&jrn=<%=rs_basis_wox("bill_jour_page")%>&hse=<%=rs_basis_wox("bill_hse_flag")%>"><%=strTC%>">