ob_start('ob_gzhandler'); header("Vary: Accept-Encoding"); header("Cache-Control: public"); #header('Expires: ' . gmdate('D, d M Y H:i:s', time()+24*60*60*10) . ' GMT'); function addstate() { global $state; printf("&state=%s",urlencode($state)); } require('/var/www/include/statenames.inc'); if (strlen($_REQUEST['state'])==2) $state=urlencode($_REQUEST['state']); else $state='CA'; $h2=$statenames[$state]; ?>
'; $o='name'; if ($_REQUEST['sort']=='name') $o='name'; else if ($_REQUEST['sort']=='lat') $o='lat'; else if ($_REQUEST['sort']=='long') $o='long'; else if ($_REQUEST['sort']=='temp') $o='temp'; #$o="to_number(temp,'999')"; else if ($_REQUEST['sort']=='county') $o='county'; else if ($_REQUEST['sort']=='quadrangle') $o='quadrangle'; $q="select * from hotsprings where state = '$state' order by $o;"; $r=pg_exec($db,$q); $rows=pg_numrows($r); printf("Number of hot springs found: %d
\n",$rows); ?>
>Name | State | >°F | >Lat | >Long | >Region | >Quadrangle | Add Link\n"; echo '||
---|---|---|---|---|---|---|---|---|
%s | ', #$d['lat'],-$d['long'],$d['name']); printf('%s | ', $i,$d['lat'],$d['long'],$i,urlencode($o),$d['name']); printf("%s | \n",$d['state']); printf("%s | \n",$d['temp']); printf("%2.3f | \n",$d['lat']); printf("%3.3f | \n",$d['long']); printf("%s | \n",$d['county']); if (strlen(trim($d['quadrangle']))<1) $d['quadrangle']=' '; printf("%s | \n",$d['quadrangle']); if ($_SERVER['REMOTE_ADDR']=='68.183.106.108') { printf("Add Link | \n", $d['lat'], $d['long'], $d['state'], $i, urlencode($o)); } echo "
[Hot Springs Forum] [Hot Springs Photos] [Deep Creek Hot Springs]