Save the file in an Access database and take out the code for download (from E-office part of the module)

Source: Internet
Author: User
Tags include access database microsoft frontpage
access| Data | database | Download senddate.asp (send interface)

<form method= "POST" enctype= "Multipart/form-data" name= "form3" action= "senddateindb.asp" >
<input type= "hidden" name= "userdept" value= "<%=firstdept%>" >
<input type= "hidden" name= "username" value= "Everyone" >
&LT;TD align= "center" ><b> Send: </b></td><td><input type= "text" name= "SendTo" size=60 Value= "<%=sendto%>" onfocus= "Document.form3.title.focus ();" ><font color=red>*</font></td>
</tr>
<tr>
&LT;TD align= "center" ><b> title:</b></td>
<td><input type=text name= "title" Size=60><font color=red>*</font></td>
</tr>
<tr>
&LT;TD align= "Center" ><b> content:</b></td>
<td><textarea name= "Content" rows= "9" cols= "></textarea></td>"
</tr>
<tr>
&LT;TD align= "center" ><b> Accessories:</b></td>
<td><input type= "File" Name= "File1" size=35> (not exceeding 100K) </td>
</tr>
<tr>
&LT;TD Align=center colspan=2>
<input type= "Submit" name= "submit" value= "Send" >
</td>
</form>

*************************************************************************
Senddateindb.asp (Save the file to be sent to the database)

<!--#INCLUDE file= "Asp/fupload.inc"-->
<!--#include file= "asp/opendb.asp"-->
<!--#include file= "asp/sqlstr.asp"-->
<!--#include file= "asp/checked.asp"-->
<!--#include file= "asp/bgsub.asp"-->
<%
' On Error Resume Next
Oabusyname=request.cookies ("Oabusyname")
Oabusyusername=request.cookies ("Oabusyusername")
Oabusyuserdept=request.cookies ("Oabusyuserdept")
Oabusyuserlevel=request.cookies ("Oabusyuserlevel")
If Oabusyusername= "" then Response.Redirect "Default.asp"
%>
<meta http-equiv= "Content-type" content= "text/html; charset=gb2312 ">
<meta name= "generator" content= "Microsoft FrontPage 4.0" >
<meta name= "ProgId" content= "FrontPage.Editor.Document" >
<link rel= "stylesheet" href= "Css/css.css" >
<title> Enterprise Management System </title>
<body bgcolor= "#eeeeee" topmargin= "5" leftmargin= "5" >
<%
Call Bghead ()
%>
<center>
<table>
<tr>
<td>
<b> Documents sent </b>
</td>
<form action= "senddate.asp" method= "Post" Name= "Form1" >
<td>
<input type= "Submit" value= "return" >
</td>
</form>
</tr>
</table>
</center>
<%
Call Bgmid ()
%>

<%
If Request.ServerVariables ("request_method") = "POST" Then
'---------------------------
' Response.Write Start sending <br> '
'---------------------------
Dim Fields
uploadsizelimit=100000
Set Fields = Getupload ()
Dim Field
For each Field in Fields.items
If Field.name= "title" Then Title=binarytostring (field.value)
If field.name= "Content" then content=binarytostring (field.value)
If Field.name= "SendTo" then sendto=binarytostring (field.value)
If Field.name= "File1" Then
Filename=field. FileName
Filecontenttype=field. ContentType
Filevalue=field.value
End If
Next
'--------------------------------------
' Response.Write ' title= ' & title & ' <br> '
' Response.Write ' content= ' & con



Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.