<file_sep>TechBerry Upload
===============

This is the framework for the techberry upload platform that will be eventually liscenced and open-sourced


Credits,
  Int
  Iyop45
<file_sep><?php 
    ob_start('sanitize_output');
    include 'db_connect.php';
    include 'functions.php';
    sec_session_start();

    include 'content.php';
    $globalInitialize = new globalInitialize($mysqli,$_SERVER['PHP_SELF']);

    $domain = $_SERVER['HTTP_HOST'];
    $path = $_SERVER['SCRIPT_NAME'];
    $preurl = "http://" . $domain . $path;
    $url = preg_replace('/index.php/','',$preurl);

    docs();
?>
<head>
	<?php 
	  $globalInitialize->head(); 
	  head(0,0);
	?>
	<title>TechBerry</title>
	<link rel="icon" href="http://techberry.org/favicon.png" type="image/x-icon"/>
</head>
<body>
	<?php
		$globalInitialize->preBody();
		alert_bar();
	?>	
	<div id="<?=$prefixMain?>bg"></div>
	<div id="<?=$prefixGlobal . $subPrefixHeader?>">
		<div id="<?=$prefixGlobal . $subPrefixHeader . '_' . $subPrefixWrap?>">
			<?php
				notifications($mysqli, $url);
				banner(1, 'home');
			?>
		</div>
	<div id="<?=$prefixMain?>overlay2" onclick="close_bar(this);" style="display:none"></div>
	<div class="<?=$prefixGlobal?>wrap">
		<div id="<?=$prefixGlobal?>page" style="height:100%">
			<div id="<?=$prefixGlobal?>bar" style="overflow:auto;margin-bottom:40px; !important">

			<!-- THIS IS WHERE CONTENT IS PLACED -->

			</div>
		</div>
	</div>
	<?php 
		$globalInitialize->preFooter();
		echo $footer; 
		$globalInitialize->postBody(); 
	?>
</body>
<?php
	ob_end_flush();
	function sanitize_output($buffer) {
		$search = array(
			'/\>[^\S ]+/s',
		    	'/[^\S ]+\</s',
		    	'/(\s)+/s'
		);
		$replace = array(
		    	'>',
		    	'<',
		    	'\\1'
		);
		$buffer = preg_replace($search,$replace,$buffer);
		return $buffer;
	}
?>
