<?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 */
  require_once "/home/haddin/public_html/cmsAdmin/lib/viewer_functions.php";

  list($c_bannersRecords, $c_bannersMetaData) = getRecords(array(
    'tableName'   => 'c_banners',
    'where'       => whereRecordNumberInUrl(1),
    'orderBy'     => 'RAND()',
    'limit'       => '1',
  ));
  $c_bannersRecord = @$c_bannersRecords[0]; // get first record

  // show error message if no matching record is found
  if (!$c_bannersRecord) {
    print "Record not found!";
    exit;
  }

?>
<?php
  /* STEP 1: LOAD RECORDS - Copy this PHP code block near the TOP of your page */
  require_once "/home/haddin/public_html/cmsAdmin/lib/viewer_functions.php";

  list($c_servicesRecords, $c_servicesMetaData) = getRecords(array(
    'tableName'   => 'c_services',
    'where'       => whereRecordNumberInUrl(1),
    'limit'       => '1',
  ));
  $c_servicesRecord = @$c_servicesRecords[0]; // get first record

  // show error message if no matching record is found
  if (!$c_servicesRecord) {
    print "Record not found!";
    exit;
  }

?>
<?php
  /* STEP 1: LOAD RECORDS - Copy this PHP code block near the TOP of your page */
  require_once "/home/haddin/public_html/cmsAdmin/lib/viewer_functions.php";

  list($c_whats_onRecords, $c_whats_onMetaData) = getRecords(array(
    'tableName'   => 'c_whats_on',
  ));
  list($c_aboutRecords, $c_aboutMetaData) = getRecords(array(
    'tableName'   => 'c_about',
  ));
  list($c_servicesRecords, $c_servicesMetaData) = getRecords(array(
    'tableName'   => 'c_services',
  ));

?>
<!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>Template</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="template.css" rel="stylesheet" type="text/css">
</head>
<body>
<div id="pagewidth" >
	<div id="header" ><?php foreach ($c_bannersRecord['images'] as $upload): ?><img src="<?php echo $upload['urlPath'] ?>" /><?php endforeach ?></div>

    <?php
    include("navigation.php");
    ?>    

			<div id="wrapper" class="clearfix" >
            <div id="maincol" ><?php echo $c_servicesRecord['content'] ?></div>
            <div id="leftcol" > Left Column </div>
            </div>
    
	<?php
    include("footer.php");
    ?>

</div>
</body>
</html>