function dialog_selectFile(a){var k,l,m,n,o,p,q,r,b=$("#select_num").val(),c="#"+a,d="#select_check_"+$(c).attr("file_id"),e=$("#select_id_list").val(),f=$("#select_filelist").val(),g=$("#select_fileurllist").val(),h=$("#select_titlelist").val(),i=$("#select_sizelist").val(),j=$("#select_extlist").val();return e?(k=e.split(","),l=f.split(","),m=g.split(","),n=h.split(","),o=i.split(","),p=j.split(",")):(k=new Array,l=new Array,m=new Array,n=new Array,o=new Array,p=new Array),$(c).hasClass("espcms_fileupload_select")?($(c).removeClass("espcms_fileupload_select"),$(d).espcms_checkbox("uncheck"),$(c).find("p.file_select_ok").hide(),k.remove($(c).attr("file_id")),l.remove($(c).attr("file_name")),m.remove($(c).attr("file_url")),n.remove($(c).attr("file_title")),o.remove($(c).attr("file_size")),p.remove($(c).attr("file_ext"))):($(c).addClass("espcms_fileupload_select"),$(d).espcms_checkbox("check"),$(c).find("p.file_select_ok").show(),k.push($(c).attr("file_id")),l.push($(c).attr("file_name")),m.push($(c).attr("file_url")),n.push($(c).attr("file_title")),o.push($(c).attr("file_size")),p.push($(c).attr("file_ext"))),l.length>b?($(c).removeClass("espcms_fileupload_select"),$(c).find("p.file_select_ok").hide(),q=[{text:espcms_botton_colse,"class":"btn btn-danger",click:function(){parent.parent.$(this).dialog("close")}}],r={0:b,1:l.length},parent.parent.espcms_public_dialog_mess(espcms_message_select_num_warning,"select_err",q,680,r),!1):($("#select_id_list").val(k),$("#select_filelist").val(l),$("#select_fileurllist").val(m),$("#select_titlelist").val(n),$("#select_sizelist").val(o),$("#select_extlist").val(p),l.length>0?$("#file_select_ok_botton").show():$("#file_select_ok_botton").hide(),!0)}function espcms_list_type(a){var e,f,g,h,i,j,b=$("#listurl").val(),c="listtype=ajax&fileListType="+a,d=espcms_combine_url(c,b);if($("#listurl").val(d),e=$("#select_id_list").val(),g=new Array,h=new Array,e){for(i=e.split(","),j=0;j<=i.length;j++)i[j]&&(g.push("#photoid_"+i[j]),h.push("#select_check_"+i[j]));e=g.join(","),f=h.join(",")}$.ajax({type:"get",url:d,global:!1,beforeSend:function(){$("#loadingtable").show()},success:function(a){$("#loadingtable").hide(),$("#loadingstr").empty().append(a),$("input[type=checkbox],input[type=radio]").espcms_checkbox(),g.length>0&&($(e).addClass("espcms_fileupload_select"),$(e).find("p.file_select_ok").show()),h.length>0&&$(f).espcms_checkbox("check"),$(".espcms_fileupload_ok").unbind("click").bind("click",function(){var a=$(this).attr("id");dialog_selectFile(a)}),$(".espcms_filedir_ok").unbind("click").bind("click",function(){var a=$(this).attr("file_id");dialog_diropen(a)})}})}