/** * @brief Delete the polls selected in the administrator's page */ function procPollAdminDeleteChecked() { // Display an error no post is selected $cart = Context::get('cart'); if (is_array($cart)) { $poll_srl_list = $cart; } else { $poll_srl_list = explode('|@|', $cart); } $poll_count = count($poll_srl_list); if (!$poll_count) { return $this->stop('msg_cart_is_null'); } // Delete the post for ($i = 0; $i < $poll_count; $i++) { $poll_index_srl = trim($poll_srl_list[$i]); if (!$poll_index_srl) { continue; } $output = $this->deletePollTitle($poll_index_srl, true); if (!$output->toBool()) { return $output; } } $this->setMessage(sprintf(lang('msg_checked_poll_is_deleted'), $poll_count)); $returnUrl = Context::get('success_return_url') ? Context::get('success_return_url') : getNotEncodedUrl('', 'module', 'admin', 'act', 'dispPollAdminList'); $this->setRedirectUrl($returnUrl); }
/** * @brief 출석부 기록 **/ function procAttendanceInsertAttendance() { $today = zDate(date('YmdHis'), "Ymd"); if ($_SESSION['is_attended'] == $today) { return new Object(-1, 'attend_already_checked'); } /*attendance model 객체 생성*/ $oAttendanceController = getController('attendance'); $oAttendanceModel = getModel('attendance'); $obj = Context::getRequestVars(); $oModuleModel = getModel('module'); $config = $oModuleModel->getModuleConfig('attendance'); $ip_count = $oAttendanceModel->getDuplicateIpCount($today, $_SERVER['REMOTE_ADDR']); if ($ip_count >= $config->allow_duplicaton_ip_count) { return new Object(-1, 'attend_allow_duplicaton_ip_count'); } //인사말 필터링('#'시작문자 '^'시작문자 필터링) if (preg_match("/^\\#/", $obj->greetings)) { return new Object(-1, 'attend_greetings_error'); } $oAttendanceController->insertAttendance($obj->about_position, $obj->greetings); $this->setMessage('att_success'); if (!in_array(Context::getRequestMethod(), array('XMLRPC', 'JSON'))) { $returnUrl = Context::get('success_return_url') ? Context::get('success_return_url') : getNotEncodedUrl('', 'mid', 'attendance'); header('location: ' . $returnUrl); return; } }
function triggerDisplay() { //trigger display before(); if (strpos(Context::get('act'), "ispBoardAdmin") || strpos(Context::get('act'), "ispBoard_extendAdmin")) { $core_ver = __XE_VERSION__ ? __XE_VERSION__ : __ZBXE_VERSION__; $is_active = Context::get('act') == 'dispBoard_extendAdminBoardModify' ? true : false; $url = getNotEncodedUrl('act', 'dispBoard_extendAdminBoardModify', 'selected_var_idx', '', 'type', ''); $text = "목록수정"; if ($core_ver >= 1.7) { $active = $is_active ? "class='x_active'" : ""; $html = sprintf("<li %s><a href='%s'>%s</a></li>", $active, $url, $text); $script = "jQuery(document).ready(function(\$){\$('.x_nav').append(\"{$html}\");});"; } else { if ($core_ver >= 1.5) { $active = $is_active ? "class='active'" : ""; $html = sprintf("<li %s><a href='%s'>%s</a></li>", $active, $url, $text); $script = "jQuery(document).ready(function(\$){\$('.x .cnb ul').append(\"{$html}\");});"; } else { if ($core_ver >= 1.4) { $active = $is_active ? "class='on'" : ""; $html = sprintf("<li %s><a href='%s'>%s</a></li>", $active, $url, $text); $script = "jQuery(document).ready(function(\$){\$('#xeAdmin .header4 .localNavigation').append(\"{$html}\");});"; } else { $this->stop('지원하지 않는 버전입니다. board_extend 모듈을 제거해주시기 바랍니다.'); } } } Context::addHtmlHeader("<script type='text/javascript'>{$script}</script>"); } }
function dispSocialxeAdminBitly() { // 설정 정보를 받아옴 Context::set('config', $this->config); // bit.ly 설정이 되어 있지 않으면 환경설정으로 보낸다. if (!$this->config->bitly_username || !$this->config->bitly_api_key) { header('Location: ' . getNotEncodedUrl('act', 'dispSocialxeAdminConfig')); return; } // 목록을 구하기 위한 옵션 $args->page = Context::get('page'); $args->title = Context::get('title'); $output = executeQueryArray('socialxe.getBitlyPageList', $args); if (!$output->toBool()) { return $output; } // 템플릿에 쓰기 위해서 comment_model::getTotalCommentList() 의 return object에 있는 값들을 세팅 Context::set('total_count', $output->total_count); Context::set('total_page', $output->total_page); Context::set('page', $output->page); Context::set('bitly_list', $output->data); Context::set('page_navigation', $output->page_navigation); // 템플릿 파일 지정 $this->setTemplatePath($this->module_path . 'tpl'); $this->setTemplateFile('bitly_index'); }
/** * save configurations of the communication module * @return void|Object (success : void, fail : Object) */ function procCommunicationAdminInsertConfig() { // get the default information $args = Context::gets('skin', 'colorset', 'editor_skin', 'sel_editor_colorset', 'mskin', 'mcolorset', 'layout_srl', 'mlayout_srl', 'grant_write_default', 'grant_write_group'); $args->editor_colorset = $args->sel_editor_colorset; unset($args->sel_editor_colorset); if (!$args->skin) { $args->skin = 'default'; } if (!$args->colorset) { $args->colorset = 'white'; } if (!$args->editor_skin) { $args->editor_skin = 'default'; } if (!$args->mskin) { $args->mskin = 'default'; } if (!$args->layout_srl) { $args->layout_srl = NULL; } $oCommunicationModel = getModel('communication'); $args->grant_write = $oCommunicationModel->getGrantArray($args->grant_write_default, $args->grant_write_group); unset($args->grant_write_default); unset($args->grant_write_group); // create the module module Controller object $oModuleController = getController('module'); $output = $oModuleController->insertModuleConfig('communication', $args); $returnUrl = Context::get('success_return_url') ? Context::get('success_return_url') : getNotEncodedUrl('', 'module', 'admin', 'act', 'dispCommunicationAdminConfig'); return $this->setRedirectUrl($returnUrl, $output); }
/** * @brief Delete the prohibited Word **/ function procSpamfilterAdminDeleteDeniedWord() { $word = Context::get('word'); //$word = base64_decode(Context::get('word')); $output = $this->deleteWord($word); $returnUrl = Context::get('success_return_url') ? Context::get('success_return_url') : getNotEncodedUrl('', 'module', 'admin', 'act', 'dispSpamfilterAdminSetting'); return $this->setRedirectUrl($returnUrl, $output); }
function procRhclaimAdminInsertConfig() { $vars = Context::getRequestVars(); $oModuleController = getController('module'); $oModuleController->updateModuleConfig('Rhclaim', $vars); if (!in_array(Context::getRequestMethod(), array('XMLRPC', 'JSON'))) { $returnUrl = Context::get('success_return_url') ? Context::get('success_return_url') : getNotEncodedUrl('', 'module', 'admin', 'act', 'dispRhclaimAdminConfig'); header('location: ' . $returnUrl); return; } }
/** * Save Settings * * @return mixed */ function procStore_searchAdminInsertConfig() { // Get configurations (using module model object) $oModuleModel =& getModel('module'); $config = $oModuleModel->getModuleConfig('store_search'); $args->skin = Context::get('skin'); $oModuleController =& getController('module'); $output = $oModuleController->insertModuleConfig('store_search', $args); $returnUrl = Context::get('success_return_url') ? Context::get('success_return_url') : getNotEncodedUrl('', 'module', 'admin', 'act', 'dispStore_searchAdminContent'); return $this->setRedirectUrl($returnUrl, $output); }
/** * @save config setting */ function procCurrencyAdminConfig() { $args = Context::getRequestVars(); $oModuleControll = getController('module'); $output = $oModuleControll->insertModuleConfig('currency', $args); if (!$output->toBool()) { return $output; } $this->setMessage('success_updated'); $returnUrl = getNotEncodedUrl('', 'module', Context::get('module'), 'act', 'dispCurrencyAdminContent'); $this->setRedirectUrl($returnUrl); }
function procAuthenticationAdminDesignConfig() { $args = Context::getRequestVars(); $oModuleController = getController('module'); if (!$args->width) { $args->width = NULL; } $output = $oModuleController->updateModuleConfig('authentication', $args); $this->setMessage('success_saved'); $redirectUrl = getNotEncodedUrl('', 'module', 'admin', 'act', 'dispAuthenticationAdminDesign'); $this->setRedirectUrl($redirectUrl); }
/** * @brief delete module **/ function procInipaystandardAdminDeleteModule() { $module_srl = Context::get('module_srl'); $oModuleController = getController('module'); $output = $oModuleController->deleteModule($module_srl); if (!$output->toBool()) { return $output; } $this->setMessage('success_deleted'); $returnUrl = getNotEncodedUrl('', 'module', 'admin', 'act', 'dispInipaystandardAdminModuleList'); $this->setRedirectUrl($returnUrl); }
function procLoginxeclientAdminInsertConfig() { $oModuleController = getController('module'); $config = Context::getRequestVars(); if (substr($config->loginxe_server, -1) != '/') { $config->def_url .= '/'; } if (!isset($config->loginxe_provider)) { $config->loginxe_provider = array('NONE'); } $oModuleController->updateModuleConfig('loginxeclient', $config); $this->setMessage('success_updated'); $this->setRedirectUrl(getNotEncodedUrl('', 'module', 'admin', 'act', 'dispLoginxeclientAdminConfig')); }
function procCympusadminAdminDeleteModInst() { $module_srl = Context::get('module_srl'); $oModuleController =& getController('module'); $output = $oModuleController->deleteModule($module_srl); if (!$output->toBool()) { return $output; } $this->add('module', 'cympus'); $this->add('page', Context::get('page')); $this->setMessage('success_deleted'); $returnUrl = getNotEncodedUrl('', 'module', Context::get('module'), 'act', 'dispCympusadminAdminModInstList'); $this->setRedirectUrl($returnUrl); }
public function procDgibiWrite() { // 권한 체크 if (!$this->grant->write_document) { return new Object(-1, 'msg_not_permitted'); } // 결과 체크 if (!$output->toBool()) { return $output; } // 성공 시 글 보기 화면으로 이동 $returnUrl = getNotEncodedUrl('', 'mid', $this->mid, 'document_srl', $output->get('document_srl')); $this->setRedirectUrl($returnUrl); }
function procCympuserAdminModDelete() { $oModuleController = getController('module'); $module_srl = Context::get('module_srl'); if (!$module_srl) { return new Object(-1, 'module_srl 이 비었습니다.'); } $output = $oModuleController->deleteModule($module_srl); if (!$output->toBool()) { return $output; } $redirectUrl = getNotEncodedUrl('', 'module', 'admin', 'act', 'dispCympuserAdminList'); $this->setRedirectUrl($redirectUrl); }
function procNstoreGuestLogin() { $args = Context::getRequestVars(); if (!$args->order_srl) { return new Object(-1, 'msg_input_order_number_password'); } else { if (!$args->non_password) { return new Object(-1, 'msg_input_order_number_password'); } } $args->non_password = base64_encode($args->non_password); $obj->return_url = getNotEncodedUrl('', 'act', 'dispNstoreOrderDetail', 'order_srl', $args->order_srl, 'mid', Context::get('mid'), 'non_password', $args->non_password, 'module', Context::get('module')); $this->setRedirectUrl($obj->return_url); }
/** * @brief Configuration **/ function procMessageAdminInsertConfig() { // Get information $args->skin = Context::get('skin'); // Create a module Controller object $oModuleController =& getController('module'); $output = $oModuleController->insertModuleConfig('message', $args); if (!$output->toBool()) { return $output; } $this->setMessage('success_updated'); $returnUrl = Context::get('success_return_url') ? Context::get('success_return_url') : getNotEncodedUrl('', 'module', 'admin', 'act', 'dispMessageAdminConfig'); $this->setRedirectUrl($returnUrl); }
function procCympusadminAdminConfig() { $oModuleController = getController('module'); $obj = Context::getRequestVars(); $output = $oModuleController->updateModuleConfig('cympusadmin', $obj); if (!$output->toBool()) { return new Object(-1, 'ncenterlite_msg_setting_error'); } $this->setMessage('success_updated'); if (!in_array(Context::getRequestMethod(), array('XMLRPC', 'JSON'))) { $returnUrl = Context::get('success_return_url') ? Context::get('success_return_url') : getNotEncodedUrl('', 'module', 'admin', 'act', 'dispCympusadminAdminConfig'); header('location: ' . $returnUrl); return; } }
function procAndroidpushappAdminDelete() { $args = new stdClass(); $output = executeQuery('androidpushapp.deleteAll', $args); if (!$output->toBool()) { $oDB->rollback(); return $output; } $this->setMessage('모든 정보를 삭제하였습니다.'); if (!in_array(Context::getRequestMethod(), array('XMLRPC', 'JSON'))) { $returnUrl = Context::get('success_return_url') ? Context::get('success_return_url') : getNotEncodedUrl('', 'module', 'admin', 'act', 'dispAndroidpushappAdminList'); header('location: ' . $returnUrl); return; } }
function procSejin7940_nickAdminConfig() { $config->use_change_nick = Context::get('use_change_nick'); $config->use_deny_nick = Context::get('use_deny_nick'); $config->change_nick_term = Context::get('change_nick_term'); $config->use_same_nick = Context::get('use_same_nick'); $oModuleController =& getController('module'); $oModuleController->insertModuleConfig('sejin7940_nick', $config); if (!in_array(Context::getRequestMethod(), array('XMLRPC', 'JSON'))) { $returnUrl = Context::get('success_return_url') ? Context::get('success_return_url') : getNotEncodedUrl('', 'module', 'admin', 'act', 'dispSejin7940_nickAdminConfig'); header('location:' . $returnUrl); return; } else { return $output; } }
/** * @brief 모듈 환경설정값 쓰기 **/ function procLicenseAdminConfig() { $args = Context::getRequestVars(); debugPrint($args); // save module configuration. $oModuleControll = getController('module'); $output = $oModuleControll->insertModuleConfig('license', $args); $oLicenseModel =& getModel('license'); $oLicenseModel->checkLicense('nstore', $args->user_id, $args->serial_number, TRUE); $oLicenseModel->checkLicense('nstore_digital', $args->d_user_id, $args->d_serial_number, TRUE); $this->setMessage('success_updated'); if (!in_array(Context::getRequestMethod(), array('XMLRPC', 'JSON'))) { $returnUrl = Context::get('success_return_url') ? Context::get('success_return_url') : getNotEncodedUrl('', 'module', Context::get('module'), 'act', 'dispLicenseAdminConfig', 'module_srl', Context::get('module_srl')); $this->setRedirectUrl($returnUrl); } }
/** * @brif 예약 단체 취소 **/ function procTextmessageAdminCancelGroup() { $target_group_ids = Context::get('target_group_ids'); if (!$target_group_ids) { return new Object(-1, 'msg_invalid_request'); } $group_ids = explode(',', $target_group_ids); $oTextmessageController =& getController('textmessage'); $output = $oTextmessageController->cancelGroupMessages($group_ids); if (!$output->toBool()) { return $output; } $this->setMessage('success_requested'); $redirectUrl = getNotEncodedUrl('', 'module', 'admin', 'act', 'dispTextmessageAdminUsageStatement', 'stats_date', Context::get('stats_date')); $this->setRedirectUrl($redirectUrl); }
/** * 일정 기간 이상 지난 에러 기록을 삭제하는 메소드. */ public function procErrorLoggerAdminClearList($threshold = null) { // 정리 설정을 가져온다. if ($threshold === null) { $request_vars = Context::getRequestVars(); $threshold = intval($request_vars->clear_threshold); } // 정리한다. if ($threshold >= 0) { $obj = new stdClass(); $obj->threshold = date('YmdHis', time() - $threshold * 86400 + zgap()); $output = executeQuery('errorlogger.deleteErrorLog', $obj); } // 목록 페이지로 돌려보낸다. $this->setRedirectUrl(getNotEncodedUrl('', 'module', 'admin', 'act', 'dispErrorloggerAdminList')); return; }
function procPaynotyAdminDelete() { $config_srl = Context::get('config_srl'); if (!$config_srl) return new Object(-1, 'msg_invalid_request'); if ($config_srl) { // delete existences $args->config_srl = $config_srl; $query_id = "paynoty.deleteConfig"; executeQuery($query_id, $args); $query_id = "paynoty.deleteModule"; executeQuery($query_id, $args); } $redirectUrl = getNotEncodedUrl('', 'module', 'admin', 'act', 'dispPaynotyAdminList'); $this->setRedirectUrl($redirectUrl); }
function procAjaxboardRedirect() { $type = strtoupper(Context::get('type')); switch ($type) { case 'C': $comment_srl = Context::get('target_srl'); $oCommentModel = getModel('comment'); $oComment = $oCommentModel->getComment($comment_srl); if ($oComment->get('document_srl')) { $redirect_url = getNotEncodedUrl('', 'document_srl', $oComment->get('document_srl')) . '#comment_' . $oComment->get('comment_srl'); } break; } if (!$redirect_url) { return new Object(-1, 'msg_invalid_request'); } $this->setRedirectUrl($redirect_url); }
function procSocialxeserverAdminDeleteCheckedClient() { // 선택된 글이 없으면 오류 표시 $cart = Context::get('cart'); if (!$cart) { return $this->stop('msg_invalid_request'); } $client_srl_list = explode('|@|', $cart); $client_count = count($client_srl_list); if (!$client_count) { return $this->stop('msg_invalid_request'); } $args = new stdClass(); $args->client_srls = implode(',', $client_srl_list); executeQuery('socialxeserver.deleteClient', $args); $msg_code = '설정삭제 완료'; $this->setMessage($msg_code); $this->setRedirectUrl(getNotEncodedUrl('', 'module', 'admin', 'act', 'dispSocialxeserverAdminClient')); }
function procSyndicationAdminInsertConfig() { $oModuleController = getController('module'); $oSyndicationController = getController('syndication'); $oSyndicationModel = getModel('syndication'); $config = new stdClass(); $config->syndication_use = Context::get('syndication_use'); $config->site_url = preg_replace('/\\/+$/is', '', Context::get('site_url')); $config->year = Context::get('year'); $config->syndication_token = Context::get('syndication_token'); $config->syndication_password = urlencode(Context::get('syndication_password')); if (!$config->site_url) { return new Object(-1, 'msg_site_url_is_null'); } if (!$config->syndication_token) { return new Object(-1, 'msg_syndication_token_is_null'); } $oModuleController->updateModuleConfig('syndication', $config); $except_module = Context::get('except_module'); $output = executeQuery('syndication.deleteExceptModules'); if (!$output->toBool()) { return $output; } if ($except_module) { $modules = explode(',', $except_module); for ($i = 0, $c = count($modules); $i < $c; $i++) { $args->module_srl = $modules[$i]; $output = executeQuery('syndication.insertExceptModule', $args); if (!$output->toBool()) { return $output; } } } if (!$this->checkOpenSSLSupport()) { return new Object(-1, 'msg_need_openssl_support'); } $this->setMessage('success_applied'); if (!in_array(Context::getRequestMethod(), array('XMLRPC', 'JSON'))) { $returnUrl = Context::get('success_return_url') ? Context::get('success_return_url') : getNotEncodedUrl('', 'module', 'admin', 'act', 'dispSyndicationAdminConfig'); $this->setRedirectUrl($returnUrl); return; } }
/** * @brief saving config values. **/ function procPaynotyAdminConfig() { $oModuleController = getController('module'); $obj = Context::getRequestVars(); $config = new stdClass(); $config_vars = array('use', 'mail_content', 'sending_method', 'sender_no', 'admin_phones', 'content', 'admin_emails', 'sender_name', 'sender_email', 'sender_key', 'variable_name', 'phone_number_type'); foreach ($config_vars as $val) { $config->{$val} = $obj->{$val}; } $output = $oModuleController->insertModuleConfig('paynoty', $config); if (!$output->toBool()) { return new Object(-1, '설정에 오류가 있었습니다.'); } $this->setMessage('success_updated'); if (!in_array(Context::getRequestMethod(), array('XMLRPC', 'JSON'))) { $returnUrl = Context::get('success_return_url') ? Context::get('success_return_url') : getNotEncodedUrl('', 'module', 'admin', 'act', 'dispPaynotyAdminConfig'); header('location: ' . $returnUrl); return; } }
/** * save configurations of the communication module * @return void|Object (success : void, fail : Object) **/ function procCommunicationAdminInsertConfig() { // get the default information $args = Context::gets('skin', 'colorset', 'editor_skin', 'editor_colorset', 'mskin'); if (!$args->skin) { $args->skin = 'default'; } if (!$args->colorset) { $args->colorset = 'white'; } if (!$args->editor_skin) { $args->editor_skin = 'default'; } if (!$args->mskin) { $args->mskin = 'default'; } // create the module module Controller object $oModuleController =& getController('module'); $output = $oModuleController->insertModuleConfig('communication', $args); $returnUrl = Context::get('success_return_url') ? Context::get('success_return_url') : getNotEncodedUrl('', 'module', 'admin', 'act', 'dispCommunicationAdminConfig'); return $this->setRedirectUrl($returnUrl, $output); }
function procKrzipAdminInsertConfig() { $module_config = Context::getRequestVars(); getDestroyXeVars($module_config); unset($module_config->module); unset($module_config->act); unset($module_config->mid); unset($module_config->vid); $oKrzipController = getController('krzip'); $output = $oKrzipController->updateConfig($module_config); if (!$output->toBool()) { return $output; } $success_return_url = Context::get('success_return_url'); if ($success_return_url) { $return_url = $success_return_url; } else { $return_url = getNotEncodedUrl('', 'module', 'krzip', 'act', 'dispKrzipAdminConfig'); } $this->setMessage('success_registed'); $this->setRedirectUrl($return_url); }