home *** CD-ROM | disk | FTP | other *** search
- *down
- SetActivity(Downloading Files)
- If(^:1^)=() then Display (Display\DOWN)
- setequal(b=)
- If(^:1^)=() then Enter
- NotIf(%LOCAL%)=(TRUE) then 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
- Jump(ST_Check)
- Display (Display\DN-PROTS)
- MenuAsk %MIN1% (&3&Which transfer protocol would you like to use?&11&(or Q to Quit)&12&: &15&*)
- *COMMAND
- 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))
- IfTrue(LoadSub(control\macros\ltagged.ctl))
- linefeed(1)
- len(%var%b) ;see If they picked a batch protocol
- NotIf(%ARESP%)=(1) Then loadmem(control\BATCH.CTL)
- If(%BAUD%)=(LOCAL) then Loadmem(control\LBATCH.CTL)
-
- *fname
- Jump(ST_Check2)
- say(&3&Please enter the name of the file to download&12&: &14&(&F&12)&15&*)
- back(13)
- menuask%NOCR%%CRON%%LEN12%(*)
- *COMMAND2
- 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%)
- Jump(ST_Check3)
- *Question1
- say(&CR&&3& Would you like to download this file? &9&[ ]&14&*)
- back(4)
- yesnoask(*)
- *COMMAND3
- If (%RESP%)=(No) Then Goto (ex)
- Jump(ST_Check4)
- *Question2
- say(&3&Would you like us to log you off afterwards? &9&[ ]&14&*)
- back(4)
- yesnoask(*)
- *COMMAND4
- 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)
- Jump(ST_Check5)
- *Question3
- say(&CR&&3&Would you like to download the tagged files? &9&[ ]&14&*)
- back(4)
- yesnoask(*)
- say(&14&)
- *COMMAND5
- 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)
-
- *C_CHECK
- SetEqual(z=;)
- ;Z will be search character (' ' or ';')
- Find(%RESP%,;)
- If (%ARESP%)=(0) Then
- Find(%RESP%, )
- If(%ARESP%)=(0) then Ret
- SetEqual(z= )
- endif
- ;SetEqual(/nvz=%RESP%)
- SetEqual(^1=%RESP%)
- *ST_CHECK
- ;SetEqual(a=%NV%Z)
- SetEqual(a=^:1^)
- If(%VAR%A)=() then Ret
- Find(%VAR%A,%VAR%Z)
- If(%ARESP%)=(0) then Goto(NoMoreCommands)
- AddVar(%ARESP%+-1=b)
- Get(%VAR%A,1,%VAR%B)
- SetEqual(/resp=%ARESP%)
- *Cont
- If (%RESP%)=() Then Ret
- AddVar(%VAR%B+2=b)
- Get(%VAR%A,%VAR%B,100)
- ;SetEqual(/nvz=%ARESP%)
- SetEqual(^1=%ARESP%)
- Goto(COMMAND)
- Ret
-
- *NoMoreCommands
- SetEqual(/resp=^:1^)
- SetEqual(^1=)
- If (%RESP%)=() Then Ret
- Goto(command)
-
- *ST_CHECK2
- ;SetEqual(a=%NV%Z)
- SetEqual(a=^:1^)
- If(%VAR%A)=() then Ret
- Find(%VAR%A,%VAR%Z)
- If(%ARESP%)=(0) then Goto(NoMoreCommands2)
- AddVar(%ARESP%+-1=b)
- Get(%VAR%A,1,%VAR%B)
- SetEqual(/resp=%ARESP%)
- *Cont2
- If (%RESP%)=() Then Ret
- AddVar(%VAR%B+2=b)
- Get(%VAR%A,%VAR%B,100)
- ;SetEqual(/nvz=%ARESP%)
- SetEqual(^1=%ARESP%)
- Goto(COMMAND2)
- Ret
-
- *NoMoreCommands2
- SetEqual(/resp=^:1^)
- SetEqual(^1=)
- If (%RESP%)=() Then Ret
- Goto(command2)
-
- *Cont3
- If (%RESP%)=() Then Ret
- AddVar(%VAR%B+2=b)
- Get(%VAR%A,%VAR%B,100)
- ;SetEqual(/nvz=%ARESP%)
- SetEqual(^1=%ARESP%)
- Goto(COMMAND4)
- Ret
-
- *ST_CHECK3
- ;SetEqual(a=%NV%Z)
- SetEqual(a=^:1^)
- Find(%VAR%A,%VAR%Z)
- If(%ARESP%)=(0) then Goto(NoMoreCommands3)
- AddVar(%ARESP%+-1=b)
- Get(%VAR%A,1,%VAR%B)
- MenuEqual(/resp=%ARESP%)
- *YNRespChecks
- If(%RESP%)=(Y) then SetEqual(/RESP=Yes)
- If(%RESP%)=(N) then SetEqual(/RESP=No)
- ;SetEqual(/resp=%ARESP%)
- NotIf(%RESP%)=(Yes) then NotIf(%RESP%)=(No) then Goto(Question1)
- Goto(Cont3)
-
- *NoMoreCommands3
- MenuEqual(/resp=^:1^)
- SetEqual(^1=)
- Goto(YNRespChecks)
-
- *ST_CHECK4
- ;SetEqual(a=%NV%Z)
- SetEqual(a=^:1^)
- Find(%VAR%A,%VAR%Z)
- If(%ARESP%)=(0) then Goto(NoMoreCommands4)
- AddVar(%ARESP%+-1=b)
- Get(%VAR%A,1,%VAR%B)
- MenuEqual(/resp=%ARESP%)
- *YNRespChecks2
- If(%RESP%)=(Y) then SetEqual(/RESP=Yes)
- If(%RESP%)=(N) then SetEqual(/RESP=No)
- ;SetEqual(/resp=%ARESP%)
- NotIf(%RESP%)=(Yes) then NotIf(%RESP%)=(No) then Goto(Question2)
- Goto(Cont4)
-
- *NoMoreCommands4
- MenuEqual(/resp=^:1^)
- SetEqual(^1=)
- Goto(YNRespChecks2)
-
- *ST_CHECK5
- ;SetEqual(a=%NV%Z)
- SetEqual(a=^:1^)
- Find(%VAR%A,%VAR%Z)
- If(%ARESP%)=(0) then Goto(NoMoreCommands4)
- AddVar(%ARESP%+-1=b)
- Get(%VAR%A,1,%VAR%B)
- MenuEqual(/resp=%ARESP%)
- *YNRespChecks3
- If(%RESP%)=(Y) then SetEqual(/RESP=Yes)
- If(%RESP%)=(N) then SetEqual(/RESP=No)
- ;SetEqual(/resp=%ARESP%)
- NotIf(%RESP%)=(Yes) then NotIf(%RESP%)=(No) then Goto(Question3)
- Goto(Cont5)
-
- *NoMoreCommands4
- MenuEqual(/resp=^:1^)
- SetEqual(^1=)
- Goto(YNRespChecks3)
-