1 |
- function uploadInit(){var a;a=new SWFUpload({flash_url:"/js/ui/swfupload/Flash/swfupload.swf",upload_url:"/js/ui/swfupload/upload.php",post_params:{PHPSESSID:"11111"},file_size_limit:"100 MB",file_types:"*.mp3;",file_types_description:"\u9009\u62e9\u4e0a\u4f20\u6587\u4ef6",file_upload_limit:-1,file_queue_limit:0,debug:!1,button_image_url:"/images/upload_2.jpg",button_width:"55",button_height:"15",button_placeholder_id:"spanButtonPlaceHolder",button_text:'\x3cspan id\x3d"spanButtonPlaceHolder"\x3e\x3c/span\x3e',button_text_style:"",button_text_left_padding:12,button_text_top_padding:3,button_action:SWFUpload.BUTTON_ACTION.SELECT_FILE,button_cursor:SWFUpload.CURSOR.HAND,file_queue_error_handler:function(a){$("#fsUploadProgressLine,#successLine").hide();$("#errorLine").html(a.name+" \u6587\u4ef6\u5927\u5c0f\u8d85\u51fa\uff0c\u9650\u5236100MB").show()},file_dialog_complete_handler:function(){this.startUpload()},upload_start_handler:function(){$("#successLine,#errorLine").hide();$("#fsUploadProgressLine").show()},upload_progress_handler:function(a,c,b){$("#fsUploadProgress").css("width",c/b*100+"%")},upload_error_handler:function(){$("#fsUploadProgressLine,#successLine").hide();$("#errorLine").html("\u4e0a\u4f20\u5931\u8d25\uff01").show()},upload_success_handler:function(d,c){var b=eval("("+c+")");if(200==b.code){$("#fsUploadProgressLine,#errorLine").hide();var e='\x3cobject type\x3d"application/x-shockwave-flash" data\x3d"/js/ui/dewplayer/dewplayer-mini.swf?mp3\x3d/js/ui/swfupload/upload/'+b.filename+'" width\x3d"160" height\x3d"20" id\x3d"dewplayer-mini"\x3e\x3cparam name\x3d"wmode" value\x3d"transparent" /\x3e\x3cparam name\x3d"movie" value\x3d"/js/ui/dewplayer/dewplayer-mini.swf?mp3\x3d/js/ui/swfupload/upload/'+b.filename+'" /\x3e\x3c/object\x3e';$("#successLine").html(e+"\x3ca href\x3d\"javascript:insertFile('"+b.filename+"')\"\x3e\u63d2\u5165\u300a"+d.name+"\u300b\x3c/a\x3e").show()}else $("#fsUploadProgressLine,#successLine").hide(),$("#errorLine").html(b.msg).show();a.addPostParam("filename",b.filename);$("#filename").val(b.filename)}})}function insertFile(a){a='\x3cobject type\x3d"application/x-shockwave-flash" class\x3d"video" data\x3d"/js/ui/dewplayer/dewplayer-mini.swf?mp3\x3d/js/ui/swfupload/upload/'+a+'" width\x3d"160" height\x3d"20" id\x3d"dewplayer-mini"\x3e\x3cparam name\x3d"wmode" value\x3d"transparent" /\x3e\x3cparam name\x3d"movie" value\x3d"/js/ui/dewplayer/dewplayer-mini.swf?mp3\x3d/js/ui/swfupload/upload/'+a+'" /\x3e\x3c/object\x3e';$("#swfuploadDiv").data("editor").execCommand("insertHtml",a);$("#swfuploadDiv").closeDialog();$("#successLine").html("")}$(function(){uploadInit()});
|