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 += '