#!/usr/bin/perl # numeric.html: Numeric list of properties # User can Select a property from this form to view require "OLconfig.pl"; require "custom/vdslib.pl"; use Mysql; # mSQL database routines # Initialize CGI environment use CGI qw/:standard/; # retrieve the CGI variables. print header(); $top = &VDS::readFile('top.html'); $top =~ s/BROWSERTITLE/$clientName - $clientLocation: Rental Property Search/; $top =~ s/PAGETITLE/Numeric Listing of Properties/; $top =~ s#BANNER#Rental Search#; print $top; # initialize user data #$UserPath = "/usr/USERS"; #$User = param("User"); #$User = "$$" if !$User; #$UserData = "$UserPath/$User"; # Connect to server my $conn = Mysql->Connect($dbserver, $db) or print qq("numeric.html Connect: Sorry, we are temporarily unable to process your search request. Please try again in a little while. $Mysql::db_errstr"); $result = $conn->Query(qq{SELECT Num, Name, ID FROM $dbtable ORDER BY Num, Name}) or print qq{numeric.html Select: Sorry, we are temporarily unable to process your search request. Try resubmitting your search request in a couple of minutes. $Mysql::db_errstr}; if ($result->numrows() != 0) { print "
"; print "
| "; $newChar = "%s\n"; $first=1; while (($Num, $Name, $ID) = $result->fetchrow()) { $SendNum = $ID; $col += 1; if ($col > 4) { print " |
| $Num $Name | "; } # end-while print "
|---|