"; IF ($catmode == ''): print "$catmode"; MYSQL_CONNECT() OR DIE("Unable to connect to database"); @mysql_select_db( "mfdnews") or die( "Unable to select database"); IF ($catmode == ""): IF ($beg < 0): $beg = 0; ENDIF; $query = "SELECT * from news where category like 'NEWS' or category like 'COMMENTARY' or category like 'MHWEEKLY' order by nid desc limit $beg, $count"; ENDIF; IF ($catmode != ""): $query = "SELECT * from news where $catmode like '$key' limit $beg, $count"; ENDIF; $result = MYSQL_QUERY($query); $number = MYSQL_NUMROWS($result); $i = 0; IF ($number == 0) : PRINT "No Search Results for $term
Refine your search below using only one or two words...
"; ELSEIF ($number > 0) : WHILE ($i < $number): $head = mysql_result($result,$i,"head"); $event = mysql_result($result,$i,"event"); $source = mysql_result($result,$i,"source"); $date = mysql_result($result,$i,"date"); $url = mysql_result($result,$i,"url"); $nid = mysql_result($result,$i,"nid"); IF ($url != '') : print "$head
"; ENDIF; IF ($url == '') : print " $head
"; ENDIF; print " -- $source - $date --
"; $disevent = substr($event, 0, 400); $disfin = chop($disevent); if (file_exists("/usr/local/htdocs/mfdhousing/portal/newsimg/$nid.jpg")) { print ""; } else { print ""; } print "
"; echo strip_tags($disfin); print "..."; IF ($url != '') : print " "; ENDIF; print "

"; $i++; ENDWHILE; ENDIF; ENDIF; IF ($catmode != ''): MYSQL_CONNECT() OR DIE("Unable to connect to database"); @mysql_select_db( "mfdnews") or die( "Unable to select database"); $query = "SELECT where category like 'NEWS' or category like 'COMMENTARY' from news where $catmode like '$key' order by nid desc limit $beg, $count"; $result = MYSQL_QUERY($query); $number = MYSQL_NUMROWS($result); $i = 0; IF ($number == 0) : PRINT "
"; ELSEIF ($number > 0) : WHILE ($i < $number): $head = mysql_result($result,$i,"head"); $event = mysql_result($result,$i,"event"); $source = mysql_result($result,$i,"source"); $date = mysql_result($result,$i,"date"); $url = mysql_result($result,$i,"url"); $nid = mysql_result($result,$i,"nid"); IF ($url != '') : print "$head
"; ENDIF; IF ($url == '') : print " $head
"; ENDIF; print "
-- $source - $date --
"; $disevent = substr($event, 0, 400); $disfin = chop($disevent); print "
"; echo strip_tags($disfin); print "..."; IF ($url != '') : print " "; ENDIF; print "

"; $i++; ENDWHILE; ENDIF; ENDIF; Print " "; ENDIF; IF ($mode == 'cat'): MYSQL_CONNECT() OR DIE("Unable to connect to database"); @mysql_select_db( "mfdnews") or die( "Unable to select database"); $query = "SELECT distinct $catmode from news"; $result = MYSQL_QUERY($query); $number = MYSQL_NUMROWS($result); $i = 0; IF ($number == 0) : PRINT "
"; ELSEIF ($number > 0) : WHILE ($i < $number): $thead = mysql_result($result,$i, $catmode); print "$thead
"; $i++; ENDWHILE; ENDIF; ENDIF; ?>
Manufactured Housing Business News & Commentary Updated Daily by MobileHomeNews.com