Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
Julian Merkle committed Jun 30, 2021
2 parents 9904916 + eafe218 commit e906f6e
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 23 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ System that automatically grants ranks in the form of server groups for online t

This is a modified fork of the TSN-Ranksystem which is updated irregularly to a stable version. It is intended to be **fully compatible to TSN-Ranksystem at all times**. The changeset on branch `develop` is always rebased onto TSN-Ranksystem and later on merged into `master`.

Please make sure that your TSN-Ranksystem (database) version is not above the (database) version of this fork (downgrade).
Please make sure that your TSN-Ranksystem (database) version is not above the (database) version of this fork (downgrade) or that the badge "Compatible to latest TSN-Ranksystem" above states "yes".

## Docker
You can find the docker images on docker hub as [jvmerkle/ts3-ranksystem](https://hub.docker.com/r/jvmerkle/ts3-ranksystem).
Expand Down
4 changes: 2 additions & 2 deletions docker-entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/sh
# Copyright (C) 2020 Julian Merkle <juli.merkle@gmail.com>
# Copyright (C) 2020-2021 Julian Merkle <juli.merkle@gmail.com>

# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -50,7 +50,7 @@ worker() {
cd "${RS_ROOT}"
while true; do
php worker.php check
sleep $(( 10 * 60 )) # Every 10 minutes
sleep $(( 5 * 60 )) # Every 5 minutes
done
}

Expand Down
49 changes: 30 additions & 19 deletions install.php
Original file line number Diff line number Diff line change
Expand Up @@ -415,12 +415,19 @@ function install($type, $host, $user, $pass, $dbname, $lang, $mysqlcon, &$err_ms
$dbuser = "";
$dbpass = "";

$attrReadonly = "";
if (getenv('DOCKER_ENV') === "1") {
$attrReadonly = "readonly";
}

if(isset($show_warning)) {
$dbtype = $_POST['dbtype'];
$dbhost = $_POST['dbhost'];
$dbname = $_POST['dbname'];
$dbuser = $_POST['dbuser'];
$dbpass = $_POST['dbpass'];
} elseif(isset($_GET["dbhost"]) && isset($_GET["dbname"]) && isset($_GET["dbuser"]) && isset($_GET["dbpass"])) {
$dbtype = $_GET['dbtype'];
$dbhost = $_GET["dbhost"];
$dbname = $_GET['dbname'];
$dbuser = $_GET['dbuser'];
Expand Down Expand Up @@ -459,33 +466,37 @@ function install($type, $host, $user, $pass, $dbname, $lang, $mysqlcon, &$err_ms
<div class="form-group">
<label class="col-sm-4 control-label" data-toggle="modal" data-target="#isntwidbtypedesc"><?php echo $lang['isntwidbtype']; ?><i class="help-hover fas fa-question-circle"></i></label>
<div class="col-sm-8">
<select class="selectpicker show-tick form-control required" id="basic" name="dbtype" value="<?php echo $dbtype; ?>" required>
<option disabled value=""> -- select database -- </option>
<option data-subtext="Cubrid" value="cubrid">cubrid</option>
<option data-subtext="FreeTDS / Microsoft SQL Server / Sybase" value="dblib">dblib</option>
<option data-subtext="Firebird/Interbase" value="firebird">firebird</option>
<option data-subtext="IBM DB2" value="ibm">ibm</option>
<option data-subtext="IBM Informix Dynamic Server" value="informix">informix</option>
<option data-subtext="MySQL [recommended]" value="mysql" selected>mysql (also mariadb)</option>
<option data-subtext="Oracle Call Interface" value="oci">oci</option>
<option data-subtext="ODBC v3 (IBM DB2, unixODBC und win32 ODBC)" value="odbc">odbc</option>
<option data-subtext="PostgreSQL" value="pgsql">pgsql</option>
<option data-subtext="SQLite 3 und SQLite 2" value="sqlite">sqlite</option>
<option data-subtext="Microsoft SQL Server / SQL Azure" value="sqlsrv">sqlsrv</option>
<option data-subtext="4D" value="4d">4d</option>
</select>
<?php if($attrReadonly === "readonly") { ?>
<input type="text" class="form-control required" name="dbtype" value="<?php echo $dbtype; ?>" readonly>
<?php } else { ?>
<select class="selectpicker show-tick form-control required" id="basic" name="dbtype" required>
<option disabled value=""> -- select database -- </option>
<option data-subtext="Cubrid" value="cubrid">cubrid</option>
<option data-subtext="FreeTDS / Microsoft SQL Server / Sybase" value="dblib">dblib</option>
<option data-subtext="Firebird/Interbase" value="firebird">firebird</option>
<option data-subtext="IBM DB2" value="ibm">ibm</option>
<option data-subtext="IBM Informix Dynamic Server" value="informix">informix</option>
<option data-subtext="MySQL [recommended]" value="mysql" selected>mysql (also mariadb)</option>
<option data-subtext="Oracle Call Interface" value="oci">oci</option>
<option data-subtext="ODBC v3 (IBM DB2, unixODBC und win32 ODBC)" value="odbc">odbc</option>
<option data-subtext="PostgreSQL" value="pgsql">pgsql</option>
<option data-subtext="SQLite 3 und SQLite 2" value="sqlite">sqlite</option>
<option data-subtext="Microsoft SQL Server / SQL Azure" value="sqlsrv">sqlsrv</option>
<option data-subtext="4D" value="4d">4d</option>
</select>
<?php } ?>
</div>
</div>
<div class="form-group">
<label class="col-sm-4 control-label" data-toggle="modal" data-target="#isntwidbhostdesc"><?php echo $lang['isntwidbhost']; ?><i class="help-hover fas fa-question-circle"></i></label>
<div class="col-sm-8 required-field-block">
<input type="text" class="form-control required" name="dbhost" placeholder="localhost" value="<?php echo $dbhost; ?>" required>
<input type="text" class="form-control required" name="dbhost" placeholder="localhost" value="<?php echo $dbhost; ?>" <?php echo $attrReadonly; ?> required>
</div>
</div>
<div class="form-group required-field-block">
<label class="col-sm-4 control-label" data-toggle="modal" data-target="#isntwidbnamedesc"><?php echo $lang['isntwidbname']; ?><i class="help-hover fas fa-question-circle"></i></label>
<div class="col-sm-8 required-field-block">
<input type="text" data-pattern="^([A-Za-z0-9$_]){1,64}$" data-error="Please do not use special characters or more then 64 characters inside the database name!" class="form-control required" name="dbname" placeholder="ts3_ranksystem" value="<?php echo $dbname; ?>" required>
<input type="text" data-pattern="^([A-Za-z0-9$_]){1,64}$" data-error="Please do not use special characters or more then 64 characters inside the database name!" class="form-control required" name="dbname" placeholder="ts3_ranksystem" value="<?php echo $dbname; ?>" <?php echo $attrReadonly; ?> required>
<div class="help-block with-errors"></div>
</div>
</div>
Expand All @@ -497,7 +508,7 @@ function install($type, $host, $user, $pass, $dbname, $lang, $mysqlcon, &$err_ms
<div class="form-group required-field-block">
<label class="col-sm-4 control-label" data-toggle="modal" data-target="#isntwidbusrdesc"><?php echo $lang['isntwidbusr']; ?><i class="help-hover fas fa-question-circle"></i></label>
<div class="col-sm-8 required-field-block">
<input type="text" placeholder="<?php echo $lang['user'] ?>" data-pattern="^[^&quot;'\\-\s]+$" data-error="Please do not use one of the following special characters: ' \ &quot; - also no whitespace and do not use more then 64 characters inside the database user!" class="form-control required" name="dbuser" value="<?php echo $dbuser; ?>" maxlength="64" required>
<input type="text" placeholder="<?php echo $lang['user'] ?>" data-pattern="^[^&quot;'\\-\s]+$" data-error="Please do not use one of the following special characters: ' \ &quot; - also no whitespace and do not use more then 64 characters inside the database user!" class="form-control required" name="dbuser" value="<?php echo $dbuser; ?>" maxlength="64" <?php echo $attrReadonly; ?> required>
<div class="help-block with-errors"></div>
</div>
</div>
Expand All @@ -507,7 +518,7 @@ function install($type, $host, $user, $pass, $dbname, $lang, $mysqlcon, &$err_ms
<div class="input-group">
<span id="toggle-password2" class="input-group-addon" onclick="togglepwd()" style="cursor: pointer; pointer-events: all;"><svg class="svg-inline--fa fa-eye fa-w-18" aria-hidden="true" focusable="false" data-prefix="fas" data-icon="eye" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512" data-fa-i2svg=""><path fill="currentColor" d="M572.52 241.4C518.29 135.59 410.93 64 288 64S57.68 135.64 3.48 241.41a32.35 32.35 0 0 0 0 29.19C57.71 376.41 165.07 448 288 448s230.32-71.64 284.52-177.41a32.35 32.35 0 0 0 0-29.19zM288 400a144 144 0 1 1 144-144 143.93 143.93 0 0 1-144 144zm0-240a95.31 95.31 0 0 0-25.31 3.79 47.85 47.85 0 0 1-66.9 66.9A95.78 95.78 0 1 0 288 160z"></path></svg></span>
<span id="toggle-password1" class="input-group-addon" onclick="togglepwd()" style="cursor: pointer; pointer-events: all; display: none;"><svg class="svg-inline--fa fa-eye fa-w-18" aria-hidden="true" focusable="false" data-prefix="fas" data-icon="eye" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512" data-fa-i2svg=""><path fill="currentColor" d="M320 400c-75.85 0-137.25-58.71-142.9-133.11L72.2 185.82c-13.79 17.3-26.48 35.59-36.72 55.59a32.35 32.35 0 0 0 0 29.19C89.71 376.41 197.07 448 320 448c26.91 0 52.87-4 77.89-10.46L346 397.39a144.13 144.13 0 0 1-26 2.61zm313.82 58.1l-110.55-85.44a331.25 331.25 0 0 0 81.25-102.07 32.35 32.35 0 0 0 0-29.19C550.29 135.59 442.93 64 320 64a308.15 308.15 0 0 0-147.32 37.7L45.46 3.37A16 16 0 0 0 23 6.18L3.37 31.45A16 16 0 0 0 6.18 53.9l588.36 454.73a16 16 0 0 0 22.46-2.81l19.64-25.27a16 16 0 0 0-2.82-22.45zm-183.72-142l-39.3-30.38A94.75 94.75 0 0 0 416 256a94.76 94.76 0 0 0-121.31-92.21A47.65 47.65 0 0 1 304 192a46.64 46.64 0 0 1-1.54 10l-73.61-56.89A142.31 142.31 0 0 1 320 112a143.92 143.92 0 0 1 144 144c0 21.63-5.29 41.79-13.9 60.11z"></path></svg></span>
<input id="password" placeholder="<?php echo $lang['pass'] ?>" type="password" data-pattern="^[^&quot;'\\-\s]+$" data-error="Please do not use one of the following special characters: ' \ &quot; - also no whitespace and do not use more then 64 characters inside the database password!" class="form-control required" name="dbpass" value="<?php echo $dbpass; ?>" data-toggle="password" data-placement="before" maxlength="64" required>
<input id="password" placeholder="<?php echo $lang['pass'] ?>" type="password" data-pattern="^[^&quot;'\\-\s]+$" data-error="Please do not use one of the following special characters: ' \ &quot; - also no whitespace and do not use more then 64 characters inside the database password!" class="form-control required" name="dbpass" value="<?php echo $dbpass; ?>" data-toggle="password" data-placement="before" maxlength="64" <?php echo $attrReadonly; ?> required>
</div>
<div class="help-block with-errors"></div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion stats/info.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<div class="col-lg-12">
<h4><strong><span class="text-success"><?PHP echo $lang['stri0004']; ?></span></strong></h4>
<p>The <a href="https://github.com/Newcomer1989/TSN-Ranksystem" target="_blank" rel="noopener noreferrer">TSN-Ranksystem</a> was coded by Newcomer1989 Copyright &copy; 2009-2020 powered by TS-N.NET</p>
<p>This is a patch set from <a href="https://github.com/JVMerkle/TS3-Ranksystem" target="_blank" rel="noopener noreferrer">github.com/JVMerkle/TS3-Ranksystem</a>, Copyright &copy; 2021 JVMerkle and TS3-Ranksystem contributors</p>
<p>This is a patch set from <a href="https://github.com/JVMerkle/TS3-Ranksystem" target="_blank" rel="noopener noreferrer">github.com/JVMerkle/TS3-Ranksystem</a>, Copyright &copy; 2021 TS3-Ranksystem contributors</p>
<br>
</div>
</div>
Expand Down

0 comments on commit e906f6e

Please sign in to comment.