📄 index.asp
字号:
<!--#include file="conn.asp"-->
<%
'****************************************************
' 文件上传系统UploFlin v1.0 Power by eekku.com
' Web: http://www.eekku.com
' 负零制作 QQ:252687345
' Copyright (C) 2007 Flin工作室 All Rights Reserved.
'****************************************************
session("intro")=request("intro")
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="../css.css" type="text/css">
<title>负零文件上传管理系统1.0</title>
<base target="_self">
<style type="text/css">
<!--
body,td,th {
font-size: 12px;
}
a {
font-size: 12px;
}
a:link {
text-decoration: none;
color: #3399FF;
}
a:visited {
text-decoration: none;
color: #3399FF;
}
a:hover {
text-decoration: underline;
color: #0066FF;
}
a:active {
text-decoration: none;
color: #0066FF;
}
-->
</style></head>
<body>
<table border="0" width="100%" cellspacing="0" cellpadding="4" bgcolor="#FFFFFF" style="border:1px solid #000000; " height="238">
<tr>
<td background="images/admin_bg_1.gif" height="25">
<p align="center"><font size="2" color="#FFFFFF"><b>上传文件管理</b></font></td>
</tr>
<tr>
<td bgcolor="#FFFFFF" height="26" align="center">
<%
if session("intro")="" then
%>
<form method="POST" action="index.asp">
<p align="center"><b>上传新文件</b> 文件说明: <input type="text" name="intro" size="27" style="border-style: solid; border-width: 1px; padding-left: 4px; padding-right: 4px; padding-top: 1px; padding-bottom: 1px">
<input type="submit" value="下一步" name="B3"> <input type="reset" value="重置" name="B4"></p>
</form>
<%
else
%>
<script language=javascript>
function test()
{
if (document.form1.strFile1.value==""){
alert("请选择文件!")
document.form1.strFile1.focus();
return false
}
return true
}
function reset_form()
{
document.form1.name.value="";
document.form1.pwd.value="";
document.form1.userr.value="";
document.form1.name.focus;
}
</script>
<FORM NAME="FORM" ACTION="upload.asp" METHOD="POST" onSubmit="return test()">
请选择文件
<input type="file" name="upfile" size="20" style="border-style: solid; border-width: 1px; padding-left: 4px; padding-right: 4px; padding-top: 1px; padding-bottom: 1px">
<INPUT TYPE="SUBMIT" NAME="SUBMIT" VALUE="上传">
</form>
<%
end if
%></td>
</tr>
<tr>
<td bgcolor="#F1F3F5" height="100%" align="center">
<%
sql="select * from upfiles order by id desc"
rs.open sql,conn,1,1
if rs.recordcount=0 then
response.write "暂无文件!"
else
rs.pagesize=20
if request("action")="n" then
session("page")=session("page")+1
else
if request("action")="p" then
session("page")=session("page")-1
else
if request("action")="f" then
session("page")=1
else
if request("action")="l" then
session("page")=rs.pagecount
else
if isnumeric(request("page1"))=true then
session("page")=clng(request("page1"))
else
session("page")=1
end if
end if
end if
end if
end if
if session("page")>rs.pagecount then session("page")=rs.pagecount
if session("page")<1 then session("page")=1
%>
<table border="0" width="650" cellspacing="0" cellpadding="0" height="25">
<tr>
<td width="104">
共有文件<font color="#FF0000"><%=rs.recordcount%></font>个</td>
<td width="112">
<p align="center">当前页码:<font color="#FF0000"><%=session("page")%></font>/<%=rs.pagecount%></td>
<td width="248">
<p align="center">< <a href="?action=f">
首页</a>
<a href="?action=p">上一页</a>
<a href="?action=n">下一页</a>
<a href="?action=l">尾页</a> ></td>
<td width="186">
<form method="POST" action="index.asp">
<p align="center">跳转到
<input type="text" name="page1" size="5" style="border: 1px solid #000000">
页
<input type="submit" value="提交" name="B1"></p>
</form></td>
</tr>
</table> </td>
</tr>
<tr>
<td height="100%" valign="top" ><table width="100%" height="67" border="1" cellpadding="0" cellspacing="0" bordercolor="#3399FF">
<tr>
<td style="border-bottom: 1px dotted #000000; padding-left: 4px; padding-right: 4px; padding-top: 1px; padding-bottom: 1px" width="44" bgcolor="#E5E5E5" height="28" align="center"><p align="center"><b>编号</b></td>
<td width="82" height="28" align="center" bgcolor="#E5E5E5" style="border-bottom: 1px dotted #000000; padding-left: 4px; padding-right: 4px; padding-top: 1px; padding-bottom: 1px"><p align="center"><b>文件名</b></td>
<td width="50" align="center" bgcolor="#E5E5E5" style="border-bottom: 1px dotted #000000; padding-left: 4px; padding-right: 4px; padding-top: 1px; padding-bottom: 1px">类型</td>
<td width="293" height="28" align="center" bgcolor="#E5E5E5" style="border-bottom: 1px dotted #000000; padding-left: 4px; padding-right: 4px; padding-top: 1px; padding-bottom: 1px"><p align="center"><b>说明</b></td>
<td style="border-bottom: 1px dotted #000000; padding-left: 4px; padding-right: 4px; padding-top: 1px; padding-bottom: 1px" width="67" bgcolor="#E5E5E5" height="28" align="center"><p align="center"><b>大小</b></td>
<td style="border-bottom: 1px dotted #000000; padding-left: 4px; padding-right: 4px; padding-top: 1px; padding-bottom: 1px" width="99" bgcolor="#E5E5E5" height="28" align="center"><p align="center"><b>上传时间</b></td>
<td style="border-bottom: 1px dotted #000000; padding-left: 4px; padding-right: 4px; padding-top: 1px; padding-bottom: 1px" align="center" height="28" colspan="2" bgcolor="#E5E5E5"><b>操作</b></td>
</tr>
<%
rs.absolutepage=session("page")
for ii=1 to rs.pagesize
%>
<tr>
<td style="border-bottom: 1px dotted #000000; padding-left: 4px; padding-right: 4px; padding-top: 1px; padding-bottom: 1px" width="44" height="25"><p align="center"><%=rs("id")%></td>
<td width="82" height="25" style="border-bottom: 1px dotted #000000; padding-left: 4px; padding-right: 4px; padding-top: 1px; padding-bottom: 1px"><div align="center"><%=rs("filename")%></div></td>
<td width="50" height="25" style="border-bottom: 1px dotted #000000; padding-left: 4px; padding-right: 4px; padding-top: 1px; padding-bottom: 1px"><div align="center"><%=replace(rs("ext"),".","")%></div></td>
<td height="25" bgcolor="#FFFFFF" style="border-bottom: 1px dotted #000000; padding-left: 4px; padding-right: 4px; padding-top: 1px; padding-bottom: 1px"><p align="center"><%=rs("intro")%></td>
<td style="border-bottom: 1px dotted #000000; padding-left: 4px; padding-right: 4px; padding-top: 1px; padding-bottom: 1px" width="67" bgcolor="#FFFFFF" height="25"><p align="center">
<%if Clng(rs("size"))>(1024*1024) then
response.Write Clng(rs("size")/(1024*1024))&"MB"
elseif Clng(rs("size"))>1024 then
response.Write Clng(rs("size")/1024)&"KB"
else
response.Write Clng(rs("size"))&"字节"
end if%>
</td>
<td style="border-bottom: 1px dotted #000000; padding-left: 4px; padding-right: 4px; padding-top: 1px; padding-bottom: 1px" width="99" height="25"><p align="center"><%=Mid(rs("update"),1,Instr(rs("update")," "))%></td>
<td style="border-bottom: 1px dotted #000000; padding-left: 4px; padding-right: 4px; padding-top: 1px; padding-bottom: 1px" width="47" align="center" height="25" bgcolor="#FFFFFF"><a target="_blank" href="<%=GetUrl&rs("fileurl")%>">查看</a></td>
<td style="border-bottom: 1px dotted #000000; padding-left: 4px; padding-right: 4px; padding-top: 1px; padding-bottom: 1px" width="58" align="center" height="25" bgcolor="#E5E5E5"><a onClick="{if(confirm('警告:此操作将删除文件(ID=<%=rs("id")%>)!继续吗?')){return true;}return false;}" href="del_file.asp?file=<%=rs("fileurl")%>"><span style="text-decoration: none"><font color="#000000">删除</font></span></a></td>
</tr>
<tr>
<td style="border-bottom: 1px dotted #000000; padding-left: 4px; padding-right: 4px; padding-top: 1px; padding-bottom: 1px" bgcolor="#E5E5E5" height="25">网址:</td>
<td height="25" colspan="6" bgcolor="#E5E5E5" style="border-bottom: 1px dotted #000000; padding-left: 4px; padding-right: 4px; padding-top: 1px; padding-bottom: 1px"> <input name="textfield" type="text" value="<%=GetUrl&rs("fileurl")%>" size="60" >
<input type="button" name="Submit" onClick='copyToClipBoard<%=rs("id")%>()' value="复制">
<script language="javascript">
function copyToClipBoard<%=rs("id")%>(){
var clipBoardContent="";
clipBoardContent+="<%=GetUrl&rs("fileurl")%>";
window.clipboardData.setData("Text",clipBoardContent);
alert("复制网址成功!");
}
</script> </td>
<td height="25" bgcolor="#E5E5E5" style="border-bottom: 1px dotted #000000; padding-left: 4px; padding-right: 4px; padding-top: 1px; padding-bottom: 1px"><div align="center"><a target="_blank" href="<%=GetUrl&rs("fileurl")%>">下载</a></div></td>
</tr>
<%
rs.movenext
if rs.eof then exit for
next
%>
</table></td>
</tr>
<tr>
<td height="50%" align="center">
<table border="0" width="650" cellspacing="0" cellpadding="0" height="25">
<tr>
<td width="104">
共有文件<font color="#FF0000"><%=rs.recordcount%></font>个</td>
<td width="112">
<p align="center">当前页码:<font color="#FF0000"><%=session("page")%></font>/<%=rs.pagecount%></td>
<td width="248">
<p align="center">< <a href="?action=f">
首页</a>
<a href="?action=p">上一页</a>
<a href="?action=n">下一页</a>
<a href="?action=l">尾页</a> ></td>
<td width="186">
<form method="POST" action="index.asp">
<p align="center">跳转到
<input type="text" name="page1" size="5" style="border: 1px solid #000000">
页
<input type="submit" value="提交" name="B2"></p>
</form></td>
</tr>
</table> </td>
</tr>
<tr>
<td height="50%" align="center">
负零文件上传系统UploFlin v1.0 制作:刘付灵 QQ:252687345<br>
Copyright© 2007 Flin工作室版权所有, All rights reserved。 </td>
</tr>
</table>
<%
rs.close
set rs=nothing
set conn=nothing
end if
%>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -