<?php
error_reporting(E_ERROR);
ini_set('display_errors',1);
$filename="admin/settings/privacy_terms_settings.txt";

if($handle = @fopen($filename, 'r'))
{
	$contents = fread($handle, filesize($filename));
	fclose($handle);
	$privacy_terms_arr=explode("#_1_#",$contents);
}
$filename="admin/settings/sales_settings.txt";

if($handle = @fopen($filename, 'r'))
{
	$contents = fread($handle, filesize($filename));
	fclose($handle);
	$home_arr=explode("#_1_#",$contents);
}
$filename="admin/settings/design_settings.txt";

if($handle = @fopen($filename, 'r'))
{
	$contents = fread($handle, filesize($filename));
	fclose($handle);
	$design_arr=explode("#_1_#",$contents);
}

if(!empty($_REQUEST['id'])) 
  {
		    $filename="content_pages/$_REQUEST[id]";

		if(!$handle = fopen($filename, 'r')) 
		  {
			 echo "Cannot open file ($filename)";
			 exit;
		  }
		$contents = @fread($handle, filesize($filename));

		@fclose($handle);
		$argument_arr_title=explode("#_1_#",$contents);		
		if ( !empty( $argument_arr_title['1'] ) ){
			$arr_title=explode(":::",$argument_arr_title['1']);
		}
  }
if(empty($seo_arr['0']) || $seo_arr['0']=='Your Title Here')
$seo_arr['0']=$arr_title['1'];

$filename="admin/settings/seo_settings.txt";

if($handle = @fopen($filename, 'r'))
{
	$contents = fread($handle, filesize($filename));
	fclose($handle);
	$track_arr=explode("#_1_#",$contents);
}

$filename="admin/settings/optin_settings.txt";

if($handle = @fopen($filename, 'r'))
{
	$contents = fread($handle, filesize($filename));
	fclose($handle);
	$optin_arr=explode("#_1_#",$contents);
}

$filename="admin/settings/seo/Terms.txt";

if($handle = @fopen($filename, 'r'))
{
	$contents = fread($handle, filesize($filename));
	fclose($handle);
	$seo_arr=explode("#_1_#",$contents);
}

require_once __DIR__ . '/admin/includes/verificator-class.php';
global $reauth;

$verify = new Verificator(
	'easybuildr.com',
	'per_domain'
);

$verify_connection = $verify->canConnect();
if ( $verify_connection !== true ) {
	$verify->process($verify_connection);
}

$verify_result = $verify->check( $reauth );
if ( $verify_result !== true ) {
	header("location:https://easybuildr.com/members/no-license/");
	exit;
}

if ( !isset( $seo_arr[7] ) or $seo_arr['7'] != 1 ) {
    header( "Cache-Control: no-cache, max-age=0, must-revalidate" );
}
?>
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8'>
<meta name="revisit-after" content="30 days">

    <?php
    if ( $seo_arr[4] !== '1' ): ?>
<meta name="description" content="<?php echo $seo_arr['1']; ?>">
<meta name="keywords" content="<?php echo $seo_arr['2']; ?>">
<meta name="robots" content="INDEX, FOLLOW">
    <?php else: ?>
<meta name="robots" content="noindex, nofollow">
    <?php endif;
    ?>
<meta name="distribution" content="Global">
<meta name="rating" content="General">
<meta name="copyright" content="Easy Page Buildr">
 <meta name="viewport" content="width=device-width, initial-scale=1.0"> 
<link rel="shortcut icon" href="images/favicon.png" />
<title><?php echo $seo_arr['0']; ?></title>

<style type="text/css">
a:link {
color: #f16d6e;
}
a:visited {
color: #f16d6e;
}
a:hover {
color: #f16d6e;
}
a:active {
color: #f16d6e;
}
.a {
color: #f16d6e;
}
.container {
    border:solid; 
    border-width:<?php echo $design_arr['5'],"px"; ?>; 
	border-color:<?php echo "#",$design_arr['4']; ?>; 
    float:none;
    width:100%;
	background-color:<?php echo "#",$design_arr['7']; ?>; 
	display: flex;
	overflow:hidden;
    text-align: left;
}
.content {
	float:right;
	width:100%;
	overflow:hidden;
	box-sizing: border-box;
	-moz-box-sizing: border-box;
    -webkit-box-sizing: border-box;
	padding-left:<?php echo $design_arr['10'],"px"; ?>;
	padding-right:<?php echo $design_arr['10'],"px"; ?>;
	vertical-align:top;  
    text-align: left;
}
.footer-container {
    padding:10px; 
	background-color:<?php echo "#",$design_arr['3']; ?>;
}
.footer p {
    margin: 0px;
    padding: 0px;
}
.footer {
    margin: auto;
    text-align: center;
	}
.header-image {
    font-size: 0px;
	background-color: <?php echo "#",$design_arr['9']; ?>;
}
html, body {
	margin: 0;
	padding: 0;
	font-family: Arial, sans-serif;
	font-size: <?php echo $design_arr['6'],"px"; ?>;
	background-color: <?php echo "#",$design_arr['3']; ?>;
}
img {
    max-width: 100% !important;
	height: auto !important;
}
.main {
	background-color:#FFFFFF; 
	padding:0px; 
	margin:auto; 
	max-width:<?php echo $design_arr['2'],$design_arr['8']; ?>;
}
.powered,
.powered a:link,
.powered a:visited,
.powered a:active {
color:#EEEEEE;
font-size: 12px;
padding-top: 6px;
    margin: auto;
    text-align: center;
}
.powered a:hover {
    color:#f16d6e;
}
.privacy-terms,
.privacy-terms a:link,
.privacy-terms a:visited,
.privacy-terms a:active {
color:#EEEEEE;
font-size: 14px;
padding-top: 10px;
    margin: auto;
    text-align: center;
}
.privacy-terms a:hover {
color:#f16d6e;
}

/* For mobile phones: */
@media only screen and (max-width:480px) {
html, body {
    font-size: 5vw;
}
.container { 
    display:table;
    width:100%;
	vertical-align:top;
	overflow:hidden;
	margin:0px;
	padding-left:10px;
	padding-right:10px;
	box-sizing: border-box;
	-moz-box-sizing: border-box;
    -webkit-box-sizing: border-box;
   }
.content { 
    display:table-header-group;
    float:none;
    clear:both;
    width:100%; 
	vertical-align:top; 
	overflow:auto;
	margin:0;
	padding-left:10px;
	padding-right:10px;
	box-sizing: border-box;
	-moz-box-sizing: border-box;
    -webkit-box-sizing: border-box;
   }
table {
  width:100% !Important;
}
}
<?php echo str_replace(array('<style>','</style>','< /style>'),'',$seo_arr['6']); ?>
</style>
<?php echo $seo_arr['5']; ?>
</head>

<body>
<center>
<!--Main -->
<div class="main">
<!--Main -->
<?php
if($design_arr['1']==1)
{
?>
<div class="header-image">
<?php
if(!empty($design_arr['0'])){
	$filename=$design_arr['0'];
echo  '<img src=\'./admin/images/custom_images/'.$filename.'\' />';
	  }
?>
</div>
<?php
}
?>
<!--Main Content -->
<div class="container">
    <div class="content"><?php echo $privacy_terms_arr['1']; ?></div>  
</div>
<!--Main Content -->
<!--Footer -->
<div class="footer-container">
    <div class="footer"><?php echo $design_arr['11']; ?></div>   
<?php if($privacy_terms_arr['2']==1) { ?><div class="privacy-terms"><a href="./terms.php" target="_blank">Terms & Conditions</a> | <a href="./privacy.php" target="_blank">Privacy Policy</a></div><?php } ?>
<?php if($design_arr['13']=='1'){ ?><div class="powered"><a href="http://<?php echo $design_arr['12']; ?>.easybuildr.hop.clickbank.net" target="_blank">Powered by: Easy Page Builder</a></div><?php } ?>
</div> 
<!--Footer -->
<!--Main -->
</div>
<!--Main -->
</center>
<!--Tracking -->
<?php echo $seo_arr['3']; ?>
<!--Tracking -->
</body>
</html>