⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 lbbs_pic v1.03.asp

📁 乐学LBBS无限级目录图片直读系统 v1.09 build 20080719 很好用的大家试试看
💻 ASP
📖 第 1 页 / 共 4 页
字号:
.style2 {
	text-align: left;background-color: #99CCFF; height: 28px;
}

.style3 {
	color: #000000;
}
.style4 {
	color: #0066FF;
}
			#copyright em { color: #FF9D25; }
			#copyright em { font-weight: bold; }
			em { font-style: normal; font-weight: normal; }
.style5 {
	text-align: left;
	background-color: #CCFFCC;
	color: #000000;
}
.style6 {
	border: 1px solid #c0c0c0;
	background-color: #CCFFFF;
}
/*鼠标悬停在图片上时提示框样式*/
.TableBody {
	BACKGROUND: #E3E6FD; LINE-HEIGHT: 150%
}
TH {
	FONT-WEIGHT: bold; FONT-SIZE: 12px; COLOR: #FFFFFF; HEIGHT: 18px; BACKGROUND-COLOR: #3399FF
}
TD.TableBody1 {
	LINE-HEIGHT: normal; BACKGROUND-COLOR: #FFFFFF
}
/*鼠标悬停在图片上时提示框样式*/
</STYLE>
</head>

<SCRIPT language=javascript>
<!-- 
function unselectall()
{
    if(document.myform.chkAll.checked){
	document.myform.chkAll.checked = document.myform.chkAll.checked&0;
    } 	
}

function CheckAll(form)
{
  for (var i=0;i<form.elements.length;i++)
    {
    var e = form.elements[i];
    if (e.Name != "chkAll")
       e.checked = form.chkAll.checked;
    }
}
//----------------------
//图片等比例缩图
flag=false
function DrawImage(ImgD)
{ 
   var image=new Image(); 
   image.src=ImgD.src; 
   image.alt=ImgD.alt;
   if(image.width>0 && image.height>0){ 
      flag=true; 
      if(image.width/image.height>= <%=c_picwidth%>/<%=c_picheight%>){ 
         if(image.width><%=c_picwidth%>){ 
            ImgD.width=<%=c_picwidth%>; 
            ImgD.height=(image.height*<%=c_picwidth%>)/image.width; 
         }else{ 
            ImgD.width=image.width; 
            ImgD.height=image.height; 
         } 
         ImgD.alt=image.alt+"\n[尺寸] "+image.width+"x"+image.height+" 像素"; 
      }else{ 
         if(image.height><%=c_picheight%>){ 
           ImgD.height=<%=c_picheight%>; 
           ImgD.width=(image.width*<%=c_picheight%>)/image.height; 
         }else{ 
          ImgD.width=image.width; 
          ImgD.height=image.height; 
         } 
         ImgD.alt=image.alt+"\n[尺寸] "+image.width+"x"+image.height+" 像素"; 
      } 
   } 
} 
//-------------------------
//鼠标悬停在图片上时提示框
var pltsPop=null;
var pltsoffsetX = 10;   // 弹出窗口位于鼠标左侧或者右侧的距离;3-12 合适
var pltsoffsetY = 15;  // 弹出窗口位于鼠标下方的距离;3-12 合适
var pltsTitle="";
document.write('<div id=pltsTipLayer style="display: none;position: absolute; z-index:10001"></div>');
function pltsinits()
{
    document.onmouseover   = plts;
    document.onmousemove = moveToMouseLoc;
}
function plts()
{  var o=event.srcElement;
    if(o.alt!=null && o.alt!=""){o.dypop=o.alt;o.alt=""};
    if(o.title!=null && o.title!=""){o.dypop=o.title;o.title=""};
    pltsPop=o.dypop;
    if(pltsPop!=null&&pltsPop!=""&&typeof(pltsPop)!="undefined")
    {
	pltsTipLayer.style.left=-1000;
	pltsTipLayer.style.display='';
	var Msg=pltsPop.replace(/\n/g,"<br>");
	Msg=Msg.replace(/\0x13/g,"<br>");
	var re=/\{(.[^\{]*)\}/ig;
	if(!re.test(Msg))pltsTitle="信息提示";
	else{
	  re=/\{(.[^\{]*)\}(.*)/ig;
  	  pltsTitle=Msg.replace(re,"$1")+"&nbsp;";
	  re=/\{(.[^\{]*)\}/ig;
	  Msg=Msg.replace(re,"");
	  Msg=Msg.replace("<br>","");}
       	var content =
      	'<table style="FILTER:alpha(opacity=90) shadow(color=#FFFFFF,direction=135);" id=toolTipTalbe border=0 class="TableBody"><tr><td width="100%"><table class=tableborder1 cellspacing="1" cellpadding="0" style="width:100%">'+
      	'<tr id=pltsPoptop><th height=18 valign=bottom><b><p id=topleft align=left>↖'+pltsTitle+'</p><p id=topright align=right style="display:none">'+pltsTitle+'↗</font></b></th></tr>'+
      	'<tr><td  class=tablebody1 style="padding-left:14px;padding-right:14px;padding-top: 6px;padding-bottom:6px;line-height:135%">'+Msg+'</td></tr>'+
      	'<tr id=pltsPopbot style="display:none"><th height=18 valign=bottom><b><p id=botleft align=left>↙'+pltsTitle+'</p><p id=botright align=right style="display:none">'+pltsTitle+'↘</font></b></th></tr>'+
      	'</table></td></tr></table>';
       	pltsTipLayer.innerHTML=content;
       	toolTipTalbe.style.width=Math.min(pltsTipLayer.clientWidth,document.body.clientWidth/2.2);
       	moveToMouseLoc();
       	return true;
       }
    else
    {
    	pltsTipLayer.innerHTML='';
      	pltsTipLayer.style.display='none';
       	return true;
    }
}

function moveToMouseLoc()
{
	if(pltsTipLayer.innerHTML=='')return true;
	var MouseX=event.x;
	var MouseY=event.y;
	//window.status=event.y;
	var popHeight=pltsTipLayer.clientHeight;
	var popWidth=pltsTipLayer.clientWidth;
	if(MouseY+pltsoffsetY+popHeight>document.body.clientHeight)
	{
	  	popTopAdjust=-popHeight-pltsoffsetY*1.5;
	  	pltsPoptop.style.display="none";
	  	pltsPopbot.style.display="";
	}
	 else
	{
	   	popTopAdjust=0;
	  	pltsPoptop.style.display="";
	  	pltsPopbot.style.display="none";
	}
	if(MouseX+pltsoffsetX+popWidth>document.body.clientWidth)
	{
		popLeftAdjust=-popWidth-pltsoffsetX*2;
		topleft.style.display="none";
		botleft.style.display="none";
		topright.style.display="";
		botright.style.display="";
	}
	else
	{
		popLeftAdjust=0;
		topleft.style.display="";
		botleft.style.display="";
		topright.style.display="none";
		botright.style.display="none";
	}
	pltsTipLayer.style.left=MouseX+pltsoffsetX+document.body.scrollLeft+popLeftAdjust;
	pltsTipLayer.style.top=MouseY+pltsoffsetY+document.body.scrollTop+popTopAdjust;
  	return true;
}
pltsinits();
//-----------------------------------------
//--> 
</script> 


<body leftmargin="2" topmargin="0" marginwidth="0" marginheight="0" style="font-size: 9pt">
<table width="100%" border="0" align="center" cellpadding="2" cellspacing="1" Class="border">
  <tr class="topbg"> 
    <td colspan=2 class="style2">
	&nbsp;&nbsp;<%response.write "<a href='"&c_HomeUrl&"' title='"&c_HomeName&"'><u>"&c_HomeName&"</u></a>" '首页链接%>&nbsp;&nbsp;&nbsp; <font color="#000000"><b><%=c_title%></b></font>
</td>
  </tr>
<%If admin_login=True Then%>
  <tr class="topbg"> 
    <td colspan=2 class="style5" style="height: 28px">
【 管理员<B><%=Session("lbbs_pic_UserName")%></B>已登录&nbsp;&nbsp;<A HREF='?action=logout' class='style4'><U>退出</U></A> 】 
| <a href="?action=admin">系统设置</a> | <a href="?forder=<%=forder%>&action=nodelpic&page=<%=picPage%>">浏览图片</a> |  <a href="?forder=<%=forder%>&action=delpic&page=<%=picPage%>">删除图片</a> |
</td>
  </tr>
<%
 End if 

'==========================================
If not IsObjInstalled("Scripting.FileSystemObject") Then
	Response.Write "<b><font color=red>你的服务器不支持 FSO(Scripting.FileSystemObject)! 不能显示文件</font></b>"
Else
	set fso=CreateObject("Scripting.FileSystemObject")
	Action=trim(Request("Action"))
	Select Case Action
	Case "admin"
	    '管理设置
		call admin()
	Case "adminsave"
	    '保存设置
		call adminsave()
	Case  "login"
	    '管理登录
		call adminlogin()
	Case  "logincheck"
	    '检查登录
		call logincheck()
	Case  "logout"
	    '退出登录
	    call adminlogout()
	Case   "delpic"
        '显示删除选项
         Call admincheck() '登录检测
         Session("lbbs_pic_delpic")="delpic"
         response.redirect (JoinChar(c_picurl)&"page="&picPage)  
 	Case   "nodelpic"
        '不显示删除选项
         Session("lbbs_pic_delpic")=""
         response.redirect (JoinChar(c_picurl)&"page="&picPage)  
	Case   "Del"
        '删除选中文件
		call DelFiles()		
	Case  "DelAll"
	    '删除当前目录所有文件
		call DelAll()
	Case Else
	     '浏览图片
        call showpic()
	end select
end If
'========================================

'========================================
 '浏览图片
Sub showpic()
%>
  <tr class="tdbg"> 
    <td height="24" style="width: 238px">
	<a title='返回总目录' href='<%=picurl%>'><img alt='' border='0' src='images/alllist.gif' width='16' height='16'>总目录</a><br>
	<%if forder<>"" then response.write"<a title='↑向上…上层目录' href='?forder="&upforder&"'><img alt='' border='0' src='images/up.gif' width='16' height='16'>返回上层目录</a>"%>
</td>
 <td height="24" style="width: 800px; height: 12px;">
转到目录:<select size="1" name="forder"  onchange="javascript:window.location='?forder='+this.options[this.selectedIndex].value;">
<option value="" style="COLOR: #808000" selected>--请选择图片目录--</option>   
<option value="">--总目录--</option>   
<% call bl(0," ",c_UploadDirg) '遍历站点所有文件夹作为下拉列表 %>   
</select> 
<BR>当前位置:<font color='#0000ff'><%=replace(replace(forder,".",""),c_UploadDirg,"总目录")%></font>
</td>
  </tr>
 <tr class="tdbg"> 
    <td height="30" style="width: 238px;" valign="top">
   <% Response.write (ShowFolderList(TruePath))'左侧目录文件列表 %>
    </td>
    <td height="30" style="height: 15px; width: 800px;" valign="top">
   <% call main()'图片列表 %>	
	</td>
  </tr>
</table><p></p>
<%
End Sub
'========================================

'========================================
'遍历站点所有文件夹作为下拉列表
'i全角的空格( )数
'sty符号
'strpath文件夹路径
function bl(i,sty,strpath)
Dim objfolder,objfile,newstrpath,picFile,pi,pi2,picExt,objsubfolder  
set objfolder=fso.getfolder(server.mappath(strpath)) 
for each objsubfolder in objfolder.subfolders
    pi=0
	pi2=0
	For Each picFile In objsubfolder.Files
	  If instr(LCase(c_PicType),LCase(Right(Trim(picFile.name),3)))>0 Then
		  pi=pi+1
      Else
          pi2=pi2+1
	  End If	
	Next
	If CInt(pi)>0 Then pi=" "&pi&"P" Else pi=""
	If CInt(pi2)>0 Then pi2=" "&pi2&"F" Else pi2=""
Response.write ("<option value='" & strpath & "/"& objsubfolder.name & "'")
if forder=strpath& "/"& objsubfolder.name then
   Response.write (" style='COLOR: #0000ff'  selected ")
end If
Response.write (">"&string(i," ")&""& sty & objsubfolder.name & pi & pi2 &"</option>")
i=i+1
call bl(i+1,"└",strpath & "/"& objsubfolder.name)  
i=i-1
next 
End function 
'========================================

'========================================
'图片列表
sub main()
	if fso.FolderExists(TruePath)=False then
		response.write "找不到文件夹!可能是配置有误!"
		exit sub
	end if
	
	FileCount=0
	TotalSize=0
	Set theFolder=fso.GetFolder(TruePath)
	For Each theFile In theFolder.Files
		If instr(LCase(c_PicType),LCase(Right(Trim(theFile.name),3)))>0 Then
		FileCount=FileCount+1
		TotalSize=TotalSize+theFile.Size
		End if
	next
	totalPut=FileCount
	if picPage<1 then
		picPage=1
	end if
	if (picPage-1)*c_MaxPerPage>totalput then
		if (totalPut mod c_MaxPerPage)=0 then
			picPage= totalPut \ c_MaxPerPage
		else
			picPage= totalPut \ c_MaxPerPage + 1
		end if
			end if
	if picPage=1 then
		call showContent()     	
		Call showpage(c_picurl,totalput,c_MaxPerPage)
	else
		if (picPage-1)*c_MaxPerPage<totalPut then
			call showContent()     	
			call showpage(c_picurl,totalput,c_MaxPerPage)
		else
			picPage=1
			call showContent()     	
			call showpage(c_picurl,totalput,c_MaxPerPage)
		end if
	end if
end sub

sub showContent()
   	dim c
	FileCount=0
	TotalSize_Page=0
%>
<table width='100%' border="0" cellpadding="0" cellspacing="0">
<%
'--自定义开始--
If c_cook  =  "YES" Then
%>
  <form method="POST" action="<%=JoinChar(c_picurl)%>action_cook=cookies">
					<tr  class="tdbg">
						<td height="30" width="756">
				<p align="left">
				自定义:<span class="style3">每页图片数</span><input type="text" name="cook_MaxPerPage" size="5" value="<%=c_MaxPerPage%>" style="border: 1px solid #808000; width: 25px;" title="输入1-30之间的数字!"><span class="style3"> 
				每行图片数</span><input type="text" name="cook_Page" size="12" value="<%=c_Page%>" style="border: 1px solid #808000; width: 21px;" title="输入1-10之间的数字!">&nbsp; 
				图片宽<input type="text" name="cook_picwidth" size="10" value="<%=c_picwidth%>" style="border: 1px solid #808000; width: 42px;" title="输入20-800之间的数字!">
				高<input type="text" name="cook_picheight" size="10" value="<%=c_picheight%>" style="border: 1px solid #808000; width: 39px;" title="输入20-800之间的数字!"></font>&nbsp;
				<select size="1" name="CookieTime" class="input">
				<option selected value="0">是否记忆</option>
				<option value="1">记忆一天</option>
				<option value="2">记忆一周</option>
				<option value="3">记忆一月</option>
				<option value="4">记忆一年</option>
				</select>
				
				<input type="submit" value="提交" name="B1">&nbsp;
				<input type="button" value="恢复默认值" name="B3"  onClick="window.location.href='<%=JoinChar(c_picurl)%>action_cook=con'">
</p>
			</td>
					</tr>
				</form>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -