Mniej potrzebna rzecz:
Jak zrobić,aby na stronce po zalogowaniu admina było widać wszystkich użytkowników i aby poprzez panel dodawać te reflinki?
Mój kod panelu admina:
[spoiler]
[/spoiler]
<?php $mysql_server = ''; $mysql_username = ''; $mysql_password = ''; $mysql_database = ''; $mysql_table = ''; { { { } } } { if ($action == 'delete') { $sql = "DELETE FROM ".$mysql_table." WHERE `username` = '$id'"; exit; } else if ($action == 'update') { $sql = "UPDATE `".$mysql_table."` SET `username` = '$username', `password` = '$crypt_pass', `fullname` = '$fullname', `email` = '$email', `active` = $active WHERE `username` = '$id'"; exit; } else if ($action == 'create') { $sql = "SELECT username FROM ".$mysql_table." WHERE username = '".$_POST['username']."'"; { exit; } $sql = "INSERT `".$mysql_table."` (`username`, `password`, `fullname`, `email`, `active`) VALUES ('$username', '$crypt_pass', '$fullname', '$email', $active)"; exit; } else if ($action == 'logout') { exit; } } ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <title>User administrator</title> <style type="text/css"> <!-- p { font-size: 11px; font-family: Verdana; font-weight: normal; text-decoration: none; color: #000000; } th { font-size: 11px; font-family: Verdana; font-weight: normal; text-decoration: none; background-color: #BFDBFF; color: #006BF5; text-align: left; } td { font-size: 11px; font-family: Verdana; font-weight: normal; text-decoration: none; color: #000000; } input, select { font-size: 11px; font-family: Verdana; font-weight: normal; text-decoration: none; color: #000000; border:1px #000000 solid; } --> </style> </head> <body bgcolor="#FFFFFF" topmargin="0" leftmargin="0" marginwidth="0" marginheight="0"> <?php { } else { { if (($action == 'edit') || ($action == 'new')) { $sql = "SELECT * FROM ".$mysql_table." WHERE username = '".$id."'"; { $username_value = $data['username']; $fullname_value = $data['fullname']; $email_value = $data['email']; $active_value = $data['active']; } if ($action == 'new') { } else { } echo "<td><input type=\"text\" size=\"50\" name=\"username\" value=\"" . $username_value . "\"></td></tr>\n"; echo "<td><input type=\"text\" size=\"50\" name=\"fullname\" value=\"" . $fullname_value . "\"></td></tr>\n"; echo "<td><input type=\"text\" size=\"50\" name=\"email\" value=\"" . $email_value . "\"></td></tr>\n"; echo "<td><select name=\"active\" size=\"1\"><option " . ($active_value == "0" ? "selected " : "") . "value=\"0\">Not active</option><option " . ($active_value != "0" ? "selected " : "") . "value=\"1\">Active</option></select></td></tr>\n"; echo "<tr><td> </td><td align=\"left\"><input type=\"submit\" name=\"cmdSubmit\" value=\"Save\">"; } } else { $sql = "SELECT * FROM ".$mysql_table; { } } } ?> </body> </html>
Proszę o pomoc.
To pomoże ktoś?