<?php
/**
* @Author Tarchini Maurizio
* @Version 1.0
* @AuthorEmail hide@address.com or hide@address.com
* @AuthorSite http://www.mtxweb.ch
* @DocumentDate 28-2-2008
* @DocumentLicense PUBLIC -FREE
* @LicenseDetail GNU General Public License
* @LicenseSite http://www.gnu.org/licenses/gpl.txt
* @PHPCompatibility 4.2 or later
* @DevelopmentStatus DIST - beta
*/
include_once "./lib/function_page.php";
include_once "./lib/function_db.php";
Grant();
$user = UserX();
$sql = "SELECT * FROM users WHERE username='$user'";
$res = GetRes($sql);
$row = mysql_fetch_array($res);
PageIn();
if ($_GET['alert'] == 1)
{
echo '<script type="text/javascript">
alert("Le due password non corrispondono! I dati non sono stati modificati")
</script>';
}
if ($_GET['alert'] == 2)
{
echo '<script type="text/javascript">
alert("I dati sono stati modificati")
</script>';
}
echo '<h1>Area utenti: PROFILO</h1>
<br><br>
';
echo '<h2>Impostazioni del profilo di: ' . $user . '</h2>
';
BoxIn(650);
echo '<table border="0" cellpadding="10" cellspacing="0">
<tr>
<td><center><br><img src="./images/user/' . $row['imm'] . '" border="0" width="65" height="65"><br><br>
<form action="upload.php" method="GET"><input type="submit" value="upload" class="but"/></center></form></td>
<td width="70"></td>
<td><form action="mod_profile.php" method="POST">Username:<br><input type="text" value="' . $user . '" readonly="readonly" name="username" class="search"/><br><br>Nome:<br><input type="text" value="' . $row['nome'] . '" name="nome" class="search" maxlength="20" /><br><br>Password:<br><input type="password" class="search" value="' . $row['password'] . '" name="password" maxlength="10" /></td>
<td width="70"></td>
<td>email:<br><input type="text" value="' . $row['email'] . '" readonly="readonly" name="email" class="search"/><br><br>Cognome:<br><input type="text" value="' . $row['cognome'] . '" name="cognome" class="search" maxlength="20" /><br><br>Riscrivi password:<br><input type="password" class="search" value="' . $row['password'] . '" name="password2" maxlength="10" /></td>
</tr>
<tr>
<td></td>
<td></td>
<td><input type="submit" value="modifica dati" class="but"/></td>
<td></td>
<td></td>
</tr>
</form>
</table>
';
BoxOut();
/////////////////////////////////////////////
//FUNZIONI DI AMMINISTRATORE////////////////
///////////////////////////////////////////
if ($row['status'] == 3)
{
echo '<h2>Funzioni di amministratore</h2>
';
BoxIn(650);
echo<<<ADMIN
<table border="0" cellpadding="10" cellspacing="0">
<tr>
<td><a href="admin.php?function=message"><img src="./images/mess.png" border="0" alt="invia n messaggio a tutti gli utenti di MtxEventManager"></a></td>
<td>Invio messaggio</td>
</tr>
</table>
ADMIN;
BoxOut();
}
PageOut()
?>