@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | LEFT JOIN article_text on (article_main.article_id = article_text.article_id) |
36 | 36 | LEFT JOIN article_type on (article_main.article_type_id = article_type.article_type_id) |
37 | 37 | LEFT JOIN users on ( article_main.user_id = users.user_id ) |
38 | - ORDER BY article_text.article_date DESC LIMIT " . $v_counter . ", 5" |
|
38 | + ORDER BY article_text.article_date DESC LIMIT " . $v_counter.", 5" |
|
39 | 39 | ) or die("Couldn't query database for articles"); |
40 | 40 | |
41 | 41 | while ($article = $sql_articles->fetch_array(MYSQLI_BOTH)) { |
@@ -84,13 +84,13 @@ discard block |
||
84 | 84 | //Check if back arrow is needed |
85 | 85 | if ($v_counter > 0) { |
86 | 86 | // Build the link |
87 | - $v_linkback = ('?v_counter=' . ($v_counter - 5)); |
|
87 | + $v_linkback = ('?v_counter='.($v_counter - 5)); |
|
88 | 88 | } |
89 | 89 | |
90 | 90 | //Check if we need to place a next arrow |
91 | 91 | if ($v_rows > ($v_counter + 5)) { |
92 | 92 | //Build the link |
93 | - $v_linknext = ('?v_counter=' . ($v_counter + 5)); |
|
93 | + $v_linknext = ('?v_counter='.($v_counter + 5)); |
|
94 | 94 | } |
95 | 95 | |
96 | 96 | if (empty($c_counter)) { |
@@ -113,7 +113,7 @@ discard block |
||
113 | 113 | ); |
114 | 114 | |
115 | 115 | //Send all smarty variables to the templates |
116 | -$smarty->display("file:" . $mainsite_template_folder . "articles/articles_main.html"); |
|
116 | +$smarty->display("file:".$mainsite_template_folder."articles/articles_main.html"); |
|
117 | 117 | |
118 | 118 | //close the connection |
119 | 119 | mysqli_close($mysqli); |
@@ -10,10 +10,10 @@ |
||
10 | 10 | |
11 | 11 | //Include this file if you want a page to require admin permission level |
12 | 12 | //I'm using this file to check if the user has the rights to update the DB (only used in CPANEL) |
13 | -if ($_SESSION['permission']==1 or $_SESSION['permission']=='1') { |
|
13 | +if ($_SESSION['permission'] == 1 or $_SESSION['permission'] == '1') { |
|
14 | 14 | } else { |
15 | 15 | $_SESSION['edit_message'] = "You do not have the necessary authorizations to perform this action"; |
16 | 16 | //header("Location: ../administration/statistics.php"); |
17 | - header('Location: ' . $_SERVER['HTTP_REFERER']); |
|
17 | + header('Location: '.$_SERVER['HTTP_REFERER']); |
|
18 | 18 | die(''); |
19 | 19 | } |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | define("CAN_REGISTER", "any"); |
56 | 56 | define("DEFAULT_ROLE", "member"); |
57 | 57 | |
58 | -define("SECURE", false); // FOR DEVELOPMENT ONLY!!!! |
|
58 | +define("SECURE", false); // FOR DEVELOPMENT ONLY!!!! |
|
59 | 59 | |
60 | 60 | //*************************************************************** |
61 | 61 | // Mail server variables -- change these is we change server! |
@@ -73,81 +73,81 @@ discard block |
||
73 | 73 | //*************************************************************** |
74 | 74 | |
75 | 75 | // database dumps |
76 | -$database_dumps_path="../../data/database-dumps/"; |
|
76 | +$database_dumps_path = "../../data/database-dumps/"; |
|
77 | 77 | |
78 | 78 | //articles |
79 | -$article_screenshot_path="../../data/images/article_screenshots/"; |
|
80 | -$article_screenshot_save_path="../../../data/images/article_screenshots/"; |
|
79 | +$article_screenshot_path = "../../data/images/article_screenshots/"; |
|
80 | +$article_screenshot_save_path = "../../../data/images/article_screenshots/"; |
|
81 | 81 | |
82 | 82 | //company |
83 | -$company_screenshot_path="../../data/images/company_logos/"; |
|
84 | -$company_screenshot_save_path="../../../data/images/company_logos/"; |
|
85 | -$individual_screenshot_path="../../data/images/individual_screenshots/"; |
|
86 | -$individual_screenshot_save_path="../../../data/images/individual_screenshots/"; |
|
83 | +$company_screenshot_path = "../../data/images/company_logos/"; |
|
84 | +$company_screenshot_save_path = "../../../data/images/company_logos/"; |
|
85 | +$individual_screenshot_path = "../../data/images/individual_screenshots/"; |
|
86 | +$individual_screenshot_save_path = "../../../data/images/individual_screenshots/"; |
|
87 | 87 | |
88 | 88 | //games |
89 | -$game_boxscan_path="../../data/images/game_boxscans/"; |
|
90 | -$game_boxscan_save_path="../../../data/images/game_boxscans/"; |
|
91 | -$game_file_path="../../../data/zips/games/"; |
|
92 | -$game_file_temp_path="../../../data/zips/temp/"; |
|
93 | -$game_gallery_path="../../data/images/game_gallery/"; |
|
94 | -$game_screenshot_path="../../data/images/game_screenshots/"; |
|
95 | -$game_screenshot_save_path="../../../data/images/game_screenshots/"; |
|
96 | -$game_submit_screenshot_path="../../data/images/game_submit_screenshots/"; |
|
97 | -$game_submit_screenshot_save_path="../../../data/images/game_submit_screenshots/"; |
|
98 | -$game_fact_screenshot_path="../../data/images/game_fact_screenshots/"; |
|
99 | -$game_fact_screenshot_save_path="../../../data/images/game_fact_screenshots/"; |
|
100 | -$music_game_path="../../data/music/games/"; |
|
101 | -$music_game_save_path="../../../data/music/games/"; |
|
89 | +$game_boxscan_path = "../../data/images/game_boxscans/"; |
|
90 | +$game_boxscan_save_path = "../../../data/images/game_boxscans/"; |
|
91 | +$game_file_path = "../../../data/zips/games/"; |
|
92 | +$game_file_temp_path = "../../../data/zips/temp/"; |
|
93 | +$game_gallery_path = "../../data/images/game_gallery/"; |
|
94 | +$game_screenshot_path = "../../data/images/game_screenshots/"; |
|
95 | +$game_screenshot_save_path = "../../../data/images/game_screenshots/"; |
|
96 | +$game_submit_screenshot_path = "../../data/images/game_submit_screenshots/"; |
|
97 | +$game_submit_screenshot_save_path = "../../../data/images/game_submit_screenshots/"; |
|
98 | +$game_fact_screenshot_path = "../../data/images/game_fact_screenshots/"; |
|
99 | +$game_fact_screenshot_save_path = "../../../data/images/game_fact_screenshots/"; |
|
100 | +$music_game_path = "../../data/music/games/"; |
|
101 | +$music_game_save_path = "../../../data/music/games/"; |
|
102 | 102 | |
103 | 103 | //releases |
104 | -$game_release_scan_path="../../data/images/game_release_scans/"; |
|
105 | -$game_release_scan_save_path="../../../data/images/game_release_scans/"; |
|
104 | +$game_release_scan_path = "../../data/images/game_release_scans/"; |
|
105 | +$game_release_scan_save_path = "../../../data/images/game_release_scans/"; |
|
106 | 106 | |
107 | 107 | //interview |
108 | -$interview_screenshot_path="../../data/images/interview_screenshots/"; |
|
109 | -$interview_screenshot_save_path="../../../data/images/interview_screenshots/"; |
|
108 | +$interview_screenshot_path = "../../data/images/interview_screenshots/"; |
|
109 | +$interview_screenshot_save_path = "../../../data/images/interview_screenshots/"; |
|
110 | 110 | |
111 | 111 | //menu |
112 | -$menu_screenshot_path="../../data/images/menu_screenshots/"; |
|
113 | -$menu_screenshot_save_path="../../../data/images/menu_screenshots/"; |
|
114 | -$menu_file_path="../../../data/zips/menus/"; |
|
115 | -$menu_file_temp_path="../../../data/zips/temp/"; |
|
112 | +$menu_screenshot_path = "../../data/images/menu_screenshots/"; |
|
113 | +$menu_screenshot_save_path = "../../../data/images/menu_screenshots/"; |
|
114 | +$menu_file_path = "../../../data/zips/menus/"; |
|
115 | +$menu_file_temp_path = "../../../data/zips/temp/"; |
|
116 | 116 | |
117 | 117 | //news |
118 | -$news_images_path="../../data/images/news_images/"; |
|
119 | -$news_images_save_path="../../../data/images/news_images/"; |
|
118 | +$news_images_path = "../../data/images/news_images/"; |
|
119 | +$news_images_save_path = "../../../data/images/news_images/"; |
|
120 | 120 | |
121 | 121 | //links |
122 | -$website_image_path="../../data/images/website_images/"; |
|
123 | -$website_image_path="../../data/images/website_images/"; |
|
124 | -$website_image_save_path="../../../data/images/website_images/"; |
|
122 | +$website_image_path = "../../data/images/website_images/"; |
|
123 | +$website_image_path = "../../data/images/website_images/"; |
|
124 | +$website_image_save_path = "../../../data/images/website_images/"; |
|
125 | 125 | |
126 | 126 | //trivia |
127 | -$trivia_screenshot_path="../../data/images/trivia_screens/"; |
|
128 | -$spotlight_screenshot_path="../../data/images/spotlight_screens/"; |
|
129 | -$spotlight_screenshot_save_path="../../../data/images/spotlight_screens/"; |
|
127 | +$trivia_screenshot_path = "../../data/images/trivia_screens/"; |
|
128 | +$spotlight_screenshot_path = "../../data/images/spotlight_screens/"; |
|
129 | +$spotlight_screenshot_save_path = "../../../data/images/spotlight_screens/"; |
|
130 | 130 | |
131 | 131 | //demos |
132 | -$demo_screenshot_path="../../data/images/demo_screenshots/"; |
|
133 | -$demo_file_path="../../data/zips/demos/"; |
|
134 | -$demo_file_temp_path="../../data/zips/temp/"; |
|
135 | -$music_demo_path="../../data/music/demos/"; |
|
132 | +$demo_screenshot_path = "../../data/images/demo_screenshots/"; |
|
133 | +$demo_file_path = "../../data/zips/demos/"; |
|
134 | +$demo_file_temp_path = "../../data/zips/temp/"; |
|
135 | +$music_demo_path = "../../data/music/demos/"; |
|
136 | 136 | |
137 | 137 | //Crews |
138 | -$crew_logo_path="../../data/images/crew_logos/"; |
|
139 | -$crew_logo_save_path="../../../data/images/crew_logos/"; |
|
138 | +$crew_logo_path = "../../data/images/crew_logos/"; |
|
139 | +$crew_logo_save_path = "../../../data/images/crew_logos/"; |
|
140 | 140 | |
141 | 141 | //magazine |
142 | -$magazine_scan_path="../../data/images/magazine_scans/"; |
|
142 | +$magazine_scan_path = "../../data/images/magazine_scans/"; |
|
143 | 143 | |
144 | 144 | //users |
145 | -$user_avatar_path="../../data/images/user_avatars/"; |
|
146 | -$user_avatar_save_path="../../../data/images/user_avatars/"; |
|
145 | +$user_avatar_path = "../../data/images/user_avatars/"; |
|
146 | +$user_avatar_save_path = "../../../data/images/user_avatars/"; |
|
147 | 147 | |
148 | 148 | //Dump |
149 | -$media_scan_path="../../data/images/media_scans/"; |
|
150 | -$media_scan_save_path="../../../data/images/media_scans/"; |
|
149 | +$media_scan_path = "../../data/images/media_scans/"; |
|
150 | +$media_scan_save_path = "../../../data/images/media_scans/"; |
|
151 | 151 | |
152 | 152 | // Include environment-specific settings |
153 | 153 | require('local_settings.php'); |
@@ -16,7 +16,7 @@ discard block |
||
16 | 16 | |
17 | 17 | extract($_REQUEST); |
18 | 18 | |
19 | -require_once __DIR__ . "/../vendor/autoload.php"; |
|
19 | +require_once __DIR__."/../vendor/autoload.php"; |
|
20 | 20 | include("../../config/connect.php"); |
21 | 21 | include("../../config/config.php"); |
22 | 22 | include("../../lib/user_functions.php"); |
@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | // So suppress errors with @ |
39 | 39 | @include("../../config/email_settings.php"); |
40 | 40 | |
41 | -if (file_exists("../../config/database_upgrade.php")==true) { |
|
41 | +if (file_exists("../../config/database_upgrade.php") == true) { |
|
42 | 42 | exit("Upgrade mode"); |
43 | 43 | } |
44 | 44 | |
@@ -65,6 +65,6 @@ discard block |
||
65 | 65 | |
66 | 66 | if (SITESTATUS == "offline") { |
67 | 67 | if ($_SESSION['permission'] !== "1") { |
68 | - header("Location: " . SITEURL . "blank.php"); |
|
68 | + header("Location: ".SITEURL."blank.php"); |
|
69 | 69 | } |
70 | 70 | } |
@@ -8,7 +8,7 @@ discard block |
||
8 | 8 | * |
9 | 9 | ***************************************************************************/ |
10 | 10 | |
11 | - define('ROOT_PATH', dirname(__DIR__) . '/'); |
|
11 | + define('ROOT_PATH', dirname(__DIR__).'/'); |
|
12 | 12 | |
13 | 13 | //Skin Switching functions |
14 | 14 | |
@@ -18,12 +18,12 @@ discard block |
||
18 | 18 | if (isset($_SESSION['skin'])) { |
19 | 19 | $set_skin = $_SESSION['skin']; |
20 | 20 | |
21 | - $cpanel_template_folder = "". ROOT_PATH ."../themes/templates/1/admin/"; |
|
22 | - $mainsite_template_folder = "". ROOT_PATH ."../themes/templates/1/main/"; |
|
23 | - $style_folder = "". ROOT_PATH ."../themes/styles/1/"; |
|
21 | + $cpanel_template_folder = "".ROOT_PATH."../themes/templates/1/admin/"; |
|
22 | + $mainsite_template_folder = "".ROOT_PATH."../themes/templates/1/main/"; |
|
23 | + $style_folder = "".ROOT_PATH."../themes/styles/1/"; |
|
24 | 24 | $smarty->assign("template_dir", "../../themes/templates/1/"); |
25 | 25 | $smarty->assign("style_dir", "../../themes/styles/1/"); |
26 | - $smarty->assign("style_dir2", "../../themes/styles/1/"); //when called from the show_image function |
|
26 | + $smarty->assign("style_dir2", "../../themes/styles/1/"); //when called from the show_image function |
|
27 | 27 | |
28 | 28 | foreach (glob("../../../themes/styles/$set_skin/images/trivia/*.*") as $filename) { |
29 | 29 | $filename = substr($filename, 3); |
@@ -32,12 +32,12 @@ discard block |
||
32 | 32 | )); |
33 | 33 | } |
34 | 34 | } else { |
35 | - $cpanel_template_folder = "". ROOT_PATH ."../themes/templates/1/admin/"; |
|
36 | - $mainsite_template_folder = "". ROOT_PATH ."../themes/templates/1/main/"; |
|
37 | - $style_folder = "". ROOT_PATH ."../themes/styles/1/"; |
|
35 | + $cpanel_template_folder = "".ROOT_PATH."../themes/templates/1/admin/"; |
|
36 | + $mainsite_template_folder = "".ROOT_PATH."../themes/templates/1/main/"; |
|
37 | + $style_folder = "".ROOT_PATH."../themes/styles/1/"; |
|
38 | 38 | $smarty->assign("template_dir", "../../themes/templates/1/"); |
39 | 39 | $smarty->assign("style_dir", "../../themes/styles/1/"); |
40 | - $smarty->assign("style_dir2", "../../themes/styles/1/"); //when called from the show_image function |
|
40 | + $smarty->assign("style_dir2", "../../themes/styles/1/"); //when called from the show_image function |
|
41 | 41 | |
42 | 42 | foreach (glob("../../../themes/styles/1/images/trivia/*.*") as $filename) { |
43 | 43 | $filename = substr($filename, 3); |
@@ -1,5 +1,5 @@ |
||
1 | 1 | <?php |
2 | -require_once __DIR__ . '/../vendor/autoload.php'; |
|
2 | +require_once __DIR__.'/../vendor/autoload.php'; |
|
3 | 3 | |
4 | 4 | extract($_REQUEST); |
5 | 5 |
@@ -19,26 +19,26 @@ |
||
19 | 19 | $now = $date->format('U'); |
20 | 20 | $message = ""; |
21 | 21 | |
22 | - if ($now-$timestamp <60) { |
|
23 | - $diff = $now-$timestamp; |
|
22 | + if ($now - $timestamp < 60) { |
|
23 | + $diff = $now - $timestamp; |
|
24 | 24 | $message .= " $diff seconds ago"; |
25 | 25 | } |
26 | - if ($now-$timestamp >60 and $now-$timestamp <3600) { |
|
27 | - $diff = $now-$timestamp; |
|
26 | + if ($now - $timestamp > 60 and $now - $timestamp < 3600) { |
|
27 | + $diff = $now - $timestamp; |
|
28 | 28 | $diff = floor($diff / 60); |
29 | 29 | $message .= " $diff minutes ago"; |
30 | 30 | } |
31 | - if ($now-$timestamp >3600 and $now-$timestamp <86400) { |
|
32 | - $diff = $now-$timestamp; |
|
31 | + if ($now - $timestamp > 3600 and $now - $timestamp < 86400) { |
|
32 | + $diff = $now - $timestamp; |
|
33 | 33 | $diff = floor($diff / 3600); |
34 | 34 | $message .= " $diff hours ago"; |
35 | 35 | } |
36 | - if ($now-$timestamp >86400 and $now-$timestamp <172800) { |
|
37 | - $diff = $now-$timestamp; |
|
36 | + if ($now - $timestamp > 86400 and $now - $timestamp < 172800) { |
|
37 | + $diff = $now - $timestamp; |
|
38 | 38 | $diff = floor($diff / 3600); |
39 | 39 | $message .= " yesterday"; |
40 | 40 | } |
41 | - if ($now-$timestamp >172800) { |
|
41 | + if ($now - $timestamp > 172800) { |
|
42 | 42 | $time = new \DateTime(); |
43 | 43 | $time->setTimestamp($timestamp); |
44 | 44 | $change_date = $time->format('M d'); |
@@ -133,7 +133,7 @@ discard block |
||
133 | 133 | // Set up the parameters for a URL search string |
134 | 134 | $URLSearchString = " a-zA-Z0-9\:\/\-\?\&\.\=\_\~\#\'"; |
135 | 135 | // Set up the parameters for a MAIL search string |
136 | - $MAILSearchString = $URLSearchString . " a-zA-Z0-9\.@"; |
|
136 | + $MAILSearchString = $URLSearchString." a-zA-Z0-9\.@"; |
|
137 | 137 | |
138 | 138 | // Perform URL Search |
139 | 139 | $Text = preg_replace( |
@@ -194,7 +194,7 @@ discard block |
||
194 | 194 | </tr> |
195 | 195 | </table>'; |
196 | 196 | // Check for [code] text |
197 | - $Text = preg_replace("/\[code\](.+?)\[\/code\]/is", "$CodeLayout", $Text); |
|
197 | + $Text = preg_replace("/\[code\](.+?)\[\/code\]/is", "$CodeLayout", $Text); |
|
198 | 198 | |
199 | 199 | // Declare the format for [quote] layout |
200 | 200 | $QuoteLayout = '<table width="90%" border="0" align="center" cellpadding="0" cellspacing="0"> |
@@ -552,7 +552,7 @@ discard block |
||
552 | 552 | mysqli_free_result($query); |
553 | 553 | |
554 | 554 | // START - COUNT HOW MANY GAMES HAS CATEGORIES SET |
555 | - $query = $mysqli->query("SELECT COUNT(DISTINCT game_id) AS count FROM game_genre_cross"); |
|
555 | + $query = $mysqli->query("SELECT COUNT(DISTINCT game_id) AS count FROM game_genre_cross"); |
|
556 | 556 | // Special case here due to the migration from game_categories to game_genre |
557 | 557 | // This fails until the DB update script is run because the game_genre_cross |
558 | 558 | // table doesn't exist. It prevents accessing the site and CPANEL, preventing |
@@ -763,8 +763,8 @@ discard block |
||
763 | 763 | // Everything we do for the Trivia SECTION |
764 | 764 | if ($section == 'Trivia') { |
765 | 765 | if ($subsection == 'DYK' or $subsection == 'Quote' or $subsection == 'Spotlight') { |
766 | - $subsection_name = ("Trivia ID " . $subsection_id); |
|
767 | - $section_name = ("Trivia ID " . $subsection_id); |
|
766 | + $subsection_name = ("Trivia ID ".$subsection_id); |
|
767 | + $section_name = ("Trivia ID ".$subsection_id); |
|
768 | 768 | } |
769 | 769 | } |
770 | 770 | |
@@ -791,7 +791,7 @@ discard block |
||
791 | 791 | |
792 | 792 | if ($subsection == 'Link submit') { |
793 | 793 | // Get the submitted link |
794 | - $query_link = "SELECT website_name FROM website_validate WHERE website_id = $subsection_id"; |
|
794 | + $query_link = "SELECT website_name FROM website_validate WHERE website_id = $subsection_id"; |
|
795 | 795 | $result = $mysqli->query($query_link) or die("getting submitted link name failed: ".$mysqli->error); |
796 | 796 | $query_data = $result->fetch_array(MYSQLI_BOTH); |
797 | 797 | $section_name = $query_data['website_name']; |
@@ -1360,7 +1360,7 @@ discard block |
||
1360 | 1360 | |
1361 | 1361 | if ($subsection == 'Authors') { |
1362 | 1362 | } else { |
1363 | - $subsection = 'Game doc'; |
|
1363 | + $subsection = 'Game doc'; |
|
1364 | 1364 | } |
1365 | 1365 | |
1366 | 1366 | if ($subsection_name == '') { |
@@ -1386,7 +1386,7 @@ discard block |
||
1386 | 1386 | |
1387 | 1387 | if ($subsection == 'Authors') { |
1388 | 1388 | } else { |
1389 | - $subsection = 'Tool doc'; |
|
1389 | + $subsection = 'Tool doc'; |
|
1390 | 1390 | } |
1391 | 1391 | } |
1392 | 1392 | } |
@@ -1563,7 +1563,7 @@ discard block |
||
1563 | 1563 | $query_tos = "SELECT * FROM tos_version |
1564 | 1564 | WHERE tos_version_id = '$subsection_id'"; |
1565 | 1565 | $result = $mysqli->query($query_tos) or die("getting tos failed"); |
1566 | - $query_data = $result->fetch_array(MYSQLI_BOTH); |
|
1566 | + $query_data = $result->fetch_array(MYSQLI_BOTH); |
|
1567 | 1567 | $subsection_name = $query_data['tos_version']; |
1568 | 1568 | $subsection_id = $query_data['tos_version_id']; |
1569 | 1569 | } |
@@ -1585,7 +1585,7 @@ discard block |
||
1585 | 1585 | $query_trainer = "SELECT * FROM trainer_options |
1586 | 1586 | WHERE trainer_options_id = '$subsection_id'"; |
1587 | 1587 | $result = $mysqli->query($query_trainer) or die("getting trainer failed"); |
1588 | - $query_data = $result->fetch_array(MYSQLI_BOTH); |
|
1588 | + $query_data = $result->fetch_array(MYSQLI_BOTH); |
|
1589 | 1589 | $subsection_name = $query_data['trainer_options']; |
1590 | 1590 | $subsection_id = $query_data['trainer_options_id']; |
1591 | 1591 | } |
@@ -1595,7 +1595,7 @@ discard block |
||
1595 | 1595 | $query_crew = "SELECT * FROM crew WHERE |
1596 | 1596 | crew_id = '$subsection_id'"; |
1597 | 1597 | $result = $mysqli->query($query_crew) or die("getting crew failed"); |
1598 | - $query_data = $result->fetch_array(MYSQLI_BOTH); |
|
1598 | + $query_data = $result->fetch_array(MYSQLI_BOTH); |
|
1599 | 1599 | $subsection_name = $query_data['crew_name']; |
1600 | 1600 | } |
1601 | 1601 | |
@@ -1604,7 +1604,7 @@ discard block |
||
1604 | 1604 | $query_ind = "SELECT ind_name FROM individuals WHERE |
1605 | 1605 | ind_id = '$subsection_id'"; |
1606 | 1606 | $result = $mysqli->query($query_ind) or die("getting ind failed"); |
1607 | - $query_data = $result->fetch_array(MYSQLI_BOTH); |
|
1607 | + $query_data = $result->fetch_array(MYSQLI_BOTH); |
|
1608 | 1608 | $subsection_name = $query_data['ind_name']; |
1609 | 1609 | } |
1610 | 1610 | } |
@@ -1624,8 +1624,8 @@ discard block |
||
1624 | 1624 | |
1625 | 1625 | // Everything we do for the BUG REPORT SECTION |
1626 | 1626 | if ($section == 'Bug') { |
1627 | - $subsection_name = ("Bug report ID " . $subsection_id); |
|
1628 | - $section_name = ("Bug report ID " . $subsection_id); |
|
1627 | + $subsection_name = ("Bug report ID ".$subsection_id); |
|
1628 | + $section_name = ("Bug report ID ".$subsection_id); |
|
1629 | 1629 | } |
1630 | 1630 | |
1631 | 1631 | // Everything we do for the GAMES CONFIG section |
@@ -1783,7 +1783,7 @@ discard block |
||
1783 | 1783 | ON (pub_dev.pub_dev_id = game_release_distributor.pub_dev_id) |
1784 | 1784 | WHERE pub_dev.pub_dev_id = '$subsection_id'"; |
1785 | 1785 | $result = $mysqli->query($query_distributor) or die("getting name failed"); |
1786 | - $query_data = $result->fetch_array(MYSQLI_BOTH); |
|
1786 | + $query_data = $result->fetch_array(MYSQLI_BOTH); |
|
1787 | 1787 | $subsection_name = $query_data['pub_dev_name']; |
1788 | 1788 | $subsection_id = $query_data['game_release_id']; |
1789 | 1789 | } |
@@ -1795,7 +1795,7 @@ discard block |
||
1795 | 1795 | ON (crew.crew_id = game_release_crew.crew_id) |
1796 | 1796 | WHERE crew.crew_id = '$subsection_id'"; |
1797 | 1797 | $result = $mysqli->query($query_crew) or die("getting name failed"); |
1798 | - $query_data = $result->fetch_array(MYSQLI_BOTH); |
|
1798 | + $query_data = $result->fetch_array(MYSQLI_BOTH); |
|
1799 | 1799 | $subsection_name = $query_data['crew_name']; |
1800 | 1800 | $subsection_id = $query_data['game_release_id']; |
1801 | 1801 | } |
@@ -20,12 +20,12 @@ discard block |
||
20 | 20 | ***************************************************************************/ |
21 | 21 | |
22 | 22 | function clean_words($mode, &$entry) { |
23 | - static $drop_char_match = array('^', '$', '&', '(', ')', '<', '>', '`', '\'', '"', '|', ',', '@', '_', '?', |
|
23 | + static $drop_char_match = array('^', '$', '&', '(', ')', '<', '>', '`', '\'', '"', '|', ',', '@', '_', '?', |
|
24 | 24 | '%', '-', '~', '+', '.', '[', ']', '{', '}', ':', '\\', '/', '=', '#', '\'', ';', '!'); |
25 | - static $drop_char_replace = array(' ', ' ', ' ', ' ', ' ', ' ', ' ', '', '', ' ', ' ', ' ', ' ', '', ' ', |
|
26 | - ' ', '', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ' , ' ', ' ', ' ', ' ', ' ', ' '); |
|
25 | + static $drop_char_replace = array(' ', ' ', ' ', ' ', ' ', ' ', ' ', '', '', ' ', ' ', ' ', ' ', '', ' ', |
|
26 | + ' ', '', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' '); |
|
27 | 27 | |
28 | - $entry = ' ' . strip_tags(strtolower($entry)) . ' '; |
|
28 | + $entry = ' '.strip_tags(strtolower($entry)).' '; |
|
29 | 29 | |
30 | 30 | if ($mode == 'post') { |
31 | 31 | // Replace line endings by a space |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | // Filter out strange characters like ^, $, &, change "it's" to "its" |
45 | 45 | // |
46 | 46 | for ($i = 0; $i < count($drop_char_match); $i++) { |
47 | - $entry = str_replace($drop_char_match[$i], $drop_char_replace[$i], $entry); |
|
47 | + $entry = str_replace($drop_char_match[$i], $drop_char_replace[$i], $entry); |
|
48 | 48 | } |
49 | 49 | |
50 | 50 | if ($mode == 'post') { |
@@ -82,9 +82,9 @@ discard block |
||
82 | 82 | |
83 | 83 | if ($search_matches[$i] != '') { |
84 | 84 | $word[] = $search_matches[$i]; |
85 | - if (!strstr($word_insert_sql[$word_in], "'" . $search_matches[$i] . "'")) { |
|
86 | - $word_insert_sql[$word_in] .= ($word_insert_sql[$word_in] != "") ? ", '" . |
|
87 | - $search_matches[$i] . "'" : "'" . $search_matches[$i] . "'"; |
|
85 | + if (!strstr($word_insert_sql[$word_in], "'".$search_matches[$i]."'")) { |
|
86 | + $word_insert_sql[$word_in] .= ($word_insert_sql[$word_in] != "") ? ", '". |
|
87 | + $search_matches[$i]."'" : "'".$search_matches[$i]."'"; |
|
88 | 88 | } |
89 | 89 | } |
90 | 90 | } |
@@ -100,7 +100,7 @@ discard block |
||
100 | 100 | for ($i = 0; $i < count($word); $i++) { |
101 | 101 | if ($word[$i] != $prev_word) { |
102 | 102 | $temp_word[] = $word[$i]; |
103 | - $word_text_sql .= (($word_text_sql != '') ? ', ' : '') . "'" . $word[$i] . "'"; |
|
103 | + $word_text_sql .= (($word_text_sql != '') ? ', ' : '')."'".$word[$i]."'"; |
|
104 | 104 | } |
105 | 105 | $prev_word = $word[$i]; |
106 | 106 | } |
@@ -117,7 +117,7 @@ discard block |
||
117 | 117 | } |
118 | 118 | |
119 | 119 | if ($new_match) { |
120 | - $value_sql .= (($value_sql != '') ? ', ' : '') . '(\'' . $word[$i] . '\')'; |
|
120 | + $value_sql .= (($value_sql != '') ? ', ' : '').'(\''.$word[$i].'\')'; |
|
121 | 121 | } |
122 | 122 | } |
123 | 123 | |
@@ -154,7 +154,7 @@ discard block |
||
154 | 154 | if ($result = mysql_query($sql)) { |
155 | 155 | $word_id_sql = ''; |
156 | 156 | while ($row = mysql_fetch_array($result)) { |
157 | - $word_id_sql .= ($word_id_sql != '') ? ', ' . $row['news_word_id'] : $row['news_word_id']; |
|
157 | + $word_id_sql .= ($word_id_sql != '') ? ', '.$row['news_word_id'] : $row['news_word_id']; |
|
158 | 158 | } |
159 | 159 | |
160 | 160 | $sql = "SELECT news_word_id |
@@ -165,7 +165,7 @@ discard block |
||
165 | 165 | if ($result = mysql_query($sql)) { |
166 | 166 | $word_id_sql = ''; |
167 | 167 | while ($row = mysql_fetch_array($result)) { |
168 | - $word_id_sql .= ($word_id_sql != '') ? ', ' . $row['news_word_id'] : $row['news_word_id']; |
|
168 | + $word_id_sql .= ($word_id_sql != '') ? ', '.$row['news_word_id'] : $row['news_word_id']; |
|
169 | 169 | } |
170 | 170 | |
171 | 171 | if ($word_id_sql != '') { |