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


PHP ip2area函数代码示例

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


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

示例1: ip2area

    echo $moduleid;
    ?>
&file=<?php 
    echo $file;
    ?>
&action=<?php 
    echo $action;
    ?>
&ip=<?php 
    echo $v['ip'];
    ?>
"><?php 
    echo $v['ip'];
    ?>
</a> <span class="f_dblue">来自:<?php 
    echo ip2area($v['ip']);
    ?>
</span></div>

<?php 
    if ($v['linkurl']) {
        ?>
<div class="b5 c_b"> </div>
<div>参考资料:<a href="<?php 
        echo $EXT['linkurl'];
        ?>
redirect.php?url=<?php 
        echo urlencode($v['linkurl']);
        ?>
" target="_blank"><?php 
        echo $v['linkurl'];
开发者ID:hcd2008,项目名称:destoon,代码行数:31,代码来源:answer.tpl.php

示例2: ip2area

}
?>
<tr>
<td class="tl">申请时间</td>
<td><?php 
echo $item['addtime'];
?>
</td>
</tr>
<tr>
<td class="tl">申请IP</td>
<td><?php 
echo $item['ip'];
?>
 来自 <?php 
echo ip2area($item['ip']);
?>
</td>
</tr>
<tr class="on">
<td class="tl">受理结果</td>
<td><?php 
echo $_status[$item['status']];
?>
</td>
</tr>
<tr>
<td class="tl">原因及备注</td>
<td><?php 
echo $item['note'];
?>
开发者ID:hcd2008,项目名称:destoon,代码行数:31,代码来源:cash_show.tpl.php

示例3: ip2area

"><img src="admin/image/tips_update.gif" width="32" height="32" align="absmiddle"/>&nbsp;&nbsp; <span class="f_red">您的当前软件版本有新的更新,请注意升级</span>&nbsp;&nbsp;最新版本:V<span id="last_v"><?php 
echo DT_VERSION;
?>
</span> 更新时间:<span id="last_r"><?php 
echo DT_RELEASE;
?>
</span>&nbsp;&nbsp;
<input type="button" value="检查更新" class="btn" onclick="Go('?file=cloud&action=update');"/></div></td>
</tr>
</table>
</div>
<div class="tt"><span class="f_r">IP:<?php 
echo $user['loginip'];
?>
 <?php 
echo ip2area($user['loginip']);
?>
&nbsp;&nbsp;</span>欢迎管理员,<?php 
echo $_username;
?>
</div>
<table cellpadding="2" cellspacing="1" class="tb">
<tr>
<td class="tl">管理级别</td>
<td width="30%">&nbsp;<?php 
echo $_admin == 1 ? $CFG['founderid'] == $_userid ? '网站创始人' : '超级管理员' : ($_aid ? '<span class="f_blue">' . $AREA[$_aid]['areaname'] . '站</span>管理员' : '普通管理员');
?>
</td>
<td class="tl">登录次数</td>
<td width="30%">&nbsp;<?php 
echo $user['logintimes'];
开发者ID:hiproz,项目名称:zhaotaoci.cc,代码行数:31,代码来源:main.tpl.php

示例4: ip2area

</td>
<td class="px11"><a href="?moduleid=<?php 
    echo $moduleid;
    ?>
&file=<?php 
    echo $file;
    ?>
&ip=<?php 
    echo $v['loginip'];
    ?>
"><?php 
    echo $v['loginip'];
    ?>
</a></td>
<td><?php 
    echo ip2area($v['loginip']);
    ?>
</td>
<td title="<?php 
    echo $v['agent'];
    ?>
"><input type="text" value="<?php 
    echo $v['agent'];
    ?>
" size="20" onmouseover="this.select();"/></td>
</tr>
<?php 
}
?>
</table>
<div class="tt">密码工具</div>
开发者ID:hcd2008,项目名称:destoon,代码行数:31,代码来源:loginlog.tpl.php

示例5: ip2area

echo $username ? $username : 'Guest';
?>
</a> <input type="checkbox" name="post[hidden]" value="1" <?php 
if ($hidden) {
    echo 'checked';
}
?>
/> 匿名评论</td>
</tr>
<tr>
<td class="tl"><span class="f_hid">*</span> IP</td>
<td><?php 
echo $ip;
?>
 - <?php 
echo ip2area($ip);
?>
 </td>
</tr>
<tr>
<td class="tl"><span class="f_hid">*</span> 评论原文</td>
<td><a href="<?php 
echo $EXT['linkurl'];
?>
redirect.php?mid=<?php 
echo $item_mid;
?>
&itemid=<?php 
echo $item_id;
?>
" target="_blank" class="t"><?php 
开发者ID:hcd2008,项目名称:destoon,代码行数:31,代码来源:comment_edit.tpl.php

示例6: ip2area

        ?>
')"><?php 
        echo $v['fromuser'];
        ?>
</a>
<?php 
    } else {
        ?>
<a href="javascript:_ip('<?php 
        echo $v['fromuser'];
        ?>
')" title="IP:<?php 
        echo $v['fromuser'];
        ?>
 - <?php 
        echo ip2area($v['fromuser']);
        ?>
"><span class="f_gray">游客</span></a>
<?php 
    }
    ?>
</td>
<td class="px11"><?php 
    echo $v['fnew'];
    ?>
</td>
<td class="px11"><?php 
    echo timetodate($v['freadtime'], 6);
    ?>
</td>
<td><img src="<?php 
开发者ID:hiproz,项目名称:zhaotaoci.cc,代码行数:31,代码来源:chat.tpl.php

示例7: ip2area

echo ip2area($loginip);
?>
</td>
</tr>
<tr>
<td class="tl">注册时间</td>
<td>&nbsp;<?php 
echo timetodate($regtime, 6);
?>
</td>
<td class="tl">注册IP</td>
<td>&nbsp;<?php 
echo $regip;
?>
 - <?php 
echo ip2area($regip);
?>
</td>
</tr>
<tr>
<td class="tl"><?php 
echo $DT['money_name'];
?>
余额</td>
<td>&nbsp;<a href="javascript:Dwidget('?moduleid=<?php 
echo $moduleid;
?>
&file=record&username=<?php 
echo $username;
?>
', '<?php 
开发者ID:hiproz,项目名称:zhaotaoci.cc,代码行数:31,代码来源:member_show.tpl.php

示例8: Copyright

/*
	[Destoon B2B System] Copyright (c) 2008-2015 www.destoon.com
	This is NOT a freeware, use is subject to license.txt
*/
require '../common.inc.php';
$DT['city'] or dheader(DT_PATH);
if ($DT_BOT) {
    dhttp(403);
}
if ($action == 'go') {
    if (isset($auto)) {
        if ($DT['city_ip']) {
            set_cookie('city', '');
        } else {
            $iparea = ip2area($DT_IP);
            $result = $db->query("SELECT * FROM {$DT_PRE}city");
            while ($r = $db->fetch_array($result)) {
                if (preg_match("/" . $r['name'] . ($r['iparea'] ? '|' . $r['iparea'] : '') . "/i", $iparea)) {
                    if ($r['domain']) {
                        dheader($r['domain']);
                    } else {
                        set_cookie('city', $r['areaid'] . '|' . $r['domain'], $DT_TIME + 30 * 86400);
                    }
                    break;
                }
            }
        }
        dheader(DT_PATH);
    }
    $areaid = isset($areaid) ? intval($areaid) : 0;
开发者ID:hiproz,项目名称:zhaotaoci.cc,代码行数:30,代码来源:city.php

示例9: ip2area

?>
"></a>
<table cellpadding="5" cellspacing="1" class="tb">
<tr>
<td class="tl">回复会员</td>
<td><a href="javascript:_user('<?php 
echo $R['username'];
?>
');" class="t"><?php 
echo $R['username'] ? $R['username'] : 'Guest';
?>
</a>&nbsp; IP:<?php 
echo $R['ip'];
?>
 来自 <?php 
echo ip2area($R['ip']);
?>
</td>
</tr>
<tr>
<td class="tl">回复时间</td>
<td><?php 
echo timetodate($R['addtime']);
?>
</td>
</tr>
<?php 
foreach ($Q as $k => $v) {
    ?>
<tr>
<td class="tl"><?php 
开发者ID:hiproz,项目名称:zhaotaoci.cc,代码行数:31,代码来源:form_answer_show.tpl.php

示例10: defined

	This is NOT a freeware, use is subject to license.txt
*/
defined('DT_ADMIN') or exit('Access Denied');
$DT_LICENSE = md5(file_get(DT_ROOT . '/license.txt'));
if ($DT_LICENSE != '5bdef29340ffdbe22c937e38b42292aa' && $DT_LICENSE != '8afcc73ad7d0cd6019899812cc2998a3') {
    msg('网站根目录license.txt不允许修改或删除,请检查');
}
if (!$forward) {
    $forward = '?';
}
if ($_destoon_admin && $_userid && $_destoon_admin == $_userid) {
    dheader($forward);
}
if ($DT['admin_area']) {
    $AA = explode("|", trim($DT['admin_area']));
    $A = ip2area($DT_IP);
    $pass = false;
    foreach ($AA as $v) {
        if (strpos($A, $v) !== false) {
            $pass = true;
            break;
        }
    }
    if (!$pass) {
        dalert('未被允许的地区', $MODULE[2]['linkurl'] . 'logout.php?forward=' . urlencode(DT_PATH));
    }
}
if ($DT['admin_ip']) {
    $IP = explode("|", trim($DT['admin_ip']));
    $pass = false;
    foreach ($IP as $v) {
开发者ID:hiproz,项目名称:zhaotaoci.cc,代码行数:31,代码来源:login.inc.php

示例11: ip2area

        ?>
')"><?php 
        echo $v['name'];
        ?>
</a>
<?php 
    } else {
        ?>
<a href="javascript:_ip('<?php 
        echo $v['name'];
        ?>
')" title="IP:<?php 
        echo $v['name'];
        ?>
 - <?php 
        echo ip2area($v['name']);
        ?>
"><span class="f_gray">游客</span></a>
<?php 
    }
    ?>
</td>
<td class="px11"><?php 
    echo $v['date'];
    ?>
</td>
<td style="padding:10px;text-align:left;line-height:180%;"><?php 
    echo $v['word'];
    ?>
</td>
</tr>
开发者ID:hiproz,项目名称:zhaotaoci.cc,代码行数:31,代码来源:chat_view.tpl.php

示例12: while

 //收到的对话
 $result = $db->query("SELECT * FROM {$table} WHERE touser='{$_username}' ORDER BY tgettime DESC LIMIT 50");
 while ($r = $db->fetch_array($result)) {
     if ($i > 50) {
         $db->query("DELETE FROM {$DT_PRE}chat WHERE chatid='{$r['chatid']}'");
         continue;
     }
     if (check_name($r['fromuser'])) {
         $m = userinfo($r['fromuser']);
         $r['linkurl'] = $m['linkurl'];
         $r['from'] = $m['company'];
         $r['truename'] = $m['truename'];
         $r['online'] = online($m['userid']);
     } else {
         $r['linkurl'] = '';
         $r['from'] = ip2area($r['fromuser']);
         $r['truename'] = '<span class="f_gray">游客</span>';
         $r['online'] = 1;
     }
     $r['gettime'] = $r['tgettime'] ? timetodate($r['tgettime'], 5) : '--';
     $r['new'] = 0;
     if ($r['tgettime'] > $r['treadtime']) {
         $r['new'] = 1;
         $chats++;
     }
     if ($DT_TIME - $r['freadtime'] > $MOD['chat_poll'] * 3) {
         $r['line'] = '<span class="f_gray"></span>';
         //等待中
     } else {
         $r['line'] = '<span class="f_blue">对话中</span>';
     }
开发者ID:hcd2008,项目名称:destoon,代码行数:31,代码来源:chat.inc.php

示例13: while

     $result = $db->query("SELECT * FROM {$DT_PRE}finance_pay WHERE {$condition} ORDER BY pid DESC LIMIT {$offset},{$pagesize}");
     $fee = 0;
     while ($r = $db->fetch_array($result)) {
         $r['paytime'] = timetodate($r['paytime'], 5);
         $fee += $r['fee'];
         $lists[] = $r;
     }
     $head_title = $L['record_title_pay'];
     break;
 case 'login':
     $DT['login_log'] == 2 or dheader($MOD['linkurl']);
     $lists = array();
     $result = $db->query("SELECT * FROM {$DT_PRE}login WHERE {$condition} ORDER BY logid DESC LIMIT 0,15");
     while ($r = $db->fetch_array($result)) {
         $r['logintime'] = timetodate($r['logintime'], 5);
         $r['area'] = ip2area($r['loginip']);
         $lists[] = $r;
     }
     $head_title = $L['record_title_login'];
     break;
 default:
     $BANKS = explode('|', trim($MOD['pay_banks']));
     $sfields = $L['record_sfields'];
     $dfields = array('reason', 'amount', 'bank', 'reason', 'note');
     isset($fields) && isset($dfields[$fields]) or $fields = 0;
     isset($fromtime) or $fromtime = '';
     isset($totime) or $totime = '';
     isset($type) or $type = 0;
     $fields_select = dselect($sfields, 'fields', '', $fields);
     if ($keyword) {
         $condition .= " AND {$dfields[$fields]} LIKE '%{$keyword}%'";
开发者ID:hiproz,项目名称:zhaotaoci.cc,代码行数:31,代码来源:record.inc.php


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