<?php
error_reporting(0);
ini_set('display_errors','off');
$filename="admin/settings/advert_settings.txt";

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

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

if($handle = @fopen($filename, 'r'))
{
	$contents = fread($handle, filesize($filename));
	fclose($handle);
	$aar_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/rrfw_settings.txt";

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


$current_file_name = basename($_SERVER['REQUEST_URI'], ".php"); 
$filename="admin/settings/seo/$current_file_name.txt";

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

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

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

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

if($handle = @fopen($filename, 'r'))
{
	$contents = fread($handle, filesize($filename));
	fclose($handle);
	$website_arr=explode("#_1_#",$contents);
}
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta http-equiv="Content-Language" content="en-gb">
<meta name="revisit-after" content="30 days">
<meta name="description" content="<?php echo $seo_arr['1']; ?>">
<meta name="keywords" content="<?php echo $seo_arr['2']; ?>">
<meta name="robots" content="INDEX, FOLLOW">
<meta name="distribution" content="Global">
<meta name="rating" content="General">
<meta name="copyright" content="Free Monthly Websites">
<title><?php echo $seo_arr['0']; ?></title>
<link href="themes/theme-<?php echo $theme_arr['0']; ?>/style.css" rel="stylesheet" type="text/css">
</head>
<body>
<table width="820" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
  <tr>
    <td width="820" height="160" colspan="3" align="center" valign="middle" class="header"></td>
  </tr>
<!--top bar -->
<?php
if($advert_arr['6']==1)
{
?>
  <tr>
    <td height="40" colspan="3" align="center" valign="middle" class="nav_mid"><table width="802" border="0" cellpadding="0" cellspacing="0" class="nav_mid_bdr">
      <tr>
        <td align="center" valign="middle"><table width="772" border="0" align="center" cellpadding="0" cellspacing="0">
          <tr>
            <td height="40" align="center" valign="middle" class="content_top">
<?php
if($advert_arr['0']=='cbar')
{
?>	
<script type='text/javascript' src='https://cbadrotator-feed.com/feeds2/gen.php?CID=<?php echo $advert_arr['2']; ?>&kw1=<?php echo $advert_arr['1']; ?>&kw2=&kw3=&n1=3&n2=3&width=700&word_break=30&border_width=&border_color=&border_style=none&title_len=80&title_font=tahoma&title_size=12&title_color=%23000000&desc_font=tahoma&desc_size=10&desc_color=%23000000&padding=0&rkey1=affiliate&rkey2=commission&rkey3=&target=_blank&orientation=horizontal&desc_len=100&order_by=random&talign=center&tid=&desc_bold=normal&title_bold=bold&isCloak=no&CloakID=www.your_link.com&output=js'></script>
<?php
}
?>
<?php
if($advert_arr['0']=='adsense')
{
?>	
        <script type="text/javascript"><!--
        google_ad_client = "<?php echo $advert_arr['3']; ?>";
        google_alternate_color = "FFFFFF";
        google_ad_width = 728;
        google_ad_height = 90;
        google_ad_format = "728x90_as";
        google_ad_type = "text";
        google_ad_channel ="<?php echo $advert_arr['4']; ?>";
        google_color_border = "FFFFFF";
        google_color_bg = "FFFFFF";
        google_color_link = "000000";
        google_color_text = "000000";
        google_color_url = "000000";
        //--></script>
        <script type="text/javascript"  src="https://pagead2.googlesyndication.com/pagead/show_ads.js">
                            </script>
<?php
}
?>
<?php
if($advert_arr['0']=='other')
{
?>
<?php echo $advert_arr['5']; ?>	
<?php
}
?>          </td>
          </tr>
        </table></td>
      </tr>
    </table></td>
  </tr>
 <?php
}
?>
<!--top bar -->
  <tr>
    <td colspan="3" align="center" valign="top" class="main_mid"><table width="800" border="0" align="center" cellpadding="0" cellspacing="0">
      <tr>
        <td width="3" height="5" class="table_topl">&nbsp;</td>
        <td width="220" height="5" class="table_top">&nbsp;</td>
        <td width="5" class="table_topr">&nbsp;</td>
        <td width="1" rowspan="3">&nbsp;</td>
        <td width="3" class="table_topl">&nbsp;</td>
        <td class="table_top">&nbsp;</td>
        <td width="5" class="table_topr">&nbsp;</td>
        </tr>
      <tr>
        <td width="3" class="table_left">&nbsp;</td>
        <td width="220" align="center" valign="top" style="padding-top: 5px;">
<!--content pages -->
<table width="214" border="0" align="center" cellpadding="0" cellspacing="0">
    <tr>
      <td width="4" height="40" align="center" valign="middle" class="table2_titletl">&nbsp;</td>
      <td width="206" height="40" colspan="2" align="center" valign="middle" class="table2_title_top">Site Navigation</td>
      <td width="4" height="40" align="center" valign="middle" class="table2_titletr">&nbsp;</td>
    </tr>
        <tr>
          <td align="center" valign="middle" class="table2_left">&nbsp;</td>
          <td height="20" colspan="2" align="center" valign="middle"></td>
          <td align="center" valign="middle" class="table2_right">&nbsp;</td>
        </tr>
        <tr>
      <td align="center" valign="middle" class="table2_left">&nbsp;</td>
      <td width="20" height="20" align="center" valign="middle" class="bullet_sm"></td>
      <td width="186" height="20" align="left" valign="middle" class="main1"><a href="index.php">Home</a></td>
      <td align="center" valign="middle" class="table2_right">&nbsp;</td>
    </tr>
        <tr>
          <td align="center" valign="middle" class="table2_left">&nbsp;</td>
          <td width="20" height="20" align="center" valign="middle"></td>
          <td width="186" height="20" align="left" valign="middle" class="main1">&nbsp;</td>
          <td align="center" valign="middle" class="table2_right">&nbsp;</td>
        </tr>
<?php
$count=0;
if ($handle = opendir('content_pages/')) {
	$file_handle = fopen("admin/settings/order_content.txt", "rb");
	while (!feof($file_handle) ) {
		$line_of_text = fgets($file_handle);
		$files = explode(';', $line_of_text);
	}
	fclose($file_handle);
	foreach($files as $file)
	{
		$filename="./content_pages/$file";
		if(!$handle1 = fopen($filename, 'r'))
		{
			echo "Cannot open file ($filename)";
			exit;
		}
		$contents = fread($handle1, filesize($filename));
		fclose($handle1);
		$argument_arr=explode("#_1_#",$contents);
?>
    <tr>
      <td width="4" align="center" valign="middle" class="table2_left">&nbsp;</td>
      <td width="20" height="20" align="center" valign="middle" class="bullet_sm"></td>
      <td width="186" height="20" align="left" valign="middle" class="main1" style="padding-bottom: 2px; padding-top: 2px;">
<a href="page.php?id=<?php echo $file; ?>">
		<?php $arr=explode(":::",$argument_arr['1']);
	  echo $arr['1']; ?></a></td>
      <td width="4" align="center" valign="middle" class="table2_right">&nbsp;</td>
    </tr>
<?php
}
?>
<?php
$count=$count+1;
$count=0;
	}
?>
    <tr>
      <td height="6" align="center" valign="middle" class="table2_left">&nbsp;</td>
      <td height="6" colspan="2" align="center" valign="middle">&nbsp;</td>
      <td height="6" align="center" valign="middle" class="table2_right">&nbsp;</td>
    </tr>
    <tr>
      <td width="4" height="6" align="center" valign="middle" class="table2_botl">&nbsp;</td>
      <td width="206" height="6" colspan="2" align="center" valign="middle" class="table2_bot">&nbsp;</td>
      <td width="4" height="6" align="center" valign="middle" class="table2_botr">&nbsp;</td>
    </tr>
  </table>
<!--content pages -->
<?php
if($aff_arr['10']==1)
{
?>
<table width="214" border="0" align="center" cellpadding="0" cellspacing="0">
    <tr>
      <td width="4" height="40" align="center" valign="middle" class="table2_titletl">&nbsp;</td>
      <td width="206" height="40" colspan="2" align="center" valign="middle" class="table2_title_top">Free Monthly Website</td>
      <td width="4" height="40" align="center" valign="middle" class="table2_titletr">&nbsp;</td>
    </tr>
        <tr>
      <td width="4" align="center" valign="middle" class="table2_left">&nbsp;</td>
      <td width="206" colspan="2" align="center" valign="middle">
<!--fmw -->
<table width="206" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td align="center" valign="middle" class="main1"><br><a href="https://hop.clickbank.net/?affiliate=<?php echo $aff_arr['11']; ?>&vendor=fmwebs&tid=prm" target="_blank"><img src="images/logo_sm.jpg" width="80" height="80" border="0" align="left"></a>Have You Got Your FREE Website Yet?<br>
            <br>
            <a href="https://hop.clickbank.net/?affiliate=<?php echo $aff_arr['11']; ?>&vendor=fmwebs&tid=prm" target="_blank"><u><strong>Click Here to Get Yours Now!</strong></u></a><br>
            <br>    </td>
  </tr>
</table>
<!--fmw -->
      </td>
      <td width="4" align="center" valign="middle" class="table2_right">&nbsp;</td>
    </tr>
        
    <tr>
      <td width="4" height="6" align="center" valign="middle" class="table2_botl">&nbsp;</td>
      <td width="206" height="6" colspan="2" align="center" valign="middle" class="table2_bot">&nbsp;</td>
      <td width="4" height="6" align="center" valign="middle" class="table2_botr">&nbsp;</td>
    </tr>
  </table>
<?php
}
?>
<?php
if($aff_arr['12']==1)
{
?>
<table width="214" border="0" align="center" cellpadding="0" cellspacing="0">
    <tr>
      <td width="4" height="40" align="center" valign="middle" class="table2_titletl">&nbsp;</td>
      <td width="206" height="40" colspan="2" align="center" valign="middle" class="table2_title_top">Top Selling Products</td>
      <td width="4" height="40" align="center" valign="middle" class="table2_titletr">&nbsp;</td>
    </tr>
        <tr>
      <td width="4" align="center" valign="middle" class="table2_left">&nbsp;</td>
      <td width="206" colspan="2" align="center" valign="middle">
<!--affiliate sidebar 200x350 --> 
<div id="feedcontent1590224392641" align="center"></div><script>(function(){  var content_id ='' ; 
 var no_of_items =2 ; 
 window["ad_align1590224392641"]="center" ; 
 window["ad_spacing1590224392641"]="" ; 
 window["border_style1590224392641"]="none" ; 
 window["border_width1590224392641"]="" ; 
 window["border_color1590224392641"]="FFFFFF" ; 
 window["cb_id1590224392641"]="<?php echo $aff_arr['11']; ?>" ; 
 window["outside_height1590224392641"]="" ; 
 var cb_top_product="<?php echo $aar_arr['2']; ?>" ; 
 window["incpby1590224392641"]="true" ; 
if (typeof(affadrotatorads2loaded)!='boolean') {
var script = document.createElement('script');
script.onload = function () {
show_content(content_id,no_of_items,cb_top_product,"1590224392641","");
};
script.src = 'https://affiliateadrotator.com/ad.js';
script.id = 'affaddrot1590224392641';
document.body.appendChild(script);
}
})();</script>
<!--affiliate sidebar 200x350-->
      </td>
      <td width="4" align="center" valign="middle" class="table2_right">&nbsp;</td>
    </tr>
        
    <tr>
      <td width="4" height="6" align="center" valign="middle" class="table2_botl">&nbsp;</td>
      <td width="206" height="6" colspan="2" align="center" valign="middle" class="table2_bot">&nbsp;</td>
      <td width="4" height="6" align="center" valign="middle" class="table2_botr">&nbsp;</td>
    </tr>
  </table>
<?php
}
?>
        <td width="5" class="table_right">&nbsp;</td>
        <td width="3" class="table_left">&nbsp;</td>
        <td align="center" valign="top" style="padding-top: 5px;">
<!--main content -->
<table width="552" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td width="4" height="40" align="center" valign="middle" class="table2_titletl">&nbsp;</td>
    <td width="544" height="40" align="center" valign="middle" class="table2_title_top"><?php echo $website_arr['10']; ?></td>
    <td width="4" height="40" align="center" valign="middle" class="table2_titletr">&nbsp;</td>
  </tr>
  <div class="main1"></div>
  <tr>
    <td width="4" align="center" valign="middle" class="table2_left">&nbsp;</td>
    <td valign="top" class="main2_pad">
    <br>
<?php echo $website_arr['11']; ?> <br>
                    <br>
<?php
if($aff_arr['12']==1)
{
?><br><br>
<!--affiliate main 468x60 -->
<div id="feedcontent1590221010533" align="center"></div><script>(function(){  var content_id ='' ; 
 var no_of_items =1 ; 
 window['"ad_align1590221010533"']="center" ; 
 window['"ad_spacing1590221010533"']="" ; 
 window['"border_style1590221010533"']="none" ; 
 window['"border_width1590221010533"']="" ; 
 window['"border_color1590221010533"']="FFFFFF" ; 
 window['"cb_id1590221010533"']="<?php echo $aff_arr['11']; ?>" ; 
 window['"outside_height1590221010533"']="" ; 
 var cb_top_product="<?php echo $aar_arr['0']; ?>" ; 
 window['"incpby1590221010533"']="true" ; 
if (typeof(affadrotatorads2loaded)!='boolean') {
var script = document.createElement('script');
script.onload = function () {
show_content(content_id,no_of_items,cb_top_product,"1590221010533","");
};
script.src = 'https://affiliateadrotator.com/ad.js';
script.id = 'affaddrot1590221010533';
document.body.appendChild(script);
}
})();</script>
<!--affiliate main 468x60 -->
<br>
<?php
}
?>
<?php
if($optin_arr['4']==1)
{
?>
<?php include('optin.php'); ?>
<?php
}
?>    
<?php
if($aff_arr['12']==1)
{
?> 
<!--affiliate main 600x200 --> 
<div id="feedcontent1590221650792" align="center"></div><script>(function(){  var content_id ='' ; 
 var no_of_items =1 ; 
 window["ad_align1590221650792"]="center" ; 
 window["ad_spacing1590221650792"]="" ; 
 window["border_style1590221650792"]="none" ; 
 window["border_width1590221650792"]="" ; 
 window["border_color1590221650792"]="FFFFFF" ; 
 window["cb_id1590221650792"]="<?php echo $aff_arr['11']; ?>" ; 
 window["outside_height1590221650792"]="" ; 
 var cb_top_product="<?php echo $aar_arr['1']; ?>" ; 
 window["incpby1590221650792"]="true" ; 
if (typeof(affadrotatorads2loaded)!='boolean') {
var script = document.createElement('script');
script.onload = function () {
show_content(content_id,no_of_items,cb_top_product,"1590221650792","");
};
script.src = 'https://affiliateadrotator.com/ad.js';
script.id = 'affaddrot1590221650792';
document.body.appendChild(script);
}
})();</script>
<!--affiliate main 600x200 --> 
<?php
}
?>
</td>
    <td width="4" align="center" valign="middle" class="table2_right">&nbsp;</td>
  </tr>
  <tr>
    <td width="4" height="6" align="center" valign="middle" class="table2_botl">&nbsp;</td>
    <td width="544" height="6" align="center" valign="middle" class="table2_bot">&nbsp;</td>
    <td width="4" height="6" align="center" valign="middle" class="table2_botr">&nbsp;</td>
  </tr>
</table>
<!--main content -->        </td>
        <td width="5" class="table_right">&nbsp;</td>
        </tr>
      <tr>
        <td width="3" height="6" class="table_botl">&nbsp;</td>
        <td width="220" height="6" class="table_bot">&nbsp;</td>
        <td width="5" class="table_botr">&nbsp;</td>
        <td width="3" class="table_botl">&nbsp;</td>
        <td class="table_bot">&nbsp;</td>
        <td width="5" class="table_botr">&nbsp;</td>
        </tr>
    </table></td>
  </tr> 
<?php
if($advert_arr['7']==1)
{
?>
<!--bottom bar -->
  <tr>
    <td height="40" colspan="3" align="center" valign="middle" class="nav_mid"><table width="802" border="0" cellpadding="0" cellspacing="0" class="nav_bot_bdr">
        <tr>
          <td align="center" valign="middle"><table width="772" border="0" align="center" cellpadding="0" cellspacing="0">
              <tr>
                <td height="40" align="center" valign="middle" class="content_bottom">
<?php
if($advert_arr['0']=='cbar')
{
?>	
<script type='text/javascript' src='https://cbadrotator-feed.com/feeds2/gen.php?CID=<?php echo $advert_arr['2']; ?>&kw1=<?php echo $advert_arr['1']; ?>&kw2=&kw3=&n1=3&n2=3&width=700&word_break=30&border_width=&border_color=&border_style=none&title_len=80&title_font=tahoma&title_size=12&title_color=%23000000&desc_font=tahoma&desc_size=10&desc_color=%23000000&padding=0&rkey1=affiliate&rkey2=commission&rkey3=&target=_blank&orientation=horizontal&desc_len=100&order_by=random&talign=center&tid=&desc_bold=normal&title_bold=bold&isCloak=no&CloakID=www.your_link.com&output=js'></script>
<?php
}
?>
<?php
if($advert_arr['0']=='adsense')
{
?>	
        <script type="text/javascript"><!--
        google_ad_client = "<?php echo $advert_arr['3']; ?>";
        google_alternate_color = "FFFFFF";
        google_ad_width = 728;
        google_ad_height = 90;
        google_ad_format = "728x90_as";
        google_ad_type = "text";
        google_ad_channel ="<?php echo $advert_arr['4']; ?>";
        google_color_border = "FFFFFF";
        google_color_bg = "FFFFFF";
        google_color_link = "000000";
        google_color_text = "000000";
        google_color_url = "000000";
        //--></script>
        <script type="text/javascript"  src="https://pagead2.googlesyndication.com/pagead/show_ads.js">
                            </script>
<?php
}
?>
<?php
if($advert_arr['0']=='other')
{
?>
<?php echo $advert_arr['5']; ?>	
<?php
}
?>              </td>
              </tr>
          </table></td>
        </tr>
    </table></td>
  </tr>
<!--bottom bar -->
<?php
}
?>
  <tr>
    <td height="60" colspan="3" align="center" valign="middle" class="footer"></td>
  </tr>
</table>
<table width="770" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td width="385" height="20" align="center" valign="middle" class="powered"><span class="copyright">
      <?php
	if($website_arr['12']==1)
	  {
?>
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="privacy_policy.php">Privacy Policy</a>&nbsp;&nbsp;&nbsp;
  <?php
}
?>
  <?php
	if($website_arr['15']==1)
	  {
?>
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="terms.php">Terms &amp; Conditions</a>
  <?php
}
?>
    </span></td>
    <td width="385" height="20" align="right" valign="middle" class="copyright"><table border="0" align="right" cellpadding="0" cellspacing="0" class="footer_text2">
      <tr>
        <td width="80" align="center" valign="middle"><div class="ftrnav"><a href="index.php">Home</a></div></td>
        <td width="16" align="center" valign="middle">|</td>
        <td width="80" align="center" valign="middle"><div class="ftrnav"><a href="contact.php">Contact</a></div></td>
        <td width="16" align="center" valign="middle">|</td>
        <td width="80" align="center" valign="middle"><div class="ftrnav"><a href="sitemap.php">Site Map</a></div></td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td height="20" colspan="2" align="center" valign="middle" class="copyright">Copyright &copy; <u><a href="<?php echo $website_arr['4']; ?>" target="_blank"><?php echo $website_arr['3']; ?></a></u>. All Rights Reserved.
<?php
if($website_arr['5']==1)
{
?>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Powered By: <u><a href="https://hop.clickbank.net/?affiliate=<?php echo $aff_arr['11']; ?>&vendor=fmwebs&tid=prm" target="_blank">Free Monthly Websites 2.0</a></u>
<?php
}
?>
</td>
  </tr>
</table>
<?php echo $seo_arr['3']; ?>
</body>
</html>
