/**
  * @brief Initialization
  */
 function init()
 {
     $module_srl = Context::get('module_srl');
     if (!$module_srl && $this->module_srl) {
         $module_srl = $this->module_srl;
         Context::set('module_srl', $module_srl);
     }
     $oModuleModel = getModel('module');
     if ($module_srl) {
         $module_info = $oModuleModel->getModuleInfoByModuleSrl($module_srl);
         if (!$module_info) {
             Context::set('module_srl', '');
             $this->act = 'list';
         } else {
             ModuleModel::syncModuleToSite($module_info);
             $this->module_info = $module_info;
             Context::set('module_info', $module_info);
         }
     }
     // get the module category list
     $module_category = $oModuleModel->getModuleCategories();
     Context::set('module_category', $module_category);
     $security = new Security();
     $security->encodeHTML('module_info.');
     $security->encodeHTML('module_category..');
     // setup template path
     $template_path = sprintf("%stpl/", $this->module_path);
     $this->setTemplatePath($template_path);
     Context::addJsFile($this->module_path . 'tpl/js/inipaystandard_admin.js');
 }
Example #2
0
 function init()
 {
     $template_path = sprintf("%sm.skins/%s/", $this->module_path, $this->module_info->mskin);
     if (!is_dir($template_path) || !$this->module_info->mskin) {
         $this->module_info->mskin = 'default';
         $template_path = sprintf("%sm.skins/%s/", $this->module_path, $this->module_info->mskin);
     }
     $this->setTemplatePath($template_path);
     Context::addJsFile('common/js/jquery.min.js');
     Context::addJsFile('common/js/xe.min.js');
 }
    /**
     * @brief 에디터 컴포넌트가 별도의 고유 코드를 이용한다면 그 코드를 html로 변경하여 주는 method
     *
     * 이미지나 멀티미디어, 설문등 고유 코드가 필요한 에디터 컴포넌트는 고유코드를 내용에 추가하고 나서
     * DocumentModule::transContent() 에서 해당 컴포넌트의 transHtml() method를 호출하여 고유코드를 html로 변경
     **/
    function transHTML($xml_obj)
    {
        $code_type = $xml_obj->attrs->code_type;
        $option_file_path = $xml_obj->attrs->file_path;
        $option_description = $xml_obj->attrs->description;
        $option_first_line = $xml_obj->attrs->first_line;
        $option_collapse = $xml_obj->attrs->collapse;
        $option_nogutter = $xml_obj->attrs->nogutter;
        $option_nocontrols = $xml_obj->attrs->nocontrols;
        if ($option_collapse == 'true') {
            $option = $option . 'collapse: true;';
        }
        if ($option_nogutter == 'true') {
            $option = $option . 'gutter: false;';
        }
        if ($option_nocontrols == 'true' && $option_collapse != 'true') {
            $option = $option . 'toolbar: false;';
        }
        if ($option_first_line > 1) {
            $option = $option . "first-line: " . $option_first_line . ";";
        }
        $body = $xml_obj->body;
        $body = preg_replace('@(<br\\s?/?>)(\\n)?@i', "\n", $body);
        $body = strip_tags($body);
        if (!$GLOBALS['_called_editor_component_code_highlighter_']) {
            $GLOBALS['_called_editor_component_code_highlighter_'] = true;
            $js_code = <<<dpScript
<script type="text/javascript">
SyntaxHighlighter.config.clipboardSwf = '{$this->component_path}script/clipboard.swf';
SyntaxHighlighter.all();
</script>
dpScript;
            Context::addHtmlFooter($js_code);
            Context::addCSSFile($this->component_path . 'style/shCore.css');
            Context::addCSSFile($this->component_path . 'style/shThemeDefault.css');
            Context::addJsFile($this->component_path . 'script/shCore.js');
        }
        Context::addJsFile($this->component_path . 'script/shBrush' . $code_type . '.js');
        $output = null;
        if ($option_file_path != null || $option_description != null) {
            $output .= '<div class="ch_infobox">';
            if ($option_file_path != null) {
                $output .= '<span class="file_path">' . $option_file_path . '</span>';
            }
            if ($option_description != null) {
                $output .= '<span class="description">' . $option_description . '</span>';
            }
            $output .= '</div>';
        }
        $output .= sprintf('<pre class="brush: %s;%s">%s</pre>', strtolower($code_type), $option, $body);
        return $output;
    }
 /**
  * @brief 원 xml파일과 compiled된js파일의 시간 비교 및 유무 비교등을 처리
  **/
 function compile()
 {
     if (!file_exists($this->xml_file)) {
         return;
     }
     if (!file_exists($this->js_file)) {
         $this->_compile();
     } else {
         if (filemtime($this->xml_file) > filemtime($this->js_file)) {
             $this->_compile();
         }
     }
     Context::addJsFile($this->js_file);
 }
Example #5
0
 /**
  * @brief 초기화
  * board 모듈은 일반 사용과 관리자용으로 나누어진다.\n
  **/
 function init()
 {
     /**
      * 기본 모듈 정보들 설정 (list_count, page_count는 게시판 모듈 전용 정보이고 기본 값에 대한 처리를 함)
      **/
     if ($this->module_info->list_count) {
         $this->list_count = $this->module_info->list_count;
     }
     if ($this->module_info->search_list_count) {
         $this->search_list_count = $this->module_info->search_list_count;
     }
     if ($this->module_info->page_count) {
         $this->page_count = $this->module_info->page_count;
     }
     $this->except_notice = $this->module_info->except_notice == 'N' ? false : true;
     /**
      * 상담 기능 체크. 현재 게시판의 관리자이면 상담기능을 off시킴
      * 현재 사용자가 비로그인 사용자라면 글쓰기/댓글쓰기/목록보기/글보기 권한을 제거함
      **/
     if ($this->module_info->consultation == 'Y' && !$this->grant->manager) {
         $this->consultation = true;
         if (!Context::get('is_logged')) {
             $this->grant->list = $this->grant->write_document = $this->grant->write_comment = $this->grant->view = false;
         }
     } else {
         $this->consultation = false;
     }
     /**
      * 스킨 경로를 미리 template_path 라는 변수로 설정함
      * 스킨이 존재하지 않는다면 xe_board로 변경
      **/
     $template_path = sprintf("%sskins/%s/", $this->module_path, $this->module_info->skin);
     if (!is_dir($template_path) || !$this->module_info->skin) {
         $this->module_info->skin = 'xe_board';
         $template_path = sprintf("%sskins/%s/", $this->module_path, $this->module_info->skin);
     }
     $this->setTemplatePath($template_path);
     /**
      * 확장 변수 사용시 미리 확장변수의 대상 키들을 가져와서 context set
      **/
     $oDocumentModel =& getModel('document');
     $extra_keys = $oDocumentModel->getExtraKeys($this->module_info->module_srl);
     Context::set('extra_keys', $extra_keys);
     /** 
      * 게시판 전반적으로 사용되는 javascript, JS 필터 추가
      **/
     Context::addJsFilter($this->module_path . 'tpl/filter', 'input_password.xml');
     Context::addJsFile($this->module_path . 'tpl/js/board.js');
 }
Example #6
0
 /**
  * @brief 초기화
  **/
 function init()
 {
     /**
      * 기본 모듈 정보들 설정 (list_count, page_count는 게시판 모듈 전용 정보이고 기본 값에 대한 처리를 함)
      **/
     if ($this->module_info->list_count) {
         $this->list_count = $this->module_info->list_count;
     }
     if ($this->module_info->page_count) {
         $this->page_count = $this->module_info->page_count;
     }
     if (!$this->module_info->popular_tag_period) {
         $this->module_info->popular_tag_period = 30;
     }
     /**
      * 스킨 경로를 미리 template_path 라는 변수로 설정함
      **/
     $template_path = sprintf("%sskins/%s/", $this->module_path, $this->module_info->skin);
     if (!is_dir($template_path) || !$this->module_info->skin) {
         $this->module_info->skin = 'xe_default';
         $template_path = sprintf("%sskins/%s/", $this->module_path, $this->module_info->skin);
     }
     $this->setTemplatePath($template_path);
     /** 
      * 전반적으로 사용되는 javascript, JS 필터 추가
      **/
     Context::addJsFile($this->module_path . 'tpl/js/livexe.js');
     if ($this->grant->insert_rss) {
         Context::addJsFilter($this->module_path . 'tpl/filter', 'get_rss.xml');
         Context::addJsFilter($this->module_path . 'tpl/filter', 'insert_rss.xml');
     }
     $args->module_srl = $this->module_srl;
     $output = executeQuery('livexe.getRSSCount', $args);
     Context::set('total_feeds', $output->data->count);
     $output = executeQuery('livexe.getDocumentCount', $args);
     Context::set('total_articles', $output->data->count);
     if (Context::get('is_logged')) {
         $logged_info = Context::get('logged_info');
         $args->module_srl = $this->module_srl;
         $args->member_srl = $logged_info->member_srl;
         $output = executeQuery('livexe.getMyRSSCount', $args);
         Context::set('total_my_feeds', $output->data->count);
     }
 }
Example #7
0
 function init()
 {
     $template_path = sprintf("%sm.skins/%s/", $this->module_path, $this->module_info->mskin);
     if (!is_dir($template_path) || !$this->module_info->mskin) {
         $this->module_info->mskin = 'default';
         $template_path = sprintf("%sm.skins/%s/", $this->module_path, $this->module_info->mskin);
     }
     $this->setTemplatePath($template_path);
     Context::addJsFile('common/js/jquery.min.js');
     Context::addJsFile('common/js/xe.min.js');
     $logged_info = Context::get('logged_info');
     if ($logged_info) {
         Context::set('login_chk', 'Y');
     } else {
         if (!Context::get('is_logged')) {
             Context::set('login_chk', 'N');
         }
     }
     Context::set('hide_trolley', 'true');
 }
Example #8
0
 /**
  * @brief 초기화
  * wiki 모듈은 일반 사용과 관리자용으로 나누어진다.\n
  **/
 function init()
 {
     /**
      * 스킨 경로를 미리 template_path 라는 변수로 설정함
      * 스킨이 존재하지 않는다면 xe_wiki로 변경
      **/
     $template_path = sprintf("%sskins/%s/", $this->module_path, $this->module_info->skin);
     if (!is_dir($template_path) || !$this->module_info->skin) {
         $this->module_info->skin = 'xe_wiki';
         $template_path = sprintf("%sskins/%s/", $this->module_path, $this->module_info->skin);
     }
     $this->setTemplatePath($template_path);
     $oModuleModel =& getModel('module');
     $document_config = $oModuleModel->getModulePartConfig('document', $this->module_info->module_srl);
     if (!isset($document_config->use_history)) {
         $document_config->use_history = 'N';
     }
     $this->use_history = $document_config->use_history;
     Context::set('use_history', $document_config->use_history);
     Context::addJsFile($this->module_path . 'tpl/js/wiki.js');
 }
 function init()
 {
     parent::init();
     $oTextyleModel =& getModel('textyle');
     if (preg_match("/TextyleTool/", $this->act) || $oTextyleModel->isAttachedMenu($this->act)) {
         Context::addJsFile("./common/js/jquery.js", true, '', -100000);
         Context::addJsFile("./common/js/x.js", true, '', -100000);
         Context::addJsFile("./common/js/common.js", true, '', -100000);
         Context::addJsFile("./common/js/js_app.js", true, '', -100000);
         Context::addJsFile("./common/js/xml_handler.js", true, '', -100000);
         Context::addJsFile("./common/js/xml_js_filter.js", true, '', -100000);
         Context::addCSSFile("./common/css/default.css", true, 'all', '', -100000);
         Context::addCSSFile("./common/css/button.css", true, 'all', '', -100000);
     } else {
         $template_path = sprintf("%sm.skins/%s/", $this->module_path, $this->module_info->mskin);
         if (!is_dir($template_path) || !$this->module_info->mskin) {
             $this->module_info->mskin = 'default';
             $template_path = sprintf("%sm.skins/%s/", $this->module_path, $this->module_info->mskin);
         }
         $this->setTemplatePath($template_path);
     }
 }
<?php

if (!defined("__ZBXE__")) {
    exit;
}
/**
 * @file rainbow.addon.php
 * @author zero (zero@nzeo.com)
 * @brief Rainbow link addon
 *
 * 링크가 걸린 텍스트에 마우스 오버를 하면 무지개색으로 변하게 하는 애드온입니다.
 * rainbow.js 파일만 추가하는 것으로 끝납니다.
 * rainbow.js는 http://www.dynamicdrive.com에서 제작하였으며 저작권을 가지고 있습니다.
 * before_display_content 에서만 요청이 됩니다.
 **/
if (Context::get('module') == 'admin' || $called_position != 'before_module_init') {
    return;
}
// Context::addJsFile()을 이용하면 끝
Context::addJsFile($addon_path . 'js/rainbow.js');
<?php

if (!defined("__XE__")) {
    exit;
}
Context::addJsFile("./common/js/jquery.js", true, '', -100000);
Context::addJsFile("./common/js/js_app.js", true, '', -100000);
Context::addJsFile("./common/js/common.js", true, '', -100000);
Context::addJsFile("./common/js/xml_handler.js", true, '', -100000);
Context::addJsFile("./common/js/xml_js_filter.js", true, '', -100000);
Context::loadLang('./modules/board/m.skins/default/lang');
$__tpl = TemplateHandler::getInstance();
echo $__tpl->compile('modules/board/m.skins/dgiBoard', '_header.html');
if ($__Context->oDocument->isExists()) {
    $__tpl = TemplateHandler::getInstance();
    echo $__tpl->compile('modules/board/m.skins/dgiBoard', 'read.html');
} else {
    ?>
	<?php 
    if ($__Context->mi->board_type == 'news') {
        ?>
	<?php 
        $__tpl = TemplateHandler::getInstance();
        echo $__tpl->compile('modules/board/m.skins/dgiBoard', '_list_news.html');
        ?>
	<?php 
    } elseif ($__Context->mi->board_type == 'webzine') {
        ?>
	<?php 
        $__tpl = TemplateHandler::getInstance();
        echo $__tpl->compile('modules/board/m.skins/dgiBoard', '_list_webzine.html');
Example #12
0
<?php

if (!defined("__ZBXE__")) {
    exit;
}
/**
 * @file autolink.addon.php
 * @author zero (zero@nzeo.com)
 * @brief 자동 링크 애드온
 **/
if ($called_position == 'after_module_proc' && Context::getResponseMethod() != "XMLRPC") {
    Context::addJsFile('./addons/autolink/autolink.js');
}
// 댓글리스트 출력타입 D-기본형,E-모바일EX형
if (!$__Context->mex_info->cmt_list_count) {
    $__Context->mex_info->cmt_list_count = 5;
}
// 코멘트 리스트 카운트
if (!$__Context->mex_info->send_message_use) {
    $__Context->mex_info->send_message_use = 'Y';
}
// 쪽지보내기 사용
if ($__Context->xe_version == 4) {
    Context::addJsFile("./common/js/jquery.js", true, '', -1000001);
} else {
    Context::addJsFile("./common/js/jquery.min.js", true, '', -1000001);
}
Context::addJsFile("./modules/mobileex/tpl/js/jquery.rotate.min.2.2.js", true, '', -1000000);
Context::addJsFile("./common/js/js_app.js", true, '', -100000);
Context::addJsFile("./common/js/common.js", true, '', -100000);
Context::addJsFile("./common/js/xml_handler.js", true, '', -100000);
Context::addJsFile("./common/js/xml_js_filter.js", true, '', -100000);
Context::addJsFile("./modules/mobileex/tpl/js/mobileex.min.js", true, '', -100000);
Context::loadLang('./modules/board/m.skins/mex_default/lang');
?>
<!--#Meta:modules/board/m.skins/mex_default/css/mboard.css--><?php 
$__tmp = array('modules/board/m.skins/mex_default/css/mboard.css', '', '', '');
Context::loadFile($__tmp);
unset($__tmp);
?>
<!--#Meta:modules/board/m.skins/mex_default/js/mboard.js--><?php 
$__tmp = array('modules/board/m.skins/mex_default/js/mboard.js', '', '', '');
Context::loadFile($__tmp);
unset($__tmp);
    echo $__Context->XE_VALIDATOR_MESSAGE_TYPE;
    ?>
">
	<p><?php 
    echo $__Context->XE_VALIDATOR_MESSAGE;
    ?>
</p>
</div><?php 
}
?>
<p class="x_help-block"><?php 
echo $__Context->lang->detail_about_ftp_info;
?>
</p>
<?php 
Context::addJsFile("modules/admin/ruleset/installFtpInfo.xml", FALSE, "", 0, "body", TRUE, "");
?>
<form action="./" id="ftp_form" method="post" enctype="multipart/form-data" class="x_form-horizontal" ><input type="hidden" name="error_return_url" value="<?php 
echo htmlspecialchars(getRequestUriByServerEnviroment(), ENT_COMPAT | ENT_HTML401, 'UTF-8', false);
?>
" /><input type="hidden" name="mid" value="<?php 
echo $__Context->mid;
?>
" /><input type="hidden" name="vid" value="<?php 
echo $__Context->vid;
?>
" /><input type="hidden" name="ruleset" value="installFtpInfo" />
	<input type="hidden" name="module" value="install" />
	<input type="hidden" name="act" value="procInstallAdminSaveFTPInfo" />
	<input type="hidden" name="success_return_url" value="<?php 
echo base64_decode($__Context->success_return_url);
<?php

if (!defined("__XE__")) {
    exit;
}
?>
<!--#Meta:modules/androidpushapp/tpl/css/ncenter_admin.css--><?php 
$__tmp = array('modules/androidpushapp/tpl/css/ncenter_admin.css', '', '', '');
Context::loadFile($__tmp);
unset($__tmp);
$__tpl = TemplateHandler::getInstance();
echo $__tpl->compile('modules/androidpushapp/tpl', 'header.html');
Context::addJsFile("modules/androidpushapp/ruleset/insertConfig.xml", FALSE, "", 0, "body", TRUE, "");
?>
<form  action="./" method="post" class="x_form-horizontal" id="fo_androidpushapp"><input type="hidden" name="error_return_url" value="<?php 
echo htmlspecialchars(getRequestUriByServerEnviroment(), ENT_COMPAT | ENT_HTML401, 'UTF-8', false);
?>
" /><input type="hidden" name="mid" value="<?php 
echo $__Context->mid;
?>
" /><input type="hidden" name="vid" value="<?php 
echo $__Context->vid;
?>
" /><input type="hidden" name="ruleset" value="insertConfig" />
	<input type="hidden" name="module" value="androidpushapp" />
	<input type="hidden" name="act" value="procAndroidpushappAdminInsertConfig" />
		<div class="x_control-group">
			<label class="x_control-label"><span class="x_label x_label-important">주의!</span>푸시 동작여부</label>
			<div class="x_controls">
				<label class="x_inline">
					<input type="radio" id="use_y" name="use" value="Y"<?php 
</a></h1>
</div>
<?php 
if ($__Context->XE_VALIDATOR_MESSAGE && $__Context->XE_VALIDATOR_ID == 'modules/file/tpl/adminConfig/1') {
    ?>
<div class="message <?php 
    echo $__Context->XE_VALIDATOR_MESSAGE_TYPE;
    ?>
">
	<p><?php 
    echo $__Context->XE_VALIDATOR_MESSAGE;
    ?>
</p>
</div><?php 
}
Context::addJsFile("modules/file/ruleset/insertConfig.xml", FALSE, "", 0, "body", TRUE, "");
?>
<form  action="./" method="post" class="x_form-horizontal section"><input type="hidden" name="error_return_url" value="<?php 
echo htmlspecialchars(getRequestUriByServerEnviroment(), ENT_COMPAT | ENT_HTML401, 'UTF-8', false);
?>
" /><input type="hidden" name="mid" value="<?php 
echo $__Context->mid;
?>
" /><input type="hidden" name="vid" value="<?php 
echo $__Context->vid;
?>
" /><input type="hidden" name="ruleset" value="insertConfig" />
	<input type="hidden" name="module" value="file" />
	<input type="hidden" name="act" value="procFileAdminInsertConfig" />
	<input type="hidden" name="xe_validator_id" value="modules/file/tpl/adminConfig/1" />
	<div class="x_control-group">
<?php

if (!defined("__ZBXE__")) {
    exit;
}
/**
 * @file reaize_image.addon.php
 * @author zero (zero@nzeo.com)
 * @brief 본문내 이미지 조절 애드온
 **/
if ($called_position == 'after_module_proc' && Context::getResponseMethod() == "HTML") {
    Context::loadJavascriptPlugin('ui');
    Context::addJsFile('./addons/resize_image/js/resize_image.js', false);
}
<?php

if (!defined("__XE__")) {
    exit;
}
$__tpl = TemplateHandler::getInstance();
echo $__tpl->compile('modules/member/tpl', 'header.html');
Context::addJsFile("modules/member/ruleset/insertLoginConfig.xml", FALSE, "", 0, "body", TRUE, "");
?>
<form action="./" class="x_form-horizontal"  method="post"><input type="hidden" name="error_return_url" value="<?php 
echo htmlspecialchars(getRequestUriByServerEnviroment(), ENT_COMPAT | ENT_HTML401, 'UTF-8', false);
?>
" /><input type="hidden" name="mid" value="<?php 
echo $__Context->mid;
?>
" /><input type="hidden" name="vid" value="<?php 
echo $__Context->vid;
?>
" /><input type="hidden" name="ruleset" value="insertLoginConfig" />
	<input type="hidden" name="module" value="member" />
	<input type="hidden" name="act" value="procMemberAdminInsertLoginConfig" />
	<input type="hidden" name="success_return_url" value="<?php 
echo getUrl('', 'module', 'admin', 'act', $__Context->act);
?>
" />
	<input type="hidden" name="xe_validator_id" value="modules/member/tpl/1" />
	<div class="x_control-group">
		<label class="x_control-label" for="change_password_date"><?php 
echo $__Context->lang->change_password_date;
?>
</label>
$__tmp = array('modules/module/tpl/js/multi_order.js', '', '', '');
Context::loadFile($__tmp);
unset($__tmp);
if ($__Context->XE_VALIDATOR_MESSAGE && $__Context->XE_VALIDATOR_ID == 'modules/board/tpl/board_insert/1') {
    ?>
<div class="message <?php 
    echo $__Context->XE_VALIDATOR_MESSAGE_TYPE;
    ?>
">
	<p><?php 
    echo $__Context->XE_VALIDATOR_MESSAGE;
    ?>
</p>
</div><?php 
}
Context::addJsFile("modules/board/ruleset/insertBoard.xml", FALSE, "", 0, "body", TRUE, "");
?>
<form  class="x_form-horizontal" action="./" method="post" enctype="multipart/form-data"><input type="hidden" name="error_return_url" value="<?php 
echo htmlspecialchars(getRequestUriByServerEnviroment(), ENT_COMPAT | ENT_HTML401, 'UTF-8', false);
?>
" /><input type="hidden" name="mid" value="<?php 
echo $__Context->mid;
?>
" /><input type="hidden" name="vid" value="<?php 
echo $__Context->vid;
?>
" /><input type="hidden" name="ruleset" value="insertBoard" />
	<input type="hidden" name="module" value="board" />
	<input type="hidden" name="act" value="procBoardAdminInsertBoard" />
	<input type="hidden" name="page" value="<?php 
echo $__Context->page;
Example #20
0
 /**
  * @brief initialization
  * board module can be used in either normal mode or admin mode.\n
  **/
 function init()
 {
     $oSecurity = new Security();
     $oSecurity->encodeHTML('document_srl', 'comment_srl', 'vid', 'mid', 'page', 'category', 'search_target', 'search_keyword', 'sort_index', 'order_type', 'trackback_srl');
     /**
      * setup the module general information
      **/
     if ($this->module_info->list_count) {
         $this->list_count = $this->module_info->list_count;
     }
     if ($this->module_info->search_list_count) {
         $this->search_list_count = $this->module_info->search_list_count;
     }
     if ($this->module_info->page_count) {
         $this->page_count = $this->module_info->page_count;
     }
     $this->except_notice = $this->module_info->except_notice == 'N' ? FALSE : TRUE;
     // $this->_getStatusNameListecret option backward compatibility
     $oDocumentModel = getModel('document');
     $statusList = $this->_getStatusNameList($oDocumentModel);
     if (isset($statusList['SECRET'])) {
         $this->module_info->secret = 'Y';
     }
     // use_category <=1.5.x, hide_category >=1.7.x
     $count_category = count($oDocumentModel->getCategoryList($this->module_info->module_srl));
     if ($count_category) {
         if ($this->module_info->hide_category) {
             $this->module_info->use_category = $this->module_info->hide_category == 'Y' ? 'N' : 'Y';
         } else {
             if ($this->module_info->use_category) {
                 $this->module_info->hide_category = $this->module_info->use_category == 'Y' ? 'N' : 'Y';
             } else {
                 $this->module_info->hide_category = 'N';
                 $this->module_info->use_category = 'Y';
             }
         }
     } else {
         $this->module_info->hide_category = 'Y';
         $this->module_info->use_category = 'N';
     }
     /**
      * check the consultation function, if the user is admin then swich off consultation function
      * if the user is not logged, then disppear write document/write comment./ view document
      **/
     if ($this->module_info->consultation == 'Y' && !$this->grant->manager) {
         $this->consultation = TRUE;
         if (!Context::get('is_logged')) {
             $this->grant->list = FALSE;
             $this->grant->write_document = FALSE;
             $this->grant->write_comment = FALSE;
             $this->grant->view = FALSE;
         }
     } else {
         $this->consultation = FALSE;
     }
     /**
      * setup the template path based on the skin
      * the default skin is default
      **/
     $template_path = sprintf("%sskins/%s/", $this->module_path, $this->module_info->skin);
     if (!is_dir($template_path) || !$this->module_info->skin) {
         $this->module_info->skin = 'default';
         $template_path = sprintf("%sskins/%s/", $this->module_path, $this->module_info->skin);
     }
     $this->setTemplatePath($template_path);
     /**
      * use context::set to setup extra variables
      **/
     $oDocumentModel = getModel('document');
     $extra_keys = $oDocumentModel->getExtraKeys($this->module_info->module_srl);
     Context::set('extra_keys', $extra_keys);
     /**
      * add extra variables to order(sorting) target
      **/
     if (is_array($extra_keys)) {
         foreach ($extra_keys as $val) {
             $this->order_target[] = $val->eid;
         }
     }
     /**
      * load javascript, JS filters
      **/
     Context::addJsFilter($this->module_path . 'tpl/filter', 'input_password.xml');
     Context::addJsFile($this->module_path . 'tpl/js/board.js');
     // remove [document_srl]_cpage from get_vars
     $args = Context::getRequestVars();
     foreach ($args as $name => $value) {
         if (preg_match('/[0-9]+_cpage/', $name)) {
             Context::set($name, '', TRUE);
             Context::set($name, $value);
         }
     }
 }
Example #21
0
 function dispSocialxeLoginAdditional()
 {
     $config = $this->config;
     $provider = Context::get('provider');
     if (!$provider) {
         return $this->stop('msg_invalid_request');
     }
     // 소셜 로그인을 사용하지 않으면 중지
     if ($config->use_social_login != 'Y') {
         return $this->stop('msg_not_allow_social_login');
     }
     // 로그인 중이면 중지
     if (Context::get('logged_info')) {
         return $this->stop('already_logged');
     }
     // 소셜 로그인 과정 중이 아니면 중지
     $mode = $this->session->getSession('mode');
     if ($mode != 'socialLogin') {
         return $this->stop('msg_invalid_request');
     }
     // 해당 서비스의 로그인이 되어 있지 않으면 중지
     //debug @kakikaki
     /**
     				찾는 부분이 여기가 아님 (소셜 계정에 로그인되지 않았습니다) :131128-1329
     */
     //$debugstr = '';
     //$debugstr .= 'provider : '.$provider."<br/>";
     //$debugstr .= '$this->providerManager->isLogged($provider) : '.$this->providerManager->isLogged($provider);
     //debug end
     if (!$this->providerManager->isLogged($provider)) {
         return $this->stop('msg_not_logged_social');
     }
     //if (!$this->providerManager->isLogged($provider)) return $this->stop($debugstr);
     // template path 지정
     $tpl_path = sprintf('%sskins/%s', $this->module_path, $config->skin);
     if (!is_dir($tpl_path)) {
         $tpl_path = sprintf('%sskins/%s', $this->module_path, 'default');
     }
     $this->setTemplatePath($tpl_path);
     // JS 불러오기
     if (!defined("__XE__")) {
         Context::addJsFile("./common/js/jquery.js", true, '', -100000);
         Context::addJsFile("./common/js/js_app.js", true, '', -100000);
         Context::addJsFile("./common/js/common.js", true, '', -100000);
         Context::addJsFile("./common/js/xml_handler.js", true, '', -100000);
         Context::addJsFile("./common/js/xml_js_filter.js", true, '', -100000);
     }
     // 템플릿 파일 지정
     $this->setTemplateFile('social_login_additional');
 }
<?php

if (!defined("__ZBXE__")) {
    exit;
}
/**
 * @file planet_todo.addon.php
 * @author SOL군 (sol@ngleader.com)
 * @brief
 **/
if ($called_position == 'after_module_proc' && Context::getResponseMethod() != "XMLRPC" && Context::getResponseMethod() != "JSON") {
    $planet = Context::get('planet');
    if (!$planet || !$planet->isMyPlanet()) {
        return;
    }
    $oPlanetModel =& getModel('planet');
    $countTodo = $oPlanetModel->getTagSearchResultCount($planet->getModuleSrl(), 'todo');
    $countDone = $oPlanetModel->getTagSearchResultCount($planet->getModuleSrl(), 'done');
    Context::addHtmlHeader("<script type=\"text/javascript\">//<![CDATA[\nvar planet_todo_count={todo:" . $countTodo . ",done:" . $countDone . "};\n//]]></script>");
    Context::addJsFile('./addons/planet_todo/planet_todo.js');
}
?>
</div>
<?php 
if ($__Context->XE_VALIDATOR_MESSAGE && $__Context->XE_VALIDATOR_ID == 'modules/member/tpl/1') {
    ?>
<div class="message <?php 
    echo $__Context->XE_VALIDATOR_MESSAGE_TYPE;
    ?>
">
	<p><?php 
    echo $__Context->XE_VALIDATOR_MESSAGE;
    ?>
</p>
</div><?php 
}
Context::addJsFile("modules/member/ruleset/insertAdminMember.xml", FALSE, "", 0, "body", TRUE, "");
?>
<form action="./" class="x_form-horizontal"  method="post" enctype="multipart/form-data"><input type="hidden" name="error_return_url" value="<?php 
echo htmlspecialchars(getRequestUriByServerEnviroment(), ENT_COMPAT | ENT_HTML401, 'UTF-8', false);
?>
" /><input type="hidden" name="mid" value="<?php 
echo $__Context->mid;
?>
" /><input type="hidden" name="vid" value="<?php 
echo $__Context->vid;
?>
" /><input type="hidden" name="ruleset" value="insertAdminMember" />
	<input type="hidden" name="module" value="member" />
	<input type="hidden" name="act" value="procMemberAdminInsert" />
	<input type="hidden" name="member_srl" value="<?php 
echo $__Context->member_srl;
<?php

if (!defined("__XE__")) {
    exit;
}
$__tpl = TemplateHandler::getInstance();
echo $__tpl->compile('modules/textmessage/tpl', 'header.html');
Context::addJsFile("modules/textmessage/ruleset/insert_config.xml", FALSE, "", 0, "body", TRUE, "");
?>
<form action="./" method="post" class="form" ><input type="hidden" name="error_return_url" value="<?php 
echo htmlspecialchars(getRequestUriByServerEnviroment(), ENT_COMPAT | ENT_HTML401, 'UTF-8', false);
?>
" /><input type="hidden" name="mid" value="<?php 
echo $__Context->mid;
?>
" /><input type="hidden" name="vid" value="<?php 
echo $__Context->vid;
?>
" /><input type="hidden" name="ruleset" value="insert_config" />
	<input type="hidden" name="module" value="textmessage" />
	<input type="hidden" name="act" value="procTextmessageAdminInsertConfig" />
	<fieldset class="section">
		<h2 class="h2"><?php 
echo $__Context->lang->configuration;
?>
</h2>
		<ul>
			<li>
				<p class="q"><?php 
echo $__Context->lang->service_api_key;
?>
		</div>
	</form>
</section>
<section class="section <?php 
if ($__Context->use_sitelock != 'Y') {
    ?>
collapsed<?php 
}
?>
">
	<h1><?php 
echo $__Context->lang->subtitle_sitelock;
?>
</h1>
	<?php 
Context::addJsFile("modules/admin/ruleset/sitelock.xml", FALSE, "", 0, "body", TRUE, "");
?>
<form action="./" method="post" enctype="multipart/form-data" class="x_form-horizontal" ><input type="hidden" name="error_return_url" value="<?php 
echo htmlspecialchars(getRequestUriByServerEnviroment(), ENT_COMPAT | ENT_HTML401, 'UTF-8', false);
?>
" /><input type="hidden" name="mid" value="<?php 
echo $__Context->mid;
?>
" /><input type="hidden" name="vid" value="<?php 
echo $__Context->vid;
?>
" /><input type="hidden" name="ruleset" value="sitelock" />
		<input type="hidden" name="module" value="admin" />
		<input type="hidden" name="act" value="procAdminUpdateSitelock" />
		<input type="hidden" name="xe_validator_id" value="modules/admin/tpl/config_general/1" />
		<div class="x_control-group">
<?php

if (!defined("__XE__")) {
    exit;
}
$__tpl = TemplateHandler::getInstance();
echo $__tpl->compile('modules/nmileage/tpl', '_header.html');
Context::addJsFile("modules/nmileage/ruleset/insertModInst.xml", FALSE, "", 0, "body", TRUE, "");
?>
<form class="x_form-horizontal" action="./" method="post" enctype="multipart/form-data" ><input type="hidden" name="error_return_url" value="<?php 
echo htmlspecialchars(getRequestUriByServerEnviroment(), ENT_COMPAT | ENT_HTML401, 'UTF-8', false);
?>
" /><input type="hidden" name="vid" value="<?php 
echo $__Context->vid;
?>
" /><input type="hidden" name="ruleset" value="insertModInst" />
	<input type="hidden" name="module" value="<?php 
echo $__Context->module;
?>
" />
	<input type="hidden" name="act" value="procNmileageAdminInsertModInst" />
	<input type="hidden" name="page" value="<?php 
echo $__Context->page;
?>
" />
	<input type="hidden" name="module_srl" value="<?php 
echo $__Context->module_info->module_srl;
?>
" />
	<input type="hidden" name="primary_key" value="<?php 
echo $__Context->module_info->module_srl;
 /**
  * @brief textyle init service
  **/
 function initService(&$oModule, $is_other_module = false, $isMobile = false)
 {
     if (!$oModule) {
         $oModule = $this;
     }
     $oTextyleModel =& getModel('textyle');
     $this->initCommon($is_other_module);
     Context::addJsFile($this->module_path . 'tpl/js/textyle_service.js');
     $preview_skin = Context::get('preview_skin');
     if (!$isMobile) {
         if ($is_other_module) {
             $path_method = 'setLayoutPath';
             $file_method = 'setLayoutFile';
             $css_path_method = 'getLayoutPath';
             Context::set('textyle_mode', 'module');
         } else {
             $path_method = 'setTemplatePath';
             $file_method = 'setTemplateFile';
             $css_path_method = 'getTemplatePath';
         }
         if (!$preview_skin) {
             $oTextyleModel->checkTextylePath($this->module_srl, $this->module_info->skin);
             $oModule->{$path_method}($oTextyleModel->getTextylePath($this->module_srl));
         } else {
             $oModule->{$path_method}($this->module_path . 'skins/' . $preview_skin);
         }
         $oModule->{$file_method}('textyle');
         Context::addCssFile($oModule->{$css_path_method}() . 'textyle.css', true, 'all', '', 100);
     }
     Context::set('root_url', Context::getRequestUri());
     Context::set('home_url', getFullSiteUrl($this->textyle->domain));
     Context::set('profile_url', getSiteUrl($this->textyle->domain, '', 'mid', $this->module_info->mid, 'act', 'dispTextyleProfile'));
     Context::set('guestbook_url', getSiteUrl($this->textyle->domain, '', 'mid', $this->module_info->mid, 'act', 'dispTextyleGuestbook'));
     Context::set('tag_url', getSiteUrl($this->textyle->domain, '', 'mid', $this->module_info->mid, 'act', 'dispTextyleTag'));
     if (Context::get('is_logged')) {
         Context::set('admin_url', getSiteUrl($this->textyle->domain, '', 'mid', $this->module_info->mid, 'act', 'dispTextyleToolDashboard'));
     } else {
         Context::set('admin_url', getSiteUrl($textyle->domain, '', 'mid', 'textyle', 'act', 'dispTextyleToolLogin'));
     }
     Context::set('textyle_title', $this->textyle->get('textyle_title'));
     if ($this->textyle->get('post_use_prefix') == 'Y' && $this->textyle->get('post_prefix')) {
         Context::set('post_prefix', $this->textyle->get('post_prefix'));
     }
     if ($this->textyle->get('post_use_suffix') == 'Y' && $this->textyle->get('post_suffix')) {
         Context::set('post_suffix', $this->textyle->get('post_suffix'));
     }
     $extra_menus = array();
     $args->site_srl = $this->site_srl;
     $output = executeQueryArray('textyle.getExtraMenus', $args);
     if ($output->toBool() && $output->data) {
         foreach ($output->data as $i => $menu) {
             $extra_menus[$menu->name] = getUrl('', 'mid', $menu->mid);
         }
     }
     Context::set('extra_menus', $extra_menus);
     // set browser title
     Context::setBrowserTitle($this->textyle->get('browser_title'));
 }
Example #28
0
 /**
  * @brief convert editor component codes to be returned and specify content style.
  **/
 function triggerEditorComponentCompile(&$content)
 {
     if (Context::getResponseMethod() != 'HTML') {
         return new Object();
     }
     $module_info = Context::get('module_info');
     $module_srl = $module_info->module_srl;
     if ($module_srl) {
         $oEditorModel =& getModel('editor');
         $editor_config = $oEditorModel->getEditorConfig($module_srl);
         $content_style = $editor_config->content_style;
         if ($content_style) {
             $path = _XE_PATH_ . 'modules/editor/styles/' . $content_style . '/';
             if (is_dir($path) && file_exists($path . 'style.ini')) {
                 $ini = file($path . 'style.ini');
                 for ($i = 0, $c = count($ini); $i < $c; $i++) {
                     $file = trim($ini[$i]);
                     if (!$file) {
                         continue;
                     }
                     if (preg_match('/\\.css$/i', $file)) {
                         Context::addCSSFile('./modules/editor/styles/' . $content_style . '/' . $file, false);
                     } elseif (preg_match('/\\.js/i', $file)) {
                         Context::addJsFile('./modules/editor/styles/' . $content_style . '/' . $file, false);
                     }
                 }
             }
         }
         $content_font = $editor_config->content_font;
         $content_font_size = $editor_config->content_font_size;
         if ($content_font || $content_font_size) {
             $buff = '<style type="text/css"> .xe_content { ';
             if ($content_font) {
                 $buff .= 'font-family:' . $content_font . ';';
             }
             if ($content_font_size) {
                 $buff .= 'font-size:' . $content_font_size . ';';
             }
             $buff .= ' }</style>';
             Context::addHtmlHeader($buff);
         }
     }
     $content = $this->transComponent($content);
     return new Object();
 }
?>
" />
	<button type="submit" class="x_btn x_btn-inverse"><?php 
echo $__Context->lang->cmd_search;
?>
</button>
	<a href="<?php 
echo getUrl('', 'module', $__Context->module, 'act', $__Context->act);
?>
" class="x_btn"><?php 
echo $__Context->lang->cmd_cancel;
?>
</a>
</form>
<?php 
Context::addJsFile("modules/file/ruleset/deleteChecked.xml", FALSE, "", 0, "body", TRUE, "");
?>
<form  action="./" method="post" class="x_modal" id="listManager"><input type="hidden" name="error_return_url" value="<?php 
echo htmlspecialchars(getRequestUriByServerEnviroment(), ENT_COMPAT | ENT_HTML401, 'UTF-8', false);
?>
" /><input type="hidden" name="mid" value="<?php 
echo $__Context->mid;
?>
" /><input type="hidden" name="vid" value="<?php 
echo $__Context->vid;
?>
" /><input type="hidden" name="ruleset" value="deleteChecked" />
	<input type="hidden" name="module" value="file" />
	<input type="hidden" name="act" value="procFileAdminDeleteChecked" />
	<input type="hidden" name="page" value="<?php 
echo $__Context->page;
if ($__Context->XE_VALIDATOR_MESSAGE && $__Context->XE_VALIDATOR_ID == 'modules/message/skins/default/system_message/1') {
    ?>
<div class="message <?php 
    echo $__Context->XE_VALIDATOR_MESSAGE_TYPE;
    ?>
">
			<p><?php 
    echo $__Context->XE_VALIDATOR_MESSAGE;
    ?>
</p>
		</div><?php 
}
?>
		<?php 
if (!$__Context->is_logged && $__Context->module == 'admin') {
    Context::addJsFile("./files/ruleset/login.xml", FALSE, "", 0, "body", TRUE, "");
    ?>
<form  action="<?php 
    echo getUrl('', 'act', 'procMemberLogin');
    ?>
" method="post"><input type="hidden" name="error_return_url" value="<?php 
    echo htmlspecialchars(getRequestUriByServerEnviroment(), ENT_COMPAT | ENT_HTML401, 'UTF-8', false);
    ?>
" /><input type="hidden" name="mid" value="<?php 
    echo $__Context->mid;
    ?>
" /><input type="hidden" name="vid" value="<?php 
    echo $__Context->vid;
    ?>
" /><input type="hidden" name="ruleset" value="@login" />
			<input type="hidden" name="module" value="member" />