<?php header('Content-type: text/html; charset=utf-8'); ?>
<?php
  $libraryPath = 'cmsbbf/lib/viewer_functions.php';
  $dirsToCheck = array('/vservers/website/htdocs/','','../','../../','../../../');
  foreach ($dirsToCheck as $dir) { if (@include_once("$dir$libraryPath")) { break; }}
  if (!function_exists('getRecords')) { die("Couldn't load viewer library, check filepath in sourcecode."); }
  list($lodging_listingsMHRecords, $lodging_listingsMetaData) = getRecords(array(
    'tableName'   => 'lodging_listings',
	'where' => ' category LIKE "%\Motels and Hotels\t%" ', 
  ));
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>test</title>
</head>
<body>

<?php foreach ($lodging_listingsMHRecords as $record): ?>
<h3><?php echo htmlspecialchars ($record['business_name']) ?></h3>
<?php $record['address_phone']= preg_replace('`[\r\n]+`',"\n",$record['address_phone']); ?>
<p><?php $record['address_phone'] = preg_replace("#<br\s*/?>#i", "", $record['address_phone']);
	echo nl2br(htmlspecialchars ($record['address_phone'])) ?></p>
<?php endforeach ?>

</body>
</html>
