function board_photo_upload(a){getmodule("board_photo_ls_con","bo_id=to_upload_board_photo&board_id="+a);}function setUploadInfo(b,i,c){if(b&&i&&c){var j=b+"/"+c;var h=i+"/"+c;var g=parent.document.getElementById("upload_photo_preview_con");if(g){g.innerHTML="<img src='"+h+"' />";}var f=parent.document.getElementById("uncompressed_photo_name");if(f){f.value=j;}var d=parent.document.getElementById("compressed_photo_name");if(d){d.value=h;}}var a=parent.document.getElementById("uploadpic");if(a){a.src="ftl/upload.html";}var e=parent.document.getElementById("upload_photo_btn_a");if(e){e.disabled=false;}}function checkAndSubmitUploadForm(){var a=document.getElementById("photo_name").value;if(!a||a==""){alert("请填写相片名称！");return false;}var d=document.getElementById("photo_desc").value;if(!d||d==""){alert("请填写相片简介！");return false;}else{if(d.length>200){alert("相片简介过长，请修改！\n\n简介不能超过200字！");return;}}var c=document.getElementById("uncompressed_photo_name").value;var b=document.getElementById("compressed_photo_name").value;if(!c||c==""||!b||b==""){alert("请选择要上传的相片！");return false;}checkTheSamePN();}function checkTheSamePN(){var b=document.getElementById("photo_name").value;var c=document.getElementById("myboard_id").value;getmodule("getsamename","bo_id=check_photo_name&myphoto_name="+b+"&board_id="+c);if(document.getElementById("havesame_name")){var a=document.getElementById("havesame_name").value;if(a>0){alert("照片名字重复！");document.getElementById("photo_name").value="";return;}alert("相片上传成功，请等待审核!");getmoduleByPost("board_photo_ls_con","upload_board_photo","upload_board_photo_frm");}}function ChangeThePhoto(d,f){if(document.getElementById("photoup")){var b=document.getElementById("photoup").innerHTML;}if(document.getElementById("photodown")){var a=document.getElementById("photodown").innerHTML;}if(document.getElementById("photofirst")){var c=document.getElementById("photofirst").innerHTML;}if(document.getElementById("photolast")){var e=document.getElementById("photolast").innerHTML;}if("up"==d&&b!=null&&b!=""){window.location="initPage?topid=board_top&buid=board_photos_details&tailid=tail&photo_id="+b+"&board_id="+f;}else{if("up"==d&&b==""&&e!=null&&e!=""){window.location="initPage?topid=board_top&buid=board_photos_details&tailid=tail&photo_id="+c+"&board_id="+f;}else{if("down"==d&&a!=null&&a!=""){window.location="initPage?topid=board_top&buid=board_photos_details&tailid=tail&photo_id="+a+"&board_id="+f;}else{if("down"==d&&a==""&&c!=null){window.location="initPage?topid=board_top&buid=board_photos_details&tailid=tail&photo_id="+e+"&board_id="+f;}}}}}function dophotoComment(a){var b=document.getElementById("BoardPhotoComment").value;if(b!=""&b.length<=200){getmodule("board_pinctures_commens_div","bo_id=board_photo_docomment&photo_id="+a+"&photocomment="+b);alert("评论提交成功，请等待审核！");}else{if(b.length>=200){alert("不能超过200字!");}else{alert("评论不能为空，请重新评论!");}}}function deletePhoto(a,b){if(confirm("你确定删除吗？")){getmodule("pubwin","bo_id=board_photo_dodelete&photo_id_delete="+a+"&board_id="+b);window.location.href="initPage?topid=board_top&buid=photos&tailid=tail&board_id="+b;}}function getPhotoDeleteHref(){var a="";if(document.getElementById("getdeleteresult")){a=document.getElementById("getdeleteresult");alert(a);}}function toEditPhotoProp(a,b){getmodule("pubwin","bo_id=to_edit_photo_prop&photo_id="+a+"&board_id="+b);}function submitEditPropFrm(b){var a=document.getElementById("photo_name").value;var c=document.getElementById("photo_desc").value;if(a==null||a==""){alert("请填写相片名称！");}else{if(c==null||c==""){alert("请填写相片简介！");}else{getmoduleByPost("pubwin","edit_photo_prop","edit_photo_prop_frm");alert("相片修改成功，请等待审核！");window.location.href="initPage?topid=board_top&buid=photos&tailid=tail&board_id="+b;}}}function setUploadSchoolSingerInfo(d,k,e,c,a){parent.document.getElementById("boo").style.display="none";if(d&&k&&e){var l=d+"/"+e;var j=k+"/"+e;var i=parent.document.getElementById("upload_photo_preview_con");if(i){i.innerHTML="<img src='"+j+"' />";parent.document.getElementById("fname").value=e;parent.document.getElementById("file_path").value=l;parent.document.getElementById("file_size").value=c;parent.document.getElementById("original_name").value=a;}var h=parent.document.getElementById("uncompressed_photo_name");if(h){h.value=l;}var f=parent.document.getElementById("compressed_photo_name");if(f){f.value=j;}}var b=parent.document.getElementById("uploadpic");if(b){b.src="ftl/upload_cust_singer.html";}var g=parent.document.getElementById("upload_photo_btn_a");if(g){g.disabled=false;}}function setUploadSchoolSingerVideoInfo(d,e,c,a,h){if(d&&e){parent.document.getElementById("video_path_con").value=h;var i=d+"/"+e;parent.document.getElementById("fname").value=e;parent.document.getElementById("file_path").value=i;parent.document.getElementById("file_size").value=c;parent.document.getElementById("original_name").value=a;var g=parent.document.getElementById("uncompressed_video_name");if(g){g.value=i;}var b=parent.document.getElementById("uploadpic");if(b){parent.document.getElementById("boo").style.display="none";b.src="ftl/upload_cust_singer_video.html";}var f=parent.document.getElementById("upload_photo_btn_a");if(f){f.disabled=false;}}}function checkAndSubmitUploadForSchoolSinger(){var c=document.getElementById("photo_name").value;if(!c||c==""){alert("请填写相片名称！");return;}var f=document.getElementById("photo_desc").value;if(!f||f==""){alert("请填写相片简介！");return;}else{if(f.length>200){alert("相片简介过长，请修改！\n\n简介不能超过200字！");return;}}var g=document.getElementById("uncompressed_photo_name").value;var e=document.getElementById("compressed_photo_name").value;if(!g||g==""||!e||e==""){alert("请选择要上传的相片！");return;}var h=document.getElementById("fname").value;var d=document.getElementById("file_path").value;var b=document.getElementById("file_size").value;if(b>=40*1024*1024){alert("您上传的图片大于2M，请重新上传！");return;}var a=document.getElementById("original_name").value;getmodule("pubwin","bo_id=school_singer_upload_photos_dispose_bo&photo_name="+c+"&photo_desc="+f+"&fname="+h+"&file_path="+d+"&file_size="+b+"&original_name="+a);alert("上传成功!");self.location="initPage?topid=cust_top&buid=school_song&tailid=tail";}function checkAndSubmitUploadForSchoolSingervideo(){var c=document.getElementById("video_name").value;if(!c||c==""){alert("请填写视频名称！");return;}var e=document.getElementById("video_desc").value;if(!e||e==""){alert("请填写视频简介！");return;}else{if(e.length>200){alert("视频简介过长，请修改！\n\n简介不能超过200字！");return;}}var f=document.getElementById("uncompressed_video_name").value;if(!f||f==""){alert("请选择要上传的视频！");return;}var g=document.getElementById("fname").value;var d=document.getElementById("file_path").value;var b=document.getElementById("file_size").value;var a=document.getElementById("original_name").value;alert("video"+document.getElementById("video_path_con").value);alert(a);getmodule("pubwin","bo_id=school_singer_upload_videos_dispose_bo&video_name="+c+"&video_desc="+e+"&fname="+g+"&file_path="+d+"&file_size="+b+"&original_name="+a);alert("上传成功!");self.location="initPage?topid=cust_top&buid=school_song&tailid=tail";}function setUploadSchoolSingerImgReturnException(b){if(b=="false"){parent.document.getElementById("boo").style.display="block";parent.document.getElementById("upload_photo_preview_con").innerHTML="<img src='a.jpg' />";var c=parent.document.getElementById("uploadpic");if(c){c.src="ftl/upload_cust_singer.html";}var a=parent.document.getElementById("upload_photo_btn_a");if(a){a.disabled=false;}}}function setUploadSchoolSingerVideoReturnException(b){if(b=="false"){parent.document.getElementById("boo").style.display="block";var c=parent.document.getElementById("uploadpic");if(c){c.src="ftl/upload_cust_singer_video.html";}var a=parent.document.getElementById("upload_photo_btn_a");if(a){a.disabled=false;}}}
