home *** CD-ROM | disk | FTP | other *** search
/ Beijing Paradise BBS Backup / PARADISE.ISO / software / BBSDOORW / PCLPACK.ZIP / NICE.ZIP / MACS.ZIP / UP.CTL < prev    next >
Encoding:
Text File  |  1992-09-02  |  4.0 KB  |  160 lines

  1.    display (display\UPLD)
  2.    kill(ubatch.%NODE%)
  3.    enter
  4.    clearmem
  5.    freespace(%CDRIVE%:)
  6.    setequal(i=%ARESP%)
  7.    cmpval(%ARESP%,%MINSPACE%)
  8.    ifTrue (goto (notenufs))
  9.    if (%LOCAL%)=(TRUE) then goto (pok)
  10.    *pickprot
  11.    display (display\up-PROTS)
  12.    menuask %MIN1%(&3&Which transfer protocol would you like to use?&11&(or Q to Quit)&12&: &15&*)
  13.    find(%RESP%,\)
  14.    notif (%ARESP%)=(0) then goto (badprot)
  15.    BigIf(h:phelp,q:filesback)
  16.    seek(protocol\%RESP%-U.BT)
  17.    ifTrue (goto (Pok))
  18. *badprot
  19. loadsub(control\macros\badsel.ctl)
  20.    goto (pickprot)
  21.    *Pok
  22.    setequal(b=%RESP%)
  23.    addcomma(%var%i)
  24.    say(&CR&&14&%aresp% &7&Bytes Free.)
  25.    len(%var%b)
  26.    notif (%ARESP%)=(1) then loadmem(control\macros\ubatch.ctl)
  27. *gtname
  28. say(&CR&&3&Please enter the name of the file to upload&12&: &14&(&F&12)&15&*)
  29. back(13)
  30. menuask%NOCR%%CRON%%LEN12%(*)
  31.   if (%RESP%)=(<CR>) then say()
  32.   if (%RESP%)=(<CR>) then Return
  33.   len(%Resp%)
  34.   back(%Aresp%)
  35. adddef(.%DEFEXT%)  
  36.   say(%Resp%&11&&CR&)
  37.   setequal(d=%RESP%)
  38.   iseek(%var%d)
  39.   if (%aresp%)=(Yes) then goto (ishere)
  40.   if (%Aresp%)=(INVALID) then goto (invfn)
  41.   say(&14&Please enter a description for your file.  &10&The description can take up 3 lines.&15&)
  42.   resetwrap
  43.   say(   (----2----3----4----5----6----7---8----))
  44.   setequal(r=1)
  45.   wrapask %MIN1%%LEN40%(&3&1&12&: &15&*)
  46.   setequal(^1=%RESP%)
  47.   setequal(r=2)
  48.   wrapask %LEN40%%CRON%(&3&2&12&: &15&*)
  49.   if (%RESP%)=(<CR>) then goto (askup)
  50.   setequal(^2=%RESP%)
  51.   setequal(r=3)
  52.   ask %LEN39% %CRON%(&3&3&12&: &15&*)
  53.   if (%RESP%)=(<CR>) then goto (askup)
  54.   setequal(^3=%RESP%)
  55. *askup
  56.   say(&CR&&3&         Would you like to upload this file? &9&[   ]&14&*)
  57.   back(4)
  58.   yesnoask(*)
  59.   if (%RESP%)=(No) then goto (ex)
  60.   say(&3&Would you like us to log you off afterwards? &9&[   ]&14&*)
  61.   back(4)
  62.   yesnoask(*)
  63.   setequal(m=%RESP%)
  64.   if (%LOCAL%)=(TRUE) then goto (local)
  65.   setactivity(Uploading a File)
  66.   say(&CR&&11&We're ready to receive the file.  Please start sending it now.)
  67.   fixfile(protocol\%var%b-u.bt,protocol\%var%b-u.bat)
  68.   initclock
  69.   exec(protocol\%var%b-u.BAT│)
  70.   kill(protocol\%var%b-u.bat)
  71.  
  72.         *success
  73. eline(20)
  74. notif (%ARESP%)=(0) then goto (aborted)
  75. setequal(k=0)
  76. *lsuccess
  77. xfertime
  78. setequal(e=%ARESP%)
  79. loadsub(zc\zc.ctl)
  80. if (&a)=(2) then goto (aborted)
  81.  
  82. notif (%BAUD%)=(LOCAL) then toglocal
  83. setequal(b=%XMIN%)
  84. if (&b)=(0) then setequal(b=1)
  85. multvar(%var%b*60=o)
  86. size(files\uploads\%var%d)
  87. divvar(%ARESP%/%var%o=g)
  88.   log(--,%var%d Uploaded. Took %XMIN% minutes.)
  89.   log(--,Rate: %var%g CPS)
  90.   cnvtk(%ARESP%)
  91.   addvar(%ARESP%+/:KUP/=o)
  92.   setequal(/KUP=%var%o)
  93.   say(%BEEP%*)
  94.   refund        ;refund some of the users time...
  95.   upped         ;set last upload time...
  96.   appendto(logs\UPLOAD.%NODE%,%var%d uploaded at %TIME% on %DATE% by %NAME%.)
  97.   setequal(a=/:UPLOADS/)
  98.   inc(a)
  99.   setequal(/UPLOADS=%var%a)
  100.   file(files\uploads\,%var%d,10)
  101.   notif (%BAUD%)=(LOCAL) then toglocal
  102.   seek(xcheck.bt)
  103.   if (%ARESP%)=(Yes) then goto (testup)
  104.   display (display\USUCCESS)
  105.   if (&m)=(Yes) then goto (autooff)
  106. *ex
  107.   resetlist
  108.   listfile(%FAREA%)
  109.   Return
  110. *aborted
  111.   log(--,Upload of %var%d aborted.)
  112.   display (display\ABORTED)
  113.   goto (ex)
  114. *ishere
  115.   display(display\ISHERE)
  116.   enter
  117.   goto (gtname)
  118.  
  119. *testup
  120.   fixfile(xcheck.bt,xcheck.bat)
  121.   exec(xcheck.bat)
  122.   display (display\USUCCESS)
  123.   goto (ex)
  124.  
  125. *autooff
  126. loadmem(control\autooff.ctl)
  127.  
  128. *local
  129. say(&CR&&10&You will now specify the path where the file resides.  Ex: C:\DOWNLOADS\)
  130. menuask(&3&Please enter the path&12&: &15&*)
  131. setequal(k=10)
  132. initclock
  133. fcopy (%RESP%\%var%d,files\uploads\%var%d)
  134. notif (%ARESP%)=(0) then goto (err)
  135. goto (lsuccess)
  136. *err
  137. say(&11&&CR&File not found!&CR&)
  138. enter
  139. Return
  140.  
  141. *invfn
  142. display(display\INVALID)
  143. flushout
  144. selfarea(/:LASTDOWN/)
  145. enter
  146. Return
  147.  
  148. *notenufs
  149. display (display\NOSPACE)
  150. selfarea(/:LASTDOWN/)
  151. enter
  152. Return
  153.  
  154. *phelp
  155. display(display\help\prot,/:SEC/)
  156. goto (pickprot)
  157.  
  158. *filesback
  159. Return
  160.