本文整理汇总了PHP中Context::getRequestMethod方法的典型用法代码示例。如果您正苦于以下问题:PHP Context::getRequestMethod方法的具体用法?PHP Context::getRequestMethod怎么用?PHP Context::getRequestMethod使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Context
的用法示例。
在下文中一共展示了Context::getRequestMethod方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: procNcenterliteUserConfig
function procNcenterliteUserConfig()
{
$logged_info = Context::get('logged_info');
$oNcenterliteModel = getModel('ncenterlite');
$member_srl = Context::get('member_srl');
if (!$member_srl) {
$member_srl = $logged_info->member_srl;
}
if ($logged_info->member_srl != $member_srl && $logged_info->is_admin != 'Y') {
return new Object(-1, 'ncenterlite_stop_no_permission_other_user_settings');
}
$output = $oNcenterliteModel->getMemberConfig($member_srl);
$obj = Context::getRequestVars();
$args = new stdClass();
$args->member_srl = $member_srl;
$args->comment_notify = $obj->comment_notify;
$args->mention_notify = $obj->mention_notify;
$args->message_notify = $obj->message_notify;
if (!$output) {
$outputs = executeQuery('ncenterlite.insertUserConfig', $args);
} else {
$outputs = executeQuery('ncenterlite.updateUserConfig', $args);
}
$this->setMessage('success_updated');
if (!in_array(Context::getRequestMethod(), array('XMLRPC', 'JSON'))) {
$returnUrl = Context::get('success_return_url') ? Context::get('success_return_url') : getNotEncodedUrl('', 'act', 'dispNcenterliteUserConfig', 'member_srl', $member_srl);
header('location: ' . $returnUrl);
return;
}
}
示例2: procAttendanceInsertAttendance
/**
* @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;
}
}
示例3: procEposAdminInsert
/**
* @brief inserts virtual account numbers into the epos DB table, called by dispEposAdminInsert
*/
function procEposAdminInsert()
{
$count = 0;
// count for inserting records
$bank = Context::get('bank');
$van_list = explode("\n", Context::get('van_list'));
foreach ($van_list as $van) {
if (!$van) {
continue;
}
// check if $van is empty
$args->bank = $bank;
$args->van = trim($van);
$output = executeQuery('epos.insertAccount', $args);
if (!$output->toBool()) {
return $output;
}
$count++;
}
$this->setMessage(sprintf(Context::getLang('msg_regist_count'), $count));
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', 'dispEposAdminInsert');
$this->setRedirectUrl($returnUrl);
}
}
示例4: toDoc
/**
* Produce JSON compliant content given a module object.\n
* @param ModuleObject $oModule the module object
* @return string
*/
public function toDoc($oModule)
{
$variables = $oModule->getVariables();
$variables['error'] = $oModule->getError();
$variables['message'] = $oModule->getMessage();
self::_convertCompat($variables, Context::getRequestMethod());
return json_encode($variables);
}
示例5: dispPageIndex
/**
* @brief Page information
*/
function dispPageIndex(&$oModule)
{
$page_content = Context::get('page_content');
$oWidgetController = getController('widget');
$requestMethod = Context::getRequestMethod();
Context::setResponseMethod('HTML');
$oWidgetController->triggerWidgetCompile($page_content);
Context::setResponseMethod($requestMethod);
$oModule->add('page_content', $page_content);
}
示例6: setRedirectUrl
/**
* setter to set an url for redirection
* @param string $url url for redirection
* @remark redirect_url is used only for ajax requests
* @return void
* */
function setRedirectUrl($url = './', $output = NULL)
{
$ajaxRequestMethod = array_flip($this->ajaxRequestMethod);
if (!isset($ajaxRequestMethod[Context::getRequestMethod()])) {
$this->add('redirect_url', $url);
}
if ($output !== NULL && is_object($output)) {
return $output;
}
}
示例7: procRhclaimAdminInsertConfig
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;
}
}
示例8: before_module_init
function before_module_init(&$ModuleHandler)
{
$logged_info = Context::get('logged_info');
if ($logged_info->is_admin == 'Y' || $logged_info->is_site_admin) {
return false;
}
// if($this->addon_info->target != 'all' && Context::get('is_logged'))
// {
// return false;
// }
if ($_SESSION['XE_VALIDATOR_ERROR'] == -1) {
$_SESSION['member_captcha_authed'] = false;
}
if ($_SESSION['member_captcha_authed']) {
return false;
}
$type = Context::get('captchaType');
$this->target_acts = array();
if ($this->addon_info->apply_find_account == 'apply') {
$this->target_acts[] = 'procMemberFindAccount';
}
if ($this->addon_info->apply_resend_auth_mail == 'apply') {
$this->target_acts[] = 'procMemberResendAuthMail';
}
if ($this->addon_info->apply_signup == 'apply') {
$this->target_acts[] = 'procMemberInsert';
}
if (Context::getRequestMethod() != 'XMLRPC' && Context::getRequestMethod() !== 'JSON') {
if ($type == 'inline') {
if (!$this->compareCaptcha()) {
Context::loadLang(_XE_PATH_ . 'addons/captcha_member/lang');
$_SESSION['XE_VALIDATOR_ERROR'] = -1;
$_SESSION['XE_VALIDATOR_MESSAGE'] = Context::getLang('captcha_denied');
$_SESSION['XE_VALIDATOR_MESSAGE_TYPE'] = 'error';
$_SESSION['XE_VALIDATOR_RETURN_URL'] = Context::get('error_return_url');
$ModuleHandler->_setInputValueToSession();
}
} else {
Context::addHtmlHeader('<script>
if(!captchaTargetAct) {var captchaTargetAct = [];}
captchaTargetAct.push("' . implode('","', $this->target_acts) . '");
</script>');
Context::loadFile(array('./addons/captcha_member/captcha.min.js', 'body', '', null), true);
}
}
// compare session when calling actions such as writing a post or a comment on the board/issue tracker module
if (!$_SESSION['member_captcha_authed'] && in_array(Context::get('act'), $this->target_acts)) {
Context::loadLang(_XE_PATH_ . 'addons/captcha_member/lang');
$ModuleHandler->error = "captcha_denied";
}
return true;
}
示例9: procNmileageAdminConfig
function procNmileageAdminConfig()
{
$args = Context::getRequestVars();
// save module configuration.
$oModuleControll = getController('module');
$output = $oModuleControll->insertModuleConfig('nmileage', $args);
$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', 'dispNmileageAdminConfig', 'module_srl', Context::get('module_srl'));
$this->setRedirectUrl($returnUrl);
return;
}
}
示例10: procCympusadminAdminConfig
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;
}
}
示例11: procAndroidpushappAdminDelete
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;
}
}
示例12: procLicenseAdminConfig
/**
* @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);
}
}
示例13: procNotificationAdminConfig
/**
* @brief 모듈 환경설정값 쓰기
**/
function procNotificationAdminConfig()
{
$args = Context::gets('cellphone_fieldname', 'use_authdata');
// save module configuration.
$oModuleControll = getController('module');
$output = $oModuleControll->insertModuleConfig('notification', $args);
if (!$output->toBool()) {
return $output;
}
$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', 'dispNotificationAdminConfig');
$this->setRedirectUrl($returnUrl);
return;
}
}
示例14: procSejin7940_nickAdminConfig
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;
}
}
示例15: procSyndicationAdminInsertConfig
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;
}
}