📄 editmyfile.asp
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="conn.asp" -->
<!--#include file="const.asp" -->
<!--#include file="chklink.asp" -->
<!--#include file="katxt.asp"-->
<% dim inname
dim rs,spl
inname=session("inname")
if inname="" then
response.write "<script>alert('对不起!只有正式用户使用本页!');window.close();</script>"
response.end
end if
Set rs= Server.CreateObject("ADODB.Recordset")
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>管理我的存储文档 | WLONG3D文件上传系统wlup3.5</title>
<link href="FORUM.CSS" rel="stylesheet" type="text/css">
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_openBrWindow(theURL,winName,features) { //v2.0
window.open(theURL,winName,features);
}
//-->
</script>
</head>
<body text="#000000" link="#000000" vlink="#000000" alink="#FF0000">
<table width="95%" border="0" align="center" cellpadding="3" cellspacing="1" bgcolor="#6699FF">
<tr>
<td colspan="2" align="center" bgcolor="#99CCFF"><img src="upfile/map/JJCBAR.GIF" width="468" height="60"></td>
</tr>
<tr>
<td colspan="2" align="center" bgcolor="#FFCC00"><strong>WLONG3D文件上传系统wlup3.5</strong></td>
</tr>
<tr>
<td width="25%" align="center" valign="top" bgcolor="#FFFFFF"><table width="100%" border="0" cellpadding="3" cellspacing="1" bgcolor="#6699FF">
<tr align="center" bgcolor="#99CCFF">
<td colspan="2">【用户档案】</td>
</tr>
<%
sql="select * from [user] where nickname='"&inname&"'"
rs.open sql,conn,1,1
if not(rs.eof and rs.bof) then
%>
<tr>
<td width="28%" align="right" bgcolor="#eeeeee">真名</td>
<td width="72%" bgcolor="#FFFFFF"><%=rs("username")%></td>
</tr>
<tr>
<td align="right" bgcolor="#eeeeee">昵称</td>
<td bgcolor="#FFFFFF"><%=rs("nickname")%></td>
</tr>
<tr>
<td align="right" bgcolor="#eeeeee">生日</td>
<td bgcolor="#FFFFFF"><%=rs("shengri")%></td>
</tr>
<tr>
<td align="right" bgcolor="#eeeeee">OICQ</td>
<td bgcolor="#FFFFFF"><%=rs("oicq")%></td>
</tr>
<tr>
<td align="right" bgcolor="#eeeeee">EMAIL</td>
<td bgcolor="#FFFFFF"><%=rs("email")%></td>
</tr>
<tr>
<td align="right" bgcolor="#eeeeee">主页</td>
<td bgcolor="#FFFFFF"><%=rs("url")%></td>
</tr>
<tr>
<td align="right" bgcolor="#eeeeee">软件</td>
<td bgcolor="#FFFFFF"><%=rs("soft")%></td>
</tr>
<tr>
<td align="right" bgcolor="#eeeeee">特长</td>
<td bgcolor="#FFFFFF"><%=rs("techang")%></td>
</tr>
<% end if
rs.close %>
<tr align="center" bgcolor="#99CCFF">
<td colspan="2">【<a href="editmy.asp">修改资料</a>】</td>
</tr>
<tr align="center" bgcolor="#99CCFF">
<td colspan="2">【<a href="MAKEFILE.ASP">继续上传</a>】</td>
</tr>
<tr align="center" bgcolor="#99CCFF">
<td colspan="2">【<a href="LOGIN.ASP">退出系统</a>】</td>
</tr>
</table></td>
<td width="75%" align="right" valign="top" bgcolor="#FFFFFF">
<%
dim totalPut
dim CurrentPage
dim TotalPages
dim i,j
dim idlist
dim title,filename
dim selsql,sel,showlink,selmap,selnum
dim MaxAnnouncePerpage
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=25
filename="editmyfile.asp"
sel=request("sel")
title=request("txtitle")
if sel="" then
showlink="全部作品"
if title="" then
sqlsel=" where username = '"&trim(inname)&"' "
else
sqlsel=" where username = '"&trim(inname)&"' and (mapname like '%"&trim(title)&"%' or shuoming like '%"&trim(title)&"%' or softwave like '%"&trim(title)&"%') "
end if
else
showlink=sel
if title="" then
sqlsel=" where username = '"&trim(inname)&"' and mapfl='"&sel&"' "
else
sqlsel=" where mapfl='"&sel&"' and username = '"&trim(inname)&"' 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="3" bgcolor="#FF9900">
<tr bgcolor="#99CCFF">
<td colspan="2" align="center">
<table width="100%" border="0" cellspacing="0" cellpadding="2">
<tr bgcolor="#99CCFF">
<form name="searchuser" method="POST" action="editmyfile.asp">
<td width="32%" valign="bottom">当前>>><%=showlink%>
<% if title<>"" then %>
>>>搜索[<%=title%>]
<% end if %>
</td>
<td width="68%" align="right" valign="bottom">
<% Set rs= Server.CreateObject("ADODB.Recordset")
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("mapfl")%>"><%=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 upmap "&sqlsel&" order by mapid 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="editmyfile.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="#" onClick="MM_openBrWindow('showmyfile.asp?mapid=<%=rs("mapid")%>','','scrollbars=yes,width=450,height=550')" title="点击修改文件[<%=HTMLEncode(rs("mapname"))%>]"><%=chkshow(rs("mapurl"))%></a><br>
<br>
<input type="checkbox" name="mapid" value="<%=rs("mapid")%>" class="buttonface">
【<%=HTMLEncode(rs("mapname"))%>】<br>
<br>
</td>
<% if j=5 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>
<td bgcolor="#FFFFFF" 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 "首页 上一页 "
else
response.write "<a href="&filename&"?page=1&txtitle="&request("txtitle")&"&sel="&sel&">首页</a> "
response.write "<a href="&filename&"?page="&CurrentPage-1&"&txtitle="&request("txtitle")&"&sel="&sel&">上一页</a> "
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 " 页次:</font><strong><font color=red>"&CurrentPage&"</font>/"&n&"</strong>页 "
response.write " 共<b>"&totalput&"</b>个文件 <b>"&MaxAnnouncePerPage&"</b>个文件/页 "
%>
</td>
</tr>
</form>
</table>
<%
sub deleteannounce(id)
dim rs,sql
dim mapurl
set rs=server.createobject("adodb.recordset")
sql="select mapname,mapurl from upmap where mapid="&cstr(id)
rs.open sql,conn,1,1
if not(rs.eof and rs.bof) then
mapurl=rs("mapurl")
end if
rs.close
dim fs,path
path=Server.mappath(mapurl)
set fs=createobject("scripting.filesystemobject")
if not fs.fileexists(path) then
sql="delete from upmap where mapid="&cstr(id)
conn.execute sql
sql="update [user] set upnum=upnum-1 where nickname='"&inname&"'"
conn.Execute(sql)
if err.Number<>0 then
err.clear
response.write "删除失败!<br>"
else
response.write "没有文件,数据"&cstr(id)&"被删除了!<br>"
end if
else
fs.DeleteFile(path)
sql="delete from upmap where mapid="&cstr(id)
conn.execute sql
sql="update [user] set upnum=upnum-1 where nickname='"&inname&"'"
conn.Execute(sql)
if err.Number<>0 then
err.clear
response.write "删除失败 !<br>"
else
response.write "文件"&cstr(id)&"被删除了!<br>"
end if
end if
End sub
set rs=nothing
%>
</td>
</tr>
<tr align="center">
<td colspan="2" bgcolor="#FFCC00">版权所有 ©2003-2006 <a href="http://www.wlong3d.com/" target="_blank">www.wlong3d.com</a></td>
</tr>
</table>
</body>
</html>
<% conn.close
set conn=nothing
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -