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

源代码在线查看: delete.php

软件大小: 17584 K
上传用户: Rosa_
关键词: 2008 Anywhere 20081216 Office
下载地址: 免注册下载 普通下载 VIP

相关代码

								
				function tree_delete( $DEPT_ID )
				{
					global $connection;
					$query = "delete from DEPARTMENT where DEPT_ID='".$DEPT_ID."'";
					exequery( $connection, $query );
					$query = "select * from USER where DEPT_ID='".$DEPT_ID."' and USER_ID='admin'";
					$cursor = exequery( $connection, $query );
					if ( $ROW = mysql_fetch_array( $cursor ) )
					{
						$query = "update USER set DEPT_ID=0 where USER_ID='admin'";
						exequery( $connection, $query );
					}
					$query = "delete from USER where DEPT_ID='".$DEPT_ID."'";
					exequery( $connection, $query );
					$query = "select * from DEPARTMENT where DEPT_PARENT='".$DEPT_ID."'";
					$cursor = exequery( $connection, $query );
					while ( $ROW = mysql_fetch_array( $cursor ) )
					{
						$DEPT_ID = $ROW['DEPT_ID'];
						tree_delete( $DEPT_ID );
					}
				}
				
				include_once( "inc/auth.php" );
				include_once( "inc/utility_all.php" );
				include_once( "inc/utility_org.php" );
				echo "\r\n\r\n\r\n删除部门\r\n\r\n\r\n\r\n\r\n\r\n";
				tree_delete( $DEPT_ID );
				add_log( 5, $DEPT_ID, $LOGIN_USER_ID );
				cache_department( );
				message( "提示", "部门/成员单位已删除" );
				echo "\r\n\r\nparent.dept_list.location.reload();\r\n\r\n\r\n\r\n\r\n";
				?>
							

相关资源