////////////////////////////////////////////////////////////////////////////////// // 免刷新图库程序V3.3 // // 本程序由金足工作室出品,采由现今流行的XML技术.可达到数据更新网页画面无闪烁,// //并有声音提示.后台采用ASP制作,服务器配置极其简单. // // QQ:47383172 // ////////////////////////////////////////////////////////////////////////////////// var BL_PicUpData; var BL_UserId = readCookie("userid"); var BL_PicId = FUN_GetUrl(document.location,"id"); var BL_Leng; //图片数目 var BL_PicName; var BL_PicTime; var BL_Lable; var BL_Path,BL_File; var BL_NowPage = readCookie("NowPage"); if (!BL_NowPage) BL_NowPage = 0; //默认显示的页码 var BL_ReLoad,BL_PicUpId; var BL_TimeOut = 2000; var BL_RowLen; var BL_CellLen; var BL_MouseCode = new Object(); //var BL_Img = document.createElement("IMG"); //TAB_PicTab.appendChild(BL_Img); //BL_Img.style.display = "none"; if(!isNaN(BL_PicId) && BL_PicId >=0){ BL_PicId = Math.floor(BL_PicId); }else{ BL_PicId = 0 } function FUN_GetPicTime(BL_GetTime){ BL_Leng = TAB_PicTab.cells.length; //图片数目 for(i=0;i"; } TD_PicName.innerHTML += " " + BL_PicName[0] + ""; } if(BL_UserId){ TD_PicName.innerHTML += " 进入自选图区"; }else{ TD_PicName.innerHTML += " 进入自选图区"; } var BL_PageStr=""; for(i=0;i第"+(i+1)+"页"; } BL_PageStr+="
显示全部
"; DIV_PageList.innerHTML=BL_PageStr; FUN_Page(BL_NowPage); if(readCookie("sound")=="true") sound.checked = true; if(readCookie("download")=="true") download.checked = true; BL_PicTime = BL_GetTime.split(","); var BL_RowStr = ""; for(i=0;i=BL_RowLen-1) break; BL_RowStr+=""; } TD_NewList.innerHTML=BL_RowStr+"
"+TAB_PicTab.cells[Math.floor(BL_PicTime[i])].innerHTML+"
"; BL_PicUpId="";//清空缓存 BL_ReLoad=""; BL_TempUrl = "xml/"+Math.random()+"/../changer"+ BL_PicId + ".htm?Date=" + new Date(); Ifr_Changer.document.location.replace(BL_TempUrl); } function FUN_Changer(BL_GetTime){ var BL_TempTrue = FUN_AddNew(BL_GetTime); if(BL_TempTrue) setTimeout("Ifr_Changer.document.location.reload()",BL_TimeOut); } function FUN_AddNew(BL_GetTime){ var BL_TheCode = BL_GetTime.split(","); var BL_TempId=Math.floor(BL_TheCode[BL_TheCode.length-2]); if(!BL_ReLoad) BL_ReLoad = BL_TheCode[BL_TheCode.length-1]; if(BL_ReLoad!=BL_TheCode[BL_TheCode.length-1]){ document.location.reload(); return(false); } if(!BL_PicUpId){ BL_PicUpId = BL_TempId; FUN_PlaySound(BL_TheCode[BL_TheCode.length-3],false);//播放提示 return(true); } if(BL_PicUpId == BL_TempId) return(true); if(BL_PicUpId > BL_TempId || (BL_TempId-BL_PicUpId)>1){ FUN_PlaySound(BL_TheCode[BL_TheCode.length-3],true); //播放提示 document.location.reload(); return(false); } for(i=0;i BL_RowLen-1) TAB_NewTab.deleteRow(); }else{ BL_TheCode[i]=Math.abs(BL_TheCode[i]); for(a=0;a"; }else{ TD_LastTime.innerHTML="最后更新:"+BL_LastTime; } } function FUN_Page(BL_P){ try{ var BL_TempTr; BL_P = Math.floor(BL_P); BL_NowPage=BL_P; writeCookie("NowPage", BL_P); if(BL_P==0){ for(i=0;i=2){ if(BL_PicTime[BL_y] || BL_x==1){ if (BL_File.toLowerCase().indexOf("tif")>=0){ BL_Target = "_self"; }else{ BL_Target = "_blank"; } //BL_Split[1]=(""+BL_Split[1]+""); //BL_Split[1]=""+BL_Split[1]+"" BL_Split[1]=""+BL_Split[1]+"" //v3.0的代码,v3.2后不再使用2008-1-1 } //end if return(BL_Split.join(" ")); } //end if return(BL_Split); } //end function function FUN_GetUrl(urlstr,instr){ var UrlValue = ''; var search = instr + '='; var BLUrl=unescape(urlstr).toLowerCase(); var BLStrNum=BLUrl.split('?'); if (BLStrNum.length==2){ BLUrl=BLStrNum[1]; if(BLUrl.length > 0) { offset = BLUrl.indexOf(search); if (offset != -1) { offset += search.length; end = BLUrl.indexOf('&', offset); if (end == -1) end = BLUrl.length; UrlValue = BLUrl.substring(offset, end); } } } return(UrlValue); }//end function function FUN_Err(){ err.style.display=""; err.style.top=document.body.scrollTop; } function readCookie(name) { var cookieValue = ""; var search = name + "="; if(document.cookie.length > 0) { offset = document.cookie.indexOf(search); if (offset != -1) { offset += search.length; end = document.cookie.indexOf(";", offset); if (end == -1) end = document.cookie.length; cookieValue = unescape(document.cookie.substring(offset, end)) } } return cookieValue; } function writeCookie(name, value, hours) { var expire = ""; if(hours != null) { expire = new Date((new Date()).getTime() + hours * 3600000 * 24); expire = "; expires=" + expire.toGMTString(); } document.cookie = name + "=" + escape(value) + expire; } function MouseOver(BL_This,BL_Code) { if (!MouseOver[BL_Code]) MouseOver[BL_Code] = BL_This.href; //alert(BL_This.href); if (!download.checked){ BL_This.href = MouseOver[BL_Code]; }else{ var url = document.location; if(url.toString().indexOf("16880")==-1){ url = "http://" + document.location.hostname + ":16880/"; }else{ url=""; } BL_This.href = url + "download.asp?index=" + BL_Code + "&cnname=" + escape(BL_This.innerText) + "&type=" + BL_File + "&path=" + BL_Path + "&download=true"; } if (BL_File.toLowerCase().indexOf("tif")>=0){ BL_This.target = "_self"; }else{ BL_This.target = "_blank"; } } function Form_Validator(){ //搜索 var BL_SearchWin,i; var BL_SearchStr=""; var BL_SearchWord = search.value; if(BL_SearchWord){ for(i=0;i"; } } if(BL_SearchStr){ BL_SearchStr="搜索结果:

" + BL_SearchStr; }else{ BL_SearchStr="没有找到!" } BL_SearchWin = window.open(); BL_SearchWin.document.write(BL_SearchStr); BL_SearchWin.document.write("