<?php
include("../../config.inc.php");
include($CommonPath."/admin/func/adm.inc.php");
include($CommonPath."/admin/func/common.inc.php");
include($CommonPath."/admin/func/db.inc.php");
$msql=new SHARP_SQL;
NeedAuth(0);
?><html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<SCRIPT>
function cm(nn){
	if (confirm("确实要删除文件吗？")){
		window.location='showflash.php?step=del&ifile='+nn;
	}
}

function flash_file (file,width,height) {
	window.returnValue = file + "*" + width + "*" + height;
	window.close();
}
</SCRIPT>
<title>无标题文档</title>
</head>

<body leftmargin="0" topmargin="5">
<center>
<table border="0" cellpadding="4" cellspacing="1" bgcolor="#CCCCCC">
  <tr>
<?php
$imagefold = "../../pic/swf/";
if ($step == "del"){
  if($ifile != "." && $ifile != ".." && $ifile != "_notes" && !is_dir ($ifile)){
	  if(file_exists($imagefold.$ifile)){
	    unlink($imagefold.$ifile);
		echo "<script>parent.location.reload()</script>";
	  }
  }else{
	echo "<script>alert('删除失败！文件路径错误或文件不存在！')</script>";
  }
}
$handle = opendir ($imagefold);
$kk = 1;
$tt = 0;
while ($flash_file = readdir($handle)) {
	$nowfile = $imagefold . $flash_file;
	$flash_size = @GetImageSize ( $nowfile );
    if($flash_file != "." && $flash_file != ".." && $flash_file != "_notes" && !strstr ($flash_file,"/") && !is_dir ($nowfile)){
?>
    <td bgcolor="#F0f0f0" style="border-top: 1 solid #ffffff;border-right:1 solid #ffffff;">
<table border="0" cellspacing="0" cellpadding="2">
        <tr> 
          <td><OBJECT 
            codeBase=http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0 
            height=110 width=110 
            classid=clsid:D27CDB6E-AE6D-11cf-96B8-444553540000>
              <PARAM NAME="movie" VALUE="<?php echo $nowfile;?>">
              <PARAM NAME="quality" VALUE="high">
              <embed src="<?php echo $nowfile;?>" 
            quality="high" 
            pluginspage="http://www.macromedia.com/go/getflashplayer" 
            type="application/x-shockwave-flash" width="110" 
            height="110"></embed></OBJECT></td>
        </tr>
        <tr> 
          <td height="22" align="center" valign="bottom"> 
            <input type="button" name="Submit" value="选中" style="background:#f0f0f0;border:1 solid #dddddd;font-size:12px" onClick="flash_file ('<?php echo str_replace ("../../", $SiteUrl, $nowfile);?>','<?php echo $flash_size[0];?>','<?php echo $flash_size[1];?>')">&nbsp;<input type="button" name="Submit2" value="删除" style="background:#f0f0f0;border:1 solid #dddddd;font-size:12px;text-align:center" onClick="cm('<?php echo $flash_file;?>')"> </td>
        </tr>
      </table> 
    </td>
		<?
		if($kk >= 5){
			echo "</tr>";
			$kk = 0;
		}
		$kk++;
		$tt++;
	}
}
		?>
  </tr>
</table>
</center>
</body>
</html>
