/** * get a module instance and execute an action * @return ModuleObject executed module instance **/ function procModule() { $oModuleModel =& getModel('module'); // If error occurred while preparation, return a message instance if ($this->error) { $type = Mobile::isFromMobilePhone() ? 'mobile' : 'view'; $oMessageObject =& ModuleHandler::getModuleInstance('message', $type); $oMessageObject->setError(-1); $oMessageObject->setMessage($this->error); $oMessageObject->dispMessage(); if ($this->httpStatusCode) { $oMessageObject->setHttpStatusCode($this->httpStatusCode); } return $oMessageObject; } // Get action information with conf/module.xml $xml_info = $oModuleModel->getModuleActionXml($this->module); // If not installed yet, modify act if ($this->module == "install") { if (!$this->act || !$xml_info->action->{$this->act}) { $this->act = $xml_info->default_index_act; } } // if act exists, find type of the action, if not use default index act if (!$this->act) { $this->act = $xml_info->default_index_act; } // still no act means error if (!$this->act) { $this->error = 'msg_module_is_not_exists'; $this->httpStatusCode = '404'; $type = Mobile::isFromMobilePhone() ? 'mobile' : 'view'; $oMessageObject =& ModuleHandler::getModuleInstance('message', $type); $oMessageObject->setError(-1); $oMessageObject->setMessage($this->error); $oMessageObject->dispMessage(); if ($this->httpStatusCode) { $oMessageObject->setHttpStatusCode($this->httpStatusCode); } return $oMessageObject; } // get type, kind $type = $xml_info->action->{$this->act}->type; $ruleset = $xml_info->action->{$this->act}->ruleset; $kind = strpos(strtolower($this->act), 'admin') !== false ? 'admin' : ''; if (!$kind && $this->module == 'admin') { $kind = 'admin'; } if ($this->module_info->use_mobile != "Y") { Mobile::setMobile(false); } // admin menu check if (Context::isInstalled()) { $oMenuAdminModel =& getAdminModel('menu'); $output = $oMenuAdminModel->getMenuByTitle('__XE_ADMIN__'); if (!$output->menu_srl) { $oAdminClass =& getClass('admin'); $oAdminClass->createXeAdminMenu(); } else { if (!is_readable($output->php_file)) { $oMenuAdminController =& getAdminController('menu'); $oMenuAdminController->makeXmlFile($output->menu_srl); } } } // Admin ip $logged_info = Context::get('logged_info'); if ($kind == 'admin' && $_SESSION['denied_admin'] == 'Y') { $this->error = "msg_not_permitted_act"; $oMessageObject =& ModuleHandler::getModuleInstance('message', $type); $oMessageObject->setError(-1); $oMessageObject->setMessage($this->error); $oMessageObject->dispMessage(); return $oMessageObject; } // if(type == view, and case for using mobilephone) if ($type == "view" && Mobile::isFromMobilePhone() && Context::isInstalled()) { $orig_type = "view"; $type = "mobile"; // create a module instance $oModule =& $this->getModuleInstance($this->module, $type, $kind); if (!is_object($oModule) || !method_exists($oModule, $this->act)) { $type = $orig_type; Mobile::setMobile(false); $oModule =& $this->getModuleInstance($this->module, $type, $kind); } } else { // create a module instance $oModule =& $this->getModuleInstance($this->module, $type, $kind); } if (!is_object($oModule)) { $type = Mobile::isFromMobilePhone() ? 'mobile' : 'view'; $oMessageObject =& ModuleHandler::getModuleInstance('message', $type); $oMessageObject->setError(-1); $oMessageObject->setMessage($this->error); $oMessageObject->dispMessage(); if ($this->httpStatusCode) { $oMessageObject->setHttpStatusCode($this->httpStatusCode); } return $oMessageObject; } // If there is no such action in the module object if (!isset($xml_info->action->{$this->act}) || !method_exists($oModule, $this->act)) { if (!Context::isInstalled()) { $this->error = 'msg_invalid_request'; $oMessageObject =& ModuleHandler::getModuleInstance('message', $type); $oMessageObject->setError(-1); $oMessageObject->setMessage($this->error); $oMessageObject->dispMessage(); if ($this->httpStatusCode) { $oMessageObject->setHttpStatusCode($this->httpStatusCode); } return $oMessageObject; } $forward = null; // 1. Look for the module with action name if (preg_match('/^([a-z]+)([A-Z])([a-z0-9\\_]+)(.*)$/', $this->act, $matches)) { $module = strtolower($matches[2] . $matches[3]); $xml_info = $oModuleModel->getModuleActionXml($module); if ($xml_info->action->{$this->act}) { $forward->module = $module; $forward->type = $xml_info->action->{$this->act}->type; $forward->ruleset = $xml_info->action->{$this->act}->ruleset; $forward->act = $this->act; } } if (!$forward) { $forward = $oModuleModel->getActionForward($this->act); } if ($forward->module && $forward->type && $forward->act && $forward->act == $this->act) { $kind = strpos(strtolower($forward->act), 'admin') !== false ? 'admin' : ''; $type = $forward->type; $ruleset = $forward->ruleset; $tpl_path = $oModule->getTemplatePath(); $orig_module = $oModule; if ($type == "view" && Mobile::isFromMobilePhone()) { $orig_type = "view"; $type = "mobile"; // create a module instance $oModule =& $this->getModuleInstance($forward->module, $type, $kind); if (!is_object($oModule) || !method_exists($oModule, $this->act)) { $type = $orig_type; Mobile::setMobile(false); $oModule =& $this->getModuleInstance($forward->module, $type, $kind); } } else { $oModule =& $this->getModuleInstance($forward->module, $type, $kind); } $xml_info = $oModuleModel->getModuleActionXml($forward->module); $oMemberModel =& getModel('member'); if ($this->module == "admin" && $type == "view") { if ($logged_info->is_admin == 'Y') { if ($this->act != 'dispLayoutAdminLayoutModify') { $oAdminView =& getAdminView('admin'); $oAdminView->makeGnbUrl($forward->module); $oModule->setLayoutPath("./modules/admin/tpl"); $oModule->setLayoutFile("layout.html"); } } else { $this->error = 'msg_is_not_administrator'; $oMessageObject =& ModuleHandler::getModuleInstance('message', $type); $oMessageObject->setError(-1); $oMessageObject->setMessage($this->error); $oMessageObject->dispMessage(); return $oMessageObject; } } if ($kind == 'admin') { $grant = $oModuleModel->getGrant($this->module_info, $logged_info); if (!$grant->is_admin && !$grant->manager) { $this->error = 'msg_is_not_manager'; $oMessageObject =& ModuleHandler::getModuleInstance('message', 'view'); $oMessageObject->setError(-1); $oMessageObject->setMessage($this->error); $oMessageObject->dispMessage(); return $oMessageObject; } } } else { if ($xml_info->default_index_act && method_exists($oModule, $xml_info->default_index_act)) { $this->act = $xml_info->default_index_act; } else { $this->error = 'msg_invalid_request'; $oModule->setError(-1); $oModule->setMessage($this->error); return $oModule; } } } // ruleset check... if (!empty($ruleset)) { $rulesetModule = $forward->module ? $forward->module : $this->module; $rulesetFile = $oModuleModel->getValidatorFilePath($rulesetModule, $ruleset, $this->mid); if (!empty($rulesetFile)) { if ($_SESSION['XE_VALIDATOR_ERROR_LANG']) { $errorLang = $_SESSION['XE_VALIDATOR_ERROR_LANG']; foreach ($errorLang as $key => $val) { Context::setLang($key, $val); } unset($_SESSION['XE_VALIDATOR_ERROR_LANG']); } $Validator = new Validator($rulesetFile); $result = $Validator->validate(); if (!$result) { $lastError = $Validator->getLastError(); $returnUrl = Context::get('error_return_url'); $errorMsg = $lastError['msg'] ? $lastError['msg'] : 'validation error'; //for xml response $oModule->setError(-1); $oModule->setMessage($errorMsg); //for html redirect $this->error = $errorMsg; $_SESSION['XE_VALIDATOR_ERROR'] = -1; $_SESSION['XE_VALIDATOR_MESSAGE'] = $this->error; $_SESSION['XE_VALIDATOR_MESSAGE_TYPE'] = 'error'; $_SESSION['XE_VALIDATOR_RETURN_URL'] = $returnUrl; $this->_setInputValueToSession(); return $oModule; } } } $oModule->setAct($this->act); $this->module_info->module_type = $type; $oModule->setModuleInfo($this->module_info, $xml_info); if ($type == "view" && $this->module_info->use_mobile == "Y" && Mobile::isMobileCheckByAgent()) { global $lang; $header = '<style type="text/css">div.xe_mobile{opacity:0.7;margin:1em 0;padding:.5em;background:#333;border:1px solid #666;border-left:0;border-right:0}p.xe_mobile{text-align:center;margin:1em 0}a.xe_mobile{color:#ff0;font-weight:bold;font-size:24px}@media only screen and (min-width:500px){a.xe_mobile{font-size:15px}}</style>'; $footer = '<div class="xe_mobile"><p class="xe_mobile"><a class="xe_mobile" href="' . getUrl('m', '1') . '">' . $lang->msg_pc_to_mobile . '</a></p></div>'; Context::addHtmlHeader($header); Context::addHtmlFooter($footer); } if ($type == "view" && $kind != 'admin') { $module_config = $oModuleModel->getModuleConfig('module'); if ($module_config->htmlFooter) { Context::addHtmlFooter($module_config->htmlFooter); } } // if failed message exists in session, set context $this->_setInputErrorToContext(); $procResult = $oModule->proc(); $methodList = array('XMLRPC' => 1, 'JSON' => 1); if (!$oModule->stop_proc && !isset($methodList[Context::getRequestMethod()])) { $error = $oModule->getError(); $message = $oModule->getMessage(); $messageType = $oModule->getMessageType(); $redirectUrl = $oModule->getRedirectUrl(); if (!$procResult) { $this->error = $message; if (!$redirectUrl && Context::get('error_return_url')) { $redirectUrl = Context::get('error_return_url'); } $this->_setInputValueToSession(); } else { if (count($_SESSION['INPUT_ERROR'])) { Context::set('INPUT_ERROR', $_SESSION['INPUT_ERROR']); $_SESSION['INPUT_ERROR'] = ''; } } $_SESSION['XE_VALIDATOR_ERROR'] = $error; if ($message != 'success') { $_SESSION['XE_VALIDATOR_MESSAGE'] = $message; } $_SESSION['XE_VALIDATOR_MESSAGE_TYPE'] = $messageType; if (Context::get('xeVirtualRequestMethod') != 'xml') { $_SESSION['XE_VALIDATOR_RETURN_URL'] = $redirectUrl; } } unset($logged_info); return $oModule; }
echo $__Context->oDocument->document_srl; ?> "><?php echo $__Context->lang->homepage; ?> </label> <input type="text" name="homepage" id="homepage_<?php echo $__Context->oDocument->document_srl; ?> " class="itx m_h" /> </span> <?php } ?> <?php if ($__Context->mi->cmt_wrt == 'editor' || Mobile::isMobileCheckByAgent()) { ?> <button type="submit" class="btn fr"><?php echo $__Context->lang->cmd_registration; ?> </button><?php } ?> <div class="opt_chk"> <?php if ($__Context->is_logged) { ?> <input type="checkbox" name="notify_message" value="Y" id="notify_message_<?php echo $__Context->oDocument->document_srl; ?> "<?php
jQuery(this).animate({right:301}, speed); jQuery('.<?php echo $__Context->skin_topdiv_class; ?> .map_list_wrap').animate({right:0}, speed); jQuery(this).html('»'); },function(){ jQuery(this).animate({right:0}, speed); jQuery('.<?php echo $__Context->skin_topdiv_class; ?> .map_list_wrap').animate({right:-302}, speed); jQuery(this).html('«'); }); <?php if (Mobile::isMobileCheckByAgent() || $__Context->m == 1) { ?> var fancybox_width = '100%'; var fancybox_height = '80%'; <?php } else { ?> var fancybox_width = '80%'; var fancybox_height = '80%'; <?php } ?> //VR 팬시박스 설정 jQuery('.<?php echo $__Context->skin_topdiv_class; ?>
if (!$__Context->enable_default_component) { ?> settings.enableToolbar = false; settings.ckeconfig.toolbarCanCollapse = false; <?php } ?> <?php if (!$__Context->enable_component) { ?> settings.loadXeComponent = false; <?php } ?> <?php if ($__Context->module_type === 'comment' || Mobile::isMobileCheckByAgent()) { ?> settings.ckeconfig.toolbarStartupExpanded = false; <?php } ?> <?php if (!$__Context->html_mode) { ?> settings.ckeconfig.removeButtons = 'Save,Preview,Print,Cut,Copy,Paste,Source'; <?php } ?> <?php if ($__Context->css_content) {
if (!defined("__XE__")) { exit; } $__tpl = TemplateHandler::getInstance(); echo $__tpl->compile('modules/board/skins/sketchbook5_youtube', '_header.html'); ?> <!--#Meta:modules/board/skins/sketchbook5_youtube/js/editor.js--><?php $__tmp = array('modules/board/skins/sketchbook5_youtube/js/editor.js', 'body', '', ''); Context::loadFile($__tmp); unset($__tmp); if (Mobile::isMobileCheckByAgent()) { $__tpl = TemplateHandler::getInstance(); echo $__tpl->compile('modules/board/skins/sketchbook5_youtube', '_write_form_mobile.html'); } if (!Mobile::isMobileCheckByAgent()) { ?> <form action="./" method="post" onsubmit="return procFilter(this, window.insert)" class="bd_wrt bd_wrt_main clear"><input type="hidden" name="error_return_url" value="<?php echo htmlspecialchars(getRequestUriByServerEnviroment(), ENT_COMPAT | ENT_HTML401, 'UTF-8', false); ?> " /><input type="hidden" name="act" value="<?php echo $__Context->act; ?> " /><input type="hidden" name="vid" value="<?php echo $__Context->vid; ?> " /> <input type="hidden" name="mid" value="<?php echo $__Context->mid; ?> " />
/** * get a module instance and execute an action * @return ModuleObject executed module instance * */ function procModule() { $oModuleModel = getModel('module'); $display_mode = Mobile::isFromMobilePhone() ? 'mobile' : 'view'; // If error occurred while preparation, return a message instance if ($this->error) { $this->_setInputErrorToContext(); $oMessageObject = ModuleHandler::getModuleInstance('message', $display_mode); $oMessageObject->setError(-1); $oMessageObject->setMessage($this->error); $oMessageObject->dispMessage(); if ($this->httpStatusCode) { $oMessageObject->setHttpStatusCode($this->httpStatusCode); } return $oMessageObject; } // Get action information with conf/module.xml $xml_info = $oModuleModel->getModuleActionXml($this->module); // If not installed yet, modify act if ($this->module == "install") { if (!$this->act || !$xml_info->action->{$this->act}) { $this->act = $xml_info->default_index_act; } } // if act exists, find type of the action, if not use default index act if (!$this->act) { $this->act = $xml_info->default_index_act; } // still no act means error if (!$this->act) { $this->error = 'msg_module_is_not_exists'; $this->httpStatusCode = '404'; $this->_setInputErrorToContext(); $oMessageObject = ModuleHandler::getModuleInstance('message', $display_mode); $oMessageObject->setError(-1); $oMessageObject->setMessage($this->error); $oMessageObject->dispMessage(); if ($this->httpStatusCode) { $oMessageObject->setHttpStatusCode($this->httpStatusCode); } return $oMessageObject; } // get type, kind $type = $xml_info->action->{$this->act}->type; $ruleset = $xml_info->action->{$this->act}->ruleset; $kind = stripos($this->act, 'admin') !== FALSE ? 'admin' : ''; if (!$kind && $this->module == 'admin') { $kind = 'admin'; } // check REQUEST_METHOD in controller if ($type == 'controller') { $allowedMethod = $xml_info->action->{$this->act}->method; if (!$allowedMethod) { $allowedMethodList[0] = 'POST'; } else { $allowedMethodList = explode('|', strtoupper($allowedMethod)); } if (!in_array(strtoupper($_SERVER['REQUEST_METHOD']), $allowedMethodList)) { $this->error = "msg_invalid_request"; $oMessageObject = ModuleHandler::getModuleInstance('message', $display_mode); $oMessageObject->setError(-1); $oMessageObject->setMessage($this->error); $oMessageObject->dispMessage(); return $oMessageObject; } } if ($this->module_info->use_mobile != "Y") { Mobile::setMobile(FALSE); } $logged_info = Context::get('logged_info'); // check CSRF for POST actions if (Context::getRequestMethod() === 'POST' && Context::isInstalled() && $this->act !== 'procFileUpload' && !checkCSRF()) { $this->error = 'msg_invalid_request'; $oMessageObject = ModuleHandler::getModuleInstance('message', $display_mode); $oMessageObject->setError(-1); $oMessageObject->setMessage($this->error); $oMessageObject->dispMessage(); return $oMessageObject; } // Admin ip if ($kind == 'admin' && $_SESSION['denied_admin'] == 'Y') { $this->_setInputErrorToContext(); $this->error = "msg_not_permitted_act"; $oMessageObject = ModuleHandler::getModuleInstance('message', $display_mode); $oMessageObject->setError(-1); $oMessageObject->setMessage($this->error); $oMessageObject->dispMessage(); return $oMessageObject; } // if(type == view, and case for using mobilephone) if ($type == "view" && Mobile::isFromMobilePhone() && Context::isInstalled()) { $orig_type = "view"; $type = "mobile"; // create a module instance $oModule = $this->getModuleInstance($this->module, $type, $kind); if (!is_object($oModule) || !method_exists($oModule, $this->act)) { $type = $orig_type; Mobile::setMobile(FALSE); $oModule = $this->getModuleInstance($this->module, $type, $kind); } } else { // create a module instance $oModule = $this->getModuleInstance($this->module, $type, $kind); } if (!is_object($oModule)) { $this->_setInputErrorToContext(); $oMessageObject = ModuleHandler::getModuleInstance('message', $display_mode); $oMessageObject->setError(-1); $oMessageObject->setMessage($this->error); $oMessageObject->dispMessage(); if ($this->httpStatusCode) { $oMessageObject->setHttpStatusCode($this->httpStatusCode); } return $oMessageObject; } // If there is no such action in the module object if (!isset($xml_info->action->{$this->act}) || !method_exists($oModule, $this->act)) { if (!Context::isInstalled()) { $this->_setInputErrorToContext(); $this->error = 'msg_invalid_request'; $oMessageObject = ModuleHandler::getModuleInstance('message', $display_mode); $oMessageObject->setError(-1); $oMessageObject->setMessage($this->error); $oMessageObject->dispMessage(); if ($this->httpStatusCode) { $oMessageObject->setHttpStatusCode($this->httpStatusCode); } return $oMessageObject; } $forward = NULL; // 1. Look for the module with action name if (preg_match('/^([a-z]+)([A-Z])([a-z0-9\\_]+)(.*)$/', $this->act, $matches)) { $module = strtolower($matches[2] . $matches[3]); $xml_info = $oModuleModel->getModuleActionXml($module); if ($xml_info->action->{$this->act} && (stripos($this->act, 'admin') !== FALSE || $xml_info->action->{$this->act}->standalone != 'false')) { $forward = new stdClass(); $forward->module = $module; $forward->type = $xml_info->action->{$this->act}->type; $forward->ruleset = $xml_info->action->{$this->act}->ruleset; $forward->act = $this->act; } else { $this->error = 'msg_invalid_request'; $oMessageObject = ModuleHandler::getModuleInstance('message', $display_mode); $oMessageObject->setError(-1); $oMessageObject->setMessage($this->error); $oMessageObject->dispMessage(); return $oMessageObject; } } if (!$forward) { $forward = $oModuleModel->getActionForward($this->act); } if ($forward->module && $forward->type && $forward->act && $forward->act == $this->act) { $kind = stripos($forward->act, 'admin') !== FALSE ? 'admin' : ''; $type = $forward->type; $ruleset = $forward->ruleset; $tpl_path = $oModule->getTemplatePath(); $orig_module = $oModule; $xml_info = $oModuleModel->getModuleActionXml($forward->module); // SECISSUE also check foward act method // check REQUEST_METHOD in controller if ($type == 'controller') { $allowedMethod = $xml_info->action->{$forward->act}->method; if (!$allowedMethod) { $allowedMethodList[0] = 'POST'; } else { $allowedMethodList = explode('|', strtoupper($allowedMethod)); } if (!in_array(strtoupper($_SERVER['REQUEST_METHOD']), $allowedMethodList)) { $this->error = "msg_invalid_request"; $oMessageObject = ModuleHandler::getModuleInstance('message', $display_mode); $oMessageObject->setError(-1); $oMessageObject->setMessage($this->error); $oMessageObject->dispMessage(); return $oMessageObject; } } if ($type == "view" && Mobile::isFromMobilePhone()) { $orig_type = "view"; $type = "mobile"; // create a module instance $oModule = $this->getModuleInstance($forward->module, $type, $kind); if (!is_object($oModule) || !method_exists($oModule, $this->act)) { $type = $orig_type; Mobile::setMobile(FALSE); $oModule = $this->getModuleInstance($forward->module, $type, $kind); } } else { $oModule = $this->getModuleInstance($forward->module, $type, $kind); } if (!is_object($oModule)) { $this->_setInputErrorToContext(); $oMessageObject = ModuleHandler::getModuleInstance('message', $display_mode); $oMessageObject->setError(-1); $oMessageObject->setMessage('msg_module_is_not_exists'); $oMessageObject->dispMessage(); if ($this->httpStatusCode) { $oMessageObject->setHttpStatusCode($this->httpStatusCode); } return $oMessageObject; } if ($this->module == "admin" && $type == "view") { if ($logged_info->is_admin == 'Y') { if ($this->act != 'dispLayoutAdminLayoutModify') { $oAdminView = getAdminView('admin'); $oAdminView->makeGnbUrl($forward->module); $oModule->setLayoutPath("./modules/admin/tpl"); $oModule->setLayoutFile("layout.html"); } } else { $this->_setInputErrorToContext(); $this->error = 'msg_is_not_administrator'; $oMessageObject = ModuleHandler::getModuleInstance('message', $display_mode); $oMessageObject->setError(-1); $oMessageObject->setMessage($this->error); $oMessageObject->dispMessage(); return $oMessageObject; } } if ($kind == 'admin') { $grant = $oModuleModel->getGrant($this->module_info, $logged_info); if (!$grant->manager) { $this->_setInputErrorToContext(); $this->error = 'msg_is_not_manager'; $oMessageObject = ModuleHandler::getModuleInstance('message', $display_mode); $oMessageObject->setError(-1); $oMessageObject->setMessage($this->error); $oMessageObject->dispMessage(); return $oMessageObject; } else { if (!$grant->is_admin && $this->module != $this->orig_module->module && $xml_info->permission->{$this->act} != 'manager') { $this->_setInputErrorToContext(); $this->error = 'msg_is_not_administrator'; $oMessageObject = ModuleHandler::getModuleInstance('message', $display_mode); $oMessageObject->setError(-1); $oMessageObject->setMessage($this->error); $oMessageObject->dispMessage(); return $oMessageObject; } } } } else { if ($xml_info->default_index_act && method_exists($oModule, $xml_info->default_index_act)) { $this->act = $xml_info->default_index_act; } else { $this->error = 'msg_invalid_request'; $oModule->setError(-1); $oModule->setMessage($this->error); return $oModule; } } } // ruleset check... if (!empty($ruleset)) { $rulesetModule = $forward->module ? $forward->module : $this->module; $rulesetFile = $oModuleModel->getValidatorFilePath($rulesetModule, $ruleset, $this->mid); if (!empty($rulesetFile)) { if ($_SESSION['XE_VALIDATOR_ERROR_LANG']) { $errorLang = $_SESSION['XE_VALIDATOR_ERROR_LANG']; foreach ($errorLang as $key => $val) { Context::setLang($key, $val); } unset($_SESSION['XE_VALIDATOR_ERROR_LANG']); } $Validator = new Validator($rulesetFile); $result = $Validator->validate(); if (!$result) { $lastError = $Validator->getLastError(); $returnUrl = Context::get('error_return_url'); $errorMsg = $lastError['msg'] ? $lastError['msg'] : 'validation error'; //for xml response $oModule->setError(-1); $oModule->setMessage($errorMsg); //for html redirect $this->error = $errorMsg; $_SESSION['XE_VALIDATOR_ERROR'] = -1; $_SESSION['XE_VALIDATOR_MESSAGE'] = $this->error; $_SESSION['XE_VALIDATOR_MESSAGE_TYPE'] = 'error'; $_SESSION['XE_VALIDATOR_RETURN_URL'] = $returnUrl; $_SESSION['XE_VALIDATOR_ID'] = Context::get('xe_validator_id'); $this->_setInputValueToSession(); return $oModule; } } } $oModule->setAct($this->act); $this->module_info->module_type = $type; $oModule->setModuleInfo($this->module_info, $xml_info); $skipAct = array('dispEditorConfigPreview' => 1, 'dispLayoutPreviewWithModule' => 1); $db_use_mobile = Mobile::isMobileEnabled(); if ($type == "view" && $this->module_info->use_mobile == "Y" && Mobile::isMobileCheckByAgent() && !isset($skipAct[Context::get('act')]) && $db_use_mobile === true) { global $lang; $header = '<style>div.xe_mobile{opacity:0.7;margin:1em 0;padding:.5em;background:#333;border:1px solid #666;border-left:0;border-right:0}p.xe_mobile{text-align:center;margin:1em 0}a.xe_mobile{color:#ff0;font-weight:bold;font-size:24px}@media only screen and (min-width:500px){a.xe_mobile{font-size:15px}}</style>'; $footer = '<div class="xe_mobile"><p class="xe_mobile"><a class="xe_mobile" href="' . getUrl('m', '1') . '">' . $lang->msg_pc_to_mobile . '</a></p></div>'; Context::addHtmlHeader($header); Context::addHtmlFooter($footer); } if ($type == "view" && $kind != 'admin') { $module_config = $oModuleModel->getModuleConfig('module'); if ($module_config->htmlFooter) { Context::addHtmlFooter($module_config->htmlFooter); } if ($module_config->siteTitle) { $siteTitle = Context::getBrowserTitle(); if (!$siteTitle) { Context::setBrowserTitle($module_config->siteTitle); } } } // if failed message exists in session, set context $this->_setInputErrorToContext(); $procResult = $oModule->proc(); $methodList = array('XMLRPC' => 1, 'JSON' => 1, 'JS_CALLBACK' => 1); if (!$oModule->stop_proc && !isset($methodList[Context::getRequestMethod()])) { $error = $oModule->getError(); $message = $oModule->getMessage(); $messageType = $oModule->getMessageType(); $redirectUrl = $oModule->getRedirectUrl(); if ($messageType == 'error') { debugPrint($message, 'ERROR'); } if (!$procResult) { $this->error = $message; if (!$redirectUrl && Context::get('error_return_url')) { $redirectUrl = Context::get('error_return_url'); } $this->_setInputValueToSession(); } else { } $_SESSION['XE_VALIDATOR_ERROR'] = $error; $_SESSION['XE_VALIDATOR_ID'] = Context::get('xe_validator_id'); if ($message != 'success') { $_SESSION['XE_VALIDATOR_MESSAGE'] = $message; } $_SESSION['XE_VALIDATOR_MESSAGE_TYPE'] = $messageType; if (Context::get('xeVirtualRequestMethod') != 'xml') { $_SESSION['XE_VALIDATOR_RETURN_URL'] = $redirectUrl; } } unset($logged_info); return $oModule; }
if ($__Context->mi->lst_viewer == 'Y') { ?> var lstViewer = 1; var viewerTx = '<?php echo $__Context->lang->with_viewer; ?> '; <?php } if ($__Context->mi->files_type) { ?> var bdFiles_type = 1; <?php } if ($__Context->mi->img_opt) { ?> var bdImg_opt = 1; <?php } if ($__Context->mi->img_link || !Mobile::isMobileCheckByAgent()) { ?> var bdImg_link = 0; <?php } if ($__Context->mi->rd_nav_side || $__Context->mi->default_style == 'blog' || $__Context->mi->default_style == 'viewer') { ?> var rd_nav_side = 0; <?php } ?> //]]></script>
<div class="fl"> <?php if (@in_array(home, $__Context->mi->btm_mn)) { ?> <a class="btn_img" href="<?php echo getUrl('', 'mid', $__Context->mid, 'page', $__Context->page, 'document_srl', '', 'listStyle', $__Context->listStyle); ?> "><i class="ico_16px list"></i> <?php echo $__Context->lang->cmd_list; ?> </a><?php } ?> <?php if ($__Context->mi->srch_btm != 'N' && !Mobile::isMobileCheckByAgent()) { ?> <form action="<?php echo getUrl(); ?> " method="get" onsubmit="return procFilter(this, search)" id="bd_srch_btm" <?php if ($__Context->mi->srch_btm == 2 || $__Context->search_keyword) { ?> class="on"<?php } ?> ><input type="hidden" name="act" value="<?php echo $__Context->act; ?> " /> <input type="hidden" name="vid" value="<?php
function proc($args) { $oDocumentModel =& getModel('document'); //��� ���� ���� $map_obj->module_srl = $args->module_srls; if ($args->list_count) { $map_obj->list_count = $args->list_count; } else { $map_obj->list_count = 20; } if ($args->page_count) { $map_obj->page_count = $args->page_count; } else { $map_obj->page_count = 10; } if ($args->order_target) { $map_obj->sort_index = $args->order_target; } else { $map_obj->sort_index = 'regdate'; } if ($args->order_type) { $map_obj->order_type = $args->order_type; } else { $map_obj->order_type = 'desc'; } if ($args->shuffle_type) { $map_obj->shuffle_type = $args->shuffle_type; } else { $map_obj->shuffle_type = 'N'; } if ($args->show_list) { $map_obj->show_list = $args->show_list; } else { $map_obj->show_list = 'Y'; } //���� ���۽� ó������ if (Context::get('xenara_ajax') == 'y') { if (Context::get('lat_south')) { $map_obj->min_map_latitude = Context::get('lat_south'); } if (Context::get('lat_north')) { $map_obj->max_map_latitude = Context::get('lat_north'); } if (Context::get('lng_west')) { $map_obj->min_map_longitude = Context::get('lng_west'); } if (Context::get('lng_east')) { $map_obj->max_map_longitude = Context::get('lng_east'); } } //��������Ʈ ���� �� ���� ���� $map_output = executeQueryArray('widgets.widget_maplist.getMapDocumentList', $map_obj); $map_list = $map_output->data; //������� �������� if ($map_obj->shuffle_type == 'Y') { shuffle($map_list); } //�����⺻ ���� ���� if ($args->map_width) { $map_obj->map_width = $args->map_width . 'px'; } else { $map_obj->map_width = '100%'; } if ($args->map_height) { $map_obj->map_height = $args->map_height; } else { $map_obj->map_height = '500'; } //����ġ ���� ������ ���� if ($args->current_type) { $map_obj->current_type = $args->current_type; } else { $map_obj->current_type = 'N'; } //������� ��� if (Mobile::isMobileCheckByAgent()) { if ($args->m_map_width) { $map_obj->map_width = $args->m_map_width; } else { $map_obj->map_width = '100%'; } if ($args->m_map_height) { $map_obj->map_height = $args->m_map_height; } else { $map_obj->map_height = '300'; } } //�������� ���� ���� if ($args->google_map_key) { $map_obj->google_map_key = $args->google_map_key; } if ($args->google_markercluster) { $map_obj->google_markercluster = $args->google_markercluster; } else { $map_obj->google_markercluster = 'Y'; } if ($args->map_zoom) { $map_obj->map_zoom = $args->map_zoom; } else { $map_obj->map_zoom = 13; } if ($args->map_lat_range) { $map_obj->map_lat_range = $args->map_lat_range; } else { $map_obj->map_lat_range = 1; } if ($args->map_lng_range) { $map_obj->map_lng_range = $args->map_lng_range; } else { $map_obj->map_lng_range = 1; } //�������� ���� ���� if ($args->daum_map_key) { $map_obj->daum_map_key = $args->daum_map_key; } if ($args->daum_map_zoom) { $map_obj->daum_map_zoom = $args->daum_map_zoom; } else { $map_obj->daum_map_zoom = 3; } //���� �����ڽ� ���� ���� if ($args->info_content_width) { $map_obj->info_content_width = $args->info_content_width; } else { $map_obj->info_content_width = 300; } if ($args->info_content_height) { $map_obj->info_content_height = $args->info_content_height; } else { $map_obj->info_content_height = ''; } if ($args->subject_cut_size) { $map_obj->subject_cut_size = $args->subject_cut_size; } if ($args->content_cut_size) { $map_obj->content_cut_size = $args->content_cut_size; } else { $map_obj->content_cut_size = 100; } if ($args->thumbnail_width) { $map_obj->thumbnail_width = $args->thumbnail_width; } else { $map_obj->thumbnail_width = 100; } if ($args->thumbnail_height) { $map_obj->thumbnail_height = $args->thumbnail_height; } else { $map_obj->thumbnail_height = 75; } if ($args->show_info_content_extarvars) { $map_obj->show_info_content_extarvars = $args->show_info_content_extarvars; } else { $map_obj->show_info_content_extarvars = 'Y'; } if ($args->info_content_extar_eids) { $map_obj->info_content_extar_eids = explode(',', $args->info_content_extar_eids); } else { $map_obj->info_content_extar_eids = ''; } //������� ��� if (Mobile::isMobileCheckByAgent()) { if ($args->m_info_content_width) { $map_obj->info_content_width = $args->m_info_content_width; } else { $map_obj->info_content_width = 220; } if ($args->m_info_content_height) { $map_obj->info_content_height = $args->m_info_content_height; } if ($args->m_subject_cut_size) { $map_obj->subject_cut_size = $args->m_subject_cut_size; } if ($args->m_content_cut_size) { $map_obj->content_cut_size = $args->m_content_cut_size; } else { $map_obj->content_cut_size = 100; } if ($args->m_thumbnail_width) { $map_obj->thumbnail_width = $args->m_thumbnail_width; } else { $map_obj->thumbnail_width = 80; } if ($args->m_thumbnail_height) { $map_obj->thumbnail_height = $args->m_thumbnail_height; } else { $map_obj->thumbnail_height = 50; } } //��Ÿ ���� if ($args->m_scroll_top) { $map_obj->m_scroll_top = $args->m_scroll_top; } else { $map_obj->m_scroll_top = 100; } //��Ų�� �������� $map_obj->skin = $args->skin; //���ø� ���� ���� Context::set('map_obj', $map_obj); Context::set('colorset', $args->colorset); Context::set('map_list', $map_list); //���ø� ��ü���� �� ��Ų���� ������ $oTemplate =& TemplateHandler::getInstance(); $tpl_path = sprintf('%sskins/%s', $this->widget_path, $args->skin); return $oTemplate->compile($tpl_path, "maplist"); }
/** * @brief triggered by epay.processReview(after) * @return payment review form */ function triggerReviewForm(&$in_args) { $oModuleModel = getModel('module'); // load module config $module_info = $oModuleModel->getModuleInfoByModuleSrl($in_args->module_srl); if (!$module_info->skin) { $module_info->skin = 'default'; } // load skin config $oModuleModel->syncSkinInfoToModuleInfo($module_info); Context::set('ncart_module_info', $module_info); // load cart info. $oNcartModel = getModel('ncart'); $cart_info = $oNcartModel->getCartInfo($in_args->cartnos, null, null, $in_args->delivfee_inadvance); Context::set('cart_info', $cart_info); // compile template file if (Mobile::isMobileCheckByAgent()) { $template_path = sprintf('%sm.skins/%s', $this->module_path, $module_info->mskin); } else { $template_path = sprintf('%sskins/%s', $this->module_path, $module_info->skin); } $oTemplate =& TemplateHandler::getInstance(); $in_args->review_form = $oTemplate->compile($template_path, 'reviewform.html'); }
<?php if (!defined("__ZBXE__")) { exit; } if ($called_position == 'after_module_proc' && Context::getResponseMethod() == "HTML" && !Mobile::isMobileCheckByAgent()) { Context::addCssFile('./addons/prettyphoto/css/prettyPhoto.css'); Context::addCssFile('./addons/prettyphoto/css/addon.css'); Context::addJsFile('./addons/prettyphoto/js/jquery.prettyPhoto.js', false, '', null, 'body'); Context::addJsFile('./addons/prettyphoto/js/addon.js', false, '', null, 'body'); Context::loadLang('./addons/prettyphoto/lang'); if (!$addon_info->slideshow) { $addon_info->slideshow = "5000"; } if (!$addon_info->auto_slide) { $addon_info->auto_slide = "false"; } if (!$addon_info->show_title) { $addon_info->show_title = "false"; } if (!$addon_info->opacity) { $addon_info->opacity = ".8"; } if (!$addon_info->theme) { $addon_info->theme = "pp_default"; } if (!$addon_info->noWidth) { $addon_info->noWidth = "100"; } if (!$addon_info->noHeight) { $addon_info->noHeight = "100";