<?php 
  require_once "/home/jclinic/public_html/cmsAdmin/lib/viewer_functions.php";
   
   
   //navigation treatments
  list($categoryRecords, $selectedCategory) = getCategories(array( 
    'tableName'           => 'conditions_treatments', 
    'selectedCategoryNum' => '',         // defaults to getNumberFromEndOfUrl() 
    'categoryFormat'      => 'showall',  // showall, onelevel, twolevel 
  ));
  
    //news listings
    list($newsRecords, $newsMetaData) = getRecords(array(
    'tableName'   => 'news',
	'limit'   => '3',
  ));  
   
     // load the selected category record 
  list($categories,) = getRecords(array( 
    'tableName'   => 'conditions_treatments', 
    'where'       => whereRecordNumberInUrl(1), 
  )); 
  $category = @$categories[0]; 
 
  // load all categories which are children of this category's parent 
  list($relatedCategoryRecords,) = getCategories(array( 
    'tableName'       => 'conditions_treatments', 
    'rootCategoryNum' => $category['parentNum'], 
  ));
?>

<!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>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<title><?php echo $selectedCategory['meta_title'] ?></title>
    <meta name="description" content="<?php echo $selectedCategory['meta_description'] ?>" />
    <meta name="keywords" content="<?php echo $selectedCategory['meta_keywords'] ?>" />
	<link rel="stylesheet" type="text/css" href="css/all.css" media="screen"/>
	<script type="text/javascript" src="js/dropdown.js"></script>
	<script type="text/javascript" src="js/jquery-1.3.2.min.js"></script>
	<script type="text/javascript" src="js/sifr.js"></script>
	<script type="text/javascript" src="js/sifr-addons.js"></script>
	<!--[if IE]><link rel="stylesheet" type="text/css" href="css/lt7.css" media="screen"/><![endif]-->
</head>
<body class="inner">
	<div id="main">
		<div id="content">
			<div class="content-area">
				<div class="content-main">
					<div class="page">
						<div class="page-hold">
							<!-- content-box -->
							<div class="content-hold">
								<div class="holder-heading">
									<!-- breadcrumbs -->
									<ul class="breadcrubs">
										<li><a href="index.php">Home</a></li>
										<li>Skin Conditions & Treatments</li>
										<li><?php echo $selectedCategory['breadcrumb'] ?></li>
									</ul>
									<!-- phone-number -->
									<em class="phone-number"><span>Call 03 9654 5720</span></em>
								</div>
								<div class="extra-holder">
									<div class="extra-content">
										<h1 class="title"><span><?php echo $selectedCategory['heading'] ?></span></h1>
										<?php echo $selectedCategory['content'] ?>
										<h2>Related Items</h2>
										<ul>
										<?php foreach ($relatedCategoryRecords as $record): ?>
										 <li><a href="<?php echo $record['_link'] ?>"><?php echo $record['name'] ?></a></li>
										    <?php endforeach; ?>
										    </ul>
									</div>
									<div class="extra-bar">
										<ul class="service-image-list">
                                        <?php foreach ($selectedCategory['images'] as $upload): ?>
                                        <li>
            <img src="<?php echo $upload['urlPath'] ?>" width="<?php echo $upload['width'] ?>" height="<?php echo $upload['height'] ?>" alt='' /><br/>
        <?php endforeach ?>
											</li>
										</ul>
									</div>
								</div>
							</div>
							<div class="sidebar">
								<strong class="heading"><span>SELECT A TREATMENT</span></strong>
								<!-- sidebar-main-navigation -->
								<ul id="main-nav">
									<?php foreach ($categoryRecords as $categoryRecord): ?> 
    <?php echo $categoryRecord['_listItemStart'] ?> 
 
    <?php if ($categoryRecord['_isSelected']): ?> 
      <b><a href="<?php echo $categoryRecord['_link'] ?>"><?php echo $categoryRecord['name'] ?></a></b> 
    <?php else: ?> 
      <a href="<?php echo $categoryRecord['_link'] ?>"><?php echo $categoryRecord['name'] ?></a> 
    <?php endif; ?> 
 
    <?php echo $categoryRecord['_listItemEnd'] ?> 
  <?php endforeach; ?> 
								</ul>
							</div>
						</div>
						<!-- header-box -->
						<div class="holder-header">
							<div id="header">
								<div class="holder">
									<!-- logotype -->
									<strong class="logo"><a href="http://www.melbournelaserclinic.com.au">cosmetic&amp;laser medical center</a></strong>
									<!-- slogan-text -->
									<strong class="slogan"><span>Non-surgical skin treatments in Melbourne by experienced doctors.</span></strong>
								</div>
								<!-- header-navigation -->
								<ul class="top-nav">
									<li class="active"><a href="index.php" class="home"><span>home page</span></a></li>
									<li><a href="about.php" class="about"><span>about the centre</span></a></li>
									<li><a href="news-resources.php" class="news"><span>resources</span></a></li>
									<li><a href="product-range-home.php" class="product"><span>product range</span></a></li>
									<li><a href="contactus.php" class="contact"><span>contact us</span></a></li>
								</ul>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
<!-- include start -->
		<?php include("includes/footer.php"); ?>
<!-- include end -->
				</div>
			</div>
		</div>
	</div>
</body>
</html>