<?php include ("app_needed/config.php");
if(!$_SESSION[unique])
header("Location: ".APP_WEBSITE."/login.html");
if($_GET[unique])
$user = new class_users($_GET[unique]); 
else
$user = new class_users($logged->get_unique());
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?= language("CHARSET") ?>" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<title><?= language('PAGE_user_settings_title') ?> - <?= $config->get_value('platform_title') ?></title>
<link rel="shortcut icon" type="image/png" href="<?= $config->get_value('platform_favicon') ?>"/>
<link href="app_needed/style.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" href="app_needed/style.tipsy.css" type="text/css" />
</head>

<body>
<div id="wrapper">
	<?php include("module.header.php"); ?>
	<?php include ("module.menu.php"); ?>
	<div class="content">
		<div class="info">
		<h1><?= language('PAGE_user_settings_title') ?></h1>
		</div>
        <form name="my-form" action="app_needed/ajax.functions.php" method="POST" enctype="multipart/form-data">
        <input type="hidden" name="user_settings" value="1" />
        <input type="hidden" name="unique" value="<?= $user->get_unique() ?>" />
        <div class="box">
		  <div class="inside">
           	<div class="title">
                <h2><?= language('PAGE_user_settings_subtitle') ?></h2>
            	</div>
            <table width="100%" border="0">
            	<tr>
            	  <td width="17%"><?= language('FORM_email') ?></td>
            	  <td width="83%"><input type="text" placeholder="" name="user_email"  value="<?= $user->get_email() ?>"/>
            	    <br /></td>
          	  </tr>
            	<tr>
            	  <td><strong><?= language('FORM_change_password') ?></strong></td>
            	  <td>&nbsp;</td>
          	  </tr>
            	<tr>
            	  <td><?= language('FORM_new_password') ?></td>
            	  <td><input type="password" placeholder="" name="new_password"/>
            	    <br /></td>
          	  </tr>
            	<tr>
            	  <td><?= language('FORM_repeat_password') ?></td>
            	  <td><input type="password" placeholder="" name="repeat_password"/>
            	    <br /></td>
          	  </tr>
            	<tr>
            	  <td><input type="submit" name="user_settings" value="<?= language('BUTTON_submit') ?>" /></td>
            	  <td id="response"></td>
          	  </tr>
              <?php if($logged->is_admin()) { ?>
              <?php } ?>
          	</table>
          </div>
        </div>
        </form>
	</div>
</div>
<div id='confirm'>
<div class="left">
	<div class='title'><span><?= language('CONFIRM') ?></span></div>
	<div class='message'></div>
</div>
<div class="right">
	<div class='buttons'>
				<span class='no simplemodal-close'><?= language('NO') ?></span><span class='yes'><?= language('YES') ?></span>
               
	</div>
</div>
<div class="clear"></div>
	</div>
		<!-- preload the images -->
	<div style='display:none'>
		<img src='img/confirm/header.gif' alt='' />
		<img src='img/confirm/button.gif' alt='' />
	</div>

<script type="text/javascript" src="app_needed/jquery-1.9.0.min.js"></script>
<script type='text/javascript' src='app_needed/jquery.accordionmenu.js'></script>
<script type='text/javascript' src='app_needed/jquery.checkbox.js'></script>
<script type='text/javascript' src='app_needed/jquery.tipsy.js'></script>
<script type='text/javascript' src='app_needed/function.ajax.js'></script>
<script type='text/javascript' src='app_needed/simply-toast.min.js'></script>
<script type='text/javascript' src='app_needed/jquery.simplemodal.js'></script>
<script type='text/javascript' src='app_needed/functions.js'></script>
</body>
</html>
<?php mysql_close($conn); ?>