@@ -24,7 +24,9 @@ |
||
24 | 24 | * DO NOT CHANGE |
25 | 25 | */ |
26 | 26 | |
27 | -if (!defined('INSIDE')) die(); |
|
27 | +if (!defined('INSIDE')) { |
|
28 | + die(); |
|
29 | +} |
|
28 | 30 | |
29 | 31 | $a_lang_array = [ |
30 | 32 | 'opt_account' => 'Профиль', |
@@ -23,7 +23,9 @@ |
||
23 | 23 | * DO NOT CHANGE |
24 | 24 | */ |
25 | 25 | |
26 | -if (!defined('INSIDE')) die(); |
|
26 | +if (!defined('INSIDE')) { |
|
27 | + die(); |
|
28 | +} |
|
27 | 29 | |
28 | 30 | $a_lang_array = [ |
29 | 31 | 'msg_page_header' => 'Личные сообщения', |
@@ -118,8 +118,7 @@ |
||
118 | 118 | )); |
119 | 119 | |
120 | 120 | SnTemplate::display($template, $lang['tech'][STRUC_MOON_GATE]); |
121 | - } |
|
122 | - else |
|
121 | + } else |
|
123 | 122 | { |
124 | 123 | SnTemplate::messageBox($lang['gate_no_src_ga'], $lang['tech'][STRUC_MOON_GATE], "overview.php", 10); |
125 | 124 | } |
@@ -26,16 +26,14 @@ discard block |
||
26 | 26 | $lang['Go_out_welldone'] = str_replace("%s", $ally_name, $lang['Go_out_welldone']); |
27 | 27 | SnTemplate::messageBox(sprintf($lang['ali_info_leave_success'], $ally['ally_name']), $lang['sys_alliance']); |
28 | 28 | } |
29 | -} |
|
30 | -elseif($mode == 'ainfo') |
|
29 | +} elseif($mode == 'ainfo') |
|
31 | 30 | { |
32 | 31 | $tag = sys_get_param_str('tag'); |
33 | 32 | $id_ally = sys_get_param_id('a'); |
34 | 33 | if($tag) |
35 | 34 | { |
36 | 35 | $ally = doquery("SELECT * FROM {{alliance}} WHERE ally_tag='{$tag}' LIMIT 1;", '', true); |
37 | - } |
|
38 | - elseif($id_ally) |
|
36 | + } elseif($id_ally) |
|
39 | 37 | { |
40 | 38 | $ally = doquery("SELECT * FROM {{alliance}} WHERE id='{$id_ally}' LIMIT 1;", '', true); |
41 | 39 | } |
@@ -55,20 +53,17 @@ discard block |
||
55 | 53 | 'USER_ALLY_ID' => $user['ally_id'], |
56 | 54 | )); |
57 | 55 | $page_header = $lang['sys_alliance']; |
58 | -} |
|
59 | -else |
|
56 | +} else |
|
60 | 57 | { |
61 | 58 | $page_header = $lang['your_alliance']; |
62 | 59 | |
63 | 60 | if($ally['ally_owner'] == $user['id']) |
64 | 61 | { |
65 | 62 | $range = $ally['ally_owner_range'] ? $ally['ally_owner_range'] : $lang['Founder']; |
66 | - } |
|
67 | - elseif($user['ally_rank_id'] != 0 && isset($ranks[$user['ally_rank_id']]['name'])) |
|
63 | + } elseif($user['ally_rank_id'] != 0 && isset($ranks[$user['ally_rank_id']]['name'])) |
|
68 | 64 | { |
69 | 65 | $range = $ranks[$user['ally_rank_id']]['name']; |
70 | - } |
|
71 | - else |
|
66 | + } else |
|
72 | 67 | { |
73 | 68 | $range = $lang['member']; |
74 | 69 | } |
@@ -68,8 +68,7 @@ discard block |
||
68 | 68 | ->doInsert(); |
69 | 69 | |
70 | 70 | $accept_offer = false; |
71 | - } |
|
72 | - else |
|
71 | + } else |
|
73 | 72 | { |
74 | 73 | $accept_offer = true; |
75 | 74 | $autoAccept = true; |
@@ -81,8 +80,7 @@ discard block |
||
81 | 80 | 'alliance_negotiation_relation' => $alliance_negotiation_relation, |
82 | 81 | ); |
83 | 82 | } |
84 | -} |
|
85 | -else |
|
83 | +} else |
|
86 | 84 | { |
87 | 85 | $offer_id = sys_get_param_id('offer_id'); |
88 | 86 | if($offer_id) |
@@ -93,31 +91,26 @@ discard block |
||
93 | 91 | if(!$negotiation) |
94 | 92 | { |
95 | 93 | SnTemplate::messageBox($lang['ali_dip_err_offer_none'], $page_title); |
96 | - } |
|
97 | - elseif($negotiation['alliance_negotiation_ally_id'] != $user['ally_id'] && $negotiation['alliance_negotiation_contr_ally_id'] != $user['ally_id']) |
|
94 | + } elseif($negotiation['alliance_negotiation_ally_id'] != $user['ally_id'] && $negotiation['alliance_negotiation_contr_ally_id'] != $user['ally_id']) |
|
98 | 95 | { |
99 | 96 | // TODO: Add log of hack attempt |
100 | 97 | SnTemplate::messageBox($lang['ali_dip_err_offer_alien'], $page_title); |
101 | - } |
|
102 | - elseif($negotiation['alliance_negotiation_ally_id'] == $user['ally_id']) |
|
98 | + } elseif($negotiation['alliance_negotiation_ally_id'] == $user['ally_id']) |
|
103 | 99 | { |
104 | 100 | if($offer_answer == 'accept') |
105 | 101 | { |
106 | 102 | // TODO: Add log of hack attempt |
107 | 103 | SnTemplate::messageBox($lang['ali_dip_err_offer_accept_own'], $page_title); |
108 | - } |
|
109 | - elseif($offer_answer == 'deny') |
|
104 | + } elseif($offer_answer == 'deny') |
|
110 | 105 | { |
111 | 106 | doquery("DELETE FROM {{alliance_negotiation}} WHERE alliance_negotiation_id = {$offer_id} LIMIT 1;"); |
112 | 107 | } |
113 | - } |
|
114 | - else |
|
108 | + } else |
|
115 | 109 | { |
116 | 110 | if($offer_answer == 'accept') |
117 | 111 | { |
118 | 112 | $accept_offer = true; |
119 | - } |
|
120 | - elseif($offer_answer == 'deny') |
|
113 | + } elseif($offer_answer == 'deny') |
|
121 | 114 | { |
122 | 115 | DBStaticAlly::db_ally_negotiation_update_status_1($offer_id); |
123 | 116 | } |
@@ -26,7 +26,9 @@ |
||
26 | 26 | * DO NOT CHANGE |
27 | 27 | */ |
28 | 28 | |
29 | -if (!defined('INSIDE')) die(); |
|
29 | +if (!defined('INSIDE')) { |
|
30 | + die(); |
|
31 | +} |
|
30 | 32 | |
31 | 33 | |
32 | 34 | $a_lang_array = [ |
@@ -23,7 +23,9 @@ |
||
23 | 23 | * DO NOT CHANGE |
24 | 24 | */ |
25 | 25 | |
26 | -if (!defined('INSIDE')) die(); |
|
26 | +if (!defined('INSIDE')) { |
|
27 | + die(); |
|
28 | +} |
|
27 | 29 | |
28 | 30 | //$lang = array_merge($lang, |
29 | 31 | //$lang->merge( |
@@ -23,7 +23,9 @@ |
||
23 | 23 | * DO NOT CHANGE |
24 | 24 | */ |
25 | 25 | |
26 | -if (!defined('INSIDE')) die(); |
|
26 | +if (!defined('INSIDE')) { |
|
27 | + die(); |
|
28 | +} |
|
27 | 29 | |
28 | 30 | //$lang = array_merge($lang, |
29 | 31 | //$lang->merge( |
@@ -47,8 +47,7 @@ discard block |
||
47 | 47 | * |
48 | 48 | * @param array $values The parameters or objects. |
49 | 49 | */ |
50 | - public function __construct(array $values = array()) |
|
51 | - { |
|
50 | + public function __construct(array $values = array()) { |
|
52 | 51 | $this->factories = new \SplObjectStorage(); |
53 | 52 | $this->protected = new \SplObjectStorage(); |
54 | 53 | |
@@ -71,8 +70,7 @@ discard block |
||
71 | 70 | * |
72 | 71 | * @throws \RuntimeException Prevent override of a frozen service |
73 | 72 | */ |
74 | - public function offsetSet($id, $value) |
|
75 | - { |
|
73 | + public function offsetSet($id, $value) { |
|
76 | 74 | if (isset($this->frozen[$id])) { |
77 | 75 | throw new \RuntimeException(sprintf('Cannot override frozen service "%s".', $id)); |
78 | 76 | } |
@@ -90,8 +88,7 @@ discard block |
||
90 | 88 | * |
91 | 89 | * @throws \InvalidArgumentException if the identifier is not defined |
92 | 90 | */ |
93 | - public function offsetGet($id) |
|
94 | - { |
|
91 | + public function offsetGet($id) { |
|
95 | 92 | if (!isset($this->keys[$id])) { |
96 | 93 | throw new \InvalidArgumentException(sprintf('Identifier "%s" is not defined.', $id)); |
97 | 94 | } |
@@ -125,8 +122,7 @@ discard block |
||
125 | 122 | * |
126 | 123 | * @return bool |
127 | 124 | */ |
128 | - public function offsetExists($id) |
|
129 | - { |
|
125 | + public function offsetExists($id) { |
|
130 | 126 | return isset($this->keys[$id]); |
131 | 127 | } |
132 | 128 | |
@@ -135,8 +131,7 @@ discard block |
||
135 | 131 | * |
136 | 132 | * @param string $id The unique identifier for the parameter or object |
137 | 133 | */ |
138 | - public function offsetUnset($id) |
|
139 | - { |
|
134 | + public function offsetUnset($id) { |
|
140 | 135 | if (isset($this->keys[$id])) { |
141 | 136 | if (is_object($this->values[$id])) { |
142 | 137 | unset($this->factories[$this->values[$id]], $this->protected[$this->values[$id]]); |
@@ -155,8 +150,7 @@ discard block |
||
155 | 150 | * |
156 | 151 | * @throws \InvalidArgumentException Service definition has to be a closure of an invokable object |
157 | 152 | */ |
158 | - public function factory($callable) |
|
159 | - { |
|
153 | + public function factory($callable) { |
|
160 | 154 | if (!method_exists($callable, '__invoke')) { |
161 | 155 | throw new \InvalidArgumentException('Service definition is not a Closure or invokable object.'); |
162 | 156 | } |
@@ -177,8 +171,7 @@ discard block |
||
177 | 171 | * |
178 | 172 | * @throws \InvalidArgumentException Service definition has to be a closure of an invokable object |
179 | 173 | */ |
180 | - public function protect($callable) |
|
181 | - { |
|
174 | + public function protect($callable) { |
|
182 | 175 | if (!method_exists($callable, '__invoke')) { |
183 | 176 | throw new \InvalidArgumentException('Callable is not a Closure or invokable object.'); |
184 | 177 | } |
@@ -197,8 +190,7 @@ discard block |
||
197 | 190 | * |
198 | 191 | * @throws \InvalidArgumentException if the identifier is not defined |
199 | 192 | */ |
200 | - public function raw($id) |
|
201 | - { |
|
193 | + public function raw($id) { |
|
202 | 194 | if (!isset($this->keys[$id])) { |
203 | 195 | throw new \InvalidArgumentException(sprintf('Identifier "%s" is not defined.', $id)); |
204 | 196 | } |
@@ -223,8 +215,7 @@ discard block |
||
223 | 215 | * |
224 | 216 | * @throws \InvalidArgumentException if the identifier is not defined or not a service definition |
225 | 217 | */ |
226 | - public function extend($id, $callable) |
|
227 | - { |
|
218 | + public function extend($id, $callable) { |
|
228 | 219 | if (!isset($this->keys[$id])) { |
229 | 220 | throw new \InvalidArgumentException(sprintf('Identifier "%s" is not defined.', $id)); |
230 | 221 | } |
@@ -256,8 +247,7 @@ discard block |
||
256 | 247 | * |
257 | 248 | * @return array An array of value names |
258 | 249 | */ |
259 | - public function keys() |
|
260 | - { |
|
250 | + public function keys() { |
|
261 | 251 | return array_keys($this->values); |
262 | 252 | } |
263 | 253 | |
@@ -269,8 +259,7 @@ discard block |
||
269 | 259 | * |
270 | 260 | * @return static |
271 | 261 | */ |
272 | - public function register(ServiceProviderInterface $provider, array $values = array()) |
|
273 | - { |
|
262 | + public function register(ServiceProviderInterface $provider, array $values = array()) { |
|
274 | 263 | $provider->register($this); |
275 | 264 | |
276 | 265 | foreach ($values as $key => $value) { |