Upload <%
' Upload.asp
Function Intmin (n,y)
If N<y and N>0 Then
Intmin=int (N)
ElseIf y>0 Then
Intmin=int (y)
Else
Intmin=n
End If
End Function
Function Getformvalue (Name)
Dim Formsize,formdata,dataheader,datastart,dataend,formnamestart,formnameend,formname,firstfilter
Formsize=request.totalbytes ()
Formdata=request.binaryread (Formsize)
Firstfilter=true
For I=1 to Len (Name)
TMP=TMP&CHRB (AscB) (Mid (name,i,1))
Next
Name=tmp
Dataend=0
Datastart=0
Do While formsize>0
FORMDATA=RIGHTB (formdata,formsize-dataend-datastart+1)
Formsize=formsize-dataend-datastart+1
Dataheader=leftb (FORMDATA,INSTRB (FORMDATA,CHRB) &CHRB (10))-1)
DATASTART=INSTRB (FORMDATA,CHRB) &CHRB (a) &CHRB &CHRB (10)) +4
DATAEND=INSTRB (Datastart+1,formdata,dataheader)-datastart
If datastart<0 or dataend<=0 Then Exit do
FILTEREDDATA=MIDB (formdata,datastart,dataend-1)
FORMNAMESTART=INSTRB (FORMDATA,CHRB (AscB ("n")) &chrb (AscB ("a")) &chrb (AscB ("M")) &chrb (AscB ("E")) & ChrB (AscB ("=")) &chrb (AscB ("" "))) +6
Formnameend=intmin (InStrB (FORMNAMESTART,FORMDATA,CHRB) &chrb-formnamestart-1,instrb (FormNameStart, FORMDATA,CHRB (AscB (";")) -FORMNAMESTART-1)
FORMNAME=MIDB (Formdata,formnamestart,formnameend)
If Name=formname Then
Getformvalue=filtereddata
Exit Function
End If
Loop
getformvalue=name& "Not found!"
End Function
Response.BinaryWrite (Getformvalue ("LoadFromFile")) ' This loadfromfile is the table Single-name ~
%>