Old stuff/old_sites/newepik/include/membres.php
(Deskargatu)
<div class="article">
<h2>Membres #informatique</h2>
<?
if ($axx < 9) { echo "<div class=\"element\"><h2>ERROR</h2><div><p>Vous n'avez pas l'acces a cette zone.</p></div></div>"; }
else {
if ($chemin[2] == "modif" && !empty($chemin[3]))
{
if ($_POST['action'] == "Supprimer")
{
$query = "DELETE FROM membres WHERE pseudo='$chemin[3]'";
mysql_query($query) or die(mysql_error());
echo "<div class=\"element\"><h2>Edition des parametres de: $chemin[3]</h2>
<div><p>Supprime $chemin[3]</p></div></div>";
}
else {
if (empty($_POST['pseudo']))
{
echo "
<div class=\"element\"><h2>Edition des parametres de: $chemin[3]</h2>
<div>
";
$query = "SELECT * FROM membres WHERE pseudo='$chemin[3]'";
$result = mysql_query($query) or die("ERREUR: ".mysql_error());
$row = mysql_fetch_array($result);
echo "<form action=\"/site/membres/modif/$chemin[3]\" method=\"post\">
<dl>
<dt>pseudo:</dt><dd> <input type=\"text\" name=\"pseudo\" value=\"$row[1]\" /></dd>
<dt>MOT DE PASSE !:</dt><dd> <input type=\"text\" name=\"mdp\" value=\"\" /> (laisser vide pour ne pa changer)</dd>
<dt>email:</dt><dd> <input type=\"text\" name=\"email\" value=\"$row[3]\" /></dd>
<dt>sexe:</dt><dd> <input type=\"text\" name=\"sexe\" value=\"$row[4]\" /></dd>
<dt>signature:</dt><dd> <input type=\"text\" name=\"signature\" value=\"$row[5]\" /></dd>
<dt>site:</dt><dd> <input type=\"text\" name=\"site\" value=\"$row[6]\" /></dd>
<dt>axx:</dt><dd> <input type=\"text\" name=\"acc\" value=\"$row[9]\" /></dd>
<dt><input name=\"action\" class=\"button\" type=\"submit\" value=\"Modifier\" />
</dl>
<input name=\"action\" class=\"button\" type=\"submit\" value=\"Supprimer\" /></p>
</form> ";
echo "</div></div>";
}
else
{
unset($pass);
$pseudo = $_POST['pseudo'];
if ($_POST['mdp']) { $pass = md5($_POST['mdp']); }
$email = $_POST['email'];
$sexe = $_POST['sexe'];
$signature = $_POST['signature'];
$site = $_POST['site'];
$acc = $_POST['acc'];
if (!empty($pass)) {
$query = "UPDATE membres SET pseudo='$pseudo',userpass='$pass',email='$email',sexe='$sexe',signature='$signature',site='$site',axx='$acc' WHERE pseudo='$chemin[3]'";
}
else {
$query = "UPDATE membres SET pseudo='$pseudo',email='$email',sexe='$sexe',signature='$signature',site='$site',axx='$acc' WHERE pseudo='$chemin[3]'";
}
mysql_query($query) or die("ERROR: ".mysql_error()."<br>$query");
echo "<div class=\"element\"><h2>UPDATE du compte effectue</h2><div><p class=\"underline\">Mise a jour du compte effectuee:</p>
<p><span class=\"underline\">Pseudo:</span> $pseudo</p>
<p><span class=\"underline\">email:</span> $email</p>
<p><span class=\"underline\">sexe:</span> $sexe</o>
<p><span class=\"underline\">signature:</span> $signature</p>
<p><span class=\"underline\">site:</span> $site</p>
<p><span class=\"underline\">Axx:</span> $acc</p>
</div>
</div>
";
}
}
}
else
{
echo "<div class=\"element\">
<h2>Order by axx,pseudo</h2>
<div>
<dl>
";
$query = "SELECT pseudo,email,site,axx,phpsessid FROM membres ORDER BY axx,pseudo ASC";
$result = mysql_query($query) or die("ERREUR: ".mysql_error());
while ($row = mysql_fetch_array($result))
{
echo "<dt><a href=\"/site/membres/modif/$row[0]\">$row[0]</a></dt>
<dd><a href=\"mailto:".hex_encode($row[1])."\">[mail]</a> <a href=\"$row[2]\">[site]</a> :: level $row[3] :: ID $row[4]</dd>\n";
}
echo "</dl></div></div>\n";
}
}
?>
</div>