home *** CD-ROM | disk | FTP | other *** search
- *down
- SetActivity(Downloading Files)
- Display (Display\DOWN)
- setequal(b=)
- Enter
- Kill(Batch.%NODE%)
- if (%local%)=(TRUE) then setequal(b=1)
- if (%LOCAL%)=(TRUE) then goto (Pok)
- If (/PROTOCOL)=(N) Then Goto (PickProt)
- Display(Display\defuse)
- SetEqual(b=/:PROTOCOL/)
- Goto (pseled)
-
- *PickProt
- Display (Display\DN-PROTS)
- MenuAsk %MIN1% (&3&Which transfer protocol would you like to use?&11&(or Q to Quit)&12&: &15&*)
- Find(%RESP%,\) ;make sure they didnt stick a backslash in there
- NotIf (%ARESP%)=(0) Then Goto (badprot)
- BigIf(h:phelp,q:filesback)
- SetEqual(b=%RESP%)
-
- *pseled
- Seek(protocol\%var%b-D.BT) ;check to see If protocol exists..
- IfTrue(Goto (Pok))
-
- *badprot
- loadsub(control\macros\badsel.ctl)
- Goto (PickProt) ;go back and ask again..
-
- *Pok
- Seek(tagged.%NODE%) ;see If there are any tagged files..
- IfTrue(Goto (texist))
- linefeed(1)
- len(%var%b) ;see If they picked a batch protocol
- NotIf(%ARESP%)=(1) Then loadmem(control\BATCH.CTL)
-
- *fname
- say(&3&Please enter the name of the file to download&12&: &14&(&F&12)&15&*)
- back(13)
- menuask%NOCR%%CRON%%LEN12%(*)
- if (%RESP%)=(<CR>) then say()
- if (%RESP%)=(<CR>) then Return
- len(%Resp%)
- back(%Aresp%)
- adddef(.%DEFEXT%)
- say(%Resp%&11&&CR&)
- say(Please wait!... We're searching for the file...*)
- Seekfall(%RESP%)
- If (%ARESP%)=(INVALID) Then Goto (invfn) ;If invalid filename
- If (%ARESP%)=(No) Then Goto (nothere)
- If (%ARESP%)=(NOT ENOUGH) Then Goto (notenuf)
- If (%RATIO%)=(NOT OK) Then Goto (badratio) ;If bad ratio...
- selFarea(%ARESP%) ;set file area to where the file is...
- size(%FILPATH%%RESP%)
- say(Found!&CR&&CR&&14& ─────── &12&Statistics for %RESP% &14& ───────&15&)
- say(Free Download: &11&%FREE% &15&*)
- If (%FREE%)=(No) Then say( *)
- say( Size: &11&%ARESP% &15&&CR&Dated: *)
- fdate(%FILPATH%%RESP%) ;get file date
- say(&11&%ARESP% &15& Transfer Time: *)
- size(%FILPATH%%RESP%)
- ttime(%ARESP%)
- say(&11&%ARESP%)
- cmpval(%TTIM%,/:LEFT/)
- If (%ARESP%)=(No) Then If (%FREE%)=(No) Then Goto (notenuftime)
- SetEqual(d=%RESP%)
- say(&CR&&3& Would you like to download this file? &9&[ ]&14&*)
- back(4)
- yesnoask(*)
- If (%RESP%)=(No) Then Goto (ex)
- say(&3&Would you like us to log you off afterwards? &9&[ ]&14&*)
- back(4)
- yesnoask(*)
- SetEqual(m=%RESP%)
- say(&CR&&11&We're sending the file you requested. Please get ready to receive it now.)
- If (%LOCAL%)=(TRUE) Then Goto (lcl)
- fixfile(protocol\%var%b-d.bt,protocol\%var%b-d.bat)
- initclock
- exec(protocol\%var%b-d.BAT│)
- Kill(protocol\%var%b-d.bat)
-
- *success
- setequal(t=)
- NotIf (%ARESP%)=(0) Then Goto (aborted)
- notif (%LOCAL%)=(FALSE) then setequal(t=TOG)
- if (%LOCAL%)=(FALSE) then toglocal
- xfertime
- SetEqual(e=%ARESP%)
- multvar(%XMIN%*60=o)
- size(%FILPATH%%var%d)
- divvar(%ARESP%/%var%o=g)
- cnvtk(%ARESP%)
- addvar(%ARESP%+/:KDOWN/=o)
- SetEqual(/KDOWN=%var%o)
- say(%BEEP%*)
- log(--,%var%d Downloaded.)
- log(--,Rate: %var%g CPS)
- appendto(logs\DOWNLOAD.%NODE%,%var%d downloaded by %NAME% at %TIME% on %DATE%.)
- SetEqual(a=/:DOWNLOADS/)
- inc(a)
- SetEqual(/DOWNLOADS=%var%a)
- notif (%var%t)=(TOG) then toglocal
- eline(20)
- Display (Display\SUCCESS)
- If (%FREE%)=(Yes) Then Goto (free)
- If (&m)=(Yes) Then Goto (autooff)
-
- *ex
- selfarea(/:LASTDOWN/)
- linefeed(1)
- return
-
- *aborted
- eline(20)
- log(--,Download of %var%d aborted.)
- display(display\aborted)
- goto (ex)
-
- *lcl
- menuask(&CR&&3&Please specify the path &11&(e.g. C:\DLS\)&3& for this file&12&: &15&*)
- setequal(k=10)
- initclock
- fcopy (%FILPATH%%var%d,%RESP%\%var%d)
- notif (%ARESP%)=(0) then goto (aborted)
- goto (success)
-
- *badratio
- Display(Display\BADRATIO)
- selfarea(/:LASTDOWN/)
- linefeed(1)
- return
-
- *autooff
- loadmem(control\AutoOff.ctl)
-
- *free
- log(--,Freefile downloaded, time refunded.)
- size(%var%d)
- ttime(%ARESP%)
- addvar(%TTIM%+/:LEFT/=t)
- SetEqual(/LEFT=%var%t)
- If (&m)=(Yes) Then Goto (autooff)
- Goto (ex)
-
- *texist
- len(%var%b)
- If (%ARESP%)=(1) Then Goto (len1)
- say(&CR&&14&Files Currently Tagged:)
- lview(tagged.%NODE%,10,7)
- say(&CR&&3&Would you like to download the tagged files? &9&[ ]&14&*)
- back(4)
- yesnoask(*)
- say(&14&)
- If (%RESP%)=(No) Then loadmem(control\BATCH.CTL,Goto (startbatch))
- say(Adding Tagged files to Batch...*)
- fcopy(tagged2.%NODE%,batch.%NODE%)
- lines(batch.%NODE%)
- SetEqual(m=0)
- SetEqual(w=%ARESP%)
- say(Done!&CR&)
- loadmem(control\BATCH.CTL,Goto (fname))
- *len1
- say(&10&&CR&You have tagged files but they can only be downloaded with a BATCH)
- say(protocol. Please press &11&Enter&10& now to abort then choose a dIfferent protocol)
- say(if you'd like to download your tagged files.&CR&)
- Goto (fname)
- *notenuftime
- Display(Display\NODLTIME)
- return
- *phelp
- Display(Display\help\prot,/:SEC/)
- Goto (PickProt)
- *invfn
- Display(Display\INVALID)
- flushout
- selfarea(/:LASTDOWN/)
- Enter
- goto (fname)
- *filesback
- return
- *notenuf
- Display (Display\fbadsec)
- selfarea(/:LASTDOWN/)
- return
- *NotHere
- Display(Display\notfnd)
- goto (fname)
- *moveerr
- say(&CR&&14&The directory you specify is where the file already resides!&CR&)
- goto (endmove)
-