@@ -46,4 +46,4 @@ |
||
46 | 46 | } |
47 | 47 | |
48 | 48 | //Send all smarty variables to the templates |
49 | -$smarty->display("file:" . $cpanel_template_folder . "news/ajax_news_approve_edit.html"); |
|
49 | +$smarty->display("file:".$cpanel_template_folder."news/ajax_news_approve_edit.html"); |
@@ -46,7 +46,7 @@ |
||
46 | 46 | $smarty->assign("user_id", $_SESSION['user_id']); |
47 | 47 | |
48 | 48 | //Send all smarty variables to the templates |
49 | -$smarty->display("file:" . $cpanel_template_folder . "news/news_add.html"); |
|
49 | +$smarty->display("file:".$cpanel_template_folder."news/news_add.html"); |
|
50 | 50 | |
51 | 51 | //close the connection |
52 | 52 | mysqli_close($mysqli); |
@@ -30,7 +30,7 @@ |
||
30 | 30 | ); |
31 | 31 | |
32 | 32 | //Send all smarty variables to the templates |
33 | -$smarty->display("file:" . $cpanel_template_folder . "news/ajax_news_edit.html"); |
|
33 | +$smarty->display("file:".$cpanel_template_folder."news/ajax_news_edit.html"); |
|
34 | 34 | |
35 | 35 | //close the connection |
36 | 36 | mysqli_close($mysqli); |
@@ -51,7 +51,7 @@ |
||
51 | 51 | $smarty->assign("user_id", $_SESSION['user_id']); |
52 | 52 | |
53 | 53 | //Send all smarty variables to the templates |
54 | -$smarty->display("file:" . $cpanel_template_folder . "news/news_approve.html"); |
|
54 | +$smarty->display("file:".$cpanel_template_folder."news/news_approve.html"); |
|
55 | 55 | |
56 | 56 | //close the connection |
57 | 57 | mysqli_close($mysqli); |
@@ -32,7 +32,7 @@ discard block |
||
32 | 32 | // This is where we delete news posts |
33 | 33 | //**************************************************************************************** |
34 | 34 | if (isset($action) and $action == "delete_news") { |
35 | - if ($_SESSION['permission']==1 or $_SESSION['permission']=='1') { |
|
35 | + if ($_SESSION['permission'] == 1 or $_SESSION['permission'] == '1') { |
|
36 | 36 | create_log_entry('News', $news_id, 'News item', $news_id, 'Delete', $_SESSION['user_id']); |
37 | 37 | |
38 | 38 | $mysqli->query("delete from |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | // This is where we will update a submission. |
87 | 87 | //**************************************************************************************** |
88 | 88 | if (isset($action) and $action == "save_news_text") { |
89 | - if ($_SESSION['permission']==1 or $_SESSION['permission']=='1') { |
|
89 | + if ($_SESSION['permission'] == 1 or $_SESSION['permission'] == '1') { |
|
90 | 90 | if (isset($news_id)) { |
91 | 91 | create_log_entry('News', $news_id, 'News submit', $news_id, 'Update', $_SESSION['user_id']); |
92 | 92 | |
@@ -128,7 +128,7 @@ discard block |
||
128 | 128 | $smarty->assign("user_id", $_SESSION['user_id']); |
129 | 129 | |
130 | 130 | //Send to smarty for return value |
131 | - $smarty->display("file:" . $cpanel_template_folder . "news/ajax_news_approve_edit.html"); |
|
131 | + $smarty->display("file:".$cpanel_template_folder."news/ajax_news_approve_edit.html"); |
|
132 | 132 | } |
133 | 133 | |
134 | 134 | //**************************************************************************************** |
@@ -136,7 +136,7 @@ discard block |
||
136 | 136 | // it to the news page |
137 | 137 | //**************************************************************************************** |
138 | 138 | if (isset($action) and $action == "approve_submission") { |
139 | - if ($_SESSION['permission']==1 or $_SESSION['permission']=='1') { |
|
139 | + if ($_SESSION['permission'] == 1 or $_SESSION['permission'] == '1') { |
|
140 | 140 | include("../../lib/functions_search.php"); |
141 | 141 | $sql_submission = "SELECT |
142 | 142 | news_headline, |
@@ -196,14 +196,14 @@ discard block |
||
196 | 196 | $smarty->assign("user_id", $_SESSION['user_id']); |
197 | 197 | |
198 | 198 | //Send to smarty for return value |
199 | - $smarty->display("file:" . $cpanel_template_folder . "news/ajax_news_approve_edit.html"); |
|
199 | + $smarty->display("file:".$cpanel_template_folder."news/ajax_news_approve_edit.html"); |
|
200 | 200 | } |
201 | 201 | |
202 | 202 | //******************************************************************************************** |
203 | 203 | // This is where we will delete unapproved news. It will be deleted from the submission table |
204 | 204 | //******************************************************************************************** |
205 | 205 | if (isset($action) and $action == "delete_submission") { |
206 | - if ($_SESSION['permission']==1 or $_SESSION['permission']=='1') { |
|
206 | + if ($_SESSION['permission'] == 1 or $_SESSION['permission'] == '1') { |
|
207 | 207 | create_log_entry('News', $news_id, 'News submit', $news_id, 'Delete', $_SESSION['user_id']); |
208 | 208 | |
209 | 209 | $mysqli->query("delete from |
@@ -233,14 +233,14 @@ discard block |
||
233 | 233 | $smarty->assign("user_id", $_SESSION['user_id']); |
234 | 234 | |
235 | 235 | //Send to smarty for return value |
236 | - $smarty->display("file:" . $cpanel_template_folder . "news/ajax_news_approve_edit.html"); |
|
236 | + $smarty->display("file:".$cpanel_template_folder."news/ajax_news_approve_edit.html"); |
|
237 | 237 | } |
238 | 238 | |
239 | 239 | //**************************************************************************************** |
240 | 240 | // This is where we will update a news post. |
241 | 241 | //****************************************************************************************e |
242 | 242 | if (isset($action) and $action == "save_news_post_text") { |
243 | - if ($_SESSION['permission']==1 or $_SESSION['permission']=='1') { |
|
243 | + if ($_SESSION['permission'] == 1 or $_SESSION['permission'] == '1') { |
|
244 | 244 | if (isset($news_id)) { |
245 | 245 | create_log_entry('News', $news_id, 'News item', $news_id, 'Update', $_SESSION['user_id']); |
246 | 246 | |
@@ -280,7 +280,7 @@ discard block |
||
280 | 280 | $smarty->assign("user_id", $_SESSION['user_id']); |
281 | 281 | |
282 | 282 | //Send to smarty for return value |
283 | - $smarty->display("file:" . $cpanel_template_folder . "news/ajax_news_post_edit.html"); |
|
283 | + $smarty->display("file:".$cpanel_template_folder."news/ajax_news_post_edit.html"); |
|
284 | 284 | } |
285 | 285 | |
286 | 286 | if (isset($action) and $action == "image_upload") { |
@@ -42,7 +42,7 @@ |
||
42 | 42 | } |
43 | 43 | |
44 | 44 | //Send all smarty variables to the templates |
45 | -$smarty->display("file:" . $cpanel_template_folder . "news/ajax_news_post_edit.html"); |
|
45 | +$smarty->display("file:".$cpanel_template_folder."news/ajax_news_post_edit.html"); |
|
46 | 46 | |
47 | 47 | //close the connection |
48 | 48 | mysqli_close($mysqli); |
@@ -36,4 +36,4 @@ |
||
36 | 36 | $smarty->assign("user_id", $_SESSION['user_id']); |
37 | 37 | |
38 | 38 | //Send all smarty variables to the templates |
39 | -$smarty->display("file:" . $cpanel_template_folder . "news/ajax_news.html"); |
|
39 | +$smarty->display("file:".$cpanel_template_folder."news/ajax_news.html"); |
@@ -10,7 +10,7 @@ |
||
10 | 10 | * |
11 | 11 | ***************************************************************************/ |
12 | 12 | |
13 | - //load all common functions |
|
13 | + //load all common functions |
|
14 | 14 | include("../../config/common.php"); |
15 | 15 | include("../../config/admin.php"); |
16 | 16 |
@@ -38,7 +38,7 @@ |
||
38 | 38 | $smarty->assign("news_search", $newssearch); |
39 | 39 | |
40 | 40 | //Send all smarty variables to the templates |
41 | -$smarty->display("file:" . $cpanel_template_folder . "news/ajax_news_search.html"); |
|
41 | +$smarty->display("file:".$cpanel_template_folder."news/ajax_news_search.html"); |
|
42 | 42 | |
43 | 43 | //close the connection |
44 | 44 | mysqli_close($mysqli); |
@@ -49,7 +49,7 @@ |
||
49 | 49 | $smarty->assign('nr_news', $newsDAO->getNewsCount()); |
50 | 50 | |
51 | 51 | //Send all smarty variables to the templates |
52 | -$smarty->display("file:" . $cpanel_template_folder . "news/news_edit.html"); |
|
52 | +$smarty->display("file:".$cpanel_template_folder."news/news_edit.html"); |
|
53 | 53 | |
54 | 54 | //close the connection |
55 | 55 | mysqli_close($mysqli); |