<?php
include_once("connect.php");
include_once("menu.php");
$q1 = mysql_query("select * from nickin_brugere order by sidstset");
if($_GET['slet'] == "1"){
if($_SESSION['Rang'] == "Admin"){
mysql_query("delete from nickin_brugere where id = '$_GET[bruger]'");
print "Brugeren blev slettet!";
}
}
if($_GET['admin'] == "1"){
if($_SESSION['Rang'] == "Admin"){
mysql_query("update nickin_brugere set Rang = 'Admin' where id = '$_GET[bruger]'");
print "Brugeren blev gjort til admin!";
}
}
?>
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style>
body {
background-repeat: no;}
</style>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<br><br>
<table width="75%" border="0" align="center">
<tr>
<td width="20%">Profil-Billed:</td>
<td width="20%">Brugernavn:</td>
<td width="15%">Point:</td>
<td width="15%">Sidst set:</td>
<td width="15%">Rang:</td>
<?php
if($_SESSION['Rang'] == "Admin"){
?>
<td width="15%">Slet (admin funk.):</td>
<?php
}
?>
</tr>
</table>
<?php
while($hent = mysql_fetch_array($q1)){
?>
<table width="75%" border="0" align="center">
<tr>
<td width="20%"><?php if($hent['billede'] != ""){ ?><img src="<?php print $hent['billede'] ?>" height="50" width="50" border="3"><?php }else{ ?><img src="
http://musiklirstest.hotserv.dk/images/Profil_billed.jpg" height="50" width="50" border="3"><?php } ?></td>
<td width="20%"><a href="profil.php?b=<?php print $hent['brugernavn'] ?>"><?php print $hent['brugernavn'] ?></a></td>
<td width="15%"><?php print $hent['point'] ?></td>
<td width="15%"><?php print $hent['sidstset'] ?></td>
<td width="15%"><?php print $hent['Rang'] ?><?php if($_SESSION['Rang'] == "Admin"){ if($hent['Rang'] != "Admin"){ ?> (<a href="medlemmer.php?admin=1&bruger=<?php print $hent['id'] ?>">gør til admin</a>)<?php }} ?></td>
<?php
if($_SESSION['Rang'] == "Admin"){
if($hent['Rang'] != "Admin"){
?>
<td width="15%"><a href="medlemmer.php?slet=1&bruger=<?php print $hent['id'] ?>">Slet</a></td>
<?php
}else{
?>
<td width="15%">-</td>
<?php
}
}
?>
</tr>
</table>
<?php
}
?>
</body>
</html>
Jeg includer jo menuen...