|
15 | 15 | } else { |
16 | 16 | $settings['donorFormat'] = 'donatorlvl'; |
17 | 17 | } |
| 18 | + |
| 19 | + if ($_POST['lifeVersion'] == 5) { |
| 20 | + $settings['playerColumn'] = 'pid'; |
| 21 | + } else { |
| 22 | + $settings['playerColumn'] = 'playerid'; |
| 23 | + } |
18 | 24 | $settings['lifeVersion'] = intval($_POST['lifeVersion']); |
19 | 25 | $settings['lifeVersionDisplay'] = $_POST['lifeVersion']; |
20 | | - |
| 26 | + |
21 | 27 | $settings['allowLang'] = filter_var($_POST['allowLang'], FILTER_VALIDATE_BOOLEAN); |
22 | 28 | $settings['wanted'] = filter_var($_POST['wanted'], FILTER_VALIDATE_BOOLEAN); |
23 | 29 | $settings['news'] = filter_var($_POST['news'], FILTER_VALIDATE_BOOLEAN); |
24 | | - $settings['register'] = filter_var($_POST['register'], FILTER_VALIDATE_BOOLEAN); |
25 | | - $settings['steamlogin'] = filter_var($_POST['steamlogin'], FILTER_VALIDATE_BOOLEAN); |
| 30 | + $settings['register'] = filter_var($_POST['register'], FILTER_VALIDATE_BOOLEAN); |
| 31 | + $settings['steamlogin'] = filter_var($_POST['steamlogin'], FILTER_VALIDATE_BOOLEAN); |
26 | 32 | $settings['vacTest'] = filter_var($_POST['vacTest'], FILTER_VALIDATE_BOOLEAN); |
27 | | - $settings['performance'] = filter_var($_POST['performance'], FILTER_VALIDATE_BOOLEAN); |
28 | | - $settings['notifications'] = filter_var($_POST['notifications'], FILTER_VALIDATE_BOOLEAN); |
29 | | - |
| 33 | + $settings['performance'] = filter_var($_POST['performance'], FILTER_VALIDATE_BOOLEAN); |
| 34 | + $settings['notifications'] = filter_var($_POST['notifications'], FILTER_VALIDATE_BOOLEAN); |
| 35 | + |
30 | 36 | $settings['2factor'] = false; |
31 | 37 | $settings['gravatar'] = false; |
32 | 38 | $settings['force2factor'] = 'none'; |
|
36 | 42 | $settings['maxLevels']['admin'] = $_POST['max_admin']; |
37 | 43 | $settings['maxLevels']['donator'] = $_POST['max_donator']; |
38 | 44 |
|
39 | | - |
40 | | - file_put_contents('config/settings.php', '<?php return ' . var_export($settings, true) . ';'); |
| 45 | + file_put_contents('config/settings.php', '<?php return '.var_export($settings, true).';'); |
41 | 46 | } else { |
42 | | - logAction($_SESSION['user_name'], $lang['failedUpdate'] . ' ' . $lang['server'] . ' ' . $lang['settings'], 3); |
| 47 | + logAction($_SESSION['user_name'], $lang['failedUpdate'].' '.$lang['server'].' '.$lang['settings'], 3); |
43 | 48 | } |
44 | 49 | } else { |
45 | 50 | message($lang['expired']); |
|
59 | 64 | <form method='post' action='settings' id='settings' name='settingsEdit'> |
60 | 65 | <?php |
61 | 66 | echo formtoken::getField(); |
62 | | - echo "<h3>" . $lang['database'] . "</h3>"; |
63 | | - echo "<div class='form-group'><label for='db_host'>" . $lang['database'] . " " . $lang['host'] . ": </label><input class='form-control' id='db_host' type='text' name='db_host' value='" . decrypt($settings['db']['host']) . "' readonly></div>"; |
64 | | - echo "<div class='form-group'><label for='db_user'>" . $lang['database'] . " " . $lang['user'] . ": </label><input class='form-control' id='db_user' type='text' name='db_user' value='" . decrypt($settings['db']['user']) . "' readonly></div>"; |
65 | | - echo "<div class='form-group'><div class='input-group'><label for='db_pass'>" . $lang['database'] . " " . $lang['password'] . ": </label><input class='form-control pwd' id='db_pass' type='password' name='db_pass' value='" . decrypt($settings['db']['pass']) . "' readonly>"; |
| 67 | + echo '<h3>'.$lang['database'].'</h3>'; |
| 68 | + echo "<div class='form-group'><label for='db_host'>".$lang['database'].' '.$lang['host'].": </label><input class='form-control' id='db_host' type='text' name='db_host' value='".decrypt($settings['db']['host'])."' readonly></div>"; |
| 69 | + echo "<div class='form-group'><label for='db_user'>".$lang['database'].' '.$lang['user'].": </label><input class='form-control' id='db_user' type='text' name='db_user' value='".decrypt($settings['db']['user'])."' readonly></div>"; |
| 70 | + echo "<div class='form-group'><div class='input-group'><label for='db_pass'>".$lang['database'].' '.$lang['password'].": </label><input class='form-control pwd' id='db_pass' type='password' name='db_pass' value='".decrypt($settings['db']['pass'])."' readonly>"; |
66 | 71 | echo "<span class='input-group-btn'><button style='margin-top: 21px; background-color: #eee;' "; |
67 | 72 | echo "class='btn btn-default reveal' type='button'><i class='fa fa-eye-slash'></i></button></span></div></div>"; |
68 | | - echo "<div class='form-group'><label for='db_name'>" . $lang['database'] . " " . $lang['name'] . ": </label><input class='form-control' id='db_name' type='text' name='db_name' value='" . decrypt($settings['db']['name']) . "' readonly></div>"; |
| 73 | + echo "<div class='form-group'><label for='db_name'>".$lang['database'].' '.$lang['name'].": </label><input class='form-control' id='db_name' type='text' name='db_name' value='".decrypt($settings['db']['name'])."' readonly></div>"; |
69 | 74 | ?> |
70 | 75 |
|
71 | 76 | <h3><?php echo $lang['panel']?></h3> |
72 | 77 | <div class='form-group'><label for='max_cop'> <?php echo $lang['community'] ?>: </label> |
73 | 78 | <input class='form-control' id='community' type='text' name='community' value='<?php echo $settings['community']; ?>'></div> |
74 | 79 |
|
75 | | - <?php if (count($settings['installedLanguage']) > 1) { ?> |
| 80 | + <?php if (count($settings['installedLanguage']) > 1) { |
| 81 | + ?> |
76 | 82 | <div class='form-group'><label for="language"><?php echo $lang['language'] ?>: </label> |
77 | 83 | <select name="language" id="language" class="form-control"> |
78 | 84 | <?php |
79 | 85 | foreach ($settings['installedLanguage'] as $language) { |
80 | | - echo '<option value = "' . $language[1] . '" '; |
81 | | - if ($settings['language'] == $language[1]) echo 'selected'; |
82 | | - echo '> ' . $language[0] . '</option>'; |
| 86 | + echo '<option value = "'.$language[1].'" '; |
| 87 | + if ($settings['language'] == $language[1]) { |
| 88 | + echo 'selected'; |
| 89 | + } |
| 90 | + echo '> '.$language[0].'</option>'; |
83 | 91 | } ?> |
84 | 92 | </select></div> |
85 | 93 |
|
86 | 94 | <div class='form-group'><label for="allowLang"><?php echo $lang['allowLang'] ?>: </label> |
87 | 95 | <select name="allowLang" id="allowLang" class="form-control"> |
88 | | - <option value="true"<?php echo select(true, $settings['allowLang']) . '>' . $lang['yes'] ?></option> |
89 | | - <option value="false"<?php echo select(false, $settings['allowLang']) . '>' . $lang['no'] ?></option> |
| 96 | + <option value="true"<?php echo select(true, $settings['allowLang']).'>'.$lang['yes'] ?></option> |
| 97 | + <option value="false"<?php echo select(false, $settings['allowLang']).'>'.$lang['no'] ?></option> |
90 | 98 | </select></div> |
91 | | - |
92 | | - <?php } ?> |
93 | | - |
| 99 | + |
| 100 | + <?php |
| 101 | + |
| 102 | + } ?> |
| 103 | + |
94 | 104 | <div class='form-group'><label for="performance"><?php echo $lang['performance'] ?>: </label> |
95 | 105 | <select name="performance" id="performance" class="form-control"> |
96 | 106 | <option value="true" |
97 | | - <?php echo select(true, $settings['performance']) . '>' . $lang['yes'] ?></option> |
| 107 | + <?php echo select(true, $settings['performance']).'>'.$lang['yes'] ?></option> |
98 | 108 | <option value="false" |
99 | | - <?php echo select(false, $settings['performance']) . '>' . $lang['no'] ?></option> |
| 109 | + <?php echo select(false, $settings['performance']).'>'.$lang['no'] ?></option> |
100 | 110 | </select></div> |
101 | 111 |
|
102 | 112 | <div class='form-group'><label for="items"><?php echo $lang['itemsPP'] ?></label> |
|
110 | 120 |
|
111 | 121 | <div class='form-group'><label for="register"><?php echo $lang['registration'] ?>: </label> |
112 | 122 | <select name="register" id="register" class="form-control"> |
113 | | - <option value="true"<?php echo select(true, $settings['register']) . '>' . $lang['yes'] ?></option> |
114 | | - <option value="false"<?php echo select(false, $settings['register']) . '>' . $lang['no'] ?></option> |
| 123 | + <option value="true"<?php echo select(true, $settings['register']).'>'.$lang['yes'] ?></option> |
| 124 | + <option value="false"<?php echo select(false, $settings['register']).'>'.$lang['no'] ?></option> |
115 | 125 | </select> |
116 | 126 | </div> |
117 | 127 |
|
118 | 128 | <div class='form-group'><label for="news"><?php echo $lang['useNews'] ?>: </label> |
119 | 129 | <select name="news" id="news" class="form-control"> |
120 | | - <option value="true"<?php echo select(true, $settings['news']) . '>' . $lang['yes'] ?></option> |
121 | | - <option value="false"<?php echo select(false, $settings['news']) . '>' . $lang['no'] ?></option> |
| 130 | + <option value="true"<?php echo select(true, $settings['news']).'>'.$lang['yes'] ?></option> |
| 131 | + <option value="false"<?php echo select(false, $settings['news']).'>'.$lang['no'] ?></option> |
122 | 132 | </select></div> |
123 | 133 |
|
124 | 134 | <div class='form-group'><label for="notifications">Notifications: </label> |
125 | 135 | <select name="notifications" id="notifications" class="form-control"> |
126 | | - <option value="true"<?php echo select(true, $settings['notifications']) . '>' . $lang['yes'] ?></option> |
127 | | - <option value="false"<?php echo select(false, $settings['notifications']) . '>' . $lang['no'] ?></option> |
| 136 | + <option value="true"<?php echo select(true, $settings['notifications']).'>'.$lang['yes'] ?></option> |
| 137 | + <option value="false"<?php echo select(false, $settings['notifications']).'>'.$lang['no'] ?></option> |
128 | 138 | </select></div> |
129 | | - <?php echo "<div class='form-group'><label for='refresh'>" . $lang['refresh'] . ": </label><input class='form-control' id='refresh' type='number' name='refresh' value='" . $settings['refresh'] . "'></div>"; ?> |
| 139 | + <?php echo "<div class='form-group'><label for='refresh'>".$lang['refresh'].": </label><input class='form-control' id='refresh' type='number' name='refresh' value='".$settings['refresh']."'></div>"; ?> |
130 | 140 | </div> |
131 | 141 | <div class="col-md-6"> |
132 | 142 | <h3>Altis Life</h3> |
133 | 143 | <?php |
134 | | - echo "<div class='form-group'><label for='max_cop'>" . $lang['max'] . " " . $lang['cop'] . " " . $lang['level'] . ": </label><input class='form-control' id='max_cop' type='number' name='max_cop' value='" . $settings['maxLevels']['cop'] . "'></div>"; |
135 | | - echo "<div class='form-group'><label for='max_medic'>" . $lang['max'] . " " . $lang['medic'] . " " . $lang['level'] . ": </label><input class='form-control' id='max_medic' type='number' name='max_medic' value='" . $settings['maxLevels']['medic'] . "'></div>"; |
136 | | - echo "<div class='form-group'><label for='max_admin'>" . $lang['max'] . " " . $lang['admin'] . " " . $lang['level'] . ": </label><input class='form-control' id='max_admin' type='number' name='max_admin' value='" . $settings['maxLevels']['admin'] . "'></div>"; |
137 | | - echo "<div class='form-group'><label for='max_donator'>" . $lang['max'] . " " . $lang['donator'] . " " . $lang['level'] . ": </label><input class='form-control' id='max_donator' type='number' name='max_donator' value='" . $settings['maxLevels']['donator'] . "'></div>"; |
| 144 | + echo "<div class='form-group'><label for='max_cop'>".$lang['max'].' '.$lang['cop'].' '.$lang['level'].": </label><input class='form-control' id='max_cop' type='number' name='max_cop' value='".$settings['maxLevels']['cop']."'></div>"; |
| 145 | + echo "<div class='form-group'><label for='max_medic'>".$lang['max'].' '.$lang['medic'].' '.$lang['level'].": </label><input class='form-control' id='max_medic' type='number' name='max_medic' value='".$settings['maxLevels']['medic']."'></div>"; |
| 146 | + echo "<div class='form-group'><label for='max_admin'>".$lang['max'].' '.$lang['admin'].' '.$lang['level'].": </label><input class='form-control' id='max_admin' type='number' name='max_admin' value='".$settings['maxLevels']['admin']."'></div>"; |
| 147 | + echo "<div class='form-group'><label for='max_donator'>".$lang['max'].' '.$lang['donator'].' '.$lang['level'].": </label><input class='form-control' id='max_donator' type='number' name='max_donator' value='".$settings['maxLevels']['donator']."'></div>"; |
138 | 148 | ?> |
139 | 149 | <div class='form-group'><label for="wanted"><?php echo $lang['wanted'] ?>: </label> |
140 | 150 | <select name="wanted" id="wanted" class="form-control"> |
141 | 151 | <option value="true" |
142 | | - <?php echo select(true, $settings['wanted']) . '>' . $lang['yes'] ?></option> |
| 152 | + <?php echo select(true, $settings['wanted']).'>'.$lang['yes'] ?></option> |
143 | 153 | <option value="false" |
144 | | - <?php echo select(false, $settings['wanted']) . '>' . $lang['no'] ?></option> |
| 154 | + <?php echo select(false, $settings['wanted']).'>'.$lang['no'] ?></option> |
145 | 155 | </select></div> |
146 | 156 |
|
147 | 157 | <div class='form-group'> |
|
150 | 160 | <option value="3" <?php echo select('3', $settings['lifeVersionDisplay']) ?> >3.X.X.X</option> |
151 | 161 | <option value="4" <?php echo select('4', $settings['lifeVersionDisplay']) ?> >4.0->4.4</option> |
152 | 162 | <option value="4.2" <?php echo select('4.2', $settings['lifeVersionDisplay']) ?> >4.4r2->4.4r4</option> |
| 163 | + <option value="5.0" <?php echo select('5', $settings['lifeVersionDisplay']) ?> >5.0</option> |
153 | 164 | </select></div> |
154 | 165 | <h3>API's</h3> |
155 | 166 | <div class='form-group'> |
|
161 | 172 | </span> |
162 | 173 | </div> |
163 | 174 | </div> |
164 | | - |
| 175 | + |
165 | 176 | <div class='form-group'> |
166 | 177 | <label for='steamDomain'>Steam Domain: </label> |
167 | 178 | <input class='form-control' id='steamDomain' type='text' name='steamDomain' value='<?php echo $settings['steamdomain']?>'> |
|
170 | 181 | <div class='form-group'><label for="steamlogin"><?php echo $lang['steamlogin'] ?>: </label> |
171 | 182 | <select name="steamlogin" id="steamlogin" class="form-control"> |
172 | 183 | <option value="true" |
173 | | - <?php echo select(true, $settings['steamlogin']) . '>' . $lang['yes'] ?></option> |
| 184 | + <?php echo select(true, $settings['steamlogin']).'>'.$lang['yes'] ?></option> |
174 | 185 | <option value="false" |
175 | | - <?php echo select(false, $settings['steamlogin']) . '>' . $lang['no'] ?></option> |
| 186 | + <?php echo select(false, $settings['steamlogin']).'>'.$lang['no'] ?></option> |
176 | 187 | </select></div> |
177 | 188 |
|
178 | 189 | <div class='form-group'><label for="vacTest"><?php echo $lang['useVAC'] ?>: </label> |
179 | 190 | <select name="vacTest" id="vacTest" class="form-control"> |
180 | 191 | <option value="true" |
181 | | - <?php echo select(true, $settings['vacTest']) . '>' . $lang['yes'] ?></option> |
| 192 | + <?php echo select(true, $settings['vacTest']).'>'.$lang['yes'] ?></option> |
182 | 193 | <option value="false" |
183 | | - <?php echo select(false, $settings['vacTest']) . '>' . $lang['no'] ?></option> |
| 194 | + <?php echo select(false, $settings['vacTest']).'>'.$lang['no'] ?></option> |
184 | 195 | </select></div> |
185 | 196 |
|
186 | 197 | <div class='form-group'><label for="communityBansTest"><?php echo $lang['useCommunityBans'] ?>: </label> |
187 | 198 | <select name="communityBansTest" id="communityBansTest" class="form-control"> |
188 | 199 | <option value="true" |
189 | | - <?php echo select(true, $settings['communityBansTest']) . '>' . $lang['yes'] ?></option> |
| 200 | + <?php echo select(true, $settings['communityBansTest']).'>'.$lang['yes'] ?></option> |
190 | 201 | <option value="false" |
191 | | - <?php echo select(false, $settings['communityBansTest']) . '>' . $lang['no'] ?></option> |
| 202 | + <?php echo select(false, $settings['communityBansTest']).'>'.$lang['no'] ?></option> |
192 | 203 | </select></div> |
193 | 204 |
|
194 | 205 | <div class='form-group'><div class='input-group'><label for='communityBansAPI'>Community Bans API <?php echo $lang['key'] ?>: </label><input class='form-control pwd' id='communityBansAPI' type='password' name='communityBansAPI' value='<?php echo $settings['communityBansAPI']?>'> |
195 | 206 | <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> |
196 | 207 |
|
197 | 208 | <?php |
198 | | - if (!isset($pluginSettings)) echo '<h3>' . $lang['plugin'] . ' ' . $lang['settings'] . '</h3>'; |
| 209 | + if (!isset($pluginSettings)) { |
| 210 | + echo '<h3>'.$lang['plugin'].' '.$lang['settings'].'</h3>'; |
| 211 | + } |
199 | 212 | foreach ($settings['plugins'] as &$plugin) { |
200 | | - if (file_exists("plugins/" . $plugin . "/settings.php")) { |
201 | | - include("plugins/" . $plugin . "/settings.php"); |
| 213 | + if (file_exists('plugins/'.$plugin.'/settings.php')) { |
| 214 | + include 'plugins/'.$plugin.'/settings.php'; |
202 | 215 | } |
203 | 216 | } |
204 | 217 | ?> |
|
0 commit comments