Skip to content

Commit

Permalink
Upload Version 1.1.8
Browse files Browse the repository at this point in the history
  • Loading branch information
lgund committed May 3, 2017
1 parent bdc1ae1 commit d395404
Show file tree
Hide file tree
Showing 17 changed files with 828 additions and 215 deletions.
20 changes: 18 additions & 2 deletions check_database.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
};

if(substr(sprintf('%o', fileperms('config.php')), -4) != $wantedFilePermissions || substr(sprintf('%o', fileperms('config_instanz.php')), -4) != $wantedFilePermissions || substr(sprintf('%o', fileperms('TicketBereich.txt')), -4) != $wantedFilePermissions
|| substr(sprintf('%o', fileperms('logs/system.log')), -4) != $wantedFilePermissions || substr(sprintf('%o', fileperms('logs/user.log')), -4) != $wantedFilePermissions || substr(sprintf('%o', fileperms('shell/teamspeakCommands.sh')), -4) != "0777")
|| substr(sprintf('%o', fileperms('logs/system.log')), -4) != $wantedFilePermissions || substr(sprintf('%o', fileperms('logs/user.log')), -4) != $wantedFilePermissions || !is_executable('shell/teamspeakCommands.sh'))
{
$permissions = false;
};
Expand Down Expand Up @@ -100,7 +100,7 @@
};
$installFolderExists = file_exists("install");

if($verbindung != 'done' || !$users || !$permissions || $installFolderExists)
if($verbindung != 'done' || !$users || !$permissions || $installFolderExists || !extension_loaded("soap"))
{ ?>
<html>
<head>
Expand Down Expand Up @@ -300,6 +300,22 @@
</div>
</div>
</section>
<?php } else if(!extension_loaded("soap")) { ?>
<section class="container first-row">
<div class="row">
<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
<div class="card">
<div class="card-block card-block-header">
<i class="fa fa-warning" aria-hidden="true"></i> SOAP <?php echo $language['deactive']; ?>
</div>
<div class="card-block">
<p style="text-align: center;"><?php echo $language['soap_deactive']; ?></p>
<a href="index.php"><button style="width: 100%;" class="btn btn-success"><i class="fa fa-refresh" aria-hidden="true"></i> <?php echo $language['refresh']; ?></button></a>
</div>
</div>
</div>
</div>
</section>
<?php } else { ?>
<!-- Install folder exists -->
<section class="container first-row">
Expand Down
21 changes: 15 additions & 6 deletions functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
/*
Installed Webinterface version
*/
define("INTERFACE_VERSION", "1.1.7-OPEN-BETA");
define("INTERFACE_VERSION", "1.1.8-OPEN-BETA");

/*
Session start
Expand Down Expand Up @@ -118,7 +118,7 @@ function writeInLog($loglevel, $logtext, $userlog = false)

$loghandle = fopen($file.".log", 'a');
fwrite($loghandle, $input);
if (filesize($file) > 10242880) // 10MB
if (filesize($file.".log") > 10242880) // 10MB
{
fwrite($loghandle, $date."\tNOTICE\t\tLogfile filesie of 10 MiB reached.. Rotate logfile.\n");

Expand All @@ -142,9 +142,12 @@ function writeInLog($loglevel, $logtext, $userlog = false)
unlink($file.".log");
};

if (filesize($file.".zip") > 20485760) // 20 MB
if(file_exists($file.".zip"))
{
unlink($file.".zip");
if (filesize($file.".zip") > 20485760) // 20 MB
{
unlink($file.".zip");
};
};
};

Expand Down Expand Up @@ -509,8 +512,14 @@ function getCheckedClientServerEditRights($pk, $instanz, $port)

foreach($databaseKeys AS $keyname => $key)
{

if(!in_array($key, $clientKeys) && strpos($clientKeys[$key][$instanz], $port) !== false)
if(!empty($clientKeys))
{
if(!in_array($key, $clientKeys) && strpos($clientKeys[$key][$instanz], $port) !== false)
{
unset($returnKeys[$keyname]);
};
}
else
{
unset($returnKeys[$keyname]);
};
Expand Down
4 changes: 2 additions & 2 deletions iframeServerView.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@
<link rel="stylesheet" type="text/css" href="css/sonstige/font-awesome.min.css" />
<link rel="stylesheet" type="text/css" href="css/bootstrap/bootstrap.css" />
</head>
<body style="color:#<?php echo htmlspecialchars($_GET['color']); ?>;font-size:<?php echo htmlspecialchars($_GET['fontsize']); ?>">
<div class="col-lg-12 col-md-12" id="tree_loading" style="margin-top:20px;margin-bottom:20px;text-align:center;">
<body style="color:#<?php echo htmlspecialchars($_GET['color']); ?>;background-color:#<?php echo htmlspecialchars($_GET['bodybgcolor']); ?>;font-size:<?php echo htmlspecialchars($_GET['fontsize']); ?>">
<div class="col-lg-12 col-md-12" id="tree_loading" style="margin-top:20px;margin-bottom:20px;text-align:center;background-color:#<?php echo htmlspecialchars($_GET['spinbgcolor']); ?>;">
<h3><?php echo $language['ts_tree_loading']; ?></h3><br /><i style="font-size:100px;" class="fa fa-cogs fa-spin"></i>
</div>
<div class="col-lg-12 col-md-12 tree" id="tree" style="padding:20px;display:none;<?php if($server['data']['virtualserver_status'] == 'online') { echo 'background-color:rgba(0,199,0,0.2);'; } else { echo 'background-color:rgba(199, 0,0,0.2);'; } ?>">
Expand Down
21 changes: 11 additions & 10 deletions js/webinterface/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
}
else if(typeof(doc[2]) != 'undefined' && typeof(doc[3]) != 'undefined')
{
//alert(typeof(teamspeakTokenInit));
switch(doc[1])
{
case "web_teamspeak_serverview":
Expand Down Expand Up @@ -171,11 +172,11 @@
$(this).addClass("active");
});

$('#mainContent').fadeOut("slow", function()
$('#mainContent').fadeOut("fast", function()
{
$('#mainContent').load("web_main_main.php", function()
{
$('#mainContent').fadeIn("slow");
$('#mainContent').fadeIn("fast");
});
});
};
Expand Down Expand Up @@ -213,7 +214,7 @@
$(this).addClass("active");
});

$('#mainContent').fadeOut("slow", function()
$('#mainContent').fadeOut("fast", function()
{
$('#mainContent').load("web_main_apply_server.php", function()
{
Expand All @@ -222,7 +223,7 @@
$('#wantServerStep1').remove();
$('#wantServerStep2').show();
};
$('#mainContent').fadeIn("slow");
$('#mainContent').fadeIn("fast");
});
});
};
Expand Down Expand Up @@ -260,11 +261,11 @@
$(this).addClass("active");
});

$('#mainContent').fadeOut("slow", function()
$('#mainContent').fadeOut("fast", function()
{
$('#mainContent').load("web_main_masterserver.php", function()
{
$('#mainContent').fadeIn("slow");
$('#mainContent').fadeIn("fast");
});
});
};
Expand Down Expand Up @@ -388,11 +389,11 @@

$(".teamspeakView").addClass("active");

$("#mainContent").fadeOut("slow", function()
$("#mainContent").fadeOut("fast", function()
{
$("#mainContent").load('web_teamspeak_serverview.php', function()
{
$("#mainContent").fadeIn("slow");
$("#mainContent").fadeIn("fast");
});
});
};
Expand Down Expand Up @@ -447,11 +448,11 @@

$("."+activeClass).addClass("active");

$("#mainContent").fadeOut("slow", function()
$("#mainContent").fadeOut("fast", function()
{
$("#mainContent").load(link+'.php', function()
{
$("#mainContent").fadeIn("slow");
$("#mainContent").fadeIn("fast");
});
});
};
Expand Down
20 changes: 10 additions & 10 deletions js/webinterface/teamspeak.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,11 @@

$("."+activeClass).addClass("active");

$("#mainContent").fadeOut("slow", function()
$("#mainContent").fadeOut("fast", function()
{
$("#mainContent").load(link+'.php', function()
{
$("#mainContent").fadeIn("slow");
$("#mainContent").fadeIn("fast");
});
});
};
Expand Down Expand Up @@ -2030,22 +2030,22 @@

if(informations.length <= 1)
{
if(informations[0] == 'move')
if(informations[0] == 'move' && document.getElementById("infoMove"))
{
document.getElementById("infoMove").innerHTML = ts3_mass_no_affected_user;
};

if(informations[0] == 'kick')
if(informations[0] == 'kick' && document.getElementById("infoKick"))
{
document.getElementById("infoKick").innerHTML = ts3_mass_no_affected_user;
};

if(informations[0] == 'ban')
if(informations[0] == 'ban' && document.getElementById("infoBan"))
{
document.getElementById("infoBan").innerHTML = ts3_mass_no_affected_user;
};

if(informations[0] == 'msg')
if(informations[0] == 'msg' && document.getElementById("infoMessagePoke"))
{
document.getElementById("infoMessagePoke").innerHTML = ts3_mass_no_affected_user;
};
Expand All @@ -2065,22 +2065,22 @@
};
};

if(informations[0] == 'move')
if(informations[0] == 'move' && document.getElementById("infoMove"))
{
document.getElementById("infoMove").innerHTML = clients;
};

if(informations[0] == 'kick')
if(informations[0] == 'kick' && document.getElementById("infoKick"))
{
document.getElementById("infoKick").innerHTML = clients;
};

if(informations[0] == 'ban')
if(informations[0] == 'ban' && document.getElementById("infoBan"))
{
document.getElementById("infoBan").innerHTML = clients;
};

if(informations[0] == 'msg')
if(informations[0] == 'msg' && document.getElementById("infoMessagePoke"))
{
document.getElementById("infoMessagePoke").innerHTML = clients;
};
Expand Down
7 changes: 6 additions & 1 deletion lang.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@
"german" => "First-Coder.de",
"english" => "lorixon.com",
"italian" => "Grafic404",
"turkish" => "sezerondr"
"turkish" => "sezerondr",
"french" => "glougloubot"
);
if(LANGUAGE == '' || LANGUAGE == 'english')
{
Expand All @@ -49,5 +50,9 @@
else if(LANGUAGE == 'turkish')
{
include("lang/tr.php");
}
else if(LANGUAGE == 'french')
{
include("lang/fr.php");
};
?>
5 changes: 5 additions & 0 deletions lang/de.php
Original file line number Diff line number Diff line change
Expand Up @@ -592,4 +592,9 @@
$language['reset_server'] = "Serverrechte zur&uuml;cksetzen";
$language['reset_server_info'] = "Hierbei werden alle Rechte zur&uuml;ckgesetzt. Server- und Channelgruppen werden gel&ouml;scht!";
$language['reset_server_success'] = "Serverrechte wurden erfolgreich zur&uuml;ckgesetzt!";

// new in Version 1.1.9
$language['soap_deactive'] = "SOAP Erweiterung wurde nicht gefunden. Bitte aktivieren Sie diese, bevor Sie die Seite verwenden.";
$language['admin_query_add'] = "Server Admin Query hinzuf&uuml;gen";
$language['admin_query_del'] = "Server Admin Query l&ouml;schen";
?>
Loading

0 comments on commit d395404

Please sign in to comment.