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


PHP ipbanned函数代码示例

本文整理汇总了PHP中ipbanned函数的典型用法代码示例。如果您正苦于以下问题:PHP ipbanned函数的具体用法?PHP ipbanned怎么用?PHP ipbanned使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: array_merge

            $_DSESSION = array_merge($_DSESSION, $db->fetch_first("SELECT {$membertablefields}\r\n\t\t\t\tFROM {$tablepre}members m WHERE uid='{$_DSESSION['sessionuid']}'"));
        }
    } else {
        if ($_DSESSION = $db->fetch_first("SELECT sid, groupid, groupid='6' AS ipbanned, pageviews AS spageviews, styleid, lastolupdate, seccode\r\n\t\t\tFROM {$tablepre}sessions WHERE sid='{$sid}' AND CONCAT_WS('.',ip1,ip2,ip3,ip4)='{$onlineip}'")) {
            clearcookies();
            $sessionexists = 1;
        }
    }
}
if (!$sessionexists) {
    if ($discuz_uid) {
        if (!($_DSESSION = $db->fetch_first("SELECT {$membertablefields}, m.styleid\r\n\t\t\tFROM {$tablepre}members m WHERE m.uid='{$discuz_uid}' AND m.password='{$discuz_pw}' AND m.secques='{$discuz_secques}'"))) {
            clearcookies();
        }
    }
    if (ipbanned($onlineip)) {
        $_DSESSION['ipbanned'] = 1;
    }
    $_DSESSION['sid'] = random(6);
    $_DSESSION['seccode'] = random(6, 1);
}
$_DSESSION['dateformat'] = empty($_DSESSION['dateformat']) || empty($_DCACHE['settings']['userdateformat'][$_DSESSION['dateformat'] - 1]) ? $_DCACHE['settings']['dateformat'] : $_DCACHE['settings']['userdateformat'][$_DSESSION['dateformat'] - 1];
$_DSESSION['timeformat'] = empty($_DSESSION['timeformat']) ? $_DCACHE['settings']['timeformat'] : ($_DSESSION['timeformat'] == 1 ? 'h:i A' : 'H:i');
$_DSESSION['timeoffset'] = isset($_DSESSION['timeoffset']) && $_DSESSION['timeoffset'] != 9999 ? $_DSESSION['timeoffset'] : $_DCACHE['settings']['timeoffset'];
$membertablefields = '';
@extract($_DSESSION);
$newpm = $prompt & 1;
$doingtask = $prompt & 2 ? 1 : 0;
$lastvisit = empty($lastvisit) ? $timestamp - 86400 : $lastvisit;
$timenow = array('time' => gmdate("{$dateformat} {$timeformat}", $timestamp + 3600 * $timeoffset), 'offset' => $timeoffset >= 0 ? $timeoffset == 0 ? '' : '+' . $timeoffset : $timeoffset);
if (PHP_VERSION > '5.1') {
开发者ID:xiaoxiaoleo,项目名称:ngintek,代码行数:31,代码来源:common.inc.php

示例2: checkclose

function checkclose()
{
    global $_SGLOBAL, $_SCONFIG;
    //站点关闭
    if ($_SCONFIG['close'] && !ckfounder($_SGLOBAL['supe_uid']) && !checkperm('closeignore')) {
        if (empty($_SCONFIG['closereason'])) {
            showmessage('site_temporarily_closed');
        } else {
            showmessage($_SCONFIG['closereason']);
        }
    }
    //IP访问检查
    if ((!ipaccess($_SCONFIG['ipaccess']) || ipbanned($_SCONFIG['ipbanned'])) && !ckfounder($_SGLOBAL['supe_uid']) && !checkperm('closeignore')) {
        showmessage('ip_is_not_allowed_to_visit');
    }
}
开发者ID:NaturalWill,项目名称:UCQA,代码行数:16,代码来源:function_common.php

示例3: _init_session

 function _init_session()
 {
     $this->session = new discuz_session();
     if ($this->init_session) {
         $this->session->init($this->var['cookie']['sid'], $this->var['clientip'], $this->var['uid']);
         $this->var['sid'] = $this->session->sid;
         $this->var['session'] = $this->session->var;
         if ($this->var['sid'] != $this->var['cookie']['sid']) {
             dsetcookie('sid', $this->var['sid'], 86400);
         }
         if ($this->session->isnew) {
             if (ipbanned($this->var['clientip'])) {
                 $this->session->set('groupid', 6);
             }
         }
         if ($this->session->get('groupid') == 6) {
             $this->var['member']['groupid'] = 6;
             sysmessage('user_banned');
         }
         if ($this->var['uid'] && ($this->session->isnew || $this->session->get('lastactivity') + 600 < TIMESTAMP)) {
             $this->session->set('lastactivity', TIMESTAMP);
             if ($this->session->isnew) {
                 DB::update('common_member_status', array('lastip' => $this->var['clientip'], 'lastvisit' => TIMESTAMP), "uid='" . $this->var['uid'] . "'");
             }
         }
     }
 }
开发者ID:dalinhuang,项目名称:hlwbbsvincent,代码行数:27,代码来源:class_core.php

示例4: CONCAT_WS

			FROM {$tablepre}sessions WHERE sid='$sid' AND CONCAT_WS('.',ip1,ip2,ip3,ip4)='$onlineip'")) {
			clearcookies();
			$sessionexists = 1;
		}
	}
}

if(!$sessionexists) {
	if($discuz_uid) {
		if(!($_DSESSION = $db->fetch_first("SELECT $membertablefields, m.styleid
			FROM {$tablepre}members m WHERE m.uid='$discuz_uid' AND m.password='$discuz_pw' AND m.secques='$discuz_secques'"))) {
			clearcookies();
		}
	}

	if(ipbanned($onlineip)) $_DSESSION['ipbanned'] = 1;

	$_DSESSION['sid'] = random(6);
	$_DSESSION['seccode'] = random(6, 1);
}

$_DSESSION['dateformat'] = empty($_DSESSION['dateformat']) || empty($_DCACHE['settings']['userdateformat'][$_DSESSION['dateformat'] -1])? $_DCACHE['settings']['dateformat'] : $_DCACHE['settings']['userdateformat'][$_DSESSION['dateformat'] -1];
$_DSESSION['timeformat'] = empty($_DSESSION['timeformat']) ? $_DCACHE['settings']['timeformat'] : ($_DSESSION['timeformat'] == 1 ? 'h:i A' : 'H:i');
$_DSESSION['timeoffset'] = isset($_DSESSION['timeoffset']) && $_DSESSION['timeoffset'] != 9999 ? $_DSESSION['timeoffset'] : $_DCACHE['settings']['timeoffset'];

$membertablefields = '';
@extract($_DSESSION);

$disableprompt = !empty($_DCOOKIE['disableprompt']) ? explode('|', $_DCOOKIE['disableprompt']) : array();

if($prompt) {
开发者ID:BGCX262,项目名称:zyyhong-svn-to-git,代码行数:31,代码来源:common.inc.php

示例5: _init_session

 private function _init_session()
 {
     $sessionclose = !empty($this->var['setting']['sessionclose']);
     $this->session = $sessionclose ? new dzz_session_close() : new dzz_session();
     if ($this->init_session) {
         $this->session->init($this->var['cookie']['sid'], $this->var['clientip'], $this->var['uid']);
         $this->var['sid'] = $this->session->sid;
         $this->var['session'] = $this->session->var;
         if (!empty($this->var['sid']) && $this->var['sid'] != $this->var['cookie']['sid']) {
             dsetcookie('sid', $this->var['sid'], 86400);
         }
         if ($this->session->isnew) {
             if (ipbanned($this->var['clientip'])) {
                 $this->session->set('groupid', 6);
             }
         }
         if ($this->session->get('groupid') == 6) {
             $this->var['member']['groupid'] = 6;
             sysmessage('user_banned');
         }
         if ($this->var['uid'] && !$sessionclose && ($this->session->isnew || $this->session->get('lastactivity') + 600 < TIMESTAMP)) {
             $this->session->set('lastactivity', TIMESTAMP);
             if ($this->session->isnew) {
                 if ($this->var['member']['lastip'] && $this->var['member']['lastvisit']) {
                     dsetcookie('lip', $this->var['member']['lastip'] . ',' . $this->var['member']['lastvisit']);
                 }
                 C::t('user_status')->update($this->var['uid'], array('lastip' => $this->var['clientip'], 'lastvisit' => TIMESTAMP));
             }
         }
     }
 }
开发者ID:druphliu,项目名称:dzzoffice,代码行数:31,代码来源:dzz_app.php

示例6: _init_session

 private function _init_session()
 {
     $sessionclose = !empty($this->var['setting']['sessionclose']);
     $this->session = $sessionclose ? new discuz_session_close() : new discuz_session();
     if ($this->init_session) {
         $this->session->init($this->var['cookie']['sid'], $this->var['clientip'], $this->var['uid']);
         $this->var['sid'] = $this->session->sid;
         $this->var['session'] = $this->session->var;
         if (!empty($this->var['sid']) && $this->var['sid'] != $this->var['cookie']['sid']) {
             dsetcookie('sid', $this->var['sid'], 86400);
         }
         if ($this->session->isnew) {
             if (ipbanned($this->var['clientip'])) {
                 $this->session->set('groupid', 6);
             }
         }
         if ($this->session->get('groupid') == 6) {
             $this->var['member']['groupid'] = 6;
             if (!defined('IN_MOBILE_API')) {
                 sysmessage('user_banned');
             } else {
                 mobile_core::result(array('error' => 'user_banned'));
             }
         }
         if ($this->var['uid'] && !$sessionclose && ($this->session->isnew || $this->session->get('lastactivity') + 600 < TIMESTAMP)) {
             $this->session->set('lastactivity', TIMESTAMP);
             if ($this->session->isnew) {
                 if ($this->var['member']['lastip'] && $this->var['member']['lastvisit']) {
                     dsetcookie('lip', $this->var['member']['lastip'] . ',' . $this->var['member']['lastvisit']);
                 }
                 C::t('common_member_status')->update($this->var['uid'], array('lastip' => $this->var['clientip'], 'port' => $this->var['remoteport'], 'lastvisit' => TIMESTAMP));
             }
         }
     }
 }
开发者ID:deepziyu,项目名称:JX3PVE,代码行数:35,代码来源:discuz_application.php

示例7: exit

    exit('Access Denied');
}
// Check Permissions
if (!checkperm('manageip')) {
    cpmessage('no_authority_management_operation');
}
if (submitcheck('thevaluesubmit')) {
    $setarr = array();
    //ip permission check
    $_POST['config']['ipaccess'] = trim(preg_replace("/(\\s*(\r\n|\n\r|\n|\r)\\s*)/", "\r\n", $_POST['config']['ipaccess']));
    if (!ipaccess($_POST['config']['ipaccess'])) {
        cpmessage('ip_is_not_allowed_to_visit_the_area', '', 1, array($_SGLOBAL[onlineip]));
    }
    //ip½ûÖ¹
    $_POST['config']['ipbanned'] = saddslashes(trim(preg_replace("/(\\s*(\r\n|\n\r|\n|\r)\\s*)/", "\r\n", $_POST['config']['ipbanned'])));
    if (ipbanned($_POST['config']['ipbanned'])) {
        cpmessage('the_prohibition_of_the_visit_within_the_framework_of_ip', '', 1, array($_SGLOBAL[onlineip]));
    }
    foreach ($_POST['config'] as $var => $value) {
        $value = trim($value);
        if (!isset($_SCONFIG[$var]) || $_SCONFIG[$var] != $value) {
            $setarr[] = "('{$var}', '{$value}')";
        }
    }
    if ($setarr) {
        $_SGLOBAL['db']->query("REPLACE INTO " . tname('config') . " (var, datavalue) VALUES " . implode(',', $setarr));
    }
    // Update Cache
    include_once S_ROOT . './source/function_cache.php';
    config_cache();
    cpmessage('do_success', 'admincp.php?ac=ip');
开发者ID:v998,项目名称:discuzx-en,代码行数:31,代码来源:admincp_ip.php


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