@@ -18,23 +18,23 @@ discard block |
||
| 18 | 18 | <div class="task-content"> |
| 19 | 19 | <ul id="sortable" class="task-list ui-sortable"> |
| 20 | 20 | <?php |
| 21 | - $sql = "SELECT `sid`,`dbid`,`type`,`name` FROM `servers`;"; |
|
| 22 | - $result_of_query = $db_connection->query($sql); |
|
| 21 | + $sql = "SELECT `sid`,`dbid`,`type`,`name` FROM `servers`;"; |
|
| 22 | + $result_of_query = $db_connection->query($sql); |
|
| 23 | 23 | |
| 24 | - if ($result_of_query->num_rows >= 1) { |
|
| 25 | - while ($row = mysqli_fetch_assoc($result_of_query)) { |
|
| 26 | - ?> |
|
| 24 | + if ($result_of_query->num_rows >= 1) { |
|
| 25 | + while ($row = mysqli_fetch_assoc($result_of_query)) { |
|
| 26 | + ?> |
|
| 27 | 27 | <li class="list-primary"> |
| 28 | 28 | <i class=" fa fa-ellipsis-v"></i> |
| 29 | 29 | <div class="task-title"> |
| 30 | 30 | <span class="task-title-sp"><?php echo $row['name']; ?></span> |
| 31 | 31 | <?php |
| 32 | - if ($row['type'] == 'life'){ |
|
| 33 | - echo '<span class="badge bg-theme">Life</span>'; |
|
| 34 | - } elseif ($row['type'] == 'waste') { |
|
| 35 | - echo '<span class="badge bg-important">Wasteland</span>'; |
|
| 36 | - } |
|
| 37 | - ?> |
|
| 32 | + if ($row['type'] == 'life'){ |
|
| 33 | + echo '<span class="badge bg-theme">Life</span>'; |
|
| 34 | + } elseif ($row['type'] == 'waste') { |
|
| 35 | + echo '<span class="badge bg-important">Wasteland</span>'; |
|
| 36 | + } |
|
| 37 | + ?> |
|
| 38 | 38 | <div style="float:right; padding-right: 15px;"> |
| 39 | 39 | <form method="post" action="<?php echo $settings['url'] ?>dashboard"> |
| 40 | 40 | <input type="hidden" name="type" value="<?php echo $row['type']; ?>"> |
@@ -45,10 +45,10 @@ discard block |
||
| 45 | 45 | </div> |
| 46 | 46 | </li> |
| 47 | 47 | <?php |
| 48 | - } |
|
| 49 | - echo '</select>'; |
|
| 50 | - } |
|
| 51 | - ?> |
|
| 48 | + } |
|
| 49 | + echo '</select>'; |
|
| 50 | + } |
|
| 51 | + ?> |
|
| 52 | 52 | </ul> |
| 53 | 53 | </div> |
| 54 | 54 | </div> |
@@ -87,7 +87,7 @@ |
||
| 87 | 87 | if (!$db_connection->connect_errno) { |
| 88 | 88 | if ($login->isUserLoggedIn() == true) { |
| 89 | 89 | |
| 90 | - if ($_SESSION['multiDB'] && isset($_POST['dbid']) && isset($_POST['type'])) { |
|
| 90 | + if ($_SESSION['multiDB'] && isset($_POST['dbid']) && isset($_POST['type'])) { |
|
| 91 | 91 | $_SESSION['server_type'] = $_POST['type']; |
| 92 | 92 | $_SESSION['dbid'] = $_POST['dbid']; |
| 93 | 93 | } |
@@ -1,9 +1,9 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | require_once("gfunctions.php"); |
| 3 | 3 | /** |
| 4 | - * Class registration |
|
| 5 | - * handles the user registration |
|
| 6 | - */ |
|
| 4 | + * Class registration |
|
| 5 | + * handles the user registration |
|
| 6 | + */ |
|
| 7 | 7 | class Registration |
| 8 | 8 | { |
| 9 | 9 | /** |
@@ -1,11 +1,11 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * A Compatibility library with PHP 5.5's simplified password hashing API. |
|
| 4 | - * |
|
| 5 | - * @author Anthony Ferrara <[email protected]> |
|
| 6 | - * @license http://www.opensource.org/licenses/mit-license.html MIT License |
|
| 7 | - * @copyright 2012 The Authors |
|
| 8 | - */ |
|
| 3 | + * A Compatibility library with PHP 5.5's simplified password hashing API. |
|
| 4 | + * |
|
| 5 | + * @author Anthony Ferrara <[email protected]> |
|
| 6 | + * @license http://www.opensource.org/licenses/mit-license.html MIT License |
|
| 7 | + * @copyright 2012 The Authors |
|
| 8 | + */ |
|
| 9 | 9 | |
| 10 | 10 | if (!defined('PASSWORD_DEFAULT')) { |
| 11 | 11 | |
@@ -1,9 +1,9 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | require_once("gfunctions.php"); |
| 3 | 3 | /** |
| 4 | - * Class login |
|
| 5 | - * handles the user's login and logout process |
|
| 6 | - */ |
|
| 4 | + * Class login |
|
| 5 | + * handles the user's login and logout process |
|
| 6 | + */ |
|
| 7 | 7 | class Login |
| 8 | 8 | { |
| 9 | 9 | /** |
@@ -1,52 +1,52 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * This class provides a simple interface for OpenID (1.1 and 2.0) authentication. |
|
| 4 | - * Supports Yadis discovery. |
|
| 5 | - * The authentication process is stateless/dumb. |
|
| 6 | - * |
|
| 7 | - * Usage: |
|
| 8 | - * Sign-on with OpenID is a two step process: |
|
| 9 | - * Step one is authentication with the provider: |
|
| 10 | - * <code> |
|
| 11 | - * $openid = new LightOpenID('my-host.example.org'); |
|
| 12 | - * $openid->identity = 'ID supplied by user'; |
|
| 13 | - * header('Location: ' . $openid->authUrl()); |
|
| 14 | - * </code> |
|
| 15 | - * The provider then sends various parameters via GET, one of them is openid_mode. |
|
| 16 | - * Step two is verification: |
|
| 17 | - * <code> |
|
| 18 | - * $openid = new LightOpenID('my-host.example.org'); |
|
| 19 | - * if ($openid->mode) { |
|
| 20 | - * echo $openid->validate() ? 'Logged in.' : 'Failed'; |
|
| 21 | - * } |
|
| 22 | - * </code> |
|
| 23 | - * |
|
| 24 | - * Change the 'my-host.example.org' to your domain name. Do NOT use $_SERVER['HTTP_HOST'] |
|
| 25 | - * for that, unless you know what you are doing. |
|
| 26 | - * |
|
| 27 | - * Optionally, you can set $returnUrl and $realm (or $trustRoot, which is an alias). |
|
| 28 | - * The default values for those are: |
|
| 29 | - * $openid->realm = (!empty($_SERVER['HTTPS']) ? 'https' : 'http') . '://' . $_SERVER['HTTP_HOST']; |
|
| 30 | - * $openid->returnUrl = $openid->realm . $_SERVER['REQUEST_URI']; |
|
| 31 | - * If you don't know their meaning, refer to any openid tutorial, or specification. Or just guess. |
|
| 32 | - * |
|
| 33 | - * AX and SREG extensions are supported. |
|
| 34 | - * To use them, specify $openid->required and/or $openid->optional before calling $openid->authUrl(). |
|
| 35 | - * These are arrays, with values being AX schema paths (the 'path' part of the URL). |
|
| 36 | - * For example: |
|
| 37 | - * $openid->required = array('namePerson/friendly', 'contact/email'); |
|
| 38 | - * $openid->optional = array('namePerson/first'); |
|
| 39 | - * If the server supports only SREG or OpenID 1.1, these are automaticaly |
|
| 40 | - * mapped to SREG names, so that user doesn't have to know anything about the server. |
|
| 41 | - * |
|
| 42 | - * To get the values, use $openid->getAttributes(). |
|
| 43 | - * |
|
| 44 | - * |
|
| 45 | - * The library requires PHP >= 5.1.2 with curl or http/https stream wrappers enabled. |
|
| 46 | - * @author Mewp |
|
| 47 | - * @copyright Copyright (c) 2010, Mewp |
|
| 48 | - * @license http://www.opensource.org/licenses/mit-license.php MIT |
|
| 49 | - */ |
|
| 3 | + * This class provides a simple interface for OpenID (1.1 and 2.0) authentication. |
|
| 4 | + * Supports Yadis discovery. |
|
| 5 | + * The authentication process is stateless/dumb. |
|
| 6 | + * |
|
| 7 | + * Usage: |
|
| 8 | + * Sign-on with OpenID is a two step process: |
|
| 9 | + * Step one is authentication with the provider: |
|
| 10 | + * <code> |
|
| 11 | + * $openid = new LightOpenID('my-host.example.org'); |
|
| 12 | + * $openid->identity = 'ID supplied by user'; |
|
| 13 | + * header('Location: ' . $openid->authUrl()); |
|
| 14 | + * </code> |
|
| 15 | + * The provider then sends various parameters via GET, one of them is openid_mode. |
|
| 16 | + * Step two is verification: |
|
| 17 | + * <code> |
|
| 18 | + * $openid = new LightOpenID('my-host.example.org'); |
|
| 19 | + * if ($openid->mode) { |
|
| 20 | + * echo $openid->validate() ? 'Logged in.' : 'Failed'; |
|
| 21 | + * } |
|
| 22 | + * </code> |
|
| 23 | + * |
|
| 24 | + * Change the 'my-host.example.org' to your domain name. Do NOT use $_SERVER['HTTP_HOST'] |
|
| 25 | + * for that, unless you know what you are doing. |
|
| 26 | + * |
|
| 27 | + * Optionally, you can set $returnUrl and $realm (or $trustRoot, which is an alias). |
|
| 28 | + * The default values for those are: |
|
| 29 | + * $openid->realm = (!empty($_SERVER['HTTPS']) ? 'https' : 'http') . '://' . $_SERVER['HTTP_HOST']; |
|
| 30 | + * $openid->returnUrl = $openid->realm . $_SERVER['REQUEST_URI']; |
|
| 31 | + * If you don't know their meaning, refer to any openid tutorial, or specification. Or just guess. |
|
| 32 | + * |
|
| 33 | + * AX and SREG extensions are supported. |
|
| 34 | + * To use them, specify $openid->required and/or $openid->optional before calling $openid->authUrl(). |
|
| 35 | + * These are arrays, with values being AX schema paths (the 'path' part of the URL). |
|
| 36 | + * For example: |
|
| 37 | + * $openid->required = array('namePerson/friendly', 'contact/email'); |
|
| 38 | + * $openid->optional = array('namePerson/first'); |
|
| 39 | + * If the server supports only SREG or OpenID 1.1, these are automaticaly |
|
| 40 | + * mapped to SREG names, so that user doesn't have to know anything about the server. |
|
| 41 | + * |
|
| 42 | + * To get the values, use $openid->getAttributes(). |
|
| 43 | + * |
|
| 44 | + * |
|
| 45 | + * The library requires PHP >= 5.1.2 with curl or http/https stream wrappers enabled. |
|
| 46 | + * @author Mewp |
|
| 47 | + * @copyright Copyright (c) 2010, Mewp |
|
| 48 | + * @license http://www.opensource.org/licenses/mit-license.php MIT |
|
| 49 | + */ |
|
| 50 | 50 | class LightOpenID |
| 51 | 51 | { |
| 52 | 52 | public $returnUrl |
@@ -1,12 +1,12 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * PHP Class for handling Google Authenticator 2-factor authentication |
|
| 4 | - * |
|
| 5 | - * @author Michael Kliewe |
|
| 6 | - * @copyright 2012 Michael Kliewe |
|
| 7 | - * @license http://www.opensource.org/licenses/bsd-license.php BSD License |
|
| 8 | - * @link http://www.phpgangsta.de/ |
|
| 9 | - */ |
|
| 3 | + * PHP Class for handling Google Authenticator 2-factor authentication |
|
| 4 | + * |
|
| 5 | + * @author Michael Kliewe |
|
| 6 | + * @copyright 2012 Michael Kliewe |
|
| 7 | + * @license http://www.opensource.org/licenses/bsd-license.php BSD License |
|
| 8 | + * @link http://www.phpgangsta.de/ |
|
| 9 | + */ |
|
| 10 | 10 | |
| 11 | 11 | class PHPGangsta_GoogleAuthenticator |
| 12 | 12 | { |
@@ -5,7 +5,7 @@ discard block |
||
| 5 | 5 | if ($result_of_query->num_rows > 0) { |
| 6 | 6 | $user = $result_of_query->fetch_object(); |
| 7 | 7 | |
| 8 | - if($_SESSION['user_level'] >= $user->user_level) { |
|
| 8 | + if($_SESSION['user_level'] >= $user->user_level) { |
|
| 9 | 9 | |
| 10 | 10 | if (isset($_POST["staffName"])) { |
| 11 | 11 | if (formtoken::validateToken($_POST)) { |
@@ -14,18 +14,18 @@ discard block |
||
| 14 | 14 | $staffPID = $_POST['staffPID']; |
| 15 | 15 | $permissions = include 'config/permissions.php'; |
| 16 | 16 | if (isset($_POST['ban'])) { |
| 17 | - if ($user->user_level == 5 && $_SESSION['user_level'] < 5) { $staffRank = 5; } else { $staffRank = 0; } |
|
| 18 | - } else { |
|
| 19 | - if ($_POST['staffRank'] > $_SESSION['user_level'] || $user->user_level > $_SESSION['user_level']) { $staffRank = $user->user_level; } else { $staffRank = $_POST['staffRank']; } |
|
| 20 | - } |
|
| 21 | - $userPerms = json_encode($permissions[$staffRank]); |
|
| 17 | + if ($user->user_level == 5 && $_SESSION['user_level'] < 5) { $staffRank = 5; } else { $staffRank = 0; } |
|
| 18 | + } else { |
|
| 19 | + if ($_POST['staffRank'] > $_SESSION['user_level'] || $user->user_level > $_SESSION['user_level']) { $staffRank = $user->user_level; } else { $staffRank = $_POST['staffRank']; } |
|
| 20 | + } |
|
| 21 | + $userPerms = json_encode($permissions[$staffRank]); |
|
| 22 | 22 | |
| 23 | 23 | $sql = "UPDATE `users` SET `user_name`='" . $staffName . "',`user_email`='" . $staffEmail . "',`playerid`='" . $staffPID . "',`user_level`='" . $staffRank . "', `permissions`='" . $userPerms . "' WHERE `user_id` ='" . $uId . "';"; |
| 24 | 24 | $result_of_query = $db_connection->query($sql); |
| 25 | - if ($user->user_level != $_POST['staffRank']) logAction($_SESSION['user_name'], $lang['edited'] . " " . $_POST['staffName'] . "\'s " . $lang['staff'] . " " . $lang['rank'] . " " . $lang['from'] . " (" . $settings['ranks'][$user->user_level] . ") " . $lang['to'] . " (" . $settings['ranks'][$_POST['staffRank']] . ")", 2); |
|
| 26 | - if ($user->user_name != $_POST['staffName']) logAction($_SESSION['user_name'], $lang['edited'] . " " . $user->user_name . "\'s " . strtolower($lang['name']) . " " . $lang['to'] . " " . $_POST['staffName'] . "", 2); |
|
| 27 | - if ($user->playerid != $_POST['staffPID']) logAction($_SESSION['user_name'], $lang['edited'] . " " . $_POST['staffName'] . "\'s " . $lang['player'] . " " . $lang['id'] . " " . $lang['from'] . " (" . $user->playerid . ") " . $lang['to'] . " (" . $_POST['staffPID'] . ")", 2); |
|
| 28 | - if ($user->user_email != $_POST['staffEmail']) logAction($_SESSION['user_name'], $lang['edited'] . " " . $user->user_name . "\'s " . strtolower($lang['email']) . " " . $lang['from'] . " (" . $user->user_email . ") " . $lang['to'] . " (" . $_POST['staffEmail'] . ")", 2); |
|
| 25 | + if ($user->user_level != $_POST['staffRank']) logAction($_SESSION['user_name'], $lang['edited'] . " " . $_POST['staffName'] . "\'s " . $lang['staff'] . " " . $lang['rank'] . " " . $lang['from'] . " (" . $settings['ranks'][$user->user_level] . ") " . $lang['to'] . " (" . $settings['ranks'][$_POST['staffRank']] . ")", 2); |
|
| 26 | + if ($user->user_name != $_POST['staffName']) logAction($_SESSION['user_name'], $lang['edited'] . " " . $user->user_name . "\'s " . strtolower($lang['name']) . " " . $lang['to'] . " " . $_POST['staffName'] . "", 2); |
|
| 27 | + if ($user->playerid != $_POST['staffPID']) logAction($_SESSION['user_name'], $lang['edited'] . " " . $_POST['staffName'] . "\'s " . $lang['player'] . " " . $lang['id'] . " " . $lang['from'] . " (" . $user->playerid . ") " . $lang['to'] . " (" . $_POST['staffPID'] . ")", 2); |
|
| 28 | + if ($user->user_email != $_POST['staffEmail']) logAction($_SESSION['user_name'], $lang['edited'] . " " . $user->user_name . "\'s " . strtolower($lang['email']) . " " . $lang['from'] . " (" . $user->user_email . ") " . $lang['to'] . " (" . $_POST['staffEmail'] . ")", 2); |
|
| 29 | 29 | |
| 30 | 30 | message(ucfirst($_POST['staffName']) . ' ' . $lang['updated']); |
| 31 | 31 | } else message($lang['expired']); |
@@ -104,12 +104,12 @@ discard block |
||
| 104 | 104 | echo "<center>"; |
| 105 | 105 | echo "<h4>" . $lang['name'] . ": <input id='staffName' class='form-control' name='staffName' type='text' value='" . $user->user_name . "'></h4>"; |
| 106 | 106 | echo "<h4>" . $lang['emailAdd'] . ": <input id='staffEmail' class='form-control' name='staffEmail' type='text' value='" . $user->user_email . "'></h4>"; |
| 107 | - echo "<h4>" . $lang['rank'] . ": "; |
|
| 108 | - echo "<select id='staffRank' class='form-control' name='staffRank'>"; |
|
| 107 | + echo "<h4>" . $lang['rank'] . ": "; |
|
| 108 | + echo "<select id='staffRank' class='form-control' name='staffRank'>"; |
|
| 109 | 109 | |
| 110 | - for ($lvl = 0; $lvl <= $_SESSION['user_level']; $lvl++) { |
|
| 111 | - echo '<option value="' . $lvl . '"' . select($lvl, $user->user_level) . '>' . $settings['ranks'][$lvl] . '</option>'; |
|
| 112 | - } |
|
| 110 | + for ($lvl = 0; $lvl <= $_SESSION['user_level']; $lvl++) { |
|
| 111 | + echo '<option value="' . $lvl . '"' . select($lvl, $user->user_level) . '>' . $settings['ranks'][$lvl] . '</option>'; |
|
| 112 | + } |
|
| 113 | 113 | |
| 114 | 114 | echo "</select></h4>"; |
| 115 | 115 | echo "<h4>" . $lang['playerID'] . ": <input id='staffPID' class='form-control' name='staffPID' type='text' value='" . $user->playerid . "'></h4>"; |
@@ -1104,7 +1104,7 @@ discard block |
||
| 1104 | 1104 | <?php } ?> |
| 1105 | 1105 | <?php |
| 1106 | 1106 | } else { |
| 1107 | - echo '<h3>' . errorMessage(5, $lang) . '</h3>'; |
|
| 1107 | + echo '<h3>' . errorMessage(5, $lang) . '</h3>'; |
|
| 1108 | 1108 | } |
| 1109 | 1109 | |
| 1110 | 1110 | } else { |
@@ -63,8 +63,8 @@ |
||
| 63 | 63 | echo "<td><a class='btn btn-primary btn-xs' href='" . $settings['url'] . "editStaff/" . $row["user_id"] . "'>"; |
| 64 | 64 | echo "<i class='fa fa-pencil'></i></a></td>"; |
| 65 | 65 | } else { |
| 66 | - echo "<td></td>"; |
|
| 67 | - } |
|
| 66 | + echo "<td></td>"; |
|
| 67 | + } |
|
| 68 | 68 | echo "</tr>"; |
| 69 | 69 | }; |
| 70 | 70 | echo "</tbody></table>"; |