Exemple #1
0
 /**
  * アクセスが許可されたIPアドレス帯域なら true を返す
  * (false = アク禁)
  *
  * @return  boolean
  * @access  public
  * @static
  */
 function getHostAuth()
 {
     global $_conf, $_HOSTCHKCONF;
     switch ($_conf['secure']['auth_host']) {
         case 1:
             $flag = 1;
             $ret = true;
             $custom = $_HOSTCHKCONF['custom_allowed_host'];
             break;
         case 2:
             $flag = 0;
             $ret = false;
             $custom = $_HOSTCHKCONF['custom_denied_host'];
             break;
         default:
             return true;
     }
     if ($flag == $_HOSTCHKCONF['host_type']['localhost'] && HostCheck::isAddrLocal() || $flag == $_HOSTCHKCONF['host_type']['private'] && HostCheck::isAddrPrivate() || $flag == $_HOSTCHKCONF['host_type']['custom'] && $custom && HostCheck::isAddrInBand($custom) || $flag == $_HOSTCHKCONF['host_type']['docomo'] && HostCheck::isAddrDocomo() || $flag == $_HOSTCHKCONF['host_type']['au'] && HostCheck::isAddrAu() || $flag == $_HOSTCHKCONF['host_type']['SoftBank'] && HostCheck::isAddrSoftBank() || $flag == $_HOSTCHKCONF['host_type']['AirH'] && HostCheck::isAddrWillcom() || $flag == $_HOSTCHKCONF['host_type']['iPhone'] && HostCheck::isAddrIPhone()) {
         return $ret;
     }
     return !$ret;
 }