submit.php
来自「极限网络智能办公系统 Office Automation V3.0官方100%源」· PHP 代码 · 共 100 行
PHP
100 行
<?
include_once("inc/auth.php");
include_once("inc/check_type.php");
include_once("fun_compute.php");
?>
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<body class="bodycolor" topmargin="5">
<?
//-- 合法性检验 --
for($I=1;$I<=$ITEM_COUNT;$I++)
{
$STR="S".$I;
$STR1="S".$I."_NAME";
if($$STR!="")
if(!is_number($$STR) && !is_money($$STR) )
{
Message("错误","输入的 ".$$STR1." 金额格式不对,应形如 123 或 123.45");
$URL="sal_data.php?RECALL=1&FLOW_ID=$FLOW_ID&USER_ID=$USER_ID&USER_NAME=$USER_NAME&OPERATION=$OPERATION";
for($I=1;$I<=$ITEM_COUNT;$I++)
{
$STR="S".$I;
$URL.="&".$STR."=".$$STR;
}
?>
<br>
<div align="center">
<input type="button" value="返回" class="BigButton" name="button" onClick="location='<?=$URL?>'">
</div>
<?
exit;
}
}
//-- 保存 --
$connection=OpenConnection();
if($OPERATION==1)
{
$query="insert into SAL_DATA(FLOW_ID,USER_ID";
for($I=1;$I<=$ITEM_COUNT;$I++)
$query.=",S".$I;
$query.=") values ($FLOW_ID,'$USER_ID',";
for($I=1;$I<=$ITEM_COUNT;$I++)
{
$STR="S".$I;
if($$STR=="")
$$STR="0";
$query.=$$STR;
if($I!=$ITEM_COUNT)
$query.=",";
}
$query.=")";
}
else
{
$query="update SAL_DATA set ";
for($I=1;$I<=$ITEM_COUNT;$I++)
{
$STR="S".$I;
if($$STR=="")
$$STR="0";
$query.=$STR."=".$$STR;
if($I!=$ITEM_COUNT)
$query.=",";
}
$query.=" where FLOW_ID=$FLOW_ID and USER_ID='$USER_ID'";
}
exequery($connection,$query);
Message("提示","员工 ".$USER_NAME." 的工资数据已上报<br><br>请继续选择其他员工");
comput_allitem($FLOW_ID,$USER_ID);
?>
<br>
<div align="center">
<input type="button" value="返回" class="BigButton" onclick="parent.location='index.php'">
</div>
</body>
</html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?