!
diff --git a/php/admin/web_admin_user_serverpermission.php b/php/admin/web_admin_user_serverpermission.php
index a1fb7f4..7c6c690 100644
--- a/php/admin/web_admin_user_serverpermission.php
+++ b/php/admin/web_admin_user_serverpermission.php
@@ -512,7 +512,6 @@ function closeModalServerEdit()
},
success: function(data)
{
- console.log(data);
if(data == 'null')
{
$('.serverEditChangeClass').each(function() {
@@ -528,7 +527,8 @@ function closeModalServerEdit()
var informations = JSON.parse(data);
$('.serverEditChangeClass').each(function() {
- if(typeof(informations[$(this).attr("right")]) != 'undefined')
+ console.log(informations[$(this).attr("right")]);
+ if(typeof(informations[$(this).attr("right")]) != 'undefined' && informations[$(this).attr("right")] != 'false')
{
$(this).bootstrapToggle('on');
}
diff --git a/php/functions/functions.php b/php/functions/functions.php
index c2cda39..ff1911d 100644
--- a/php/functions/functions.php
+++ b/php/functions/functions.php
@@ -34,7 +34,7 @@
/*
Installed Webinterface version
*/
- define("INTERFACE_VERSION", "1.3.11-OPEN-BETA");
+ define("INTERFACE_VERSION", "1.3.12-OPEN-BETA");
/*
Anti XSS
@@ -204,6 +204,26 @@ function checkNewVersion($withInfo = true)
};
};
+ /*
+ Update possible
+ */
+ function isUpdatePossible()
+ {
+ try
+ {
+ $client = new SoapClient(null, array(
+ 'location' => 'http://wiki.first-coder.de/soap/soap_server.php',
+ 'uri' => 'https://wiki.first-coder.de/soap/soap_server.php'
+ ));
+
+ return $client->isUpdatePossible(INTERFACE_VERSION, DONATOR_MAIL, (SEND_VERSION == "true") ? true : false);
+ }
+ catch(Exception $e)
+ {
+ return false;
+ };
+ };
+
/*
Set instance config
*/
diff --git a/php/functions/functionsSql.php b/php/functions/functionsSql.php
index ac0d6d9..b8f326a 100644
--- a/php/functions/functionsSql.php
+++ b/php/functions/functionsSql.php
@@ -652,12 +652,12 @@ function getCheckedClientServerEditRights($pk, $instanz, $port)
{
if(!in_array($key, $clientKeys) && strpos($clientKeys[$key][$instanz], $port) !== false)
{
- unset($returnKeys[$keyname]);
+ $returnKeys[$keyname] = "false";
};
}
else
{
- unset($returnKeys[$keyname]);
+ $returnKeys[$keyname] = "false";
};
};
@@ -1711,13 +1711,6 @@ function getUserRights($type, $key, $withTime = true, $just = "all")
$returnData[$row['rights_name']][$row['access_instanz']] = $row['access_ports'];
};
};
- foreach($mysql_keys AS $name=>$key)
- {
- if(!isSet($returnData[$name]))
- {
- $returnData[$name]['key'] = "NONE";
- };
- };
break;
case "global":
foreach($result AS $row)
@@ -1734,13 +1727,6 @@ function getUserRights($type, $key, $withTime = true, $just = "all")
};
};
};
- foreach($mysql_keys AS $name=>$key)
- {
- if(!isSet($returnData[$name]))
- {
- $returnData[$name] = "NONE";
- };
- };
break;
case "time":
foreach($result AS $row)
@@ -1751,14 +1737,6 @@ function getUserRights($type, $key, $withTime = true, $just = "all")
$returnData[$row['rights_name']]['time'] = $row['timestamp'];
};
};
- foreach($mysql_keys AS $name=>$key)
- {
- if(!isSet($returnData[$name]))
- {
- $returnData[$name]['key'] = "NONE";
- $returnData[$name]['time'] = "0";
- };
- };
break;
default:
foreach($result AS $row)
@@ -1774,13 +1752,6 @@ function getUserRights($type, $key, $withTime = true, $just = "all")
$returnData[$row['rights_name']][$row['access_instanz']] = $row['access_ports'];
};
};
- foreach($mysql_keys AS $name=>$key)
- {
- if(!isSet($returnData[$name]))
- {
- $returnData[$name]['key'] = "NONE";
- };
- };
break;
};
diff --git a/php/functions/functionsTeamspeak.php b/php/functions/functionsTeamspeak.php
index 620890b..cf7e180 100644
--- a/php/functions/functionsTeamspeak.php
+++ b/php/functions/functionsTeamspeak.php
@@ -1874,7 +1874,7 @@ function getTeamspeakslotsArray($serverList, $instanz, $forceInfo = false)
{
if(isSet($server['virtualserver_clientsonline']) && isSet($server['virtualserver_queryclientsonline']) && isSet($server['virtualserver_maxclients']))
{
- if(strpos($user_right['right_web_server_view'][$instanz], $server['virtualserver_port']) !== false || $user_right['right_web_global_server']['key'] == $mysql_keys['right_web_global_server'])
+ if(isPortPermission($user_right, $instanz, $server['virtualserver_port'], 'right_web_server_view') || $user_right['right_web_global_server']['key'] == $mysql_keys['right_web_global_server'])
{
$returnArray[0]['virtualserver_clientsonline'] = $returnArray[0]['virtualserver_clientsonline'] + ($server['virtualserver_clientsonline'] - $server['virtualserver_queryclientsonline']);
$returnArray[0]['virtualserver_maxclients'] = $returnArray[0]['virtualserver_maxclients'] + $server['virtualserver_maxclients'];
@@ -1889,7 +1889,7 @@ function getTeamspeakslotsArray($serverList, $instanz, $forceInfo = false)
$newServerList = array();
foreach($serverList AS $server)
{
- if(strpos($user_right['right_web_server_view'][$instanz], $server['virtualserver_port']) !== false || $user_right['right_web_global_server']['key'] == $mysql_keys['right_web_global_server'])
+ if(isPortPermission($user_right, $instanz, $server['virtualserver_port'], 'right_web_server_view') || $user_right['right_web_global_server']['key'] == $mysql_keys['right_web_global_server'])
{
$server['virtualserver_clientsonline'] = $server['virtualserver_clientsonline'] - $server['virtualserver_queryclientsonline'];
$newServerList[] = $server;
diff --git a/php/main/web_main.php b/php/main/web_main.php
index 647d326..edbf06a 100644
--- a/php/main/web_main.php
+++ b/php/main/web_main.php
@@ -396,7 +396,7 @@
logged = '',
wantServer = new Array(),
checkClientInterval = ,
- updateAvalible = "",
+ updateAvalible = "",
hasPermission = "",
timer = 10,
emailRegex = /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
diff --git a/php/profile/web_profil_dashboard.php b/php/profile/web_profil_dashboard.php
index 448fc5e..e8838a2 100644
--- a/php/profile/web_profil_dashboard.php
+++ b/php/profile/web_profil_dashboard.php
@@ -192,24 +192,24 @@
+ if(isPortPermission($user_right, $instanz, $server['virtualserver_port'], 'right_web_server_view') || $user_right['right_web_global_server']['key'] == $mysql_keys['right_web_global_server']) { ?>