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

📄 admin_upfilemanage.asp

📁 完美政府版,正版网站解决方案
💻 ASP
📖 第 1 页 / 共 2 页
字号:
			for each x in theFiles
				if i>(MyPageSize*(Mypage-1)) and i<(MyPageSize*Mypage+1) then
					if Request("attrib")="true" then
						showstring="<strong>"&x.Name&"</strong>"
					else
						showstring="<a href='"&urlpath&lpath&x.Name&"' target='_blank'><strong>"&x.Name&"</strong></a>"
					end if
					
					if Check_Attach="1" then
						Set rs = Server.CreateObject("ADODB.Recordset")
						sql ="select * from "& db_Attach_Table &" where filename like '%"& x.name &"%'" 
						rs.open sql,conn,1,1
						do until rs.eof
							'在上传附件表中搜索是否有上传记录
							contain=contain&"<a href='Article.asp?NewsID="& rs("newsid") &"' target='_blank' title='在上传附件表中显示该附件在ID号为"& rs("newsid") &"的文章中被引用'>上传记录:" & rs("newsid") & "号文章</a><br>"
							rs.MoveNext
						loop
						rs.close
						set rs=nothing
					end if
					
					if Check_News="1" then					
						Set rs = Server.CreateObject("ADODB.Recordset")
						sql ="select * from "& db_News_Table &" where Content like '%"& x.name &"%'"
						rs.open sql,conn,1,1
						if not rs.eof then
							contain= contain & x.name &"符合内容记录["& rs.RecordCount &"]<a href='Article.asp?NewsID="& rs("newsid") &"' target='_blank' title='该附件在ID号为"& rs("newsid") &"的文章内容中被引用'><font color='green'>新闻内容:" & rs("newsid") & "号文章</font></a><br>"
							do until rs.eof
								'在新闻的具体内容中搜索是否被引用
								cont_search = Instr(1, rs("Content"),x.name, 1)
								if cont_search>0 then
									contain=contain&"<a href='Article.asp?NewsID="& rs("newsid") &"' target='_blank' title='该附件在ID号为"& rs("newsid") &"的文章内容中被引用'><font color='green'>新闻内容:" & rs("newsid") & "号文章第"& cont_search &"字处</font></a><br>"
								end if
								rs.MoveNext
							loop
						end if
						rs.close
						set rs=nothing
					end if

					if Check_UserFace="1" then
						Set rs = Server.CreateObject("ADODB.Recordset")
						sql ="select * from "& db_User_Table &" where "& db_User_Face &" like '%"& x.name &"%'"
						rs.open sql,ConnUser,1,1
						do until rs.eof
							'在用户表中搜索文件是否是头象引用
							contain=contain&"<a href='User.asp?User="& rs(db_User_Name) &"' target='_blank' title='该附件为用户"& rs(db_User_Name) &"的头象文件'><font color='green'>用户"& rs(db_User_Name) &"的头象文件</font></a><br>"
							rs.MoveNext
						loop
						rs.close
						set rs=nothing

					end if
					
					if contain="" then
						contain="无引用或不在选择的验证项中"
					end if

					response.write "<table border='1' cellpadding='0' cellspacing='0' style='border-collapse: collapse' bordercolor='#C0C0C0' width='100%' id='AutoNumber1'>"
					response.write "<tr>"
					response.write "<td width='30%' bgcolor=#ffffff height=20 >□"&showstring&"</td>"
					response.write "<td width='30%' align='center' bgcolor=#ffffff>"&contain&"</td>"
					response.write "<td width='15%' align='right' bgcolor=#ffffff>"&x.size&"字节&nbsp;&nbsp;</td>"
					response.write "<td width='15%' align='center' bgcolor=#ffffff><a href='#' title='"&"文件类型:"&x.type&chr(10)&"文件属性:"&Get_Attribute(x.Attributes,"、")&chr(10)&"创建(上传):"&x.DateCreated&chr(10)&"最近访问:"&x.DateLastAccessed&chr(10)&"最后修改:"&x.DateLastModified&"'>属性</a></td>"
					response.write "<td width='10%' align='center' bgcolor=#ffffff><input name='pathfile' type='checkbox' id='pathfile' value='"&lpath&x.Name&"'></td>"
					response.write "</tr>"
					response.write "</table>"
					contain=""
					cont_search=0
				end if
				if i>(MyPageSize*Mypage) then
					exit for
				end if
				i=i+1
			next
		end if
		%>
<table border="1" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" style="border-collapse: collapse" bordercolor="#C0C0C0" width="100%" id="AutoNumber1">
<tr>
	<td height="20" colspan="5">当前文件目录:<%=urlpath%>/<%
		Dim Path_String, Path_Array,Path_Url
		Path_Url=""
		Path_String = Split(lpath, "/", -1, 1)
		for each Path_Array in Path_String
			if Path_Array<>"" then
				Path_Url=Path_Url &"/"& Path_Array
				response.write "<a href='"& ThisNameFile &"?path="& Path_Url &"' title='点击查看 ["& urlpath & Path_Url &"] 目录'><font color=green>"& Path_Array &"/</font></a>"
			end if
		next
		%>
	</td>
</tr>
<tr>
	<td height="20" colspan="5">子目录:<%
		for each SubF in theSubFolders%>
		<a href='<%=ThisNameFile&"?path="& lpath & SubF.name %>'  title='点击查看 [<%=lpath & SubF.name%>] 目录'>〈<%= SubF.name %>〉</a>
		<%next%>
	</td>
</tr>
<tr>
	<td height="20" colspan="5" bgcolor=#eeeeee align=right>
		<input type=hidden name=path value=<%=r_path%>>
		<input type=hidden name=page value=<%=MyPage%>>
		<input type=hidden name=attrib value=<%=attrib%>>
		<input type=checkbox name=chkall value=on onClick="CheckAll(this.form)">选中所有显示的文件&nbsp;
		<input type=submit name=action onClick="{if(confirm('删除选定的上传文件吗?')){this.document.check.submit();return true;}return false;}" value="删除文件" style="font-size: 9pt;  color: #000000; background-color: #EAEAF4; solid #EAEAF4" onMouseOver ="this.style.backgroundColor='#ffffff'" onMouseOut ="this.style.backgroundColor='#EAEAF4'">
	</td>
</tr>
</form>
<tr>
	<td height="25" colspan="5" align=center>
		<%
		Response.write "共 "& total &" 个文件,当前第 "& Mypage &"/"& Maxpages &" 页,每页 "& MyPageSize &" 个文件 <br>"
		url="Admin_UpFileManage.asp?path="& lpath &"&order="&order									
		PageNextSize=int((MyPage-1)/PageShowSize)+1
		Pagetpage=Maxpages
		if PageNextSize >1 then
			PagePrev=PageShowSize*(PageNextSize-1)
			Response.write "<a class=black href='" & Url & "&page=" & PagePrev & "' title='上" & PageShowSize & "页'>上一翻页</a> "
			Response.write "<a class=black href='" & Url & "&page=1' title='第1页'>页首</a> "
		end if
		if MyPage-1 > 0 then
			Prev_Page = MyPage - 1
			Response.write "<a class=black href='" & Url & "&page=" & Prev_Page & "' title='第" & Prev_Page & "页'>上一页</a> "
		end if
		
		if Maxpages>=PageNextSize*PageShowSize then
			PageSizeShow = PageShowSize
		Else
			PageSizeShow = Maxpages-PageShowSize*(PageNextSize-1)
		End if
		If PageSizeShow < 1 Then PageSizeShow = 1
		for PageCounterSize=1 to PageSizeShow
			PageLink = (PageCounterSize+PageNextSize*PageShowSize)-PageShowSize
			if PageLink <> MyPage Then
				Response.write "<a class=black href='" & Url & "&page=" & PageLink & "'>[" & PageLink & "]</a> "
			else
				Response.Write "<B>["& PageLink &"]</B> "
			end if
			If PageLink = MaxPages Then Exit for
		next
		
		if Mypage+1 <=Pagetpage  then
			Next_Page = MyPage + 1
			Response.write "<a class=black href='" & Url & "&page=" & Next_Page & "' title='第" & Next_Page & "页'>下一页</A>"
		end if
		
		if MaxPages > PageShowSize*PageNextSize then
			PageNext = PageShowSize * PageNextSize + 1
			Response.write " <A class=black href='" & Url & "&page=" & Pagetpage & "' title='第"& Pagetpage &"页'>页尾</A>"
			Response.write " <a class=black href='" & Url & "&page=" & PageNext & "' title='下" & PageShowSize & "页'>下一翻页</a>"
		end if
		%>
	</td>
</tr>
<form action="Admin_UpFileManage.asp" method=post name=select>
<tr>
	<td height="25" colspan="5" bgcolor=#ffffff align=center>
		查找验证项:
		<input type=hidden name=path value=<%=r_path%>>
		<input type=hidden name=page value=<%=MyPage%>>
		<input type=hidden name=attrib value=<%=attrib%>>
		<input type=hidden name=Check_Save value="ok">
		<input type=checkbox name=Check_Attach value="1" <%if Check_Attach="1" then%>checked<%end if%>>上传附件表&nbsp;&nbsp;
		<input type=checkbox name=Check_News value="1" <%if Check_News="1" then%>checked<%end if%>>新闻内容&nbsp;&nbsp;
		<input type=checkbox name=Check_UserFace value="1" <%if Check_UserFace="1" then%>checked<%end if%>>用户头象&nbsp;&nbsp;
		<input type=submit name=Check_Sel value="设定" style="font-size: 9pt;  color: #000000; background-color: #EAEAF4; solid #EAEAF4" onMouseOver ="this.style.backgroundColor='#ffffff'" onMouseOut ="this.style.backgroundColor='#EAEAF4'">
	</td>
</tr>
</form>
<tr>
	<td height="25" colspan="5" bgcolor=#ffffff align=center>
		<font color=green>系统中的文章较多时可能需耗费更多的时间,请耐心等待!</font>
	</td>
</tr>
</table>
</div>
<!--#include file="Admin_Bottom.asp"-->
		<%
		set rs=nothing
		conn.close
		set conn=nothing
		ConnUser.close
		set ConnUser=nothing
	else
		Show_Err("对不起,该功能已经被超级系统管理员关闭,您没有权限操作!")
		response.end
	end if
end if%>

⌨️ 快捷键说明

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