Passed
Branch master (3a4f24)
by Nicolas
08:34
created
public/php/admin/menus/db_menus_type.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
 //update the menu type
18 18
 if (isset($menus_type_id) and isset($action) and $action == 'update') {
19 19
     $sdbquery = $mysqli->query("UPDATE menu_types_main SET menu_types_text = '$menus_type_name'
20
-        WHERE menu_types_main_id = $menus_type_id") or die('Error: ' . mysqli_error($mysqli));
20
+        WHERE menu_types_main_id = $menus_type_id") or die('Error: '.mysqli_error($mysqli));
21 21
 
22 22
     $_SESSION['edit_message'] = "Menu type succesfully updated";
23 23
 
@@ -29,19 +29,19 @@  discard block
 block discarded – undo
29 29
 if (isset($menus_type_id) and isset($action) and $action == 'delete_menus_type') {
30 30
     // first see if this menu type is used for a menu set or menu disk
31 31
     $sql = $mysqli->query("SELECT * FROM menu_disk_title
32
-            WHERE menu_types_main_id = '$menus_type_id'") or die('Error: ' . mysqli_error($mysqli));
32
+            WHERE menu_types_main_id = '$menus_type_id'") or die('Error: '.mysqli_error($mysqli));
33 33
     if ($sql->num_rows > 0) {
34 34
         $_SESSION['edit_message'] = 'Deletion failed - This menu type is linked to menu disks';
35 35
     } else {
36 36
         $sql = $mysqli->query("SELECT * FROM menu_type
37
-              WHERE menu_types_main_id = '$menus_type_id'") or die('Error: ' . mysqli_error($mysqli));
37
+              WHERE menu_types_main_id = '$menus_type_id'") or die('Error: '.mysqli_error($mysqli));
38 38
         if ($sql->num_rows > 0) {
39 39
             $_SESSION['edit_message'] = 'Deletion failed - This menu type is linked to a menu set';
40 40
         } else {
41 41
             create_log_entry('Menu type', $menus_type_id, 'Menu type', $menus_type_id, 'Delete', $_SESSION['user_id']);
42 42
 
43 43
             $mysqli->query("DELETE FROM menu_types_main WHERE menu_types_main_id = $menus_type_id")
44
-                or die('Error: ' . mysqli_error($mysqli));
44
+                or die('Error: '.mysqli_error($mysqli));
45 45
 
46 46
             $_SESSION['edit_message'] = "Menu type succesfully deleted";
47 47
         }
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
         header("Location: ../menus/menus_type.php");
56 56
     } else {
57 57
         $sql_individuals = $mysqli->query("INSERT INTO  menu_types_main (menu_types_text) VALUES ('$type_name')")
58
-            or die('Error: ' . mysqli_error($mysqli));
58
+            or die('Error: '.mysqli_error($mysqli));
59 59
 
60 60
         $new_menu_type_id = $mysqli->insert_id;
61 61
 
Please login to merge, or discard this patch.
public/php/admin/menus/ajax_menus_detail.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
 
79 79
     //get the doc types
80 80
     $sql_doc_type = "SELECT * from doc_type";
81
-    $query_doc_type = $mysqli->query($sql_doc_type) or die('Error: ' . mysqli_error($mysqli));
81
+    $query_doc_type = $mysqli->query($sql_doc_type) or die('Error: '.mysqli_error($mysqli));
82 82
 
83 83
     while ($query_type = $query_doc_type->fetch_array(MYSQLI_BOTH)) {
84 84
         $smarty->append('doc_type', array(
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
 
94 94
     // Menu state dropdown
95 95
     $query_menu_state = $mysqli->query("SELECT * FROM menu_disk_state ORDER BY state_id ASC")
96
-        or die('Error: ' . mysqli_error($mysqli));
96
+        or die('Error: '.mysqli_error($mysqli));
97 97
 
98 98
     while ($query = $query_menu_state->fetch_array(MYSQLI_BOTH)) {
99 99
         // This smarty is used for for the menu_disk credits
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
                                 FROM menu_disk
113 113
                                 LEFT JOIN menu_set ON (menu_disk.menu_sets_id = menu_set.menu_sets_id)";
114 114
 
115
-    $result_parent = $mysqli->query($sql_parent) or die('Error: ' . mysqli_error($mysqli));
115
+    $result_parent = $mysqli->query($sql_parent) or die('Error: '.mysqli_error($mysqli));
116 116
     while ($row = $result_parent->fetch_array(MYSQLI_BOTH)) {
117 117
         // Create Menu disk name
118 118
         $menu_disk_name = "$row[menu_sets_name] ";
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
     $sql_screenshots = $mysqli->query("SELECT * FROM screenshot_menu
145 145
         LEFT JOIN screenshot_main ON (screenshot_menu.screenshot_id = screenshot_main.screenshot_id)
146 146
         WHERE screenshot_menu.menu_disk_id = '$menu_disk_id' ORDER BY screenshot_menu.screenshot_id")
147
-        or die('Error: ' . mysqli_error($mysqli));
147
+        or die('Error: '.mysqli_error($mysqli));
148 148
 
149 149
     $count         = 1;
150 150
     $v_screenshots = 0;
@@ -174,7 +174,7 @@  discard block
 block discarded – undo
174 174
     //************************************************************************************************
175 175
     //get the existing downloads
176 176
     $SQL_DOWNLOADS = $mysqli->query("SELECT * FROM menu_disk_download WHERE menu_disk_id='$menu_disk_id'")
177
-        or die('Error: ' . mysqli_error($mysqli));
177
+        or die('Error: '.mysqli_error($mysqli));
178 178
 
179 179
     $nr_downloads = 0;
180 180
     while ($downloads = $SQL_DOWNLOADS->fetch_array(MYSQLI_BOTH)) {
@@ -203,7 +203,7 @@  discard block
 block discarded – undo
203 203
             LEFT JOIN menu_set ON (menu_disk.menu_sets_id = menu_set.menu_sets_id)
204 204
             WHERE menu_disk.menu_disk_id = '$menu_disk_id'";
205 205
 
206
-    $result_menus = $mysqli->query($sql_menus) or die('Error: ' . mysqli_error($mysqli));
206
+    $result_menus = $mysqli->query($sql_menus) or die('Error: '.mysqli_error($mysqli));
207 207
 
208 208
     while ($row = $result_menus->fetch_array(MYSQLI_BOTH)) {
209 209
         // Create Menu disk name
@@ -261,7 +261,7 @@  discard block
 block discarded – undo
261 261
 
262 262
     // Get Author types for
263 263
     $sql_author_types = "SELECT * FROM author_type ORDER BY author_type_info ASC";
264
-    $query_author = $mysqli->query($sql_author_types) or die('Error: ' . mysqli_error($mysqli));
264
+    $query_author = $mysqli->query($sql_author_types) or die('Error: '.mysqli_error($mysqli));
265 265
 
266 266
     while ($author_ind = $query_author->fetch_array(MYSQLI_BOTH)) {
267 267
         $smarty->append('author_type', array(
@@ -298,7 +298,7 @@  discard block
 block discarded – undo
298 298
     if (isset($query) and $query !== "empty") {
299 299
         $query = $mysqli->real_escape_string($query);
300 300
         $query_temporary = $mysqli->query("SELECT ind_id,ind_name FROM individuals
301
-            WHERE ind_name LIKE '%$query%' ORDER BY ind_name ASC") or die('Error: ' . mysqli_error($mysqli));
301
+            WHERE ind_name LIKE '%$query%' ORDER BY ind_name ASC") or die('Error: '.mysqli_error($mysqli));
302 302
     } elseif ($query == "empty") {
303 303
         $query_temporary = $mysqli->query("SELECT ind_id,ind_name FROM individuals
304 304
             WHERE ind_name LIKE '%a%' ORDER BY ind_name ASC") or die("Failed to query temporary table");
@@ -314,4 +314,4 @@  discard block
 block discarded – undo
314 314
 }
315 315
 
316 316
 //Send all smarty variables to the templates
317
-$smarty->display("file:" . $cpanel_template_folder . "menus/ajax_menus_detail.html");
317
+$smarty->display("file:".$cpanel_template_folder."menus/ajax_menus_detail.html");
Please login to merge, or discard this patch.
public/php/admin/menus/db_menu_set.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -162,7 +162,7 @@  discard block
 block discarded – undo
162 162
     include("../../config/admin_rights.php");
163 163
     //when deleting a set, we only check for menu disks
164 164
     $sql = $mysqli->query("SELECT * FROM menu_disk WHERE menu_sets_id='$menu_sets_id'")
165
-        or die('Error: ' . mysqli_error($mysqli));
165
+        or die('Error: '.mysqli_error($mysqli));
166 166
     if ($sql->num_rows > 0) {
167 167
         $_SESSION['edit_message'] = "This set still has menu disks linked to it. Delete them first.";
168 168
         header("Location: ../menus/menus_disk_list.php?menu_sets_id=$menu_sets_id");
@@ -170,11 +170,11 @@  discard block
 block discarded – undo
170 170
         create_log_entry('Menu set', $menu_sets_id, 'Menu set', $menu_sets_id, 'Delete', $_SESSION['user_id']);
171 171
 
172 172
         $mysqli->query("DELETE from menu_set WHERE menu_sets_id='$menu_sets_id'")
173
-            or die('Error: ' . mysqli_error($mysqli));
173
+            or die('Error: '.mysqli_error($mysqli));
174 174
         $mysqli->query("DELETE from crew_menu_prod WHERE menu_sets_id='$menu_sets_id'")
175
-            or die('Error: ' . mysqli_error($mysqli));
175
+            or die('Error: '.mysqli_error($mysqli));
176 176
         $mysqli->query("DELETE from ind_menu_prod WHERE menu_sets_id='$menu_sets_id'")
177
-            or die('Error: ' . mysqli_error($mysqli));
177
+            or die('Error: '.mysqli_error($mysqli));
178 178
         $_SESSION['edit_message'] = "Menuset completely removed";
179 179
 
180 180
         //Send all smarty variables to the templates
Please login to merge, or discard this patch.
public/php/admin/menus/ajax_addset_menus.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -82,12 +82,12 @@  discard block
 block discarded – undo
82 82
     WHERE menu_disk_title.menu_types_main_id = '3'";
83 83
 
84 84
 $temp_query = $mysqli->query("CREATE TEMPORARY TABLE temp ENGINE=MEMORY $sql_games_chain")
85
-    or die('Error: ' . mysqli_error($mysqli));
86
-$temp_query = $mysqli->query("INSERT INTO temp $sql_demos_chain") or die('Error: ' . mysqli_error($mysqli));
87
-$temp_query = $mysqli->query("INSERT INTO temp $sql_tools_chain") or die('Error: ' . mysqli_error($mysqli));
85
+    or die('Error: '.mysqli_error($mysqli));
86
+$temp_query = $mysqli->query("INSERT INTO temp $sql_demos_chain") or die('Error: '.mysqli_error($mysqli));
87
+$temp_query = $mysqli->query("INSERT INTO temp $sql_tools_chain") or die('Error: '.mysqli_error($mysqli));
88 88
 
89 89
 $temp_query = $mysqli->query("SELECT * FROM temp ORDER BY menu_sets_name, software_name ASC")
90
-    or die('Error: ' . mysqli_error($mysqli));
90
+    or die('Error: '.mysqli_error($mysqli));
91 91
 
92 92
 $menu_disk_name_compare = "";
93 93
 
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
 //get the titles from this set
129 129
 //First get the setnr
130 130
 $sql_set_nr = "SELECT menu_disk_title_set_nr FROM menu_disk_title_set WHERE menu_disk_title_id = '$menu_disk_title_id'";
131
-$query_ser_nr = $mysqli->query($sql_set_nr) or die('Error: ' . mysqli_error($mysqli));
131
+$query_ser_nr = $mysqli->query($sql_set_nr) or die('Error: '.mysqli_error($mysqli));
132 132
 $query_data = $query_ser_nr->fetch_array(MYSQLI_BOTH);
133 133
 $set_nr     = $query_data['menu_disk_title_set_nr'];
134 134
 
@@ -200,12 +200,12 @@  discard block
 block discarded – undo
200 200
         ORDER BY menu_disk_title_set.menu_disk_title_set_chain ASC";
201 201
 
202 202
     $temp_query = $mysqli->query("CREATE TEMPORARY TABLE temp2 ENGINE=MEMORY $sql_games_chain")
203
-        or die('Error: ' . mysqli_error($mysqli));
204
-    $temp_query = $mysqli->query("INSERT INTO temp2 $sql_demos_chain") or die('Error: ' . mysqli_error($mysqli));
205
-    $temp_query = $mysqli->query("INSERT INTO temp2 $sql_tools_chain") or die('Error: ' . mysqli_error($mysqli));
203
+        or die('Error: '.mysqli_error($mysqli));
204
+    $temp_query = $mysqli->query("INSERT INTO temp2 $sql_demos_chain") or die('Error: '.mysqli_error($mysqli));
205
+    $temp_query = $mysqli->query("INSERT INTO temp2 $sql_tools_chain") or die('Error: '.mysqli_error($mysqli));
206 206
 
207 207
     $temp_query = $mysqli->query("SELECT * FROM temp2 ORDER BY menu_sets_name, software_name ASC")
208
-        or die('Error: ' . mysqli_error($mysqli));
208
+        or die('Error: '.mysqli_error($mysqli));
209 209
 
210 210
     while ($row = $temp_query->fetch_array(MYSQLI_BOTH)) {
211 211
         // Create Menu disk name
@@ -250,4 +250,4 @@  discard block
 block discarded – undo
250 250
 $smarty->assign('title_name', $title_name);
251 251
 
252 252
 //Send all smarty variables to the templates
253
-$smarty->display("file:" . $cpanel_template_folder . "menus/ajax_menus_add_set.html");
253
+$smarty->display("file:".$cpanel_template_folder."menus/ajax_menus_add_set.html");
Please login to merge, or discard this patch.
public/php/admin/menus/ajax_adddocs_menus.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -132,4 +132,4 @@
 block discarded – undo
132 132
 }
133 133
 
134 134
 //Send all smarty variables to the templates
135
-$smarty->display("file:" . $cpanel_template_folder . "menus/ajax_menus_add_docs.html");
135
+$smarty->display("file:".$cpanel_template_folder."menus/ajax_menus_add_docs.html");
Please login to merge, or discard this patch.
public/php/admin/links/link_modlist.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
 include("../../config/admin.php");
26 26
 
27 27
 if (empty($catpick)) {
28
-    $catpick=1;
28
+    $catpick = 1;
29 29
 }
30 30
 
31 31
 $SQL = "SELECT website_category_id, website_category_name FROM website_category ORDER BY website_category_name";
@@ -35,16 +35,16 @@  discard block
 block discarded – undo
35 35
 
36 36
 mysqli_data_seek($linkcategorysql, 0) or die("what happend?");
37 37
 while (list($category_id, $category_name) = $linkcategorysql->fetch_array(MYSQLI_BOTH)) {
38
-    if ($category_id==$website_category_id) {
39
-        $selected="SELECTED";
38
+    if ($category_id == $website_category_id) {
39
+        $selected = "SELECTED";
40 40
     } else {
41
-        $selected="";
41
+        $selected = "";
42 42
     }
43 43
 
44
-    if ($catpick==$category_id) {
45
-        $selected="SELECTED";
44
+    if ($catpick == $category_id) {
45
+        $selected = "SELECTED";
46 46
     } else {
47
-        $selected="";
47
+        $selected = "";
48 48
     }
49 49
 
50 50
     $smarty->append('category', array(
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
 }
55 55
 
56 56
 if (isset($catpick)) {
57
-    $website_category_id=$catpick;
57
+    $website_category_id = $catpick;
58 58
 }
59 59
 
60 60
 $LINKSQL = $mysqli->query("SELECT * FROM website
Please login to merge, or discard this patch.
public/php/admin/links/link_mod.php 2 patches
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -32,11 +32,11 @@
 block discarded – undo
32 32
 
33 33
 $rowlink= $LINKSQL->fetch_array(MYSQLI_BOTH);
34 34
 
35
-  $website_image = $website_image_path;
36
-  $website_image .= $rowlink['website_id'];
37
-  $website_image .= ".";
38
-  $website_image .= $rowlink['website_imgext'];
39
-  $website_description_text = trim($rowlink['description']);
35
+    $website_image = $website_image_path;
36
+    $website_image .= $rowlink['website_id'];
37
+    $website_image .= ".";
38
+    $website_image .= $rowlink['website_imgext'];
39
+    $website_description_text = trim($rowlink['description']);
40 40
 
41 41
 $smarty->assign('website', array(
42 42
     'website_name' => $rowlink['website_name'],
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
         WHERE website.website_id='$website_id'")
31 31
        or die("Error while querying the links database");
32 32
 
33
-$rowlink= $LINKSQL->fetch_array(MYSQLI_BOTH);
33
+$rowlink = $LINKSQL->fetch_array(MYSQLI_BOTH);
34 34
 
35 35
   $website_image = $website_image_path;
36 36
   $website_image .= $rowlink['website_id'];
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
 $smarty->assign('nr_of_cats', $nr_of_cats);
68 68
 
69 69
 // Do the category selector
70
-$RESULT=$mysqli->query("SELECT * FROM website_category ORDER BY website_category_name");
70
+$RESULT = $mysqli->query("SELECT * FROM website_category ORDER BY website_category_name");
71 71
 
72 72
 while ($rowlinkcat = $RESULT->fetch_array(MYSQLI_BOTH)) {
73 73
     $smarty->append('category', array(
Please login to merge, or discard this patch.
public/php/admin/links/link_addnew.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -72,4 +72,4 @@
 block discarded – undo
72 72
 }
73 73
 
74 74
 //Send all smarty variables to the templates
75
-$smarty->display("file:" . $cpanel_template_folder . "links/link_addnew.html");
75
+$smarty->display("file:".$cpanel_template_folder."links/link_addnew.html");
Please login to merge, or discard this patch.
public/php/admin/articles/article_type.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@
 block discarded – undo
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);
Please login to merge, or discard this patch.