diff --git a/php/admin/web_admin_settings.php b/php/admin/web_admin_settings.php index 492e007..db8b5e6 100644 --- a/php/admin/web_admin_settings.php +++ b/php/admin/web_admin_settings.php @@ -126,12 +126,13 @@

+
:
-
" style="text-align:center;"> +
" style="text-align:center;">
@@ -146,7 +147,7 @@
- +
! 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']) { ?> "> + permission=""> "> + permission=""> " - permission=""> + permission=""> "> + permission="">
-

- +
diff --git a/php/teamspeak/web_teamspeak_serverview_modal_clientview.php b/php/teamspeak/web_teamspeak_serverview_modal_clientview.php index eca44b0..c69f0ef 100644 --- a/php/teamspeak/web_teamspeak_serverview_modal_clientview.php +++ b/php/teamspeak/web_teamspeak_serverview_modal_clientview.php @@ -55,7 +55,7 @@ /* Has the Client the Permission */ - if((strpos($user_right['right_web_server_view'][$_REQUEST['instanz']], $_REQUEST['port']) === false && $user_right['right_web_global_server']['key'] != $mysql_keys['right_web_global_server']) || $user_right['right_web']['key'] != $mysql_keys['right_web']) + if((!isPortPermission($user_right, $_REQUEST['instanz'], $_REQUEST['port'], 'right_web_server_view') && $user_right['right_web_global_server']['key'] != $mysql_keys['right_web_global_server']) || $user_right['right_web']['key'] != $mysql_keys['right_web']) { reloadSite(RELOAD_TO_SERVERVIEW); }; @@ -118,14 +118,14 @@ function getTime($timestamp)
- +
@@ -445,7 +445,7 @@ function getTime($timestamp) - +
diff --git a/updater/functions.php b/updater/functions.php index 2e50b77..780044c 100644 --- a/updater/functions.php +++ b/updater/functions.php @@ -115,6 +115,16 @@ }; }; + // Check local config + if(!is_writable(__dir__."/../config/config.php")) + { + if(!chmod(__dir__."/../config/config.php", 0666)) + { + echo '
  • config/config.php........... FAILED (CAN NOT SET PERMISSION TO 0666)
  • '; + $permissionCheck = false; + }; + }; + $zipHandle = zip_open($filename); if($permissionCheck) { diff --git a/updater/updater.php b/updater/updater.php index fdc6b6e..41fe80c 100644 --- a/updater/updater.php +++ b/updater/updater.php @@ -165,12 +165,12 @@ $tmpVersion = false; foreach($versionList AS $version) { - if($version == INTERFACE_VERSION) + if($version == INTERFACE_VERSION && $updatePossible != 0) { $tmpVersion = true; echo ""; } - else if(!$tmpVersion) + else if(!$tmpVersion && $updatePossible != 0) { if($updatePossible == $tmpVersionNumber) {
    ".$version."".$language['current_version']."