diff --git a/addons/adminlogging/adminlogging.addon.php b/addons/adminlogging/adminlogging.addon.php
index a3eb4981a..f0c6f5cc7 100644
--- a/addons/adminlogging/adminlogging.addon.php
+++ b/addons/adminlogging/adminlogging.addon.php
@@ -5,13 +5,15 @@ if(!defined('__XE__')) exit();
* @file adminlogging.addon.php
* @author NHN (developers@xpressengine.com)
* @brief Automatic link add-on
- **/
+ */
$logged_info = Context::get('logged_info');
$act = Context::get('act');
$kind = strpos(strtolower($act),'admin')!==false?'admin':'';
-if($called_position == 'before_module_proc' && $kind == 'admin' && $logged_info->is_admin == 'Y') {
+if($called_position == 'before_module_proc' && $kind == 'admin' && $logged_info->is_admin == 'Y')
+{
$oAdminloggingController = &getController('adminlogging');
$oAdminloggingController->insertLog($this->module, $this->act);
}
-?>
+/* End of file adminlogging.php */
+/* Location: ./addons/adminlogging */
diff --git a/addons/autolink/autolink.addon.php b/addons/autolink/autolink.addon.php
index b5910a76a..ee8e16eec 100644
--- a/addons/autolink/autolink.addon.php
+++ b/addons/autolink/autolink.addon.php
@@ -5,8 +5,10 @@ if(!defined('__XE__')) exit();
* @file autolink.addon.php
* @author NHN (developers@xpressengine.com)
* @brief Automatic link add-on
- **/
-if($called_position == 'after_module_proc' && Context::getResponseMethod()!="XMLRPC") {
+ */
+if($called_position == 'after_module_proc' && Context::getResponseMethod()!="XMLRPC")
+{
Context::loadFile(array('./addons/autolink/autolink.js', 'body', '', null), true);
}
-?>
+/* End of file autolink.addon.php */
+/* Location: .//addons/autolink/autolink.addon.php */
diff --git a/addons/blogapi/blogapi.addon.php b/addons/blogapi/blogapi.addon.php
index 9a9cee575..56555b6e1 100644
--- a/addons/blogapi/blogapi.addon.php
+++ b/addons/blogapi/blogapi.addon.php
@@ -435,4 +435,5 @@ RSDContent;
break;
}
}
-?>
+/* End of file blogapi.addon.php */
+/* Location: ./addons/blogapi/blogapi.addon.php */
diff --git a/addons/blogapi/blogapi.func.php b/addons/blogapi/blogapi.func.php
index 2d289bf40..e85d8120e 100644
--- a/addons/blogapi/blogapi.func.php
+++ b/addons/blogapi/blogapi.func.php
@@ -1,66 +1,79 @@
\n\n\nfaultCode\n%d\n\n\nfaultString\n%s\n\n\n\n",
- $error,
- htmlspecialchars($message)
- );
- }
- // Display results
- function getXmlRpcResponse($params) {
- $buff = ''."\n";
- $buff .= _getEncodedVal($params);
- $buff .= "\n\n";
+/**
+ * @file ./addons/blogapi/blogapi.func.php
+ * @author NHN (developers@xpressengine.com)
+ * @brief Function collections for the implementation of blogapi
+ **/
- return $buff;
- }
- // Encoding
- function _getEncodedVal($val, $is_sub_set = false) {
- if(is_int($val)) $buff = sprintf("%d", $val);
- elseif(is_string($val)&&preg_match('/^([0-9]+)T([0-9\:]+)$/', $val)) $buff = sprintf("%s\n", $val);
- elseif(is_double($val)) $buff = sprintf("%f", $val);
- elseif(is_bool($val)) $buff = sprintf("%d", $val?1:0);
- elseif(is_object($val)) {
- $values = get_object_vars($val);
- $val_count = count($values);
- $buff = "";
- foreach($values as $k => $v) {
- $buff .= sprintf("\n%s\n%s\n", htmlspecialchars($k), _getEncodedVal($v, true));
- }
- $buff .= "\n";
- } elseif(is_array($val)) {
- $val_count = count($val);
- $buff = "\n";
- for($i=0;$i<$val_count;$i++) {
- $buff .= _getEncodedVal($val[$i], true);
- }
- $buff .= "\n";
- } else {
- $buff = sprintf("%s\n", $val);
- }
- if(!$is_sub_set) return sprintf("\n%s", $buff);
- return $buff;
- }
- // Display the result
- function printContent($content) {
- header("Content-Type: text/xml; charset=UTF-8");
- header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
- header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
- header("Cache-Control: no-store, no-cache, must-revalidate");
- header("Cache-Control: post-check=0, pre-check=0", false);
- header("Pragma: no-cache");
- print $content;
- Context::close();
- exit();
- }
-?>
+// Error messages
+function getXmlRpcFailure($error, $message)
+{
+ return
+ sprintf(
+ "\n\n\nfaultCode\n%d\n\n\nfaultString\n%s\n\n\n\n",
+ $error,
+ htmlspecialchars($message)
+ );
+}
+
+// Display results
+function getXmlRpcResponse($params)
+{
+ $buff = ''."\n";
+ $buff .= _getEncodedVal($params);
+ $buff .= "\n\n";
+
+ return $buff;
+}
+
+// Encoding
+function _getEncodedVal($val, $is_sub_set = false)
+{
+ if(is_int($val)) $buff = sprintf("%d", $val);
+ elseif(is_string($val)&&preg_match('/^([0-9]+)T([0-9\:]+)$/', $val)) $buff = sprintf("%s\n", $val);
+ elseif(is_double($val)) $buff = sprintf("%f", $val);
+ elseif(is_bool($val)) $buff = sprintf("%d", $val?1:0);
+ elseif(is_object($val))
+ {
+ $values = get_object_vars($val);
+ $val_count = count($values);
+ $buff = "";
+ foreach($values as $k => $v) {
+ $buff .= sprintf("\n%s\n%s\n", htmlspecialchars($k), _getEncodedVal($v, true));
+ }
+ $buff .= "\n";
+ }
+ elseif(is_array($val))
+ {
+ $val_count = count($val);
+ $buff = "\n";
+ for($i=0;$i<$val_count;$i++) {
+ $buff .= _getEncodedVal($val[$i], true);
+ }
+ $buff .= "\n";
+ }
+ else
+ {
+ $buff = sprintf("%s\n", $val);
+ }
+ if(!$is_sub_set) return sprintf("\n%s", $buff);
+ return $buff;
+}
+
+// Display the result
+function printContent($content)
+{
+ header("Content-Type: text/xml; charset=UTF-8");
+ header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
+ header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
+ header("Cache-Control: no-store, no-cache, must-revalidate");
+ header("Cache-Control: post-check=0, pre-check=0", false);
+ header("Pragma: no-cache");
+ print $content;
+ Context::close();
+ exit();
+}
+/* End of file blogapi.func.php */
+/* Location: ./addons/blogapi/blogapi.func.php */
diff --git a/addons/captcha/captcha.addon.php b/addons/captcha/captcha.addon.php
index a58c21055..384987a73 100644
--- a/addons/captcha/captcha.addon.php
+++ b/addons/captcha/captcha.addon.php
@@ -1,347 +1,353 @@
addon_info = $addon_info;
+ }
- function setInfo(&$addon_info)
+ function before_module_proc()
+ {
+ if($this->addon_info->act_type == 'everytime' && $_SESSION['captcha_authed'])
{
- $this->addon_info = $addon_info;
+ unset($_SESSION['captcha_authed']);
}
+ }
- function before_module_proc()
+ function before_module_init(&$ModuleHandler)
+ {
+ $logged_info = Context::get('logged_info');
+ if($logged_info->is_admin == 'Y' || $logged_info->is_site_admin) return false;
+ if($this->addon_info->target != 'all' && Context::get('is_logged')) return false;
+ if($_SESSION['XE_VALIDATOR_ERROR'] == -1) $_SESSION['captcha_authed'] = false;
+ if($_SESSION['captcha_authed']) return false;
+
+ $type = Context::get('captchaType');
+
+ $target_acts = array('procBoardInsertDocument','procBoardInsertComment','procIssuetrackerInsertIssue','procIssuetrackerInsertHistory','procTextyleInsertComment');
+ if($this->addon_info->apply_find_account=='apply') $target_acts[] = 'procMemberFindAccount';
+ if($this->addon_info->apply_resend_auth_mail=='apply') $target_acts[] = 'procMemberResendAuthMail';
+ if($this->addon_info->apply_signup=='apply') $target_acts[] = 'procMemberInsert';
+
+ if(Context::getRequestMethod()!='XMLRPC' && Context::getRequestMethod()!=='JSON')
{
- if($this->addon_info->act_type == 'everytime' && $_SESSION['captcha_authed']) {
- unset($_SESSION['captcha_authed']);
- }
- }
-
- function before_module_init(&$ModuleHandler)
- {
- $logged_info = Context::get('logged_info');
- if($logged_info->is_admin == 'Y' || $logged_info->is_site_admin) return false;
- if($this->addon_info->target != 'all' && Context::get('is_logged')) return false;
- if($_SESSION['XE_VALIDATOR_ERROR'] == -1) $_SESSION['captcha_authed'] = false;
- if($_SESSION['captcha_authed']) return false;
-
- $type = Context::get('captchaType');
-
- $target_acts = array('procBoardInsertDocument','procBoardInsertComment','procIssuetrackerInsertIssue','procIssuetrackerInsertHistory','procTextyleInsertComment');
- if($this->addon_info->apply_find_account=='apply') $target_acts[] = 'procMemberFindAccount';
- if($this->addon_info->apply_resend_auth_mail=='apply') $target_acts[] = 'procMemberResendAuthMail';
- if($this->addon_info->apply_signup=='apply') $target_acts[] = 'procMemberInsert';
-
- if(Context::getRequestMethod()!='XMLRPC' && Context::getRequestMethod()!=='JSON')
+ if($type == 'inline')
{
- if($type == 'inline') {
- if(!$this->compareCaptcha())
- {
- Context::loadLang('./addons/captcha/lang');
- $_SESSION['XE_VALIDATOR_ERROR'] = -1;
- $_SESSION['XE_VALIDATOR_MESSAGE'] = Context::getLang('captcha_denied');;
- $_SESSION['XE_VALIDATOR_MESSAGE_TYPE'] = 'error';
- $_SESSION['XE_VALIDATOR_RETURN_URL'] = Context::get('error_return_url');
- $ModuleHandler->_setInputValueToSession();
- }
- } else {
- Context::addHtmlHeader('');
- Context::loadFile(array('./addons/captcha/captcha.min.js', 'body', '', null), true);
+ if(!$this->compareCaptcha())
+ {
+ Context::loadLang('./addons/captcha/lang');
+ $_SESSION['XE_VALIDATOR_ERROR'] = -1;
+ $_SESSION['XE_VALIDATOR_MESSAGE'] = Context::getLang('captcha_denied');;
+ $_SESSION['XE_VALIDATOR_MESSAGE_TYPE'] = 'error';
+ $_SESSION['XE_VALIDATOR_RETURN_URL'] = Context::get('error_return_url');
+ $ModuleHandler->_setInputValueToSession();
}
}
+ else
+ {
+ Context::addHtmlHeader('');
+ Context::loadFile(array('./addons/captcha/captcha.min.js', 'body', '', null), true);
+ }
+ }
- // compare session when calling actions such as writing a post or a comment on the board/issue tracker module
- if(!$_SESSION['captcha_authed'] && in_array(Context::get('act'), $target_acts)) {
- Context::loadLang('./addons/captcha/lang');
- $ModuleHandler->error = "captcha_denied";
+ // compare session when calling actions such as writing a post or a comment on the board/issue tracker module
+ if(!$_SESSION['captcha_authed'] && in_array(Context::get('act'), $target_acts))
+ {
+ Context::loadLang('./addons/captcha/lang');
+ $ModuleHandler->error = "captcha_denied";
+ }
+
+ return true;
+ }
+
+ function createKeyword()
+ {
+ $type = Context::get('captchaType');
+ if ($type == 'inline' && $_SESSION['captcha_keyword']) return;
+
+ $arr = range('A','Y');
+ shuffle($arr);
+ $arr = array_slice($arr,0,6);
+ $_SESSION['captcha_keyword'] = join('', $arr);
+ }
+
+ function before_module_init_setCaptchaSession()
+ {
+ if($_SESSION['captcha_authed']) return false;
+ // Load language files
+
+ Context::loadLang(_XE_PATH_.'addons/captcha/lang');
+ // Generate keywords
+
+ $this->createKeyword();
+
+ $target = Context::getLang('target_captcha');
+ header("Content-Type: text/xml; charset=UTF-8");
+ header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
+ header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
+ header("Cache-Control: no-store, no-cache, must-revalidate");
+ header("Cache-Control: post-check=0, pre-check=0", false);
+ header("Pragma: no-cache");
+ printf("\r\n 0\r\n success\r\n \r\n \r\n \r\n \r\n \r\n "
+ ,Context::getLang('about_captcha')
+ ,Context::getLang('captcha_reload')
+ ,Context::getLang('captcha_play')
+ ,Context::getLang('cmd_input')
+ ,Context::getLang('cmd_cancel')
+ );
+ Context::close();
+ exit();
+ }
+
+ function before_module_init_captchaImage()
+ {
+ if($_SESSION['captcha_authed']) return false;
+ if(Context::get('renew')) $this->createKeyword();
+
+ $keyword = $_SESSION['captcha_keyword'];
+ $im = $this->createCaptchaImage($keyword);
+
+ header("Cache-Control: ");
+ header("Pragma: ");
+ header("Content-Type: image/png");
+
+ imagepng($im);
+ imagedestroy($im);
+
+ Context::close();
+ exit();
+ }
+
+ function createCaptchaImage($string)
+ {
+ $arr = array();
+ for($i=0,$c=strlen($string);$i<$c;$i++) $arr[] = $string{$i};
+ // Font site
+
+ $w = 18;
+ $h = 25;
+ // Character length
+
+ $c = count($arr);
+ // Character image
+
+ $im = array();
+ // Create an image by total size
+
+ $im[] = imagecreate(($w+2)*count($arr), $h);
+
+ $deg = range(-30,30);
+ shuffle($deg);
+ // Create an image for each letter
+
+ foreach($arr as $i => $str)
+ {
+ $im[$i+1] = @imagecreate($w, $h);
+ $background_color = imagecolorallocate($im[$i+1], 255, 255, 255);
+ $text_color = imagecolorallocate($im[$i+1], 0, 0, 0);
+ // Control font size
+
+ $ran = range(1,20);
+ shuffle($ran);
+
+ if(function_exists('imagerotate'))
+ {
+ imagestring($im[$i+1], (array_pop($ran)%3)+3, 2, (array_pop($ran)%8), $str, $text_color);
+ $im[$i+1] = imagerotate($im[$i+1], array_pop($deg), 0);
+
+ $background_color = imagecolorallocate($im[$i+1], 255, 255, 255);
+ imagecolortransparent($im[$i+1], $background_color);
+ }
+ else
+ {
+ imagestring($im[$i+1], (array_pop($ran)%3)+3, 2, (array_pop($ran)%4), $str, $text_color);
+ }
+ }
+
+ // Combine images of each character
+
+ for($i=1;$icreateCaptchaAudio($keyword);
+
+ header('Content-type: audio/mpeg');
+ header("Content-Disposition: attachment; filename=\"captcha_audio.mp3\"");
+ header('Cache-Control: no-store, no-cache, must-revalidate');
+ header('Expires: Sun, 1 Jan 2000 12:00:00 GMT');
+ header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . 'GMT');
+ header('Content-Length: ' . strlen($data));
+
+ echo $data;
+ Context::close();
+ exit();
+ }
+
+ function createCaptchaAudio($string)
+ {
+ $data = '';
+ $_audio = './addons/captcha/audio/F_%s.mp3';
+ for($i=0,$c=strlen($string);$i<$c;$i++)
+ {
+ $_data = FileHandler::readFile(sprintf($_audio, $string{$i}));
+
+ $start = rand(5, 68); // Random start in 4-byte header and 64 byte data
+ $datalen = strlen($_data) - $start - 256; // Last unchanged 256 bytes
+
+ for($j=$start;$j<$datalen;$j+=64)
+ {
+ $ch = ord($_data{$j});
+ if($ch<9 || $ch>119) continue;
+ $_data{$j} = chr($ch+rand(-8,8));
}
+ $data .= $_data;
+ }
+
+ return $data;
+ }
+
+ function compareCaptcha()
+ {
+ if($_SESSION['captcha_authed']) return true;
+
+ if(strtoupper($_SESSION['captcha_keyword']) == strtoupper(Context::get('secret_text')))
+ {
+ $_SESSION['captcha_authed'] = true;
return true;
}
- function createKeyword()
+ unset($_SESSION['captcha_authed']);
+
+ return false;
+ }
+
+ function before_module_init_captchaCompare()
+ {
+ if(!$this->compareCaptcha())
{
- $type = Context::get('captchaType');
- if ($type == 'inline' && $_SESSION['captcha_keyword']) return;
-
- $arr = range('A','Y');
- shuffle($arr);
- $arr = array_slice($arr,0,6);
- $_SESSION['captcha_keyword'] = join('', $arr);
- }
-
- function before_module_init_setCaptchaSession()
- {
- if($_SESSION['captcha_authed']) return false;
- // Load language files
-
- Context::loadLang(_XE_PATH_.'addons/captcha/lang');
- // Generate keywords
-
- $this->createKeyword();
-
- $target = Context::getLang('target_captcha');
- header("Content-Type: text/xml; charset=UTF-8");
- header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
- header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
- header("Cache-Control: no-store, no-cache, must-revalidate");
- header("Cache-Control: post-check=0, pre-check=0", false);
- header("Pragma: no-cache");
- printf("\r\n 0\r\n success\r\n \r\n \r\n \r\n \r\n \r\n "
- ,Context::getLang('about_captcha')
- ,Context::getLang('captcha_reload')
- ,Context::getLang('captcha_play')
- ,Context::getLang('cmd_input')
- ,Context::getLang('cmd_cancel')
- );
- Context::close();
- exit();
- }
-
- function before_module_init_captchaImage()
- {
- if($_SESSION['captcha_authed']) return false;
- if(Context::get('renew')) $this->createKeyword();
-
- $keyword = $_SESSION['captcha_keyword'];
- $im = $this->createCaptchaImage($keyword);
-
- header("Cache-Control: ");
- header("Pragma: ");
- header("Content-Type: image/png");
-
- imagepng($im);
- imagedestroy($im);
-
- Context::close();
- exit();
- }
-
- function createCaptchaImage($string)
- {
- $arr = array();
- for($i=0,$c=strlen($string);$i<$c;$i++) $arr[] = $string{$i};
- // Font site
-
- $w = 18;
- $h = 25;
- // Character length
-
- $c = count($arr);
- // Character image
-
- $im = array();
- // Create an image by total size
-
- $im[] = imagecreate(($w+2)*count($arr), $h);
-
- $deg = range(-30,30);
- shuffle($deg);
- // Create an image for each letter
-
- foreach($arr as $i => $str)
- {
- $im[$i+1] = @imagecreate($w, $h);
- $background_color = imagecolorallocate($im[$i+1], 255, 255, 255);
- $text_color = imagecolorallocate($im[$i+1], 0, 0, 0);
- // Control font size
-
- $ran = range(1,20);
- shuffle($ran);
-
- if(function_exists('imagerotate'))
- {
- imagestring($im[$i+1], (array_pop($ran)%3)+3, 2, (array_pop($ran)%8), $str, $text_color);
- $im[$i+1] = imagerotate($im[$i+1], array_pop($deg), 0);
-
- $background_color = imagecolorallocate($im[$i+1], 255, 255, 255);
- imagecolortransparent($im[$i+1], $background_color);
- }
- else
- {
- imagestring($im[$i+1], (array_pop($ran)%3)+3, 2, (array_pop($ran)%4), $str, $text_color);
- }
- }
-
- // Combine images of each character
-
- for($i=1;$icreateCaptchaAudio($keyword);
-
- header('Content-type: audio/mpeg');
- header("Content-Disposition: attachment; filename=\"captcha_audio.mp3\"");
- header('Cache-Control: no-store, no-cache, must-revalidate');
- header('Expires: Sun, 1 Jan 2000 12:00:00 GMT');
- header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . 'GMT');
- header('Content-Length: ' . strlen($data));
-
- echo $data;
- Context::close();
- exit();
- }
-
- function createCaptchaAudio($string)
- {
- $data = '';
- $_audio = './addons/captcha/audio/F_%s.mp3';
- for($i=0,$c=strlen($string);$i<$c;$i++)
- {
- $_data = FileHandler::readFile(sprintf($_audio, $string{$i}));
-
- $start = rand(5, 68); // Random start in 4-byte header and 64 byte data
- $datalen = strlen($_data) - $start - 256; // Last unchanged 256 bytes
-
- for($j=$start;$j<$datalen;$j+=64)
- {
- $ch = ord($_data{$j});
- if($ch<9 || $ch>119) continue;
- $_data{$j} = chr($ch+rand(-8,8));
- }
-
- $data .= $_data;
- }
-
- return $data;
- }
-
- function compareCaptcha()
- {
- if($_SESSION['captcha_authed']) return true;
-
- if(strtoupper($_SESSION['captcha_keyword']) == strtoupper(Context::get('secret_text'))) {
- $_SESSION['captcha_authed'] = true;
- return true;
- }
-
- unset($_SESSION['captcha_authed']);
-
return false;
}
- function before_module_init_captchaCompare()
- {
- if(!$this->compareCaptcha())
- {
- return false;
- }
+ header("Content-Type: text/xml; charset=UTF-8");
+ header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
+ header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
+ header("Cache-Control: no-store, no-cache, must-revalidate");
+ header("Cache-Control: post-check=0, pre-check=0", false);
+ header("Pragma: no-cache");
+ print("\r\n0\r\nsuccess\r\n");
- header("Content-Type: text/xml; charset=UTF-8");
- header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
- header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
- header("Cache-Control: no-store, no-cache, must-revalidate");
- header("Cache-Control: post-check=0, pre-check=0", false);
- header("Pragma: no-cache");
- print("\r\n0\r\nsuccess\r\n");
+ Context::close();
+ exit();
+ }
- Context::close();
- exit();
- }
+ function inlineDisplay()
+ {
+ unset($_SESSION['captcha_authed']);
+ $this->createKeyword();
- function inlineDisplay()
- {
- unset($_SESSION['captcha_authed']);
- $this->createKeyword();
+ $swfURL = getUrl().'addons/captcha/swf/play.swf';
+ Context::unloadFile('./addons/captcha/captcha.min.js');
+ Context::loadFile(array('./addons/captcha/inline_captcha.js','body'));
- $swfURL = getUrl().'addons/captcha/swf/play.swf';
- Context::unloadFile('./addons/captcha/captcha.min.js');
- Context::loadFile(array('./addons/captcha/inline_captcha.js','body'));
+ global $lang;
- global $lang;
-
- $tags=<<
EOD;
- $tags = sprintf($tags, getUrl('captcha_action','captchaImage', 'rand', mt_rand(10000, 99999))
- , $swfURL
- , $swfURL
- , $lang->reload
- , $lang->play);
- return $tags;
- }
+ $tags = sprintf($tags, getUrl('captcha_action','captchaImage', 'rand', mt_rand(10000, 99999))
+ , $swfURL
+ , $swfURL
+ , $lang->reload
+ , $lang->play);
+ return $tags;
}
-
- $GLOBALS['__AddonCaptcha__'] = new AddonCaptcha;
- $GLOBALS['__AddonCaptcha__']->setInfo($addon_info);
- Context::set('oCaptcha', &$GLOBALS['__AddonCaptcha__']);
}
- $oAddonCaptcha = &$GLOBALS['__AddonCaptcha__'];
+ $GLOBALS['__AddonCaptcha__'] = new AddonCaptcha;
+ $GLOBALS['__AddonCaptcha__']->setInfo($addon_info);
+ Context::set('oCaptcha', $GLOBALS['__AddonCaptcha__']);
+}
- if(method_exists($oAddonCaptcha, $called_position))
+$oAddonCaptcha = &$GLOBALS['__AddonCaptcha__'];
+
+if(method_exists($oAddonCaptcha, $called_position))
+{
+ if(!call_user_func_array(array(&$oAddonCaptcha, $called_position), array(&$this)))
{
- if(!call_user_func_array(array(&$oAddonCaptcha, $called_position), array(&$this)))
- {
- return false;
- }
+ return false;
}
+}
- $addon_act = Context::get('captcha_action');
- if($addon_act && method_exists($oAddonCaptcha, $called_position.'_'.$addon_act))
+$addon_act = Context::get('captcha_action');
+if($addon_act && method_exists($oAddonCaptcha, $called_position.'_'.$addon_act))
+{
+ if(!call_user_func_array(array(&$oAddonCaptcha, $called_position.'_'.$addon_act), array(&$this)))
{
- if(!call_user_func_array(array(&$oAddonCaptcha, $called_position.'_'.$addon_act), array(&$this)))
- {
- return false;
- }
+ return false;
}
-
-?>
+}
+/* End of file captcha.addon.php */
+/* Location: ./addons/captcha/captcha.addon.php */
diff --git a/addons/counter/counter.addon.php b/addons/counter/counter.addon.php
index 3d6c8115e..b61c4bbf4 100644
--- a/addons/counter/counter.addon.php
+++ b/addons/counter/counter.addon.php
@@ -5,10 +5,12 @@ if(!defined('__XE__')) exit();
* @file counter.addon.php
* @author NHN (developers@xpressengine.com)
* @brief Counter add-on
- **/
+ */
// Execute if called_position is before_display_content
-if(Context::isInstalled() && $called_position == 'before_module_init' && Context::get('module')!='admin' && Context::getResponseMethod() == 'HTML') {
+if(Context::isInstalled() && $called_position == 'before_module_init' && Context::get('module')!='admin' && Context::getResponseMethod() == 'HTML')
+{
$oCounterController = &getController('counter');
$oCounterController->counterExecute();
}
-?>
+/* End of file counter.addon.php */
+/* Location: ./addons/counter/counter.addon.php */
diff --git a/addons/member_communication/member_communication.addon.php b/addons/member_communication/member_communication.addon.php
index 89ed0fc6d..ca49fcc17 100644
--- a/addons/member_communication/member_communication.addon.php
+++ b/addons/member_communication/member_communication.addon.php
@@ -9,7 +9,7 @@ if(!defined('__XE__')) exit();
* - Pop-up the message if new message comes in
* - When calling MemberModel::getMemberMenu, feature to send a message is added
* - When caliing MemberModel::getMemberMenu, feature to add a friend is added
- **/
+ */
// Stop if non-logged-in user is
$logged_info = Context::get('logged_info');
if(!$logged_info) return;
@@ -17,7 +17,8 @@ if(!$logged_info) return;
/**
* Message/Friend munus are added on the pop-up window and member profile. Check if a new message is received
**/
-if($called_position == 'before_module_init' && $this->module != 'member') {
+if($called_position == 'before_module_init' && $this->module != 'member')
+{
// Load a language file from the communication module
Context::loadLang('./modules/communication/lang');
// Add menus on the member login information
@@ -28,7 +29,8 @@ if($called_position == 'before_module_init' && $this->module != 'member') {
$flag_path = './files/member_extra_info/new_message_flags/'.getNumberingPath($logged_info->member_srl);
$flag_file = $flag_path.$logged_info->member_srl;
- if(file_exists($flag_file)) {
+ if(file_exists($flag_file))
+ {
$new_message_count = trim(FileHandler::readFile($flag_file));
FileHandler::removeFile($flag_file);
Context::loadLang('./addons/member_communication/lang');
@@ -40,20 +42,25 @@ if($called_position == 'before_module_init' && $this->module != 'member') {
Context::addHtmlFooter($script);
}
-} elseif($called_position == 'before_module_proc' && $this->act == 'getMemberMenu') {
+}
+elseif($called_position == 'before_module_proc' && $this->act == 'getMemberMenu')
+{
$oMemberController = &getController('member');
$member_srl = Context::get('target_srl');
$mid = Context::get('cur_mid');
// Creates communication model object
$oCommunicationModel = &getModel('communication');
// Add a feature to display own message box.
- if($logged_info->member_srl == $member_srl) {
+ if($logged_info->member_srl == $member_srl)
+ {
// Add your own viewing Note Template
$oMemberController->addMemberPopupMenu(getUrl('','mid',$mid,'act','dispCommunicationMessages'), 'cmd_view_message_box', '', 'self');
// Display a list of friends
$oMemberController->addMemberPopupMenu(getUrl('','mid',$mid,'act','dispCommunicationFriend'), 'cmd_view_friend', '', 'self');
- // If not, Add menus to send message and to add friends
- } else {
+ // If not, Add menus to send message and to add friends
+ }
+ else
+ {
// Get member information
$oMemberModel = &getModel('member');
$target_member_info = $oMemberModel->getMemberInfoByMemberSrl($member_srl);
@@ -68,4 +75,5 @@ if($called_position == 'before_module_init' && $this->module != 'member') {
$oMemberController->addMemberPopupMenu(getUrl('','module','communication','act','dispCommunicationAddFriend','target_srl',$member_srl), 'cmd_add_friend', '', 'popup');
}
}
-?>
+/* End of file member_communication.addon.php */
+/* Location: ./addons/member_communication/member_communication.addon.php */
diff --git a/addons/member_extra_info/member_extra_info.addon.php b/addons/member_extra_info/member_extra_info.addon.php
index 925675453..86138a487 100644
--- a/addons/member_extra_info/member_extra_info.addon.php
+++ b/addons/member_extra_info/member_extra_info.addon.php
@@ -8,11 +8,11 @@ if(!defined('__XE__')) exit();
*
* Find member_srl in the part with ....
* Check if ther is image name and image mark. Then change it.
- **/
+ */
/**
* Just before displaying, change image name/ image mark
- **/
+ */
if($called_position != "before_display_content" || Context::get('act')=='dispPageAdminContentModify') return;
// Include a file having functions to replace member image name/mark
require_once('./addons/member_extra_info/member_extra_info.lib.php');
@@ -20,4 +20,6 @@ require_once('./addons/member_extra_info/member_extra_info.lib.php');
$temp_output = preg_replace_callback('!<(div|span|a)([^\>]*)member_([0-9]+)([^\>]*)>(.*?)\<\/(div|span|a)\>!is', 'memberTransImageName', $output);
if($temp_output) $output = $temp_output;
unset($temp_output);
-?>
+
+/* End of file member_extra_info.addon.php */
+/* Location: ./addons/member_extra_info/member_extra_info.addon.php */
diff --git a/addons/member_extra_info/member_extra_info.lib.php b/addons/member_extra_info/member_extra_info.lib.php
index d2019a717..429ec8243 100644
--- a/addons/member_extra_info/member_extra_info.lib.php
+++ b/addons/member_extra_info/member_extra_info.lib.php
@@ -1,49 +1,54 @@
cached) {
- $GLOBALS['_transImageNameList'][$member_srl]->cached = true;
- $image_name_file = sprintf('files/member_extra_info/image_name/%s%d.gif', getNumberingPath($member_srl), $member_srl);
- $image_mark_file = sprintf('files/member_extra_info/image_mark/%s%d.gif', getNumberingPath($member_srl), $member_srl);
- if(file_exists($image_name_file)) $GLOBALS['_transImageNameList'][$member_srl]->image_name_file = $image_name_file;
- else $image_name_file = '';
- if(file_exists($image_mark_file)) $GLOBALS['_transImageNameList'][$member_srl]->image_mark_file = $image_mark_file;
- else $image_mark_file = '';
+ // If pre-defined data in the global variablesm return it
+ if(!$GLOBALS['_transImageNameList'][$member_srl]->cached)
+ {
+ $GLOBALS['_transImageNameList'][$member_srl]->cached = true;
+ $image_name_file = sprintf('files/member_extra_info/image_name/%s%d.gif', getNumberingPath($member_srl), $member_srl);
+ $image_mark_file = sprintf('files/member_extra_info/image_mark/%s%d.gif', getNumberingPath($member_srl), $member_srl);
+ if(file_exists($image_name_file)) $GLOBALS['_transImageNameList'][$member_srl]->image_name_file = $image_name_file;
+ else $image_name_file = '';
+ if(file_exists($image_mark_file)) $GLOBALS['_transImageNameList'][$member_srl]->image_mark_file = $image_mark_file;
+ else $image_mark_file = '';
- $site_module_info = Context::get('site_module_info');
- $group_image = $oMemberModel->getGroupImageMark($member_srl,$site_module_info->site_srl);
- $GLOBALS['_transImageNameList'][$member_srl]->group_image = $group_image;
- } else {
- $group_image = $GLOBALS['_transImageNameList'][$member_srl]->group_image;
- $image_name_file = $GLOBALS['_transImageNameList'][$member_srl]->image_name_file;
- $image_mark_file = $GLOBALS['_transImageNameList'][$member_srl]->image_mark_file;
- }
- // If image name and mark doesn't exist, set the original information
- if(!$image_name_file && !$image_mark_file && !$group_image) return $matches[0];
+ $site_module_info = Context::get('site_module_info');
+ $group_image = $oMemberModel->getGroupImageMark($member_srl,$site_module_info->site_srl);
+ $GLOBALS['_transImageNameList'][$member_srl]->group_image = $group_image;
+ }
+ else
+ {
+ $group_image = $GLOBALS['_transImageNameList'][$member_srl]->group_image;
+ $image_name_file = $GLOBALS['_transImageNameList'][$member_srl]->image_name_file;
+ $image_mark_file = $GLOBALS['_transImageNameList'][$member_srl]->image_mark_file;
+ }
+ // If image name and mark doesn't exist, set the original information
+ if(!$image_name_file && !$image_mark_file && !$group_image) return $matches[0];
- // check member_config
-
- $config = $oMemberModel->getMemberConfig();
+ // check member_config
- if($config->image_name == 'Y' && $image_name_file) $nick_name = sprintf('
', Context::getRequestUri(),$image_name_file, strip_tags($nick_name), strip_tags($nick_name));
- if($config->image_mark == 'Y' && $image_mark_file) $nick_name = sprintf('
%s', Context::getRequestUri(),$image_mark_file, strip_tags($nick_name), strip_tags($nick_name), $nick_name);
+ $config = $oMemberModel->getMemberConfig();
- if($group_image) $nick_name = sprintf('
%s', $group_image->src, $group_image->title, $group_image->description, $nick_name);
+ if($config->image_name == 'Y' && $image_name_file) $nick_name = sprintf('
', Context::getRequestUri(),$image_name_file, strip_tags($nick_name), strip_tags($nick_name));
+ if($config->image_mark == 'Y' && $image_mark_file) $nick_name = sprintf('
%s', Context::getRequestUri(),$image_mark_file, strip_tags($nick_name), strip_tags($nick_name), $nick_name);
+
+ if($group_image) $nick_name = sprintf('
%s', $group_image->src, $group_image->title, $group_image->description, $nick_name);
- $orig_text = preg_replace('/'.preg_quote($matches[5],'/').'<\/'.$matches[6].'>$/', '', $matches[0]);
- return $orig_text.$nick_name.''.$matches[6].'>';
- }
-?>
+ $orig_text = preg_replace('/'.preg_quote($matches[5],'/').'<\/'.$matches[6].'>$/', '', $matches[0]);
+ return $orig_text.$nick_name.''.$matches[6].'>';
+}
+/* End of file member_extra_info.lib.php */
+/* Location: ./addons/member_extra_info/member_extra_info.lib.php */
diff --git a/addons/mobile/classes/hdml.class.php b/addons/mobile/classes/hdml.class.php
index fbad40d06..a51eb79bc 100644
--- a/addons/mobile/classes/hdml.class.php
+++ b/addons/mobile/classes/hdml.class.php
@@ -1,103 +1,124 @@
charset);
- header("Cache-Control: no-store, no-cache, must-revalidate");
- header("Cache-Control: post-check=0, pre-check=0", false);
- header("Pragma: no-cache");
+ /**
+ * @brief hdml header output
+ **/
+ function printHeader()
+ {
+ header("Content-Type:text/x-hdml; charset=".$this->charset);
+ header("Cache-Control: no-store, no-cache, must-revalidate");
+ header("Cache-Control: post-check=0, pre-check=0", false);
+ header("Pragma: no-cache");
- print '';
- print "\n";
- print $this->hasChilds()?'':'';
- print "\n";
+ print '';
+ print "\n";
+ print $this->hasChilds()?'':'';
+ print "\n";
- if($this->upperUrl) {
- $url = $this->upperUrl;
- printf('%s', $url->url, $url->text, "\n");
- }
- }
+ if($this->upperUrl)
+ {
+ $url = $this->upperUrl;
+ printf('%s', $url->url, $url->text, "\n");
+ }
+ }
- /**
- * @brief Output title
- **/
- function printTitle() {
- if($this->totalPage > $this->mobilePage) $titlePageStr = sprintf("(%d/%d)",$this->mobilePage, $this->totalPage);
- printf('<%s%s>%s', $this->title,$titlePageStr,"\n");
- }
+ /**
+ * @brief Output title
+ **/
+ function printTitle()
+ {
+ if($this->totalPage > $this->mobilePage) $titlePageStr = sprintf("(%d/%d)",$this->mobilePage, $this->totalPage);
+ printf('<%s%s>%s', $this->title,$titlePageStr,"\n");
+ }
- /**
- * @brief Output information
- * hasChilds() if there is a list of content types, otherwise output
- **/
- function printContent() {
- if($this->hasChilds()) {
- foreach($this->getChilds() as $key => $val) {
- if(!$val['link']) continue;
- printf('%s%s',Context::getLang('cmd_select'), $val['href'], $val['text'], "\n");
- }
- } else {
- printf('%s
%s', $this->getContent(),"\n");
- }
- }
+ /**
+ * @brief Output information
+ * hasChilds() if there is a list of content types, otherwise output
+ **/
+ function printContent()
+ {
+ if($this->hasChilds())
+ {
+ foreach($this->getChilds() as $key => $val)
+ {
+ if(!$val['link']) continue;
+ printf('%s%s',Context::getLang('cmd_select'), $val['href'], $val['text'], "\n");
+ }
+ }
+ else
+ {
+ printf('%s
%s', $this->getContent(),"\n");
+ }
+ }
- /**
- * @brief Button to output
- **/
- function printBtn() {
- // Menu Types
- if($this->hasChilds()) {
- if($this->nextUrl) {
- $url = $this->nextUrl;
- printf('%s%s', $url->text, $url->url, $url->text, "\n");
- }
- if($this->prevUrl) {
- $url = $this->prevUrl;
- printf('%s%s', $url->text, $url->url, $url->text, "\n");
- }
- if($this->homeUrl) {
- $url = $this->homeUrl;
- printf('%s%s', $url->text, $url->url, $url->text, "\n");
- }
- // Content Types
- } else {
- if($this->nextUrl) {
- $url = $this->nextUrl;
- printf('%s', $url->text, $url->url, $url->text);
- }
- if($this->prevUrl) {
- $url = $this->prevUrl;
- printf('%s', $url->text, $url->url, $url->text);
- }
- if($this->homeUrl) {
- $url = $this->homeUrl;
- printf('%s', $url->text, $url->url, $url->text);
- }
- }
- }
+ /**
+ * @brief Button to output
+ **/
+ function printBtn()
+ {
+ // Menu Types
+ if($this->hasChilds())
+ {
+ if($this->nextUrl)
+ {
+ $url = $this->nextUrl;
+ printf('%s%s', $url->text, $url->url, $url->text, "\n");
+ }
+ if($this->prevUrl)
+ {
+ $url = $this->prevUrl;
+ printf('%s%s', $url->text, $url->url, $url->text, "\n");
+ }
+ if($this->homeUrl)
+ {
+ $url = $this->homeUrl;
+ printf('%s%s', $url->text, $url->url, $url->text, "\n");
+ }
+ // Content Types
+ }
+ else
+ {
+ if($this->nextUrl)
+ {
+ $url = $this->nextUrl;
+ printf('%s', $url->text, $url->url, $url->text);
+ }
+ if($this->prevUrl)
+ {
+ $url = $this->prevUrl;
+ printf('%s', $url->text, $url->url, $url->text);
+ }
+ if($this->homeUrl)
+ {
+ $url = $this->homeUrl;
+ printf('%s', $url->text, $url->url, $url->text);
+ }
+ }
+ }
- /**
- * @brief Footer information output
- **/
- function printFooter() {
- print $this->hasChilds()?'':'';
- print "\n";
- print("");
- }
+ /**
+ * @brief Footer information output
+ **/
+ function printFooter()
+ {
+ print $this->hasChilds()?'':'';
+ print "\n";
+ print("");
+ }
+}
- }
-?>
+/* End of file hdml.class.php */
+/* Location: ./addons/mobile/classes/hdml.class.php */
diff --git a/addons/mobile/classes/mhtml.class.php b/addons/mobile/classes/mhtml.class.php
index a03ffb20b..8a1074f58 100644
--- a/addons/mobile/classes/mhtml.class.php
+++ b/addons/mobile/classes/mhtml.class.php
@@ -1,80 +1,98 @@
\n");
+ if($this->totalPage > $this->mobilePage) $titlePageStr = sprintf("(%d/%d)",$this->mobilePage, $this->totalPage);
+ printf("%s%s\n", htmlspecialchars($this->title),htmlspecialchars($titlePageStr));
+ }
+ // Output title
+ function printTitle()
+ {
+ if($this->totalPage > $this->mobilePage) $titlePageStr = sprintf("(%d/%d)",$this->mobilePage, $this->totalPage);
+ printf('<%s%s>
%s', htmlspecialchars($this->title),htmlspecialchars($titlePageStr),"\n");
+ }
- /**
- * @brief hdml header output
- **/
- function printHeader() {
- print("\n");
- if($this->totalPage > $this->mobilePage) $titlePageStr = sprintf("(%d/%d)",$this->mobilePage, $this->totalPage);
- printf("%s%s\n", htmlspecialchars($this->title),htmlspecialchars($titlePageStr));
- }
- // Output title
- function printTitle() {
- if($this->totalPage > $this->mobilePage) $titlePageStr = sprintf("(%d/%d)",$this->mobilePage, $this->totalPage);
- printf('<%s%s>
%s', htmlspecialchars($this->title),htmlspecialchars($titlePageStr),"\n");
- }
+ /**
+ * @brief Output information
+ * hasChilds() if there is a list of content types, otherwise output
+ **/
+ function printContent()
+ {
+ if($this->hasChilds())
+ {
+ foreach($this->getChilds() as $key => $val)
+ {
+ if(!$val['link']) continue;
+ printf('%s
%s', $val['href'], $this->getNo(), $val['text'], "\n");
+ if($val['extra']) printf("
%s\n",str_replace('
','
',$val['extra']));
+ }
+ }
+ else
+ {
+ print(str_replace('
','
',$this->getContent())."\n");
+ }
+ print "
";
+ }
- /**
- * @brief Output information
- * hasChilds() if there is a list of content types, otherwise output
- **/
- function printContent() {
- if($this->hasChilds()) {
- foreach($this->getChilds() as $key => $val) {
- if(!$val['link']) continue;
- printf('%s
%s', $val['href'], $this->getNo(), $val['text'], "\n");
- if($val['extra']) printf("
%s\n",str_replace('
','
',$val['extra']));
- }
- } else {
- print(str_replace('
','
',$this->getContent())."\n");
- }
- print "
";
- }
-
- /**
- * @brief Button to output
- **/
- function printBtn() {
- if($this->nextUrl) {
- $url = $this->nextUrl;
- printf('%s
%s', $url->url, $url->text, "\n");
- }
- if($this->prevUrl) {
- $url = $this->prevUrl;
- printf('%s
%s', $url->url, $url->text, "\n");
- }
- // Select Language
- if(!parent::isLangChange()){
- $url = getUrl('','lcm','1','sel_lang',Context::getLangType(),'return_uri',Context::get('current_url'));
- printf('%s
%s', $url, 'Language : '.Context::getLang('select_lang'), "\n");
- }
- else {
- printf('%s
%s', Context::get('return_uri'), Context::getLang('lang_return'), "\n");
- }
- if($this->upperUrl) {
- $url = $this->upperUrl;
- printf('%s', $url->url, $url->text, "\n");
- }
- if($this->homeUrl) {
- $url = $this->homeUrl;
- printf('%s
%s', $url->text, $url->url, $url->text, "\n");
- }
- }
- // Footer information output
- function printFooter() {
- print("\n");
- }
- }
-?>
+ /**
+ * @brief Button to output
+ **/
+ function printBtn()
+ {
+ if($this->nextUrl)
+ {
+ $url = $this->nextUrl;
+ printf('%s
%s', $url->url, $url->text, "\n");
+ }
+ if($this->prevUrl)
+ {
+ $url = $this->prevUrl;
+ printf('%s
%s', $url->url, $url->text, "\n");
+ }
+ // Select Language
+ if(!parent::isLangChange())
+ {
+ $url = getUrl('','lcm','1','sel_lang',Context::getLangType(),'return_uri',Context::get('current_url'));
+ printf('%s
%s', $url, 'Language : '.Context::getLang('select_lang'), "\n");
+ }
+ else
+ {
+ printf('%s
%s', Context::get('return_uri'), Context::getLang('lang_return'), "\n");
+ }
+ if($this->upperUrl)
+ {
+ $url = $this->upperUrl;
+ printf('%s', $url->url, $url->text, "\n");
+ }
+ if($this->homeUrl)
+ {
+ $url = $this->homeUrl;
+ printf('%s
%s', $url->text, $url->url, $url->text, "\n");
+ }
+ }
+ // Footer information output
+ function printFooter()
+ {
+ print("