📄 edit.php
字号:
<?
include_once 'inc/auth.php';
echo '
<html>
<head>
<title>允许访问IP规则编辑</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<script Language="JavaScript">
function CheckForm()
{
if(document.form1.BEGIN_IP.value=="")
{ alert("起始IP不能为空!");
return (false);
}
if(document.form1.END_IP.value=="")
{ alert("结束IP不能为空!");
return (false);
}
if(document.form1.TYPE.value=="")
{ alert("规则类型不能为空!");
return (false);
}
}
</script>
</head>
';
$query = 'SELECT * from IP_RULE where RULE_ID=' . $RULE_ID;
$connection = openconnection ();
$cursor = exequery ($connection, $query);
if ($ROW = mysql_fetch_array ($cursor))
{
++$RULE_COUNT;
$RULE_ID = $ROW['RULE_ID'];
$BEGIN_IP = $ROW['BEGIN_IP'];
$END_IP = $ROW['END_IP'];
$TYPE = $ROW['TYPE'];
if ($TYPE == 0)
{
$TYPE_DESC = 'OA登录规则';
}
else
{
if ($TYPE == 1)
{
$TYPE_DESC = '考勤限制规则';
}
}
}
echo '
<body class="bodycolor" topmargin="5" onload="document.form1.BEGIN_IP.focus();">
<table border="0" width="100%" cellspacing="0" cellpadding="3" class="small">
<tr>
<td class="Big"><img src="/images/edit.gif" WIDTH="22" HEIGHT="20" align="absmiddle"><span class="big3"> 允许访问IP规则编辑</span>
</td>
</tr>
</table>
<table border="0" cellspacing="1" width="450" class="small" bgcolor="#000000" cellpadding="3" align="center" >
<form action="update.php" method="post" name="form1" onsubmit="return CheckForm();">
<tr>
<td nowrap class="TableData">起始IP:</td>
<td nowrap class="TableData">
<input type="text" name="BEGIN_IP" class="BigInput" size="25" maxlength="25" value="';
echo $BEGIN_IP;
echo '"> (例如:192.168.0.10)
</td>
</tr>
<tr>
<td nowrap class="TableData">结束IP:</td>
<td nowrap class="TableData">
<input type="text" name="END_IP" class="BigInput" size="25" maxlength="25" value="';
echo $END_IP;
echo '"> (例如:192.168.0.10)
</td>
</tr>
<tr>
<td nowrap class="TableData">规则类型:</td>
<td nowrap class="TableData">
<select name="TYPE" class="BigSelect">
<option value="0" ';
if ($TYPE == 0)
{
echo 'selected';
}
echo '>OA登录规则</option>
<option value="1" ';
if ($TYPE == 1)
{
echo 'selected';
}
echo '>考勤限制规则</option>
</select>
</td>
</tr>
<tr>
<td nowrap class="TableControl" colspan="2" align="center">
<input type="hidden" value="';
echo $RULE_ID;
echo '" name="RULE_ID">
<input type="submit" value="确定" class="BigButton">
<input type="button" value="返回" class="BigButton" onclick="location=\'index.php\'">
</td>
</form>
</table>
</body>
</html>';
?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -