<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>文件上传助手</title>
<link rel="shortcut icon" href="__PUBLIC__/Admin/images/myfav.ico" type="image/x-icon" />
<import file= "Admin.js.Jquery"/> 
<script charset="utf-8" src="__PUBLIC__/Common/artDialog/jquery.artDialog.js?skin=green"></script>
<script charset="utf-8" src="__PUBLIC__/Common/artDialog/extend.js"></script>
<script src="__PUBLIC__/Common/uploadify/jquery.uploadify.min.js" type="text/javascript"></script>
<link rel="stylesheet" type="text/css" href="__PUBLIC__/Common/uploadify/uploadify.css">
<script charset="utf-8" src="__PUBLIC__/Common/artDialog/plugins/iframeTools.js"></script>
<script type="text/javascript">
	$(function() {
	$('#file_upload').uploadify({
		'swf'      : '__PUBLIC__/Common/uploadify/uploadify.swf',
		'uploader' : '{:U('Public/doupload?dirname=')}{$dirname}',
		'buttonText' : '选择文件',
		'method'   : 'post',
		'multi'    : true,
		'onUploadSuccess' : function(file, data, response) {
			//alert(data);
			if(data==0)	art.dialog.tips('上传文件失败!');
        },
		'formData'  : {'uploadify':'<?php echo xmd5(C('COOKIE_PREFIX'));?>'},
		'onQueueComplete' : function(queueData) { art.dialog.open.origin.location.reload(); },
	});
});
</script>
</head>
<body>
<h4>上传文件至目录: <notempty name='dirname'>{$dirname}<else/>根目录</notempty> </h4>
<input id="file_upload" name="file_upload" type="file" style="display:none;"/>
</body>
</html>