@@ -23,7 +23,7 @@ discard block |
||
23 | 23 | //*********************************************************************************** |
24 | 24 | //Let's get all the review and author data |
25 | 25 | //*********************************************************************************** |
26 | -$count= 0; |
|
26 | +$count = 0; |
|
27 | 27 | |
28 | 28 | $sql_review = $mysqli->query( |
29 | 29 | "SELECT * FROM game |
@@ -148,7 +148,7 @@ discard block |
||
148 | 148 | //(instead of a post with pure HTML) The translation of the 'enter' breaks is different in JS, so in JS I do |
149 | 149 | //a conversion to a <br>. However, when we edit a comment, this <br> should not be |
150 | 150 | //visible to the user, hence again, now this conversion in php |
151 | - $breaks = array("<br />","<br>","<br/>"); |
|
151 | + $breaks = array("<br />", "<br>", "<br/>"); |
|
152 | 152 | $comment = str_ireplace($breaks, "\r\n", $comment); |
153 | 153 | |
154 | 154 | $date = date("d/m/y", $query_comment['timestamp']); |
@@ -172,7 +172,7 @@ discard block |
||
172 | 172 | } |
173 | 173 | |
174 | 174 | //Send all smarty variables to the templates |
175 | -$smarty->display("file:" . $mainsite_template_folder . "games/games_reviews_detail.html"); |
|
175 | +$smarty->display("file:".$mainsite_template_folder."games/games_reviews_detail.html"); |
|
176 | 176 | |
177 | 177 | //close the connection |
178 | 178 | mysqli_close($mysqli); |
@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | if (isset($action) and $action == 'construction') { |
61 | 61 | $_SESSION['edit_message'] = 'This section will be available soon - currently under construction'; |
62 | 62 | if (isset($_SERVER['HTTP_REFERER'])) { |
63 | - header('Location: ' . $_SERVER['HTTP_REFERER']); |
|
63 | + header('Location: '.$_SERVER['HTTP_REFERER']); |
|
64 | 64 | } else { |
65 | 65 | header('Location: /'); |
66 | 66 | } |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | } |
69 | 69 | |
70 | 70 | //We are using this var to have the frontpage animation happen only once we visit AL |
71 | -if (isset($action) and $action=='first_time') { |
|
71 | +if (isset($action) and $action == 'first_time') { |
|
72 | 72 | $smarty->assign('smarty_action', 'first_time'); |
73 | 73 | } |
74 | 74 |
@@ -13,7 +13,7 @@ |
||
13 | 13 | |
14 | 14 | // Letter parameter is mandatory, and must only have one character |
15 | 15 | // which is a letter, number or '-' |
16 | -if (! isset($letter) || !preg_match("/^[a-z0-9-]$/i", $letter)) { |
|
16 | +if (!isset($letter) || !preg_match("/^[a-z0-9-]$/i", $letter)) { |
|
17 | 17 | http_response_code(400); |
18 | 18 | exit(); |
19 | 19 | } |
@@ -21,14 +21,14 @@ discard block |
||
21 | 21 | require "../../common/tiles/did_you_know_tile.php"; |
22 | 22 | require "../../common/tiles/latest_comments_tile.php"; |
23 | 23 | |
24 | -$v_counter= (isset($_GET["v_counter"]) ? $_GET["v_counter"] : 0); |
|
24 | +$v_counter = (isset($_GET["v_counter"]) ? $_GET["v_counter"] : 0); |
|
25 | 25 | |
26 | 26 | //Select the news from the DB |
27 | 27 | $query_news = $mysqli->query( |
28 | 28 | "SELECT * FROM news |
29 | 29 | LEFT JOIN news_image ON (news.news_image_id = news_image.news_image_id) |
30 | 30 | LEFT JOIN users ON (news.user_id = users.user_id) |
31 | - ORDER BY news.news_date DESC LIMIT " . $v_counter . ", 6" |
|
31 | + ORDER BY news.news_date DESC LIMIT " . $v_counter.", 6" |
|
32 | 32 | ); |
33 | 33 | |
34 | 34 | //check the number of news updates |
@@ -68,13 +68,13 @@ discard block |
||
68 | 68 | //Check if back arrow is needed |
69 | 69 | if ($v_counter > 0) { |
70 | 70 | // Build the link |
71 | - $v_linkback =('?v_counter=' . ($v_counter - 6)); |
|
71 | + $v_linkback = ('?v_counter='.($v_counter - 6)); |
|
72 | 72 | } |
73 | 73 | |
74 | 74 | //Check if we need to place a next arrow |
75 | 75 | if ($v_rows > ($v_counter + 6)) { |
76 | 76 | //Build the link |
77 | - $v_linknext =('?v_counter=' . ($v_counter + 6)); |
|
77 | + $v_linknext = ('?v_counter='.($v_counter + 6)); |
|
78 | 78 | } |
79 | 79 | |
80 | 80 | if (empty($c_counter)) { |
@@ -95,7 +95,7 @@ discard block |
||
95 | 95 | ); |
96 | 96 | |
97 | 97 | //Send all smarty variables to the templates |
98 | -$smarty->display("file:" . $mainsite_template_folder . "news/news.html"); |
|
98 | +$smarty->display("file:".$mainsite_template_folder."news/news.html"); |
|
99 | 99 | |
100 | 100 | //close the connection |
101 | 101 | mysqli_close($mysqli); |
@@ -18,14 +18,14 @@ discard block |
||
18 | 18 | require "../../config/admin.php"; |
19 | 19 | |
20 | 20 | if (isset($action)) { |
21 | - if ($action=='delete_comment') { |
|
21 | + if ($action == 'delete_comment') { |
|
22 | 22 | create_log_entry('Interviews', $comment_id, 'Comment', $comment_id, 'Delete', $_SESSION['user_id']); |
23 | 23 | |
24 | 24 | $sql = $mysqli->query("DELETE FROM interview_user_comments WHERE comment_id = '$comment_id'") |
25 | 25 | or die("couldn't delete game_comment quote"); |
26 | 26 | $sql = $mysqli->query("DELETE FROM comments WHERE comments_id = '$comment_id'") |
27 | 27 | or die("couldn't delete comment quote"); |
28 | - } elseif ($action=="save_comment") { |
|
28 | + } elseif ($action == "save_comment") { |
|
29 | 29 | //$data = $_POST['data']; |
30 | 30 | $data = $mysqli->real_escape_string($data); |
31 | 31 | |
@@ -79,7 +79,7 @@ discard block |
||
79 | 79 | //(instead of a post with pure HTML) The translation of the 'enter' breaks is different in JS, so in JS I do |
80 | 80 | //a conversion to a <br>. However, when we edit a comment, this <br> should not be |
81 | 81 | //visible to the user, hence again, now this conversion in php |
82 | - $breaks = array("<br />","<br>","<br/>"); |
|
82 | + $breaks = array("<br />", "<br>", "<br/>"); |
|
83 | 83 | $comment = str_ireplace($breaks, "\r\n", $comment); |
84 | 84 | |
85 | 85 | $date = date("d/m/y", $query_comment['timestamp']); |
@@ -106,5 +106,5 @@ discard block |
||
106 | 106 | $smarty->assign('selected_interview_id', $interview_id); |
107 | 107 | |
108 | 108 | //Send all smarty variables to the templates |
109 | - $smarty->display("file:" . $mainsite_template_folder . "interviews/ajax_interviews_detail_comments.html"); |
|
109 | + $smarty->display("file:".$mainsite_template_folder."interviews/ajax_interviews_detail_comments.html"); |
|
110 | 110 | } |
@@ -190,7 +190,7 @@ discard block |
||
190 | 190 | //However, when we edit a comment, this <br> should not be visible to the user, hence again, |
191 | 191 | //now this conversion in php |
192 | 192 | |
193 | - $breaks = array( |
|
193 | + $breaks = array( |
|
194 | 194 | "<br />", |
195 | 195 | "<br>", |
196 | 196 | "<br/>" |
@@ -218,7 +218,7 @@ discard block |
||
218 | 218 | } |
219 | 219 | |
220 | 220 | //Send all smarty variables to the templates |
221 | -$smarty->display("file:" . $mainsite_template_folder . "interviews/interviews_detail.html"); |
|
221 | +$smarty->display("file:".$mainsite_template_folder."interviews/interviews_detail.html"); |
|
222 | 222 | |
223 | 223 | //close the connection |
224 | 224 | mysqli_close($mysqli); |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | LEFT JOIN users on (interview_main.user_id = users.user_id) |
41 | 41 | LEFT JOIN individuals on (interview_main.ind_id = individuals.ind_id) |
42 | 42 | LEFT JOIN individual_text on (interview_main.ind_id = individual_text.ind_id) |
43 | - ORDER BY interview_text.interview_date DESC LIMIT " . $v_counter . ", 5" |
|
43 | + ORDER BY interview_text.interview_date DESC LIMIT " . $v_counter.", 5" |
|
44 | 44 | ) |
45 | 45 | or die("Error - Couldn't query interview data"); |
46 | 46 | |
@@ -100,13 +100,13 @@ discard block |
||
100 | 100 | //Check if back arrow is needed |
101 | 101 | if ($v_counter > 0) { |
102 | 102 | // Build the link |
103 | - $v_linkback = ('?v_counter=' . ($v_counter - 5)); |
|
103 | + $v_linkback = ('?v_counter='.($v_counter - 5)); |
|
104 | 104 | } |
105 | 105 | |
106 | 106 | //Check if we need to place a next arrow |
107 | 107 | if ($v_rows > ($v_counter + 5)) { |
108 | 108 | //Build the link |
109 | - $v_linknext = ('?v_counter=' . ($v_counter + 5)); |
|
109 | + $v_linknext = ('?v_counter='.($v_counter + 5)); |
|
110 | 110 | } |
111 | 111 | |
112 | 112 | if (empty($c_counter)) { |
@@ -129,7 +129,7 @@ discard block |
||
129 | 129 | ); |
130 | 130 | |
131 | 131 | //Send all smarty variables to the templates |
132 | -$smarty->display("file:" . $mainsite_template_folder . "interviews/interviews_main.html"); |
|
132 | +$smarty->display("file:".$mainsite_template_folder."interviews/interviews_main.html"); |
|
133 | 133 | |
134 | 134 | //close the connection |
135 | 135 | mysqli_close($mysqli); |
@@ -49,7 +49,7 @@ |
||
49 | 49 | $smarty->assign('action', 'andreas'); |
50 | 50 | } |
51 | 51 | |
52 | -$smarty->display("file:" . $mainsite_template_folder . "about/about.html"); |
|
52 | +$smarty->display("file:".$mainsite_template_folder."about/about.html"); |
|
53 | 53 | |
54 | 54 | //close the connection |
55 | 55 | mysqli_close($mysqli); |
@@ -128,7 +128,7 @@ discard block |
||
128 | 128 | //However, when we edit a comment, this <br> should not be visible to the user, hence again, |
129 | 129 | //now this conversion in php |
130 | 130 | |
131 | - $breaks = array( |
|
131 | + $breaks = array( |
|
132 | 132 | "<br />", |
133 | 133 | "<br>", |
134 | 134 | "<br/>" |
@@ -182,7 +182,7 @@ discard block |
||
182 | 182 | $smarty->assign('nr_articles_author', $count); |
183 | 183 | |
184 | 184 | //Send all smarty variables to the templates |
185 | -$smarty->display("file:" . $mainsite_template_folder . "articles/articles_detail.html"); |
|
185 | +$smarty->display("file:".$mainsite_template_folder."articles/articles_detail.html"); |
|
186 | 186 | |
187 | 187 | //close the connection |
188 | 188 | mysqli_close($mysqli); |