<?php
/*********************************************************      
 程序说明：         
    功能说明：删除指定的文件
              
    调用关系：调用: header.inc    
              被调用:$return_dir        
 
    变量说明：

    作者：Kevin He    2001-10-25     
      
修改注释：      
NO.1      
姓名：           
时间： 
修改说明：  
*********************************************************/
require("../../inc/header.inc");
$return_dir = "./db_zip_list.php";
if(!isset($del_target)){
	$del_target = $dir;
}
//echo "<br>del_target=$del_target";
if($sure_del){
	$result = unlink($del_target);
	if($result > 0){      
		//------插入日志------
		$log_name = $user_info["account"]." delete file ".$del_target." successful";
		insertLog("$log_name");
		echo " <meta http-equiv=\"refresh\" content=\"0; url=$return_dir\"> ";
	}else{
		//------插入日志------
		$log_name = $user_info["account"]." delete file ".$del_target." fail";
		insertLog("log_name");
		echo "<script language=\"javascript\"> ";
		echo "alert('";
		echo "delete $del_target failed";
		echo "'); ";
		echo "location.href=\"$return_dir\";";
		echo "</script>";
	}
}elseif($no_del){
        echo " <meta http-equiv=\"refresh\" content=\"0; url=$return_dir\"> ";
}else{
        echo "<form action=\"$PHP_SELF\">";
        echo "<br>";
        echo "$strAreYouSureToDelete $del_target?";
        echo "<br><input type=\"Submit\" name=\"sure_del\" value=\"$strConfirm\"> ";
        echo "<input type=\"Submit\" name=\"no_del\" value=\"$strCancel\">"; 
	echo "<input type=\"hidden\" name=\"del_target\" value=\"$del_target\">";      
        echo "</form> ";
}
?>