onlinetoupload.asp
来自「绿叶oa系统办公自动化 2008.工作日志管理,文件管理」· ASP 代码 · 共 254 行
ASP
254 行
<%Response.Expires = -1
Response.ExpiresAbsolute = Now() - 1
Response.cachecontrol = "no-cache"%>
<!--#include file="../../../Connections/oavbsconn.asp" -->
<!--#include file="../../../Connections/ifr/ifrasp.asp" -->
<%
' *** Restrict Access To Page: Grant or deny access to this page
MM_authorizedUsers=""
MM_authFailedURL="../../../index.asp"
MM_grantAccess=false
If Session("userssdfgfhtrh") <> "" Then
If (true Or CStr(Session("MM_UserAuthorization"))="") Or _
(InStr(1,MM_authorizedUsers,Session("MM_UserAuthorization"))>=1) Then
MM_grantAccess = true
End If
End If
If Not MM_grantAccess Then
MM_qsChar = "?"
If (InStr(1,MM_authFailedURL,"?") >= 1) Then MM_qsChar = "&"
MM_referrer = Request.ServerVariables("URL")
if (Len(Request.QueryString()) > 0) Then MM_referrer = MM_referrer & "?" & Request.QueryString()
MM_authFailedURL = MM_authFailedURL & MM_qsChar & "accessdenied=" & Server.URLEncode(MM_referrer)
Response.Redirect(MM_authFailedURL)
End If
%>
<%
Dim Recordset1__varu
Recordset1__varu = "1"
If (Session("userssdfgfhtrh") <> "") Then
Recordset1__varu = Session("userssdfgfhtrh")
End If
%>
<%
Dim Recordset1__varbumen
Recordset1__varbumen = "1"
If (Session("bumen") <> "") Then
Recordset1__varbumen = Session("bumen")
End If
%>
<%
Dim Recordset1
Dim Recordset1_numRows
Set Recordset1 = Server.CreateObject("ADODB.Recordset")
Recordset1.ActiveConnection = MM_oavbsconn_STRING
Recordset1.Source = "SELECT names,部门 FROM usertertggbng WHERE usersdsfg56 ='" + Replace(Recordset1__varu, "'", "''") + "' and 部门='" + Replace(Recordset1__varbumen, "'", "''") + "'"
Recordset1.CursorType = 0
Recordset1.CursorLocation = 2
Recordset1.LockType = 1
Recordset1.Open()
Recordset1_numRows = 0
%>
<%
dim s_filename
Dim files
Dim files_numRows
dim varfnames'下载部分使用
Set files = Server.CreateObject("ADODB.Recordset")
files.ActiveConnection = MM_oavbsconn_STRING
files.Source = "SELECT * FROM 文件信息 ORDER BY ID DESC"
files.CursorType = 0
files.CursorLocation = 2
files.LockType = 1
files.Open()
files_numRows = 0
%>
<% if not files.eof or not files.bof then
dimpath=files("文件路径")
end if%>
<html>
<head>
<script language="JavaScript">
<!--
function dis(){
document.form1.submit.value=' 发送..'
document.form1.submit.disabled=true;
return true;
}
function check() {
if (document.form1.bumen.value=="请选择部门") {
window.alert ("请您选择部门!")
return false
}
if ((form1.City.value=="请选择对象")||(form1.City.value=="")) {
window.alert ("请选择接收对象!")
return false
}
if (document.form1.file1.value=="" && document.form1.file2.value=="" &&document.form1.file3.value=="" &&document.form1.file4.value==""
&&document.form1.file5.value=="" &&document.form1.file6.value=="")
{
window.alert ("请选择上传文件!")
document.form1.file1.focus()
return false
}
return true
}
//-->
</SCRIPT>
<script language=VBScript>
function tof_Click()
if document.all("tof").checked Then
document.all("his").style.display="inline"
Else
document.all("his").style.display="none"
End IF
end function
</script>
<script>
function SummaryFromText(){
if (iEditorType==0)
{
var Summary = content1.getHTML();
}
else{
var Summary = a1.content.value;
}
Summary=Summary.substring(1,250)
Summary=cleanHtml(Summary);
a1.summary.value=Summary;
}
</SCRIPT>
<script>
function change(obj,i) {
he=parseInt(obj.style.height);
if (he>=80&&he<=400)
obj.style.height=he+i+'px';
else
obj.style.height='80px';
}
</script>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title></title>
<style type="text/css">
<!--
.tx1 {height: 20px; width: 30px; font-size: 9pt; border: 1px solid; border-color: black black #000000; color: #0000FF}
.tx {height: 16px; width: 30px; border-color: black black #000000; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 1px; border-left-width: 0px; font-size: 9pt; background-color: #eeeeee; color: #0000FF}
-->
</style>
<link href="/css/link.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
.style6 {
color: #FFFFFF;
font-weight: bold;
}
.style9 {font-size: 12px}
.style10 {color: #FFFFFF}
.style12 {color: #000000}
-->
</style>
</head>
<body>
<form action="uponneupload.asp" method="post" enctype="multipart/form-data" name="form1" onSubmit="return dis()">
<ul>
<p>
<input name="filepath111" type="hidden" class="tx" id="filepath111" style="width:350" value="upfiles" size="20">
<input type="hidden" name="act" value="upload">
<br>
</p>
<div align="center"><table width="80%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="6" height="21"><img src="../../../img/bbs/leftlin1.gif" width="6" height="21"></td>
<td width="936" bgcolor="#5AAE18"><div align="center"><span class="style10"><span class="style13 style5 style6"><span class="style6 style3"><span class="style6">文 件 传 输 系 统</span></span></span></span></div></td>
<td width="6" height="21"><img src="../../../img/bbs/rightlin1.gif" width="6" height="21"></td>
</tr>
</table>
</div>
<div align="center">
<table width="80%" border="0" cellpadding="0" cellspacing="1" bgcolor="#5EAE19">
<tr>
<td><table width="100%" border="0" cellpadding="3" cellspacing="0" bgcolor="5EAE19">
<tr bgcolor="#FFFFFF">
<td height="12" colspan="2"></td>
</tr>
<tr bgcolor="#FFFFFF">
<td><div align="right">接收人:</div></td>
<td><select name="City" id="City">
<option value="<%=request("n")%>"><%=request("n")%></option>
</select></td>
</tr>
<tr bgcolor="#FFFFFF">
<td width="103"> </td>
<td width="661"><input type="file" name="file1" style="width:400" value="" size="20"></td>
</tr>
<tr bgcolor="#FFFFFF">
<td width="103" rowspan="4"><div align="center"><img src="/toall/gw/img/gif/1.gif" width="37" height="35"></div></td>
<td><input name="file2" type="file" id="file2" style="width:400" value="" size="20"></td>
</tr>
<tr bgcolor="#FFFFFF">
<td><input name="file3" type="file" id="file3" style="width:400" value="" size="20"></td>
</tr>
<tr bgcolor="#FFFFFF">
<td><input name="file4" type="file" id="file4" style="width:400" value="" size="20"></td>
</tr>
<tr bgcolor="#FFFFFF">
<td><input name="file5" type="file" id="file5" style="width:400" value="" size="20"></td>
</tr>
<tr bgcolor="#FFFFFF">
<td> </td>
<td><input name="file6" type="file" id="file6" style="width:400" value="" size="20"></td>
</tr>
<tr bgcolor="#FFFFFF">
<td> </td>
<td height="10"><br><div id=his style=display:none ><textarea name="fuyan" cols="44" rows="5" id="fuyan"></textarea><a href="javascript:SummaryFromText()"></a><br> <a href="javascript:change(document.all.fuyan,-20)"><img src="../../../img/minus.gif" border=0 title="缩小文本框"></a> <a href="javascript:change(document.all.fuyan,20)"><img src="../../../img/plus.gif" border=0 title="放大文本框"></a></div></td>
</tr>
<tr bgcolor="#FFFFFF">
<td> </td>
<td> <span class="bg"><span class="bg style2"> <STRONG><FONT color=#ffffff> <strong><font color=#ffffff><span class="style9"><STRONG><FONT color=#ffffff><strong><font color=#ffffff><strong><font color=#ffffff><strong><font color=#ffffff><strong><font color=#ffffff><strong><font color=#ffffff><strong><font color=#ffffff><strong><font color=#ffffff><STRONG><FONT color=#ffffff><strong><font color=#ffffff><STRONG><FONT color=#ffffff><strong><font color=#ffffff><STRONG><FONT color=#ffffff><STRONG><FONT color=#ffffff><strong><font color=#ffffff><strong><font color=#ffffff><strong><font color=#ffffff><strong><font color=#ffffff><STRONG><FONT color=#ffffff><strong><font color=#ffffff><STRONG><FONT color=#ffffff><strong><font color=#ffffff><STRONG><FONT color=#ffffff><strong><font color=#ffffff>
<input name="submit" type=submit id="submit" style="FONT-SIZE: 12px; HEIGHT: 27px" onClick='return check();' value= " 发 送 ">
</font></strong></FONT></STRONG></font></strong></FONT></STRONG></font></strong></FONT></STRONG> </font></strong></font></strong></font></strong> </font></strong></FONT></STRONG> </FONT></STRONG> <STRONG><FONT color=#ffffff> <strong><font color=#ffffff> <STRONG><FONT color=#ffffff><strong><font color=#ffffff><strong><font color=#ffffff><strong><font color=#ffffff><strong><font color=#ffffff><strong><font color=#ffffff><strong><font color=#ffffff><strong><font color=#ffffff><STRONG><FONT color=#ffffff><strong><font color=#ffffff><STRONG><FONT color=#ffffff><strong><font color=#ffffff><STRONG><FONT color=#ffffff><strong><font color=#ffffff>
<input name="重置" type=reset style="FONT-SIZE: 12px; HEIGHT: 27px" value= " 清 空 " >
</font></strong></FONT></STRONG></font></strong></FONT></STRONG></font></strong></FONT></STRONG></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></FONT></STRONG>
<input name="按钮" type=button style="FONT-SIZE: 12px; HEIGHT: 27px" onClick="javascript:history.go(-1)" value= " 取 消 " >
<STRONG><FONT color=#ffffff><strong><font color=#ffffff><STRONG><FONT color=#ffffff><strong><font color=#ffffff><strong><font color=#ffffff><strong><font color=#ffffff><strong><font color=#ffffff><strong><font color=#ffffff><strong><font color=#ffffff><strong><font color=#ffffff><STRONG><FONT color=#ffffff><strong><font color=#ffffff><STRONG><FONT color=#ffffff><strong><font color=#ffffff><STRONG><FONT color=#ffffff><strong><font color=#ffffff>
<input type=checkbox name=tof onClick=tof_Click() >
</font></strong> </FONT></STRONG></font></strong></FONT></STRONG></font></strong></FONT></STRONG></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></FONT></STRONG></font></strong></FONT></STRONG></font></strong></FONT></STRONG></font></strong></FONT></STRONG></font></strong></FONT></STRONG></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></FONT></STRONG></span></font></strong></FONT></STRONG></span></span><span class="style12">附言</span><span class="bg"><span class="bg style2"><STRONG><FONT color=#ffffff><strong><font color=#ffffff><span class="style9"><STRONG><FONT color=#ffffff><strong><font color=#ffffff><strong><font color=#ffffff><strong><font color=#ffffff><strong><font color=#ffffff><strong><font color=#ffffff><strong><font color=#ffffff><strong><font color=#ffffff><STRONG><FONT color=#ffffff><strong><font color=#ffffff><STRONG><FONT color=#ffffff><strong><font color=#ffffff><STRONG><FONT color=#ffffff><font color=#ffffff><strong> <img src="../../../img/sjyf.gif" width="11" height="18"></strong></font></FONT></STRONG></font></strong></FONT></STRONG></font></strong></FONT></STRONG></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></font></strong></FONT></STRONG></span></font></strong></FONT></STRONG></span></span> </td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="10" colspan="2"></td>
</tr>
</table></td>
</tr>
</table>
<p> </p>
<div id="txt" style="display:none">
<table border="0" width="100%" cellspacing="0" cellpadding="0" height=100>
<tr>
<td align="center">正在上传,请稍候<p>
<marquee direction="right" scrollamount="12" scrolldelay="50" style="border:1px solid #2963f8;height:15px;width:300px;font-size:1px;"><span style="height:15px;width:90px;background-color:#2963f8;filter:alpha(opacity=0,finishopacity=60,style=1)"></span><span style="height:15px;width:90px;background-color:#2963f8;filter:alpha(opacity=60,finishopacity=0,style=1)"></span></marquee></td>
</tr>
</table>
</div>
</div>
</ul>
</form>
<p> </p>
</body>
</html>
<%
Recordset1.Close()
Set Recordset1 = Nothing
%>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?