[Release] Webmanager | DISCONTINUED - CHECK V2

I build a complete webinterface for SidewaysInc. This is just a “ripoff” and compact version of the usermanagement. You can see every user on every of your servers and kick or ban them just with a klick on a button. It also lists the IP and SteamID ( if logged into steam) and ping.

THIS IS NOT SAFE TO USE BY DEFAULT!
You have to either integrate it into your website or build a security feature around it. If you upload it like it is, anyone could kick or ban players!
You could use it on a local webserver tho.

Please submit bugs, feature requests or issues to github as i am not that active here.

If you need more functions …
… you can hire me to develop more for you!

https://github.com/Slluxx/Fivereborn-Webmanager

14 Likes

@Slluxx Awesome job!

Thank you, @COndor :slight_smile:

1 Like

This is awesome! Good job. Will test it when I get home.

@frugoo please have in mind, that you need to secure that site from public access

@Slluxx will do dude! Thanks for the heads up.

@Slluxx This is sick! Thank you!

1 Like

@Slluxx Amazing work here buddy, this will really help out AFR server management. Also, thank you so much for your quick response on discord when I needed help. Much appreciated!

@Slluxx Great Mod Man Works Amazinggggg In My Server

1 Like

Works great. Thank you, man! Was nice integrated in my hosting admin panel.

3 Likes

@MarkViolla said in [Release] Webmanager:

Works great. Thank you, man! Was nice integrated in my hosting admin panel.

are you doing server hosting with it?
if you like it, you can donate me a coffe :wink:

@Slluxx no, just a playground. And FiveReborn Server just part of it. But sure, if someone donates me, i`ll donate you a coffe.

@MarkViolla i just wasnt sure :smiley:
if you would use it commercially and make money you should definitly donate
( you should always. i mean if someones uses free stuff comercial that)

if you dont, just go with what you like ^^

@Slluxx said in [Release] Webmanager:

@MarkViolla i just wasnt sure :smiley:
if you would use it commercially and make money you should definitly donate
( you should always. i mean if someones uses free stuff comercial that)

if you dont, just go with what you like ^^

This community is all about doing something for free for another. About the value of a friendly and straight forward modding community without having to pay for everything and/or ‘expect something in return’. Sharing = caring.

6 Likes

@Boss like i said, i think if you make money with something someone made public 4 free, you should donate. If he is not doing it commercial and only using it to test / private, he can donate whatever he thinks is right. If he thinks its not worth it, then dont donate.

2 Likes

it is only for my admin group, who in charge with Five Reborn.
I am just developer of that playground. If you want to see what it is - ask for it and i `ll make you an admin.
And it is no hosting services over there.

I have added a warn feature! Please add another button color like green in the default css :slight_smile:
Also translated failed to connect!

index.php

<?php
// Settings
$website_title="Server Name Management";
$website_header="Server Name Management";

// Edit this to your own server details (last one doesnt need a , at the end).
$serverinfo = array
	(
//  array("ID","NAME","IP","PORT","RCONPASSWORD"). First server id is always 0!
	array("0","Server Name","IP","PORT","password")
	);

// Messages for kick & ban
$warnmessage = "You have been warned by an admin. You should know why. Kick is next...";
$kickmessage = "You got kicked by an admin. You should know why. If not, ask an admin at Discord or TS.";
$banmessage = "You got banned by an admin. You should know why. If not, ask an admin at Discord or TS.";

// DO YOUR LOGIN PROTECTION HERE



// DONT EDIT AFTER HERE
require("./rcon/q3query.class.php");
if (isset($_GET['action'])) {
    $action = $_GET['action'];
	$user_id = $_GET['uid'];
	$server_id = $_GET['sid'];
}
		
	// Check for action in url, imports the variables and do command.	
	if($action == "warn") {
			   
		foreach ($serverinfo as $server) {
			if($server['0'] == $server_id){
				
				$con = new q3query($server['2'], $server['3'], $success);
				if (!$success) {
					die ("Failed to connect");
				}
				$con->setRconpassword($server['4']);
				$con->rcon("say $user_id $warnmessage");
				echo "You successfully should have warned the user with ID $user_id. Redirect after 3 seconds.";
				header( "refresh:3;url=index.php" );
				die();
			}		
		}
	} if($action == "kick") {
			   
		foreach ($serverinfo as $server) {
			if($server['0'] == $server_id){
				
				$con = new q3query($server['2'], $server['3'], $success);
				if (!$success) {
					die ("Failed to connect");
				}
				$con->setRconpassword($server['4']);
				$con->rcon("clientkick $user_id $kickmessage");
				echo "You successfully should have kicked the user with ID $user_id. Redirect after 3 seconds.";
				header( "refresh:3;url=index.php" );
				die();
			}		
		}
	} else if($action == "ban") {
			if($server['0'] == $server_id){
				
				$con = new q3query($server['2'], $server['3'], $success);
				if (!$success) {
					die ("Failed to connect");
				}
				$con->setRconpassword($server['4']);
				echo $con->rcon("tempbanclient $user_id $banmessage");
				echo "You successfully should have banned the user with ID $user_id. Redirect after 3 seconds.";
				header( "refresh:3;url=index.php" );
				die();
			}
	}
?>

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="Status mamanger for fivereborn server">
    <meta name="author" content="Slluxx">
    <title><?php echo $website_title; ?></title>
    <link rel="stylesheet" href="https://bootswatch.com/flatly/bootstrap.min.css">
	<style>
	.footer {
	  position: absolute;
	  bottom: 0;
	  width: 100%;
	  /* Set the fixed height of the footer here */
	  height: 60px;
	  line-height: 60px; /* Vertically center the text there */
	  background-color: #f5f5f5;
	}
	</style>
  </head>
  <body>
    <div class="container">		
		<div class="row">
			<div class="col-md-12">
				<center>
				<h1><?php echo $website_header; ?></h1>
				</center>
			</div>
		</div>
		<div class="row">
<?php		

	foreach ($serverinfo as $server) {
		echo "<div class='row'>";	
		echo "<div class='col-md-12'>";
		$con = new q3query($server['2'], $server['3'], $success);
		if (!$success) {
			die ("Fehler bei der Verbindungherstellung");
		}
		$con->setRconpassword($server['4']);
	
		$server_players_array=explode("\n",$con->rcon("status"));
		$xpop = array_pop($server_players_array);
		$server_players_total = count($server_players_array);
	
		echo "<b>".$server['1']."</b>";
		echo "<table class='table table-condensed table-bordered'>
				<thead>
					<tr>
						<th>ID</th>
						<th>Name</th>
						<th>SteamID</th>
						<th>IP</th>
						<th>Ping</th>
						<th>WARN</th>
						<th>KICK</th>
						<th>BAN</th>
					</tr>
			  </thead>
			  <tbody>";

	// Splitting the multiple lines of status command into arrays and split them into arrays seperated by " "
	// the mess is because playernames can have spaces. So we remove every entry before and after name
	// and put the rest together as name string.
	foreach ($server_players_array as $server_player) {
		$playerinfo=explode(" ",$server_player);
		$player_id = array_shift($playerinfo);
		$player_ipsteam = array_shift($playerinfo);
		$player_ipsteam2 = explode(":", $player_ipsteam);
		if($player_ipsteam2[0] == "steam"){
			$player_ipsteam3 = $player_ipsteam2[1];
		}else{
			$player_ipsteam3 = "-";
		}
		$player_ping = array_pop($playerinfo);
		$player_ip = array_pop($playerinfo);
		$player_name = implode(" ", $playerinfo);
		echo "<tr>
				<td>$player_id</td>
				<td>$player_name</td>
				<td>$player_ipsteam3</td>
				<td>$player_ip</td>
				<td>$player_ping</td>
				<td><a href='index.php?action=warn&uid=$player_id&sid=$server[0]' class='btn-xs btn-xs'> WARN</a></td>				
				<td><a href='index.php?action=kick&uid=$player_id&sid=$server[0]' class='btn btn-warning btn-xs'> KICK</a></td>
				<td><a href='index.php?action=ban&uid=$player_id&sid=$server[0]' class='btn btn-danger btn-xs'> BAN</a></td></tr>
			  </tr>";				  
		}
		echo "</tbody>
		</table>";
	
	
	echo"</div>";
	echo"</div>";
}
?>
		</div>


    </div><!-- /.container -->
	<footer class="footer">
      <div class="container">
        <span class="text-muted">Made with <3 by <a href="https://github.com/Slluxx">Slluxx</a>. All my work is free but if you consider to help, you can <a href="https://www.paypal.me/slluxx/">donate here.</a></span>
      </div>
    </footer>
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
  </body>
</html>

1 Like

I didn’t add a “warn” feature because most people dont read the chat or just miss the warning as it is unpersonal and not very clear this way.

I could add a “send message” feature without predefined text but that is also not good in my eyes.
If you are on the server and see somebody doing stuff thats not okay, sending a “personal” message or conversation is much more worth than a predefined one.

On our servers ‘kick’ is the warning. We have rules and they are even on our loadingscreen. They should know when they do something off ( like shooting people with a tank on a drift-server) so we simply kick them.

BTT:

Its a modification you made to your version but i wont include.
Green styled buttons are named “success”

class='btn btn-success btn-xs'

should do the trick

thanks man, no problem just giving people a option lol i like to warn first then get ugly

your server, your rules :smiley: