<?php if(!loggedIn())header('Location: '.$CONFIG['webAddress']); ?>
<?php require 'header.tpl.php';?>
<?php
#TODO 1: Email-Change
if(isset($_POST['changeEmail']) && !empty($USER) && $_POST['changeEmail'] != $USER['sEmail']) //if mail was changed
{
	//if(filter_var($_POST['changeEmail'], FILTER_VALIDATE_EMAIL))
		
}


#TODO 2: PW-Change
#TODO 3: Charge Points
#TODO 4: Refer a friend
#TODO 5: Redeem
?>
<!-- SUBNAV -->
<div id="subNav">
  <div class="placeholder"><span class="account-title">My Account » Settings</span></div>
</div>
<!-- end SUBNAV -->
<!-- DONATE BODYAREA -->
<div id="bodyArea">
    <?php include 'account_menu.tpl.php'; ?>
    <div class="right">
      <div class="tab-content">
        <div class="tab-pane active" id="accountSettings">
          <div class="account-placeholder">
            <div class="account-settings">Settings</div>
    <div class="maincontent">
    	<form method="post">
			<div class="row">
				<p class="subtitle">Email Address</p>
				<p><input name="changeEmail" type="textarea" value="<?=$USER['sEmail']?>"></input></br>
				<input name="newsletter" type="checkbox" value="newsletter" checked="checked"> Sign me up to receive the official newsletters.</p>
			</div>
			<div class="row">
				<p class="subtitle">Password</p>
				<p>Old password: <input name="changePassOld" type="textarea" ></input></br>
				New password: <input name="changePassNew" type="textarea" ></input></br>
				New password: <input name="changePassNewCon" type="textarea" ></input></p>
			</div>
			<!--<div class="row">
				<p class="subtitle">Security Questions</br>
				<span><a href="#">Add Security Questions</a></span></p>
			</div>-->
			<div class="row">
				<!--<p class="subtitle"><a id="saveBtn" class="btn" href="#" role="button">Save settings</a></p>-->
				<p class="subtitle"><input type="submit"><a id="saveBtn" class="btn" role="button">Save settings</a></input></p>
			</div>
        </form>
    
    </div>
	
            </div>
        </div>
      </div>
    </div>
</div>
<!-- END DONATE BODYAREA -->
<div class="clearfix"></div>
<?php require 'footer.tpl.php';?>