<?php
require_once "config.inc.php";
require_once "controllers/profile.class.php";
$c = new Profile();
$current_user = $c->getCurrentUser();
?>
<!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=iso-8859-1" />
<title><?=TITLE?></title>
<link rel="stylesheet" type="text/css" href="common.css" />
<link rel="stylesheet" type="text/css" href="style.css" />
<script type="text/javascript" src="javascript.js"></script>
</head>
<body onload="javascript: setFocus('email'); ">
<div class="divContainer">
<div class="divHeader">
<ul class="ulHeaderMenu">
<li><a href="task.php"><?=$c->getMessage("tasks")?></a></li>
<?php
if ($current_user->get("admin") == "yes") {
echo "<li><a href='project.php'>".$c->getMessage("projects")."</a></li>\n";
echo "<li><a href='user.php'>".$c->getMessage("users")."</a></li>\n";
}
?>
<li><a class="ulHeaderMenu_current" href="profile.php"><?=$c->getMessage("profile")?></a></li>
</ul>
<p class="pLogin"><strong><?=$c->getMessage("welcome")?>, <?=htmlentities($current_user->get("username"))?></strong><br /><a class="warning" href="logout.php"><?=$c->getMessage("exit")?></a></p>
</div>
<div class="divBody">
<form id="form1" action="<?=htmlentities($c->getCurrentPage())?>" method="post">
<table class="tableGroup" style="margin: 0 auto; " border="0" cellpadding="0" cellspacing="0">
<tr>
<td>
<h2><?=$c->getMessage("edit_profile")?></h2>
<?=$c->getErrorLn("error", "error")?><?=$c->getMessageLn("ok", "information")?>
<table class="tableText" border="0" cellpadding="0" cellspacing="0">
<tr>
<td style="width: 15em; "><strong><?=$c->getMessage("username")?></strong></td>
<td><input class="inputReadonly" readonly="readonly" type="text" name="username" size="30" value="<?=htmlentities($c->getParam("username"))?>" /></td>
</tr>
<tr>
<td><strong><?=$c->getMessage("email")?></strong></td>
<td><input class="inputText" type="text" name="email" id="email" size="30" value="<?=htmlentities($c->getParam("email"))?>" /></td>
</tr>
<tr>
<td><strong><?=$c->getMessage("full_name")?></strong></td>
<td><input class="inputText" type="text" name="full_name" size="50" value="<?=htmlentities($c->getParam("full_name"))?>" /></td>
</tr>
<tr>
<td>
<?php
if ($c->current_user->getLanguage() != "en")
echo "<strong>".$c->getMessage("language")." (Language)</strong>\n";
else
echo "<strong>".$c->getMessage("language")."</strong>\n";
?>
</td>
<td>
<select name="language">
<option value=""> </option>
<option value="es"<?=$c->getParam("language") == "es"? " selected='selected'": NULL?>>Spanish</option>
<option value="en"<?=$c->getParam("language") == "en"? " selected='selected'": NULL?>>English</option>
</select>
</td>
</tr>
<tr>
<td><?=$c->getMessage("full_name")?></td>
<td>
<input class="inputText" type="password" name="password" id="password" size="30" />
<span class="comment">(<?=$c->getMessage("left_this_field_in_blank")?>)</span>
</td>
</tr>
<tr>
<td><?=$c->getMessage("re_password")?></td>
<td><input class="inputText" type="password" name="re_password" size="30" /></td>
</tr>
<tr>
<td><?=$c->getMessage("receive_notifications")?></td>
<td><input type="checkbox" name="receive_notifications" value="yes"<?=$c->getParam("receive_notifications") == "yes"? " checked='checked'": NULL?> /></td>
</tr>
<tr>
<td><?=$c->getMessage("administrator")?></td>
<td><?=$c->getMessage($current_user->get("admin"))?></td>
</tr>
</table>
<table class="tableText" border="0" cellpadding="0" cellspacing="0">
<tr><td><strong><?=$c->getMessage("functions")?></strong></td></tr>
<tr>
<td colspan="3"><textarea name="description" style="width: 600px; height: 300px; "><?=htmlentities($c->getParam("description"))?></textarea></td>
</tr>
</table>
<p><input class="inputButton" style="width: 8em; " type="submit" value="<?=$c->getMessage("accept")?>" /></p>
</td>
</tr>
</table>
</form>
</div>
</div>
</body>
</html>