本文整理汇总了PHP中CMS::ip方法的典型用法代码示例。如果您正苦于以下问题:PHP CMS::ip方法的具体用法?PHP CMS::ip怎么用?PHP CMS::ip使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CMS
的用法示例。
在下文中一共展示了CMS::ip方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: check_filters
static function check_filters()
{
if (!self::check_filter(self::$uri_filter, $_SERVER['REQUEST_URI'])) {
return false;
}
if (!self::check_filter(self::$host_filter, $_SERVER['HTTP_HOST'])) {
return false;
}
if (!self::check_filter(self::$ip_filter, CMS::ip())) {
return false;
}
return true;
}
示例2: getRowIp
public static function getRowIp($refer, $ip)
{
if ($refer != "unknown") {
return CMS::ip($refer, 1, 2);
}
// if ($ip != "")
// return "<br><a target=_blank href=\"?item=ip&qs=" . $ip . "\">через proxy</a>";
/*
$content = '';
if ($refer != "unknown")
$content .= "<a target=_blank href=\"?item=ip&qs=" . $refer . "\">" . $refer . "</a>"; else
$content .= "<font color=grey>неизвестно</font>";
if ($ip != "")
$content .= "<br><a target=_blank href=\"?item=ip&qs=" . $ip . "\">через proxy</a>";
return $content;*/
}
示例3:
?>
<div class="panel panel-default">
<div class="panel-heading">
<h4><?php
echo $this->title;
?>
</h4>
</div>
<div class="panel-body panel-body-static">
<ul class="list-unstyled">
<li>Тарифный план: <span class="label label-default"><?php
echo $package->value->shop[0]->plan;
?>
</span></li>
<li><i class="flaticon-email"></i> <?php
echo Yii::app()->user->getName() . ' ' . CMS::ip($ip);
?>
</li>
<li><i class="<?php
echo $browserIcon;
?>
"></i> <?php
echo $browser->getBrowser();
?>
(<?php
echo $browser->getVersion();
?>
)</li>
<li><i class="<?php
echo $platformIcon;
?>
示例4:
<li>
<?php
$ip = CMS::ip($data->ip_address);
$userName = !is_null($data->user) ? $data->user->login : Yii::t('core', 'CHECKUSER', 0);
?>
<a href="javascript:void(0)" class="exp subClosed">
<img width="36" src="<?php
echo $data->user_avatar;
?>
" alt="<?php
echo $userName;
?>
" />
<span class="contactName">
<strong><?php
echo $userName;
?>
</strong>
<i><?php
echo Yii::t('core', 'CHECKUSER', (int) $data->user_type);
?>
</i>
</span>
<span class="flag"><?php
if ($ip) {
echo $ip;
} else {
echo '<span class="icon-question" title="' . $data->ip_address . '"></span>';
}