<?php require_once "cmsAdmin/lib/viewer_functions.php";

  list($pagesRecords, $pagesMetaData) = getRecords(array(
    'tableName'   => 'pages',
    'where'       => whereRecordNumberInUrl(1),
    'limit'       => '1',
  ));
  $pagesRecord = @$pagesRecords[0]; // get first record

?>
<!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>BePresent</title>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<style type="text/css" media="all">@import "css/all.css";</style>
		<!--[if lt IE 7]><link rel="stylesheet" type="text/css" href="css/ie6.css" media="screen"/><![endif]-->
		<!--[if IE]><link rel="stylesheet" type="text/css" href="css/ie.css" media="screen"/><![endif]-->
	</head>
	<body>
		<!-- container start -->
		<div id="container">
			<!-- header start -->
			<?php include 'inc/header.tpl' ?>
			<!-- header end || content start -->
			<div id="content"><!-- breadcrumbs start -->
				<ul class="breadcrumbs"><?php foreach ($pagesRecords as $record): ?>
                <li><a href="#"><?php echo $pagesRecord['breadcrumb'] ?></a></li>
					
				</ul>
				<!-- breadcrumbs end || promo start -->
				
				<div class="promo">
					<div class="headline">
						<div>
							<h2><?php echo $pagesRecord['name'] ?></h2>
						</div>
					</div>
					<ul class="preview"><?php foreach ($pagesRecord['images'] as $upload): ?>
                    			<?php if ($upload['hasThumbnail']): ?>
						<li><a href="#"><img src="<?php echo $upload['thumbUrlPath'] ?>" width="<?php echo $upload['thumbWidth'] ?>" height="<?php echo $upload['thumbHeight'] ?>" alt="" /></a></li>
						 <?php endif ?>
       				 <?php endforeach ?>
					</ul>
                      
				</div>
				<!-- promo end || info holder start -->
				<div class="info-holder">
					<div class="scroll">
						<div class="data"><?php echo $pagesRecord['content'] ?></div>
					</div>
                    <div class="scroll2">
						<div align="center">                        
                        <ul>
                          <li>
                            <?php require('inc/pages.php'); ?>
                          </li>
                        </ul>                        
                       
                         <?php endforeach; ?>

    <?php if (!$pagesRecords): ?>
      No records were found! <br/><br/>
    <?php endif ?>
    </div>
					</div>
				</div>
				<!-- info holder end -->
			</div>
			<!-- content end || footer start -->
			<?php include 'inc/footer.tpl' ?>
			<!-- footer end -->
		</div>
		<!-- container end -->
	</body>
</html>