set_age.php
来自「通达OA2007SE源代码 非常好的」· PHP 代码 · 共 112 行
PHP
112 行
<?
include_once 'inc/auth.php';
echo '<s';
echo 'cript>
function CheckForm()
{
if(document.form1.MAN_AGE.value=="" || document.form1.WOMEN_AGE.value=="")
{ alert("退休年龄不能空!!!");
return (false);
}
if(checknum(document.form1.MAN_AGE.value)=="0" || checknum(document.form1.WOMEN_AGE.value)=="0" )
{ alert("退休年龄必须数字!!!");
return (false);
}
return (true);
}
function checknum(p)
{
var l = p.length;
va';
echo 'r count=0;
for(var i=0; i<l; i++)
{
var digit = p.charAt(i);
if(digit == "." )
{
++count;
if(count>1)
{
return 0;
}
}
else if(digit < "0" || digit > "9")
{
return 0;
}
}
return 1;
}
</script>
<html>
<head>
<title>退休年龄设定</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<body class="bodycolor" topmargin="5">
<table bord';
echo 'er="0" width="100%" cellspacing="0" cellpadding="3" class="small">
<tr>
<td class="Big"><img src="/images/send.gif" align="absmiddle">';
echo '<s';
echo 'pan class="big3"> 退休年龄设定</span>
</td>
</tr>
</table>
<br>
<div align="center">
';
if (($OP == '1'))
{
$PARA_VALUE = (($MAN_AGE.',').$WOMEN_AGE);
$query = (((''.'update SYS_PARA set PARA_VALUE=\'').$PARA_VALUE).'\' where PARA_NAME=\'RETIRE_AGE\'');
exequery ($connection, $query);
$SAVE_FALG = '1';
}
$query = 'SELECT * from SYS_PARA where PARA_NAME=\'RETIRE_AGE\'';
$cursor = exequery ($connection, $query);
if ($ROW = mysql_fetch_array ($cursor))
{
$PARA_NAME = $ROW['PARA_NAME'];
$PARA_VALUE = $ROW['PARA_VALUE'];
}
$AGE_ARRAY = explode (',', $PARA_VALUE);
echo '
<table border="0" cellspacing="1" width="250" class="small" bgcolor="#000000" cellpadding="3" align="center" >
<form action="set_age.php" method="post" name="form1" onsubmit="return CheckForm();">
<tr>
<td nowrap class="TableContent">男: </td>
<td nowrap class="TableData">
<input type="text" name="MAN_AGE" class="BigInput" size="15" maxlength="100" value="';
echo $AGE_ARRAY[0];
echo '">
</td>
</tr>
<tr>
<td nowrap class="TableContent">女: </td>
<td nowrap class="TableData">
<input type="text" name="WOMEN_AGE" class="BigInput" size="15" maxlength="100" value="';
echo $AGE_ARRAY[1];
echo '">
</td>
</tr>
<tr>
<td nowrap class="TableControl" colspan="2" align="center">
<input type="submit" value="确定" class="BigButton" name="button">
<input type="button" value="关闭" class="BigButton" onclick="window.close();">
<input type="hidden" value="1" name="OP">
</td>
</tr>
</form>
</table>
';
if (($SAVE_FALG == '1'))
{
echo '<br>设置成功!';
}
echo '</div>
</body>
</html>
';
?>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?