home *** CD-ROM | disk | FTP | other *** search
/ The Unsorted BBS Collection / thegreatunsorted.tar / thegreatunsorted / hacking / internet / ftp.pps < prev    next >
Encoding:
Text File  |  1995-01-12  |  2.3 KB  |  91 lines

  1. string MenuChoice 
  2. integer XMenu, YMenu
  3. string Name, info, Save, adress, directory
  4. integer namelen, infolen, adresslen, directorylen
  5. ;main menu
  6.  
  7. fopen 1,ppepath()+"ftp.cfg",o_rw,s_db
  8.  fget 1,xmenu
  9.  fget 1,ymenu
  10. fclose 1
  11. while (1=1) do
  12.  cls
  13.  namelen = 15
  14.  infolen = 15
  15.  adresslen = 44
  16.  directorylen = 60
  17.  MenuChoice = ""
  18.  name = ""
  19.  info = ""
  20.  save = ""
  21.  dispfile  ppepath() + "ftpMnu",graph
  22.  while (menuchoice <> "V" & menuchoice <> "A" & menuchoice <> "R" & menuchoice <> "Q") do
  23.   menuchoice = ""
  24.   menuchoice = inkey()
  25.   menuchoice = upper(menuchoice)
  26.  endwhile
  27.  ansipos Xmenu,Ymenu
  28.  menuchoice = upper(menuchoice)
  29.  color 7
  30.  
  31. ;View List
  32. if (menuchoice = "V") then
  33.   print "View"
  34.   delay 5
  35.   cls
  36.   dispfile ppepath() + "ftp.top",graph
  37.   dispfile ppepath() + "ftp.dat",graph
  38.   dispfile ppepath() + "ftp.bot",graph
  39.   wait
  40.  endif
  41.  
  42. ;Add to list
  43.  
  44.  if (menuchoice = "A") then
  45.   print "Add"
  46.   freshline
  47.   inputstr "@X0FF@X07T@X08P @X0FN@X07am@X08e : _",Name,15,NameLen,MASK_ASCII(),0
  48.   newline;
  49.   inputstr "@X0FIn@X07fo@X08rmation : _",info,15,INFOLEN,MASK_ASCII(),0
  50.   newline;
  51.   inputstr "@X0FAd@X07re@X08ss : _",adress,15,ADRESSLEN,MASK_ASCII(),0
  52.   newline;
  53.   inputstr "@X0FDi@X07re@X08ctory : _",Directory,15,DIRECTORYLEN,MASK_ASCII(),0
  54.   newline;
  55.   inputstr "@X0FS@X07av@X08e @X0FT@X07hi@X08s : _",save,15,1,"YNyn",0
  56.   name = name + "                                               "
  57.   info = info + "                                               "
  58.   directory = directory + "                                                                             "
  59.   adress = adress + "                                                                                   "
  60.   save = upper(save)
  61.   name = left(name,NameLen)
  62.   info = left(info, infolen)
  63.   adress = left(adress, adresslen)
  64.   directory = left(directory, directorylen)
  65.   if (save = "Y" & name <> "                    ") then
  66.    fappend 1, ppepath() + "ftp.dat",o_rw,s_db
  67.    fputln 1,"@X08φ @X0F" + name + " " + info + " " + adress 
  68.    fputln 1,"@X08∙ @X07" + directory
  69.    fclose 1
  70.   endif
  71.  endif
  72.  
  73. ;Remove FTP
  74.  
  75.  if (menuchoice = "R") then
  76.   print "Removal"
  77.   delay 5
  78.   kbdstuff "Q"+"E"+CHR(13)+"SYSOP"+CHR(13)+"Requesting Removal of FTP"+CHR(13)+"R"+CHR(13)
  79.  endif
  80.  
  81. ;Quit
  82.  
  83.  if (menuchoice = "Q") then
  84.   print "Quit"
  85.   delay 5
  86.   cls
  87.   end
  88.  endif
  89.  
  90. endwhile
  91.