当前位置: 首页>>代码示例>>PHP>>正文


PHP Context::getSslStatus方法代码示例

本文整理汇总了PHP中Context::getSslStatus方法的典型用法代码示例。如果您正苦于以下问题:PHP Context::getSslStatus方法的具体用法?PHP Context::getSslStatus怎么用?PHP Context::getSslStatus使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Context的用法示例。


在下文中一共展示了Context::getSslStatus方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: proc

 /**
  * @brief Widget execution
  * Get extra_vars declared in ./widgets/widget/conf/info.xml as arguments
  * After generating the result, do not print but return it.
  */
 function proc($args)
 {
     // Set a path of the template skin (values of skin, colorset settings)
     $tpl_path = sprintf('%sskins/%s', $this->widget_path, $args->skin);
     Context::set('colorset', $args->colorset);
     // Specify a template file
     if (Context::get('is_logged')) {
         $tpl_file = 'login_info';
     } else {
         $tpl_file = 'login_form';
     }
     // Get the member configuration
     $oModuleModel = getModel('module');
     $this->member_config = $oModuleModel->getModuleConfig('member');
     Context::set('member_config', $this->member_config);
     // Set a flag to check if the https connection is made when using SSL and create https url
     $ssl_mode = false;
     $useSsl = Context::getSslStatus();
     if ($useSsl != 'none') {
         if (strncasecmp('https://', Context::getRequestUri(), 8) === 0) {
             $ssl_mode = true;
         }
     }
     Context::set('ssl_mode', $ssl_mode);
     // Compile a template
     $oTemplate =& TemplateHandler::getInstance();
     return $oTemplate->compile($tpl_path, $tpl_file);
 }
开发者ID:kimkucheol,项目名称:xe-core,代码行数:33,代码来源:login_info.class.php

示例2: __construct

 /**
  * constructor
  *
  * @return void
  */
 function __construct()
 {
     if (!Context::isInstalled()) {
         return;
     }
     if (!Context::isExistsSSLAction('dispBoardWrite') && Context::getSslStatus() == 'optional') {
         $ssl_actions = array('dispBoardWrite', 'dispBoardWriteComment', 'dispBoardReplyComment', 'dispBoardModifyComment', 'dispBoardDelete', 'dispBoardDeleteComment', 'procBoardInsertDocument', 'procBoardDeleteDocument', 'procBoardInsertComment', 'procBoardDeleteComment', 'procBoardVerificationPassword');
         Context::addSSLActions($ssl_actions);
     }
 }
开发者ID:xefork-YJSoft,项目名称:rhymix,代码行数:15,代码来源:board.class.php

示例3: proc

 /**
  * @brief Widget execution
  * Get extra_vars declared in ./widgets/widget/conf/info.xml as arguments
  * After generating the result, do not print but return it.
  */
 function proc($args)
 {
     // Set a path of the template skin (values of skin, colorset settings)
     $tpl_path = sprintf('%sskins/%s', $this->widget_path, $args->skin);
     Context::set('colorset', $args->colorset);
     $is_logged = Context::get('is_logged');
     $oMemberModel = getModel('member');
     $memberConfig = $oMemberModel->getMemberConfig();
     $oNcenterliteModel = getModel('ncenterlite');
     $ncenter_config = $oNcenterliteModel->getConfig();
     if ($is_logged) {
         if (!empty($ncenter_config->use) && $args->ncenter_use == 'yes') {
             $logged_info = Context::get('logged_info');
             $ncenter_list = $oNcenterliteModel->getMyNotifyList($logged_info->member_srl);
             $_latest_notify_id = array_slice($ncenter_list->data, 0, 1);
             $_latest_notify_id = $_latest_notify_id[0]->notify;
             if ($memberConfig->profile_image == 'Y') {
                 $profileImage = $oMemberModel->getProfileImage($logged_info->member_srl);
                 Context::set('profileImage', $profileImage);
             }
             Context::set('ncenterlite_latest_notify_id', $_latest_notify_id);
             if ($_COOKIE['_ncenterlite_hide_id'] && $_COOKIE['_ncenterlite_hide_id'] == $_latest_notify_id) {
                 return;
             }
             setcookie('_ncenterlite_hide_id', '', 0, '/');
         }
         $tpl_file = 'login_info';
     } else {
         $tpl_file = 'login_form';
     }
     // Get the member configuration
     $oModuleModel = getModel('module');
     $this->member_config = $oModuleModel->getModuleConfig('member');
     if ($ncenter_config->zindex) {
         Context::set('ncenterlite_zindex', ' style="z-index:' . $ncenter_config->zindex . ';" ');
     }
     Context::set('useProfileImage', $memberConfig->profile_image == 'Y' ? true : false);
     Context::set('ncenterlite_list', $ncenter_list->data);
     Context::set('ncenterlite_page_navigation', $ncenter_list->page_navigation);
     Context::set('_ncenterlite_num', $ncenter_list->page_navigation->total_count);
     Context::set('member_config', $this->member_config);
     // Set a flag to check if the https connection is made when using SSL and create https url
     $ssl_mode = false;
     $useSsl = Context::getSslStatus();
     if ($useSsl != 'none') {
         if (strncasecmp('https://', Context::getRequestUri(), 8) === 0) {
             $ssl_mode = true;
         }
     }
     Context::set('ssl_mode', $ssl_mode);
     // Compile a template
     $oTemplate =& TemplateHandler::getInstance();
     return $oTemplate->compile($tpl_path, $tpl_file);
 }
开发者ID:rhymix,项目名称:rhymix,代码行数:59,代码来源:login_info.class.php

示例4: member

 /**
  * constructor
  *
  * @return void
  */
 function member()
 {
     if (!Context::isInstalled()) {
         return;
     }
     $oModuleModel = getModel('module');
     $member_config = $oModuleModel->getModuleConfig('member');
     // Set to use SSL upon actions related member join/information/password and so on. 2013.02.15
     if (!Context::isExistsSSLAction('dispMemberModifyPassword') && Context::getSslStatus() == 'optional') {
         $ssl_actions = array('dispMemberModifyPassword', 'dispMemberSignUpForm', 'dispMemberModifyInfo', 'dispMemberModifyEmailAddress', 'dispMemberGetTempPassword', 'dispMemberResendAuthMail', 'dispMemberLoginForm', 'dispMemberFindAccount', 'dispMemberLeave', 'procMemberLogin', 'procMemberModifyPassword', 'procMemberInsert', 'procMemberModifyInfo', 'procMemberFindAccount', 'procMemberModifyEmailAddress', 'procMemberUpdateAuthMail', 'procMemberResendAuthMail', 'procMemberLeave', 'procMemberFindAccountByQuestion');
         Context::addSSLActions($ssl_actions);
     }
 }
开发者ID:umjinsun12,项目名称:dngshin,代码行数:18,代码来源:member.class.php

示例5: init

 function init()
 {
     // Get a template path (page in the administrative template tpl putting together)
     $this->setTemplatePath($this->module_path . 'tpl');
     switch ($this->module_info->page_type) {
         case 'WIDGET':
             $this->cache_file = sprintf("%sfiles/cache/page/%d.%s.%s.m.cache.php", _XE_PATH_, $this->module_info->module_srl, Context::getLangType(), Context::getSslStatus());
             $this->interval = (int) $this->module_info->page_caching_interval;
             break;
         case 'OUTSIDE':
             $this->cache_file = sprintf("./files/cache/opage/%d.%s.m.cache.php", $this->module_info->module_srl, Context::getSslStatus());
             $this->interval = (int) $this->module_info->page_caching_interval;
             $this->path = $this->module_info->mpath;
             break;
     }
 }
开发者ID:relip,项目名称:xe-core,代码行数:16,代码来源:page.mobile.php

示例6: dispPageAdminMobileContent

 function dispPageAdminMobileContent()
 {
     if ($this->module_srl) {
         Context::set('module_srl', $this->module_srl);
     }
     // Specifying the cache file
     $cache_file = sprintf("%sfiles/cache/page/%d.%s.%s.m.cache.php", _XE_PATH_, $this->module_info->module_srl, Context::getLangType(), Context::getSslStatus());
     $interval = (int) $this->module_info->page_caching_interval;
     if ($interval > 0) {
         if (!file_exists($cache_file)) {
             $mtime = 0;
         } else {
             $mtime = filemtime($cache_file);
         }
         if ($mtime + $interval * 60 > time()) {
             $page_content = FileHandler::readFile($cache_file);
         } else {
             $oWidgetController =& getController('widget');
             $page_content = $oWidgetController->transWidgetCode($this->module_info->mcontent);
             FileHandler::writeFile($cache_file, $page_content);
         }
     } else {
         if (file_exists($cache_file)) {
             FileHandler::removeFile($cache_file);
         }
         $page_content = $this->module_info->mcontent;
     }
     $page_content = preg_replace('@<\\!--#Meta:@', '<!--Meta:', $page_content);
     Context::set('module_info', $this->module_info);
     Context::set('page_content', $page_content);
     $this->setTemplateFile('mcontent');
 }
开发者ID:relip,项目名称:xe-core,代码行数:32,代码来源:page.admin.view.php

示例7: procPageAdminRemoveWidgetCache

 /**
  * @brief Clear widget cache files of the specified page
  **/
 function procPageAdminRemoveWidgetCache()
 {
     $module_srl = Context::get('module_srl');
     $oModuleModel =& getModel('module');
     $columnList = array('module_srl', 'content');
     $module_info = $oModuleModel->getModuleInfoByModuleSrl($module_srl, $columnList);
     $content = $module_info->content;
     // widget controller re-run of the cache files
     $oWidgetController =& getController('widget');
     $oWidgetController->recompileWidget($content);
     if ($module_info->page_type == 'WIDGET') {
         $cache_file = sprintf("%sfiles/cache/page/%d.%s.%s.cache.php", _XE_PATH_, $module_info->module_srl, Context::getLangType(), Context::getSslStatus());
         $mcacheFile = sprintf("%sfiles/cache/page/%d.%s.%s.m.cache.php", _XE_PATH_, $module_info->module_srl, Context::getLangType(), Context::getSslStatus());
     } else {
         if ($module_info->page_type == 'OUTSIDE') {
             $cache_file = sprintf("%sfiles/cache/opage/%d.cache.php", _XE_PATH_, $module_info->module_srl);
             if ($module_info->mpath) {
                 $mcacheFile = sprintf("%sfiles/cache/opage/%d.m.cache.php", _XE_PATH_, $module_info->module_srl);
             }
         }
     }
     if (file_exists($cache_file)) {
         FileHandler::removeFile($cache_file);
     }
     if (file_exists($mcacheFile)) {
         FileHandler::removeFile($mcacheFile);
     }
 }
开发者ID:relip,项目名称:xe-core,代码行数:31,代码来源:page.admin.controller.php


注:本文中的Context::getSslStatus方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。