<?php
function check_intranet()
{
$clientIP=$_SERVER['REMOTE_ADDR'];
if(ip2long($clientIP)==ip2long('202.206.32.183') || ip2long($clientIP)==ip2long('192.168.253.67'))
return FALSE;
if(
(ip2long($clientIP)>=ip2long('10.0.0.1')&&ip2long($clientIP)<=ip2long('10.255.255.255')) ||(ip2long($clientIP)>=ip2long('192.168.0.1')&&ip2long($clientIP)<=ip2long('192.168.255.255'))
||(ip2long($clientIP)>=ip2long('172.16.0.1')&&ip2long($clientIP)<=ip2long('172.16.255.255'))
||(ip2long($clientIP)>=ip2long('202.206.32.1')&&ip2long($clientIP)<=ip2long('202.206.47.254'))
)
return TRUE;
else
return FALSE;
}
echo'<h3 class="service">网络服务</h3>';
echo '<table style="width:652px:" border="0" cellspacing="10" cellpadding="10">
<tbody>
<tr>';
echo' <td width="80" ><a target="_blank" href="http://mail.stdu.edu.cn">邮件服务</a></td>';
if(check_intranet())
echo'<td width="92" ><a target="_blank" href="http://info.stdu.edu.cn/">自助服务</a></td>
<td width="92" ><a target="_blank" href="http://gw.stdu.edu.cn/">网关计费</a></td>
<td width="92" ><a target="_blank" href="http://202.206.32.234/">在线视频</a></td>
<td width="92" ><a target="_blank" href="ftp://ftp.stdu.edu.cn/">FTP服务</a></td>
<td width="99" ><a target="_blank" href="http://metc.stdu.edu.cn/index.php/massage/81-2015-11-12-01-09-55">免流量资源</a></td>';
else
echo'<td width="125" ><a target="_blank" href="#" title="该网站仅限校园网访问">自助服务平台</a></td>
<td width="92" ><a target="_blank" href="#" title="该网站仅限校园网访问">网关计费</a></td>
<td width="92" ><a target="_blank" href="#" title="该网站仅限校园网访问">在线视频</a></td>
<td width="99" ><a target="_blank" href="http://metc.stdu.edu.cn/index.php/massage/81-2015-11-12-01-09-55"& gt;免流量资源</a></td>';
echo'</tr>
</tbody>
</table>';
echo'<h3 class="service">图书档案</h3>
<table width="240" border="0" cellpadding="10" cellspacing="10">
<tbody>
<tr>
<td width="88" ><a target="_blank" href="http://lib.stdu.edu.cn">图书馆</a></td>
<td width="215" ><a target="_blank" href="http://archives.stdu.edu.cn">档案馆</a></td>
</tr>
</tbody>
</table>';
echo ' <h3 class="service">一卡通服务</h3>
<table width="240" border="0" cellpadding="10" cellspacing="10">
<tbody>
<tr>';
if(check_intranet())
echo'<td width="177" ><a target="_blank" href="http://172.16.254.249/selfsearch/">校园卡查询</a></td>';
else
echo'<td width="177" ><a target="_blank" href="#" title="该网站仅限校园网访问">校园卡查询</a></td>';
echo'</tr>
</tbody>
</table>';
echo'</tr>
</tbody>
</table>'; ?>