<?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('/hsphere/local/home/gkornblu/thecmsbcookbook.com/','','../','../../','../../../');  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($eventsRecords, $eventsMetaData) = getRecords(array(    'tableName'   => 'events',    'where'       => whereRecordNumberInUrl(1),    'limit'       => '1',  ));  $eventsRecord = @$eventsRecords[0]; // get first record  // show error message if no matching record is found  if (!$eventsRecord) {    header("HTTP/1.0 404 Not Found");    print "Record not found!";    exit;  }?><?php include "include_header.php"; ?>    <table width="1029" border="0" cellspacing="0" cellpadding="0">      <tr>        <td width="50" rowspan="4">&nbsp;</td>        <td width="930">&nbsp;</td>        <td width="49" rowspan="4">&nbsp;</td>      </tr>      <tr>        <td align="left" valign="top"><h1><?php echo $eventsRecord['title'] ?></h1></td>        </tr>      <tr>        <td><img src="images/1pixel.gif" width="930" height="10" /></td>        </tr>      <tr>        <td align="left" valign="top" class="mainText">        <table width="425" border="0" align="right">   <tr>     <?php foreach ($eventsRecord['upload_images'] as $upload): ?>      <?php if ($upload['hasThumbnail']): ?>	<td align="center" valign="center">           <table width="100" height="100" border="0" cellpadding="0" cellspacing="0" id="frame">      <tr>        <td>      <a href="<?php echo $upload['urlPath'] ?>" rel="lightbox[uploads]" title="<?php echo $upload['info1'] ?>"><img src="<?php echo $upload['thumbUrlPath'] ?>" width="<?php echo $upload['thumbWidth'] ?>" height="<?php echo $upload['thumbHeight'] ?>" border="1" alt="<?php echo $upload['info1'] ?>" /></a><br/>            </td>      </tr>    </table>      <?php echo $upload['info1'] ?><br/>	</td> <?php $maxCols=1; if (@++$count % $maxCols == 0): ?></tr><tr><?php endif; ?>       <?php endif ?>    <?php endforeach ?>    </tr> </table>          <p><?php echo date("D, M jS, Y g:i a", strtotime($eventsRecord['date'])) ?></p>          <p><h2>EVENT DETAILS:</h2><br/>                <!-- For date formatting codes see: http://www.php.net/date -->                <?php echo $eventsRecord['content'] ?></p>          <p><h2>EVENT LOCATION:</h2><br/>                <?php echo $eventsRecord['location'] ?><br/>                <?php if (!$eventsRecord): ?>            No record found!<br/>            <br/>              <?php endif ?>                <BR />                <a href="events.php">&lt;-- TAKE ME BACK TO THE CALENDAR!                </p>                </a></tr>      <tr>        <td colspan="3"><img src="images/ft-sleeping-giant-skiing-wyoming04.jpg" width="1029" height="62" /></td>        </tr>    </table><?php include "include_footer.php"; ?>