@@ -1,7 +1,7 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | /* Copyright (C) NAVER <http://www.navercorp.com> */ |
3 | 3 | |
4 | -if(!defined("__XE__")) exit(); |
|
4 | +if (!defined("__XE__")) exit(); |
|
5 | 5 | |
6 | 6 | /** |
7 | 7 | * @file captcha.addon.php |
@@ -9,10 +9,10 @@ discard block |
||
9 | 9 | * @brief Captcha for a particular action |
10 | 10 | * English alphabets and voice verification added |
11 | 11 | * */ |
12 | -if(!class_exists('AddonCaptcha', false)) |
|
12 | +if (!class_exists('AddonCaptcha', false)) |
|
13 | 13 | { |
14 | 14 | // On the mobile mode, XE Core does not load jquery and xe.js as normal. |
15 | - if(Mobile::isFromMobilePhone()) |
|
15 | + if (Mobile::isFromMobilePhone()) |
|
16 | 16 | { |
17 | 17 | Context::loadFile(array('./common/js/jquery.min.js', 'head', NULL, -100000), true); |
18 | 18 | Context::loadFile(array('./common/js/xe.min.js', 'head', NULL, -100000), true); |
@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | |
32 | 32 | function before_module_proc() |
33 | 33 | { |
34 | - if($this->addon_info->act_type == 'everytime' && $_SESSION['captcha_authed']) |
|
34 | + if ($this->addon_info->act_type == 'everytime' && $_SESSION['captcha_authed']) |
|
35 | 35 | { |
36 | 36 | unset($_SESSION['captcha_authed']); |
37 | 37 | } |
@@ -40,19 +40,19 @@ discard block |
||
40 | 40 | function before_module_init(&$ModuleHandler) |
41 | 41 | { |
42 | 42 | $logged_info = Context::get('logged_info'); |
43 | - if($logged_info->is_admin == 'Y' || $logged_info->is_site_admin) |
|
43 | + if ($logged_info->is_admin == 'Y' || $logged_info->is_site_admin) |
|
44 | 44 | { |
45 | 45 | return false; |
46 | 46 | } |
47 | - if($this->addon_info->target != 'all' && Context::get('is_logged')) |
|
47 | + if ($this->addon_info->target != 'all' && Context::get('is_logged')) |
|
48 | 48 | { |
49 | 49 | return false; |
50 | 50 | } |
51 | - if($_SESSION['XE_VALIDATOR_ERROR'] == -1) |
|
51 | + if ($_SESSION['XE_VALIDATOR_ERROR'] == -1) |
|
52 | 52 | { |
53 | 53 | $_SESSION['captcha_authed'] = false; |
54 | 54 | } |
55 | - if($_SESSION['captcha_authed']) |
|
55 | + if ($_SESSION['captcha_authed']) |
|
56 | 56 | { |
57 | 57 | return false; |
58 | 58 | } |
@@ -61,11 +61,11 @@ discard block |
||
61 | 61 | |
62 | 62 | $this->target_acts = array('procBoardInsertDocument', 'procBoardInsertComment', 'procIssuetrackerInsertIssue', 'procIssuetrackerInsertHistory', 'procTextyleInsertComment'); |
63 | 63 | |
64 | - if(Context::getRequestMethod() != 'XMLRPC' && Context::getRequestMethod() !== 'JSON') |
|
64 | + if (Context::getRequestMethod() != 'XMLRPC' && Context::getRequestMethod() !== 'JSON') |
|
65 | 65 | { |
66 | - if($type == 'inline') |
|
66 | + if ($type == 'inline') |
|
67 | 67 | { |
68 | - if(!$this->compareCaptcha()) |
|
68 | + if (!$this->compareCaptcha()) |
|
69 | 69 | { |
70 | 70 | Context::loadLang(_XE_PATH_ . 'addons/captcha/lang'); |
71 | 71 | $_SESSION['XE_VALIDATOR_ERROR'] = -1; |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | } |
87 | 87 | |
88 | 88 | // compare session when calling actions such as writing a post or a comment on the board/issue tracker module |
89 | - if(!$_SESSION['captcha_authed'] && in_array(Context::get('act'), $this->target_acts)) |
|
89 | + if (!$_SESSION['captcha_authed'] && in_array(Context::get('act'), $this->target_acts)) |
|
90 | 90 | { |
91 | 91 | Context::loadLang(_XE_PATH_ . 'addons/captcha/lang'); |
92 | 92 | $ModuleHandler->error = "captcha_denied"; |
@@ -98,7 +98,7 @@ discard block |
||
98 | 98 | function createKeyword() |
99 | 99 | { |
100 | 100 | $type = Context::get('captchaType'); |
101 | - if($type == 'inline' && $_SESSION['captcha_keyword']) |
|
101 | + if ($type == 'inline' && $_SESSION['captcha_keyword']) |
|
102 | 102 | { |
103 | 103 | return; |
104 | 104 | } |
@@ -111,7 +111,7 @@ discard block |
||
111 | 111 | |
112 | 112 | function before_module_init_setCaptchaSession() |
113 | 113 | { |
114 | - if($_SESSION['captcha_authed']) |
|
114 | + if ($_SESSION['captcha_authed']) |
|
115 | 115 | { |
116 | 116 | return false; |
117 | 117 | } |
@@ -140,11 +140,11 @@ discard block |
||
140 | 140 | |
141 | 141 | function before_module_init_captchaImage() |
142 | 142 | { |
143 | - if($_SESSION['captcha_authed']) |
|
143 | + if ($_SESSION['captcha_authed']) |
|
144 | 144 | { |
145 | 145 | return false; |
146 | 146 | } |
147 | - if(Context::get('renew')) |
|
147 | + if (Context::get('renew')) |
|
148 | 148 | { |
149 | 149 | $this->createKeyword(); |
150 | 150 | } |
@@ -166,7 +166,7 @@ discard block |
||
166 | 166 | function createCaptchaImage($string) |
167 | 167 | { |
168 | 168 | $arr = array(); |
169 | - for($i = 0, $c = strlen($string); $i < $c; $i++) |
|
169 | + for ($i = 0, $c = strlen($string); $i < $c; $i++) |
|
170 | 170 | { |
171 | 171 | $arr[] = $string{$i}; |
172 | 172 | } |
@@ -188,7 +188,7 @@ discard block |
||
188 | 188 | shuffle($deg); |
189 | 189 | |
190 | 190 | // Create an image for each letter |
191 | - foreach($arr as $i => $str) |
|
191 | + foreach ($arr as $i => $str) |
|
192 | 192 | { |
193 | 193 | $im[$i + 1] = @imagecreate($w, $h); |
194 | 194 | $background_color = imagecolorallocate($im[$i + 1], 255, 255, 255); |
@@ -198,7 +198,7 @@ discard block |
||
198 | 198 | $ran = range(1, 20); |
199 | 199 | shuffle($ran); |
200 | 200 | |
201 | - if(function_exists('imagerotate')) |
|
201 | + if (function_exists('imagerotate')) |
|
202 | 202 | { |
203 | 203 | imagestring($im[$i + 1], (array_pop($ran) % 3) + 3, 2, (array_pop($ran) % 8), $str, $text_color); |
204 | 204 | $im[$i + 1] = imagerotate($im[$i + 1], array_pop($deg), 0); |
@@ -213,7 +213,7 @@ discard block |
||
213 | 213 | } |
214 | 214 | |
215 | 215 | // Combine images of each character |
216 | - for($i = 1, $c = count($im); $i<$c; $i++) |
|
216 | + for ($i = 1, $c = count($im); $i < $c; $i++) |
|
217 | 217 | { |
218 | 218 | imagecopy($im[0], $im[$i], (($w + 2) * ($i - 1)), 0, 0, 0, $w, $h); |
219 | 219 | imagedestroy($im[$i]); |
@@ -225,7 +225,7 @@ discard block |
||
225 | 225 | imagecopyresized($big, $im[0], 0, 0, 0, 0, ($w + 2) * $big_count * $c, $h * $big_count, ($w + 2) * $c, $h); |
226 | 226 | imagedestroy($im[0]); |
227 | 227 | |
228 | - if(function_exists('imageantialias')) |
|
228 | + if (function_exists('imageantialias')) |
|
229 | 229 | { |
230 | 230 | imageantialias($big, true); |
231 | 231 | } |
@@ -237,7 +237,7 @@ discard block |
||
237 | 237 | $h = $h * $big_count; |
238 | 238 | $d = array_pop($deg); |
239 | 239 | |
240 | - for($i = -abs($d); $i < $h + abs($d); $i = $i + 7) |
|
240 | + for ($i = -abs($d); $i < $h + abs($d); $i = $i + 7) |
|
241 | 241 | { |
242 | 242 | imageline($big, 0, $i + $d, $w, $i, $line_color); |
243 | 243 | } |
@@ -245,7 +245,7 @@ discard block |
||
245 | 245 | $x = range(0, ($w - 10)); |
246 | 246 | shuffle($x); |
247 | 247 | |
248 | - for($i = 0; $i < 200; $i++) |
|
248 | + for ($i = 0; $i < 200; $i++) |
|
249 | 249 | { |
250 | 250 | imagesetpixel($big, $x[$i] % $w, $x[$i + 1] % $h, $line_color); |
251 | 251 | } |
@@ -255,7 +255,7 @@ discard block |
||
255 | 255 | |
256 | 256 | function before_module_init_captchaAudio() |
257 | 257 | { |
258 | - if($_SESSION['captcha_authed']) |
|
258 | + if ($_SESSION['captcha_authed']) |
|
259 | 259 | { |
260 | 260 | return false; |
261 | 261 | } |
@@ -279,17 +279,17 @@ discard block |
||
279 | 279 | { |
280 | 280 | $data = ''; |
281 | 281 | $_audio = './addons/captcha/audio/F_%s.mp3'; |
282 | - for($i = 0, $c = strlen($string); $i < $c; $i++) |
|
282 | + for ($i = 0, $c = strlen($string); $i < $c; $i++) |
|
283 | 283 | { |
284 | 284 | $_data = FileHandler::readFile(sprintf($_audio, $string{$i})); |
285 | 285 | |
286 | 286 | $start = rand(5, 68); // Random start in 4-byte header and 64 byte data |
287 | 287 | $datalen = strlen($_data) - $start - 256; // Last unchanged 256 bytes |
288 | 288 | |
289 | - for($j = $start; $j < $datalen; $j+=64) |
|
289 | + for ($j = $start; $j < $datalen; $j += 64) |
|
290 | 290 | { |
291 | 291 | $ch = ord($_data{$j}); |
292 | - if($ch < 9 || $ch > 119) |
|
292 | + if ($ch < 9 || $ch > 119) |
|
293 | 293 | { |
294 | 294 | continue; |
295 | 295 | } |
@@ -304,14 +304,14 @@ discard block |
||
304 | 304 | |
305 | 305 | function compareCaptcha() |
306 | 306 | { |
307 | - if(!in_array(Context::get('act'), $this->target_acts)) return true; |
|
307 | + if (!in_array(Context::get('act'), $this->target_acts)) return true; |
|
308 | 308 | |
309 | - if($_SESSION['captcha_authed']) |
|
309 | + if ($_SESSION['captcha_authed']) |
|
310 | 310 | { |
311 | 311 | return true; |
312 | 312 | } |
313 | 313 | |
314 | - if(strtoupper($_SESSION['captcha_keyword']) == strtoupper(Context::get('secret_text'))) |
|
314 | + if (strtoupper($_SESSION['captcha_keyword']) == strtoupper(Context::get('secret_text'))) |
|
315 | 315 | { |
316 | 316 | $_SESSION['captcha_authed'] = true; |
317 | 317 | return true; |
@@ -324,7 +324,7 @@ discard block |
||
324 | 324 | |
325 | 325 | function before_module_init_captchaCompare() |
326 | 326 | { |
327 | - if(!$this->compareCaptcha()) |
|
327 | + if (!$this->compareCaptcha()) |
|
328 | 328 | { |
329 | 329 | return false; |
330 | 330 | } |
@@ -384,18 +384,18 @@ discard block |
||
384 | 384 | |
385 | 385 | $oAddonCaptcha = &$GLOBALS['__AddonCaptcha__']; |
386 | 386 | |
387 | -if(method_exists($oAddonCaptcha, $called_position)) |
|
387 | +if (method_exists($oAddonCaptcha, $called_position)) |
|
388 | 388 | { |
389 | - if(!call_user_func_array(array(&$oAddonCaptcha, $called_position), array(&$this))) |
|
389 | + if (!call_user_func_array(array(&$oAddonCaptcha, $called_position), array(&$this))) |
|
390 | 390 | { |
391 | 391 | return false; |
392 | 392 | } |
393 | 393 | } |
394 | 394 | |
395 | 395 | $addon_act = Context::get('captcha_action'); |
396 | -if($addon_act && method_exists($oAddonCaptcha, $called_position . '_' . $addon_act)) |
|
396 | +if ($addon_act && method_exists($oAddonCaptcha, $called_position . '_' . $addon_act)) |
|
397 | 397 | { |
398 | - if(!call_user_func_array(array(&$oAddonCaptcha, $called_position . '_' . $addon_act), array(&$this))) |
|
398 | + if (!call_user_func_array(array(&$oAddonCaptcha, $called_position . '_' . $addon_act), array(&$this))) |
|
399 | 399 | { |
400 | 400 | return false; |
401 | 401 | } |
@@ -286,6 +286,9 @@ |
||
286 | 286 | exit(); |
287 | 287 | } |
288 | 288 | |
289 | + /** |
|
290 | + * @param string $string |
|
291 | + */ |
|
289 | 292 | function createCaptchaAudio($string) |
290 | 293 | { |
291 | 294 | $data = ''; |
@@ -1,7 +1,9 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | /* Copyright (C) NAVER <http://www.navercorp.com> */ |
3 | 3 | |
4 | -if(!defined("__XE__")) exit(); |
|
4 | +if(!defined("__XE__")) { |
|
5 | + exit(); |
|
6 | +} |
|
5 | 7 | |
6 | 8 | /** |
7 | 9 | * @file captcha.addon.php |
@@ -85,8 +87,7 @@ discard block |
||
85 | 87 | $_SESSION['XE_VALIDATOR_RETURN_URL'] = Context::get('error_return_url'); |
86 | 88 | $ModuleHandler->_setInputValueToSession(); |
87 | 89 | } |
88 | - } |
|
89 | - else |
|
90 | + } else |
|
90 | 91 | { |
91 | 92 | Context::addHtmlHeader('<script> |
92 | 93 | if(!captchaTargetAct) {var captchaTargetAct = [];} |
@@ -216,8 +217,7 @@ discard block |
||
216 | 217 | |
217 | 218 | $background_color = imagecolorallocate($im[$i + 1], 255, 255, 255); |
218 | 219 | imagecolortransparent($im[$i + 1], $background_color); |
219 | - } |
|
220 | - else |
|
220 | + } else |
|
221 | 221 | { |
222 | 222 | imagestring($im[$i + 1], (array_pop($ran) % 3) + 3, 2, (array_pop($ran) % 4), $str, $text_color); |
223 | 223 | } |
@@ -315,7 +315,9 @@ discard block |
||
315 | 315 | |
316 | 316 | function compareCaptcha() |
317 | 317 | { |
318 | - if(!in_array(Context::get('act'), $this->target_acts)) return true; |
|
318 | + if(!in_array(Context::get('act'), $this->target_acts)) { |
|
319 | + return true; |
|
320 | + } |
|
319 | 321 | |
320 | 322 | if($_SESSION['member_captcha_authed']) |
321 | 323 | { |
@@ -1,7 +1,7 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | /* Copyright (C) NAVER <http://www.navercorp.com> */ |
3 | 3 | |
4 | -if(!defined('__XE__')) |
|
4 | +if (!defined('__XE__')) |
|
5 | 5 | exit(); |
6 | 6 | |
7 | 7 | /** |
@@ -10,7 +10,7 @@ discard block |
||
10 | 10 | * @brief Counter add-on |
11 | 11 | */ |
12 | 12 | // Execute if called_position is before_display_content |
13 | -if($called_position == 'before_module_init' && Context::get('module') != 'admin' && Context::getResponseMethod() == 'HTML' && Context::isInstalled() && !isCrawler()) |
|
13 | +if ($called_position == 'before_module_init' && Context::get('module') != 'admin' && Context::getResponseMethod() == 'HTML' && Context::isInstalled() && !isCrawler()) |
|
14 | 14 | { |
15 | 15 | $oCounterController = getController('counter'); |
16 | 16 | $oCounterController->counterExecute(); |
@@ -1,8 +1,9 @@ |
||
1 | 1 | <?php |
2 | 2 | /* Copyright (C) NAVER <http://www.navercorp.com> */ |
3 | 3 | |
4 | -if(!defined('__XE__')) |
|
4 | +if(!defined('__XE__')) { |
|
5 | 5 | exit(); |
6 | +} |
|
6 | 7 | |
7 | 8 | /** |
8 | 9 | * @file point.addon.php |
@@ -1,7 +1,7 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | /* Copyright (C) NAVER <http://www.navercorp.com> */ |
3 | 3 | |
4 | -if(!defined('__XE__')) |
|
4 | +if (!defined('__XE__')) |
|
5 | 5 | exit(); |
6 | 6 | |
7 | 7 | /** |
@@ -15,7 +15,7 @@ discard block |
||
15 | 15 | */ |
16 | 16 | // Stop if non-logged-in user is |
17 | 17 | $logged_info = Context::get('logged_info'); |
18 | -if(!$logged_info|| isCrawler()) |
|
18 | +if (!$logged_info || isCrawler()) |
|
19 | 19 | { |
20 | 20 | return; |
21 | 21 | } |
@@ -23,7 +23,7 @@ discard block |
||
23 | 23 | /** |
24 | 24 | * Message/Friend munus are added on the pop-up window and member profile. Check if a new message is received |
25 | 25 | * */ |
26 | -if($this->module != 'member' && $called_position == 'before_module_init') |
|
26 | +if ($this->module != 'member' && $called_position == 'before_module_init') |
|
27 | 27 | { |
28 | 28 | // Load a language file from the communication module |
29 | 29 | Context::loadLang(_XE_PATH_ . 'modules/communication/lang'); |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | $oMemberController->addMemberMenu('dispCommunicationMessages', 'cmd_view_message_box'); |
34 | 34 | |
35 | 35 | $flag_file = _XE_PATH_ . 'files/member_extra_info/new_message_flags/' . getNumberingPath($logged_info->member_srl) . $logged_info->member_srl; |
36 | - if($addon_info->use_alarm != 'N' && file_exists($flag_file)) |
|
36 | + if ($addon_info->use_alarm != 'N' && file_exists($flag_file)) |
|
37 | 37 | { |
38 | 38 | // Pop-up to display messages if a flag on new message is set |
39 | 39 | $new_message_count = (int) trim(FileHandler::readFile($flag_file)); |
@@ -45,13 +45,13 @@ discard block |
||
45 | 45 | Context::addHtmlFooter("<script type=\"text/javascript\">jQuery(function(){ xeNotifyMessage('{$text}','{$new_message_count}'); });</script>"); |
46 | 46 | } |
47 | 47 | } |
48 | -elseif($this->act == 'getMemberMenu' && $called_position == 'before_module_proc') |
|
48 | +elseif ($this->act == 'getMemberMenu' && $called_position == 'before_module_proc') |
|
49 | 49 | { |
50 | 50 | $member_srl = Context::get('target_srl'); |
51 | 51 | $oCommunicationModel = getModel('communication'); |
52 | 52 | |
53 | 53 | // Add a feature to display own message box. |
54 | - if($logged_info->member_srl == $member_srl) |
|
54 | + if ($logged_info->member_srl == $member_srl) |
|
55 | 55 | { |
56 | 56 | $mid = Context::get('cur_mid'); |
57 | 57 | $oMemberController = getController('member'); |
@@ -66,17 +66,17 @@ discard block |
||
66 | 66 | // Get member information |
67 | 67 | $oMemberModel = getModel('member'); |
68 | 68 | $target_member_info = $oMemberModel->getMemberInfoByMemberSrl($member_srl); |
69 | - if(!$target_member_info->member_srl) |
|
69 | + if (!$target_member_info->member_srl) |
|
70 | 70 | { |
71 | 71 | return; |
72 | 72 | } |
73 | 73 | |
74 | 74 | $oMemberController = getController('member'); |
75 | 75 | // Add a menu for sending message |
76 | - if($logged_info->is_admin == 'Y' || $target_member_info->allow_message == 'Y' || ($target_member_info->allow_message == 'F' && $oCommunicationModel->isFriend($member_srl))) |
|
76 | + if ($logged_info->is_admin == 'Y' || $target_member_info->allow_message == 'Y' || ($target_member_info->allow_message == 'F' && $oCommunicationModel->isFriend($member_srl))) |
|
77 | 77 | $oMemberController->addMemberPopupMenu(getUrl('', 'mid', Context::get('cur_mid'), 'act', 'dispCommunicationSendMessage', 'receiver_srl', $member_srl), 'cmd_send_message', '', 'popup'); |
78 | 78 | // Add a menu for listing friends (if a friend is new) |
79 | - if(!$oCommunicationModel->isAddedFriend($member_srl)) |
|
79 | + if (!$oCommunicationModel->isAddedFriend($member_srl)) |
|
80 | 80 | $oMemberController->addMemberPopupMenu(getUrl('', 'mid', Context::get('cur_mid'), 'act', 'dispCommunicationAddFriend', 'target_srl', $member_srl), 'cmd_add_friend', '', 'popup'); |
81 | 81 | } |
82 | 82 | } |
@@ -1,8 +1,9 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | /* Copyright (C) NAVER <http://www.navercorp.com> */ |
3 | 3 | |
4 | -if(!defined('__XE__')) |
|
4 | +if(!defined('__XE__')) { |
|
5 | 5 | exit(); |
6 | +} |
|
6 | 7 | |
7 | 8 | /** |
8 | 9 | * @file member_communication.addon.php |
@@ -44,8 +45,7 @@ discard block |
||
44 | 45 | $text = preg_replace('@\r?\n@', '\\n', addslashes(Context::getLang('alert_new_message_arrived'))); |
45 | 46 | Context::addHtmlFooter("<script type=\"text/javascript\">jQuery(function(){ xeNotifyMessage('{$text}','{$new_message_count}'); });</script>"); |
46 | 47 | } |
47 | -} |
|
48 | -elseif($this->act == 'getMemberMenu' && $called_position == 'before_module_proc') |
|
48 | +} elseif($this->act == 'getMemberMenu' && $called_position == 'before_module_proc') |
|
49 | 49 | { |
50 | 50 | $member_srl = Context::get('target_srl'); |
51 | 51 | $oCommunicationModel = getModel('communication'); |
@@ -60,8 +60,7 @@ discard block |
||
60 | 60 | // Display a list of friends |
61 | 61 | $oMemberController->addMemberPopupMenu(getUrl('', 'mid', $mid, 'act', 'dispCommunicationFriend'), 'cmd_view_friend', '', 'self'); |
62 | 62 | // If not, Add menus to send message and to add friends |
63 | - } |
|
64 | - else |
|
63 | + } else |
|
65 | 64 | { |
66 | 65 | // Get member information |
67 | 66 | $oMemberModel = getModel('member'); |
@@ -73,11 +72,13 @@ discard block |
||
73 | 72 | |
74 | 73 | $oMemberController = getController('member'); |
75 | 74 | // Add a menu for sending message |
76 | - if($logged_info->is_admin == 'Y' || $target_member_info->allow_message == 'Y' || ($target_member_info->allow_message == 'F' && $oCommunicationModel->isFriend($member_srl))) |
|
77 | - $oMemberController->addMemberPopupMenu(getUrl('', 'mid', Context::get('cur_mid'), 'act', 'dispCommunicationSendMessage', 'receiver_srl', $member_srl), 'cmd_send_message', '', 'popup'); |
|
75 | + if($logged_info->is_admin == 'Y' || $target_member_info->allow_message == 'Y' || ($target_member_info->allow_message == 'F' && $oCommunicationModel->isFriend($member_srl))) { |
|
76 | + $oMemberController->addMemberPopupMenu(getUrl('', 'mid', Context::get('cur_mid'), 'act', 'dispCommunicationSendMessage', 'receiver_srl', $member_srl), 'cmd_send_message', '', 'popup'); |
|
77 | + } |
|
78 | 78 | // Add a menu for listing friends (if a friend is new) |
79 | - if(!$oCommunicationModel->isAddedFriend($member_srl)) |
|
80 | - $oMemberController->addMemberPopupMenu(getUrl('', 'mid', Context::get('cur_mid'), 'act', 'dispCommunicationAddFriend', 'target_srl', $member_srl), 'cmd_add_friend', '', 'popup'); |
|
79 | + if(!$oCommunicationModel->isAddedFriend($member_srl)) { |
|
80 | + $oMemberController->addMemberPopupMenu(getUrl('', 'mid', Context::get('cur_mid'), 'act', 'dispCommunicationAddFriend', 'target_srl', $member_srl), 'cmd_add_friend', '', 'popup'); |
|
81 | + } |
|
81 | 82 | } |
82 | 83 | } |
83 | 84 | /* End of file member_communication.addon.php */ |
@@ -8,12 +8,12 @@ discard block |
||
8 | 8 | { |
9 | 9 | // If member_srl < 0, then return text only in the body |
10 | 10 | $member_srl = $matches[3]; |
11 | - if($member_srl < 0) |
|
11 | + if ($member_srl < 0) |
|
12 | 12 | { |
13 | 13 | return $matches[5]; |
14 | 14 | } |
15 | 15 | // If member_srl=o(not a member), return the entire body |
16 | - if(!$member_srl) |
|
16 | + if (!$member_srl) |
|
17 | 17 | { |
18 | 18 | return $matches[0]; |
19 | 19 | } |
@@ -23,13 +23,13 @@ discard block |
||
23 | 23 | |
24 | 24 | $_tmp = &$GLOBALS['_transImageNameList'][$member_srl]; |
25 | 25 | // If pre-defined data in the global variablesm return it |
26 | - if(!$_tmp->cached) |
|
26 | + if (!$_tmp->cached) |
|
27 | 27 | { |
28 | 28 | $_tmp->cached = true; |
29 | 29 | $image_name_file = sprintf('files/member_extra_info/image_name/%s%d.gif', getNumberingPath($member_srl), $member_srl); |
30 | 30 | $image_mark_file = sprintf('files/member_extra_info/image_mark/%s%d.gif', getNumberingPath($member_srl), $member_srl); |
31 | 31 | |
32 | - if(file_exists(_XE_PATH_ . $image_name_file)) |
|
32 | + if (file_exists(_XE_PATH_ . $image_name_file)) |
|
33 | 33 | { |
34 | 34 | $_tmp->image_name_file = $image_name_file; |
35 | 35 | } |
@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | $image_name_file = ''; |
39 | 39 | } |
40 | 40 | |
41 | - if(file_exists(_XE_PATH_ . $image_mark_file)) |
|
41 | + if (file_exists(_XE_PATH_ . $image_mark_file)) |
|
42 | 42 | { |
43 | 43 | $_tmp->image_mark_file = $image_mark_file; |
44 | 44 | } |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | } |
60 | 60 | |
61 | 61 | // If image name and mark doesn't exist, set the original information |
62 | - if(!$image_name_file && !$image_mark_file && !$group_image) |
|
62 | + if (!$image_name_file && !$image_mark_file && !$group_image) |
|
63 | 63 | { |
64 | 64 | return $matches[0]; |
65 | 65 | } |
@@ -68,16 +68,16 @@ discard block |
||
68 | 68 | |
69 | 69 | $config = $oMemberModel->getMemberConfig(); |
70 | 70 | |
71 | - if($config->image_name == 'Y' && $image_name_file) |
|
71 | + if ($config->image_name == 'Y' && $image_name_file) |
|
72 | 72 | { |
73 | 73 | $nick_name = sprintf('<img src="%s%s" alt="id: %s" title="id: %s" style="border:0;vertical-align:middle;margin-right:3px" />', Context::getRequestUri(), $image_name_file, strip_tags($nick_name), strip_tags($nick_name)); |
74 | 74 | } |
75 | - if($config->image_mark == 'Y' && $image_mark_file) |
|
75 | + if ($config->image_mark == 'Y' && $image_mark_file) |
|
76 | 76 | { |
77 | 77 | $nick_name = sprintf('<img src="%s%s" alt="id: %s" title="id : %s" style="border:0;vertical-align:middle;margin-right:3px"/>%s', Context::getRequestUri(), $image_mark_file, strip_tags($nick_name), strip_tags($nick_name), $nick_name); |
78 | 78 | } |
79 | 79 | |
80 | - if($group_image) |
|
80 | + if ($group_image) |
|
81 | 81 | { |
82 | 82 | $nick_name = sprintf('<img src="%s" style="border:0;max-height:16px;vertical-align:middle;margin-right:3px" alt="%s" title="%s" />%s', $group_image->src, $group_image->title, $group_image->description, $nick_name); |
83 | 83 | } |
@@ -32,8 +32,7 @@ discard block |
||
32 | 32 | if(file_exists(_XE_PATH_ . $image_name_file)) |
33 | 33 | { |
34 | 34 | $_tmp->image_name_file = $image_name_file; |
35 | - } |
|
36 | - else |
|
35 | + } else |
|
37 | 36 | { |
38 | 37 | $image_name_file = ''; |
39 | 38 | } |
@@ -41,8 +40,7 @@ discard block |
||
41 | 40 | if(file_exists(_XE_PATH_ . $image_mark_file)) |
42 | 41 | { |
43 | 42 | $_tmp->image_mark_file = $image_mark_file; |
44 | - } |
|
45 | - else |
|
43 | + } else |
|
46 | 44 | { |
47 | 45 | $image_mark_file = ''; |
48 | 46 | } |
@@ -50,8 +48,7 @@ discard block |
||
50 | 48 | $site_module_info = Context::get('site_module_info'); |
51 | 49 | $group_image = $oMemberModel->getGroupImageMark($member_srl, $site_module_info->site_srl); |
52 | 50 | $_tmp->group_image = $group_image; |
53 | - } |
|
54 | - else |
|
51 | + } else |
|
55 | 52 | { |
56 | 53 | $group_image = $_tmp->group_image; |
57 | 54 | $image_name_file = $_tmp->image_name_file; |
@@ -18,17 +18,17 @@ discard block |
||
18 | 18 | **/ |
19 | 19 | function printHeader() |
20 | 20 | { |
21 | - header("Content-Type:text/x-hdml; charset=".$this->charset); |
|
21 | + header("Content-Type:text/x-hdml; charset=" . $this->charset); |
|
22 | 22 | header("Cache-Control: no-store, no-cache, must-revalidate"); |
23 | 23 | header("Cache-Control: post-check=0, pre-check=0", false); |
24 | 24 | header("Pragma: no-cache"); |
25 | 25 | |
26 | 26 | print '<hdml version=3.0 ttl=0 markable=true>'; |
27 | 27 | print "\n"; |
28 | - print $this->hasChilds()?'<choice name=main>':'<display>'; |
|
28 | + print $this->hasChilds() ? '<choice name=main>' : '<display>'; |
|
29 | 29 | print "\n"; |
30 | 30 | |
31 | - if($this->upperUrl) |
|
31 | + if ($this->upperUrl) |
|
32 | 32 | { |
33 | 33 | $url = $this->upperUrl; |
34 | 34 | printf('<action type=soft1 task=go dest="%s" label="%s">%s', $url->url, $url->text, "\n"); |
@@ -40,8 +40,8 @@ discard block |
||
40 | 40 | **/ |
41 | 41 | function printTitle() |
42 | 42 | { |
43 | - if($this->totalPage > $this->mobilePage) $titlePageStr = sprintf("(%d/%d)",$this->mobilePage, $this->totalPage); |
|
44 | - printf('<b><%s%s>%s', $this->title,$titlePageStr,"\n"); |
|
43 | + if ($this->totalPage > $this->mobilePage) $titlePageStr = sprintf("(%d/%d)", $this->mobilePage, $this->totalPage); |
|
44 | + printf('<b><%s%s>%s', $this->title, $titlePageStr, "\n"); |
|
45 | 45 | } |
46 | 46 | |
47 | 47 | /** |
@@ -50,17 +50,17 @@ discard block |
||
50 | 50 | **/ |
51 | 51 | function printContent() |
52 | 52 | { |
53 | - if($this->hasChilds()) |
|
53 | + if ($this->hasChilds()) |
|
54 | 54 | { |
55 | - foreach($this->getChilds() as $key => $val) |
|
55 | + foreach ($this->getChilds() as $key => $val) |
|
56 | 56 | { |
57 | - if(!$val['link']) continue; |
|
58 | - printf('<ce task=go label="%s" dest="%s">%s%s',Context::getLang('cmd_select'), $val['href'], $val['text'], "\n"); |
|
57 | + if (!$val['link']) continue; |
|
58 | + printf('<ce task=go label="%s" dest="%s">%s%s', Context::getLang('cmd_select'), $val['href'], $val['text'], "\n"); |
|
59 | 59 | } |
60 | 60 | } |
61 | 61 | else |
62 | 62 | { |
63 | - printf('<wrap>%s<br>%s', $this->getContent(),"\n"); |
|
63 | + printf('<wrap>%s<br>%s', $this->getContent(), "\n"); |
|
64 | 64 | } |
65 | 65 | } |
66 | 66 | |
@@ -70,19 +70,19 @@ discard block |
||
70 | 70 | function printBtn() |
71 | 71 | { |
72 | 72 | // Menu Types |
73 | - if($this->hasChilds()) |
|
73 | + if ($this->hasChilds()) |
|
74 | 74 | { |
75 | - if($this->nextUrl) |
|
75 | + if ($this->nextUrl) |
|
76 | 76 | { |
77 | 77 | $url = $this->nextUrl; |
78 | 78 | printf('<ce task=go label="%s" dest="%s">%s%s', $url->text, $url->url, $url->text, "\n"); |
79 | 79 | } |
80 | - if($this->prevUrl) |
|
80 | + if ($this->prevUrl) |
|
81 | 81 | { |
82 | 82 | $url = $this->prevUrl; |
83 | 83 | printf('<ce task=go label="%s" dest="%s">%s%s', $url->text, $url->url, $url->text, "\n"); |
84 | 84 | } |
85 | - if($this->homeUrl) |
|
85 | + if ($this->homeUrl) |
|
86 | 86 | { |
87 | 87 | $url = $this->homeUrl; |
88 | 88 | printf('<ce task=go label="%s" dest="%s">%s%s', $url->text, $url->url, $url->text, "\n"); |
@@ -91,17 +91,17 @@ discard block |
||
91 | 91 | } |
92 | 92 | else |
93 | 93 | { |
94 | - if($this->nextUrl) |
|
94 | + if ($this->nextUrl) |
|
95 | 95 | { |
96 | 96 | $url = $this->nextUrl; |
97 | 97 | printf('<a task=gosub label="%s" dest="%s">%s</a>', $url->text, $url->url, $url->text); |
98 | 98 | } |
99 | - if($this->prevUrl) |
|
99 | + if ($this->prevUrl) |
|
100 | 100 | { |
101 | 101 | $url = $this->prevUrl; |
102 | 102 | printf('<a task=gosub label="%s" dest="%s">%s</a>', $url->text, $url->url, $url->text); |
103 | 103 | } |
104 | - if($this->homeUrl) |
|
104 | + if ($this->homeUrl) |
|
105 | 105 | { |
106 | 106 | $url = $this->homeUrl; |
107 | 107 | printf('<a task=gosub label="%s" dest="%s">%s</a>', $url->text, $url->url, $url->text); |
@@ -114,7 +114,7 @@ discard block |
||
114 | 114 | **/ |
115 | 115 | function printFooter() |
116 | 116 | { |
117 | - print $this->hasChilds()?'</choice>':'</display>'; |
|
117 | + print $this->hasChilds() ? '</choice>' : '</display>'; |
|
118 | 118 | print "\n"; |
119 | 119 | print("</hdml>"); |
120 | 120 | } |
@@ -40,7 +40,9 @@ discard block |
||
40 | 40 | **/ |
41 | 41 | function printTitle() |
42 | 42 | { |
43 | - if($this->totalPage > $this->mobilePage) $titlePageStr = sprintf("(%d/%d)",$this->mobilePage, $this->totalPage); |
|
43 | + if($this->totalPage > $this->mobilePage) { |
|
44 | + $titlePageStr = sprintf("(%d/%d)",$this->mobilePage, $this->totalPage); |
|
45 | + } |
|
44 | 46 | printf('<b><%s%s>%s', $this->title,$titlePageStr,"\n"); |
45 | 47 | } |
46 | 48 | |
@@ -54,11 +56,12 @@ discard block |
||
54 | 56 | { |
55 | 57 | foreach($this->getChilds() as $key => $val) |
56 | 58 | { |
57 | - if(!$val['link']) continue; |
|
59 | + if(!$val['link']) { |
|
60 | + continue; |
|
61 | + } |
|
58 | 62 | printf('<ce task=go label="%s" dest="%s">%s%s',Context::getLang('cmd_select'), $val['href'], $val['text'], "\n"); |
59 | 63 | } |
60 | - } |
|
61 | - else |
|
64 | + } else |
|
62 | 65 | { |
63 | 66 | printf('<wrap>%s<br>%s', $this->getContent(),"\n"); |
64 | 67 | } |
@@ -88,8 +91,7 @@ discard block |
||
88 | 91 | printf('<ce task=go label="%s" dest="%s">%s%s', $url->text, $url->url, $url->text, "\n"); |
89 | 92 | } |
90 | 93 | // Content Types |
91 | - } |
|
92 | - else |
|
94 | + } else |
|
93 | 95 | { |
94 | 96 | if($this->nextUrl) |
95 | 97 | { |
@@ -1,8 +1,8 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * HDML Library ver 0.1 |
|
4 | - * @author NAVER ([email protected]) |
|
5 | - */ |
|
3 | + * HDML Library ver 0.1 |
|
4 | + * @author NAVER ([email protected]) |
|
5 | + */ |
|
6 | 6 | class wap extends mobileXE { |
7 | 7 | |
8 | 8 | /** |
@@ -20,14 +20,14 @@ discard block |
||
20 | 20 | function printHeader() |
21 | 21 | { |
22 | 22 | print("<html><head>\n"); |
23 | - if($this->totalPage > $this->mobilePage) $titlePageStr = sprintf("(%d/%d)",$this->mobilePage, $this->totalPage); |
|
24 | - printf("<title>%s%s</title></head><body>\n", htmlspecialchars($this->title, ENT_COMPAT | ENT_HTML401, 'UTF-8', false),htmlspecialchars($titlePageStr, ENT_COMPAT | ENT_HTML401, 'UTF-8', false)); |
|
23 | + if ($this->totalPage > $this->mobilePage) $titlePageStr = sprintf("(%d/%d)", $this->mobilePage, $this->totalPage); |
|
24 | + printf("<title>%s%s</title></head><body>\n", htmlspecialchars($this->title, ENT_COMPAT | ENT_HTML401, 'UTF-8', false), htmlspecialchars($titlePageStr, ENT_COMPAT | ENT_HTML401, 'UTF-8', false)); |
|
25 | 25 | } |
26 | 26 | // Output title |
27 | 27 | function printTitle() |
28 | 28 | { |
29 | - if($this->totalPage > $this->mobilePage) $titlePageStr = sprintf("(%d/%d)",$this->mobilePage, $this->totalPage); |
|
30 | - printf('<%s%s><br>%s', htmlspecialchars($this->title, ENT_COMPAT | ENT_HTML401, 'UTF-8', false),htmlspecialchars($titlePageStr, ENT_COMPAT | ENT_HTML401, 'UTF-8', false),"\n"); |
|
29 | + if ($this->totalPage > $this->mobilePage) $titlePageStr = sprintf("(%d/%d)", $this->mobilePage, $this->totalPage); |
|
30 | + printf('<%s%s><br>%s', htmlspecialchars($this->title, ENT_COMPAT | ENT_HTML401, 'UTF-8', false), htmlspecialchars($titlePageStr, ENT_COMPAT | ENT_HTML401, 'UTF-8', false), "\n"); |
|
31 | 31 | } |
32 | 32 | |
33 | 33 | /** |
@@ -36,18 +36,18 @@ discard block |
||
36 | 36 | **/ |
37 | 37 | function printContent() |
38 | 38 | { |
39 | - if($this->hasChilds()) |
|
39 | + if ($this->hasChilds()) |
|
40 | 40 | { |
41 | - foreach($this->getChilds() as $key => $val) |
|
41 | + foreach ($this->getChilds() as $key => $val) |
|
42 | 42 | { |
43 | - if(!$val['link']) continue; |
|
43 | + if (!$val['link']) continue; |
|
44 | 44 | printf('<a href="%s" accesskey="%s">%s</a><br>%s', $val['href'], $this->getNo(), $val['text'], "\n"); |
45 | - if($val['extra']) printf("<br>%s\n",str_replace('<br/>','<br>',$val['extra'])); |
|
45 | + if ($val['extra']) printf("<br>%s\n", str_replace('<br/>', '<br>', $val['extra'])); |
|
46 | 46 | } |
47 | 47 | } |
48 | 48 | else |
49 | 49 | { |
50 | - print(str_replace('<br/>','<br>',$this->getContent())."\n"); |
|
50 | + print(str_replace('<br/>', '<br>', $this->getContent()) . "\n"); |
|
51 | 51 | } |
52 | 52 | print "<hr><br>"; |
53 | 53 | } |
@@ -57,32 +57,32 @@ discard block |
||
57 | 57 | **/ |
58 | 58 | function printBtn() |
59 | 59 | { |
60 | - if($this->nextUrl) |
|
60 | + if ($this->nextUrl) |
|
61 | 61 | { |
62 | 62 | $url = $this->nextUrl; |
63 | 63 | printf('<a href="%s">%s</a><br>%s', $url->url, $url->text, "\n"); |
64 | 64 | } |
65 | - if($this->prevUrl) |
|
65 | + if ($this->prevUrl) |
|
66 | 66 | { |
67 | 67 | $url = $this->prevUrl; |
68 | 68 | printf('<a href="%s">%s</a><br>%s', $url->url, $url->text, "\n"); |
69 | 69 | } |
70 | 70 | // Select Language |
71 | - if(!parent::isLangChange()) |
|
71 | + if (!parent::isLangChange()) |
|
72 | 72 | { |
73 | - $url = getUrl('','lcm','1','sel_lang',Context::getLangType(),'return_uri',Context::get('current_url')); |
|
74 | - printf('<a href="%s">%s</a><br>%s', $url, 'Language : '.Context::getLang('select_lang'), "\n"); |
|
73 | + $url = getUrl('', 'lcm', '1', 'sel_lang', Context::getLangType(), 'return_uri', Context::get('current_url')); |
|
74 | + printf('<a href="%s">%s</a><br>%s', $url, 'Language : ' . Context::getLang('select_lang'), "\n"); |
|
75 | 75 | } |
76 | 76 | else |
77 | 77 | { |
78 | 78 | printf('<a href="%s">%s</a><br>%s', Context::get('return_uri'), Context::getLang('lang_return'), "\n"); |
79 | 79 | } |
80 | - if($this->upperUrl) |
|
80 | + if ($this->upperUrl) |
|
81 | 81 | { |
82 | 82 | $url = $this->upperUrl; |
83 | 83 | printf('<btn href="%s" name="%s">%s', $url->url, $url->text, "\n"); |
84 | 84 | } |
85 | - if($this->homeUrl) |
|
85 | + if ($this->homeUrl) |
|
86 | 86 | { |
87 | 87 | $url = $this->homeUrl; |
88 | 88 | printf('<a btn="%s" href="%s">%s</a><br>%s', $url->text, $url->url, $url->text, "\n"); |
@@ -20,13 +20,17 @@ discard block |
||
20 | 20 | function printHeader() |
21 | 21 | { |
22 | 22 | print("<html><head>\n"); |
23 | - if($this->totalPage > $this->mobilePage) $titlePageStr = sprintf("(%d/%d)",$this->mobilePage, $this->totalPage); |
|
23 | + if($this->totalPage > $this->mobilePage) { |
|
24 | + $titlePageStr = sprintf("(%d/%d)",$this->mobilePage, $this->totalPage); |
|
25 | + } |
|
24 | 26 | printf("<title>%s%s</title></head><body>\n", htmlspecialchars($this->title, ENT_COMPAT | ENT_HTML401, 'UTF-8', false),htmlspecialchars($titlePageStr, ENT_COMPAT | ENT_HTML401, 'UTF-8', false)); |
25 | 27 | } |
26 | 28 | // Output title |
27 | 29 | function printTitle() |
28 | 30 | { |
29 | - if($this->totalPage > $this->mobilePage) $titlePageStr = sprintf("(%d/%d)",$this->mobilePage, $this->totalPage); |
|
31 | + if($this->totalPage > $this->mobilePage) { |
|
32 | + $titlePageStr = sprintf("(%d/%d)",$this->mobilePage, $this->totalPage); |
|
33 | + } |
|
30 | 34 | printf('<%s%s><br>%s', htmlspecialchars($this->title, ENT_COMPAT | ENT_HTML401, 'UTF-8', false),htmlspecialchars($titlePageStr, ENT_COMPAT | ENT_HTML401, 'UTF-8', false),"\n"); |
31 | 35 | } |
32 | 36 | |
@@ -40,12 +44,15 @@ discard block |
||
40 | 44 | { |
41 | 45 | foreach($this->getChilds() as $key => $val) |
42 | 46 | { |
43 | - if(!$val['link']) continue; |
|
47 | + if(!$val['link']) { |
|
48 | + continue; |
|
49 | + } |
|
44 | 50 | printf('<a href="%s" accesskey="%s">%s</a><br>%s', $val['href'], $this->getNo(), $val['text'], "\n"); |
45 | - if($val['extra']) printf("<br>%s\n",str_replace('<br/>','<br>',$val['extra'])); |
|
51 | + if($val['extra']) { |
|
52 | + printf("<br>%s\n",str_replace('<br/>','<br>',$val['extra'])); |
|
53 | + } |
|
46 | 54 | } |
47 | - } |
|
48 | - else |
|
55 | + } else |
|
49 | 56 | { |
50 | 57 | print(str_replace('<br/>','<br>',$this->getContent())."\n"); |
51 | 58 | } |
@@ -72,8 +79,7 @@ discard block |
||
72 | 79 | { |
73 | 80 | $url = getUrl('','lcm','1','sel_lang',Context::getLangType(),'return_uri',Context::get('current_url')); |
74 | 81 | printf('<a href="%s">%s</a><br>%s', $url, 'Language : '.Context::getLang('select_lang'), "\n"); |
75 | - } |
|
76 | - else |
|
82 | + } else |
|
77 | 83 | { |
78 | 84 | printf('<a href="%s">%s</a><br>%s', Context::get('return_uri'), Context::getLang('lang_return'), "\n"); |
79 | 85 | } |
@@ -1,9 +1,9 @@ |
||
1 | 1 | <?php |
2 | 2 | include './mobile.class.php'; |
3 | 3 | /** |
4 | - * mhtml Library ver 0.1 |
|
5 | - * @author NAVER ([email protected]) / lang_select : misol |
|
6 | - */ |
|
4 | + * mhtml Library ver 0.1 |
|
5 | + * @author NAVER ([email protected]) / lang_select : misol |
|
6 | + */ |
|
7 | 7 | class wap extends mobileXE |
8 | 8 | { |
9 | 9 | /** |
@@ -1,8 +1,8 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * WML Library ver 0.1 |
|
4 | - * @author NAVER ([email protected]) / lang_select : misol |
|
5 | - */ |
|
3 | + * WML Library ver 0.1 |
|
4 | + * @author NAVER ([email protected]) / lang_select : misol |
|
5 | + */ |
|
6 | 6 | class wap extends mobileXE |
7 | 7 | { |
8 | 8 | /** |
@@ -19,11 +19,11 @@ discard block |
||
19 | 19 | function printHeader() |
20 | 20 | { |
21 | 21 | header("Content-Type: text/vnd.wap.wml"); |
22 | - header("charset: ".$this->charset); |
|
23 | - if($this->totalPage > $this->mobilePage) $titlePageStr = sprintf("(%d/%d)",$this->mobilePage, $this->totalPage); |
|
24 | - print("<?xml version=\"1.0\" encoding=\"".$this->charset."\"?><!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\" \"http://www.wapforum.org/DTD/wml_1.1.xml\">\n"); |
|
22 | + header("charset: " . $this->charset); |
|
23 | + if ($this->totalPage > $this->mobilePage) $titlePageStr = sprintf("(%d/%d)", $this->mobilePage, $this->totalPage); |
|
24 | + print("<?xml version=\"1.0\" encoding=\"" . $this->charset . "\"?><!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\" \"http://www.wapforum.org/DTD/wml_1.1.xml\">\n"); |
|
25 | 25 | // Card Title |
26 | - printf("<wml>\n<card title=\"%s%s\">\n<p>\n",htmlspecialchars($this->title, ENT_COMPAT | ENT_HTML401, 'UTF-8', false),htmlspecialchars($titlePageStr, ENT_COMPAT | ENT_HTML401, 'UTF-8', false)); |
|
26 | + printf("<wml>\n<card title=\"%s%s\">\n<p>\n", htmlspecialchars($this->title, ENT_COMPAT | ENT_HTML401, 'UTF-8', false), htmlspecialchars($titlePageStr, ENT_COMPAT | ENT_HTML401, 'UTF-8', false)); |
|
27 | 27 | } |
28 | 28 | |
29 | 29 | /** |
@@ -31,8 +31,8 @@ discard block |
||
31 | 31 | */ |
32 | 32 | function printTitle() |
33 | 33 | { |
34 | - if($this->totalPage > $this->mobilePage) $titlePageStr = sprintf("(%d/%d)",$this->mobilePage, $this->totalPage); |
|
35 | - printf('<%s%s><br/>%s', htmlspecialchars($this->title, ENT_COMPAT | ENT_HTML401, 'UTF-8', false),htmlspecialchars($titlePageStr, ENT_COMPAT | ENT_HTML401, 'UTF-8', false),"\n"); |
|
34 | + if ($this->totalPage > $this->mobilePage) $titlePageStr = sprintf("(%d/%d)", $this->mobilePage, $this->totalPage); |
|
35 | + printf('<%s%s><br/>%s', htmlspecialchars($this->title, ENT_COMPAT | ENT_HTML401, 'UTF-8', false), htmlspecialchars($titlePageStr, ENT_COMPAT | ENT_HTML401, 'UTF-8', false), "\n"); |
|
36 | 36 | } |
37 | 37 | |
38 | 38 | /** |
@@ -41,18 +41,18 @@ discard block |
||
41 | 41 | */ |
42 | 42 | function printContent() |
43 | 43 | { |
44 | - if($this->hasChilds()) |
|
44 | + if ($this->hasChilds()) |
|
45 | 45 | { |
46 | - foreach($this->getChilds() as $key => $val) |
|
46 | + foreach ($this->getChilds() as $key => $val) |
|
47 | 47 | { |
48 | - if(!$val['link']) continue; |
|
48 | + if (!$val['link']) continue; |
|
49 | 49 | printf('<do type="%s" label="%s"><go href="%s" /></do>%s', $this->getNo(), htmlspecialchars($val['text'], ENT_COMPAT | ENT_HTML401, 'UTF-8', false), $val['href'], "\n"); |
50 | - if($val['extra']) printf("%s\n",$val['extra']); |
|
50 | + if ($val['extra']) printf("%s\n", $val['extra']); |
|
51 | 51 | } |
52 | 52 | } |
53 | 53 | else |
54 | 54 | { |
55 | - printf('%s<br/>%s', str_replace("<br>","<br/>",$this->getContent()),"\n"); |
|
55 | + printf('%s<br/>%s', str_replace("<br>", "<br/>", $this->getContent()), "\n"); |
|
56 | 56 | } |
57 | 57 | print('<br/>'); |
58 | 58 | } |
@@ -62,43 +62,43 @@ discard block |
||
62 | 62 | */ |
63 | 63 | function printBtn() |
64 | 64 | { |
65 | - if($this->nextUrl) |
|
65 | + if ($this->nextUrl) |
|
66 | 66 | { |
67 | 67 | $url = $this->nextUrl; |
68 | 68 | printf('<do type="vnd.next" label="%s"><go href="%s"/></do>%s', $url->text, $url->url, "\n"); |
69 | 69 | } |
70 | - if($this->prevUrl) |
|
70 | + if ($this->prevUrl) |
|
71 | 71 | { |
72 | 72 | $url = $this->prevUrl; |
73 | 73 | printf('<do type="vnd.prev" label="%s"><go href="%s"/></do>%s', $url->text, $url->url, "\n"); |
74 | 74 | } |
75 | 75 | // Others are not applicable in charge of the button output (array passed) type?? |
76 | - if($this->etcBtn) |
|
76 | + if ($this->etcBtn) |
|
77 | 77 | { |
78 | - if(is_array($this->etcBtn)) |
|
78 | + if (is_array($this->etcBtn)) |
|
79 | 79 | { |
80 | - foreach($this->etcBtn as $key=>$val) |
|
80 | + foreach ($this->etcBtn as $key=>$val) |
|
81 | 81 | { |
82 | 82 | printf('<do type="vnd.btn%s" label="%s"><go href="%s"/></do>%s', $key, $val['text'], $val['url'], "\n"); |
83 | 83 | } |
84 | 84 | } |
85 | 85 | } |
86 | 86 | // Select Language |
87 | - if(!parent::isLangChange()) |
|
87 | + if (!parent::isLangChange()) |
|
88 | 88 | { |
89 | - $url = getUrl('','lcm','1','sel_lang',Context::getLangType(),'return_uri',Context::get('current_url')); |
|
90 | - printf('<do type="vnd.lang" label="%s"><go href="%s"/></do>%s', 'Language : '.Context::getLang('select_lang'), $url, "\n"); |
|
89 | + $url = getUrl('', 'lcm', '1', 'sel_lang', Context::getLangType(), 'return_uri', Context::get('current_url')); |
|
90 | + printf('<do type="vnd.lang" label="%s"><go href="%s"/></do>%s', 'Language : ' . Context::getLang('select_lang'), $url, "\n"); |
|
91 | 91 | } |
92 | 92 | else |
93 | 93 | { |
94 | 94 | printf('<do type="vnd.lang" label="%s"><go href="%s"/></do>%s', Context::getLang('lang_return'), Context::get('return_uri'), "\n"); |
95 | 95 | } |
96 | - if($this->homeUrl) |
|
96 | + if ($this->homeUrl) |
|
97 | 97 | { |
98 | 98 | $url = $this->homeUrl; |
99 | 99 | printf('<do type="access" label="%s"><go href="%s"/></do>%s', $url->text, $url->url, "\n"); |
100 | 100 | } |
101 | - if($this->upperUrl) |
|
101 | + if ($this->upperUrl) |
|
102 | 102 | { |
103 | 103 | $url = $this->upperUrl; |
104 | 104 | printf('<do type="vnd.up" label="%s"><go href="%s"/></do>%s', $url->text, $url->url, "\n"); |
@@ -112,9 +112,9 @@ discard block |
||
112 | 112 | // And returns a list of serial numbers in |
113 | 113 | function getNo() |
114 | 114 | { |
115 | - if(Context::get('mobile_skt')==1) |
|
115 | + if (Context::get('mobile_skt') == 1) |
|
116 | 116 | { |
117 | - return "vnd.skmn".parent::getNo(); |
|
117 | + return "vnd.skmn" . parent::getNo(); |
|
118 | 118 | } |
119 | 119 | else |
120 | 120 | { |
@@ -20,7 +20,9 @@ discard block |
||
20 | 20 | { |
21 | 21 | header("Content-Type: text/vnd.wap.wml"); |
22 | 22 | header("charset: ".$this->charset); |
23 | - if($this->totalPage > $this->mobilePage) $titlePageStr = sprintf("(%d/%d)",$this->mobilePage, $this->totalPage); |
|
23 | + if($this->totalPage > $this->mobilePage) { |
|
24 | + $titlePageStr = sprintf("(%d/%d)",$this->mobilePage, $this->totalPage); |
|
25 | + } |
|
24 | 26 | print("<?xml version=\"1.0\" encoding=\"".$this->charset."\"?><!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\" \"http://www.wapforum.org/DTD/wml_1.1.xml\">\n"); |
25 | 27 | // Card Title |
26 | 28 | printf("<wml>\n<card title=\"%s%s\">\n<p>\n",htmlspecialchars($this->title, ENT_COMPAT | ENT_HTML401, 'UTF-8', false),htmlspecialchars($titlePageStr, ENT_COMPAT | ENT_HTML401, 'UTF-8', false)); |
@@ -31,7 +33,9 @@ discard block |
||
31 | 33 | */ |
32 | 34 | function printTitle() |
33 | 35 | { |
34 | - if($this->totalPage > $this->mobilePage) $titlePageStr = sprintf("(%d/%d)",$this->mobilePage, $this->totalPage); |
|
36 | + if($this->totalPage > $this->mobilePage) { |
|
37 | + $titlePageStr = sprintf("(%d/%d)",$this->mobilePage, $this->totalPage); |
|
38 | + } |
|
35 | 39 | printf('<%s%s><br/>%s', htmlspecialchars($this->title, ENT_COMPAT | ENT_HTML401, 'UTF-8', false),htmlspecialchars($titlePageStr, ENT_COMPAT | ENT_HTML401, 'UTF-8', false),"\n"); |
36 | 40 | } |
37 | 41 | |
@@ -45,12 +49,15 @@ discard block |
||
45 | 49 | { |
46 | 50 | foreach($this->getChilds() as $key => $val) |
47 | 51 | { |
48 | - if(!$val['link']) continue; |
|
52 | + if(!$val['link']) { |
|
53 | + continue; |
|
54 | + } |
|
49 | 55 | printf('<do type="%s" label="%s"><go href="%s" /></do>%s', $this->getNo(), htmlspecialchars($val['text'], ENT_COMPAT | ENT_HTML401, 'UTF-8', false), $val['href'], "\n"); |
50 | - if($val['extra']) printf("%s\n",$val['extra']); |
|
56 | + if($val['extra']) { |
|
57 | + printf("%s\n",$val['extra']); |
|
58 | + } |
|
51 | 59 | } |
52 | - } |
|
53 | - else |
|
60 | + } else |
|
54 | 61 | { |
55 | 62 | printf('%s<br/>%s', str_replace("<br>","<br/>",$this->getContent()),"\n"); |
56 | 63 | } |
@@ -88,8 +95,7 @@ discard block |
||
88 | 95 | { |
89 | 96 | $url = getUrl('','lcm','1','sel_lang',Context::getLangType(),'return_uri',Context::get('current_url')); |
90 | 97 | printf('<do type="vnd.lang" label="%s"><go href="%s"/></do>%s', 'Language : '.Context::getLang('select_lang'), $url, "\n"); |
91 | - } |
|
92 | - else |
|
98 | + } else |
|
93 | 99 | { |
94 | 100 | printf('<do type="vnd.lang" label="%s"><go href="%s"/></do>%s', Context::getLang('lang_return'), Context::get('return_uri'), "\n"); |
95 | 101 | } |
@@ -115,8 +121,7 @@ discard block |
||
115 | 121 | if(Context::get('mobile_skt')==1) |
116 | 122 | { |
117 | 123 | return "vnd.skmn".parent::getNo(); |
118 | - } |
|
119 | - else |
|
124 | + } else |
|
120 | 125 | { |
121 | 126 | return parent::getNo(); |
122 | 127 | } |
@@ -1,7 +1,7 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | /* Copyright (C) NAVER <http://www.navercorp.com> */ |
3 | 3 | |
4 | -if(!defined('__XE__')) |
|
4 | +if (!defined('__XE__')) |
|
5 | 5 | exit(); |
6 | 6 | |
7 | 7 | /** |
@@ -19,24 +19,24 @@ discard block |
||
19 | 19 | * Condition |
20 | 20 | * */ |
21 | 21 | // Ignore admin page |
22 | -if(Context::get('module') == 'admin') |
|
22 | +if (Context::get('module') == 'admin') |
|
23 | 23 | { |
24 | 24 | return; |
25 | 25 | } |
26 | 26 | // Manage when to call it |
27 | -if($called_position != 'before_module_proc' && $called_position != 'after_module_proc') |
|
27 | +if ($called_position != 'before_module_proc' && $called_position != 'after_module_proc') |
|
28 | 28 | { |
29 | 29 | return; |
30 | 30 | } |
31 | 31 | // Ignore if not mobile browser |
32 | 32 | require_once(_XE_PATH_ . 'addons/mobile/classes/mobile.class.php'); |
33 | -if(!mobileXE::getBrowserType()) |
|
33 | +if (!mobileXE::getBrowserType()) |
|
34 | 34 | { |
35 | 35 | return; |
36 | 36 | } |
37 | 37 | // Generate mobile instance |
38 | 38 | $oMobile = &mobileXE::getInstance(); |
39 | -if(!$oMobile) |
|
39 | +if (!$oMobile) |
|
40 | 40 | { |
41 | 41 | return; |
42 | 42 | } |
@@ -48,15 +48,15 @@ discard block |
||
48 | 48 | $oMobile->setModuleInstance($this); |
49 | 49 | |
50 | 50 | // Extract content and display/exit if navigate mode is or if WAP class exists |
51 | -if($called_position == 'before_module_proc') |
|
51 | +if ($called_position == 'before_module_proc') |
|
52 | 52 | { |
53 | - if($oMobile->isLangChange()) |
|
53 | + if ($oMobile->isLangChange()) |
|
54 | 54 | { |
55 | 55 | $oMobile->setLangType(); |
56 | 56 | $oMobile->displayLangSelect(); |
57 | 57 | } |
58 | 58 | // On navigation mode, display navigation content |
59 | - if($oMobile->isNavigationMode()) |
|
59 | + if ($oMobile->isNavigationMode()) |
|
60 | 60 | { |
61 | 61 | $oMobile->displayNavigationContent(); |
62 | 62 | } |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | } |
68 | 68 | // If neither navigation mode nor WAP class is, display the module's result |
69 | 69 | } |
70 | -else if($called_position == 'after_module_proc') |
|
70 | +else if ($called_position == 'after_module_proc') |
|
71 | 71 | { |
72 | 72 | // Display |
73 | 73 | $oMobile->displayContent(); |
@@ -1,8 +1,9 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | /* Copyright (C) NAVER <http://www.navercorp.com> */ |
3 | 3 | |
4 | -if(!defined('__XE__')) |
|
4 | +if(!defined('__XE__')) { |
|
5 | 5 | exit(); |
6 | +} |
|
6 | 7 | |
7 | 8 | /** |
8 | 9 | * @file mobile.addon.php |
@@ -66,8 +67,7 @@ discard block |
||
66 | 67 | $oMobile->displayModuleContent(); |
67 | 68 | } |
68 | 69 | // If neither navigation mode nor WAP class is, display the module's result |
69 | -} |
|
70 | -else if($called_position == 'after_module_proc') |
|
70 | +} else if($called_position == 'after_module_proc') |
|
71 | 71 | { |
72 | 72 | // Display |
73 | 73 | $oMobile->displayContent(); |
@@ -1,12 +1,12 @@ |
||
1 | 1 | <?php |
2 | 2 | /* Copyright (C) NAVER <http://www.navercorp.com> */ |
3 | 3 | |
4 | -if(!defined('__XE__')) |
|
4 | +if (!defined('__XE__')) |
|
5 | 5 | { |
6 | 6 | exit(); |
7 | 7 | } |
8 | 8 | |
9 | -if($called_position == 'after_module_proc' && Context::getResponseMethod() == 'HTML') |
|
9 | +if ($called_position == 'after_module_proc' && Context::getResponseMethod() == 'HTML') |
|
10 | 10 | { |
11 | 11 | Context::loadFile('./addons/oembed/jquery.oembed.css'); |
12 | 12 | Context::loadFile(array('./addons/oembed/jquery.oembed.js', 'body', '', null), true); |