function remove_this(obj){ $('#'+obj).remove(); } function clean_thumb(inputid){ $('#'+inputid+'_pic').attr('src',public+'/images/admin_upload_thumb.png'); var aid = $('#'+inputid).val(); $('#'+inputid).val(''); $('#'+inputid+'_aid_box').html(''); } function swfupload(id,inputid,title,isadmin,more,isthumb,file_limit,file_types,file_size,moduleid,auth,yesdo,nodo){ url = app+'?g=admin&m=attachment&a=index&isadmin='+isadmin+'&more='+more+'&isthumb='+isthumb+'&file_limit='+file_limit+'&file_types='+file_types+'&file_size='+file_size+'&moduleid='+moduleid+'&auth='+auth; art.dialog.open(url, { id: id, title: title, lock: 'true', window: 'top', width: 600, height: 455, ok: function(){ var iframewin = this.iframe.contentwindow; var topwin = art.dialog.top; yesdo.call(this,iframewin, topwin,id,inputid); }, cancel: true }); } function yesdo(iframewin, topwin,id,inputid){ var num = iframewin.$('#myuploadform > div').length; if(num){ var aids = iframewin.$('#myuploadform #aids').attr("value"); var status = iframewin.$('#myuploadform #status').attr("value"); var filedata = iframewin.$('#myuploadform #filedata').attr("value"); var namedata = iframewin.$('#myuploadform #filedata').attr("value"); //var namedata = iframewin.document.forms["myuploadform"].elements["namedata"]; if(filedata){ $('#'+inputid+'_pic').attr('src',filedata); $('#'+inputid).val(filedata); if(status==0) $('#'+inputid+'_aid_box').html(''); } //$('#'+inputid+'_aid').val(aids); //$('#filelis').html(iframewin.$('#myuploadform').html()); } } function up_image(iframewin, topwin,id,inputid){ var num = iframewin.$('#myuploadform > div').length; if(num){ var aids = iframewin.$('#myuploadform #aids').attr("value"); var status = iframewin.$('#myuploadform #status').attr("value"); var filedata = iframewin.$('#myuploadform #filedata').attr("value"); var namedata = iframewin.$('#myuploadform #filedata').attr("value"); if(filedata){ $('#'+inputid+'_pic').attr('src',filedata); $('#'+inputid).val(filedata); if(status==0) $('#'+inputid+'_aid_box').html(''); } } } function up_images(iframewin, topwin,id,inputid){ var data = ''; var aidinput=''; var num = iframewin.$('#myuploadform > div').length; if(num){ iframewin.$('#myuploadform div ').each(function(){ var status = $(this).find('#status').val(); var aid = $(this).find('#aids').val(); var src = $(this).find('#filedata').val(); var name = $(this).find('#namedata').val(); if(status==0) aidinput = ''; data += '
'+aidinput+'  移除
'; }); $('#'+inputid+'_images').append(data); } } function insert2editor(iframewin, topwin,id,inputid){ var img = ''; var data = ''; var num = iframewin.$('#myuploadform > div').length; if(num){ iframewin.$('#myuploadform div').each(function(){ var status = $(this).find('#status').val(); var aid = $(this).find('#aids').val(); var src = $(this).find('#filedata').val(); var name = $(this).find('#namedata').val(); if(status==0) data += ''; img += isimg(src) ? '
' : (isswf(src) ? '' :''+src+'
') ; }); $('#'+inputid+'_aid_box').append(data); } ckeditor.instances[inputid].inserthtml(img); } function upokis(arrmsg){ //$('#'+arrmsg[0].editorid+'_aid_box').show(); var i,msg; for(i=0;i0)$('#'+msg.editorid+'_aid_box').append(''); //$("#uploadlist").append(''); } } function upok(id,data){ alert(id); $('#'+id+'_aid_box').append('ddddddddddddddddd'); $('#'+id+'_aid_box').show(); } function nodo(iframewin, topwin){ art.dialog.close(); } function isimg(url){ var stemp; var b=false; var opt="jpg|gif|png|bmp|jpeg"; var s=opt.touppercase().split("|"); for (var i=0;i