<?php header('Content-type: text/html; charset=utf-8'); ?>
<?php
  /* STEP 1: LOAD RECORDS - Copy this PHP code block near the TOP of your page */
  require_once "/mnt/w0200/d29/s49/b029358c/www/huntclubestates66.com/nptAdmin/lib/viewer_functions.php";

  list($categoryRecords, $categoryMetaData) = getRecords(array(
    'tableName'   => 'category',
    'selectedCategoryNum'=>'',
    'categoryFormat' => 'showall',
  ));

?>
<!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>
  <title></title>
  <meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
  <style type="text/css">
    body          { font-family: arial; }
    .instructions { border: 3px solid #000; background-color: #EEE; padding: 10px; text-align: left; margin: 25px}
  </style>
 </head>
<body>

  <!-- INSTRUCTIONS -->
    <div class="instructions">
      <b>Sample List Viewer - Instructions:</b>
      <ol>
        <?php /*><li style="color: red; font-weight: bold">Rename this file to have a .php extension!</li><x */ ?>
        <li><b>Remove any fields you don't want displayed.</b> (Most list pages only have title and link fields.)</li>
        <li>Rearrange remaining fields to suit your needs.</li>
        <li>Copy and paste code into previously designed page (or add design to this page).</li>
      </ol>
    </div>
  <!-- /INSTRUCTIONS -->

  <!-- STEP2: Display Records (Paste this where you want your records to be listed) -->
    <h1>Category - List Page Viewer</h1>
		<h3>Unordered List Menu</h3> 
			<ul> <?php foreach ($categoryRecords as $categoryRecord): ?>
				<?php echo $categoryRecord['_listItemStart'] ?>
				<?php if ($categoryRecord['_isSelected']): ?> <b><a href="<?php echo $categoryRecord['_link'] ?>"><?php echo $categoryRecord['name'] ?></a></b> <?php else: ?>
				<a href="<?php echo $categoryRecord['_link'] ?>"><?php echo $categoryRecord['name'] ?></a>
				<?php endif; ?>
				<?php echo $categoryRecord['_listItemEnd'] ?> 
				<?php endforeach; ?> 
			</ul>
 
			<?php if (!$selectedCategory): ?> No record selected
			<?php endif; ?> <?php if ($selectedCategory): ?>
			<h3><?php echo $selectedCategory['name'] ?></h3> <?php echo $selectedCategory['content'] ?>
			<?php endif; ?>

</body>
</html>
