|
|
@@ -26,6 +26,15 @@ if(isset($_GET['token'])) {
|
|
|
if(isset($_GET['action'])) {
|
|
|
$action = substr(trim($_GET['action']),0,12);
|
|
|
}
|
|
|
+if(isset($_GET['userid'])) {
|
|
|
+ $userid = substr(trim($_GET['id']),0,25);
|
|
|
+}
|
|
|
+if(isset($_GET['role'])) {
|
|
|
+ $role = substr(trim($_GET['role']),0,8);
|
|
|
+}
|
|
|
+if(isset($_GET['description'])) {
|
|
|
+ $description = substr(trim($_GET['description']),0,25);
|
|
|
+}
|
|
|
$stats = true;
|
|
|
|
|
|
if (!(new token)->isAdmin($token)) {
|
|
|
@@ -36,6 +45,20 @@ if($stats == true) {
|
|
|
(new stats)->log($ip,$action,$token);
|
|
|
}
|
|
|
switch($action) {
|
|
|
+ case 'deluser':
|
|
|
+ if((new action)->delUser($id)){
|
|
|
+ echo " user removed " . $id ."\n";
|
|
|
+ } else {
|
|
|
+ echo " fehler\n";
|
|
|
+ };
|
|
|
+ break;
|
|
|
+ case 'adduser':
|
|
|
+ if((new action)->addUser($id,$role,$description)){
|
|
|
+ echo " user added " . $id . " role " . "\n";
|
|
|
+ } else {
|
|
|
+ echo " fehler\n";
|
|
|
+ };
|
|
|
+ break;
|
|
|
case 'blacklist':
|
|
|
if((new action)->blackList($ip)){
|
|
|
echo " blacklisted " . long2ip($ip) ."\n";
|
|
|
@@ -95,7 +118,7 @@ foreach($userlist as $user) {
|
|
|
<input type="hidden" id="token" name="token" value="<?php echo $token; ?>">
|
|
|
<input type="hidden" id="action" name="action" value="adduser">
|
|
|
<td>
|
|
|
- <input type='text' id='id' name='id'>
|
|
|
+ <input type='text' id='userid' name='userid'>
|
|
|
</td><td>
|
|
|
<input type='radio' id='reporter' name='role' value='Reporter'>Reporter
|
|
|
<input type='radio' id='consumer' name='role' value='Consumer'>Consumer
|