📄 security_main.inc
字号:
<?PHP
/*
* Justin Osterholt
* 11/26/05
* Email blocking feature added
*/
?>
<fieldset>
<legend>Email Security</legend>
<table>
<form name='blockEmail' method='POST' action='?page=security&op=addEmail'>
<tr>
<td>Email Address:</td><td><input type='text' name='email'/> (example: domain.com)</td>
</tr>
<tr>
<td colspan='2'><input type='submit' name='confirm' value='Add Email'/></td>
</tr>
</form>
</table>
</fieldset>
<fieldset>
<legend>Blocked Email List</legend>
<table width='100%' cellspacing='0' cellpadding='5' border='0'>
<?
$colMax = 4;
$colCount = -1;
echo "<tr class='row1'>";
$rowNum = 2;
for($i=0;$i < count($emails);$i++) {
$colCount++;
echo "\t<td width='60'>{$emails[$i]['email']}</td><td align='left'><a href='?page=security&op=delEmail&id={$emails[$i]['emailID']}'>[Delete]</a></td>\n";
if($colCount == $colMax) {
$colCount = -1;
echo "</tr>\n<tr class='row{$rowNum}'>\n";
switch($rowNum) {
case '1':
$rowNum = 2;
break;
case '2':
$rowNum = 1;
break;
}
}
}
if($colCount != $colMax) {
for($i = $colCount;$i < $colMax;$i++) {
echo "\t<td> </td><td> </td>\n";
}
echo "</tr>\n";
}
?>
</table>
</fieldset>
<fieldset>
<legend>IP Security</legend>
<table>
<form name='blockIP' method='POST' action='?page=security&op=addIP'>
<tr>
<td>Single IP:</td><td><input type='text' name='ipSingle'/></td>
</tr>
<tr>
<td>IP Range:</td><td><input type='text' name='ipMultiStart'/>-<input type='text' name='ipMultiStop'/></td>
</tr>
<tr>
<td colspan='2'><input type='submit' name='confirm' value='Add IP'/></td>
</tr>
</form>
</table>
</fieldset>
<fieldset>
<legend>Blocked IP List</legend>
<table width='100%' cellspacing='0' cellpadding='5' border='0'>
<?
$colMax = 4;
$colCount = -1;
echo "<tr class='row1'>";
$rowNum = 2;
for($i=0;$i < count($blockedIPs);$i++) {
$colCount++;
$IP = long2ip($blockedIPs[$i]['IP']);
echo "\t<td width='60'>$IP</td><td align='left'><a href='?page=security&op=delIP&IP=$IP'>[Delete]</a></td>\n";
if($colCount == $colMax) {
$colCount = -1;
echo "</tr>\n<tr class='row{$rowNum}'>\n";
switch($rowNum) {
case '1':
$rowNum = 2;
break;
case '2':
$rowNum = 1;
break;
}
}
}
if($colCount != $colMax) {
for($i = $colCount;$i < $colMax;$i++) {
echo "\t<td> </td><td> </td>\n";
}
echo "</tr>\n";
}
?>
</table>
</fieldset>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -