⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 submit.php

📁 极限网络智能办公系统—MYOA26—100%—源程序。
💻 PHP
字号:
<?php

include_once( "inc/auth.php" );
include_once( "inc/check_type.php" );
echo "\r\n<html>\r\n<head>\r\n<title></title>\r\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=gb2312\">\r\n</head>\r\n\r\n<body class=\"bodycolor\" topmargin=\"5\">\r\n\r\n";
$I = 1;
for ( ;	$I <= $ITEM_COUNT;	++$I	)
{
	$STR = "S".$I;
	$STR1 = "S".$I."_NAME";
	if ( !( $$STR != "" ) && !( !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}";
		$I = 1;
		for ( ;	$I <= $ITEM_COUNT;	++$I	)
		{
			$STR = "S".$I;
			$URL .= "&".$STR."=".$$STR;
		}
		echo "        <br>\r\n        <div align=\"center\">\r\n           <input type=\"button\" value=\"返回\" class=\"BigButton\" name=\"button\" onClick=\"location='";
		echo $URL;
		echo "'\">\r\n        </div>\r\n";
		exit( );
	}
}
$connection = openconnection( );
if ( $OPERATION == 1 )
{
	$query = "insert into SAL_DATA(FLOW_ID,USER_ID";
	$I = 1;
	for ( ;	$I <= $ITEM_COUNT;	++$I	)
	{
		$query .= ",S".$I;
	}
	$query .= ") values ({$FLOW_ID},'{$USER_ID}',";
	$I = 1;
	for ( ;	$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 ";
	$I = 1;
	for ( ;	$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>请继续选择其他员工" );
echo "\r\n<br>\r\n<div align=\"center\">\r\n  <input type=\"button\" value=\"返回\" class=\"BigButton\" onclick=\"parent.location='index.php'\">&nbsp;\r\n</div>\r\n\r\n\r\n</body>\r\n</html>\r\n";
?>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -