Stefan1200's Forum

JTS3ServerMod Hosting Edition => JTS3ServerMod MySQL & WebInterface => FAQ / How To ... => Topic started by: Stefan1200 on September 25, 2015, 04:57:53 PM

Title: Allow Admin Server Query group at Server Group Protection (Web Interface)
Post by: Stefan1200 on September 25, 2015, 04:57:53 PM
Some of you might not know, that the JTS3ServerMod also allows to protect the Admin Server Query group using the function Server Group Protection. The only exception: add_missing_groups is not working for query groups (because of security reasons). But the Web Interface is not displaying the query groups, because in most cases it is not useful to display that groups to a customer.

But if you want to allow Web Interface users to select this query server groups, you can enable it by changing one PHP file and fire one SQL command.

Enable Admin Server Query at Server Group Protection

Execute MySQL command
UPDATE `jts3servermodwebui_functionpage` SET `options` = 'multiple,showquerytype' WHERE `botfunction_id` = 12 AND `configkey` = '_groups'

Open file include/functions/servergroupprotection.php and find both lines with getServerGroupComboBoxDef and change the last argument from false to true.

include/functions/servergroupprotection.php - Line 33
$groupprotInput .= "<tr><td>".getServerGroupComboBoxDef($botid, $class_db, $prefix."_group".$row[0], $row[1], false, true)."</td><td>";

include/functions/servergroupprotection.php - Line 37
$groupprotInput .= "<tr><td>".getServerGroupComboBoxDef($botid, $class_db, $prefix."_group_new", $row[1], false, true)."</td><td>";




Disable Admin Server Query at Server Group Protection (default)

Execute MySQL command
UPDATE `jts3servermodwebui_functionpage` SET `options` = 'multiple' WHERE `botfunction_id` = 12 AND `configkey` = '_groups'

Open file include/functions/servergroupprotection.php and find both lines with getServerGroupComboBoxDef and change the last argument from true to false.

include/functions/servergroupprotection.php - Line 33
$groupprotInput .= "<tr><td>".getServerGroupComboBoxDef($botid, $class_db, $prefix."_group".$row[0], $row[1], false, false)."</td><td>";

include/functions/servergroupprotection.php - Line 37
$groupprotInput .= "<tr><td>".getServerGroupComboBoxDef($botid, $class_db, $prefix."_group_new", $row[1], false, false)."</td><td>";


Last updated for Web Interface 3.0 build 3010! On newer or older versions the line numbers may not match.