<?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 */

  // load viewer library
  $libraryPath = 'cmsAdmin/lib/viewer_functions.php';
  $dirsToCheck = array('/home/jocotoco/public_html/','','../','../../','../../../');
  foreach ($dirsToCheck as $dir) { if (@include_once("$dir$libraryPath")) { break; }}
  if (!function_exists('getRecords')) { die("Couldn't load viewer library, check filepath in sourcecode."); }

  // load records
  list($about_usRecords, $about_usMetaData) = getRecords(array(
    'tableName'   => 'about_us',
    'where'       => whereRecordNumberInUrl(1),
    'limit'       => '1',
  ));
  $about_usRecord = @$about_usRecords[0]; // get first record

  // show error message if no matching record is found
  if (!$about_usRecord) {
    header("HTTP/1.0 404 Not Found");
    print "Record not found!";
    exit;
  }

?>


<?php
  /* STEP 1: LOAD RECORDS - Copy this PHP code block near the TOP of your page */

  // load viewer library
  $libraryPath = 'cmsAdmin/lib/viewer_functions.php';
  $dirsToCheck = array('/home/jocotoco/public_html/','','../','../../','../../../');
  foreach ($dirsToCheck as $dir) { if (@include_once("$dir$libraryPath")) { break; }}
  if (!function_exists('getRecords')) { die("Couldn't load viewer library, check filepath in sourcecode."); }

  // load records
  list($about_usRecords, $about_usMetaData) = getRecords(array(
    'tableName'   => 'about_us',


  ));

?>


<!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; }

  </style>
 </head>
<body>

      <h3 style="margin-bottom:0px;"><?php echo $about_usRecord['name'] ?></h3>
      
      
    <div>
   
    <?php foreach ($about_usRecords as $record): ?>	
   
    <?php if ($record['depth'] == 0): ?>	
	  <div style="display:inline; margin-right:5px;"><a href="about_us.php"><?php echo $record['name'] ?></a></div>
     <?php else: ?>
      <div style="display:inline; margin-right:5px;"><a href="<?php echo $record['_link'] ?>"><?php echo $record['name'] ?></a></div>
     <?php endif ?> 	
     
    <?php endforeach ?>
    </div>



  <!-- STEP2: Display Records (Paste this where you want your records to be listed) -->

    <?php foreach ($about_usRecords as $record): ?>
	
    
      <?php if ($record['depth'] == 1) { continue; } ?><?php echo $record['content'] ?><br/>
      


      <!-- STEP 2a: Display Uploads for field 'images' (Paste this anywhere inside STEP2 to display uploads) -->

        <?php foreach ($record['images'] as $upload): ?>
          
          <img src="<?php echo $upload['thumbUrlPath'] ?>" width="<?php echo $upload['thumbWidth'] ?>" height="<?php echo $upload['thumbHeight'] ?>" alt="" /><br/>
         
        <?php endforeach ?>
      <!-- STEP2a: /Display Uploads -->


    <?php endforeach ?>

    <?php if (!$about_usRecords): ?>
      No records were found!<br/><br/>
    <?php endif ?>
  <!-- /STEP2: Display Records -->

</body>
</html>
