當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。