@@ -70,7 +70,9 @@ discard block |
||
70 | 70 | <?php |
71 | 71 | foreach ($settings['installedLanguage'] as $language) { |
72 | 72 | echo '<option value = "' . $language[1] . '" '; |
73 | - if ($settings['language'] == $language[1]) echo 'selected'; |
|
73 | + if ($settings['language'] == $language[1]) { |
|
74 | + echo 'selected'; |
|
75 | + } |
|
74 | 76 | echo '> ' . $language[0] . '</option>'; |
75 | 77 | } ?> |
76 | 78 | </select></div> |
@@ -196,7 +198,9 @@ discard block |
||
196 | 198 | <span class='input-group-btn'><button style='margin-top: 21px;' class='btn btn-default reveal' type='button'><i class='fa fa-eye-slash'></i></button></span></div> |
197 | 199 | |
198 | 200 | <?php |
199 | - if (!isset($pluginSettings)) echo '<h3>' . $lang['plugin'] . ' ' . $lang['settings'] . '</h3>'; |
|
201 | + if (!isset($pluginSettings)) { |
|
202 | + echo '<h3>' . $lang['plugin'] . ' ' . $lang['settings'] . '</h3>'; |
|
203 | + } |
|
200 | 204 | foreach ($settings['plugins'] as &$plugin) { |
201 | 205 | if (file_exists("plugins/" . $plugin . "/settings.php")) { |
202 | 206 | include("plugins/" . $plugin . "/settings.php"); |
@@ -13,11 +13,11 @@ |
||
13 | 13 | $settings['allowLang'] = filter_var($_POST['allowLang'], FILTER_VALIDATE_BOOLEAN); |
14 | 14 | $settings['wanted'] = filter_var($_POST['wanted'], FILTER_VALIDATE_BOOLEAN); |
15 | 15 | $settings['news'] = filter_var($_POST['news'], FILTER_VALIDATE_BOOLEAN); |
16 | - $settings['register'] = filter_var($_POST['register'], FILTER_VALIDATE_BOOLEAN); |
|
17 | - $settings['steamlogin'] = filter_var($_POST['steamlogin'], FILTER_VALIDATE_BOOLEAN); |
|
16 | + $settings['register'] = filter_var($_POST['register'], FILTER_VALIDATE_BOOLEAN); |
|
17 | + $settings['steamlogin'] = filter_var($_POST['steamlogin'], FILTER_VALIDATE_BOOLEAN); |
|
18 | 18 | $settings['vacTest'] = filter_var($_POST['vacTest'], FILTER_VALIDATE_BOOLEAN); |
19 | - $settings['performance'] = filter_var($_POST['performance'], FILTER_VALIDATE_BOOLEAN); |
|
20 | - $settings['notifications'] = filter_var($_POST['notifications'], FILTER_VALIDATE_BOOLEAN); |
|
19 | + $settings['performance'] = filter_var($_POST['performance'], FILTER_VALIDATE_BOOLEAN); |
|
20 | + $settings['notifications'] = filter_var($_POST['notifications'], FILTER_VALIDATE_BOOLEAN); |
|
21 | 21 | |
22 | 22 | $settings['2factor'] = false; |
23 | 23 | $settings['gravatar'] = false; |
@@ -32,7 +32,9 @@ discard block |
||
32 | 32 | setcookie('token', '', time() - 3600, '/'); |
33 | 33 | message($lang['2factorDeviceRevoke']); |
34 | 34 | } elseif (isset($_GET['revokeToken']) && $_SESSION['2factor'] == 2) { |
35 | - if (isset($_COOKIE['token'])) unset($_COOKIE['token']); |
|
35 | + if (isset($_COOKIE['token'])) { |
|
36 | + unset($_COOKIE['token']); |
|
37 | + } |
|
36 | 38 | $sql = "UPDATE `users` SET `token`='NULL' WHERE `user_id` = '" . $_SESSION['user_id'] . "';"; |
37 | 39 | $db_connection->query($sql); |
38 | 40 | message($lang['2factorTokenRevoke']); |
@@ -42,8 +44,10 @@ discard block |
||
42 | 44 | $db_connection->query($sql); |
43 | 45 | $_SESSION['2factor'] = 2; |
44 | 46 | message($lang['2factor1']); |
45 | - } else message($lang['2factor2']); |
|
46 | -} ?> |
|
47 | + } else { |
|
48 | + message($lang['2factor2']); |
|
49 | + } |
|
50 | + } ?> |
|
47 | 51 | <div class="row"> |
48 | 52 | <div class="col-lg-8"> |
49 | 53 | <h1 class="page-header"> |
@@ -53,7 +57,9 @@ discard block |
||
53 | 57 | </div> |
54 | 58 | <?php |
55 | 59 | if ($_SESSION['2factor'] == 1 || $_SESSION['2factor'] == 5 || $_SESSION['2factor'] == 3) { |
56 | - if ($_SESSION['2factor'] == 3) message($lang['2factorError2']); |
|
60 | + if ($_SESSION['2factor'] == 3) { |
|
61 | + message($lang['2factorError2']); |
|
62 | + } |
|
57 | 63 | echo '<form method="post" action="' . $currentPage . '" class="form-inline"> |
58 | 64 | <label for="code">'.$lang['2factorSetup3'] . '<div class="form-group"></label><input class="form-control" id="code" type="text" name="code"></div> |
59 | 65 | <button type="submit" class="btn btn-default">Verify</button></form>'; |
@@ -61,12 +67,21 @@ discard block |
||
61 | 67 | echo $lang['2factor1'] . '<br><br><a href="?backup" class="btn btn-default">'; |
62 | 68 | $sql = "SELECT `backup`,`token` FROM `users` WHERE `user_id` = '" . $_SESSION['user_id'] . "';"; |
63 | 69 | $twoFactor = $db_connection->query($sql)->fetch_object(); |
64 | - if (isset($twoFactor->backup)) echo $lang['new'] . ' ' . $lang['2factor3']; else echo $lang['2factor3']; |
|
70 | + if (isset($twoFactor->backup)) { |
|
71 | + echo $lang['new'] . ' ' . $lang['2factor3']; |
|
72 | + } else { |
|
73 | + echo $lang['2factor3']; |
|
74 | + } |
|
65 | 75 | echo '</a>'; |
66 | 76 | echo '<a href="?revoke" style="margin-left: 5px;" class="btn btn-danger">' . $lang['2factor4'] . '</a>'; |
67 | - if (isset($twoFactor->token)) echo '<a href="?revokeToken" style="margin-left: 5px;" class="btn btn-danger">' . $lang['2factorTokenRevoke'] . '</a>'; |
|
68 | - if (isset($_COOKIE['token'])) echo '<a href="?revokeDevice" style="margin-left: 5px;" class="btn btn-danger">' . $lang['2factorRevokeRememberDevice']; |
|
69 | - else echo '<a href="?remember" style="margin-left: 5px;" class="btn btn-primary">' . $lang['2factorRememberDevice']; |
|
77 | + if (isset($twoFactor->token)) { |
|
78 | + echo '<a href="?revokeToken" style="margin-left: 5px;" class="btn btn-danger">' . $lang['2factorTokenRevoke'] . '</a>'; |
|
79 | + } |
|
80 | + if (isset($_COOKIE['token'])) { |
|
81 | + echo '<a href="?revokeDevice" style="margin-left: 5px;" class="btn btn-danger">' . $lang['2factorRevokeRememberDevice']; |
|
82 | + } else { |
|
83 | + echo '<a href="?remember" style="margin-left: 5px;" class="btn btn-primary">' . $lang['2factorRememberDevice']; |
|
84 | + } |
|
70 | 85 | echo '</a>'; |
71 | 86 | |
72 | 87 | } elseif ($_SESSION['2factor'] == 0 || $_SESSION['2factor'] == 5) { |
@@ -76,8 +91,11 @@ discard block |
||
76 | 91 | echo "<i class='fa fa-info-circle'></i> " . $lang['2factorForce'] . "</div></div>"; |
77 | 92 | } |
78 | 93 | $secret = $gauth->createSecret(); |
79 | - if (isset($settings['communityName'])) $name = urlencode(str_replace(' ', '', $settings['communityName']) . "CyberWorks"); |
|
80 | - else $name = 'CyberWorks'; |
|
94 | + if (isset($settings['communityName'])) { |
|
95 | + $name = urlencode(str_replace(' ', '', $settings['communityName']) . "CyberWorks"); |
|
96 | + } else { |
|
97 | + $name = 'CyberWorks'; |
|
98 | + } |
|
81 | 99 | echo '<div class="col-md-6">' . $lang['2factorSetup1'] . '<br>' . $lang['2factorSetup2'] . ' <b>' . $secret . '</b><br><form method="post" action="2factor" class="form-inline"> |
82 | 100 | <label for="testCode">'.$lang['2factorSetup3'] . '<div class="form-group"></label><input style="margin-left: 5px;" class="form-control" id="testCode" type="text" name="testCode"></div> |
83 | 101 | <input type="hidden" id="secret" name="secret" value="'.$secret . '"><button type="submit" class="btn btn-default">Verify</button> |
@@ -22,7 +22,10 @@ discard block |
||
22 | 22 | <p><?php echo $lang['username'] ?>:</p> |
23 | 23 | <input id="user_name" type="text" class="form-control" |
24 | 24 | placeholder="<?php echo $lang['username'] ?>" autofocus |
25 | - name="user_name" <?php if (isset($_POST['user_name'])) echo 'value="' . $_POST['user_name'] . '"'; ?> required> |
|
25 | + name="user_name" <?php if (isset($_POST['user_name'])) { |
|
26 | + echo 'value="' . $_POST['user_name'] . '"'; |
|
27 | +} |
|
28 | +?> required> |
|
26 | 29 | </div> |
27 | 30 | <div class="form-group"> |
28 | 31 | <p><?php echo $lang['player'] . " " . $lang['id'] ?>:</p> |
@@ -32,7 +35,10 @@ discard block |
||
32 | 35 | <div class="form-group"> |
33 | 36 | <p><?php echo $lang['emailAdd'] ?>:</p> |
34 | 37 | <input id="user_email" placeholder="<?php echo $lang['emailAdd'] ?>" class=" form-control" type="email" |
35 | - name="user_email" <?php if (isset($_POST['user_name'])) echo 'value="' . $_POST['user_name'] . '"'; ?> required/> |
|
38 | + name="user_email" <?php if (isset($_POST['user_name'])) { |
|
39 | + echo 'value="' . $_POST['user_name'] . '"'; |
|
40 | +} |
|
41 | +?> required/> |
|
36 | 42 | </div> |
37 | 43 | <div class="form-group"> |
38 | 44 | <p><?php echo $lang['password'] ?>:</p> |
@@ -52,7 +58,9 @@ discard block |
||
52 | 58 | <select class="form-control" name="user_lvl"> |
53 | 59 | <?php for ($rank = 1; $rank <= $settings['staffRanks']; $rank++) { |
54 | 60 | echo '<option value="' . $rank . '"'; |
55 | - if (isset($_POST['user_lvl'])) if ($rank == $_POST['user_lvl']) echo 'selected'; |
|
61 | + if (isset($_POST['user_lvl'])) { |
|
62 | + if ($rank == $_POST['user_lvl']) echo 'selected'; |
|
63 | + } |
|
56 | 64 | echo '>' . $settings['ranks'][$rank] . '</option>'; |
57 | 65 | } ?> |
58 | 66 | </select> |
@@ -63,7 +71,9 @@ discard block |
||
63 | 71 | <select class=" form-control" name="profile_pic"> |
64 | 72 | <?php for ($icon = 1; $icon <= 6; $icon++) { |
65 | 73 | echo '<option value="' . $icon . '" '; |
66 | - if (isset($_POST['user_name'])) if ($icon == $_POST['user_name']) echo 'selected'; |
|
74 | + if (isset($_POST['user_name'])) { |
|
75 | + if ($icon == $_POST['user_name']) echo 'selected'; |
|
76 | + } |
|
67 | 77 | echo '>' . $settings['names'][$icon] . '</option>'; |
68 | 78 | } ?> |
69 | 79 | </select> |
@@ -6,8 +6,7 @@ discard block |
||
6 | 6 | $sql = "DELETE FROM `servers` WHERE `dbid`='" . $id . "';"; |
7 | 7 | $result_of_query = $db_connection->query($sql); |
8 | 8 | |
9 | -} |
|
10 | -elseif (isset($_POST['edit'])) { |
|
9 | +} elseif (isset($_POST['edit'])) { |
|
11 | 10 | if (isset($_POST['sql_host'])) { |
12 | 11 | if ($_SESSION['permissions']['super_admin']) { |
13 | 12 | if (formtoken::validateToken($_POST)) { |
@@ -32,8 +31,12 @@ discard block |
||
32 | 31 | $sql = "UPDATE `servers` SET `name`= '" . $name . "',`type`= '" . $type . "',`use_sq`= '" . $usegsq . "' WHERE `dbid`='" . $id . "';"; |
33 | 32 | } |
34 | 33 | $result_of_query = $db_connection->query($sql); |
35 | - } else message($lang['expired']); |
|
36 | - } else logAction($_SESSION['user_name'], $lang['failedUpdate'] . ' ' . $lang['gsq'], 3); |
|
34 | + } else { |
|
35 | + message($lang['expired']); |
|
36 | + } |
|
37 | + } else { |
|
38 | + logAction($_SESSION['user_name'], $lang['failedUpdate'] . ' ' . $lang['gsq'], 3); |
|
39 | + } |
|
37 | 40 | } |
38 | 41 | } |
39 | 42 | $sql = "SELECT * FROM `servers` WHERE `dbid`='" . $id . "';"; |
@@ -116,7 +119,12 @@ discard block |
||
116 | 119 | |
117 | 120 | <script> |
118 | 121 | $(document).ready(function() { |
119 | -if (<?php if ($server->usegsq == 1) echo 'false'; else echo 'true'; ?>) { |
|
122 | +if (<?php if ($server->usegsq == 1) { |
|
123 | + echo 'false'; |
|
124 | +} else { |
|
125 | + echo 'true'; |
|
126 | +} |
|
127 | +?>) { |
|
120 | 128 | $("#sq_details").hide(); |
121 | 129 | }; |
122 | 130 | $("#usegsq").change(function () { |
@@ -117,24 +117,32 @@ |
||
117 | 117 | } |
118 | 118 | |
119 | 119 | $dropIn = array_diff($files, array_column($plugins, 'dirname')); |
120 | - if ($dropIn > 0) echo "<h2 style='margin-top: 0;'>" . $lang['dropIn'] . "</h2>"; |
|
120 | + if ($dropIn > 0) { |
|
121 | + echo "<h2 style='margin-top: 0;'>" . $lang['dropIn'] . "</h2>"; |
|
122 | + } |
|
121 | 123 | |
122 | 124 | foreach ($dropIn as &$plugin) { |
123 | 125 | $key = array_search($plugin, array_column($installed, 'dirname')); |
124 | 126 | echo '<div class="col-sm-6 col-md-4"><div class="thumbnail"><div class="caption">'; |
125 | 127 | echo '<h3>' . $installed[$key]['name'] . ' - ' . $installed[$key]['version']; |
126 | 128 | |
127 | - if (in_array($plugin, $settings['plugins'])) |
|
128 | - echo '<small style="padding-left: 6px;"><span class="label label-success">' . $lang['active'] . '</span></small>'; |
|
129 | - else echo '<small style="padding-left: 6px;"><span class="label label-default">' . $lang['installed'] . '</span></small>'; |
|
129 | + if (in_array($plugin, $settings['plugins'])) { |
|
130 | + echo '<small style="padding-left: 6px;"><span class="label label-success">' . $lang['active'] . '</span></small>'; |
|
131 | + } else { |
|
132 | + echo '<small style="padding-left: 6px;"><span class="label label-default">' . $lang['installed'] . '</span></small>'; |
|
133 | + } |
|
130 | 134 | |
131 | 135 | echo '</h3><p><strong>' . $installed[$key]['author'] . '</strong> - ' . $installed[$key]['description'] . '</p>'; |
132 | 136 | |
133 | - if (in_array($plugin, $settings['plugins'])) |
|
134 | - echo '<p><a href="?deactivate=' . $plugin . '" class="btn btn-primary" role="button">' . $lang['deactivate'] . '</a>'; |
|
135 | - else echo '<p><a href="?activate=' . $plugin . '" class="btn btn-primary" role="button">' . $lang['activate'] . '</a>'; |
|
137 | + if (in_array($plugin, $settings['plugins'])) { |
|
138 | + echo '<p><a href="?deactivate=' . $plugin . '" class="btn btn-primary" role="button">' . $lang['deactivate'] . '</a>'; |
|
139 | + } else { |
|
140 | + echo '<p><a href="?activate=' . $plugin . '" class="btn btn-primary" role="button">' . $lang['activate'] . '</a>'; |
|
141 | + } |
|
136 | 142 | |
137 | - if (isset($installed[$key]['authurl'])) echo '<a style="margin-left: 5px;" href="' . $installed[$key]['authurl'] . '" class="btn btn-default" role="button">' . $lang['visitSite'] . '</a>'; |
|
143 | + if (isset($installed[$key]['authurl'])) { |
|
144 | + echo '<a style="margin-left: 5px;" href="' . $installed[$key]['authurl'] . '" class="btn btn-default" role="button">' . $lang['visitSite'] . '</a>'; |
|
145 | + } |
|
138 | 146 | echo '<a style="float: right;" href="?delete=' . $plugin . '" class="btn btn-danger" role="button">' . $lang['delete'] . '</a>'; |
139 | 147 | echo '</p></div></div></div>'; |
140 | 148 | } |
@@ -75,7 +75,8 @@ discard block |
||
75 | 75 | <input placeholder="SQ IP" id="server_SQ_host" |
76 | 76 | class=" form-control login_input" type="text" |
77 | 77 | name="server_SQ_host" |
78 | - <?php if (isset($_POST['server_SQ_host'])) echo 'value="' . $_POST['server_SQ_host'] . '"' ?> autocorrect="off" autocapitalize="off"> |
|
78 | + <?php if (isset($_POST['server_SQ_host'])) { |
|
79 | + echo 'value="' . $_POST['server_SQ_host'] . '"' ?> autocorrect="off" autocapitalize="off"> |
|
79 | 80 | </div> |
80 | 81 | <div class="form-group"> |
81 | 82 | <label for="server_SQ_port">SQ port: </label> |
@@ -93,6 +94,7 @@ discard block |
||
93 | 94 | <?php |
94 | 95 | $sql = "SELECT `dbid`,`sql_name` FROM `db`;"; |
95 | 96 | } |
97 | +} |
|
96 | 98 | $result_of_query = $db_connection->query($sql); |
97 | 99 | if ($result_of_query->num_rows >= 1) { |
98 | 100 | echo '<div class="form-group"><label for="server_dbid">Database: </label>'; |
@@ -103,7 +103,10 @@ discard block |
||
103 | 103 | invalid: 'fa fa-times', |
104 | 104 | validating: 'fa fa-refresh' |
105 | 105 | }, |
106 | - locale: '<?php if (isset($_SESSION['forum_lang'])) echo $_SESSION['forum_lang']; else echo 'en_US' ?>', |
|
106 | + locale: '<?php if (isset($_SESSION['forum_lang'])) { |
|
107 | + echo $_SESSION['forum_lang']; |
|
108 | +} else { |
|
109 | + echo 'en_US' ?>', |
|
107 | 110 | fields: { |
108 | 111 | email: { |
109 | 112 | validators: { |
@@ -131,7 +134,9 @@ discard block |
||
131 | 134 | regexp: /^\d{15,25}$/ |
132 | 135 | }, |
133 | 136 | remote: { |
134 | - url: '<?php echo $settings['url']; ?>validators/pid.php', |
|
137 | + url: '<?php echo $settings['url']; |
|
138 | +} |
|
139 | +?>validators/pid.php', |
|
135 | 140 | type: 'POST', |
136 | 141 | message: '<?php echo $lang['failPID'] ?>' |
137 | 142 | } |
@@ -113,13 +113,13 @@ |
||
113 | 113 | </table> |
114 | 114 | <span class="pull-right"> |
115 | 115 | <?php |
116 | - $sql = "SELECT `uid`,`playerid` FROM `players` WHERE `playerid` = '" . $profile->playerid . "' "; |
|
117 | - $result = $db_connection->query($sql); |
|
116 | + $sql = "SELECT `uid`,`playerid` FROM `players` WHERE `playerid` = '" . $profile->playerid . "' "; |
|
117 | + $result = $db_connection->query($sql); |
|
118 | 118 | |
119 | - if ($result->num_rows > 0) { |
|
120 | - ?> <a class="btn btn-sm btn-primary" href="<?php echo $settings['url'] . 'editPlayer/' . $result->fetch_object()->uid ?> "> My Player</a> <?php |
|
121 | - } |
|
122 | - ?> |
|
119 | + if ($result->num_rows > 0) { |
|
120 | + ?> <a class="btn btn-sm btn-primary" href="<?php echo $settings['url'] . 'editPlayer/' . $result->fetch_object()->uid ?> "> My Player</a> <?php |
|
121 | + } |
|
122 | + ?> |
|
123 | 123 | </span> |
124 | 124 | </div> |
125 | 125 | </div> |
@@ -15,7 +15,7 @@ discard block |
||
15 | 15 | if (formtoken::validateToken($_POST)) { |
16 | 16 | $sql = "SELECT `user_password_hash` FROM `users` WHERE `user_id` = '" . $_SESSION['user_id'] . "';"; |
17 | 17 | $result = $db_connection->query($sql)->fetch_object(); |
18 | - if ($_POST['user_password'] == $_POST['user_password_again'] && password_verify($_POST['current_password'],$result->user_password_hash)) { |
|
18 | + if ($_POST['user_password'] == $_POST['user_password_again'] && password_verify($_POST['current_password'], $result->user_password_hash)) { |
|
19 | 19 | $sql = "UPDATE `users` SET `user_password_hash`= '" . password_hash($_POST['user_password'], PASSWORD_DEFAULT) . "' WHERE `user_id` = '" . $_SESSION['user_id'] . "';"; |
20 | 20 | $result_of_query = $db_connection->query($sql); |
21 | 21 | message($lang['passChanged']); |
@@ -44,9 +44,9 @@ discard block |
||
44 | 44 | <div class="panel-body"> |
45 | 45 | <div class="row"> |
46 | 46 | <div style="padding-top:4%;" class="col-md-3 col-lg-3 " align="center"> |
47 | - <?php if(!isset($_SESSION['profile_link'])) { |
|
48 | - if(isset($_SESSION['user_email']) && $settings['gravatar']) { ?> |
|
49 | - <a href="<?php echo $settings['url'] . 'profile' ?>"> <img alt="User Pic" src="<?php get_gravatar($_SESSION['user_email'],64,'retro') ?>" class="img-circle img-responsive"></a> |
|
47 | + <?php if (!isset($_SESSION['profile_link'])) { |
|
48 | + if (isset($_SESSION['user_email']) && $settings['gravatar']) { ?> |
|
49 | + <a href="<?php echo $settings['url'] . 'profile' ?>"> <img alt="User Pic" src="<?php get_gravatar($_SESSION['user_email'], 64, 'retro') ?>" class="img-circle img-responsive"></a> |
|
50 | 50 | <?php } else {?> |
51 | 51 | <a href="<?php echo $settings['url'] . 'profile' ?>"> <img alt="User Pic" src="<?php echo $settings['url'] . 'assets/img/profile/' . $_SESSION['user_profile'] . '.jpg' ?>" class="img-circle img-responsive"></a> |
52 | 52 | <?php } ?> |
@@ -22,13 +22,19 @@ discard block |
||
22 | 22 | <p>Username:</p> |
23 | 23 | <input id="user_name" type="text" class="form-control" |
24 | 24 | placeholder="Username (only letters and numbers, 2 to 30 characters)" autofocus |
25 | - name="user_name" <?php if (isset($_POST['user_name'])) echo 'value="' . $_POST['user_name'] . '"'; ?> required> |
|
25 | + name="user_name" <?php if (isset($_POST['user_name'])) { |
|
26 | + echo 'value="' . $_POST['user_name'] . '"'; |
|
27 | +} |
|
28 | +?> required> |
|
26 | 29 | </div> |
27 | 30 | |
28 | 31 | <div class="form-group"> |
29 | 32 | <p>Email Address:</p> |
30 | 33 | <input id="user_email" placeholder="User's email" class=" form-control" type="email" |
31 | - name="user_email" <?php if (isset($_POST['user_name'])) echo 'value="' . $_POST['user_name'] . '"'; ?> required/> |
|
34 | + name="user_email" <?php if (isset($_POST['user_name'])) { |
|
35 | + echo 'value="' . $_POST['user_name'] . '"'; |
|
36 | +} |
|
37 | +?> required/> |
|
32 | 38 | </div> |
33 | 39 | <div class="form-group"> |
34 | 40 | <p>Password:</p> |
@@ -47,7 +53,9 @@ discard block |
||
47 | 53 | <select class=" form-control" name="profile_pic"> |
48 | 54 | <?php for ($icon = 1; $icon <= 6; $icon++) { |
49 | 55 | echo '<option value="' . $icon . '" '; |
50 | - if (isset($_POST['user_name'])) if ($icon == $_POST['user_name']) echo 'selected'; |
|
56 | + if (isset($_POST['user_name'])) { |
|
57 | + if ($icon == $_POST['user_name']) echo 'selected'; |
|
58 | + } |
|
51 | 59 | echo '>' . $settings['names'][$icon] . '</option>'; |
52 | 60 | } ?> |
53 | 61 | </select> |
@@ -295,7 +295,8 @@ discard block |
||
295 | 295 | <br> |
296 | 296 | <label for="community_name">Community Name: </label> |
297 | 297 | <input placeholder="Community Name" id="community_name" |
298 | - class="form-control login_input" type="text" name="community_name" <?php if (isset($_POST['community_name'])) echo 'value="' . $_POST['community_name'] . '"'?>> |
|
298 | + class="form-control login_input" type="text" name="community_name" <?php if (isset($_POST['community_name'])) { |
|
299 | + echo 'value="' . $_POST['community_name'] . '"'?>> |
|
299 | 300 | <br><h4>User Setup</h4> |
300 | 301 | <label for="user_name">Username: </label> |
301 | 302 | <input placeholder="Username" id="user_name" |
@@ -317,10 +318,14 @@ discard block |
||
317 | 318 | |
318 | 319 | <select id='user_pic' name='user_pic' class=" form-control login_input"> |
319 | 320 | <?php |
320 | - for ($icon = 1; $icon < 7; $icon++) { |
|
321 | + for ($icon = 1; |
|
322 | +} |
|
323 | +$icon < 7; $icon++) { |
|
321 | 324 | echo '<option value="' . $icon . '"'; |
322 | 325 | if (isset($_POST['user_pic'])) { |
323 | - if ($icon == $_POST['user_pic']) echo ' selected'; |
|
326 | + if ($icon == $_POST['user_pic']) { |
|
327 | + echo ' selected'; |
|
328 | + } |
|
324 | 329 | } |
325 | 330 | echo '>' . $icon . '</option>'; |
326 | 331 | } ?> |
@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | RewriteBase /'.$base . ' |
32 | 32 | RewriteCond %{REQUEST_FILENAME} !-f |
33 | 33 | RewriteRule . /'.$base . 'index.php [L]'; |
34 | - file_put_contents('.htaccess',$hta); |
|
34 | + file_put_contents('.htaccess', $hta); |
|
35 | 35 | |
36 | 36 | $settings['id'] = 1001; |
37 | 37 | $settings['community'] = $_POST['community_name']; |
@@ -110,21 +110,21 @@ discard block |
||
110 | 110 | $settings['communityBansTest'] = false; |
111 | 111 | $settings['communityBansAPI'] = ''; |
112 | 112 | |
113 | - $settings['item'] = array(5,10,15,25,50); |
|
113 | + $settings['item'] = array(5, 10, 15, 25, 50); |
|
114 | 114 | |
115 | - $settings['installedLanguage']=array(); |
|
116 | - $langEn = array('English','en'); |
|
117 | - $langDe = array('German','de'); |
|
115 | + $settings['installedLanguage'] = array(); |
|
116 | + $langEn = array('English', 'en'); |
|
117 | + $langDe = array('German', 'de'); |
|
118 | 118 | array_push($settings['installedLanguage'], $langEn); |
119 | 119 | array_push($settings['installedLanguage'], $langDe); |
120 | 120 | |
121 | 121 | $settings['names'] = array('', 'Dave', 'Sam', 'Joe', 'Kerry', 'Connie', 'Jess'); |
122 | - $settings['ranks'] = array('Banned','Player','Member','Moderator','Server Admin','Super Admin'); |
|
122 | + $settings['ranks'] = array('Banned', 'Player', 'Member', 'Moderator', 'Server Admin', 'Super Admin'); |
|
123 | 123 | |
124 | 124 | $permissions = include 'config/permissions.php'; |
125 | 125 | $userPerms = json_encode($permissions['5']); |
126 | 126 | |
127 | - $link = mysqli_connect($server_SQL_host,$server_SQL_user,$server_SQL_pass,$server_SQL_name); |
|
127 | + $link = mysqli_connect($server_SQL_host, $server_SQL_user, $server_SQL_pass, $server_SQL_name); |
|
128 | 128 | if (mysqli_connect_errno()) { |
129 | 129 | printf("Connect failed: %s\n", mysqli_connect_error()); |
130 | 130 | exit(); |