Dee Chirafisi - Denver Real Estate Home / Contact
Dee Chirafisi - Denver Real Estate
Real Estate Specialist Home/Contact


Select the properties you are interested in below.
When finished selecting, click here to be contacted about these listings.
SELECTED PROPERTIES: 0

#!/usr/bin/perl # Copyright (C) 1997-2006 Indra's Net, Inc. All Rights Reserved. # This software may not be copied or modified without the explicit # written permission of Indra's Net, Inc. # Secure path $ENV{'PATH'} = '/bin:/usr/bin'; $ENV{'IFS'} = ''; use DBI; use CGI; use CGI::Carp qw(fatalsToBrowser); use CGI::FastTemplate; use strict; my $template_directory = '/var/www/d/denverdee.com/templates'; my $image_directory = '/var/www/d/denverdee.com/html/images/listings'; my $tmpl = new CGI::FastTemplate($template_directory); $tmpl->no_strict(); $tmpl->define(listing_row => 'listing_row.tmpl', listing_row_sold => 'listing_row_sold.tmpl'); my $dbh = DBI->connect('DBI:mysql:database=denverdee','city','nig0kila') || die "$DBI::errstr\n"; $dbh->{PrintError} = 0; # Pass DB error back to us my $subs = {}; my $q = new CGI; my $vars = $q->Vars; my $type = $vars->{type}; my $query = $dbh->prepare('select * from listing where type = ? order by sold, price DESC') || die $dbh->errstr; $query->execute($type) || die $dbh->errstr; while (my $results = $query->fetchrow_hashref) { $results->{price} = commify($results->{price}); # $results->{brochure_URL} = qq(BROCHURE) $results->{brochure_URL} = qq(3D Tour) if ($results->{brochure_URL}); $results->{tour_URL} = qq(YES) if ($results->{tour_URL}); # Upper case the hash keys for the template variables @{$subs}{ map { uc } keys %$results } = values %$results; if (-f "$image_directory/$results->{id}.jpg") { $subs->{PHOTO} = "$results->{id}.jpg"; } else { $subs->{PHOTO} = "noimage.gif"; } $tmpl->assign($subs); $tmpl->parse(RESULTS=> ($results->{sold} ? '.listing_row_sold' : '.listing_row')); } # Print print $q->header; $tmpl->print('RESULTS'); exit; sub commify { my $input = shift; $input = reverse $input; $input =~ s<(\d\d\d)(?=\d)(?!\d*\.)><$1,>g; return scalar reverse $input; }
ADDRESS PRICE VIRTUAL
TOUR
3D
TOUR
MY
SELECTIONS

When finished selecting, click here to be contacted about these listings.