<?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/billd3/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($bird_photosRecords, $bird_photosMetaData) = getRecords(array(    'tableName'   => 'bird_photos',    'perPage'     => '2',  ));      // load records  list($bird_photography_galleryRecords, $bird_photography_galleryMetaData) = getRecords(array(    'tableName'   => 'bird_photography_gallery',    'where'       => whereRecordNumberInUrl(1),    'limit'       => '1',  ));  $bird_photography_galleryRecord = @$bird_photography_galleryRecords[0]; // get first record  // show error message if no matching record is found  if (!$bird_photography_galleryRecord) {    header("HTTP/1.0 404 Not Found");    print "Record not found!";    exit;  }?><?php include "include_header.php"; ?>        <table width="1000" border="0" cellspacing="0" cellpadding="0">          <tr>            <td align="left" valign="top"><img src="images/1pixel.gif" width="1" height="12" /></td>          </tr>          <tr>            <td align="left" valign="top"><h1><?php echo $bird_photography_galleryRecord['title'] ?></h1></td>          </tr>          <tr>            <td align="left" valign="top"><img src="images/div-line-gradient.jpg" width="1000" height="2" vspace="1" /></td>          </tr>          <tr>            <td align="left" valign="top"><img src="images/1pixel.gif" width="1" height="8" /></td>          </tr>          <tr>            <td align="left" valign="top" class="content"><table width="1000" border="0" cellspacing="0" cellpadding="0">              <tr>                <td width="618" align="left" valign="top" class="content"><?php echo $bird_photography_galleryRecord['content'] ?></td>                <td width="48" align="left" valign="top" class="content">&nbsp;</td>                <td width="334" align="left" valign="top" class="content">Purchase information here...</td>    <?php if (!$bird_photography_galleryRecord): ?>      No record found!<br/><br/>    <?php endif ?>              </tr>                          </table></td>          </tr>          <tr>            <td align="left" valign="top">&nbsp;</td>          </tr>          <tr>            <td align="left" valign="top">    <?php if ($bird_photosMetaData['invalidPageNum']): ?>      Results page '<?php echo $bird_photosMetaData['page']?>' not found, <a href="<?php echo $bird_photosMetaData['firstPageLink'] ?>">start over &gt;&gt;</a>.<br/><br/>    <?php elseif (!$bird_photosRecords): ?>      No records were found!<br/><br/>    <?php endif ?>  <!-- /STEP2: Display Records -->  <!-- STEP3: Display Page Links (Paste anywhere below "Load Record List") -->    <?php if ($bird_photosMetaData['prevPage']): ?>      <a href="<?php echo $bird_photosMetaData['prevPageLink'] ?>">&lt;&lt; prev</a>    <?php else: ?>      &lt;&lt; prev    <?php endif ?>    - page <?php echo $bird_photosMetaData['page'] ?> of <?php echo $bird_photosMetaData['totalPages'] ?> -    <?php if ($bird_photosMetaData['nextPage']): ?>      <a href="<?php echo $bird_photosMetaData['nextPageLink'] ?>">next &gt;&gt;</a>    <?php else: ?>      next &gt;&gt;    <?php endif ?>  <!-- /STEP3: Display Page Links -->    </td>          </tr>          <tr>            <td align="left" valign="top">&nbsp;</td>          </tr>          <tr>            <td align="left" valign="top" class="style1">            <table width="1000" border="0">   <tr>  <td align="left" valign="top">    </td></tr><tr> 	<?php foreach ($bird_photosRecords as $record): ?>    <?php foreach ($record['upload_images'] as $upload): ?>          <?php if ($upload['hasThumbnail']): ?>	<td align="left" valign="top">           <table width="475" border="0" cellspacing="0" cellpadding="0">            <tr>              <td width="325" align="center" valign="top">      <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'] ?> © Bill & Sharon Draker"><img src="<?php echo $upload['thumbUrlPath'] ?>" width="<?php echo $upload['thumbWidth'] ?>" height="<?php echo $upload['thumbHeight'] ?>" border="1" alt="<?php echo $upload['tags'] ?>" /></a><br/>            </td>      </tr>    </table>              </td>              <td width="131" align="left" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">                <tr>                  <td>&nbsp;</td>                </tr>                <tr>                  <td><h2><?php echo $record['title'] ?></h2></td>                </tr>                <tr>                  <td><img src="assets/1pixel.gif" width="1" height="4" /></td>                </tr>                <tr>                  <td><h3><?php echo $record['content'] ?></h3></td>                </tr>                <tr>                  <td><img src="assets/1pixel.gif" width="1" height="8" /></td>                </tr>                <tr>                  <td><h4><?php echo $record['tags'] ?></h4></td>                </tr>                <tr>                  <td><img src="assets/1pixel.gif" alt="" width="1" height="8" /></td>                </tr>                <tr>                  <td><a href="purchase-photography.php">Purchase photos</a></td>                </tr>              </table>                </br></br></br></td>            </tr>            <tr>              <td height="25" align="center" valign="top">&nbsp;</td>              <td align="left" valign="top">&nbsp;</td>            </tr>          </table></td> <?php $maxCols=2; if (@++$count % $maxCols == 0): ?></tr><tr><?php endif; ?>       <?php endif ?>    <?php endforeach ?>        <?php endforeach ?>    <?php if ($bird_photosMetaData['invalidPageNum']): ?>      Results page '<?php echo $bird_photosMetaData['page']?>' not found, <a href="<?php echo $bird_photosMetaData['firstPageLink'] ?>">start over &gt;&gt;</a>.<br/><br/>    <?php elseif (!$bird_photosRecords): ?>      No records were found!<br/><br/>    <?php endif ?>    </tr> </table>            </td>          </tr>        </table>        <?php include "include_footer.php"; ?>