<?php
include('includes/global.php');

if (Licence(0)) {

    $User = @$_SESSION['User'];

  if (array_key_exists('Email', $_GET)) {
    $Email = $_GET['Email'];
    
    $Database->SQLCommand("UPDATE user SET Email = '$Email' WHERE user = '$User'");
      echo 'Úprava nastavení proběhla v pořádku, Email: <b>'.$Email.'</b> Uživatel: <b>'.$User.'</b>';
  } else {
    $Line = mysql_fetch_array($Database->SQLCommand("SELECT * FROM user WHERE user = '$User'"));    
?>
  <form action="Options.php" method="get">
  <table>
    <tr>
      <td>Email: </td>
      <td><input type="text" name="Email" value="<?php echo $Line['Email']; ?>"></td>
    </tr>
    <tr>
      <th><input type="submit" value="ulozit"></th>
    </tr>
  </table>
</form>
    
    
<?php
  }
} else echo 'Nejste přihlášený!'; 
  ShowFooter();  
?>
    
