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


PHP IPAddress::getInstance方法代码示例

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


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

示例1: __construct

 public function __construct()
 {
     parent::__construct();
     // Try to set better auth than AUTH_PUBLIC depending on the origin of the IP
     if (S::i('auth') < AUTH_INTERNAL && IPAddress::getInstance()->is_x_internal()) {
         S::set('auth', AUTH_INTERNAL);
     }
 }
开发者ID:netixx,项目名称:frankiz,代码行数:8,代码来源:frankizsession.php

示例2: tpl

 public function tpl()
 {
     return IPAddress::getInstance()->has_x_student() ? 'minimodules/jtx/internal.tpl' : 'minimodules/jtx/external.tpl';
 }
开发者ID:netixx,项目名称:frankiz,代码行数:4,代码来源:jtx.php

示例3: getSilentWithValues

 public static function getSilentWithValues($login, $values)
 {
     global $globals;
     if ($login == 0) {
         // If the anonymous_user is already in session
         if (S::has('anonymous_user')) {
             return S::v('anonymous_user');
         }
         $uid = IPAddress::getInstance()->is_x_internal() ? $globals->anonymous->internal : $globals->anonymous->external;
         S::set('newuid', $uid);
         try {
             $u = new User($uid);
             $u->select(UserSelect::login());
         } catch (Exception $e) {
             S::kill('newuid');
             throw $e;
         }
         S::kill('newuid');
         S::set('anonymous_user', $u);
         return $u;
     }
     throw new Exception('DEPRECATED call to getSilentWithValues()');
 }
开发者ID:netixx,项目名称:frankiz,代码行数:23,代码来源:user.php

示例4: run

 public function run()
 {
     $skin = $this->load_skin();
     $this->assign('skin', S::v('skin'));
     $user = S::user();
     $this->assign('user', $user);
     $this->assign('logged', !is_null($user) && S::logged());
     // Remote IP
     $this->assign('remip', IPAddress::getInstance());
     $this->assign('MiniModules_COL_FLOAT', FrankizMiniModule::get(S::user()->minimodules(FrankizMiniModule::COL_FLOAT)));
     $this->addCssLink(FrankizMiniModule::batchCss());
     // Enable JSON loading of the module only
     if (Env::has('solo')) {
         $this->jsonAssign('content', $this->raw());
         $this->jsonAssign('title', $this->get_template_vars('title'));
         $this->jsonAssign('pl_css', $this->get_template_vars('pl_css'));
         $this->jsonAssign('pl_js', $this->get_template_vars('pl_js'));
         $this->runJSon();
     } else {
         $this->assign('quick_validate', array());
         if (S::user()->castes(Rights::admin())->count() > 0) {
             $validate_filter = new ValidateFilter(new VFC_User(S::user()));
             $validates = $validate_filter->get()->select(ValidateSelect::quick());
             $quick_validate = $validates->split('group');
             $this->assign('quick_validate', $quick_validate);
         }
         $request_filter = new ValidateFilter(new VFC_Writer(S::user()));
         $requests = $request_filter->get()->select(ValidateSelect::quick());
         $this->assign('self_url', pl_self());
         $this->assign('quick_requests', $requests);
         $this->_run(self::getTplPath('frankiz.tpl'));
     }
 }
开发者ID:netixx,项目名称:frankiz,代码行数:33,代码来源:frankizpage.php

示例5: handler_universe

 function handler_universe($page)
 {
     $page->assign('remip', IPAddress::getInstance());
     echo $page->fetch('universe.tpl');
     exit;
 }
开发者ID:netixx,项目名称:frankiz,代码行数:6,代码来源:frankiz.php


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