<?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!     ##
##                                                                                ##
####################################################################################
      session_start();

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

	   $filename="settings/personal_settings.txt";
		
		if($handle = @fopen($filename, 'r')) 
		  {
			 $contents = fread($handle, filesize($filename));
             fclose($handle);
		     $argument_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_name { display:none; }
#help_email { display:none; }
#help_display_form { display:none; }
#help_content { display:none; }
#help_display_captcha { display:none; }
#help_captcha_key { display:none; }
#help_captcha_sec { 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="personal_settings_write">
            <tr>
              <td height="50" colspan="2" align="center" valign="middle" class="title1">Personal 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="80" colspan="2" align="center" valign="middle" class="main2"><p>Please insert your personal settings. These are needed for  your contact form. These details will be used for visitors to contact you via email on the contact  link on your website.<br>
                They are also needed to confirm your 'lost password', should you need to use it.</p>                  </td>
            </tr>
            <tr>
              <td width="300" height="50" align="center" valign="middle" class="main2">Your Full Name: </td>
              <td width="345" height="50" align="left" valign="middle" class="main2"><input name="f_name" type="text"  style="width:280px" value="<?php echo $argument_arr['0']; ?>">
                <a href="#" onClick="mm_showHide('help_name');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_name">
                  <p><br>
                    Enter your full name here, this is used in the contact form within the website.<br>
                    <br>
                    <br>
                  </p>
                  </div></td>
            </tr>
            <tr>
              <td width="300" height="50" align="center" valign="middle" class="main2">Your Contact Email Address: </td>
              <td width="345" height="50" align="left" valign="middle" class="main2"><input name="email" type="text"  style="width:280px" value="<?php echo $argument_arr['1']; ?>">
                <a href="#" onClick="mm_showHide('help_email');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_email">
                  <p><br>
                    Enter your contact email address here, this is used in the contact form within the website.</p>
                  <p>It is also needed to confirm your lost password, should you need to use it.<br>
                    Be sure to enter a valid email address here.<br>
                    <br>
                    <br>
                  </p>
              </div></td>
            </tr>
            <tr>
              <td height="50" colspan="2" align="center" valign="middle" class="main2">Your Contact Page Content:
              <a href="#" onClick="mm_showHide('help_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_content">
                  <p><br>
                    In this field you can place anything you like and it will be displayed in the center of the Contact 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 Contact page to make sure it looks OK.</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 'Contact Page Title' is the title for the frame that holds your contact form.<br>
                    <br>
                    <br>
                  </p>
              </div></td>
            </tr>
            
            <tr>
              <td height="50" colspan="2" align="center" valign="middle" class="main2"><p><strong>Contact Page Title<br>
              </strong>
                  <input name="title" type="text" id="title" value="<?php echo $argument_arr['4']; ?>" style="width:280px">
              </p>
                <p><strong>Contact Page Content</strong><br>  
                  </p>
                <table width="600" border="0" align="center" cellpadding="0" cellspacing="0">
                <tr>
                  <td align="center" valign="top" class="main2">
<textarea style="width:600px" name="content" rows="4" id="content" class="main2"><?php echo $argument_arr['3']; ?></textarea>
<script>
			CKEDITOR.replace( 'content' );
		</script></td>
    </tr>
</table></td></tr>
            
            <tr>
              <td height="50" align="center" valign="middle" class="main2">Use Email Contact Form In Contact Page:</td>
              <td height="50" align="left" valign="middle" class="main2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                  <input name="display_form" type="checkbox" id="display_form" value="1" <?php
		  if($argument_arr['2']==1)
		  {
			  echo "checked";
		  }
		  ?>>
                <a href="#" onClick="mm_showHide('help_display_form');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_form">
                  <p><br>
                    Tick this box to use the built in email contact form in your contact page. </p>
                <p>If un-ticked then no form will be used, just the content above will be displayed.</p>
                <p>Not using the form is useful if you wish to use a support system link instead.<br>
                    <br>
                      <br>
                  </p>
              </div></td>
            </tr>
            <tr>
              <td height="50" align="center" valign="middle" class="main2">Use Captcha Verification:</td>
              <td height="50" align="left" valign="middle" class="main2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                  <input name="display_captcha" type="checkbox" id="display_captcha" value="1" <?php
		  if($argument_arr['5']==1)
		  {
			  echo "checked";
		  }
		  ?>>
                <a href="#" onClick="mm_showHide('help_display_captcha');return false;"><img src="images/help.gif" width="21" height="21" hspace="8" border="0" align="top">Read Me!</a></td>
            </tr>
            <tr>
              <td colspan="2" align="center" valign="middle" class="main2"><div class="userhelp_cell" id="help_display_captcha">
                  <p><br>
                    In order to use reCaptcha you must register your domain name with Google reCaptcha service and add your<br />
                    'Site Key' and 'Secret Key' into the relevant fields. You can get the Keys from <a href="https://www.google.com/recaptcha/admin#list" target="_blank">Google reCaptcha Here</a>.
                    <br>
                    <br>
                  </p>
              </div></td>
            </tr>
         
            <tr>
              <td width="300" height="50" align="center" valign="middle" class="main2">Captcha Site Key:</td>
              <td width="345" height="50" align="left" valign="middle" class="main2"><input name="captcha_key" type="text"  style="width:280px" value="<?php echo $argument_arr['6']; ?>">
                <a href="#" onClick="mm_showHide('help_captcha_key');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_captcha_key">
                  <p><br>
                    In order to use reCaptcha you must register your domain name with Google reCaptcha service and add your<br />
                    'Site Key' into this field. You can get the Keys from <a href="https://www.google.com/recaptcha/admin#list" target="_blank">Google reCaptcha Here</a>.<br>
                    <br>
                  </p>
                  </div></td>
            </tr>
            
            <tr>
              <td width="300" height="50" align="center" valign="middle" class="main2" id="cap2">Captcha Secret Key: </td>
              <td width="345" height="50" align="left" valign="middle" class="main2"><input name="captcha_sec" type="text"  style="width:280px" value="<?php echo $argument_arr['7']; ?>">
                <a href="#" onClick="mm_showHide('help_captcha_sec');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_captcha_sec">
                  <p><br>
                    In order to use reCaptcha you must register your domain name with Google reCaptcha service and add your<br />
                    'Secret Key' into this field. You can get the Keys from <a href="https://www.google.com/recaptcha/admin#list" target="_blank">Google reCaptcha Here</a>.<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 Personal 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>