#!/usr/bin/perl BEGIN { my $homedir = ( getpwuid($>) )[7]; my @user_include; foreach my $path (@INC) { if ( -d $homedir . '/perl' . $path ) { push @user_include, $homedir . '/perl' . $path; } } unshift @INC, @user_include; } ############ # us-co: United States-Colorado ############ # # This code may be freely reproduced, distributed, transmitted, used, modified, # built upon, or otherwise exploited by anyone for any purpose, commercial or non-commercial, # and in any way, including by methods that have not yet been invented or conceived. # # Purpose: Provide link/citation directly to various Colorado legislative docs and sublevels # DOCUMENTATION # # Legislation for the state of Colorado resides in PDF and WordPerfect files. # Session laws are also available in HTML # Consolidated law is availabe at michie.com in HTML # # Approach uses PDF and HTML files. # CODE CONTRIBUTORS # Joe Carmel # Brian Gryth (subject matter expert) # CHANGE HISTORY require LWP::UserAgent; $ua = LWP::UserAgent->new; # Get URL string after the ? from the URL. $posted_information=$ENV{QUERY_STRING}; print "Content-type: text/html\n\n"; do "cgi-bin/shared.pl"; $posted_information=~s|^x=||; ######################################## # Bills ######################################## # http://www.leg.state.co.us/Clics/CLICS2009A/csl.nsf/bf-3HB?OpenView&StartKey=HB09-1052&Count=1 # http://www.leg.state.co.us/Clics/CLICS2009A/csl.nsf/bf-2SB?OpenView&StartKey=SB09-100&Count=1 # http://www.leg.state.co.us/Clics/CLICS2009A/csl.nsf/bf-2?OpenView&StartKey=SR09-001&Count=1 if ($posted_information=~m!^(hb|sb|hcr|hm|hjr|hjm|hr|sjr|sm|sr|sjm)-(\d+)(s\d?)?-(\d+)!i) { $billtype=uc($1); $year=$2; $session=lc($3); $billnum=$4; if ($billtype eq "HB") {$bfnum=3;} elsif ($billtype eq "SB") {$bfnum=2;} elsif ($billtype eq "HCR") {$bfnum=1;} elsif ($billtype eq "HM") {$bfnum=1;} elsif ($billtype eq "HJR") {$bfnum=3;} elsif ($billtype eq "HR") {$bfnum=3;} elsif ($billtype eq "SCR") {$bfnum=2;} elsif ($billtype eq "SJR") {$bfnum=2;} elsif ($billtype eq "SM") {$bfnum=2;} elsif ($billtype eq "SR") {$bfnum=2;} elsif ($billtype eq "SJM") {$bfnum=2;} elsif ($billtype eq "HJM") {$bfnum=1;} if ($session eq "") {$session="A";} $shortyear=$year; if ($year < 50) {$year=2000+$year;} else {$year=1900+$year;} $baseurl="http://www.leg.state.co.us"; $website=sprintf("http://www.leg.state.co.us/Clics/CLICS%d%s/csl.nsf/bf-%d%s?OpenView&StartKey=%s%02d-%03d&Count=1", $year,$session,$bfnum,$billtype,$billtype,$shortyear,$billnum); # Remove billtype for resolutions from website address if ($billtype eq "HR" || $billtype eq "SR") {$website=~s|bf-(.)..|bf-\1|;} # print "
".$website."\n"; # exit; $legdoc=GetFileFromURL($website); if ($legdoc=~s|\nSEC. \1.|; # Store the file and Display the Stored File with the Anchor. $outfn="Bills/".$congress."-".$billtype.$billnum.$billstage.".html"; $anchor="SEC-".$section; StoreFileandDisplayToAnchor($legdoc,$outfn,$anchor); RedirectToWebsite($website); } elsif ($posted_information=~m!^CRS-(\d+)!i) { if ($posted_information=~m!^CRS-(\d+)-([^-]*?)-([0-9\.]+)$!i) { $crstitle=$1; $crsarticle=$2; $crssection=$3; } elsif ($posted_information=~m!^CRS-(\d+)-([\d.])+$!i) { $crstitle=$1; $crsarticle=$2; $crssection=""; } elsif ($posted_information=~m!^CRS-(\d+)$!i) { $crstitle=$1; $crsarticle=""; $crssection=""; } else { print "Improper format for Colorado Revised Statute|
|
State of Colorado (us-co)
http://legislink.org/us-co? . . .
|
| Pre-enactment | Enacted Legislation (not available yet) |
Session Laws Format: SL-[year][session]-[bill-number]-[section] Example: http://legislink.org/us-co?01S2-1001-3 Source: Session Laws of Colorado Availability: 1993 - present |
| Consolidated Law |
Legend |
|
bill-number: House legislation numbering starts at 1001, Senate starts at 1 bill-stage: ENG (engrossed), REN (reengrossed), REV (revised) RER (rerevised), ENR (enrolled) bill-type: HB/SB (Bill), HCR/SCR (Concurrent Res), HJM/SJM (Joint Memorial), HJR/SJR (Joint Res), HM/SM (Memorial), HR/SR (Res) session: Regular session uses no designation. 1st Special Session uses "S", 2nd Special Session uses "S1", etc. |
|
|
This website redirects your browser to official government or government designated websites or retrieves that data at the time URLs are submitted.
While most websites try to keep you there, the goal here is to get you where you want to go. Documents may be stored temporarily at LegisLink.org to provide sub-document access when that access is not provided by the official repository. Always check the domain in the URL at the top of your browser to know the origin of the page being viewed. |
|

Here's a link to the government's URL you requested. ".$website.""; print ""; exit; } my $body=""; # $body = $http->body(); if ($req->is_success) { $body=$req->decoded_content; # or whatever } else { print "
".$req->status_line.""; exit; } # Text for availability if ($errorstr && $body=~m|$errorstr|) { print "Here's a link to the government's URL you requested. ".$website.""; print ""; exit; } # $http->reset(); return($body); }