home *** CD-ROM | disk | FTP | other *** search
- string MenuChoice
- integer XMenu, YMenu
- string Name, info, Save, adress, directory
- integer namelen, infolen, adresslen, directorylen
- ;main menu
-
- fopen 1,ppepath()+"ftp.cfg",o_rw,s_db
- fget 1,xmenu
- fget 1,ymenu
- fclose 1
- while (1=1) do
- cls
- namelen = 15
- infolen = 15
- adresslen = 44
- directorylen = 60
- MenuChoice = ""
- name = ""
- info = ""
- save = ""
- dispfile ppepath() + "ftpMnu",graph
- while (menuchoice <> "V" & menuchoice <> "A" & menuchoice <> "R" & menuchoice <> "Q") do
- menuchoice = ""
- menuchoice = inkey()
- menuchoice = upper(menuchoice)
- endwhile
- ansipos Xmenu,Ymenu
- menuchoice = upper(menuchoice)
- color 7
-
- ;View List
- if (menuchoice = "V") then
- print "View"
- delay 5
- cls
- dispfile ppepath() + "ftp.top",graph
- dispfile ppepath() + "ftp.dat",graph
- dispfile ppepath() + "ftp.bot",graph
- wait
- endif
-
- ;Add to list
-
- if (menuchoice = "A") then
- print "Add"
- freshline
- inputstr "@X0FF@X07T@X08P @X0FN@X07am@X08e : _",Name,15,NameLen,MASK_ASCII(),0
- newline;
- inputstr "@X0FIn@X07fo@X08rmation : _",info,15,INFOLEN,MASK_ASCII(),0
- newline;
- inputstr "@X0FAd@X07re@X08ss : _",adress,15,ADRESSLEN,MASK_ASCII(),0
- newline;
- inputstr "@X0FDi@X07re@X08ctory : _",Directory,15,DIRECTORYLEN,MASK_ASCII(),0
- newline;
- inputstr "@X0FS@X07av@X08e @X0FT@X07hi@X08s : _",save,15,1,"YNyn",0
- name = name + " "
- info = info + " "
- directory = directory + " "
- adress = adress + " "
- save = upper(save)
- name = left(name,NameLen)
- info = left(info, infolen)
- adress = left(adress, adresslen)
- directory = left(directory, directorylen)
- if (save = "Y" & name <> " ") then
- fappend 1, ppepath() + "ftp.dat",o_rw,s_db
- fputln 1,"@X08φ @X0F" + name + " " + info + " " + adress
- fputln 1,"@X08∙ @X07" + directory
- fclose 1
- endif
- endif
-
- ;Remove FTP
-
- if (menuchoice = "R") then
- print "Removal"
- delay 5
- kbdstuff "Q"+"E"+CHR(13)+"SYSOP"+CHR(13)+"Requesting Removal of FTP"+CHR(13)+"R"+CHR(13)
- endif
-
- ;Quit
-
- if (menuchoice = "Q") then
- print "Quit"
- delay 5
- cls
- end
- endif
-
- endwhile
-