<!DOCTYPE html>
<html>
<head>
<!--[if IE]>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<![endif]-->
<meta charset="gbk" />
<title>多文件上传程序</title>
<link href="<?=base_url()?>csdj/swfupload/upload.css" rel="stylesheet" type="text/css" />
<script src="<?=base_url()?>csdj/swfupload/jquery-1.10.1.min.js"></script>
<script src="<?=base_url()?>csdj/swfupload/jquery.uploadify.min.js"></script>
</head>
<body>
<div id="content">
	<form class="left">
		<div id="queue"></div>
		<input type="button" id="start" class="uploadify-button" value="上传" />
		<input id="file" name="file_upload" type="file" multiple="true" />
	</form>
</div>
<script type="text/javascript">
(function(){
    $('#file').uploadify({
        'fileSizeLimit': '<?=$size?>',
        'queueSizeLimit': <?=$limit?>,
        'multi': true,
        'buttonText': '选择文件',
        'auto': false,
        'width':85,
        'fileTypeDesc':'<?=$title?>',
        'fileTypeExts':'<?=$types?>',
        'swf': '<?=base_url()?>csdj/swfupload/uploadify.swf',
        'uploader': '<?=$uplink?>',
        'onSelect': function(file){
        },
        'onUploadStart': function(){
        },
        'onUploadComplete': function(){
        },
        'onQueueComplete': function(){
		 parent.Dialog.close();
        },
        'onUploadSuccess': function(file, data, response){
            if(data!='no'){
                 var msg= data.split('=cscms=');
                 var url=msg[0];
                 var size=msg[1];
<?php if($fhurl=="CS_PlayUrl"){ ?>
		 window.parent.document.getElementById('CS_PlayUrl').value= url;
		 window.parent.document.getElementById('CS_DownUrl1').value= url;
<?php }else{ ?>
                 var yurl=window.parent.document.getElementById('<?=$fhurl?>').value;
                 if(yurl!=''){
                     yurl=yurl+"\r\n";
                 }
		 window.parent.document.getElementById('<?=$fhurl?>').value= yurl+url;
alert(yurl+url);
<?php } ?>
            }else{
                 alert('上传失败！');
            }
        }
    });
    $('#start').click(function(){
        $('#file').uploadify('upload', '*');
    });
})();
</script>
</body>
</html>
