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

📄 batch_submit.php

📁 通达网络办公 - Office Anywhere 2008 增强版100%源码(3.4.081216) 内含 通达OA2008增強版接近完美破解补丁20081216集 及 最新通达OA2008ADV(
💻 PHP
字号:
<?php

include_once( "inc/auth.php" );
include_once( "inc/check_type.php" );
include_once( "inc/utility_all.php" );
include_once( "inc/utility_sms1.php" );
echo "<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<body class=\"bodycolor\" topmargin=\"5\">\r\n";
$USER_ID = strtok( $TO_ID, "," );
while ( $USER_ID != "" )
{
	if ( $USER_ID == "" )
	{
		$USER_ID = strtok( "," );
	}
	else
	{
		$query = "select count(*) from HRMS,USER where HRMS.USER_ID=USER.USER_ID and HRMS.USER_ID='".$USER_ID."'";
		$cursor = exequery( $connection, $query );
		$ROW = mysql_fetch_array( $cursor );
		$COUNT = $ROW[0];
		if ( $COUNT == "1" )
		{
			if ( $LEAVE_TYPE != "" )
			{
				$query1 = "update HRMS set LEAVE_TYPE=".$LEAVE_TYPE." where USER_ID='{$USER_ID}'";
				exequery( $connection, $query1 );
			}
			if ( $SELECTITEM != "-1" && $TContext != "" )
			{
				if ( $MODE == "overwrite" )
				{
					$query1 = "update HRMS set ".$SELECTITEM."='{$TContext}' where USER_ID='{$USER_ID}'";
				}
				else
				{
					$query1 = "update HRMS set ".$SELECTITEM."=CONCAT({$SELECTITEM},'\n{$TContext}') where USER_ID='{$USER_ID}'";
				}
				exequery( $connection, $query1 );
			}
			$USERDEF_FIELD = array( );
			while ( list( $key, $value ) = each( &$GLOBALS['_POST'] ) )
			{
				if ( !( substr( $key, 0, 7 ) != "USERDEF" ) )
				{
					if ( substr( $key, 0, 7 ) != "USERDEF" )
					{
						break;
					}
				}
				else
				{
					continue;
				}
				$USERDEF_FIELD[$key] = $value;
			}
			reset( &$GLOBALS['_POST'] );
			while ( list( $key, $value ) = each( &$GLOBALS['_POST'] ) )
			{
				if ( substr( $key, 0, 7 ) != "USERDEF" || !strstr( substr( $key, 7 ), "_" ) )
				{
				}
				else
				{
					$ARRAY = explode( "_", substr( $key, 7 ) );
					$USERDEF_FIELD["USERDEF".$ARRAY[0]] .= $ARRAY[1].",";
				}
			}
			reset( &$GLOBALS['_POST'] );
			while ( list( $key, $value ) = each( &$USERDEF_FIELD ) )
			{
				$query2 = "select * from FIELD_DATE where TABLENAME='HRMS' and FIELDNO='".$key."' and IDENTY_ID='{$USER_ID}';";
				$cursor2 = exequery( $connection, $query2 );
				if ( $value != "" )
				{
					if ( 0 < mysql_num_rows( $cursor2 ) )
					{
						$query2 = "update FIELD_DATE set ITEM_DATE='".$value."' where TABLENAME='HRMS' and FIELDNO='{$key}' and IDENTY_ID='{$USER_ID}';";
					}
					else
					{
						$query2 = "insert into FIELD_DATE (TABLENAME,FIELDNO,IDENTY_ID,ITEM_DATE) values ('HRMS','".$key."','{$USER_ID}','{$value}');";
					}
					exequery( $connection, $query2 );
				}
			}
		}
		$USER_ID = strtok( "," );
	}
}
message( "提示", "批量更新成功!" );
echo "<div align=\"center\">\r\n\t<input type=\"button\" value=\"返回\" class=\"BigButton\" onClick=\"location='batch_update.php'\">\r\n</div>\r\n</body>\r\n</html>\r\n\r\n";
?>

⌨️ 快捷键说明

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