@@ -1,2 +1,2 @@ |
||
| 1 | 1 | <?php |
| 2 | -echo "<h1>" . $lang['noRec'] . "</h1>"; |
|
| 3 | 2 | \ No newline at end of file |
| 3 | +echo "<h1>".$lang['noRec']."</h1>"; |
|
| 4 | 4 | \ No newline at end of file |
@@ -10,11 +10,11 @@ |
||
| 10 | 10 | <?php |
| 11 | 11 | if ($login->messages) { |
| 12 | 12 | foreach ($login->messages as $message) { |
| 13 | - echo '<div style="margin-top: 200px;" class="alert alert-info animated infinite bounce" role="alert">' . $message . '</div>'; |
|
| 13 | + echo '<div style="margin-top: 200px;" class="alert alert-info animated infinite bounce" role="alert">'.$message.'</div>'; |
|
| 14 | 14 | } |
| 15 | 15 | } elseif ($login->errors) { |
| 16 | 16 | foreach ($login->errors as $error) { |
| 17 | - echo '<div style="margin-top: 200px;" class="alert alert-danger animated infinite bounce" role="alert">' . $error . '</div>'; |
|
| 17 | + echo '<div style="margin-top: 200px;" class="alert alert-danger animated infinite bounce" role="alert">'.$error.'</div>'; |
|
| 18 | 18 | } |
| 19 | 19 | } else echo '<div style="margin-top: 270px;"></div>' ?> |
| 20 | 20 | </div> |
@@ -22,8 +22,8 @@ |
||
| 22 | 22 | <?php |
| 23 | 23 | if (isset($settings)) { |
| 24 | 24 | foreach ($settings['plugins'] as &$plugin) { |
| 25 | - if (file_exists("plugins/" . $plugin . "/assets/style.css")) { |
|
| 26 | - echo '<link rel="stylesheet" type="text/css" href="' . $settings['url'] . 'plugins/' . $plugin . '/assets/style.css">'; |
|
| 25 | + if (file_exists("plugins/".$plugin."/assets/style.css")) { |
|
| 26 | + echo '<link rel="stylesheet" type="text/css" href="'.$settings['url'].'plugins/'.$plugin.'/assets/style.css">'; |
|
| 27 | 27 | } |
| 28 | 28 | } |
| 29 | 29 | } ?> |
@@ -1,3 +1,3 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -echo "<h1>" . $err . "</h1>"; |
|
| 4 | 3 | \ No newline at end of file |
| 4 | +echo "<h1>".$err."</h1>"; |
|
| 5 | 5 | \ No newline at end of file |
@@ -15,20 +15,20 @@ discard block |
||
| 15 | 15 | if (formtoken::validateToken($_POST)) { |
| 16 | 16 | $to = $_POST['emailed']; |
| 17 | 17 | $token = tokenGen(32); |
| 18 | - $sql = "SELECT `user_id` FROM `users` WHERE `user_email` = '" . $to . "';"; |
|
| 18 | + $sql = "SELECT `user_id` FROM `users` WHERE `user_email` = '".$to."';"; |
|
| 19 | 19 | $result = $db_connection->query($sql); |
| 20 | 20 | if ($result->num_rows > 0) { |
| 21 | 21 | $row = $result->fetch_assoc(); |
| 22 | - $sql = "UPDATE `users` SET `token` = '" . $token . "' WHERE `user_id` = '" . $row['user_id'] . "';"; |
|
| 22 | + $sql = "UPDATE `users` SET `token` = '".$token."' WHERE `user_id` = '".$row['user_id']."';"; |
|
| 23 | 23 | $result_of_query = $db_connection->query($sql); |
| 24 | 24 | |
| 25 | 25 | //Send the reset Email |
| 26 | 26 | $subject = "Password Reset"; |
| 27 | - $headers = "MIME-Version: 1.0" . "\r\n"; |
|
| 28 | - $headers .= "Content-type:text/html;charset=iso-8859-1" . "\r\n"; |
|
| 27 | + $headers = "MIME-Version: 1.0"."\r\n"; |
|
| 28 | + $headers .= "Content-type:text/html;charset=iso-8859-1"."\r\n"; |
|
| 29 | 29 | //$headers .= "From: Password Reset <[email protected]>\r\n"; |
| 30 | - $headers .= "From: " . $settings['community'] . " Panel <" . $email . ">\r\n" . "Reply-To: " . $email . "\r\n"; |
|
| 31 | - $msg = "Password reset<br/> token: " . $token . " <br/> url: <a href='" . $settings['url'] . "?token=" . $token . "&uID=" . $row['user_id'] . "'>" . $settings['url'] . "?token=" . $token . "&uID=" . $row['user_id'] . "</a>"; |
|
| 30 | + $headers .= "From: ".$settings['community']." Panel <".$email.">\r\n"."Reply-To: ".$email."\r\n"; |
|
| 31 | + $msg = "Password reset<br/> token: ".$token." <br/> url: <a href='".$settings['url']."?token=".$token."&uID=".$row['user_id']."'>".$settings['url']."?token=".$token."&uID=".$row['user_id']."</a>"; |
|
| 32 | 32 | $mail = mail($to, $subject, $msg, $headers); |
| 33 | 33 | |
| 34 | 34 | $message = "Your password has been reset please check your email"; |
@@ -42,11 +42,11 @@ discard block |
||
| 42 | 42 | if ($_POST['user_password_new'] !== $_POST['user_password_repeat']) { |
| 43 | 43 | $error = 'Password and password repeat are not the same'; |
| 44 | 44 | } else { |
| 45 | - $sql = "SELECT `user_id` FROM `users` WHERE `user_id` = '" . $_GET['uID'] . "' AND `token` = '" . $_GET['token'] . "';"; |
|
| 45 | + $sql = "SELECT `user_id` FROM `users` WHERE `user_id` = '".$_GET['uID']."' AND `token` = '".$_GET['token']."';"; |
|
| 46 | 46 | $result_of_query = $db_connection->query($sql); |
| 47 | 47 | if ($result_of_query->num_rows == 1) { |
| 48 | 48 | $user_password_hash = password_hash($_POST['user_password_new'], PASSWORD_DEFAULT); |
| 49 | - $sql = "UPDATE `users` SET `user_password_hash` = '" . $user_password_hash . "', `token` = '' WHERE `user_id` = '" . $_GET['uID'] . "' AND `token` = '" . $_GET['token'] . "';"; |
|
| 49 | + $sql = "UPDATE `users` SET `user_password_hash` = '".$user_password_hash."', `token` = '' WHERE `user_id` = '".$_GET['uID']."' AND `token` = '".$_GET['token']."';"; |
|
| 50 | 50 | $result_of_query = $db_connection->query($sql); |
| 51 | 51 | $message = 'Your password been updated'; |
| 52 | 52 | } else { |
@@ -54,7 +54,7 @@ discard block |
||
| 54 | 54 | } |
| 55 | 55 | } |
| 56 | 56 | } else { |
| 57 | - $sql = "SELECT `user_id` FROM `users` WHERE `user_id` = '" . $_GET['uID'] . "' AND `token` = '" . $_GET['token'] . "';"; |
|
| 57 | + $sql = "SELECT `user_id` FROM `users` WHERE `user_id` = '".$_GET['uID']."' AND `token` = '".$_GET['token']."';"; |
|
| 58 | 58 | $result_of_query = $db_connection->query($sql); |
| 59 | 59 | if ($result_of_query->num_rows == 1) { |
| 60 | 60 | ?> |
@@ -91,7 +91,7 @@ discard block |
||
| 91 | 91 | <?php |
| 92 | 92 | } else { |
| 93 | 93 | $error = 'User not found or token invalid'; |
| 94 | - logAction($_POST['email'], ' ' . $lang['passreset'], 3); |
|
| 94 | + logAction($_POST['email'], ' '.$lang['passreset'], 3); |
|
| 95 | 95 | } |
| 96 | 96 | } |
| 97 | 97 | } |
@@ -106,16 +106,16 @@ discard block |
||
| 106 | 106 | <?php |
| 107 | 107 | if ($login->messages) { |
| 108 | 108 | foreach ($login->messages as $message) { |
| 109 | - echo '<div style="margin-top: 120px;" class="alert alert-info animated infinite bounce" role="alert">' . $message . '</div>'; |
|
| 109 | + echo '<div style="margin-top: 120px;" class="alert alert-info animated infinite bounce" role="alert">'.$message.'</div>'; |
|
| 110 | 110 | } |
| 111 | 111 | } elseif ($login->errors) { |
| 112 | 112 | foreach ($login->errors as $error) { |
| 113 | - echo '<div style="margin-top: 120px;" class="alert alert-danger animated infinite bounce" role="alert">' . $error . '</div>'; |
|
| 113 | + echo '<div style="margin-top: 120px;" class="alert alert-danger animated infinite bounce" role="alert">'.$error.'</div>'; |
|
| 114 | 114 | } |
| 115 | 115 | } elseif (isset($message)) { |
| 116 | - echo '<div style="margin-top: 120px;" class="alert alert-info animated infinite bounce" role="alert">' . $message . '</div>'; |
|
| 116 | + echo '<div style="margin-top: 120px;" class="alert alert-info animated infinite bounce" role="alert">'.$message.'</div>'; |
|
| 117 | 117 | } elseif (isset($error)) { |
| 118 | - echo '<div style="margin-top: 120px;" class="alert alert-danger animated infinite bounce" role="alert">' . $error . '</div>'; |
|
| 118 | + echo '<div style="margin-top: 120px;" class="alert alert-danger animated infinite bounce" role="alert">'.$error.'</div>'; |
|
| 119 | 119 | } else { |
| 120 | 120 | echo '<div style="margin-top: 190px;"></div>'; |
| 121 | 121 | } ?> |
@@ -161,11 +161,11 @@ discard block |
||
| 161 | 161 | echo '<select id = "lang" name = "lang" class="form-control login_input" >'; |
| 162 | 162 | |
| 163 | 163 | foreach ($settings['installedLanguage'] as $language) { |
| 164 | - echo '<option value = "' . $language[1] . '" '; |
|
| 164 | + echo '<option value = "'.$language[1].'" '; |
|
| 165 | 165 | if ($tempLang == $language[1]) { |
| 166 | 166 | echo 'selected'; |
| 167 | 167 | } |
| 168 | - echo '> ' . $language[0] . '</option>'; |
|
| 168 | + echo '> '.$language[0].'</option>'; |
|
| 169 | 169 | } |
| 170 | 170 | echo '</select><br>'; |
| 171 | 171 | } |
@@ -3,7 +3,7 @@ discard block |
||
| 3 | 3 | if (formtoken::validateToken($_POST)) { |
| 4 | 4 | $db_type = $_POST['db_type']; |
| 5 | 5 | |
| 6 | - $sql = "INSERT INTO `db` (`type`, `sql_host`, `sql_user`, `sql_pass`, `sql_name`) VALUES ('" . $db_type . "', '" . encrypt($_POST['SQL_host']) . "', '" . encrypt($_POST['SQL_user']) . "', '" . encrypt($_POST['SQL_pass']) . "', '" . encrypt($_POST['SQL_name']) . "');"; |
|
| 6 | + $sql = "INSERT INTO `db` (`type`, `sql_host`, `sql_user`, `sql_pass`, `sql_name`) VALUES ('".$db_type."', '".encrypt($_POST['SQL_host'])."', '".encrypt($_POST['SQL_user'])."', '".encrypt($_POST['SQL_pass'])."', '".encrypt($_POST['SQL_name'])."');"; |
|
| 7 | 7 | $result_of_query = $db_connection->query($sql); |
| 8 | 8 | |
| 9 | 9 | message($lang['newdb']); |
@@ -17,7 +17,7 @@ discard block |
||
| 17 | 17 | <form method="post" action="newDB" name="newDB" id="newDB"> |
| 18 | 18 | <?php echo formtoken::getField() ?> |
| 19 | 19 | <h2 class="form-login-heading"> |
| 20 | - <?php echo $lang['new'] . ' ' . $lang['database'] ?> |
|
| 20 | + <?php echo $lang['new'].' '.$lang['database'] ?> |
|
| 21 | 21 | </h2> |
| 22 | 22 | <div class="form-group"> |
| 23 | 23 | <label for="db_type">Server type: </label> |
@@ -32,7 +32,7 @@ discard block |
||
| 32 | 32 | class=" form-control login_input" type="text" |
| 33 | 33 | name="SQL_host" |
| 34 | 34 | |
| 35 | - <?php if (isset($_POST['SQL_host'])) echo 'value="' . htmlspecialchars($_POST['SQL_host']) . '"' ?> |
|
| 35 | + <?php if (isset($_POST['SQL_host'])) echo 'value="'.htmlspecialchars($_POST['SQL_host']).'"' ?> |
|
| 36 | 36 | required> |
| 37 | 37 | </div> |
| 38 | 38 | <div class="form-group"> |
@@ -40,7 +40,7 @@ discard block |
||
| 40 | 40 | <input placeholder="SQL User" id="SQL_user" |
| 41 | 41 | class=" form-control login_input" type="text" |
| 42 | 42 | name="SQL_user" |
| 43 | - <?php if (isset($_POST['SQL_user'])) echo 'value="' . htmlspecialchars($_POST['SQL_user']) . '"' ?> |
|
| 43 | + <?php if (isset($_POST['SQL_user'])) echo 'value="'.htmlspecialchars($_POST['SQL_user']).'"' ?> |
|
| 44 | 44 | required autocapitalize="off"> |
| 45 | 45 | </div> |
| 46 | 46 | <div class="form-group"> |
@@ -49,7 +49,7 @@ discard block |
||
| 49 | 49 | class=" form-control login_input" type="password" |
| 50 | 50 | name="SQL_pass" |
| 51 | 51 | |
| 52 | - <?php if (isset($_POST['SQL_pass'])) echo 'value="' . htmlspecialchars($_POST['SQL_pass']) . '"' ?> |
|
| 52 | + <?php if (isset($_POST['SQL_pass'])) echo 'value="'.htmlspecialchars($_POST['SQL_pass']).'"' ?> |
|
| 53 | 53 | required autocapitalize="off" autocomplete="off"> |
| 54 | 54 | </div> |
| 55 | 55 | <div class="form-group"> |
@@ -58,7 +58,7 @@ discard block |
||
| 58 | 58 | class=" form-control login_input" type="text" |
| 59 | 59 | name="SQL_name" |
| 60 | 60 | |
| 61 | - <?php if (isset($_POST['SQL_name'])) echo 'value="' . htmlspecialchars($_POST['SQL_name']) . '"' ?> |
|
| 61 | + <?php if (isset($_POST['SQL_name'])) echo 'value="'.htmlspecialchars($_POST['SQL_name']).'"' ?> |
|
| 62 | 62 | required> |
| 63 | 63 | </div> |
| 64 | 64 | <input class="btn btn-lg btn-primary" style="float:right;" type="submit" name="setup" |
@@ -1,16 +1,16 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | $db_link = serverConnect(); |
| 3 | 3 | |
| 4 | -$max = 'LIMIT ' . ($pageNum - 1) * $_SESSION['items'] . ',' . $_SESSION['items']; |
|
| 4 | +$max = 'LIMIT '.($pageNum - 1) * $_SESSION['items'].','.$_SESSION['items']; |
|
| 5 | 5 | |
| 6 | 6 | if (isset($search)) { |
| 7 | - $sql = "SELECT count(`logid`) FROM `logs` WHERE `logid` LIKE '" . $search . "' OR `user` LIKE '%" . $search . "%' OR `action` LIKE '%" . $search . "%' OR `level` LIKE '" . $search . "';"; |
|
| 7 | + $sql = "SELECT count(`logid`) FROM `logs` WHERE `logid` LIKE '".$search."' OR `user` LIKE '%".$search."%' OR `action` LIKE '%".$search."%' OR `level` LIKE '".$search."';"; |
|
| 8 | 8 | $total_records = $db_link->query($sql); |
| 9 | 9 | if ($pageNum > $total_records) { |
| 10 | 10 | $pageNum = $total_records; |
| 11 | 11 | } |
| 12 | - $sql = "SELECT `logid`,`date_time`,`user`,`action`,`level` FROM `logs` WHERE `logid` LIKE '" . $search . "' OR `user` LIKE '%" . $search . "%' OR `action` LIKE '%" . $search . "%' OR `level` LIKE '" . $search . "' ORDER BY `logid` DESC " . $max . " ;"; |
|
| 13 | - logAction($_SESSION['user_name'], $lang['searched'] . ' (' . $search . ') ' . $lang['in'] . ' ' . $lang['logs'], 2); |
|
| 12 | + $sql = "SELECT `logid`,`date_time`,`user`,`action`,`level` FROM `logs` WHERE `logid` LIKE '".$search."' OR `user` LIKE '%".$search."%' OR `action` LIKE '%".$search."%' OR `level` LIKE '".$search."' ORDER BY `logid` DESC ".$max." ;"; |
|
| 13 | + logAction($_SESSION['user_name'], $lang['searched'].' ('.$search.') '.$lang['in'].' '.$lang['logs'], 2); |
|
| 14 | 14 | } else { |
| 15 | 15 | $sql = "SELECT `logid` FROM `logs`;"; |
| 16 | 16 | $result_of_query = $db_link->query($sql); |
@@ -18,7 +18,7 @@ discard block |
||
| 18 | 18 | if ($pageNum > $total_records) { |
| 19 | 19 | $pageNum = $total_records; |
| 20 | 20 | } |
| 21 | - $sql = "SELECT `logid`,`date_time`,`user`,`action`,`level` FROM `logs` ORDER BY `logid` DESC " . $max . " ;"; |
|
| 21 | + $sql = "SELECT `logid`,`date_time`,`user`,`action`,`level` FROM `logs` ORDER BY `logid` DESC ".$max." ;"; |
|
| 22 | 22 | } |
| 23 | 23 | $result_of_query = $db_connection->query($sql); |
| 24 | 24 | if ($result_of_query->num_rows > 0) { |
@@ -28,7 +28,7 @@ discard block |
||
| 28 | 28 | <div class="col-lg-12"> |
| 29 | 29 | <h1 class="page-header"> |
| 30 | 30 | <?php echo $lang['logs']; ?> |
| 31 | - <small><?php echo " " . $lang['overview']; ?></small> |
|
| 31 | + <small><?php echo " ".$lang['overview']; ?></small> |
|
| 32 | 32 | </h1> |
| 33 | 33 | </div> |
| 34 | 34 | </div> |
@@ -37,7 +37,7 @@ discard block |
||
| 37 | 37 | <div class="content-panel"> |
| 38 | 38 | <h4> |
| 39 | 39 | <i class="fa fa-edit"></i> |
| 40 | - <?php echo " " . $lang['logs']; |
|
| 40 | + <?php echo " ".$lang['logs']; |
|
| 41 | 41 | include("views/templates/search.php"); ?> |
| 42 | 42 | </h4> |
| 43 | 43 | <hr class="hidden-xs"> |
@@ -45,7 +45,7 @@ discard block |
||
| 45 | 45 | <thead> |
| 46 | 46 | <tr> |
| 47 | 47 | <th class="hidden-xs"><i |
| 48 | - class="fa fa-pencil-square-o"></i> <?php echo $lang['log'] . ' ' . $lang['id'] ?> |
|
| 48 | + class="fa fa-pencil-square-o"></i> <?php echo $lang['log'].' '.$lang['id'] ?> |
|
| 49 | 49 | </th> |
| 50 | 50 | <th class="hidden-xs"><i class="fa fa-calendar"></i> <?php echo $lang['time']; ?></th> |
| 51 | 51 | <th class="hidden-xs"><i class="fa fa-user"></i> <?php echo $lang['user']; ?></th> |
@@ -57,11 +57,11 @@ discard block |
||
| 57 | 57 | <?php |
| 58 | 58 | while ($row = mysqli_fetch_assoc($result_of_query)) { |
| 59 | 59 | echo "<tr>"; |
| 60 | - echo "<td class='hidden-xs'>" . $row["logid"] . "</td>"; |
|
| 61 | - echo "<td class='hidden-xs'>" . $row["date_time"] . "</td>"; |
|
| 62 | - echo "<td class='hidden-xs'>" . $row["user"] . "</td>"; |
|
| 63 | - echo "<td>" . $row["action"] . "</td>"; |
|
| 64 | - echo "<td class='hidden-xs'>" . $row["level"] . "</td>"; |
|
| 60 | + echo "<td class='hidden-xs'>".$row["logid"]."</td>"; |
|
| 61 | + echo "<td class='hidden-xs'>".$row["date_time"]."</td>"; |
|
| 62 | + echo "<td class='hidden-xs'>".$row["user"]."</td>"; |
|
| 63 | + echo "<td>".$row["action"]."</td>"; |
|
| 64 | + echo "<td class='hidden-xs'>".$row["level"]."</td>"; |
|
| 65 | 65 | echo "</tr>"; |
| 66 | 66 | }; |
| 67 | 67 | echo "</tbody></table>"; |
@@ -1,12 +1,12 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | -$sql = "SELECT `sid` FROM `servers` WHERE `use_sq` = 1 AND `sid` = " . $sid . ";"; |
|
| 2 | +$sql = "SELECT `sid` FROM `servers` WHERE `use_sq` = 1 AND `sid` = ".$sid.";"; |
|
| 3 | 3 | $result_of_query = $db_connection->query($sql); |
| 4 | 4 | if ($result_of_query->num_rows == 1) { ?> |
| 5 | 5 | <div class="row"> |
| 6 | 6 | <div class="col-lg-12"> |
| 7 | 7 | <h1 class="page-header"> |
| 8 | 8 | <?php echo $lang['players']; ?> |
| 9 | - <small><?php echo " " . $lang['overview']; ?></small> |
|
| 9 | + <small><?php echo " ".$lang['overview']; ?></small> |
|
| 10 | 10 | </h1> |
| 11 | 11 | </div> |
| 12 | 12 | </div> |
@@ -27,7 +27,7 @@ discard block |
||
| 27 | 27 | } |
| 28 | 28 | function getPlayers() { |
| 29 | 29 | $.ajax({ |
| 30 | - url: "<?php echo $settings['url'] . 'hooks/rcon_players.php?sid=' . $sid ?>", |
|
| 30 | + url: "<?php echo $settings['url'].'hooks/rcon_players.php?sid='.$sid ?>", |
|
| 31 | 31 | dataType: 'json', |
| 32 | 32 | complete: function(data) { |
| 33 | 33 | console.log(data); |
@@ -53,7 +53,7 @@ discard block |
||
| 53 | 53 | <div class="content-panel"> |
| 54 | 54 | <table class="table table-striped table-advance table-hover"> |
| 55 | 55 | <h4> |
| 56 | - <i class="fa fa-child fa-fw"></i><?php echo " " . $lang['players']; ?> |
|
| 56 | + <i class="fa fa-child fa-fw"></i><?php echo " ".$lang['players']; ?> |
|
| 57 | 57 | <div style="float:right; padding-right: 20px;" id="count"></div> |
| 58 | 58 | </h4> |
| 59 | 59 | <hr> |
@@ -16,7 +16,7 @@ |
||
| 16 | 16 | */ |
| 17 | 17 | public static function getField() |
| 18 | 18 | { |
| 19 | - return "<input name='token' value='" . $_SESSION['formtoken'][0] . "' type='hidden' />"; |
|
| 19 | + return "<input name='token' value='".$_SESSION['formtoken'][0]."' type='hidden' />"; |
|
| 20 | 20 | } |
| 21 | 21 | |
| 22 | 22 | /** |