Zack
cookies vader
PHP:
if(in_array("no-user",$_SESSION)){
echo $feldhead."<p class=\"error\">Sie habe keine Berechtigung diese Seite zu betreten!</p>".$feldfood;
}else{
if((isset( $_GET["id"] ) && !empty( $_GET["id"])) AND (($_GET["aktion"])=="edit") OR (isset($_POST['save']) && !empty($_POST['save']))){
if ($_SESSION['right']=="webmaster" OR $_SESSION['right']=="admin"){
if(isset($_POST['save']) && !empty($_POST['save'])){
echo "geht";
}else{
echo $feldhead;
$sql = "SELECT *
FROM user
WHERE ID = '".$_GET['id']."'";
$result = mysql_query($sql) OR die(mysql_error());
$row = mysql_fetch_assoc($result);
if (($row['groupid']==1)&&($_SESSION['right']=="admin")){
echo "<p class=\"error\">Sie habe keine Berechtigung diese Seite zu betreten!</p>".$feldfood;
}else{
echo "<h2>Profil von ".$row['bname']."</h2>".
"<table id=\"team\">".
"<colgroup>" .
" <col width=\"50%\"></col>" .
" <col width=\"50%\></col>" .
"</colgroup>";
if ($row['groupid']==0){$no_user ="selected";}
if ($row['groupid']==2){$admin ="selected";}
if ($row['groupid']==3){$mod ="selected";}
if ($row['groupid']==4){$user ="selected";}
echo"<form action=\"index.php?section=admin&site=user&id=".$row['id']."&aktion=edit\" method=\"POST\">".
"<tr>" .
"<td id=\"team\">Recht</td>" .
"<td id=\"team\">" .
"<select name=\"top5\" size=\"1\">";
if (($_SESSION['right'])=="webmaster"){echo"<option ".$admin." value=\"2\">Admin</option>";}
echo"<option ".$mod." value=\"3\">Moderator</option>
<option ".$user." value=\"4\">User</option>
<option ".$no_user." value=\"0\">Keine Rechte</option>
</select></td></tr>
<tr>" .
"<td></td>" .
"<td><input type=\"submit\" name=\"save\" value=\"Speichern\" /></td>" .
"</tr>
</form>";
echo "</table>";
irgendwie geht der submitbutton nicht...keine ahnung warum