added form complete on search in adminpanel
This commit is contained in:
@@ -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 {
|
||||||
|
|||||||
@@ -16,37 +16,78 @@
|
|||||||
</script>
|
</script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
|
<!-- function test_input taken from http://www.w3schools.com/php/php_form_validation.asp -->
|
||||||
|
<?php
|
||||||
|
$search = $pagetype = "";
|
||||||
|
$status = array();
|
||||||
|
|
||||||
|
if ($_SERVER["REQUEST_METHOD"] == "POST") {
|
||||||
|
$search = test_input($_POST["search"]);
|
||||||
|
|
||||||
|
if (!empty($_POST["pagetype"])) {
|
||||||
|
$pagetype = test_input($_POST["pagetype"]);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!empty($_POST["status"])) {
|
||||||
|
$status = $_POST["status"];
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function test_input($data) {
|
||||||
|
$data = trim($data);
|
||||||
|
$data = stripslashes($data);
|
||||||
|
$data = htmlspecialchars($data);
|
||||||
|
return $data;
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<div class="platform admin-panel">
|
<div class="platform admin-panel">
|
||||||
<div class="admin-title">
|
<div class="admin-title">
|
||||||
<h1>User Management Panel</h1>
|
<h1>User Management Panel</h1>
|
||||||
</div> <br>
|
</div> <br>
|
||||||
<form class="admin-actionform" action="<?php echo htmlspecialchars($_SERVER["PHP_SELF"]);?>" method="post">
|
<form class="admin-actionform"
|
||||||
|
action="<?php echo htmlspecialchars($_SERVER["PHP_SELF"]);?>"
|
||||||
|
method="post">
|
||||||
<div class="admin-options">
|
<div class="admin-options">
|
||||||
<form class="admin-searchform" action="<?php echo htmlspecialchars($_SERVER["PHP_SELF"]);?>" method="post">
|
<form class="admin-searchform"
|
||||||
|
action="<?php echo htmlspecialchars($_SERVER["PHP_SELF"]);?>"
|
||||||
|
method="post">
|
||||||
<div class="admin-searchbar">
|
<div class="admin-searchbar">
|
||||||
<h2>Search</h2>
|
<h2>Search</h2>
|
||||||
<input type="text" name="search" class="admin-searchinput"> <br>
|
<input type="text"
|
||||||
|
name="search"
|
||||||
|
class="admin-searchinput"
|
||||||
|
value="<?php echo $search;?>"> <br>
|
||||||
<input type="submit" value="Search">
|
<input type="submit" value="Search">
|
||||||
</div>
|
</div>
|
||||||
<div class="admin-filter">
|
<div class="admin-filter">
|
||||||
<h2>Show:</h2>
|
<h2>Show:</h2>
|
||||||
<input type="checkbox" name="status" id="normal" value="normal">
|
<input type="checkbox" name="status[]" id="normal" value="normal"
|
||||||
|
<?php if (in_array("normal", $status)) echo "checked";?>>
|
||||||
<label for="normal">Normal</label><br>
|
<label for="normal">Normal</label><br>
|
||||||
<input type="checkbox" name="status" id="frozen" value="frozen">
|
<input type="checkbox" name="status[]" id="frozen" value="frozen"
|
||||||
|
<?php if (in_array("frozen", $status)) echo "checked";?>>
|
||||||
<label for="frozen">Frozen</label><br>
|
<label for="frozen">Frozen</label><br>
|
||||||
<input type="checkbox" name="status" id="banned" value="banned">
|
<input type="checkbox" name="status[]" id="banned" value="banned"
|
||||||
|
<?php if (in_array("banned", $status)) echo "checked";?>>
|
||||||
<label for="banned">Banned</label><br>
|
<label for="banned">Banned</label><br>
|
||||||
<input type="checkbox" name="status" id="admin" value="admin">
|
<input type="checkbox" name="status[]" id="admin" value="admin"
|
||||||
|
<?php if (in_array("admin", $status)) echo "checked";?>>
|
||||||
<label for="admin">Admin</label><br>
|
<label for="admin">Admin</label><br>
|
||||||
<input type="checkbox" name="status" id="unvalidated" value="unvalidated">
|
<input type="checkbox" name="status[]" id="unvalidated" value="unvalidated"
|
||||||
|
<?php if (in_array("unvalidated", $status)) echo "checked";?>>
|
||||||
<label for="unvalidated">Unvalidated</label>
|
<label for="unvalidated">Unvalidated</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="admin-filtertype">
|
<div class="admin-filtertype">
|
||||||
<h2>Page Type:</h2>
|
<h2>Page Type:</h2>
|
||||||
<input type="radio" name="type" id="user" value="user">
|
<input type="radio" name="pagetype" id="user" value="user"
|
||||||
|
<?php if (isset($pagetype) && $pagetype=="user") echo "checked";?>>
|
||||||
<label for="user">Users</label><br>
|
<label for="user">Users</label><br>
|
||||||
<input type="radio" name="type" id="group" value="group">
|
<input type="radio" name="pagetype" id="group" value="group"
|
||||||
|
<?php if (isset($pagetype) && $pagetype=="group") echo "checked";?>>
|
||||||
<label for="group">Groups</label>
|
<label for="group">Groups</label>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
@@ -56,7 +97,7 @@
|
|||||||
<label for="freeze">Freeze</label><br>
|
<label for="freeze">Freeze</label><br>
|
||||||
<input type="radio" name="actions" id="ban" value="ban">
|
<input type="radio" name="actions" id="ban" value="ban">
|
||||||
<label for="ban">Ban</label><br>
|
<label for="ban">Ban</label><br>
|
||||||
<input type="radio" name="actions" id="restore" value="unban">
|
<input type="radio" name="actions" id="restore" value="restore">
|
||||||
<label for="restore">Restore</label><br><br>
|
<label for="restore">Restore</label><br><br>
|
||||||
<input type="submit" value="Confirm">
|
<input type="submit" value="Confirm">
|
||||||
</div>
|
</div>
|
||||||
@@ -80,7 +121,9 @@
|
|||||||
<td>Banned</td>
|
<td>Banned</td>
|
||||||
<td>unregulated time travel</td>
|
<td>unregulated time travel</td>
|
||||||
<td>
|
<td>
|
||||||
<form class="admin-useraction" action="<?php echo htmlspecialchars($_SERVER["PHP_SELF"]);?>" method="post">
|
<form class="admin-useraction"
|
||||||
|
action="<?php echo htmlspecialchars($_SERVER["PHP_SELF"]);?>"
|
||||||
|
method="post">
|
||||||
<select class="action" name="actions">
|
<select class="action" name="actions">
|
||||||
<option value="freeze">Freeze</option>
|
<option value="freeze">Freeze</option>
|
||||||
<option value="ban">Ban</option>
|
<option value="ban">Ban</option>
|
||||||
@@ -96,7 +139,9 @@
|
|||||||
<td>Banned</td>
|
<td>Banned</td>
|
||||||
<td>l33t h4xx</td>
|
<td>l33t h4xx</td>
|
||||||
<td>
|
<td>
|
||||||
<form class="admin-useraction" action="<?php echo htmlspecialchars($_SERVER["PHP_SELF"]);?>" method="post">
|
<form class="admin-useraction"
|
||||||
|
action="<?php echo htmlspecialchars($_SERVER["PHP_SELF"]);?>"
|
||||||
|
method="post">
|
||||||
<select class="action" name="actions">
|
<select class="action" name="actions">
|
||||||
<option value="freeze">Freeze</option>
|
<option value="freeze">Freeze</option>
|
||||||
<option value="ban">Ban</option>
|
<option value="ban">Ban</option>
|
||||||
|
|||||||
Reference in New Issue
Block a user