<?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('D:/virtuals/lifebenefits1/','','../','../../','../../../');
  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($blogRecords, $blogMetaData) = getRecords(array(
    'tableName'   => 'blog',
    'where'       => whereRecordNumberInUrl(1),
    'limit'       => '1',
  ));
  $blogRecord = @$blogRecords[0]; // get first record

  // show error message if no matching record is found
  if (!$blogRecord) {
    header("HTTP/1.0 404 Not Found");
    print "Record not found!";
    exit;
  }

?>
<!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">
<script type="text/javascript">

  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-17553144-1']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();

</script>
<head>
<meta http-equiv="Content-Language" content="en-us">

<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
<title>Life Benefit$, Inc. Helping You Increase and Protect Your Wealth</title>
<link rel="stylesheet" type="text/css" href="lb-stylesheet-2010.css">
</head>

<body topmargin="0" leftmargin="0" rightmargin="0" bgcolor="#000000">
<!-- DO NOT MOVE! The following AllWebMenus linking code section must always be placed right AFTER the BODY tag-->
<!-- ******** BEGIN ALLWEBMENUS CODE FOR lb-mainmenu2010 ******** -->
<script type="text/javascript">var MenuLinkedBy="AllWebMenus [4]",awmMenuName="lb-mainmenu2010",awmBN="818";awmAltUrl="";</script><script charset="UTF-8" src="lb-mainmenu2010.js" type="text/javascript"></script><script type="text/javascript">awmBuildMenu();</script>
<!-- ******** END ALLWEBMENUS CODE FOR lb-mainmenu2010 ******** -->

<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse; background-image: url('images/lb-marble-background-repeat.jpg'); background-repeat: repeat-y; background-position: center top" width="100%" height="100%">
  <tr>
    <td width="100%" height="473" valign="top">
    <div align="center">
      <center>
      <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse; background-repeat: repeat-x; background-position: left top" width="100%" height="486">
        <tr>
          <td width="100%" height="175" valign="top" style="background-image: url('images/lb-background-repeat.jpg'); background-repeat: repeat-x; background-position: left top">
          <div align="center">
            <center>
            <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse; background-image: url('images/lb-webhome-header.jpg'); background-repeat: no-repeat; background-position: center top" width="1024" height="173">
              <tr>
                <td height="173">&nbsp;</td>
              </tr>
            </table>
            </center>
          </div>
          </td>
        </tr>
        <tr>
          <td width="100%" height="47" valign="top" style="background-repeat: no-repeat; background-position: center top">
          <div align="center">
            <center>
            <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" width="921">
              <tr>
                <td id="awmAnchor-lb-mainmenu2010" width="921"></td>
              </tr>
            </table>
            </center>
          </div>
          </td>
        </tr>
        <tr>
          <td width="100%" height="38" valign="top" style="background-image: url('images/lb-webhome-content-top.jpg'); background-repeat: no-repeat; background-position: center top">&nbsp;</td>
        </tr>
        <tr>
          <td width="100%" height="651" valign="top" style="background-image: url('images/lb-webhome-content-repeat.jpg'); background-repeat: repeat-y; background-position: center top">
          <div align="center">
            <center>
          <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" width="1024">
            <tr>
              <td width="13%">&nbsp;</td>
              <td width="72%">
              <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" width="100%" height="313">
                <tr>
                  <td width="100%" align="left" height="39"><font size="6">
                  <img border="0" src="images/lb-logo-200px.jpg"> 
                  Blog</font></td>
                </tr>
                <tr>
                  <td width="100%" align="left" height="38"><br>
<b><a href="<?php echo $blogMetaData['_listPage']; ?>">&lt;&lt; Back to Blog Title Page</a></b> - 
  <a href="mailto:?subject=<?php echo thisPageUrl() ?>">Email this Page</a></td>
                </tr>
                <tr>
                  <td width="100%" height="1"></td>
                </tr>
                <tr>
                  <td width="100%" align="left" height="27">
                  <p align="right">
                  <img border="0" src="images/printer-icon.jpg"> <a href="http://www.life-benefits.com/blogPrintDetail.php?<?php echo $blogRecord['num'] ?>">Printer-friendly Page</a></td>
                </tr>
                <tr>
                  <td width="100%" align="left" height="209"><!-- STEP2: Display Records (Paste this where you want your records to be listed) -->
   <b><font size="6"><?php echo $blogRecord['title'] ?></font></b><br/>
      <?php echo date("D, M jS, Y", strtotime($blogRecord['date'])) ?><br/>
      <!-- For date formatting codes see: http://www.php.net/date -->
      <?php echo $blogRecord['content'] ?>


      <!-- STEP 2a: Display Uploads for field 'uploads' (Paste this anywhere inside STEP2 to display uploads) -->
        <!-- Upload Fields: num, createdTime, tableName, fieldName, recordNum, preSaveTempId, filePath, filename, extension, thumbFilePath, isImage, hasThumbnail, urlPath, width, height, thumbUrlPath, thumbWidth, thumbHeight, info1, info2, info3, info4, info5 -->
        <?php foreach ($blogRecord['uploads'] as $upload): ?>
          <?php if ($upload['hasThumbnail']): ?>
            <img src="<?php echo $upload['thumbUrlPath'] ?>" width="<?php echo $upload['thumbWidth'] ?>" height="<?php echo $upload['thumbHeight'] ?>" alt="" /><br/>

          <?php elseif ($upload['isImage']): ?>
            <img src="<?php echo $upload['urlPath'] ?>" width="<?php echo $upload['width'] ?>" height="<?php echo $upload['height'] ?>" alt="" /><br/>

          <?php else: ?>
            <a href="<?php echo $upload['urlPath'] ?>">Download <?php echo $upload['filename'] ?></a><br/>

          <?php endif ?>
        <?php endforeach ?>
      <!-- STEP2a: /Display Uploads -->


      <hr/>
    <?php if (!$blogRecord): ?>
      No record found!<br/><br/>
    <?php endif ?>
  <!-- /STEP2: Display Records -->

  <b><a href="<?php echo $blogMetaData['_listPage']; ?>">&lt;&lt; Back to Blog Title Page</a></b> - 
  <a href="mailto:?subject=<?php echo thisPageUrl() ?>">Email this Page</a></td>
                </tr>
              </table>
              </td>
              <td width="15%">&nbsp;</td>
            </tr>
          </table>
            </center>
          </div>
          </td>
        </tr>
        <tr>
          <td width="100%" height="60" valign="top" style="background-image: url('images/lb-webhome-footer.jpg'); background-repeat: no-repeat; background-position: center top">&nbsp;</td>
        </tr>
        <tr>
          <td width="100%" height="60" valign="top" style="background-repeat: no-repeat; background-position: center top">
          <div align="center">
            <center>
            <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" width="906">
              <tr>
                <td width="453">
                <p class="footer">© 2010 Life Benefit$, Inc. All rights 
                reserved.</td>
                <td width="453">
                <p align="right" class="footer">Site designed &amp; maintained by
                <a target="_blank" href="http://www.staffordstudios.com/">
                <font color="#FFFFFF">Stafford Studios</font></a>.</td>
              </tr>
              <tr>
                <td width="906" colspan="2">&nbsp;</td>
              </tr>
            </table>
            </center>
          </div>
          </td>
        </tr>
      </table>
      </center>
    </div>
    </td>
  </tr>
</table>

</body>

</html>
ss