@@ -15,7 +15,7 @@ discard block |
||
| 15 | 15 | |
| 16 | 16 | global $user, $planetrow; |
| 17 | 17 | |
| 18 | -include('common.' . substr(strrchr(__FILE__, '.'), 1)); |
|
| 18 | +include('common.'.substr(strrchr(__FILE__, '.'), 1)); |
|
| 19 | 19 | |
| 20 | 20 | lng_include('infos'); |
| 21 | 21 | lng_include('artifacts'); |
@@ -65,7 +65,7 @@ discard block |
||
| 65 | 65 | die(); |
| 66 | 66 | break; |
| 67 | 67 | } |
| 68 | - message($Message, classLocale::$lang['tech'][UNIT_ARTIFACTS], 'artifacts.' . PHP_EX, 5); |
|
| 68 | + message($Message, classLocale::$lang['tech'][UNIT_ARTIFACTS], 'artifacts.'.PHP_EX, 5); |
|
| 69 | 69 | } |
| 70 | 70 | |
| 71 | 71 | $template = gettemplate('artifacts', true); |
@@ -36,7 +36,7 @@ discard block |
||
| 36 | 36 | } |
| 37 | 37 | } else { |
| 38 | 38 | // TODO: This is left for backward compatibility. Appropriate code should be rewrote! |
| 39 | - $func_name = isset(classSupernova::$functions[$func_name]) && is_callable(classSupernova::$functions[$func_name]) ? classSupernova::$functions[$func_name] : ('sn_' . $func_name); |
|
| 39 | + $func_name = isset(classSupernova::$functions[$func_name]) && is_callable(classSupernova::$functions[$func_name]) ? classSupernova::$functions[$func_name] : ('sn_'.$func_name); |
|
| 40 | 40 | if (is_callable($func_name)) { |
| 41 | 41 | $result = call_user_func_array($func_name, $func_arg); |
| 42 | 42 | } |
@@ -111,7 +111,7 @@ discard block |
||
| 111 | 111 | */ |
| 112 | 112 | function get_exchange_rate($currency_symbol) { |
| 113 | 113 | $currency_symbol = strtolower($currency_symbol); |
| 114 | - $config_field = 'payment_currency_exchange_' . $currency_symbol; |
|
| 114 | + $config_field = 'payment_currency_exchange_'.$currency_symbol; |
|
| 115 | 115 | |
| 116 | 116 | // Заворачиваем получение стоимости ММ через перекрываемую процедуру |
| 117 | 117 | $exchange_rate = floatval($currency_symbol == 'mm_' ? get_mm_cost() : classSupernova::$config->$config_field); |
@@ -623,8 +623,8 @@ discard block |
||
| 623 | 623 | $from = trim($from ? $from : classSupernova::$config->game_adminEmail); |
| 624 | 624 | |
| 625 | 625 | $head = ''; |
| 626 | - $head .= "Content-Type: text/" . ($html ? 'html' : 'plain') . "; charset=utf-8 \r\n"; |
|
| 627 | - $head .= "Date: " . date('r') . " \r\n"; |
|
| 626 | + $head .= "Content-Type: text/".($html ? 'html' : 'plain')."; charset=utf-8 \r\n"; |
|
| 627 | + $head .= "Date: ".date('r')." \r\n"; |
|
| 628 | 628 | $classConfig = classSupernova::$config; |
| 629 | 629 | $head .= "Return-Path: {$classConfig->game_adminEmail} \r\n"; |
| 630 | 630 | $head .= "From: {$from} \r\n"; |
@@ -637,10 +637,10 @@ discard block |
||
| 637 | 637 | $body = str_replace("\n", "\r\n", $body); |
| 638 | 638 | |
| 639 | 639 | if ($html) { |
| 640 | - $body = '<html><head><base href="' . SN_ROOT_VIRTUAL . '"></head><body>' . nl2br($body) . '</body></html>'; |
|
| 640 | + $body = '<html><head><base href="'.SN_ROOT_VIRTUAL.'"></head><body>'.nl2br($body).'</body></html>'; |
|
| 641 | 641 | } |
| 642 | 642 | |
| 643 | - $title = '=?UTF-8?B?' . base64_encode($title) . '?='; |
|
| 643 | + $title = '=?UTF-8?B?'.base64_encode($title).'?='; |
|
| 644 | 644 | |
| 645 | 645 | return @mail($email_unsafe, $title, $body, $head); |
| 646 | 646 | } |
@@ -656,14 +656,14 @@ discard block |
||
| 656 | 656 | $classLocale = classLocale::$lang; |
| 657 | 657 | |
| 658 | 658 | return |
| 659 | - ($full || $time ? "{$time} {$classLocale['sys_day']} " : '') . |
|
| 660 | - ($full || $hours ? "{$hours} {$classLocale['sys_hrs']} " : '') . |
|
| 661 | - ($full || $minutes ? "{$minutes} {$classLocale['sys_min']} " : '') . |
|
| 659 | + ($full || $time ? "{$time} {$classLocale['sys_day']} " : ''). |
|
| 660 | + ($full || $hours ? "{$hours} {$classLocale['sys_hrs']} " : ''). |
|
| 661 | + ($full || $minutes ? "{$minutes} {$classLocale['sys_min']} " : ''). |
|
| 662 | 662 | ($full || !$time || $seconds ? "{$seconds} {$classLocale['sys_sec']}" : ''); |
| 663 | 663 | } |
| 664 | 664 | |
| 665 | 665 | function sys_time_human_system($time) { |
| 666 | - return $time ? date(FMT_DATE_TIME_SQL, $time) . " ({$time}), " . sys_time_human(SN_TIME_NOW - $time) : '{NEVER}'; |
|
| 666 | + return $time ? date(FMT_DATE_TIME_SQL, $time)." ({$time}), ".sys_time_human(SN_TIME_NOW - $time) : '{NEVER}'; |
|
| 667 | 667 | } |
| 668 | 668 | |
| 669 | 669 | function sys_redirect($url) { |
@@ -756,13 +756,13 @@ discard block |
||
| 756 | 756 | // usw.. |
| 757 | 757 | ); |
| 758 | 758 | |
| 759 | - $rexep = "#" . strtr(preg_quote($format), $masks) . "#"; |
|
| 759 | + $rexep = "#".strtr(preg_quote($format), $masks)."#"; |
|
| 760 | 760 | if (preg_match($rexep, $date, $out)) { |
| 761 | 761 | $ret = array( |
| 762 | - "tm_sec" => (int)$out['S'], |
|
| 763 | - "tm_min" => (int)$out['M'], |
|
| 764 | - "tm_hour" => (int)$out['H'], |
|
| 765 | - "tm_mday" => (int)$out['d'], |
|
| 762 | + "tm_sec" => (int) $out['S'], |
|
| 763 | + "tm_min" => (int) $out['M'], |
|
| 764 | + "tm_hour" => (int) $out['H'], |
|
| 765 | + "tm_mday" => (int) $out['d'], |
|
| 766 | 766 | "tm_mon" => $out['m'] ? $out['m'] - 1 : 0, |
| 767 | 767 | "tm_year" => $out['Y'] > 1900 ? $out['Y'] - 1900 : 0, |
| 768 | 768 | ); |
@@ -832,7 +832,7 @@ discard block |
||
| 832 | 832 | $functions[$function_name] = array(); |
| 833 | 833 | } elseif (!isset($functions[$function_name])) { |
| 834 | 834 | $functions[$function_name] = array(); |
| 835 | - $sn_function_name = 'sn_' . $function_name . ($sub_type ? '_' . $sub_type : ''); |
|
| 835 | + $sn_function_name = 'sn_'.$function_name.($sub_type ? '_'.$sub_type : ''); |
|
| 836 | 836 | $functions[$function_name][] = $sn_function_name; |
| 837 | 837 | } |
| 838 | 838 | |
@@ -899,7 +899,7 @@ discard block |
||
| 899 | 899 | } |
| 900 | 900 | |
| 901 | 901 | if (isset($nick_array[NICK_GENDER])) { |
| 902 | - $result[NICK_GENDER] = '<img src="' . ($user['dpath'] ? $user['dpath'] : DEFAULT_SKINPATH) . 'images/gender_' . $nick_array[NICK_GENDER] . '.png" />'; |
|
| 902 | + $result[NICK_GENDER] = '<img src="'.($user['dpath'] ? $user['dpath'] : DEFAULT_SKINPATH).'images/gender_'.$nick_array[NICK_GENDER].'.png" />'; |
|
| 903 | 903 | } |
| 904 | 904 | |
| 905 | 905 | if (isset($nick_array[NICK_AUTH_LEVEL]) || isset($nick_array[NICK_PREMIUM])) { |
@@ -931,14 +931,14 @@ discard block |
||
| 931 | 931 | } |
| 932 | 932 | |
| 933 | 933 | if (isset($nick_array[NICK_CLASS])) { |
| 934 | - $result[NICK_CLASS] = '<span ' . $nick_array[NICK_CLASS] . '>'; |
|
| 934 | + $result[NICK_CLASS] = '<span '.$nick_array[NICK_CLASS].'>'; |
|
| 935 | 935 | $result[NICK_CLASS_END] = '</span>'; |
| 936 | 936 | } |
| 937 | 937 | |
| 938 | 938 | $result[NICK_NICK] = sys_safe_output($nick_array[NICK_NICK]); |
| 939 | 939 | |
| 940 | 940 | if (isset($nick_array[NICK_ALLY])) { |
| 941 | - $result[NICK_ALLY] = '[' . sys_safe_output($nick_array[NICK_ALLY]) . ']'; |
|
| 941 | + $result[NICK_ALLY] = '['.sys_safe_output($nick_array[NICK_ALLY]).']'; |
|
| 942 | 942 | } |
| 943 | 943 | |
| 944 | 944 | $result[NICK_HTML] = true; |
@@ -961,7 +961,7 @@ discard block |
||
| 961 | 961 | */ |
| 962 | 962 | |
| 963 | 963 | |
| 964 | - if ($render_user['user_birthday'] && ($options === true || isset($options['icons']) || isset($options['birthday'])) && (date('Y', SN_TIME_NOW) . date('-m-d', strtotime($render_user['user_birthday'])) == date('Y-m-d', SN_TIME_NOW))) { |
|
| 964 | + if ($render_user['user_birthday'] && ($options === true || isset($options['icons']) || isset($options['birthday'])) && (date('Y', SN_TIME_NOW).date('-m-d', strtotime($render_user['user_birthday'])) == date('Y-m-d', SN_TIME_NOW))) { |
|
| 965 | 965 | $result[NICK_BIRTHSDAY] = ''; |
| 966 | 966 | } |
| 967 | 967 | |
@@ -983,7 +983,7 @@ discard block |
||
| 983 | 983 | } |
| 984 | 984 | |
| 985 | 985 | if ((isset($options['class']) && $options['class'])) { |
| 986 | - $result[NICK_CLASS] = (isset($result_options[NICK_CLASS]) ? ' ' . $result_options[NICK_CLASS] : '') . $options['class']; |
|
| 986 | + $result[NICK_CLASS] = (isset($result_options[NICK_CLASS]) ? ' '.$result_options[NICK_CLASS] : '').$options['class']; |
|
| 987 | 987 | } |
| 988 | 988 | |
| 989 | 989 | if ($render_user['ally_tag'] && ($options === true || (isset($options['ally']) && $options['ally']))) { |
@@ -1011,7 +1011,7 @@ discard block |
||
| 1011 | 1011 | foreach ($temp as $user_id) { |
| 1012 | 1012 | $user_id = floatval($user_id); |
| 1013 | 1013 | if ($user_id) { |
| 1014 | - $user_skip_list[] = '`id` = ' . $user_id; |
|
| 1014 | + $user_skip_list[] = '`id` = '.$user_id; |
|
| 1015 | 1015 | } |
| 1016 | 1016 | } |
| 1017 | 1017 | } |
@@ -1410,7 +1410,7 @@ discard block |
||
| 1410 | 1410 | $time_left = min(floor($time_left / PERIOD_DAY), $term_original); |
| 1411 | 1411 | $cost_left = $term_original > 0 ? ceil($time_left / $term_original * $original_cost) : 0; |
| 1412 | 1412 | |
| 1413 | - array_walk_recursive($result, function (&$value) use ($cost_left) { |
|
| 1413 | + array_walk_recursive($result, function(&$value) use ($cost_left) { |
|
| 1414 | 1414 | $value -= $cost_left; |
| 1415 | 1415 | }); |
| 1416 | 1416 | } |
@@ -1465,7 +1465,7 @@ discard block |
||
| 1465 | 1465 | } |
| 1466 | 1466 | |
| 1467 | 1467 | function print_rr($var, $capture = false) { |
| 1468 | - $print = '<pre>' . htmlspecialchars(print_r($var, true)) . '</pre>'; |
|
| 1468 | + $print = '<pre>'.htmlspecialchars(print_r($var, true)).'</pre>'; |
|
| 1469 | 1469 | if ($capture) { |
| 1470 | 1470 | return $print; |
| 1471 | 1471 | } else { |
@@ -1567,7 +1567,7 @@ discard block |
||
| 1567 | 1567 | break; |
| 1568 | 1568 | } |
| 1569 | 1569 | $sort_option_inverse_closure = $sort_option_inverse ? -1 : 1; |
| 1570 | - usort($ListToSort, function ($a, $b) use ($sort_option_field, $sort_option_inverse_closure) { |
|
| 1570 | + usort($ListToSort, function($a, $b) use ($sort_option_field, $sort_option_inverse_closure) { |
|
| 1571 | 1571 | return $a[$sort_option_field] < $b[$sort_option_field] ? -1 * $sort_option_inverse_closure : ( |
| 1572 | 1572 | $a[$sort_option_field] > $b[$sort_option_field] ? 1 * $sort_option_inverse_closure : 0 |
| 1573 | 1573 | ); |
@@ -13,10 +13,10 @@ |
||
| 13 | 13 | define('INSTALL', false); |
| 14 | 14 | define('IN_ADMIN', true); |
| 15 | 15 | |
| 16 | -require('../common.' . substr(strrchr(__FILE__, '.'), 1)); |
|
| 16 | +require('../common.'.substr(strrchr(__FILE__, '.'), 1)); |
|
| 17 | 17 | |
| 18 | 18 | if (!sn_module_get_active_count('payment')) { |
| 19 | - sys_redirect(SN_ROOT_VIRTUAL . 'admin/overview.php'); |
|
| 19 | + sys_redirect(SN_ROOT_VIRTUAL.'admin/overview.php'); |
|
| 20 | 20 | } |
| 21 | 21 | |
| 22 | 22 | if ($user['authlevel'] < 3) { |