114 lines
3.0 KiB
PHP
114 lines
3.0 KiB
PHP
<?php
|
|
//Cette page permet d'afficher le profil d'un membre
|
|
include('config.php');
|
|
?>
|
|
<!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=utf-8" />
|
|
<link href="<?php echo $design; ?>/style.css" rel="stylesheet" title="Style" />
|
|
<link rel="stylesheet" type="text/css" href="stylesheet.css" />
|
|
<script src="jquery.js"></script>
|
|
<script src="menus.js"></script>
|
|
<link rel="shortcut icon" type="image/x-icon" href="Images/favicon_ie.ico">
|
|
<title>Festiv'Algo - Profil</title>
|
|
</head>
|
|
<body>
|
|
<div id="content">
|
|
<?php include("menu.php"); ?>
|
|
|
|
<div class="content">
|
|
<?php
|
|
if(isset($_SESSION['username']))
|
|
{
|
|
$nb_new_pm = mysql_fetch_array(mysql_query('select count(*) as nb_new_pm from pm where ((user1="'.$_SESSION['userid'].'" and user1read="no") or (user2="'.$_SESSION['userid'].'" and user2read="no")) and id2="1"'));
|
|
$nb_new_pm = $nb_new_pm['nb_new_pm'];
|
|
?>
|
|
<div class="box">
|
|
<div class="box_left">
|
|
<a href="<?php echo $url_home; ?>">Index du forum</a> > <a href="users.php">Liste des utilisateurs</a> > Profil
|
|
</div>
|
|
<div class="box_right">
|
|
<a href="list_pm.php">Vos messages (<?php echo $nb_new_pm; ?>)</a> - <a href="login.php">Déconnexion</a>
|
|
</div>
|
|
<div class="clean"></div>
|
|
</div>
|
|
<?php
|
|
}
|
|
else
|
|
{
|
|
?>
|
|
<div class="box">
|
|
<div class="box_left">
|
|
<a href="<?php echo $url_home; ?>">Index du forum</a> > <a href="users.php">Liste des utilisateurs</a> > Profil
|
|
</div>
|
|
<div class="box_right">
|
|
<a href="signup.php">Inscription</a> - <a href="login.php">Connexion</a>
|
|
</div>
|
|
<div class="clean"></div>
|
|
</div>
|
|
<?php
|
|
}
|
|
if(isset($_GET['id']))
|
|
{
|
|
$id = intval($_GET['id']);
|
|
$dn = mysql_query('select username, level, avatar, signup_date from users where id="'.$id.'"');
|
|
if(mysql_num_rows($dn)>0)
|
|
{
|
|
$dnn = mysql_fetch_array($dn);
|
|
?>
|
|
|
|
<table style="width:500px;">
|
|
<tr>
|
|
<td>
|
|
</td>
|
|
<td class="left"><h1><?php echo htmlentities($dnn['username'], ENT_QUOTES, 'UTF-8'); ?></h1><br />
|
|
Statut : <?php
|
|
switch($dnn['level'])
|
|
{
|
|
case 1:
|
|
echo "Nouveau";
|
|
break;
|
|
case 2:
|
|
echo "Membre";
|
|
break;
|
|
case 3:
|
|
echo "Vétéran";
|
|
break;
|
|
case 4:
|
|
echo "Modérateur";
|
|
break;
|
|
case 5:
|
|
echo "Administrateur";
|
|
break;
|
|
case 6:
|
|
echo "Game-master";
|
|
break;
|
|
}
|
|
?><br />
|
|
Date d'inscription : <?php echo date('d/m/Y',$dnn['signup_date']); ?></td>
|
|
</tr>
|
|
</table>
|
|
<?php
|
|
if(isset($_SESSION['username']) and $_SESSION['username']!=$dnn['username'])
|
|
{
|
|
?>
|
|
<br /><a href="new_pm.php?recip=<?php echo urlencode($dnn['username']); ?>" class="big">Envoyer un MP à "<?php echo htmlentities($dnn['username'], ENT_QUOTES, 'UTF-8'); ?>"</a>
|
|
<?php
|
|
}
|
|
}
|
|
else
|
|
{
|
|
echo 'Cet utilisateur n\'existe pas.';
|
|
}
|
|
}
|
|
else
|
|
{
|
|
echo 'L\'identifiant de l\'utilisateur n\'est pas défini.';
|
|
}
|
|
?>
|
|
</div>
|
|
</body>
|
|
</div>
|
|
<?php include("bas_de_page.php"); ?>
|
|
</html>
|