<?php header('Content-type: text/html; charset=utf-8'); ?>
<?php $libraryPath = 'cmsAdmin/lib/viewer_functions.php';
$dirsToCheck = array('/home/yourvita/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."); }
list($site_pagesRecords, $site_pagesMetaData) = getRecords(array(
    'tableName'   => 'site_pages',
    'where' => "num='2'",));
list($blogRecords, $blogMetaData) = getRecords(array(
    'tableName'   => 'blog',
    'where'       => whereRecordNumberInUrl(1),
    'loadUploads' => '0',
    'limit'       => '10',
	'orderBy'     => 'createdDate DESC',));
beta_lookupRelatedFields(array( 
'table'      => 'blog', 
'recordList' => &$blogRecords, 
'fieldList'  => array( 'name' )));
$blogRecord = @$blogRecords[0];
if (!$blogRecord) {print "Record not found!";exit;}
$errorsAndAlerts = alert(); if (@$CURRENT_USER) {$errorsAndAlerts = "You are already logged in! <a href='{$GLOBALS['WEBSITE_LOGIN_POST_LOGIN_URL']}'>Click here to continue</a> or <a href='?action=logoff'>Logoff</a>.";}?>
<!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 -->
<head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<?php foreach ($site_pagesRecords as $site): ?>	
	<!-- Title of page -->
	<title><?php echo $site['title'] ?></title>
	
	<!-- Main CSS Stylesheet -->
	<link href="style.css" rel="stylesheet" type="text/css" />
	<link rel="stylesheet" href="fancybox/jquery.fancybox-1.3.1.css" type="text/css" media="screen" />
	
	<link type="text/css" href="js/jQueryUI/jquery-ui-1.8.custom.css" rel="stylesheet" />	
	
	
	
	<!--[if IE 6]>
	<script src="js/DD_belatedPNG.js"></script>
	<script> DD_belatedPNG.fix('*'); </script>
	<link href="style_IE6.css" rel="stylesheet" type="text/css" />
	<![endif]-->
	    <!-- favorites -->
  <script type="text/javascript" src="/cmsAdmin/plugins/websiteFavorites.js"></script>
  <script type="text/javascript" src="/js/jquery.min.js"></script>
  <script type="text/javascript">jQuery.noConflict();</script>
  <?php $GLOBALS['WSF_SCRIPTS_LOADED'] = true; ?>
	<?php if ($CURRENT_USER): ?><style type="text/css">#logo { margin:-19px 0 0 0;}#header{min-height: 190px;}</style><?php endif ?>

	
</head>

<body>
<?php if ($CURRENT_USER): ?>
<div id="loggedin" >
<div id="member">
<?php echo $CURRENT_USER['fullname'] ?> you're Logged In | <a href="/profile.php">Profile</a>	
</div></div>
<?php endif ?>
	<div id="wrapper">
	
		<div id="header" class="blog">
		
			<div id="logo">
			
				<a href="indexx.php"><img src="/images/transparent.gif" class="sprite logo" width="200" height="111" alt="Vitality" /></a>
				
			</div>
			<!-- /#logo -->
<div id="menu"> 
<div id="right_bg" class="sprite"></div>          
<?php include("/home/yourvita/public_html/incl/nav-top.php"); ?>
</div>
<!-- /#menu -->

	<div id="header_info" class="blog_info">
			
				<div class="left">
				
					You are here : <a href="indexx.php" style="font-weight: bold;">Home</a> / <?php echo $site['title'] ?>
				
				</div>
				<?php if ($CURRENT_USER): ?>
				<div class="right">
				
					<?php
    $tableOrTag = 'blog';       // Update with your section's table name
    $recordNum  = $site['num'];  // Update this with current record number
  ?>

  <div class="<?php wsf_cssClassFor($tableOrTag, $recordNum, 'add'); ?>"
       style="<?php wsf_displayStyleFor($tableOrTag, $recordNum, 'add'); ?>">
    <a href="#" onclick="<?php wsf_onClickFor($tableOrTag, $recordNum, 'add'); ?>">Add as a Favorite</a>
  </div>

  <div class="<?php wsf_cssClassFor($tableOrTag, $recordNum, 'remove'); ?>"
       style="<?php wsf_displayStyleFor($tableOrTag, $recordNum, 'remove'); ?>">
    <a href="#" onclick="<?php wsf_onClickFor($tableOrTag, $recordNum, 'remove'); ?>">Remove Favorite</a>
  </div>
				
				</div><?php endif ?>
			
			</div>
			<!-- /#header_info -->
			
	
		</div>
		<!-- /#header -->
		
		<div id="content">
		
			<div id="left">
			<h2><?php echo $site['title'] ?></h2><?php endforeach; ?>
            
            
<div class="sidebar_item">
<ul id="tabs">
<li>All Posts</li>
<li>Fitness</li>
<li>Beauty</li>
</ul>
<!-- /#tabs -->
<div class="content_item_separator"></div>
<ul id="ctabs">
<li>
<ul class="ctabs_content">
<li>
<?php $firstRecord=true; ?> 
<?php foreach($blogRecords as $record): ?> 
<?php if($firstRecord):?> 
<?php $firstRecord=false; ?> 
<div class="content_item">
<h3><a href="blog_entry.html"><?php echo $record['title'] ?></a></h3>
<h5><?php echo $record['sub_title'] ?></h5>
<a href="blog_entry.html#comments" class="comments_balloon">57</a>
<p><img src="<?php echo $record['list_image_url'] ?>" width="610" height="169" alt="<?php echo $record['list_image_desc'] ?>" /></p>
<p><?php echo $record['list_desc'] ?></p>
<a href="/blogs/<?php echo $record['url_key'] ?>-<?php echo $record['num'] ?>" class="read_more">Continue Reading</a>
</div> 
<?php else: ?> 
<div class="content_item">
<h3><a href="blog_entry.html"><?php echo $record['title'] ?></a></h3>
<h5>



<?php if (is_array($record['name'])): ?> 
Added by <?php foreach ($record['name'] as $account): ?><a href="<?php echo $account['profile_url'] ?>"><?php echo $account['fullname']; ?></a><?php endforeach ?> 
<?php else: ?> 
<?php showme($record['name']) ?> 
<?php endif ?>

 on <?php echo date("jS M Y H:i", strtotime($record['date'])) ?></h5>
<a href="blog_entry.html#comments" class="comments_balloon">21</a>
<p><img src="<?php echo $record['list_image_url_s'] ?>" width="202" height="90" alt="<?php echo $record['list_image_desc_s'] ?>" class="alignleft" /></p>
<p><?php echo $record['list_desc'] ?></p>
<a href="/blogs/<?php echo $record['url_key'] ?>-<?php echo $record['num'] ?>" class="read_more">Continue Reading</a>
</div>
<?php endif ?> 
<?php endforeach?>
</li>
</ul>
</li>
					
<li>
<ul class="ctabs_content">
<li>


  <?php $firstRecord=true; ?> 
  <?php foreach($blogRecords as $record): ?>
  <?php if ($record['blog_cat'] == 'fit'): ?> 
  <?php if($firstRecord):?> 
  <?php $firstRecord=false; ?> 
  <div class="content_item">
  <h3><a href="blog_entry.html"><?php echo $record['title'] ?></a></h3>
  <h5><?php echo $record['sub_title'] ?></h5>
  <a href="blog_entry.html#comments" class="comments_balloon">57</a>
  <p><img src="<?php echo $record['list_image_url'] ?>" width="610" height="169" alt="<?php echo $record['list_image_desc'] ?>" /></p>
  <p><?php echo $record['list_desc'] ?></p>
  <a href="/blogs/<?php echo $record['url_key'] ?>-<?php echo $record['num'] ?>" class="read_more">Continue Reading</a>
  </div> 
  <?php else: ?> 
  <div class="content_item">
  <h3><a href="blog_entry.html"><?php echo $record['title'] ?></a></h3>
  <h5>
  
  <?php if (!$record['name']): ?>Added <?php else: ?>
  
  Added by <?php echo $record['name']; ?><?php endif ?> on <?php echo date("jS M Y H:i", strtotime($record['date'])) ?></h5>
  <a href="blog_entry.html#comments" class="comments_balloon">21</a>
  <p><img src="<?php echo $record['list_image_url_s'] ?>" width="202" height="90" alt="<?php echo $record['list_image_desc_s'] ?>" class="alignleft" /></p>
  <p><?php echo $record['list_desc'] ?></p>
  <a href="/blogs/<?php echo $record['url_key'] ?>-<?php echo $record['num'] ?>" class="read_more">Continue Reading</a>
  </div>
  <?php endif ?> <?php else: ?><?php endif ?>
  <?php endforeach?>

</li>
</ul>
</li>
<li>
						
							<ul class="ctabs_content">
							<li>
								<?php $firstRecord=true; ?> 
  <?php foreach($blogRecords as $record): ?>
  <?php if ($record['blog_cat'] == 'beauty'): ?> 
  <?php if($firstRecord):?> 
  <?php $firstRecord=false; ?> 
  <div class="content_item">
  <h3><a href="blog_entry.html"><?php echo $record['title'] ?></a></h3>
  <h5><?php echo $record['sub_title'] ?></h5>
  <a href="blog_entry.html#comments" class="comments_balloon">57</a>
  <p><img src="<?php echo $record['list_image_url'] ?>" width="610" height="169" alt="<?php echo $record['list_image_desc'] ?>" /></p>
  <p><?php echo $record['list_desc'] ?></p>
  <a href="/blogs/<?php echo $record['url_key'] ?>-<?php echo $record['num'] ?>" class="read_more">Continue Reading</a>
  </div> 
  <?php else: ?> 
  <div class="content_item">
  <h3><a href="blog_entry.html"><?php echo $record['title'] ?></a></h3>
  <h5>
  
  <?php if (!$record['name']): ?>Added <?php else: ?>
  
  Added by <?php echo $record['name']; ?><?php endif ?> on <?php echo date("jS M Y H:i", strtotime($record['date'])) ?></h5>
  <a href="blog_entry.html#comments" class="comments_balloon">21</a>
  <p><img src="<?php echo $record['list_image_url_s'] ?>" width="202" height="90" alt="<?php echo $record['list_image_desc_s'] ?>" class="alignleft" /></p>
  <p><?php echo $record['list_desc'] ?></p>
  <a href="/blogs/<?php echo $record['url_key'] ?>-<?php echo $record['num'] ?>" class="read_more">Continue Reading</a>
  </div>
  <?php endif ?> <?php else: ?><?php endif ?>
  <?php endforeach?>
							</li>
							</ul>
							<!-- /.ctabs_content -->
							
						</li>
						
					
					</ul>
					<!-- /#ctabs -->
				
				</div>
				
				
				
				
				
			
			</div>
			<!-- /#content #left - left side of main content -->
			
			<div id="right">
			
				<h3>Search Vitality</h3>
				<h5>Insert whatever you want here</h5>
				
				<div class="sidebar_item sprite" id="search">
				
					<form action="indexx.php" method="post">
					
						<input name="search_field" type="text" class="search_field" />
						<input name="search_field" type="submit" class="search_submit" value="" />
					
					</form>
					<!-- #search form -->
				
				</div>
				<!-- /.sidebar_item #search -->
				
				
				
				
				
				
	<div class="sidebar_item">
				
					<h3>Popular Posts</h3>
					
					<ul id="popular_posts">
					
						<li>
						
							<ul class="popular_posts_content">
							
								<li>
								
									<img src="assets/popular_1.gif" width="60" height="60" alt="Popular Post" class="alignleft" />
									<a href="#" class="title">Interview with Constantin Potorac</a>
									<a href="#">21 comments</a>
								
								</li>
								<!-- /.popular_posts_content li -->
							
								<li>
								
									<img src="assets/popular_2.gif" width="60" height="60" alt="Popular Post" class="alignleft" />
									<a href="#" class="title">Best iPhone apps of all time</a>
									<a href="#">67 comments</a>
								
								</li>
								<!-- /.popular_posts_content li -->
							
								<li>
								
									<img src="assets/popular_3.gif" width="60" height="60" alt="Popular Post" class="alignleft" />
									<a href="#" class="title">Can Avatar sweep all the Oscar awards?</a>
									<a href="#">4 comments</a>
								
								</li>
								<!-- /.popular_posts_content li -->
							
								<li>
								
									<img src="assets/popular_4.gif" width="60" height="60" alt="Popular Post" class="alignleft" />
									<a href="#" class="title">Official Iron Man 2 trailer released!</a>
									<a href="#">27 comments</a>
								
								</li>
								<!-- /.popular_posts_content li -->
							
							</ul>
							<!-- /.popular_posts_content -->
						
						</li>
						<!-- /.popular_posts li - popular posts slider item -->
					
						<li>
						
							<ul class="popular_posts_content">
							
								<li>
								
									<img src="assets/popular_2.gif" width="60" height="60" alt="Popular Post" class="alignleft" />
									<a href="#" class="title">Best iPhone apps of all time</a>
									<a href="#">67 comments</a>
								
								</li>
								<!-- /.popular_posts_content li -->
							
								<li>
								
									<img src="assets/popular_1.gif" width="60" height="60" alt="Popular Post" class="alignleft" />
									<a href="#" class="title">Interview with Constantin Potorac</a>
									<a href="#">21 comments</a>
								
								</li>
								<!-- /.popular_posts_content li -->
							
								<li>
								
									<img src="assets/popular_4.gif" width="60" height="60" alt="Popular Post" class="alignleft" />
									<a href="#" class="title">Official Iron Man 2 trailer released!</a>
									<a href="#">27 comments</a>
								
								</li>
								<!-- /.popular_posts_content li -->
							
								<li>
								
									<img src="assets/popular_3.gif" width="60" height="60" alt="Popular Post" class="alignleft" />
									<a href="#" class="title">Can Avatar sweep all the Oscar awards?</a>
									<a href="#">4 comments</a>
								
								</li>
								<!-- /.popular_posts_content li -->
							
							</ul>
							<!-- /.popular_posts_content -->
						
						</li>
						<!-- /.popular_posts li - popular posts slider item -->
					
					</ul>
					<!-- /#popular_posts -->
					
					<ul id="pop_nav">
					
						<li id="prev_pop"></li>
						<!-- /#prev_pop -->
					
						<li id="next_pop"></li>
						<!-- /#next_pop -->
					
					</ul>
					<!-- /#pop_nav -->
									
				</div>
			
			</div>
			<!-- /#content #right - right side of main content or sidebar -->
		
		</div>
		<!-- /#content -->
		
	</div>
	<!-- /#wrapper -->
	<div id="footer">
	
		<div id="footer_wrapper">
		
			<div id="footer_content">
		
				<div id="footer_column_1">
				
					<h6>Applications</h6>
					
					<ul>
					
						<li><a href="#">Application One</a></li>
					
						<li><a href="#">Application Two</a></li>
					
						<li><a href="#">Application Three</a></li>
					
						<li><a href="#">Application Four</a></li>
					
						<li><a href="#">Application Five</a></li>
					
						<li><a href="#">Application Six</a></li>
					
					</ul>
					<!-- /ul -->
				
				</div>
				<!-- /#footer_column_1 -->
			
				<div id="footer_column_2">
				
					<h6>Support</h6>
					
					<ul>
					
						<li><a href="#">Online Support</a></li>
					
						<li><a href="#">Telephone Sales</a></li>
					
						<li><a href="#">Workshops</a></li>
					
						<li><a href="#">Email Form</a></li>
					
						<li><a href="#">Mail</a></li>
					
						<li><a href="#">Fax Number</a></li>
					
					</ul>
					<!-- /ul -->
				
				</div>
				<!-- /#footer_column_2 -->
			
				<div id="footer_column_3">
				
					<h6>Markets</h6>
					
					<ul>
					
						<li><a href="#">Education</a></li>
					
						<li><a href="#">Science</a></li>
					
						<li><a href="#">Business</a></li>
					
						<li><a href="#">Education</a></li>
					
						<li><a href="#">Science</a></li>
					
						<li><a href="#">Business</a></li>
					
					</ul>
					<!-- /ul -->
				
				</div>
				<!-- /#footer_column_3 -->
			
				<div id="footer_column_4">
				
					<h6>From Flickr</h6>
					
					<a href="assets/post_1.jpg" class="lightbox"><img src="assets/flickr1.gif" width="81" height="52" alt="flickr" /></a>
					
					<a href="assets/post_1.jpg" class="lightbox"><img src="assets/flickr2.gif" width="81" height="52" alt="flickr" /></a>
					
					<a href="assets/post_1.jpg" class="lightbox"><img src="assets/flickr3.gif" width="81" height="52" alt="flickr" /></a>
					
					<a href="assets/post_1.jpg" class="lightbox"><img src="assets/flickr4.gif" width="81" height="52" alt="flickr" /></a>
					
					<a href="assets/post_1.jpg" class="lightbox"><img src="assets/flickr2.gif" width="81" height="52" alt="flickr" /></a>
					
					<a href="assets/post_1.jpg" class="lightbox"><img src="assets/flickr4.gif" width="81" height="52" alt="flickr" /></a>
					
					<a href="assets/post_1.jpg" class="lightbox"><img src="assets/flickr1.gif" width="81" height="52" alt="flickr" /></a>
					
					<a href="assets/post_1.jpg" class="lightbox"><img src="assets/flickr3.gif" width="81" height="52" alt="flickr" /></a>
				
				</div>
				<!-- /#footer_column_4 -->
				
			</div>
			<!-- /#footer_content -->
		
		</div>
		<!-- /#footer_wrapper -->
	
	</div>
	<?php include("/home/yourvita/public_html/incl/nav-bot.php"); ?>
	
	<div class="hidden">
	
		<div id="login_wrapper">
	
			<div id="login_top"></div>
			
			<div id="login">
			
<?php if (@$errorsAndAlerts): ?>
<div >
<?php echo $errorsAndAlerts; ?><br/>
</div><?php endif ?>
<?php if (!@$CURRENT_USER): ?>
<form action="?" method="post">
<input type="hidden" name="action" value="login" />
<div class="login_block">
<label for="login_username">Username:</label>
<input type="text" name="username" value="<?php echo htmlspecialchars(@$_REQUEST['username']); ?>" size="20" id="login_username" /></div>
<div class="login_block">
<label for="login_password">Password:</label>
<input type="password" name="password" value="<?php echo htmlspecialchars(@$_REQUEST['password']); ?>" size="20" id="login_password" /></div>
<div class="login_block_submit">
<input type="submit" name="submit" value="Login" id="login_submit" /></div>
<p class="not_login_info">
<span class="left"><a href="<?php echo $GLOBALS['WEBSITE_LOGIN_SIGNUP_URL'] ?>">Sign-up</a></span>
<a href="<?php echo $GLOBALS['WEBSITE_LOGIN_REMINDER_URL'] ?>" class="right">Forgot your password?</a>
</p>
<p class="not_info"><span class="img"></span>You will be re-directed back to the home page once logged in<span class="close"></span></p>
</form><?php endif ?>
			
            
            
			</div>			
			
			<div id="login_bottom"></div>
		
		</div>
	
	</div>
<!-- .JS Files -->
	<script type="text/javascript" src="js/jquery.min.js"></script>
	<script type="text/javascript" src="js/jquery-ui-1.8.custom.min.js"></script>
	<script type="text/javascript" src="js/Cufon_yui.js"></script>
	<script type="text/javascript" src="js/LiberationSans_Cufon.js"></script>
	<script type="text/javascript" src="fancybox/jquery.fancybox-1.3.1.pack.js"></script>
	<script type="text/javascript" src="js/scripts.js"></script>
    	<script type="text/javascript">
		$(function(){

			// Datepicker
			$('#datepicker').datepicker({
				inline: true
			});
			
		});
	</script>
</body>
</html>
