"; echo " Hot Springs Forum http://deepcreekhotsprings.net/dchs/forum/list.php?f=1 Hot Springs Forum "; $c=pg_connect("dbname=dchs user=dchsuser password=george"); $q="select * from deepcreek where approved='Y' order by id desc limit 35;"; $d=pg_exec($c,$q); $cnt=pg_numrows($d); for ($i=0;$i<$cnt;$i++) { $row=pg_fetch_array($d,$i,PGSQL_ASSOC); if ((strtotime($row['datestamp'])+(60*60*24)*30) < time()) continue; printf(" %s http://deepcreekhotsprings.net/dchs/forum/read.php?f=1&i=%d&t=%d %s ", htmlentities(trim($row['subject'])),$row['id'],$row['thread'], htmlentities(trim($row['subject']))); } $q="select * from cahotsprings where approved='Y' order by id desc limit 10;"; $d=pg_exec($c,$q); $cnt=pg_numrows($d); for ($i=0;$i<$cnt;$i++) { $row=pg_fetch_array($d,$i,PGSQL_ASSOC); if ((strtotime($row['datestamp'])+(60*60*24)*30) < time()) continue; printf(" %s http://deepcreekhotsprings.net/dchs/forum/read.php?f=2&i=%d&t=%d %s ", htmlentities(trim($row['subject'])),$row['id'],$row['thread'], htmlentities(trim($row['subject']))); } $q="select * from ushotsprings where approved='Y' order by id desc limit 16;"; $d=pg_exec($c,$q); $cnt=pg_numrows($d); for ($i=0;$i<$cnt;$i++) { $row=pg_fetch_array($d,$i,PGSQL_ASSOC); if ((strtotime($row['datestamp'])+(60*60*24)*30) < time()) continue; printf(" %s http://deepcreekhotsprings.net/dchs/forum/read.php?f=3&i=%d&t=%d %s ", htmlentities(trim($row['subject'])),$row['id'],$row['thread'], htmlentities(trim($row['subject']))); } printf("\n");