<?php
####################################################################################
##                                      WARNING!                                  ##
##                                                                                ##
##             This script is copyrighted to Free Monthly Websites.               ##
##               Duplication, selling, or transferring of this script             ##
##              is a violation of the copyright and purchase agreement.           ##
##                   Please read the Terms and Conditions here:                   ##
##   https://freemonthlywebsites2.com/legal/Copyright_Terms_and_Conditions.pdf    ##
##      Any violation of these terms will be dealt with serious legal action!     ##
##                                                                                ##
####################################################################################
error_reporting(0);
ini_set('display_errors','off');
      session_start();

       if($_SESSION['logged_in']!=true)
	     {
			header("location:index.php?flag=2");
			exit;
	     }

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

?>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Language" content="en-gb">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Admin Control Panel</title>
<link href="css/admin_style.css" rel="stylesheet" type="text/css">
<script src="ckeditor/ckeditor.js"></script>
<style type="text/css">
<!--
#help_title { display:none; }
#help_copy_text { display:none; }
#help_copy_url { display:none; }
#help_power { display:none; }
#help_copyright_text { display:none; }
#help_copyright_url { display:none; }
#help_footer { display:none; }
#help_sub { display:none; }
#help_welcome  { display:none; }
#help_display_privacy { display:none; }
#help_privacy_content { display:none; }
#help_display_terms { display:none; }
#help_terms_content { display:none; }
#help_add_social {display:none; }
-->
</style>
<script type="text/javascript">
function mm_showHide(id)
{
    a=document.getElementById(id);
    if(a.style.display != 'none' && a.style.display != 'block') a.style.display='none';
    if(a.style.display == 'block') {
        a.style.display='none';
    }
    else {
        a.style.display='block';
    }
    return false;
}
</script>

</head>
<body>
<table width="914" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
  <tr>
    <td height="160" colspan="3" align="center" valign="middle" class="header">
	</td>
  </tr>
  <tr>
    <td colspan="3" align="center" valign="top" class="main_mid"><table width="888" 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 width="645" class="table_top">&nbsp;</td>
        <td width="5" height="5" class="table_topr">&nbsp;</td>
      </tr>
      <tr>
        <td width="3" class="table_left">&nbsp;</td>
        <td width="220" align="center" valign="top"><table width="215" border="0" align="left" cellpadding="0" cellspacing="0">
          <tr>
            <td width="215" height="80" colspan="2" align="center" valign="middle" class="admin_button"><a href="../" target="_blank"><strong>View Your Website</strong></a></td>
          </tr>
          <tr>
            <td height="45" colspan="2" align="center" valign="middle" class="admin_button"><a href="welcome.php"><strong>Home</strong></a></td>
            </tr>
          <tr>
            <td height="60" colspan="2" align="center" valign="middle"><img src="images/bulletaro_dn.gif" width="13" height="9" hspace="10"><span class="style1">Standard Settings</span><img src="images/bulletaro_dn.gif" width="13" height="9" hspace="10"></td>
          </tr>
          <tr>
            <td height="45" colspan="2" align="center" valign="middle" class="admin_button"><a href="admin_settings.php"><strong>Admin Settings</strong></a></td>
          </tr>
          <tr>
            <td height="45" colspan="2" align="center" valign="middle" class="admin_button"><a href="personal_settings.php"><strong>Personal Settings</strong></a></td>
          </tr>
          <tr>
            <td height="45" colspan="2" align="center" valign="middle" class="admin_button"><a href="website_settings.php"><strong>Basic Website Settings</strong></a></td>
          </tr>
          <tr>
            <td height="45" colspan="2" align="center" valign="middle" class="admin_button"><a href="seo_settings.php"><strong>S.E.O Settings</strong></a></td>
          </tr>
          <tr>
            <td height="45" colspan="2" align="center" valign="middle" class="admin_button"><a href="theme_settings.php"><strong>Theme Settings</strong></a></td>
          </tr>
          <tr>
            <td height="45" colspan="2" align="center" valign="middle" class="admin_button"><a href="advert_settings.php"><strong>Advert Settings</strong></a></td>
          </tr>
          <tr>
            <td height="45" colspan="2" align="center" valign="middle" class="admin_button"><a href="affiliate_settings.php"><strong>Affiliate Settings</strong></a></td>
          </tr>
          <tr>
            <td height="45" colspan="2" align="center" valign="middle" class="admin_button"><a href="optin_settings.php"><strong>Optin Form Settings</strong></a></td>
          </tr>
          <tr>
            <td height="60" colspan="2" align="center" valign="middle"><img src="images/bulletaro_dn.gif" width="13" height="9" hspace="10"><span class="style1">Article Settings</span><img src="images/bulletaro_dn.gif" width="13" height="9" hspace="10"></td>
          </tr>
          <tr>
            <td height="45" colspan="2" align="center" valign="middle" class="admin_button"><a href="add_content_pages.php"><strong>Add/Remove Article Pages</strong></a></td>
          </tr>
          <tr>
            <td height="45" colspan="2" align="center" valign="middle" class="admin_button"><a href="edit_content_pages.php"><strong>Edit Article Pages</strong></a></td>
          </tr>
          <tr>
            <td height="60" colspan="2" align="center" valign="middle"><img src="images/bulletaro_dn.gif" width="13" height="9" hspace="10"><span class="style1">Other</span><img src="images/bulletaro_dn.gif" width="13" height="9" hspace="10"></td>
          </tr>

          <tr>
            <td height="45" colspan="2" align="center" valign="middle" class="admin_button"><a href="https://freemonthlywebsites2.com/legal/Copyright_Terms_and_Conditions.pdf" target="_blank"><strong>Terms and Conditions</strong></a></td>
          </tr>
          <tr>
            <td height="30" colspan="2" align="center" valign="middle">&nbsp;</td>
            </tr>
          <tr>
            <td height="45" colspan="2" align="center" valign="middle" class="admin_button"><a href="logout.php"><strong>Logout</strong></a></td>
          </tr>
          <tr>
            <td height="30" colspan="2" align="center" valign="middle">&nbsp;</td>
          </tr>
        </table>
        <td width="5" class="table_right">&nbsp;</td>
        <td width="3" class="table_left">&nbsp;</td>
        <td width="645" align="center" valign="top"><table width="645" border="0" align="center" cellpadding="0" cellspacing="0">
          <form name="frm" action="file_io.php" method="post" onSubmit="return chk()">
            <input type="hidden" name="do_type" value="website_settings_write">
            <tr>
              <td height="50" colspan="2" align="center" valign="middle" class="title1">Basic Website Settings </td>
            </tr>
            <?php
		if($_REQUEST['flag']==1)
		  {
?>
            <tr>
              <td height="50" colspan="2" align="center" valign="middle" class="title1">&gt;&gt; <span class="style3">Data saved successfully</span> &lt;&lt;</td>
            </tr>
            <?php
		}
?>
            
            <tr>
              <td height="50" colspan="2" align="center" valign="middle" class="main2">&nbsp;</td>
              </tr>
            <tr>
              <td height="50" align="center" valign="middle" class="main2">Your Copyright Text:</td>
              <td height="50" align="left" valign="middle" class="main2"><input name="copyright_text" type="text" id="copyright_text" value="<?php echo $argument_arr['3']; ?>" style="width:280px">
                  <a href="#" onClick="mm_showHide('help_copyright_text');return false;"><img src="images/help.gif" width="21" height="21" hspace="8" border="0" align="top"></a>                  </td>
            </tr>
            <tr>
              <td colspan="2" align="center" valign="middle" class="main2"><div class="userhelp_cell" id="help_copyright_text">
                  <p><br>
                    Enter your Copyright text here.</p>
                  <p>This is usually related to your name, business or website domain.<br>
                    <br>
                    <br>
                                    </p>
              </div></td>
            </tr>
            <tr>
              <td height="50" align="center" valign="middle" class="main2">Your Copyright URL:</td>
              <td height="50" align="left" valign="middle" class="main2"><input name="copyright_url" type="text" id="copyright_url" value="<?php echo $argument_arr['4']; ?>" style="width:280px">
                <a href="#" onClick="mm_showHide('help_copyright_url');return false;"><img src="images/help.gif" width="21" height="21" hspace="8" border="0" align="top"></a> </td>
            </tr>
            <tr>
              <td colspan="2" align="center" valign="middle" class="main2"><div class="userhelp_cell" id="help_copyright_url">
                  <p><br>
                    Enter your Copyright URL here.</p>
                  <p>This can link to any location that users can find more about the copyright owner.<br>
                    If you do not have another then simply link it to the domain where you are hosting this website.<br>
                      <br>
                      <br>
                  </p>
              </div></td>
            </tr>
            <tr>
              <td width="265" height="50" align="center" valign="middle" class="main2">Display 'Powered By' Link:</td>
              <td width="380" height="50" align="left" valign="middle" class="main2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                  <input type="checkbox" name="to_display" value="1" <?php
		  if($argument_arr['5']==1)
		  {
			  echo "checked";
		  }
		  ?>>
                <a href="#" onClick="mm_showHide('help_power');return false;"><img src="images/help.gif" width="21" height="21" hspace="8" border="0" align="top"></a></td>
            </tr>
            <tr>
              <td colspan="2" align="center" valign="middle" class="main2"><div class="userhelp_cell" id="help_power">
                  <p><br>
                    Tick this box to display your own unique 'powered by' link at the bottom of every page.</p>
                <p>This is very important for earning additional income  from every sale made from your link.</p>
                <p>Your powered by link will look like this:<br>
                      <br>
                  Powered By: Free Monthly Websites 2.0<a href="https://freemonthlywebsites2.com" target="_blank"></a><br>
                  <br>
                  <br>
                  </p>
              </div></td>
            </tr>
            <tr>
              <td height="50" align="center" valign="middle" class="main2">Display Social Sharing Options:</td>
              <td align="left" valign="middle" class="main2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                <input name="add_social" type="checkbox" id="add_social" value="1" <?php
		  if($argument_arr['16']==1)
		  {
			  echo "checked";
		  }
		  ?>>
                <a href="#" onClick="mm_showHide('help_add_social');return false;"><img src="images/help.gif" width="21" height="21" hspace="8" border="0" align="top"></a></td>
            </tr>
            <tr>
              <td colspan="2" align="center" valign="middle" class="main2"><div class="userhelp_cell" id="help_add_social">
                  <p><br>
                    Check this box if you wish to enable social sharing options on your article pages below the content.<br>
                    <br>
                          </div></td>
            </tr>
            
            <tr>
              <td height="50" colspan="2" align="center" valign="middle" class="main2">&nbsp;</td>
            </tr>
            <tr>
              <td height="50" colspan="2" align="center" valign="middle" class="main2">Index Page (home page) Text: <a href="#" onClick="mm_showHide('help_welcome');return false;"><img src="images/help.gif" width="21" height="21" hspace="8" border="0" align="top"></a></td>
            </tr>
            <tr>
              <td colspan="2" align="center" valign="middle" class="main2_pad"><div class="userhelp_cell" id="help_welcome">
                  <p><br>
                    In this field you can place anything you like and it will be displayed in the index page (home page).</p>
                  <p>There is no limit to the amount of information you place here but we suggest you add a little at a time and keep checking your  page to make sure it looks OK.</p>
                  <p>We also recommend that if you are pasting a block of text in here, you paste your text in a basic notepad<br>
document first, then copy from there to here, so that it
                  removes all the hidden formatting and makes it<br>
simpler for you to edit.</p>
                  <p>Use the WYSIWYG editor below to easily format your text. </p>
                <p>Maximum width for images and tables is 520px.</p>
                <p>Your 'Index Page Title' is the title for the frame that holds your index page content.<br>
                  <br>
                  <br>
                </p>
              </div></td>
            </tr>
            <tr>
              <td height="50" colspan="2" align="center" valign="middle" class="main2">
              
<p> <strong>Index  Page (home page) Title</strong><br>
  <input name="title_welcome" type="text" id="title_welcome" style="width:280px" value="<?php echo $argument_arr['8']; ?>">
</p>
<strong>Index  Page (home page) Content</strong><br>
<br>
<table width="600" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td align="center" valign="top">
<textarea style="width:600px" name="welcome" rows="4" id="welcome" class="main2"><?php echo $argument_arr['9']; ?></textarea>
<script>
			CKEDITOR.replace( 'welcome' );
		</script></td>
  </tr>
</table></td>
            </tr>
            <tr>
              <td height="50" colspan="2" align="center" valign="middle" class="main2">&nbsp;</td>
            </tr>
            <tr>
              <td height="50" colspan="2" align="center" valign="middle" class="main2">Your Privacy Page Content: <a href="#" onClick="mm_showHide('help_privacy_content');return false;"><img src="images/help.gif" width="21" height="21" hspace="8" border="0" align="top"></a></td>
            </tr>
            <tr>
              <td colspan="2" align="center" valign="middle" class="main2"><div class="userhelp_cell" id="help_privacy_content">
                  <p><br>
                    In this field you can place anything you like and it will be displayed in the center of your Privacy page. </p>
                <p>Here is an excellent policy generator tool that we recommend.<br>
                  <a href="https://freemonthlywebsites2.com/special/form_generator/" target="_blank"><u>Website Policy Generator</u></a></p>
                <p>There is no limit to the amount of information you place here but we suggest you add a little at a time and keep checking your Privacy page, located at the bottom of your website to make sure it looks OK.</p>
                <p>We also recommend that if you are pasting a block of text in here, you paste your text in a basic notepad<br>
                  document first, then copy from there to here, so that it
                  removes all the hidden formatting and makes it<br>
                  simpler for you to edit.</p>
                <p>Use the WYSIWYG editor below to easily format your text. </p>
                <p>Maximum width for images and tables is 520px.</p>
                <p>Your 'Privacy Page Title' is the title for the frame that holds your privacy content.<br>
                      <br>
                      <br>
                  </p>
              </div></td>
            </tr>
            <tr>
              <td height="50" colspan="2" align="center" valign="middle" class="main2"><p><strong>Privacy Page Title<br>
                  </strong>
                      <input name="privacy_title" type="text" id="privacy_title" value="<?php echo $argument_arr['10']; ?>" style="width:280px">
                </p>
                  <p><strong>Privacy Page Content</strong><br>
                  </p>
                <table width="600" border="0" align="center" cellpadding="0" cellspacing="0">
                    <tr>
                      <td align="center" valign="top"><textarea style="width:600px" name="privacy_content" rows="4" id="privacy_content" class="main2"><?php echo $argument_arr['11']; ?></textarea>
<script>
			CKEDITOR.replace( 'privacy_content' );
		</script></td>
                    </tr>
                </table></td>
            </tr>
            <tr>
              <td height="50" align="center" valign="middle" class="main2">Display Privacy Policy Page:</td>
              <td height="50" align="left" valign="middle" class="main2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                  <input name="display_privacy" type="checkbox" id="display_privacy" value="1" <?php
		  if($argument_arr['12']==1)
		  {
			  echo "checked";
		  }
		  ?>>
                <a href="#" onClick="mm_showHide('help_display_privacy');return false;"><img src="images/help.gif" width="21" height="21" hspace="8" border="0" align="top"></a></td>
            </tr>
            <tr>
              <td colspan="2" align="center" valign="middle" class="main2"><div class="userhelp_cell" id="help_display_privacy">
                  <p><br>
                    Tick this box to display your privacy policy at the bottom of your website.<br>
                    <br>
                    <br>
                  </p>
              </div></td>
            </tr>
            <tr>
              <td height="50" colspan="2" align="center" valign="middle" class="main2">&nbsp;</td>
            </tr>
            <tr>
              <td height="50" colspan="2" align="center" valign="middle" class="main2">Your Terms Page Content: <a href="#" onClick="mm_showHide('help_terms_content');return false;"><img src="images/help.gif" width="21" height="21" hspace="8" border="0" align="top"></a></td>
            </tr>
            <tr>
              <td colspan="2" align="center" valign="middle" class="main2"><div class="userhelp_cell" id="help_terms_content">
                  <p><br>
                    In this field you can place anything you like and it will be displayed in the center of your Terms &amp; Conditions page. </p>
                <p>Here is an excellent policy generator tool that we recommend.<br>
                  <a href="https://freemonthlywebsites2.com/special/form_generator/" target="_blank"><u>Website Policy Generator</u></a></p>
                <p>There is no limit to the amount of information you place here but we suggest you add a little at a time and keep checking your Terms &amp; Conditions page, located at the bottom of your website to make sure it looks OK.</p>
                <p>We also recommend that if you are pasting a block of text in here, you paste your text in a basic notepad<br>
document first, then copy from there to here, so that it
                  removes all the hidden formatting and makes it<br>
simpler for you to edit.</p>
                <p>Use the WYSIWYG editor below to easily format your text. </p>
                <p>Maximum width for images and tables is 520px.</p>
                <p>Your 'Terms &amp; Conditions Title' is the title for the frame that holds your terms &amp; conditions content.<br>
                      <br>
                      <br>
                  </p>
              </div></td>
            </tr>
            <tr>
              <td height="50" colspan="2" align="center" valign="middle" class="main2"><p><strong>Terms &amp; Conditions Page Title<br>
                  </strong>
                      <input name="terms_title" type="text" id="terms_title" value="<?php echo $argument_arr['13']; ?>" style="width:280px">
                </p>
                  <p><strong>Terms &amp; Conditions Page Content</strong><br>
                  </p>
                <table width="600" border="0" align="center" cellpadding="0" cellspacing="0">
                    <tr>
                      <td align="center" valign="top"><textarea style="width:600px" name="terms_content" cols="30" rows="4" id="terms_content" class="main2"><?php echo $argument_arr['14']; ?></textarea>
<script>
			CKEDITOR.replace( 'terms_content' );
		</script></td>
                    </tr>
                </table></td>
            </tr>
            <tr>
              <td height="50" align="center" valign="middle" class="main2">Display Terms &amp; Conditions Page:</td>
              <td height="50" align="left" valign="middle" class="main2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                  <input name="display_terms" type="checkbox" id="display_terms" value="1" <?php
		  if($argument_arr['15']==1)
		  {
			  echo "checked";
		  }
		  ?>>
                <a href="#" onClick="mm_showHide('help_display_terms');return false;"><img src="images/help.gif" width="21" height="21" hspace="8" border="0" align="top"></a></td>
            </tr>
            <tr>
              <td colspan="2" align="center" valign="middle" class="main2"><div class="userhelp_cell" id="help_display_terms">
                  <p><br>
                    Tick this box to display your terms &amp; conditions at the bottom of your website.<br>
                    <br>
                    <br>
                  </p>
              </div></td>
            </tr>
            <tr>
              <td height="50" colspan="2" align="center" valign="middle" class="main2">&nbsp;</td>
            </tr>
            <tr>
              <td height="50" colspan="2" align="center" valign="middle" class="main2"><p>
                  <input type="submit" name="Submit" value="Save Basic Website Settings">
              </p></td>
            </tr>
            <tr>
              <td height="50" colspan="2" align="center" valign="middle" class="main2">&nbsp;</td>
            </tr>
          </form>
        </table></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 width="645" class="table_bot">&nbsp;</td>
        <td width="5" height="6" class="table_botr">&nbsp;</td>
      </tr>
    </table></td>
  </tr> 
  <tr>
    <td height="60" colspan="3" align="center" valign="middle" class="footer">    </td>
  </tr>
  <tr class="footer_bg">
    <td width="8" height="30">&nbsp;</td>
    <td width="898" height="30"><table width="898" border="0" align="center" cellpadding="0" cellspacing="0">
      <tr>
        <td align="center" valign="middle" class="copyright">Copyright &copy; <a href="https://freemonthlywebsites2.com" target="_blank">Free Monthly Websites 2.0</a>. All Rights Reserved.</td>
      </tr>
      <tr>
        <td align="center" valign="middle" class="powered">Powered By: <a href="https://freemonthlywebsites2.com" target="_blank">Free Monthly Websites 2.0</a></td>
      </tr>
    </table></td>
    <td width="8" height="30">&nbsp;</td>
  </tr>
</table>
</body>
</html>