[Release] Webmanager | DISCONTINUED - CHECK V2

i have a static ip, i dont whitelist port. my ip has maybe changed 3 times since last year.
also i still have ssh so wont be locked out, but just wanted to make sure that it would be ok to use it.

Dont know if it has SQL injection protection and stuff

SQL injection protection for something that doesn’t use SQL at all?

Hey how do I un-ban? :stuck_out_tongue:

Hi guys , for “Notice: Undefined variable: action in”
Screens : http://prntscr.com/f80t25 replaced by http://prntscr.com/f80tp7

Replace:

> 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 == "kick") {
> 			   
> 		foreach ($serverinfo as $server) {
> 			if($server['0'] == $server_id){
> 				
> 				$con = new q3query($server['2'], $server['3'], $success);
> 				if (!$success) {
> 					die ("Fehler bei der Verbindungherstellung");
> 				}
> 				$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") {
> 		foreach ($serverinfo as $server) {
> 			if($server['0'] == $server_id){
> 				$con = new q3query($server['2'], $server['3'], $success);
> 				if (!$success) {
> 					die ("Fehler bei der Verbindungherstellung");
> 				}
> 				$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();
> 			}
> 		}
> 	}

By

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 == "kick") {
			   
		foreach ($serverinfo as $server) {
			if($server['0'] == $server_id){
				
				$con = new q3query($server['2'], $server['3'], $success);
				if (!$success) {
					die ("Fehler bei der Verbindungherstellung");
				}
				$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") {
		foreach ($serverinfo as $server) {
			if($server['0'] == $server_id){
				$con = new q3query($server['2'], $server['3'], $success);
				if (!$success) {
					die ("Fehler bei der Verbindungherstellung");
				}
				$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();
			}
		}
	}
}

Why?

Because the declaration of the action is not cited
In the code of action kick and ban.
So he replies that the action kick or ban is not defined.

BONUS: My modified version: http://prntscr.com/f81fpp

Have a good day! :slight_smile:

Oskr

1 Like

can you give me your modified panel ? :joy: with money function ??
edit /// it’s work thanks you man !

Can you share you bonus script?
Thanks…

For warns, just add:
if(isset($action) && $action == kick){
and
if(isset($action) && $action == ban){

and for security, .htaccess rules! :smiley:

1 Like

Money function is useless ^^ she set money to amount and no calculate your actual amount to get the new ^^

if you need to add it : http://prntscr.com/f8mnta

else if ($action == "money") {
		foreach ($serverinfo as $server) {
			if($server['0'] == $server_id){
				$con = new q3query($server['2'], $server['3'], $success);
				if (!$success) {
					die ("Fehler bei der Verbindungherstellung");
				}
				$con->setRconpassword($server['4']);
				echo $con->rcon("setmoney $user_id 1000000");
				echo "You successfully should have set 1,000,000 $ to the user with ID $user_id. Redirect after 3 seconds.";
				header( "refresh:3;url=index.php" );
				die();
			}
		}
		} else if ($action == "money1") {
		foreach ($serverinfo as $server) {
			if($server['0'] == $server_id){
				$con = new q3query($server['2'], $server['3'], $success);
				if (!$success) {
					die ("Fehler bei der Verbindungherstellung");
				}
				$con->setRconpassword($server['4']);
				echo $con->rcon("setmoney $user_id 10000000");
				echo "You successfully should have set 10,000,000 $ to the user with ID $user_id. Redirect after 3 seconds.";
				header( "refresh:3;url=index.php" );
				die();
			}
		}
		}

and

Add http://prntscr.com/f8moef
Add : Table title and button

<th>MONEY</th> 

<td><a href='index.php?action=money&uid=$player_id&sid=$server[0]' class='btn btn-success btn-xs'> Set to 1,000,000$</a> <a href='index.php?action=money1&uid=$player_id&sid=$server[0]' class='btn btn-success btn-xs'> Set to 10,000,000$</a></td></tr>

Complete PHP : https://pastebin.com/wbwa5t40

Say Function (Console Messages) not released because it is unstable

All rights reserved to Slluxx, i’ve just add functions !!

we can choose one of :

-- Sets the player money to the specified amount
Player:setMoney(amount)

-- Adds to the current total amount of money
Player:addMoney(amount)

-- Removes from the current amount of money
Player:removeMoney(amount)

just replace the function

I can’t help you guys with any of my projects as my real-life doesn’t give me the time for this anymore.

In a few months I will be back updating, fixing and adding anything you like but it’s not possible for me at the moment. Please share this to anyone who asks.

Best regards,
Slluxx

1 Like

Just wanted to thank you, this has been a useful template.

HI how to install for my server ?
with wamp

Go to directory: www (click on wamp to access) and put the files , go webbrowser : localhost

1 Like

I love you OSKR you save me

1 Like

Thanks for this! Definitely looking forward to building off of this!! <3 Works pretty well!

Hi Slluxx :relaxed:.

I hope I’m not asking too stupid, because I’m a beginner on the field.

Questions:

I give ‘index.php’ a new name (myname.php) and upload this, plus the folder ‘rcon’ to my ‘http homepage’ ?

'array (“0”, “My server name 1”, “127.0.0.1”, “31100”, “myrconpassword”)
(I only have one FiveM server).

My problem is this:

Array (“0”, “Have no name”, “My server IP ?”, “30120”, “I don’t use a password”)

How do I fill this line correctly?

Please help and give me an example for the line, thanks :relaxed:.

First test: It looks like it work, I can see my self on my server. But when I try to ‘kick my self’, I get an ‘404 not found’ error.
I try again later, But now I get an ‘http 500’ error, what happent ?? Please help :cry:

  1. Yes, upload your newly named index.php file, along with the rcon folder.

  2. array(“0”,“Name of your server”,“server ip”,“port of server”,“rcon pass”),

Name of your server - this is just listed on the page itself, so if you have more than 1 server, it is listed and organised on the web page.
Server port - Found in your .yml file - open citmp-server.yml - top line, use the ListenPort
RCon Pass - Found also in your .yml file - open citmp-server.yml, find RconPassword - enter your rcon password listed

IE: array(“0”,“My Server”,“127.0.0.1”,“30120”,“no”),

Du er velkommen

Hey, Really cool addon, is there a way to add a function to restart the server using this web panel?

@XJJAM, nope, and he will not implement that for “security reason” according to him xDD