@@ -34,7 +34,7 @@ |
||
| 34 | 34 | $smarty->assign("user_id", $_SESSION['user_id']); |
| 35 | 35 | |
| 36 | 36 | //Send all smarty variables to the templates |
| 37 | -$smarty->display("file:" . $cpanel_template_folder . "articles/article_type.html"); |
|
| 37 | +$smarty->display("file:".$cpanel_template_folder."articles/article_type.html"); |
|
| 38 | 38 | |
| 39 | 39 | //close the connection |
| 40 | 40 | mysqli_free_result($result_menus_type); |
@@ -25,7 +25,7 @@ discard block |
||
| 25 | 25 | |
| 26 | 26 | //If we are uploading new screenshots |
| 27 | 27 | if (isset($action2) and $action2 == 'add_screens') { |
| 28 | - if ($_SESSION['permission']==1 or $_SESSION['permission']=='1') { |
|
| 28 | + if ($_SESSION['permission'] == 1 or $_SESSION['permission'] == '1') { |
|
| 29 | 29 | //Here we'll be looping on each of the inputs on the page that are filled in with an image! |
| 30 | 30 | $image = $_FILES['image']; |
| 31 | 31 | |
@@ -54,7 +54,7 @@ discard block |
||
| 54 | 54 | // this also creates an autoinc number for us. |
| 55 | 55 | |
| 56 | 56 | $sdbquery = $mysqli->query("INSERT INTO screenshot_main (imgext) VALUES ('$ext')") |
| 57 | - or die('Error: ' . mysqli_error($mysqli)); |
|
| 57 | + or die('Error: '.mysqli_error($mysqli)); |
|
| 58 | 58 | |
| 59 | 59 | //select the newly entered screenshot_id from the main table |
| 60 | 60 | $screenshot_id = $mysqli->insert_id; |
@@ -130,7 +130,7 @@ discard block |
||
| 130 | 130 | $smarty->assign('article_id', $article_id); |
| 131 | 131 | |
| 132 | 132 | //Send to smarty for return value |
| 133 | - $smarty->display("file:" . $cpanel_template_folder . "articles/ajax_article_add_screenshots.html"); |
|
| 133 | + $smarty->display("file:".$cpanel_template_folder."articles/ajax_article_add_screenshots.html"); |
|
| 134 | 134 | } |
| 135 | 135 | |
| 136 | 136 | //************************************************************************* |
@@ -186,7 +186,7 @@ discard block |
||
| 186 | 186 | |
| 187 | 187 | //If the delete comment has been triggered |
| 188 | 188 | if (isset($action) and $action == 'delete_screenshot_comment') { |
| 189 | - if ($_SESSION['permission']==1 or $_SESSION['permission']=='1') { |
|
| 189 | + if ($_SESSION['permission'] == 1 or $_SESSION['permission'] == '1') { |
|
| 190 | 190 | $sql_articleshot = $mysqli->query("SELECT * FROM screenshot_article |
| 191 | 191 | WHERE article_id = $article_id |
| 192 | 192 | AND screenshot_id = $screenshot_id") or die("Database error - selecting screenshots article"); |
@@ -268,7 +268,7 @@ discard block |
||
| 268 | 268 | $smarty->assign('article_id', $article_id); |
| 269 | 269 | |
| 270 | 270 | //Send to smarty for return value |
| 271 | - $smarty->display("file:" . $cpanel_template_folder . "articles/ajax_article_add_screenshots.html"); |
|
| 271 | + $smarty->display("file:".$cpanel_template_folder."articles/ajax_article_add_screenshots.html"); |
|
| 272 | 272 | } |
| 273 | 273 | |
| 274 | 274 | //************************************************************************* |
@@ -50,7 +50,7 @@ |
||
| 50 | 50 | } |
| 51 | 51 | |
| 52 | 52 | //Send all smarty variables to the templates |
| 53 | - $smarty->display("file:" . $cpanel_template_folder . "articles/article_type_edit.html"); |
|
| 53 | + $smarty->display("file:".$cpanel_template_folder."articles/article_type_edit.html"); |
|
| 54 | 54 | } |
| 55 | 55 | |
| 56 | 56 | //close the connection |
@@ -111,7 +111,7 @@ |
||
| 111 | 111 | $smarty->assign("user_id", $_SESSION['user_id']); |
| 112 | 112 | |
| 113 | 113 | //Send all smarty variables to the templates |
| 114 | -$smarty->display("file:" . $cpanel_template_folder . "articles/articles_edit.html"); |
|
| 114 | +$smarty->display("file:".$cpanel_template_folder."articles/articles_edit.html"); |
|
| 115 | 115 | |
| 116 | 116 | //close the connection |
| 117 | 117 | mysqli_close($mysqli); |
@@ -48,7 +48,7 @@ discard block |
||
| 48 | 48 | LEFT JOIN article_text on (article_main.article_id = article_text.article_id) |
| 49 | 49 | LEFT JOIN article_type on (article_main.article_type_id = article_type.article_type_id) |
| 50 | 50 | LEFT JOIN users on ( article_main.user_id = users.user_id ) |
| 51 | - ORDER BY article_text.article_date DESC LIMIT " . $v_counter . ", 5") |
|
| 51 | + ORDER BY article_text.article_date DESC LIMIT " . $v_counter.", 5") |
|
| 52 | 52 | or die("Couldn't query database for articles"); |
| 53 | 53 | |
| 54 | 54 | while ($article = $sql_articles->fetch_array(MYSQLI_BOTH)) { |
@@ -77,13 +77,13 @@ discard block |
||
| 77 | 77 | //Check if back arrow is needed |
| 78 | 78 | if ($v_counter > 0) { |
| 79 | 79 | // Build the link |
| 80 | - $v_linkback = ('?v_counter=' . ($v_counter - 5)); |
|
| 80 | + $v_linkback = ('?v_counter='.($v_counter - 5)); |
|
| 81 | 81 | } |
| 82 | 82 | |
| 83 | 83 | //Check if we need to place a next arrow |
| 84 | 84 | if ($v_rows > ($v_counter + 5)) { |
| 85 | 85 | //Build the link |
| 86 | - $v_linknext = ('?v_counter=' . ($v_counter + 5)); |
|
| 86 | + $v_linknext = ('?v_counter='.($v_counter + 5)); |
|
| 87 | 87 | } |
| 88 | 88 | |
| 89 | 89 | if (empty($c_counter)) { |
@@ -106,7 +106,7 @@ discard block |
||
| 106 | 106 | $smarty->assign("user_id", $_SESSION['user_id']); |
| 107 | 107 | |
| 108 | 108 | //Send all smarty variables to the templates |
| 109 | -$smarty->display("file:" . $cpanel_template_folder . "articles/articles_main.html"); |
|
| 109 | +$smarty->display("file:".$cpanel_template_folder."articles/articles_main.html"); |
|
| 110 | 110 | |
| 111 | 111 | //close the connection |
| 112 | 112 | mysqli_close($mysqli); |
@@ -19,7 +19,7 @@ discard block |
||
| 19 | 19 | // Changes per Section by this user |
| 20 | 20 | //************************************** |
| 21 | 21 | //* Changelog - Games |
| 22 | -$result = $mysqli->query("SELECT * FROM change_log WHERE section = 'Games' and user_id = $user_id_contrib") |
|
| 22 | +$result = $mysqli->query("SELECT * FROM change_log WHERE section = 'Games' and user_id = $user_id_contrib") |
|
| 23 | 23 | or die("error getting games from change_log"); |
| 24 | 24 | $change_log = $result->num_rows; |
| 25 | 25 | $change_log_bg[0] = "#c2c2c2"; |
@@ -27,7 +27,7 @@ discard block |
||
| 27 | 27 | $change_log_label[0] = "Games"; |
| 28 | 28 | |
| 29 | 29 | //* Changelog - Links |
| 30 | -$result = $mysqli->query("SELECT * FROM change_log WHERE section = 'Links' and user_id = $user_id_contrib") |
|
| 30 | +$result = $mysqli->query("SELECT * FROM change_log WHERE section = 'Links' and user_id = $user_id_contrib") |
|
| 31 | 31 | or die("error getting Links from change_log"); |
| 32 | 32 | $change_log = $result->num_rows; |
| 33 | 33 | $change_log_bg[1] = "#666666"; |
@@ -35,7 +35,7 @@ discard block |
||
| 35 | 35 | $change_log_label[1] = "Links"; |
| 36 | 36 | |
| 37 | 37 | //* Changelog - Individuals |
| 38 | -$result = $mysqli->query("SELECT * FROM change_log WHERE section = 'Individuals' and user_id = $user_id_contrib") |
|
| 38 | +$result = $mysqli->query("SELECT * FROM change_log WHERE section = 'Individuals' and user_id = $user_id_contrib") |
|
| 39 | 39 | or die("error getting Individuals from change_log"); |
| 40 | 40 | $change_log = $result->num_rows; |
| 41 | 41 | $change_log_bg[2] = "#c2c2c2"; |
@@ -43,7 +43,7 @@ discard block |
||
| 43 | 43 | $change_log_label[2] = "Individuals"; |
| 44 | 44 | |
| 45 | 45 | //* Changelog - News |
| 46 | -$result = $mysqli->query("SELECT * FROM change_log WHERE section = 'News' and user_id = $user_id_contrib") |
|
| 46 | +$result = $mysqli->query("SELECT * FROM change_log WHERE section = 'News' and user_id = $user_id_contrib") |
|
| 47 | 47 | or die("error getting News from change_log"); |
| 48 | 48 | $change_log = $result->num_rows; |
| 49 | 49 | $change_log_bg[3] = "#666666"; |
@@ -51,7 +51,7 @@ discard block |
||
| 51 | 51 | $change_log_label[3] = "News"; |
| 52 | 52 | |
| 53 | 53 | //* Changelog - Crew |
| 54 | -$result = $mysqli->query("SELECT * FROM change_log WHERE section = 'Crew' and user_id = $user_id_contrib") |
|
| 54 | +$result = $mysqli->query("SELECT * FROM change_log WHERE section = 'Crew' and user_id = $user_id_contrib") |
|
| 55 | 55 | or die("error getting Crew from change_log"); |
| 56 | 56 | $change_log = $result->num_rows; |
| 57 | 57 | $change_log_bg[4] = "#c2c2c2"; |
@@ -59,7 +59,7 @@ discard block |
||
| 59 | 59 | $change_log_label[4] = "Crew"; |
| 60 | 60 | |
| 61 | 61 | //* Changelog - Menu disk |
| 62 | -$result = $mysqli->query("SELECT * FROM change_log WHERE section = 'Menu disk' and user_id = $user_id_contrib") |
|
| 62 | +$result = $mysqli->query("SELECT * FROM change_log WHERE section = 'Menu disk' and user_id = $user_id_contrib") |
|
| 63 | 63 | or die("error getting Menu disk from change_log"); |
| 64 | 64 | $change_log = $result->num_rows; |
| 65 | 65 | $change_log_bg[5] = "#666666"; |
@@ -67,7 +67,7 @@ discard block |
||
| 67 | 67 | $change_log_label[5] = "Menu disk"; |
| 68 | 68 | |
| 69 | 69 | //* Changelog - Downloads |
| 70 | -$result = $mysqli->query("SELECT * FROM change_log WHERE section = 'Downloads' and user_id = $user_id_contrib") |
|
| 70 | +$result = $mysqli->query("SELECT * FROM change_log WHERE section = 'Downloads' and user_id = $user_id_contrib") |
|
| 71 | 71 | or die("error getting Downloads from change_log"); |
| 72 | 72 | $change_log = $result->num_rows; |
| 73 | 73 | $change_log_bg[6] = "#c2c2c2"; |
@@ -75,7 +75,7 @@ discard block |
||
| 75 | 75 | $change_log_label[6] = "Downloads"; |
| 76 | 76 | |
| 77 | 77 | //* Changelog - Articles |
| 78 | -$result = $mysqli->query("SELECT * FROM change_log WHERE section = 'Articles' and user_id = $user_id_contrib") |
|
| 78 | +$result = $mysqli->query("SELECT * FROM change_log WHERE section = 'Articles' and user_id = $user_id_contrib") |
|
| 79 | 79 | or die("error getting Articles from change_log"); |
| 80 | 80 | $change_log = $result->num_rows; |
| 81 | 81 | $change_log_bg[7] = "#666666"; |
@@ -59,18 +59,18 @@ |
||
| 59 | 59 | $smarty->append( |
| 60 | 60 | 'comments', |
| 61 | 61 | array('comment' => $oldcomment, |
| 62 | - 'comment_edit' => $comment, |
|
| 63 | - 'comment_id' => $query_comment['comment_id'], |
|
| 64 | - 'date' => $date, |
|
| 65 | - 'game' => $query_comment['game_name'], |
|
| 66 | - 'game_id' => $query_comment['game_id'], |
|
| 67 | - 'user_name' => $query_comment['userid'], |
|
| 68 | - 'user_id' => $query_comment['user_id'], |
|
| 69 | - 'user_fb' => $query_comment['user_fb'], |
|
| 70 | - 'user_website' => $query_comment['user_website'], |
|
| 71 | - 'user_twitter' => $query_comment['user_twitter'], |
|
| 72 | - 'user_af' => $query_comment['user_af'], |
|
| 73 | - 'show_email' => $query_comment['show_email'], |
|
| 74 | - 'email' => $query_comment['email']) |
|
| 62 | + 'comment_edit' => $comment, |
|
| 63 | + 'comment_id' => $query_comment['comment_id'], |
|
| 64 | + 'date' => $date, |
|
| 65 | + 'game' => $query_comment['game_name'], |
|
| 66 | + 'game_id' => $query_comment['game_id'], |
|
| 67 | + 'user_name' => $query_comment['userid'], |
|
| 68 | + 'user_id' => $query_comment['user_id'], |
|
| 69 | + 'user_fb' => $query_comment['user_fb'], |
|
| 70 | + 'user_website' => $query_comment['user_website'], |
|
| 71 | + 'user_twitter' => $query_comment['user_twitter'], |
|
| 72 | + 'user_af' => $query_comment['user_af'], |
|
| 73 | + 'show_email' => $query_comment['show_email'], |
|
| 74 | + 'email' => $query_comment['email']) |
|
| 75 | 75 | ); |
| 76 | 76 | } |
@@ -51,7 +51,7 @@ |
||
| 51 | 51 | //(instead of a post with pure HTML) The translation of the 'enter' breaks is different in JS, so in JS I do a |
| 52 | 52 | // conversion to a <br>. However, when we edit a comment, this <br> should not be |
| 53 | 53 | //visible to the user, hence again, now this conversion in php |
| 54 | - $breaks = array("<br />","<br>","<br/>"); |
|
| 54 | + $breaks = array("<br />", "<br>", "<br/>"); |
|
| 55 | 55 | $comment = str_ireplace($breaks, "\r\n", $comment); |
| 56 | 56 | |
| 57 | 57 | $date = date("d/m/y", $query_comment['timestamp']); |
@@ -36,7 +36,7 @@ |
||
| 36 | 36 | |
| 37 | 37 | $smarty->append( |
| 38 | 38 | 'recent_interviews', |
| 39 | - array( 'individual_name' => $sql_recent_interviews['ind_name'], |
|
| 39 | + array('individual_name' => $sql_recent_interviews['ind_name'], |
|
| 40 | 40 | 'individual_id' => $sql_recent_interviews['ind_id'], |
| 41 | 41 | 'interview_author' => $sql_recent_interviews['userid'], |
| 42 | 42 | 'interview_author_id' => $sql_recent_interviews['user_id'], |
@@ -80,19 +80,19 @@ |
||
| 80 | 80 | $smarty->append( |
| 81 | 81 | 'comments', |
| 82 | 82 | array('comment' => $oldcomment, |
| 83 | - 'comment_edit' => $comment, |
|
| 84 | - 'comment_id' => $query_comment['comment_id'], |
|
| 85 | - 'date' => $date, |
|
| 86 | - 'game' => $query_comment['game_name'], |
|
| 87 | - 'game_id' => $query_comment['game_id'], |
|
| 88 | - 'user_name' => $query_comment['userid'], |
|
| 89 | - 'user_id' => $query_comment['user_id'], |
|
| 90 | - 'user_fb' => $query_comment['user_fb'], |
|
| 91 | - 'user_website' => $query_comment['user_website'], |
|
| 92 | - 'user_twitter' => $query_comment['user_twitter'], |
|
| 93 | - 'user_af' => $query_comment['user_af'], |
|
| 94 | - 'show_email' => $query_comment['show_email'], |
|
| 95 | - 'email' => $query_comment['email']) |
|
| 83 | + 'comment_edit' => $comment, |
|
| 84 | + 'comment_id' => $query_comment['comment_id'], |
|
| 85 | + 'date' => $date, |
|
| 86 | + 'game' => $query_comment['game_name'], |
|
| 87 | + 'game_id' => $query_comment['game_id'], |
|
| 88 | + 'user_name' => $query_comment['userid'], |
|
| 89 | + 'user_id' => $query_comment['user_id'], |
|
| 90 | + 'user_fb' => $query_comment['user_fb'], |
|
| 91 | + 'user_website' => $query_comment['user_website'], |
|
| 92 | + 'user_twitter' => $query_comment['user_twitter'], |
|
| 93 | + 'user_af' => $query_comment['user_af'], |
|
| 94 | + 'show_email' => $query_comment['show_email'], |
|
| 95 | + 'email' => $query_comment['email']) |
|
| 96 | 96 | ); |
| 97 | 97 | } |
| 98 | 98 | |
@@ -19,7 +19,7 @@ discard block |
||
| 19 | 19 | include("../../config/admin.php"); |
| 20 | 20 | |
| 21 | 21 | if (isset($action)) { |
| 22 | - if ($action=='delete_comment') { |
|
| 22 | + if ($action == 'delete_comment') { |
|
| 23 | 23 | create_log_entry('Games', $comment_id, 'Comment', $comment_id, 'Delete', $_SESSION['user_id']); |
| 24 | 24 | |
| 25 | 25 | $sql = $mysqli->query("DELETE FROM game_user_comments WHERE comment_id = '$comment_id'") |
@@ -72,7 +72,7 @@ discard block |
||
| 72 | 72 | //(instead of a post with pure HTML) The translation of the 'enter' breaks is different in JS, so in JS I do a |
| 73 | 73 | // conversion to a <br>. However, when we edit a comment, this <br> should not be |
| 74 | 74 | //visible to the user, hence again, now this conversion in php |
| 75 | - $breaks = array("<br />","<br>","<br/>"); |
|
| 75 | + $breaks = array("<br />", "<br>", "<br/>"); |
|
| 76 | 76 | $comment = str_ireplace($breaks, "\r\n", $comment); |
| 77 | 77 | |
| 78 | 78 | $date = date("F j, Y", $query_comment['timestamp']); |
@@ -97,5 +97,5 @@ discard block |
||
| 97 | 97 | } |
| 98 | 98 | |
| 99 | 99 | $smarty->assign('smarty_action', 'delete_comment'); |
| 100 | - $smarty->display("file:" . $mainsite_template_folder. "latest_comments_tile.html"); |
|
| 100 | + $smarty->display("file:".$mainsite_template_folder."latest_comments_tile.html"); |
|
| 101 | 101 | } |