@@ -113,7 +113,7 @@ discard block |
||
113 | 113 | sys_user_options_unpack($owner_row); |
114 | 114 | |
115 | 115 | if ($force || !$message_class['switchable'] || $owner_row["opt_{$message_class_name}"]) { |
116 | - $insert_values[] = "('" . idval($owner) . "', '{$sender}', '{$timestamp}', '{$message_type}', '" . db_escape($from_unsafe) . "', '" . db_escape($subject_unsafe) . "', '" . db_escape($text_unsafe) . "')"; |
|
116 | + $insert_values[] = "('".idval($owner)."', '{$sender}', '{$timestamp}', '{$message_type}', '".db_escape($from_unsafe)."', '".db_escape($subject_unsafe)."', '".db_escape($text_unsafe)."')"; |
|
117 | 117 | } |
118 | 118 | |
119 | 119 | // TODO - allow sending HTML email only from admin |
@@ -153,7 +153,7 @@ discard block |
||
153 | 153 | array(), |
154 | 154 | array( |
155 | 155 | // TODO DANGER |
156 | - '`id` IN (' . implode(',', $owners) . ')', |
|
156 | + '`id` IN ('.implode(',', $owners).')', |
|
157 | 157 | ) |
158 | 158 | ); |
159 | 159 | } |
@@ -172,7 +172,7 @@ discard block |
||
172 | 172 | $sendList = array(); |
173 | 173 | $list = ''; |
174 | 174 | $query = DBStaticUser::db_user_list( |
175 | - "ally_id = '{$ally_id}'" . ($ally_rank_id >= 0 ? " AND ally_rank_id = {$ally_rank_id}" : ''), |
|
175 | + "ally_id = '{$ally_id}'".($ally_rank_id >= 0 ? " AND ally_rank_id = {$ally_rank_id}" : ''), |
|
176 | 176 | false, 'id, username'); |
177 | 177 | foreach ($query as $u) { |
178 | 178 | $sendList[] = $u['id']; |
@@ -261,7 +261,7 @@ discard block |
||
261 | 261 | $subject_unsafe = substr($subject_unsafe, strlen(classLocale::$lang['msg_answer_prefix'])); |
262 | 262 | $re++; |
263 | 263 | } |
264 | - $re ? $subject_unsafe = classLocale::$lang['msg_answer_prefix'] . $subject_unsafe : false; |
|
264 | + $re ? $subject_unsafe = classLocale::$lang['msg_answer_prefix'].$subject_unsafe : false; |
|
265 | 265 | |
266 | 266 | $subject_unsafe = $subject_unsafe ? $subject_unsafe : classLocale::$lang['msg_subject_default']; |
267 | 267 | |
@@ -437,7 +437,7 @@ discard block |
||
437 | 437 | return classSupernova::$db->doSelect( |
438 | 438 | "SELECT * FROM {{messages}} |
439 | 439 | WHERE |
440 | - `message_type` = '" . MSG_TYPE_PLAYER . "' AND |
|
440 | + `message_type` = '" . MSG_TYPE_PLAYER."' AND |
|
441 | 441 | ((`message_owner` = '{$user['id']}' AND `message_sender` = '{$recipient_id}') |
442 | 442 | OR |
443 | 443 | (`message_sender` = '{$user['id']}' AND `message_owner` = '{$recipient_id}')) ORDER BY `message_time` DESC LIMIT 20;"); |
@@ -481,7 +481,7 @@ discard block |
||
481 | 481 | FROM |
482 | 482 | {{messages}} AS m |
483 | 483 | LEFT JOIN {{users}} AS u ON u.id = m.message_owner " . |
484 | - ($int_type_selected >= 0 ? "WHERE `message_type` = {$int_type_selected} " : '') . |
|
484 | + ($int_type_selected >= 0 ? "WHERE `message_type` = {$int_type_selected} " : ''). |
|
485 | 485 | "ORDER BY |
486 | 486 | `message_id` DESC |
487 | 487 | LIMIT |
@@ -494,7 +494,7 @@ discard block |
||
494 | 494 | $subject_safe = db_escape($subject_unsafe); |
495 | 495 | $text_safe = db_escape($text_unsafe); |
496 | 496 | |
497 | - return classSupernova::$db->doInsertComplex('INSERT INTO {{messages}} (`message_owner`, `message_sender`, `message_time`, `message_type`, `message_from`, `message_subject`, `message_text`) ' . |
|
497 | + return classSupernova::$db->doInsertComplex('INSERT INTO {{messages}} (`message_owner`, `message_sender`, `message_time`, `message_type`, `message_from`, `message_subject`, `message_text`) '. |
|
498 | 498 | "SELECT `id`, 0, unix_timestamp(now()), {$message_type_safe}, '{$from_safe}', '{$subject_safe}', '{$text_safe}' FROM {{users}}"); |
499 | 499 | } |
500 | 500 | |
@@ -504,7 +504,7 @@ discard block |
||
504 | 504 | * @return array|bool|mysqli_result|null |
505 | 505 | */ |
506 | 506 | public static function db_message_count_by_type($int_type_selected) { |
507 | - $page_max = classSupernova::$db->doSelectFetch('SELECT COUNT(*) AS `max` FROM `{{messages}}`' . ($int_type_selected >= 0 ? " WHERE `message_type` = {$int_type_selected};" : '')); |
|
507 | + $page_max = classSupernova::$db->doSelectFetch('SELECT COUNT(*) AS `max` FROM `{{messages}}`'.($int_type_selected >= 0 ? " WHERE `message_type` = {$int_type_selected};" : '')); |
|
508 | 508 | |
509 | 509 | return $page_max; |
510 | 510 | } |
@@ -23,7 +23,7 @@ |
||
23 | 23 | * @return array|bool|mysqli_result|null |
24 | 24 | */ |
25 | 25 | public static function db_missile_list_by_arrival() { |
26 | - $iraks = classSupernova::$db->doSelect("SELECT * FROM `{{iraks}}` WHERE `fleet_end_time` <= " . SN_TIME_NOW . " FOR UPDATE;"); |
|
26 | + $iraks = classSupernova::$db->doSelect("SELECT * FROM `{{iraks}}` WHERE `fleet_end_time` <= ".SN_TIME_NOW." FOR UPDATE;"); |
|
27 | 27 | |
28 | 28 | return $iraks; |
29 | 29 | } |
@@ -38,7 +38,7 @@ |
||
38 | 38 | if ($que_type == QUE_RESEARCH || $planet_id === null) { |
39 | 39 | $query[] = "`que_planet_id` IS NULL"; |
40 | 40 | } elseif ($planet_id) { |
41 | - $query[] = "(`que_planet_id` = {$planet_id}" . ($que_type ? '' : ' OR que_planet_id IS NULL') . ")"; |
|
41 | + $query[] = "(`que_planet_id` = {$planet_id}".($que_type ? '' : ' OR que_planet_id IS NULL').")"; |
|
42 | 42 | } |
43 | 43 | if ($que_type) { |
44 | 44 | $query[] = "`que_type` = {$que_type}"; |
@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | } |
25 | 25 | |
26 | 26 | if (classSupernova::$gc->snCache->isUnitLocatorNotSet($location_type, $location_id)) { |
27 | - $got_data = classSupernova::$gc->cacheOperator->db_get_record_list(LOC_UNIT, "unit_location_type = {$location_type} AND unit_location_id = {$location_id} AND " . DBStaticUnit::db_unit_time_restrictions()); |
|
27 | + $got_data = classSupernova::$gc->cacheOperator->db_get_record_list(LOC_UNIT, "unit_location_type = {$location_type} AND unit_location_id = {$location_id} AND ".DBStaticUnit::db_unit_time_restrictions()); |
|
28 | 28 | if (!empty($got_data) && is_array($got_data)) { |
29 | 29 | foreach ($got_data as $unit_id => $unit_data) { |
30 | 30 | classSupernova::$gc->snCache->setUnitLocatorByLocationAndIDs($location_type, $location_id, $unit_data); |
@@ -59,9 +59,9 @@ discard block |
||
59 | 59 | |
60 | 60 | public static function db_unit_count_by_user_and_type_and_snid($user_id, $unit_type = 0, $unit_snid = 0) { |
61 | 61 | $query = classSupernova::$db->doSelect( |
62 | - "SELECT unit_snid, sum(unit_level) as `qty` FROM {{unit}} WHERE `unit_player_id` = {$user_id} " . |
|
63 | - ($unit_type ? "AND `unit_type` = {$unit_type} " : '') . |
|
64 | - ($unit_snid ? "AND `unit_snid` = {$unit_snid} " : '') . |
|
62 | + "SELECT unit_snid, sum(unit_level) as `qty` FROM {{unit}} WHERE `unit_player_id` = {$user_id} ". |
|
63 | + ($unit_type ? "AND `unit_type` = {$unit_type} " : ''). |
|
64 | + ($unit_snid ? "AND `unit_snid` = {$unit_snid} " : ''). |
|
65 | 65 | 'GROUP BY `unit_snid`' |
66 | 66 | ); |
67 | 67 | $result = array(); |
@@ -81,8 +81,8 @@ discard block |
||
81 | 81 | WHERE |
82 | 82 | f.fleet_owner = {$user_id} AND |
83 | 83 | (f.fleet_start_planet_id = {$location_id} OR f.fleet_end_planet_id = {$location_id}) |
84 | - AND u.unit_snid = {$unit_snid} AND u.`unit_location_type` = " . LOC_FLEET . " AND " . self::db_unit_time_restrictions() . |
|
85 | - " LIMIT 1" . |
|
84 | + AND u.unit_snid = {$unit_snid} AND u.`unit_location_type` = ".LOC_FLEET." AND ".self::db_unit_time_restrictions(). |
|
85 | + " LIMIT 1". |
|
86 | 86 | ($for_update ? ' FOR UPDATE' : '')); |
87 | 87 | } |
88 | 88 | |
@@ -90,7 +90,7 @@ discard block |
||
90 | 90 | public static function db_unit_list_laboratories($user_id) { |
91 | 91 | return classSupernova::$db->doSelect("SELECT DISTINCT unit_location_id AS `id` |
92 | 92 | FROM {{unit}} |
93 | - WHERE unit_player_id = {$user_id} AND unit_location_type = " . LOC_PLANET . " AND unit_level > 0 AND unit_snid IN (" . STRUC_LABORATORY . ", " . STRUC_LABORATORY_NANO . ");"); |
|
93 | + WHERE unit_player_id = {$user_id} AND unit_location_type = ".LOC_PLANET." AND unit_level > 0 AND unit_snid IN (".STRUC_LABORATORY.", ".STRUC_LABORATORY_NANO.");"); |
|
94 | 94 | } |
95 | 95 | |
96 | 96 | /** |
@@ -136,7 +136,7 @@ discard block |
||
136 | 136 | return classSupernova::$db->doSelect( |
137 | 137 | "SELECT unit_player_id, unit_type, unit_snid, unit_level, count(*) AS unit_amount |
138 | 138 | FROM `{{unit}}` |
139 | - WHERE unit_level > 0 AND " . self::db_unit_time_restrictions() . |
|
139 | + WHERE unit_level > 0 AND " . self::db_unit_time_restrictions(). |
|
140 | 140 | " GROUP BY unit_player_id, unit_type, unit_snid, unit_level" |
141 | 141 | ); |
142 | 142 | } |
@@ -164,7 +164,7 @@ discard block |
||
164 | 164 | ), |
165 | 165 | array( |
166 | 166 | 'unit_time_finish IS NOT NULL', |
167 | - "unit_time_finish < FROM_UNIXTIME(" . SN_TIME_NOW . ")", |
|
167 | + "unit_time_finish < FROM_UNIXTIME(".SN_TIME_NOW.")", |
|
168 | 168 | ) |
169 | 169 | ); |
170 | 170 | } |
@@ -203,7 +203,7 @@ discard block |
||
203 | 203 | |
204 | 204 | $temp = DBStaticUnit::db_get_unit_by_location($user['id'], $unit_location, $location_id, $unit_id, true, 'unit_id'); |
205 | 205 | if (!empty($temp['unit_id'])) { |
206 | - $result = (bool)classSupernova::$gc->cacheOperator->db_upd_record_by_id( |
|
206 | + $result = (bool) classSupernova::$gc->cacheOperator->db_upd_record_by_id( |
|
207 | 207 | LOC_UNIT, |
208 | 208 | $temp['unit_id'], |
209 | 209 | array(), |
@@ -214,15 +214,15 @@ discard block |
||
214 | 214 | } else { |
215 | 215 | $locationIdRendered = $unit_location == LOC_USER ? $user['id'] : $planet_id; |
216 | 216 | $unitType = get_unit_param($unit_id, P_UNIT_TYPE); |
217 | - $result = (bool)classSupernova::$gc->cacheOperator->db_ins_record( |
|
217 | + $result = (bool) classSupernova::$gc->cacheOperator->db_ins_record( |
|
218 | 218 | LOC_UNIT, |
219 | 219 | array( |
220 | 220 | 'unit_player_id' => $user['id'], |
221 | - 'unit_location_type' => (int)$unit_location, |
|
221 | + 'unit_location_type' => (int) $unit_location, |
|
222 | 222 | 'unit_location_id' => $locationIdRendered, |
223 | - 'unit_type' => (int)$unitType, |
|
224 | - 'unit_snid' => (int)$unit_id, |
|
225 | - 'unit_level' => (float)$unit_value, |
|
223 | + 'unit_type' => (int) $unitType, |
|
224 | + 'unit_snid' => (int) $unit_id, |
|
225 | + 'unit_level' => (float) $unit_value, |
|
226 | 226 | ) |
227 | 227 | ); |
228 | 228 | } |
@@ -72,12 +72,12 @@ |
||
72 | 72 | */ |
73 | 73 | public static function db_ally_insert($ally_name_unsafe, $ally_tag_unsafe, $userId) { |
74 | 74 | $ally = classSupernova::$db->doInsertSet(TABLE_ALLIANCE, array( |
75 | - 'ally_name' => (string)$ally_name_unsafe, |
|
76 | - 'ally_tag' => (string)$ally_tag_unsafe, |
|
75 | + 'ally_name' => (string) $ally_name_unsafe, |
|
76 | + 'ally_tag' => (string) $ally_tag_unsafe, |
|
77 | 77 | 'ally_owner' => $userId, |
78 | - 'ally_owner_range' => (string)classLocale::$lang['ali_leaderRank'], |
|
79 | - 'ally_members' => (int)1, |
|
80 | - 'ranklist' => (string)(classLocale::$lang['ali_defaultRankName'] . ",0,0,0,0,0"), |
|
78 | + 'ally_owner_range' => (string) classLocale::$lang['ali_leaderRank'], |
|
79 | + 'ally_members' => (int) 1, |
|
80 | + 'ranklist' => (string) (classLocale::$lang['ali_defaultRankName'].",0,0,0,0,0"), |
|
81 | 81 | 'ally_register_time' => SN_TIME_NOW, |
82 | 82 | )); |
83 | 83 |
@@ -65,11 +65,10 @@ discard block |
||
65 | 65 | } |
66 | 66 | |
67 | 67 | public static function db_planet_by_vector($vector, $prefix = '', $for_update = false, $fields = '*') { |
68 | - $galaxy = isset($vector[$prefix . 'galaxy']) ? intval($vector[$prefix . 'galaxy']) : 0; |
|
69 | - $system = isset($vector[$prefix . 'system']) ? intval($vector[$prefix . 'system']) : 0; |
|
70 | - $planet = isset($vector[$prefix . 'planet']) ? intval($vector[$prefix . 'planet']) : 0; |
|
71 | - $planet_type = isset($vector[$prefix . 'planet_type']) ? intval($vector[$prefix . 'planet_type']) : |
|
72 | - (isset($vector[$prefix . 'type']) ? intval($vector[$prefix . 'type']) : 0); |
|
68 | + $galaxy = isset($vector[$prefix.'galaxy']) ? intval($vector[$prefix.'galaxy']) : 0; |
|
69 | + $system = isset($vector[$prefix.'system']) ? intval($vector[$prefix.'system']) : 0; |
|
70 | + $planet = isset($vector[$prefix.'planet']) ? intval($vector[$prefix.'planet']) : 0; |
|
71 | + $planet_type = isset($vector[$prefix.'planet_type']) ? intval($vector[$prefix.'planet_type']) : (isset($vector[$prefix.'type']) ? intval($vector[$prefix.'type']) : 0); |
|
73 | 72 | $planet_type = $planet_type == PT_DEBRIS ? PT_PLANET : $planet_type; |
74 | 73 | |
75 | 74 | return DBStaticPlanet::db_planet_by_gspt_safe($galaxy, $system, $planet, $planet_type, $for_update, $fields); |
@@ -120,7 +119,7 @@ discard block |
||
120 | 119 | } |
121 | 120 | |
122 | 121 | return classSupernova::$gc->cacheOperator->db_get_record_list(LOC_PLANET, |
123 | - "`planet_type` = " . PT_MOON . " AND `id_owner` = {$user_id} AND `id` != {$this_moon_id}"); |
|
122 | + "`planet_type` = ".PT_MOON." AND `id_owner` = {$user_id} AND `id` != {$this_moon_id}"); |
|
124 | 123 | } |
125 | 124 | |
126 | 125 | public static function db_planet_list_in_system($galaxy, $system) { |
@@ -146,7 +145,7 @@ discard block |
||
146 | 145 | ); |
147 | 146 | $order_by = classSupernova::$user_options[PLAYER_OPTION_PLANET_SORT]; |
148 | 147 | empty($sort_orders[$order_by]) ? $order_by = SORT_ID : false; |
149 | - $order_by = $sort_orders[$order_by] . ' ' . (classSupernova::$user_options[PLAYER_OPTION_PLANET_SORT_INVERSE] == SORT_ASCENDING ? 'ASC' : 'DESC'); |
|
148 | + $order_by = $sort_orders[$order_by].' '.(classSupernova::$user_options[PLAYER_OPTION_PLANET_SORT_INVERSE] == SORT_ASCENDING ? 'ASC' : 'DESC'); |
|
150 | 149 | |
151 | 150 | // Compilating query |
152 | 151 | return classSupernova::$gc->cacheOperator->db_get_record_list(LOC_PLANET, |
@@ -12,7 +12,7 @@ |
||
12 | 12 | JOIN {{users}} AS u ON u.id = cp.chat_player_player_id |
13 | 13 | WHERE |
14 | 14 | `chat_player_refresh_last` >= '{$sql_date}' |
15 | - AND (`banaday` IS NULL OR `banaday` <= " . SN_TIME_NOW . ") |
|
15 | + AND (`banaday` IS NULL OR `banaday` <= ".SN_TIME_NOW.") |
|
16 | 16 | {$ally_add} |
17 | 17 | ORDER BY authlevel DESC, `username`"); |
18 | 18 | } |
@@ -91,7 +91,7 @@ discard block |
||
91 | 91 | public function load_db_settings($configFile = '') { |
92 | 92 | $dbsettings = array(); |
93 | 93 | |
94 | - empty($configFile) ? $configFile = SN_ROOT_PHYSICAL . "config" . DOT_PHP_EX : false; |
|
94 | + empty($configFile) ? $configFile = SN_ROOT_PHYSICAL."config".DOT_PHP_EX : false; |
|
95 | 95 | |
96 | 96 | require $configFile; |
97 | 97 | |
@@ -111,7 +111,7 @@ discard block |
||
111 | 111 | } |
112 | 112 | |
113 | 113 | if (empty($this->dbsettings)) { |
114 | - $this->load_db_settings(SN_ROOT_PHYSICAL . "config.php"); |
|
114 | + $this->load_db_settings(SN_ROOT_PHYSICAL."config.php"); |
|
115 | 115 | } |
116 | 116 | |
117 | 117 | // TODO - фатальные (?) ошибки на каждом шагу. Хотя - скорее Эксепшны |
@@ -163,7 +163,7 @@ discard block |
||
163 | 163 | $sql = $query; |
164 | 164 | if (strpos($sql, '{{') !== false) { |
165 | 165 | foreach ($this->table_list as $tableName) { |
166 | - $sql = str_replace("{{{$tableName}}}", $this->db_prefix . $tableName, $sql); |
|
166 | + $sql = str_replace("{{{$tableName}}}", $this->db_prefix.$tableName, $sql); |
|
167 | 167 | } |
168 | 168 | } |
169 | 169 | |
@@ -234,12 +234,12 @@ discard block |
||
234 | 234 | |
235 | 235 | $queryResult = null; |
236 | 236 | try { |
237 | - $queryResult = $this->db_sql_query($stringQuery . DbSqlHelper::quoteComment($queryTrace)); |
|
237 | + $queryResult = $this->db_sql_query($stringQuery.DbSqlHelper::quoteComment($queryTrace)); |
|
238 | 238 | if (!$queryResult) { |
239 | 239 | throw new Exception(); |
240 | 240 | } |
241 | 241 | } catch (Exception $e) { |
242 | - classSupernova::$debug->error($this->db_error() . "<br />{$query}<br />", 'SQL Error'); |
|
242 | + classSupernova::$debug->error($this->db_error()."<br />{$query}<br />", 'SQL Error'); |
|
243 | 243 | } |
244 | 244 | |
245 | 245 | return $queryResult; |
@@ -294,16 +294,16 @@ discard block |
||
294 | 294 | if (!empty($where)) { |
295 | 295 | foreach ($where as $key => &$value) { |
296 | 296 | if (!is_int($key)) { |
297 | - $value = "`$key` = '" . $this->db_escape($value) . "'"; |
|
297 | + $value = "`$key` = '".$this->db_escape($value)."'"; |
|
298 | 298 | } |
299 | 299 | } |
300 | 300 | } |
301 | 301 | |
302 | 302 | $query = |
303 | - "SELECT " . implode(',', $fields) . |
|
304 | - " FROM `{{{$table}}}`" . |
|
305 | - (!empty($where) ? ' WHERE ' . implode(' AND ', $where) : '') . |
|
306 | - ($isOneRecord == DB_RECORD_ONE ? ' LIMIT 1' : '') . |
|
303 | + "SELECT ".implode(',', $fields). |
|
304 | + " FROM `{{{$table}}}`". |
|
305 | + (!empty($where) ? ' WHERE '.implode(' AND ', $where) : ''). |
|
306 | + ($isOneRecord == DB_RECORD_ONE ? ' LIMIT 1' : ''). |
|
307 | 307 | ($forUpdate == DB_SELECT_FOR_UPDATE ? ' FOR UPDATE' : ''); |
308 | 308 | |
309 | 309 | return $this->doSql($query); |
@@ -609,10 +609,10 @@ discard block |
||
609 | 609 | $this->isWatching = true; |
610 | 610 | $msg = "\$query = \"{$query}\"\n\r"; |
611 | 611 | if (!empty($_POST)) { |
612 | - $msg .= "\n\r" . dump($_POST, '$_POST'); |
|
612 | + $msg .= "\n\r".dump($_POST, '$_POST'); |
|
613 | 613 | } |
614 | 614 | if (!empty($_GET)) { |
615 | - $msg .= "\n\r" . dump($_GET, '$_GET'); |
|
615 | + $msg .= "\n\r".dump($_GET, '$_GET'); |
|
616 | 616 | } |
617 | 617 | classSupernova::$debug->warning($msg, "Watching user {$user['id']}", 399, array('base_dump' => true)); |
618 | 618 | $this->isWatching = false; |
@@ -638,37 +638,37 @@ discard block |
||
638 | 638 | case stripos($query, 'RPG_POINTS') != false && stripos(trim($query), 'UPDATE ') === 0 && !$dm_change_legit: |
639 | 639 | case stripos($query, 'METAMATTER') != false && stripos(trim($query), 'UPDATE ') === 0 && !$mm_change_legit: |
640 | 640 | case stripos($query, 'AUTHLEVEL') != false && $user['authlevel'] < 3 && stripos($query, 'SELECT') !== 0: |
641 | - $report = "Hacking attempt (" . date("d.m.Y H:i:s") . " - [" . time() . "]):\n"; |
|
641 | + $report = "Hacking attempt (".date("d.m.Y H:i:s")." - [".time()."]):\n"; |
|
642 | 642 | $report .= ">Database Inforamation\n"; |
643 | - $report .= "\tID - " . $user['id'] . "\n"; |
|
644 | - $report .= "\tUser - " . $user['username'] . "\n"; |
|
645 | - $report .= "\tAuth level - " . $user['authlevel'] . "\n"; |
|
646 | - $report .= "\tAdmin Notes - " . $user['adminNotes'] . "\n"; |
|
647 | - $report .= "\tCurrent Planet - " . $user['current_planet'] . "\n"; |
|
648 | - $report .= "\tUser IP - " . $user['user_lastip'] . "\n"; |
|
649 | - $report .= "\tUser IP at Reg - " . $user['ip_at_reg'] . "\n"; |
|
650 | - $report .= "\tUser Agent- " . $_SERVER['HTTP_USER_AGENT'] . "\n"; |
|
651 | - $report .= "\tCurrent Page - " . $user['current_page'] . "\n"; |
|
652 | - $report .= "\tRegister Time - " . $user['register_time'] . "\n"; |
|
643 | + $report .= "\tID - ".$user['id']."\n"; |
|
644 | + $report .= "\tUser - ".$user['username']."\n"; |
|
645 | + $report .= "\tAuth level - ".$user['authlevel']."\n"; |
|
646 | + $report .= "\tAdmin Notes - ".$user['adminNotes']."\n"; |
|
647 | + $report .= "\tCurrent Planet - ".$user['current_planet']."\n"; |
|
648 | + $report .= "\tUser IP - ".$user['user_lastip']."\n"; |
|
649 | + $report .= "\tUser IP at Reg - ".$user['ip_at_reg']."\n"; |
|
650 | + $report .= "\tUser Agent- ".$_SERVER['HTTP_USER_AGENT']."\n"; |
|
651 | + $report .= "\tCurrent Page - ".$user['current_page']."\n"; |
|
652 | + $report .= "\tRegister Time - ".$user['register_time']."\n"; |
|
653 | 653 | $report .= "\n"; |
654 | 654 | |
655 | 655 | $report .= ">Query Information\n"; |
656 | - $report .= "\tQuery - " . $query . "\n"; |
|
656 | + $report .= "\tQuery - ".$query."\n"; |
|
657 | 657 | $report .= "\n"; |
658 | 658 | |
659 | 659 | $report .= ">\$_SERVER Information\n"; |
660 | - $report .= "\tIP - " . $_SERVER['REMOTE_ADDR'] . "\n"; |
|
661 | - $report .= "\tHost Name - " . $_SERVER['HTTP_HOST'] . "\n"; |
|
662 | - $report .= "\tUser Agent - " . $_SERVER['HTTP_USER_AGENT'] . "\n"; |
|
663 | - $report .= "\tRequest Method - " . $_SERVER['REQUEST_METHOD'] . "\n"; |
|
664 | - $report .= "\tCame From - " . $_SERVER['HTTP_REFERER'] . "\n"; |
|
665 | - $report .= "\tPage is - " . $_SERVER['SCRIPT_NAME'] . "\n"; |
|
666 | - $report .= "\tUses Port - " . $_SERVER['REMOTE_PORT'] . "\n"; |
|
667 | - $report .= "\tServer Protocol - " . $_SERVER['SERVER_PROTOCOL'] . "\n"; |
|
660 | + $report .= "\tIP - ".$_SERVER['REMOTE_ADDR']."\n"; |
|
661 | + $report .= "\tHost Name - ".$_SERVER['HTTP_HOST']."\n"; |
|
662 | + $report .= "\tUser Agent - ".$_SERVER['HTTP_USER_AGENT']."\n"; |
|
663 | + $report .= "\tRequest Method - ".$_SERVER['REQUEST_METHOD']."\n"; |
|
664 | + $report .= "\tCame From - ".$_SERVER['HTTP_REFERER']."\n"; |
|
665 | + $report .= "\tPage is - ".$_SERVER['SCRIPT_NAME']."\n"; |
|
666 | + $report .= "\tUses Port - ".$_SERVER['REMOTE_PORT']."\n"; |
|
667 | + $report .= "\tServer Protocol - ".$_SERVER['SERVER_PROTOCOL']."\n"; |
|
668 | 668 | |
669 | 669 | $report .= "\n--------------------------------------------------------------------------------------------------\n"; |
670 | 670 | |
671 | - $fp = fopen(SN_ROOT_PHYSICAL . 'badqrys.txt', 'a'); |
|
671 | + $fp = fopen(SN_ROOT_PHYSICAL.'badqrys.txt', 'a'); |
|
672 | 672 | fwrite($fp, $report); |
673 | 673 | fclose($fp); |
674 | 674 |
@@ -239,7 +239,7 @@ |
||
239 | 239 | |
240 | 240 | $factory = $this->values[$id]; |
241 | 241 | |
242 | - $extended = function ($c) use ($callable, $factory) { |
|
242 | + $extended = function($c) use ($callable, $factory) { |
|
243 | 243 | return $callable($factory($c), $c); |
244 | 244 | }; |
245 | 245 |