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

📄 adminupfile.asp

📁 Flash电子相册 v1.2 Build 1108完整版本下载
💻 ASP
字号:
<%@ LANGUAGE="VBSCRIPT" %>
<!--#include file="conn.asp"-->
<!--#include file="katxt.asp"-->
<%
	  if session("admin")="" then
  response.redirect "admin.asp"
  else
	if session("flag")<1 then
		response.write "<script>alert('对不起!你不是管理员!');history.back();</script>"
		response.end
	end if
  end if
	Set rs= Server.CreateObject("ADODB.Recordset")
%>
<title>管理数据库图片 | WLONG3D文件上传系统wlup3.5</title>
<link rel="stylesheet" href="FORUM.CSS" type="text/css">
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
//-->
</script>
<body bgcolor="#FFFFFF" text="#000000" link="#000000" vlink="#000000" alink="#FF0000">
<table width="95%" border="0" cellspacing="1" cellpadding="0" align="center" bgcolor="#6699FF">
  <tr bgcolor="#99CCFF"> 
    <td colspan="2" height="22"> 
      <div align="center"><b>WLONG3D文件上传系统wlup3.5</b></div>
    </td>
  </tr>
  <tr> 
    <td width="21%" bgcolor="#FFFFCC" valign="top"> 
      <!--#include file="left.asp" -->
    </td>
    <td width="79%" bgcolor="#FFFFFF" align="right" valign="top"> 
      <%
   	dim totalPut   
   	dim CurrentPage
   	dim TotalPages
   	dim i,j
   	dim idlist
   	dim title,filename
	dim selsql,sel,showlink,selmap,selnum
	dim MaxAnnouncePerpage
function mfl(fid)
    	tmprs=conn.execute("Select mapfl from mapfl where flid="&fid&"") 
    	mfl=tmprs(0) 
	set tmprs=nothing
end function

    if not isempty(request("mapid")) then
     		idlist=request("mapid")
     		if instr(idlist,",")>0 then
		dim idarr
		idArr=split(idlist)
		dim id
		for i = 0 to ubound(idarr)
	       		id=clng(idarr(i))
	       		call deleteannounce(id)
		next
     		else
			call deleteannounce(clng(idlist))
     		end if
  	end if

	MaxAnnouncePerpage=20
	filename="adminupfile.asp"
	sel=request("sel")
	title=request("txtitle")

	if sel="" then
        showlink="全部作品"
	if title="" then
	sqlsel=""
	else
	sqlsel=" where mapname like '%"&trim(title)&"%' or shuoming like '%"&trim(title)&"%' or softwave like '%"&trim(title)&"%' "
	end if
	else
        showlink=mfl(sel)
	if title="" then
	sqlsel=" where mapfl="&sel&" "
	else
	sqlsel=" where mapfl="&sel&" and (mapname like '%"&trim(title)&"%' or shuoming like '%"&trim(title)&"%' or softwave like '%"&trim(title)&"%') "
	end if
	end if
   	if not isempty(request("page")) then
      		currentPage=cint(request("page"))
  	else
      		currentPage=1
   	end if
	 	  	
%>
      <table width="98%" border="0" cellspacing="1" cellpadding="1" bgcolor="#FF9900">
        <tr bgcolor="#FFCC00"> 
          <td colspan="2" align="center"> <table width="100%" border="0" cellspacing="0">
              <tr> 
                <form name="searchuser" method="POST" action="adminupfile.asp">
                  <td width="32%" valign="bottom">当前&gt;&gt;&gt;<%=showlink%> 
                    <% if title<>"" then %>
                    &gt;&gt;&gt;搜索[<%=title%>] 
                    <% end if %>
                  </td>
                  <td width="68%" align="right" valign="bottom"> 
                    <%  
	sql="select * from mapfl order by flid asc"
	rs.open sql,conn,1,1
	if rs.eof and rs.bof then
%>
                    目前没有分类 
                    <% else %>
                    搜索: 
                    <input type="text" name="txtitle" size="13" class="buttonface"> 
                    <select name="sel" class="buttonface">
                      <option value="" selected>所有作品</option>
                      <% 
        do while not rs.eof
%>
                      <option value="<%=rs("flid")%>"><%=rs("mapfl")%></option>
                      <%
        rs.movenext
        loop
%>
                    </select> 
                    <%
	end if
        rs.close
%>
                    <input type="submit" value="提交" name="title" class="buttonface"> 
                  </td>
                </form>
              </tr>
            </table></td>
        </tr>
        <%
	   sql="select * from smap "&sqlsel&" order by tid desc"
'	Set rs= Server.CreateObject("ADODB.Recordset")
	rs.open sql,conn,1,1

  	if rs.eof and rs.bof then
%>
        <tr> 
          <td bgcolor="#FFFFFF" align="center" colspan="2">目前没有任何作品!</td>
        </tr>
        <%  
   	else
	
      		totalPut=rs.recordcount 
      		if currentpage<1 then 
          		currentpage=1 
      		end if 
       MaxAnnouncePerpage=Clng(MaxAnnouncePerpage)
      		if (currentpage-1)*MaxAnnouncePerPage>totalput then 
	   		if (totalPut mod MaxAnnouncePerPage)=0 then 
	     			currentpage= totalPut \ MaxAnnouncePerPage 
	   		else 
	      			currentpage= totalPut \ MaxAnnouncePerPage + 1 
	   		end if 
      		end if 
%>
        <form name="form1" method="post" action="adminupfile.asp?page=<%=currentpage%>&txtitle=<%=request("txtitle")%>&sel=<%=sel%>">
          <tr> 
            <td bgcolor="#99CCFF" width="10%" align="center"> <input type="submit" name="Submit" value="删除" class="buttonface"> 
            </td>
            <td bgcolor="#FFFFFF" width="90%">【操作说明】<font color="#FF0000">点击图片看大图,点击文件名修改文件介绍,点选相应(可以多选)文件,再按“删除”可以批量删除文件。</font></td>
          </tr>
          <tr> 
            <td bgcolor="#FFFFFF" valign="top" colspan="2"> 
              <%
       		if currentPage=1 then 
                        showContent  
       		else 
          		if (currentPage-1)*MaxAnnouncePerPage<totalPut then 
            			rs.move  (currentPage-1)*MaxAnnouncePerPage
            			dim bookmark 
            			bookmark=rs.bookmark  
            			showContent  
        		else 
	        		currentPage=1 
           			showContent 
	      		end if 
	   	end if
   	rs.close
   	end if 

   	sub showContent
       	dim i,j
	   i=0

%>
              <table width="100%" border="0" cellspacing="0" cellpadding="4">
                <tr> 
                  <% do while not rs.eof
    j=j+1 %>
                  <td align="center" width="19%"><a href="showpic.asp?tid=<%=rs("tid")%>" target="_blank"><img src="showpic.asp?tid=<%=rs("tid")%>" width="80" height="80" border="1"></a><br> 
                    <br> <input type="checkbox" name="mapid" value="<%=rs("tid")%>" class="buttonface">
                    【<a href="#" onClick="MM_openBrWindow('showupfile.asp?tid=<%=rs("tid")%>','','scrollbars=yes,width=450,height=550')" title="点击修改文件[<%=HTMLEncode(rs("mapname"))%>]"><%=HTMLEncode(rs("mapname"))%></a>】<br> 
                    <br> </td>
                  <% 	if j=4 then
	response.write "</tr><tr>"
	j=0
	end if
	i=i+1
	if i>=MaxAnnouncePerPage then exit do
	rs.movenext
	loop
%>
                </tr>
              </table>
              <% end sub %>
            </td>
          </tr>
          <tr bgcolor="#99CCFF"> 
            <td align="right" colspan="2"> 
              <%  dim n
  if totalput mod MaxAnnouncePerPage=0 then
     n= totalput \ MaxAnnouncePerPage
  else
     n= totalput \ MaxAnnouncePerPage+1
  end if
  if CurrentPage<2 then
    response.write "首页 上一页&nbsp;"
  else
    response.write "<a href="&filename&"?page=1&txtitle="&request("txtitle")&"&sel="&sel&">首页</a>&nbsp;"
    response.write "<a href="&filename&"?page="&CurrentPage-1&"&txtitle="&request("txtitle")&"&sel="&sel&">上一页</a>&nbsp;"
  end if
  if n-currentpage<1 then
    response.write "下一页 尾页"
  else
    response.write "<a href="&filename&"?page="&(CurrentPage+1)&"&txtitle="&request("txtitle")&"&sel="&sel&">"
    response.write "下一页</a> <a href="&filename&"?page="&n&"&txtitle="&request("txtitle")&"&sel="&sel&">尾页</a>"
  end if
   response.write "&nbsp;页次:</font><strong><font color=red>"&CurrentPage&"</font>/"&n&"</strong>页 "
    response.write "&nbsp;共<b>"&totalput&"</b>幅图片 <b>"&MaxAnnouncePerPage&"</b>幅图片/页 "
%>
            </td>
          </tr>
        </form>
      </table>
      <% 
  sub deleteannounce(id)
    dim rs,sql
	dim delid
    set rs=server.createobject("adodb.recordset")
	sql="select userid from smap where tid="&cstr(id)
	rs.open sql,conn,1,1
  	if not(rs.eof and rs.bof) then
	delid=rs("userid")
	end if
	rs.close
    sql="delete from smap where tid="&cstr(id)
    conn.execute sql
	sql="update [user] set upnum=upnum-1 where userid="&delid
	conn.Execute(sql)
    if err.Number<>0 then
	err.clear
	response.write "删除失败!<br>"
    else
        response.write "图片数据"&cstr(id)&"被删除了!<br>"
    end if
  End sub  

%>
    </td>
  </tr>
  <tr> 
    <td colspan="2" bgcolor="#FFCC00" height="22" align="center"> 版权所有&nbsp;&copy;&nbsp;2003-2006&nbsp;<a href="http://www.wlong3d.com">wlong3d.com</a> 
    </td>
  </tr>
</table>
<% set rs=nothing
   conn.close
   set conn=nothing
%>

⌨️ 快捷键说明

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