?? ip_manage.php
字號:
<?php include admintpl('header'); ?>
<?php echo $menu; ?>
<form name="formip" method="post" action="?mod=<?php echo $mod; ?>&file=<?php echo $file; ?>&action=add&submit=1" >
<table border="0" align="center" cellpadding="1" cellspacing="1" class="tableborder">
<tr>
<th colspan="2">添加禁止IP</th>
</tr>
<tr>
<td height="30" align="center" valign="middle" class="tablerow">禁止此IP地址:
<input name="userip" type="text" value="<?php echo $ip; ?>" size="20" maxlength="15" />
有效期:
<input name="day" type="text" value="<?php if($day) echo $day; else echo 10; ?>" size="5" maxlength="5" /> 天
<select name="selectdays" id="selectdays" onchange="day.value=this.value;">
<?php
foreach(range(1,30) as $number)
{
echo '<option value="'.$number.'"';
if($day==$number) echo ' selected="selected" ';
echo '>'.$number.'天</option>';
}
?></select></td>
<td class="tablerow">
<input name="submit" type="submit" value=" 添 加 " />
(禁止ip段請使用123.34.*.* 這種形式)</td>
</tr>
</table>
</form>
<br />
<?php
if($userips)
{
?>
<form name="myform" method="post" >
<table align="center" cellpadding="2" cellspacing="1" class="tableborder">
<tr>
<th colspan="9">IP列表管理</th>
</tr>
<tr align="center">
<td class="tablerowhighlight">選中</td>
<td class="tablerowhighlight">序號</td>
<td class="tablerowhighlight">IP</td>
<td class="tablerowhighlight">狀態</td>
<td class="tablerowhighlight">過期時間</td>
<td class="tablerowhighlight">地理位置</td>
<td class="tablerowhighlight">操作者</td>
<td class="tablerowhighlight">管理操作</td>
</tr>
<?php
foreach($userips as $id=>$userip)
{
?>
<tr align="left" onmouseout="this.style.backgroundColor='#F1F3F5'" onmouseover="this.style.backgroundColor='#BFDFFF'" bgColor='#F1F3F5'>
<td align="center">
<input type="checkbox" name="ipid[]" id="ipid<?php echo $userip['id']; ?>" value="<?php echo $userip['id']; ?>" /></td>
<td align="center" onMouseDown="document.getElementById('ipid<?php echo $userip['id']; ?>').checked = (document.getElementById('ipid<?php echo $userip['id']; ?>').checked ? false : true);"><?php echo $userip['id']; ?></td>
<td align="center" onMouseDown="document.getElementById('ipid<?php echo $userip['id']; ?>').checked = (document.getElementById('ipid<?php echo $userip['id']; ?>').checked ? false : true);">
<?php echo $userip['ip']; ?></td>
<td align="center" onMouseDown="document.getElementById('ipid<?php echo $userip['id']; ?>').checked = (document.getElementById('ipid<?php echo $userip['id']; ?>').checked ? false : true);" >
<?php if($userip['ifban']=='0') { ?><font color="green">允許</font><?php }else{ ?><font color="red">禁止</font><?php } ?></td>
<td align="center" onMouseDown="document.getElementById('ipid<?php echo $userip['id']; ?>').checked = (document.getElementById('ipid<?php echo $userip['id']; ?>').checked ? false : true);" ><?php echo $userip['overtime']; ?></td>
<td align="left" onMouseDown="document.getElementById('ipid<?php echo $userip['id']; ?>').checked = (document.getElementById('ipid<?php echo $userip['id']; ?>').checked ? false : true);">
<?php echo $userip['location']; ?></td>
<td align="center" onMouseDown="document.getElementById('ipid<?php echo $userip['id']; ?>').checked = (document.getElementById('ipid<?php echo $userip['id']; ?>').checked ? false : true);">
<a href='<?=PHPCMS_PATH?>member/member.php?username=<?=$userip['username']?>' target='_blank'><?php echo $userip['username']; ?></a></td>
<td align="center" onMouseDown="document.getElementById('ipid<?php echo $userip['id']; ?>').checked = (document.getElementById('ipid<?php echo $userip['id']; ?>').checked ? false : true);">
<?php if($userip['ifban']=='0'){ ?><a href="?mod=<?php echo $mod; ?>&file=<?php echo $file; ?>&action=banip&ifban=1&ipid=<?php echo $userip['id']; ?>" title="<?php $medicine['uip']?>">禁止訪問</a> | <?php }else{ ?><a href="?mod=<?php echo $mod; ?>&file=<?php echo $file; ?>&action=banip&ifban=0&ipid=<?php echo $userip['id']; ?>" title="<?php $userip['ip']; ?>">允許訪問</a> |<?php } ?> <a href="?mod=<?php echo $mod; ?>&file=<?php echo $file; ?>&action=delete&ipid=<?php echo $userip['id']; ?>" >刪除此記錄</a></td>
</tr>
<?php } ?>
</table>
<?php
} else { ?>
<center>
<strong>暫無信息</strong>
</center>
<?php } ?>
<?php
if($userips)
{
?>
<table width="100%" height="25" border="0" cellpadding="0" cellspacing="0">
<tr>
<td>
<input name='chkall' title="全部選中" type='checkbox' id='chkall' onclick='checkall(this.form)' value='checkbox' />
全選/不選
<input name="delall" type="submit" id="delall" onClick="document.myform.action='?mod=<?php echo $mod; ?>&file=<?php echo $file; ?>&action=delete'" value=" 刪 除 " /></td>
</tr>
</table>
</form>
<?php
}
?>
<div align="center">
<?php if($number>$pagesize) echo $pages; ?>
</div>
<br />
<table align="center" cellpadding="2" cellspacing="1" class="tableborder">
<tr>
<th colspan="1">搜索IP</th>
</tr>
<td class="tablerow" align="center">
搜索IP:<input type="text" name="sip" maxlength="15" id="sip" value="<?php if($sip) echo $sip; ?>" />
操作者:<input type="text" name="username" maxlength="15" id="username" value="<?php if($username) echo $username; ?>" />
<input type="submit" name="submit" value=" 搜 索 " onclick="self.location.href='?mod=<?php echo $mod; ?>&file=<?php echo $file; ?>&action=manage&sip='+ sip.value + '&username=' +username.value;"/>
</td>
</table>
</body>
</html>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -