@@ -46,7 +46,7 @@ discard block |
||
| 46 | 46 | // Delete did you know quote! |
| 47 | 47 | //**************************************************************************************** |
| 48 | 48 | if (isset($action) and $action == "did_you_know_delete") { |
| 49 | - if ($_SESSION['permission']==1 or $_SESSION['permission']=='1') { |
|
| 49 | + if ($_SESSION['permission'] == 1 or $_SESSION['permission'] == '1') { |
|
| 50 | 50 | create_log_entry('Trivia', $trivia_id, 'DYK', $trivia_id, 'Delete', $_SESSION['user_id']); |
| 51 | 51 | |
| 52 | 52 | $sql = $mysqli->query("DELETE FROM trivia WHERE trivia_id = '$trivia_id'") |
@@ -77,14 +77,14 @@ discard block |
||
| 77 | 77 | $smarty->assign('smarty_action', 'delete_did_you_know'); |
| 78 | 78 | |
| 79 | 79 | //Send to smarty for return value |
| 80 | - $smarty->display("file:" . $cpanel_template_folder . "trivia/ajax_trivia_quotes_edit.html"); |
|
| 80 | + $smarty->display("file:".$cpanel_template_folder."trivia/ajax_trivia_quotes_edit.html"); |
|
| 81 | 81 | } |
| 82 | 82 | |
| 83 | 83 | //**************************************************************************************** |
| 84 | 84 | // Delete trivia quote! |
| 85 | 85 | //**************************************************************************************** |
| 86 | 86 | if (isset($action) and $action == "delete_trivia_quote") { |
| 87 | - if ($_SESSION['permission']==1 or $_SESSION['permission']=='1') { |
|
| 87 | + if ($_SESSION['permission'] == 1 or $_SESSION['permission'] == '1') { |
|
| 88 | 88 | create_log_entry('Trivia', $trivia_quote_id, 'Quote', $trivia_quote_id, 'Delete', $_SESSION['user_id']); |
| 89 | 89 | |
| 90 | 90 | $sql = $mysqli->query("DELETE FROM trivia_quotes WHERE trivia_quote_id = '$trivia_quote_id'") |
@@ -113,7 +113,7 @@ discard block |
||
| 113 | 113 | $smarty->assign('smarty_action', 'delete_trivia_quote'); |
| 114 | 114 | |
| 115 | 115 | //Send to smarty for return value |
| 116 | - $smarty->display("file:" . $cpanel_template_folder . "trivia/ajax_trivia_quotes_edit.html"); |
|
| 116 | + $smarty->display("file:".$cpanel_template_folder."trivia/ajax_trivia_quotes_edit.html"); |
|
| 117 | 117 | } |
| 118 | 118 | |
| 119 | 119 | //**************************************************************************************** |
@@ -126,7 +126,7 @@ discard block |
||
| 126 | 126 | $trivia_quote = $mysqli->real_escape_string($trivia_quote); |
| 127 | 127 | |
| 128 | 128 | $mysqli->query("INSERT INTO trivia_quotes (trivia_quote) VALUES ('$trivia_quote')") |
| 129 | - or die('Error: ' . mysqli_error($mysqli)); |
|
| 129 | + or die('Error: '.mysqli_error($mysqli)); |
|
| 130 | 130 | |
| 131 | 131 | $new_trivia_id = $mysqli->insert_id; |
| 132 | 132 | create_log_entry('Trivia', $new_trivia_id, 'Quote', $new_trivia_id, 'Insert', $_SESSION['user_id']); |
@@ -142,11 +142,11 @@ discard block |
||
| 142 | 142 | //**************************************************************************************** |
| 143 | 143 | if (isset($action) and $action == "edit_trivia_quote") { |
| 144 | 144 | if (isset($trivia_text)) { |
| 145 | - if ($_SESSION['permission']==1 or $_SESSION['permission']=='1') { |
|
| 145 | + if ($_SESSION['permission'] == 1 or $_SESSION['permission'] == '1') { |
|
| 146 | 146 | $trivia_quote = $mysqli->real_escape_string($trivia_text); |
| 147 | 147 | |
| 148 | 148 | $mysqli->query("UPDATE trivia_quotes SET trivia_quote='$trivia_quote' |
| 149 | - WHERE trivia_quote_id = $trivia_quote_id") or die('Error: ' . mysqli_error($mysqli)); |
|
| 149 | + WHERE trivia_quote_id = $trivia_quote_id") or die('Error: '.mysqli_error($mysqli)); |
|
| 150 | 150 | |
| 151 | 151 | create_log_entry('Trivia', $trivia_quote_id, 'Quote', $trivia_quote_id, 'Edit', $_SESSION['user_id']); |
| 152 | 152 | |
@@ -168,7 +168,7 @@ discard block |
||
| 168 | 168 | |
| 169 | 169 | $smarty->assign('smarty_action', 'trivia_quote_update_returnview'); |
| 170 | 170 | //Send all smarty variables to the templates |
| 171 | - $smarty->display("file:" . $cpanel_template_folder . "trivia/ajax_trivia_quotes_edit.html"); |
|
| 171 | + $smarty->display("file:".$cpanel_template_folder."trivia/ajax_trivia_quotes_edit.html"); |
|
| 172 | 172 | } |
| 173 | 173 | } |
| 174 | 174 | |
@@ -177,11 +177,11 @@ discard block |
||
| 177 | 177 | //**************************************************************************************** |
| 178 | 178 | if (isset($action) and $action == "update_trivia") { |
| 179 | 179 | if (isset($trivia_text)) { |
| 180 | - if ($_SESSION['permission']==1 or $_SESSION['permission']=='1') { |
|
| 180 | + if ($_SESSION['permission'] == 1 or $_SESSION['permission'] == '1') { |
|
| 181 | 181 | $trivia_text = $mysqli->real_escape_string($trivia_text); |
| 182 | 182 | |
| 183 | 183 | $mysqli->query("UPDATE trivia SET trivia_text='$trivia_text' WHERE trivia_id = $trivia_id") |
| 184 | - or die('Error: ' . mysqli_error($mysqli)); |
|
| 184 | + or die('Error: '.mysqli_error($mysqli)); |
|
| 185 | 185 | |
| 186 | 186 | create_log_entry('Trivia', $trivia_id, 'Quote', $trivia_id, 'Edit', $_SESSION['user_id']); |
| 187 | 187 | $osd_message = "Trivia quote updated"; |
@@ -205,7 +205,7 @@ discard block |
||
| 205 | 205 | |
| 206 | 206 | $smarty->assign('smarty_action', 'did_you_know_update_returnview'); |
| 207 | 207 | //Send all smarty variables to the templates |
| 208 | - $smarty->display("file:" . $cpanel_template_folder . "trivia/ajax_trivia_quotes_edit.html"); |
|
| 208 | + $smarty->display("file:".$cpanel_template_folder."trivia/ajax_trivia_quotes_edit.html"); |
|
| 209 | 209 | } |
| 210 | 210 | } |
| 211 | 211 | |
@@ -214,10 +214,10 @@ discard block |
||
| 214 | 214 | //**************************************************************************************** |
| 215 | 215 | if ($action == "spotlight_delete") { |
| 216 | 216 | if (isset($spotlight_id)) { |
| 217 | - if ($_SESSION['permission']==1 or $_SESSION['permission']=='1') { |
|
| 217 | + if ($_SESSION['permission'] == 1 or $_SESSION['permission'] == '1') { |
|
| 218 | 218 | //Let's get the screenshot id |
| 219 | 219 | $query_spotlight_screenshot = $mysqli->query("SELECT * FROM spotlight |
| 220 | - WHERE spotlight_id = " . $spotlight_id . "") |
|
| 220 | + WHERE spotlight_id = " . $spotlight_id."") |
|
| 221 | 221 | or die("something is wrong with mysqli of spotlight screenshots"); |
| 222 | 222 | |
| 223 | 223 | while ($sql_spotlight_screenshot = $query_spotlight_screenshot->fetch_array(MYSQLI_BOTH)) { |
@@ -275,7 +275,7 @@ discard block |
||
| 275 | 275 | $smarty->assign('smarty_action', 'delete_spotlight'); |
| 276 | 276 | |
| 277 | 277 | //Send to smarty for return value |
| 278 | - $smarty->display("file:" . $cpanel_template_folder . "trivia/ajax_trivia_quotes_edit.html"); |
|
| 278 | + $smarty->display("file:".$cpanel_template_folder."trivia/ajax_trivia_quotes_edit.html"); |
|
| 279 | 279 | } |
| 280 | 280 | } |
| 281 | 281 | |
@@ -372,11 +372,11 @@ discard block |
||
| 372 | 372 | //**************************************************************************************** |
| 373 | 373 | if (isset($action) and $action == "update_spotlight") { |
| 374 | 374 | if (isset($spot_text)) { |
| 375 | - if ($_SESSION['permission']==1 or $_SESSION['permission']=='1') { |
|
| 375 | + if ($_SESSION['permission'] == 1 or $_SESSION['permission'] == '1') { |
|
| 376 | 376 | $trivia_text = $mysqli->real_escape_string($spot_text); |
| 377 | 377 | |
| 378 | 378 | $mysqli->query("UPDATE spotlight SET spotlight='$trivia_text' WHERE spotlight_id = $spotlight_id") |
| 379 | - or die('Error: ' . mysqli_error($mysqli)); |
|
| 379 | + or die('Error: '.mysqli_error($mysqli)); |
|
| 380 | 380 | |
| 381 | 381 | create_log_entry('Trivia', $spotlight_id, 'Spotlight', $spotlight_id, 'Edit', $_SESSION['user_id']); |
| 382 | 382 | |
@@ -408,6 +408,6 @@ discard block |
||
| 408 | 408 | |
| 409 | 409 | $smarty->assign('smarty_action', 'spotlight_update_returnview'); |
| 410 | 410 | //Send all smarty variables to the templates |
| 411 | - $smarty->display("file:" . $cpanel_template_folder . "trivia/ajax_trivia_quotes_edit.html"); |
|
| 411 | + $smarty->display("file:".$cpanel_template_folder."trivia/ajax_trivia_quotes_edit.html"); |
|
| 412 | 412 | } |
| 413 | 413 | } |
@@ -26,7 +26,7 @@ discard block |
||
| 26 | 26 | |
| 27 | 27 | $smarty->assign('smarty_action', 'trivia_quote_edit'); |
| 28 | 28 | //Send all smarty variables to the templates |
| 29 | - $smarty->display("file:" . $cpanel_template_folder . "trivia/ajax_trivia_quotes_edit.html"); |
|
| 29 | + $smarty->display("file:".$cpanel_template_folder."trivia/ajax_trivia_quotes_edit.html"); |
|
| 30 | 30 | } |
| 31 | 31 | |
| 32 | 32 | if (isset($trivia_quote_id) and $action == "display_trivia_quoute") { |
@@ -39,7 +39,7 @@ discard block |
||
| 39 | 39 | |
| 40 | 40 | $smarty->assign('smarty_action', 'display_trivia_quoute'); |
| 41 | 41 | //Send all smarty variables to the templates |
| 42 | - $smarty->display("file:" . $cpanel_template_folder . "trivia/ajax_trivia_quotes_edit.html"); |
|
| 42 | + $smarty->display("file:".$cpanel_template_folder."trivia/ajax_trivia_quotes_edit.html"); |
|
| 43 | 43 | } |
| 44 | 44 | |
| 45 | 45 | if (isset($trivia_id) and $action == "did_you_know_edit_view") { |
@@ -50,7 +50,7 @@ discard block |
||
| 50 | 50 | |
| 51 | 51 | $smarty->assign('smarty_action', 'did_you_know_edit_view'); |
| 52 | 52 | //Send all smarty variables to the templates |
| 53 | - $smarty->display("file:" . $cpanel_template_folder . "trivia/ajax_trivia_quotes_edit.html"); |
|
| 53 | + $smarty->display("file:".$cpanel_template_folder."trivia/ajax_trivia_quotes_edit.html"); |
|
| 54 | 54 | } |
| 55 | 55 | |
| 56 | 56 | if (isset($spotlight_id) and $action == "spotlight_edit_view") { |
@@ -75,5 +75,5 @@ discard block |
||
| 75 | 75 | |
| 76 | 76 | $smarty->assign('smarty_action', 'spotlight_edit_view'); |
| 77 | 77 | //Send all smarty variables to the templates |
| 78 | - $smarty->display("file:" . $cpanel_template_folder . "trivia/ajax_trivia_quotes_edit.html"); |
|
| 78 | + $smarty->display("file:".$cpanel_template_folder."trivia/ajax_trivia_quotes_edit.html"); |
|
| 79 | 79 | } |
@@ -35,4 +35,4 @@ |
||
| 35 | 35 | } |
| 36 | 36 | |
| 37 | 37 | //Send all smarty variables to the templates |
| 38 | -$smarty->display("file:" . $cpanel_template_folder . "trivia/spotlight.html"); |
|
| 38 | +$smarty->display("file:".$cpanel_template_folder."trivia/spotlight.html"); |
|
@@ -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 . "docs/doc_category.html"); |
|
| 37 | +$smarty->display("file:".$cpanel_template_folder."docs/doc_category.html"); |
|
| 38 | 38 | |
| 39 | 39 | //close the connection |
| 40 | 40 | mysqli_free_result($result_doc_category); |
@@ -48,7 +48,7 @@ |
||
| 48 | 48 | )); |
| 49 | 49 | } |
| 50 | 50 | //Send all smarty variables to the templates |
| 51 | - $smarty->display("file:" . $cpanel_template_folder . "docs/doc_type_edit.html"); |
|
| 51 | + $smarty->display("file:".$cpanel_template_folder."docs/doc_type_edit.html"); |
|
| 52 | 52 | } |
| 53 | 53 | |
| 54 | 54 | //close the connection |
@@ -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 . "docs/doc_type.html"); |
|
| 37 | +$smarty->display("file:".$cpanel_template_folder."docs/doc_type.html"); |
|
| 38 | 38 | |
| 39 | 39 | //close the connection |
| 40 | 40 | mysqli_free_result($result_doc_type); |
@@ -49,7 +49,7 @@ |
||
| 49 | 49 | } |
| 50 | 50 | |
| 51 | 51 | //Send all smarty variables to the templates |
| 52 | - $smarty->display("file:" . $cpanel_template_folder . "docs/doc_category_edit.html"); |
|
| 52 | + $smarty->display("file:".$cpanel_template_folder."docs/doc_category_edit.html"); |
|
| 53 | 53 | } |
| 54 | 54 | |
| 55 | 55 | //close the connection |
@@ -33,4 +33,4 @@ |
||
| 33 | 33 | $smarty->assign('magazine_add_tpl', '1'); |
| 34 | 34 | |
| 35 | 35 | //Send all smarty variables to the templates |
| 36 | -$smarty->display("file:" . $cpanel_template_folder . "magazine/magazine_add.html"); |
|
| 36 | +$smarty->display("file:".$cpanel_template_folder."magazine/magazine_add.html"); |
|
@@ -47,4 +47,4 @@ |
||
| 47 | 47 | )); |
| 48 | 48 | |
| 49 | 49 | //Send all smarty variables to the templates |
| 50 | -$smarty->display("file:" . $cpanel_template_folder . "magazine/magazine_issue_edit.html"); |
|
| 50 | +$smarty->display("file:".$cpanel_template_folder."magazine/magazine_issue_edit.html"); |
|