release 1.2.0

This commit is contained in:
root
2016-11-26 21:39:08 +01:00
parent 114633ab86
commit 62c84d4a34
414 changed files with 3949 additions and 19431 deletions

View File

@@ -2,6 +2,7 @@
session_start();
require_once('../other/config.php');
require_once('../other/phpcommand.php');
function getclientip() {
if (!empty($_SERVER['HTTP_CLIENT_IP']))
@@ -124,9 +125,9 @@ if (isset($_POST['start']) && $_SESSION['username'] == $webuser && $_SESSION['pa
} else {
if (substr(php_uname(), 0, 7) == "Windows") {
$WshShell = new COM("WScript.Shell");
$oExec = $WshShell->Run("cmd /C php ".substr(__DIR__,0,-12)."\worker.php start", 0, false);
$oExec = $WshShell->Run("cmd /C ".$phpcommand." ".substr(__DIR__,0,-12)."\worker.php start", 0, false);
} else {
exec("php ".substr(__DIR__,0,-12)."worker.php start");
exec($phpcommand." ".substr(__DIR__,0,-12)."worker.php start");
}
$err_msg = $lang['wibot2'];
$err_lvl = 1;
@@ -138,9 +139,9 @@ if (isset($_POST['start']) && $_SESSION['username'] == $webuser && $_SESSION['pa
if (isset($_POST['stop']) && $_SESSION['username'] == $webuser && $_SESSION['password'] == $webpass && $_SESSION['clientip'] == getclientip()) {
if (substr(php_uname(), 0, 7) == "Windows") {
$WshShell = new COM("WScript.Shell");
$oExec = $WshShell->Run("cmd /C php ".substr(__DIR__,0,-12)."\worker.php stop", 0, false);
$oExec = $WshShell->Run("cmd /C ".$phpcommand." ".substr(__DIR__,0,-12)."\worker.php stop", 0, false);
} else {
exec("php ".substr(__DIR__,0,-12)."worker.php stop");
exec($phpcommand." ".substr(__DIR__,0,-12)."worker.php stop");
}
$err_msg = $lang['wibot1'];
$err_lvl = 1;
@@ -154,9 +155,9 @@ if (isset($_POST['restart']) && $_SESSION['username'] == $webuser && $_SESSION['
} else {
if (substr(php_uname(), 0, 7) == "Windows") {
$WshShell = new COM("WScript.Shell");
$oExec = $WshShell->Run("cmd /C php ".substr(__DIR__,0,-12)."\worker.php restart", 0, false);
$oExec = $WshShell->Run("cmd /C ".$phpcommand." ".substr(__DIR__,0,-12)."\worker.php restart", 0, false);
} else {
exec("php ".substr(__DIR__,0,-12)."worker.php restart");
exec($phpcommand." ".substr(__DIR__,0,-12)."worker.php restart");
}
$err_msg = $lang['wibot3'];
$err_lvl = 1;

View File

@@ -2,6 +2,7 @@
session_start();
require_once('../other/config.php');
require_once('../other/phpcommand.php');
function enter_logfile($logpath,$timezone,$loglevel,$logtext) {
$file = $logpath.'ranksystem.log';
@@ -29,11 +30,11 @@ function enter_logfile($logpath,$timezone,$loglevel,$logtext) {
if (substr(php_uname(), 0, 7) == "Windows") {
exec("del /F ".substr(__DIR__,0,-12).'logs/pid');
$WshShell = new COM("WScript.Shell");
$oExec = $WshShell->Run("cmd /C php ".substr(__DIR__,0,-12)."worker.php start", 0, false);
$oExec = $WshShell->Run("cmd /C ".$phpcommand." ".substr(__DIR__,0,-12)."worker.php start", 0, false);
exit;
} else {
exec("rm -f ".substr(__DIR__,0,-12).'logs/pid');
exec("php ".substr(__DIR__,0,-12)."worker.php start");
exec($phpcommand." ".substr(__DIR__,0,-12)."worker.php start");
exit;
}
}

View File

@@ -49,11 +49,12 @@ if (isset($_POST['update']) && $_SESSION['username'] == $webuser && $_SESSION['p
$exceptcid = $_POST['exceptcid'];
$grouptime = $_POST['grouptime'];
$ignoreidle = $_POST['ignoreidle'];
$resetexcept = $_POST['resetexcept'];
if (isset($_POST['resetbydbchange'])) $resetbydbchange = 1; else $resetbydbchange = 0;
if (isset($_POST['cleanclients'])) $cleanclients = 1; else $cleanclients = 0;
$cleanperiod = $_POST['cleanperiod'];
$boost = $_POST['boost'];
if ($mysqlcon->exec("UPDATE $dbname.config set substridle='$substridle',exceptuuid='$exceptuuid',exceptgroup='$exceptgroup',exceptcid='$exceptcid',grouptime='$grouptime',ignoreidle='$ignoreidle',resetbydbchange='$resetbydbchange',cleanclients='$cleanclients',cleanperiod='$cleanperiod',boost='$boost'") === false) {
if ($mysqlcon->exec("UPDATE $dbname.config set substridle='$substridle',exceptuuid='$exceptuuid',exceptgroup='$exceptgroup',exceptcid='$exceptcid',grouptime='$grouptime',ignoreidle='$ignoreidle',resetbydbchange='$resetbydbchange',cleanclients='$cleanclients',cleanperiod='$cleanperiod',boost='$boost',resetexcept='$resetexcept'") === false) {
$err_msg = print_r($mysqlcon->errorInfo(), true);
$err_lvl = 3;
} else {
@@ -91,6 +92,18 @@ if (isset($_POST['update']) && $_SESSION['username'] == $webuser && $_SESSION['p
</div>
<div class="panel panel-default">
<div class="panel-body">
<div class="form-group">
<label class="col-sm-4 control-label" data-toggle="modal" data-target="#wiexresdesc"><?php echo $lang['wiexres']; ?><i class="help-hover glyphicon glyphicon-question-sign"></i></label>
<div class="col-sm-8">
<select class="selectpicker show-tick form-control" id="basic" name="resetexcept">
<?PHP
echo '<option value="0"'; if($resetexcept=="0") echo " selected=selected"; echo '>',$lang['wiexres1'],'</option>';
echo '<option value="1"'; if($resetexcept=="1") echo " selected=selected"; echo '>',$lang['wiexres2'],'</option>';
echo '<option value="2"'; if($resetexcept=="2") echo " selected=selected"; echo '>',$lang['wiexres3'],'</option>';
?>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-4 control-label" data-toggle="modal" data-target="#wiexuiddesc"><?php echo $lang['wiexuid']; ?><i class="help-hover glyphicon glyphicon-question-sign"></i></label>
<div class="col-sm-8">
@@ -182,7 +195,7 @@ if (isset($_POST['update']) && $_SESSION['username'] == $webuser && $_SESSION['p
<div class="form-group">
<label class="col-sm-4 control-label" data-toggle="modal" data-target="#wiboostdesc"><?php echo $lang['wiboost']; ?><i class="help-hover glyphicon glyphicon-question-sign"></i></label>
<div class="col-sm-8">
<textarea class="form-control" data-pattern="^([1-9][0-9]{0,9}=>[1-9][0-9]{0,9}=>[1-9][0-9]{0,9},)*[1-9][0-9]{0,9}=>[1-9][0-9]{0,9}=>[1-9][0-9]{0,9}$" data-error="Wrong definition, please look at description for more details. No comma at ending!" rows="5" name="boost"><?php echo $config[0]['boost']; ?></textarea>
<textarea class="form-control" data-pattern="^([1-9][0-9]{0,9}=>[0-9]{0,9}=>[1-9][0-9]{0,9},)*[1-9][0-9]{0,9}=>[0-9]{0,9}=>[1-9][0-9]{0,9}$" data-error="Wrong definition, please look at description for more details. No comma at ending!" rows="5" name="boost"><?php echo $config[0]['boost']; ?></textarea>
<div class="help-block with-errors"></div>
</div>
</div>
@@ -216,6 +229,22 @@ if (isset($_POST['update']) && $_SESSION['username'] == $webuser && $_SESSION['p
</div>
</div>
</div>
<div class="modal fade" id="wiexresdesc" tabindex="-1">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
<h4 class="modal-title"><?php echo $lang['wiexres']; ?></h4>
</div>
<div class="modal-body">
<?php echo $lang['wiexresdesc']; ?>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal"><?PHP echo $lang['stnv0002']; ?></button>
</div>
</div>
</div>
</div>
<div class="modal fade" id="wiexuiddesc" tabindex="-1">
<div class="modal-dialog">
<div class="modal-content">

View File

@@ -2,6 +2,7 @@
session_start();
require_once('../other/config.php');
require_once('../other/phpcommand.php');
function enter_logfile($logpath,$timezone,$loglevel,$logtext) {
$file = $logpath.'ranksystem.log';
@@ -29,11 +30,11 @@ function enter_logfile($logpath,$timezone,$loglevel,$logtext) {
if (substr(php_uname(), 0, 7) == "Windows") {
exec("del /F ".substr(__DIR__,0,-12).'logs/pid');
$WshShell = new COM("WScript.Shell");
$oExec = $WshShell->Run("cmd /C php ".substr(__DIR__,0,-12)."worker.php start", 0, false);
$oExec = $WshShell->Run("cmd /C ".$phpcommand." ".substr(__DIR__,0,-12)."worker.php start", 0, false);
exit;
} else {
exec("rm -f ".substr(__DIR__,0,-12).'logs/pid');
exec("php ".substr(__DIR__,0,-12)."worker.php start");
exec($phpcommand." ".substr(__DIR__,0,-12)."worker.php start");
exit;
}
}
@@ -90,6 +91,14 @@ if(($last_access[0]['last_access'] + 1) >= time()) {
$err_lvl = 3;
}
if(isset($_SESSION['username']) && $_SESSION['username'] == $webuser && $_SESSION['password'] == $webpass) {
if($_SERVER['HTTPS'] == "on") {
header("Location: https://".$_SERVER['HTTP_HOST'].rtrim(dirname($_SERVER['PHP_SELF']), '/\\')."/ts.php");
} else {
header("Location: http://".$_SERVER['HTTP_HOST'].rtrim(dirname($_SERVER['PHP_SELF']), '/\\')."/ts.php");
}
}
require_once('nav.php');
?>
<div id="page-wrapper">

View File

@@ -7,23 +7,23 @@
<meta name="version" content="<?PHP echo $currvers; ?>">
<link rel="icon" href="../icons/rs.png">
<title>TS-N.NET Ranksystem</title>
<link href="../bootstrap/css/bootstrap.min.css" rel="stylesheet">
<link href="../bootstrap/css/custom.css" rel="stylesheet">
<link href="../bootstrap/addons/sb-admin.css" rel="stylesheet">
<link href="../bootstrap/addons/switch-master/bootstrap-switch.min.css" rel="stylesheet">
<link href="../bootstrap/addons/touchspin-master/jquery.bootstrap-touchspin.css" rel="stylesheet">
<link href="../bootstrap/addons/select/bootstrap-select.min.css" rel="stylesheet">
<link href="../bootstrap/addons/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">
<link href="../bootstrap/flag_icon/css/flag-icon.min.css" rel="stylesheet">
<script src="../jquerylib/jquery.js"></script>
<script src="../bootstrap/js/bootstrap.min.js"></script>
<script src="../bootstrap/js/highlight.js"></script>
<script src="../bootstrap/js/main.js"></script>
<script src="../bootstrap/addons/switch-master/bootstrap-switch.min.js"></script>
<script src="../bootstrap/addons/touchspin-master/jquery.bootstrap-touchspin.js"></script>
<script src="../bootstrap/addons/select/bootstrap-select.min.js"></script>
<script src="../bootstrap/addons/show-password/bootstrap-show-password.min.js"></script>
<script src="../bootstrap/addons/validator/validator.min.js"></script>
<link href="../libs/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<link href="../libs/bootstrap/css/custom.css" rel="stylesheet">
<link href="../libs/bootstrap/addons/sb-admin.css" rel="stylesheet">
<link href="../libs/bootstrap/addons/switch-master/bootstrap-switch.min.css" rel="stylesheet">
<link href="../libs/bootstrap/addons/touchspin-master/jquery.bootstrap-touchspin.min.css" rel="stylesheet">
<link href="../libs/bootstrap/addons/select/bootstrap-select.min.css" rel="stylesheet">
<link href="../libs/bootstrap/addons/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">
<link href="../libs/bootstrap/flag_icon/css/flag-icon.min.css" rel="stylesheet">
<script src="../libs/jquery/jquery.min.js"></script>
<script src="../libs/bootstrap/js/bootstrap.min.js"></script>
<script src="../libs/bootstrap/js/highlight.js"></script>
<script src="../libs/bootstrap/js/main.js"></script>
<script src="../libs/bootstrap/addons/switch-master/bootstrap-switch.min.js"></script>
<script src="../libs/bootstrap/addons/touchspin-master/jquery.bootstrap-touchspin.min.js"></script>
<script src="../libs/bootstrap/addons/select/bootstrap-select.min.js"></script>
<script src="../libs/bootstrap/addons/show-password/bootstrap-show-password.min.js"></script>
<script src="../libs/bootstrap/addons/validator/validator.min.js"></script>
<script>
$(function() {
$('.required-icon').tooltip({
@@ -88,11 +88,14 @@
<a href="?lang=de"><span class="flag-icon flag-icon-de"></span>&nbsp;&nbsp;DE - Deutsch</a>
</li>
<li>
<a href="?lang=en"><span class="flag-icon flag-icon-us"></span>&nbsp;&nbsp;EN - english</a>
<a href="?lang=en"><span class="flag-icon flag-icon-gb"></span>&nbsp;&nbsp;EN - english</a>
</li>
<li>
<a href="?lang=it"><span class="flag-icon flag-icon-it"></span>&nbsp;&nbsp;IT - italiano</a>
</li>
<li>
<a href="?lang=it"><span class="flag-icon flag-icon-nl"></span>&nbsp;&nbsp;NL - Nederlands</a>
</li>
<li>
<a href="?lang=ro"><span class="flag-icon flag-icon-ro"></span>&nbsp;&nbsp;RO - românesc</a>
</li>

View File

@@ -101,7 +101,8 @@ if (isset($_POST['update']) && $_SESSION['username'] == $webuser && $_SESSION['p
<div class="form-group">
<label class="col-sm-4 control-label" data-toggle="modal" data-target="#wilogdesc"><?php echo $lang['wilog']; ?><i class="help-hover glyphicon glyphicon-question-sign"></i></label>
<div class="col-sm-8 required-field-block">
<input type="text" class="form-control" name="logpath" value="<?php echo $logpath; ?>" required>
<input type="text" class="form-control" data-pattern=".*(\/|\\)$" data-error="The Logpath must end with / or \" name="logpath" value="<?php echo $logpath; ?>" required>
<div class="help-block with-errors"></div>
<div class="required-icon"><div class="text">*</div></div>
</div>
</div>
@@ -114,6 +115,7 @@ if (isset($_POST['update']) && $_SESSION['username'] == $webuser && $_SESSION['p
echo '<option data-subtext="Deutsch" value="de"'.($language === 'de' ? ' selected="selected"' : '').'>DE</option>';
echo '<option data-subtext="english" value="en"'.($language === 'en' ? ' selected="selected"' : '').'>EN</option>';
echo '<option data-subtext="italiano" value="it"'.($language === 'it' ? ' selected="selected"' : '').'>IT</option>';
echo '<option data-subtext="Nederlands" value="nl"'.($language === 'nl' ? ' selected="selected"' : '').'>NL</option>';
echo '<option data-subtext="românesc" value="ro"'.($language === 'ro' ? ' selected="selected"' : '').'>RO</option>';
echo '<option data-subtext="русский" value="ru"'.($language === 'ru' ? ' selected="selected"' : '').'>RU</option>';
?>
@@ -124,9 +126,10 @@ if (isset($_POST['update']) && $_SESSION['username'] == $webuser && $_SESSION['p
<div class="col-md-6">
<div class="form-group">
<label class="col-sm-4 control-label" data-toggle="modal" data-target="#wiadmuuiddesc"><?php echo $lang['wiadmuuid']; ?><i class="help-hover glyphicon glyphicon-question-sign"></i></label>
<div class="col-sm-8">
<input type="text" class="form-control" data-pattern="^([A-Za-z0-9\\\/\+]{27}=)$" data-error="Check the entered unique ID!" name="adminuuid" value="<?php echo $adminuuid; ?>">
<div class="col-sm-8 required-field-block">
<input type="text" class="form-control" data-pattern="^([A-Za-z0-9\\\/\+]{27}=)$" data-error="Check the entered unique ID!" name="adminuuid" value="<?php echo $adminuuid; ?>" required>
<div class="help-block with-errors"></div>
<div class="required-icon"><div class="text">*</div></div>
</div>
</div>
<div class="panel panel-default">
@@ -148,7 +151,7 @@ if (isset($_POST['update']) && $_SESSION['username'] == $webuser && $_SESSION['p
<script>
$("input[name='updateinfotime']").TouchSpin({
min: 0,
max: 9223372036854775807,
max: 86400,
verticalbuttons: true,
prefix: 'Sec.:'
});

View File

@@ -2,6 +2,7 @@
session_start();
require_once('../other/config.php');
require_once('../other/phpcommand.php');
function enter_logfile($logpath,$timezone,$loglevel,$logtext) {
$file = $logpath.'ranksystem.log';
@@ -29,11 +30,11 @@ function enter_logfile($logpath,$timezone,$loglevel,$logtext) {
if (substr(php_uname(), 0, 7) == "Windows") {
exec("del /F ".substr(__DIR__,0,-12).'logs/pid');
$WshShell = new COM("WScript.Shell");
$oExec = $WshShell->Run("cmd /C php ".substr(__DIR__,0,-12)."worker.php start", 0, false);
$oExec = $WshShell->Run("cmd /C ".$phpcommand." ".substr(__DIR__,0,-12)."worker.php start", 0, false);
exit;
} else {
exec("rm -f ".substr(__DIR__,0,-12).'logs/pid');
exec("php ".substr(__DIR__,0,-12)."worker.php start");
exec($phpcommand." ".substr(__DIR__,0,-12)."worker.php start");
exit;
}
}
@@ -71,7 +72,7 @@ if (($last_access[0]['last_access'] + 1) >= time()) {
$nowtime = time();
if($mysqlcon->exec("UPDATE $dbname.config SET last_access='$nowtime', count_access = count_access + 1") === false) { }
require_once(substr(__DIR__,0,-12).'ts3_lib/TeamSpeak3.php');
require_once(substr(__DIR__,0,-12).'libs/ts3_lib/TeamSpeak3.php');
try {
$ts3 = TeamSpeak3::factory("serverquery://".$ts['user'].":".$ts['pass']."@".$ts['host'].":".$ts['query']."/?server_port=".$ts['voice']."&blocking=0");