<?php

	//$getPage = $_GET['p'];
	
	$getPage = $_GET['p'];
	$getPageTitle = file_get_contents("admin/pages/$getPage/title.txt", true);
	

	
	$getName = file_get_contents("admin/rr/productname.txt", true);
	$getHTML = file_get_contents("admin/pages/$getPage/html.txt", true);

	
	$filename= "admin/pages/$getPage/views.txt" ;
	$fd = fopen ($filename , "r") or die ("Can't open $filename") ;
	$fstring = fread ($fd , filesize ($filename)) ;
	fclose($fd) ;
	
	$fd = fopen ($filename , "w") or die ("Can't open $filename") ;
	$fcounted = $fstring + 1 ;
	$fout= fwrite ($fd , $fcounted ) ;
	fclose($fd) ;

?>
<!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 $getPageTitle; ?></title>
<link href="css/style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"></script>
<style type="text/css">
<!--
#mainWrapper {
	width: 520px;
	margin-top: 0px;
	background-color: #<?php echo file_get_contents("admin/design/bg.txt", true); ?>;
	background-image: url(imgs/bg<?php echo file_get_contents("admin/design/bgtexture.txt", true); ?>.png);
	background-repeat: repeat;
}

#NAV {
	background-color: #<?php echo file_get_contents("admin/design/nav.txt", true); ?>;
	height: 50px;
	width: 506px;
	background-image: url(imgs/bg<?php echo file_get_contents("admin/design/navtexture.txt", true); ?>.png);
	background-repeat: repeat;
	margin-left: 4px;
	box-shadow: 0px 0px 5px #212121;
}
-->
</style>
</head>

<body>

<div id="mainWrapper">

	<div id="headerArea" style="height:187px;">
    
    </div>
	
    <div id="contentArea" style=" margin-top:-60px;">
    
    	<!-- IF NAV is not on... show this...
        
        <div id="contentTop">
        	<img src="imgs/content-top.png" />
        </div>
        
        else  If NAV is ON show this... -->
        
     <div id="NAV">
       
      <div id="navOverlay" >
       
       		<div id="navItem"> <a href="#">Nav Item #1</a></div>
            <div id="navItem"> <a href="#">Nav Item #2</a></div>
            <div id="navItem"> <a href="#">Nav Item #3</a></div>
            <div id="navItem"> <a href="#">Nav Item #4</a></div>
       
       
       		<br clear="left" />
            
       </div> 
         
      </div>
     
        
        <div id="contentHere">
        
        		<p align="center" style="font-size:18px; color:#333;">&nbsp;</p>
        		<p align="center" style="font-size:18px; color:#333;">Content Here</p>
                <p  align="center" style="font-size:10px; color:#666;"> here is where your content would be shown</p>
                <p  align="center" style="font-size:10px; color:#666;">&nbsp;</p>
        
        </div>
        
        <div id="contentFooter">
        	<img src="imgs/content-footer.png" />
        </div>
        
        <div style="height:5px;"></div>
    
    </div>


</div>

</body>
</html>
