<?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/www/newcareinc/','','../','../../','../../../');
  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($servicesRecords, $servicesMetaData) = getRecords(array(
    'tableName'   => 'services',
    'where'       => whereRecordNumberInUrl(1),
    'limit'       => '1',
  ));
  $servicesRecord = @$servicesRecords[0]; // get first record

  // show error message if no matching record is found
  if (!$servicesRecord) {
    header("HTTP/1.0 404 Not Found");
    print "Record not found!";
    exit;
  }

 // load records
  list($contact_and_hoursRecords, $contact_and_hoursMetaData) = getRecords(array(
    'tableName'   => 'contact_and_hours',
    'where'       => whereRecordNumberInUrl(1),
    'limit'       => '1',
  ));
  $contact_and_hoursRecord = @$contact_and_hoursRecords[0]; // get first record

  // show error message if no matching record is found
  if (!$contact_and_hoursRecord) {
    header("HTTP/1.0 404 Not Found");
    print "Record not found!";
    exit;
  }
  
  // load records
  list($job_openingsRecords, $job_openingsMetaData) = getRecords(array(
    'tableName'   => 'job_openings',
    'where'       => whereRecordNumberInUrl(1),
    'limit'       => '1',
  ));
  $job_openingsRecord = @$job_openingsRecords[0]; // get first record

  // show error message if no matching record is found
  if (!$job_openingsRecord) {
    header("HTTP/1.0 404 Not Found");
    print "Record not found!";
    exit;
  }
  
   // load records
  list($mailing_listRecords, $mailing_listMetaData) = getRecords(array(
    'tableName'   => 'mailing_list',
    'where'       => whereRecordNumberInUrl(1),
    'limit'       => '1',
  ));
  $mailing_listRecord = @$mailing_listRecords[0]; // get first record

  // show error message if no matching record is found
  if (!$mailing_listRecord) {
    header("HTTP/1.0 404 Not Found");
    print "Record not found!";
    exit;
  }

  // load records
  list($current_editionRecords, $current_editionMetaData) = getRecords(array(
    'tableName'   => 'current_edition',
    'where'       => whereRecordNumberInUrl(1),
    'limit'       => '1',
  ));
  $current_editionRecord = @$current_editionRecords[0]; // get first record

  // show error message if no matching record is found
  if (!$current_editionRecord) {
    header("HTTP/1.0 404 Not Found");
    print "Record not found!";
    exit;
  }
  
   // load records
  list($jahco_statementRecords, $jahco_statementMetaData) = getRecords(array(
    'tableName'   => 'jahco_statement',
    'where'       => whereRecordNumberInUrl(1),
    'limit'       => '1',
  ));
  $jahco_statementRecord = @$jahco_statementRecords[0]; // get first record

  // show error message if no matching record is found
  if (!$jahco_statementRecord) {
    header("HTTP/1.0 404 Not Found");
    print "Record not found!";
    exit;
  }
  
  ?>
  
  
  <?php
$mypath = $_SERVER['PHP_SELF']; //used for menu features 
?>  


  <?php 
  $section_title = "Services";
  $page_title = $servicesRecord['page_title'];
  ?>
  


<?php include('includes/header_11.php'); ?>

    <!-- MAIN CONTENT -->
   <?php echo $servicesRecord['content'] ?>
   <?php foreach ($servicesRecord['files'] 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: ?>
            <p><a href="<?php echo $upload['urlPath'] ?>">Download <?php echo $upload['filename'] ?></a><br/>

          <?php endif ?>
        <?php endforeach ?>
   
   
<?php include('includes/staples_11.php'); ?>


<!-- Sidebar content goes here -->
<div style="padding: 10px;">
<?php echo $servicesRecord['sidebar'] ?>
</div>

 <?php include('includes/footer_11.php'); ?>
