极限网络智能办公系统 - Office Automation 2008 官方100% 源码
源代码在线查看: delete.php
function tree_delete( $SORT_ID )
{
$connection = openconnection( );
$query = "delete from FILE_SORT where SORT_ID=".$SORT_ID;
exequery( $connection, $query );
$query = "select * from FILE_CONTENT where SORT_ID=".$SORT_ID;
$cursor = exequery( $connection, $query );
while ( $ROW = mysql_fetch_array( $cursor ) )
{
$ATTACHMENT_ID = $ROW['ATTACHMENT_ID'];
$ATTACHMENT_NAME = $ROW['ATTACHMENT_NAME'];
if ( $ATTACHMENT_NAME != "" )
{
delete_attach( $ATTACHMENT_ID, $ATTACHMENT_NAME );
}
}
$query = "delete from FILE_CONTENT where SORT_ID=".$SORT_ID;
exequery( $connection, $query );
$query = "select * from FILE_SORT where SORT_PARENT=".$SORT_ID;
$cursor = exequery( $connection, $query );
while ( $ROW = mysql_fetch_array( $cursor ) )
{
$SORT_ID = $ROW['SORT_ID'];
tree_delete( $SORT_ID );
}
}
include_once( "inc/auth.php" );
include_once( "inc/utility_all.php" );
echo "\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n";
tree_delete( $SORT_ID );
header( "location: index.php" );
echo "\r\n\r\n\r\n";
?>