Marijn button #99
@@ -1,6 +1,6 @@
|
|||||||
.admin-panel {
|
.admin-panel {
|
||||||
margin: auto;
|
margin: auto;
|
||||||
/*min-width: 800px;*/
|
min-width: 800px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.admin-title {
|
.admin-title {
|
||||||
@@ -36,8 +36,8 @@
|
|||||||
display: inline-block;
|
display: inline-block;
|
||||||
margin: 10px;
|
margin: 10px;
|
||||||
vertical-align: top;
|
vertical-align: top;
|
||||||
margin-left: 20px;
|
margin-right: 50px;
|
||||||
margin-right: 20px;
|
margin-left: 50px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.admin-users {
|
.admin-users {
|
||||||
|
|||||||
@@ -1,115 +1,160 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<title>Admin Panel</title>
|
<title>Admin Panel</title>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
function checkAll(allbox) {
|
function checkAll(allbox) {
|
||||||
var checkboxes = document.getElementsByName('check1');
|
var checkboxes = document.getElementsByName('check1');
|
||||||
|
|
||||||
for (var i = 0; i < checkboxes.length; i++) {
|
for (var i = 0; i < checkboxes.length; i++) {
|
||||||
if (checkboxes[i].type == 'checkbox') {
|
if (checkboxes[i].type == 'checkbox') {
|
||||||
checkboxes[i].checked = allbox.checked;
|
checkboxes[i].checked = allbox.checked;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
}
|
||||||
</head>
|
</script>
|
||||||
<body>
|
</head>
|
||||||
<div class="content">
|
<body>
|
||||||
<div class="platform admin-panel">
|
|
||||||
<div class="admin-title">
|
<!-- function test_input taken from http://www.w3schools.com/php/php_form_validation.asp -->
|
||||||
<h1>User Management Panel</h1>
|
<?php
|
||||||
</div> <br>
|
$search = $pagetype = "";
|
||||||
<form class="admin-actionform" action="<?php echo htmlspecialchars($_SERVER["PHP_SELF"]);?>" method="post">
|
$status = array();
|
||||||
<div class="admin-options">
|
|
||||||
<form class="admin-searchform" action="<?php echo htmlspecialchars($_SERVER["PHP_SELF"]);?>" method="post">
|
if ($_SERVER["REQUEST_METHOD"] == "POST") {
|
||||||
<div class="admin-searchbar">
|
$search = test_input($_POST["search"]);
|
||||||
<h2>Search</h2>
|
|
||||||
<input type="text" name="search" class="admin-searchinput"> <br>
|
if (!empty($_POST["pagetype"])) {
|
||||||
<input type="submit" value="Search">
|
$pagetype = test_input($_POST["pagetype"]);
|
||||||
</div>
|
}
|
||||||
<div class="admin-filter">
|
|
||||||
<h2>Show:</h2>
|
if (!empty($_POST["status"])) {
|
||||||
<input type="checkbox" name="status" id="normal" value="normal">
|
$status = $_POST["status"];
|
||||||
<label for="normal">Normal</label><br>
|
}
|
||||||
<input type="checkbox" name="status" id="frozen" value="frozen">
|
|
||||||
<label for="frozen">Frozen</label><br>
|
}
|
||||||
<input type="checkbox" name="status" id="banned" value="banned">
|
|
||||||
<label for="banned">Banned</label><br>
|
function test_input($data) {
|
||||||
<input type="checkbox" name="status" id="admin" value="admin">
|
$data = trim($data);
|
||||||
<label for="admin">Admin</label><br>
|
$data = stripslashes($data);
|
||||||
<input type="checkbox" name="status" id="unvalidated" value="unvalidated">
|
$data = htmlspecialchars($data);
|
||||||
<label for="unvalidated">Unvalidated</label>
|
return $data;
|
||||||
</div>
|
}
|
||||||
<div class="admin-filtertype">
|
?>
|
||||||
<h2>Page Type:</h2>
|
|
||||||
<input type="radio" name="type" id="user" value="user">
|
<div class="content">
|
||||||
<label for="user">Users</label><br>
|
<div class="platform admin-panel">
|
||||||
<input type="radio" name="type" id="group" value="group">
|
<div class="admin-title">
|
||||||
<label for="group">Groups</label>
|
<h1>User Management Panel</h1>
|
||||||
</div>
|
</div> <br>
|
||||||
</form>
|
<form class="admin-actionform"
|
||||||
<div class="admin-actions">
|
action="<?php echo htmlspecialchars($_SERVER["PHP_SELF"]);?>"
|
||||||
<h2>Batch Actions: </h2>
|
method="post">
|
||||||
<input type="radio" name="actions" id="freeze" value="freeze">
|
<div class="admin-options">
|
||||||
<label for="freeze">Freeze</label><br>
|
<form class="admin-searchform"
|
||||||
<input type="radio" name="actions" id="ban" value="ban">
|
action="<?php echo htmlspecialchars($_SERVER["PHP_SELF"]);?>"
|
||||||
<label for="ban">Ban</label><br>
|
method="post">
|
||||||
<input type="radio" name="actions" id="restore" value="unban">
|
<div class="admin-searchbar">
|
||||||
<label for="restore">Restore</label><br><br>
|
<h2>Search</h2>
|
||||||
<input type="submit" value="Confirm">
|
<input type="text"
|
||||||
</div>
|
name="search"
|
||||||
</div>
|
class="admin-searchinput"
|
||||||
<br>
|
value="<?php echo $search;?>"> <br>
|
||||||
<div class="admin-users">
|
<input type="submit" value="Search">
|
||||||
<h2>Users:</h2>
|
</div>
|
||||||
<table class="usertable">
|
<div class="admin-filter">
|
||||||
<tr>
|
<h2>Show:</h2>
|
||||||
<th class="table-checkbox">
|
<input type="checkbox" name="status[]" id="normal" value="normal"
|
||||||
<input type="checkbox" name="checkall" onchange="checkAll(this)">
|
<?php if (in_array("normal", $status)) echo "checked";?>>
|
||||||
</th>
|
<label for="normal">Normal</label><br>
|
||||||
<th class="table-username">User</th>
|
<input type="checkbox" name="status[]" id="frozen" value="frozen"
|
||||||
<th class="table-status">Status</th>
|
<?php if (in_array("frozen", $status)) echo "checked";?>>
|
||||||
<th class="table-comment">Comment</th>
|
<label for="frozen">Frozen</label><br>
|
||||||
<th class="table-action">Action</th>
|
<input type="checkbox" name="status[]" id="banned" value="banned"
|
||||||
</tr>
|
<?php if (in_array("banned", $status)) echo "checked";?>>
|
||||||
<tr>
|
<label for="banned">Banned</label><br>
|
||||||
<td><input type="checkbox" name="check1"></td>
|
<input type="checkbox" name="status[]" id="admin" value="admin"
|
||||||
<td>John Smith</td>
|
<?php if (in_array("admin", $status)) echo "checked";?>>
|
||||||
<td>Banned</td>
|
<label for="admin">Admin</label><br>
|
||||||
<td>unregulated time travel</td>
|
<input type="checkbox" name="status[]" id="unvalidated" value="unvalidated"
|
||||||
<td>
|
<?php if (in_array("unvalidated", $status)) echo "checked";?>>
|
||||||
<form class="admin-useraction" action="<?php echo htmlspecialchars($_SERVER["PHP_SELF"]);?>" method="post">
|
<label for="unvalidated">Unvalidated</label>
|
||||||
<select class="action" name="actions">
|
</div>
|
||||||
<option value="freeze">Freeze</option>
|
<div class="admin-filtertype">
|
||||||
<option value="ban">Ban</option>
|
<h2>Page Type:</h2>
|
||||||
<option value="restore">Restore</option>
|
<input type="radio" name="pagetype" id="user" value="user"
|
||||||
</select>
|
<?php if (isset($pagetype) && $pagetype=="user") echo "checked";?>>
|
||||||
<input type="submit" value="Confirm">
|
<label for="user">Users</label><br>
|
||||||
</form>
|
<input type="radio" name="pagetype" id="group" value="group"
|
||||||
</td>
|
<?php if (isset($pagetype) && $pagetype=="group") echo "checked";?>>
|
||||||
</tr>
|
<label for="group">Groups</label>
|
||||||
<tr>
|
</div>
|
||||||
<td><input type="checkbox" name="check1"></td>
|
</form>
|
||||||
<td>poey jokeaim</td>
|
<div class="admin-actions">
|
||||||
<td>Banned</td>
|
<h2>Batch Actions: </h2>
|
||||||
<td>l33t h4xx</td>
|
<input type="radio" name="actions" id="freeze" value="freeze">
|
||||||
<td>
|
<label for="freeze">Freeze</label><br>
|
||||||
<form class="admin-useraction" action="<?php echo htmlspecialchars($_SERVER["PHP_SELF"]);?>" method="post">
|
<input type="radio" name="actions" id="ban" value="ban">
|
||||||
<select class="action" name="actions">
|
<label for="ban">Ban</label><br>
|
||||||
<option value="freeze">Freeze</option>
|
<input type="radio" name="actions" id="restore" value="restore">
|
||||||
<option value="ban">Ban</option>
|
<label for="restore">Restore</label><br><br>
|
||||||
<option value="restore">Restore</option>
|
<input type="submit" value="Confirm">
|
||||||
</select>
|
</div>
|
||||||
<input type="submit" value="Confirm">
|
|
||||||
</form>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<br>
|
||||||
</body>
|
<div class="admin-users">
|
||||||
|
<h2>Users:</h2>
|
||||||
|
<table class="usertable">
|
||||||
|
<tr>
|
||||||
|
<th class="table-checkbox">
|
||||||
|
<input type="checkbox" name="checkall" onchange="checkAll(this)">
|
||||||
|
</th>
|
||||||
|
<th class="table-username">User</th>
|
||||||
|
<th class="table-status">Status</th>
|
||||||
|
<th class="table-comment">Comment</th>
|
||||||
|
<th class="table-action">Action</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><input type="checkbox" name="check1"></td>
|
||||||
|
<td>John Smith</td>
|
||||||
|
<td>Banned</td>
|
||||||
|
<td>unregulated time travel</td>
|
||||||
|
<td>
|
||||||
|
<form class="admin-useraction"
|
||||||
|
action="<?php echo htmlspecialchars($_SERVER["PHP_SELF"]);?>"
|
||||||
|
method="post">
|
||||||
|
<select class="action" name="actions">
|
||||||
|
<option value="freeze">Freeze</option>
|
||||||
|
<option value="ban">Ban</option>
|
||||||
|
<option value="restore">Restore</option>
|
||||||
|
</select>
|
||||||
|
<input type="submit" value="Confirm">
|
||||||
|
</form>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><input type="checkbox" name="check1"></td>
|
||||||
|
<td>poey jokeaim</td>
|
||||||
|
<td>Banned</td>
|
||||||
|
<td>l33t h4xx</td>
|
||||||
|
<td>
|
||||||
|
<form class="admin-useraction"
|
||||||
|
action="<?php echo htmlspecialchars($_SERVER["PHP_SELF"]);?>"
|
||||||
|
method="post">
|
||||||
|
<select class="action" name="actions">
|
||||||
|
<option value="freeze">Freeze</option>
|
||||||
|
<option value="ban">Ban</option>
|
||||||
|
<option value="restore">Restore</option>
|
||||||
|
</select>
|
||||||
|
<input type="submit" value="Confirm">
|
||||||
|
</form>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
Reference in New Issue
Block a user