home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
DP Tool Club 12
/
CD_ASCQ_12_0294.iso
/
vrac
/
nufilz20.zip
/
N.PPS
< prev
next >
Wrap
Text File
|
1994-01-26
|
17KB
|
507 lines
date reg_date
integer retcode, i, x, z, conf_num, y
string lines, lines_two, file, flag(10), return_value, answer, files(100), file_list
STRING cnames_path, upld_path, conf_path, date_since, dir_range, answer2, view
STRING zip_file, temp, temp2, token_count, scan_conf, conf_to_scan, temp_tok_str
string conf_scan, choose_one, cmdline, scan_date, dir_num(20), total_dir, input_line
string center_text, total_cmdline, position
cls
;join 0
gettoken cmdline
x = 0
if (cmdline = "") goto premain
if (upper(cmdline) = "H") then
dispfile ppepath() + "newfiles.hlp", ""
wait
elseif (cmdline = "1") then
gettoken cmdline
; println "date: ", cmdline
if (cmdline = "") then
; println " No cmdline"
; println strip(U_Ldir(), "-")
cmdline = strip(U_Ldir(), "-")
; println "Cmdline: ", cmdline
kbdstuff "N"
gosub version_num
gosub check_date
end
elseif (cmdline <> "") then
date_since = cmdline
; println "you entered somethin ", date_since
gettoken cmdline
if (cmdline = "") then
kbdstuff "N " + date_since
elseif (cmdline <> "") then
; kbdstuff "N " + date_since + " "
x = 0
; println " We are here"
while (cmdline <> "")do
x = x + 1
; println cmdline + " "
dir_num(x) = cmdline
total_dir = total_dir + " " + cmdline
gettoken cmdline
endwhile
kbdstuff "N " + date_since + " " + total_dir
endif
endif
gettoken cmdline
if (cmdline = "") then
println
input_line = " @X0EPlease input Directories to Scan@X07"
else
input_line = " @X06D@X0Eirectories: " + total_dir + "@X07"
endif
println " @X0BYou are scanning from: @X0F", date_since + "@X07" + input_line
println
;println "dir: ", cmdline
if (cmdline = "") then
end
elseif (upper(cmdline) = "A") then
; println "you chose all"
kbdstuff "A" + chr(34)
elseif (cmdline <>"") then
println
println " you got here"
println " @X0BYou are scanning from:@X0F " , date_since, "@X0E Please select directoires to scan@X07"
println
kbdstuff cmdline
endif
end
elseif (cmdline = "2") then
gettoken cmdline
;println "cmdline (date): " ,cmdline
if (cmdline = "") then date_since = strip(U_Ldir(), "-")
gosub version_num
gosub check_date
goto main
elseif (len(cmdline) =>7) then date_since = strip(cmdline, "-")
else
date_since = cmdline
endif
; println "date: " ,date_since
gettoken cmdline
if (cmdline = "") then cmdline = "A"
elseif (cmdline <>"") then
while (cmdline <> "") do
total_dir = total_dir + " " + cmdline
gettoken cmdline
endwhile
answer = total_dir
endif
gosub version_num
gosub check_date
println
println " @X0FYou are @X0Bscanning @X0Ffrom@X0C " + date_since + "@X0F with the following @X0Adirectories@X07"
println
goto directories
end
elseif (len (cmdline => 7)) then
gosub version_num
gosub check_date
date_since = (strip(cmdline, "-"))
gettoken cmdline
println " @X0FType @X0DN @X0Fat main prompt for @X0Amenu, @X0FN H for @X0Ehelp@X07"
println
IF (CMDLINE = "") then
println " @X0BScanning @X0Ffrom @X0E" + date_since + "@X07"
println
else
while (cmdline <> "") do
total_cmdline = total_cmdline + " " + cmdline
gettoken cmdline
endwhile
cmdline = total_cmdline
;x = len(date_since) + len(cmdline) + 28
;println x
; y = 40 - (x/2)
;println y
; position = "@POS" , y , "@"
println "@POS:16@@X0BScanning @X0Ffrom @X0E" + date_since + "@X0F Directory(s):@X0A " + cmdline + "@X07"
delay 50
endif
cmdline = "N " + date_since + " " + cmdline
kbdstuff cmdline
end
else goto premain
endif
;end
:premain
choose_one = ""
gosub version_num
println
println " @X0FWould you like to @X0Escan @X0Ffor all the @X0Cnew files @X0Fusing the "
println " @X0F standard PCBoard scan or would you like to @X0Escan @X0Ffor @X0Cnew@X07"
println " @X0C files @X0Fand @X0Ddownload a list @X0Fof new file descriptions.@X07"
println
println " Enter N 1 for regular PCBoard scan followed by date and directories"
println " Enter N 2 for newfiles scan with listing of files and descriptions"
println " Typing N1 or N2 at the main prompt will skip this menu"
println
println " @X0F 1. @X0BRegular PCBoard New files scan@X07"
println " @X0F 2. @X0ANew file scan with descriptions@X07"
println
inputstr " @X0FChoose one of the above(C/R to abort, @X0EH@X0F)elp)@X07", choose_one, 0Eh, 1, "12HhqQ", guide +fieldlen +upcase+lfafter
cls
if (choose_one = "") then
end
elseif (choose_one = "1") then
newlines 2
kbdstuff "N"
end
elseif (choose_one = "2") then
goto init
elseif (choose_one = "H")then
dispfile ppepath() + "newfiles.hlp", ""
goto premain
else goto init
endif
:init
gosub version_num
gosub register_num
println
if (x <> "99") gosub check_date
:main
println
cnames_path = READLINE(PCBDAT(), 31)
upld_path = readline(cnames_path,16)
conf_path = readline (pcbdat(),27) ; use 179 for temp dir path
println " @X0B ┌─────────────────────────────────────────────────────────────────────────┐@X07"
println "@X0B │ @X0FThe @X0Enew @X0Afile @X0Dnames @X0Fwill automatically be placed in a downloadable list @X0B│@X07"
println "@X0B │ @X0Fcalled @X0CNEWFILZ" + string(pcbnode()) + ".ZIP @X0Fand will be @X0Bflagged for download. │@X07"
println "@X0B └─────────────────────────────────────────────────────────────────────────┘@X07"
println
;println date_since
temp = temppath() + "flag.lst"
temp2 = temppath() + "newfiles.lst"
if (exist(temp)) delete temp
if (exist(temp2)) delete temp2
if (date_since = "") date_since = strip(U_Ldir(), "-")
if (total_dir = "") answer = "A"
:scan_date
inputstr "@X0A What date to scan from @X0E(C/R for last date on)@X07 ", date_since, 0Eh, 6 , "0123456789-", fieldlen + guide + lfafter
if (date_since = "") then
let date_since = U_LDATE()
else let date_since = date_since
endif
answer2 = ""
println
println " @X0A ╔════════════════════════════════════════════════════════════════════╗@X07"
println "@X0A ║@X07 E@X0Fnter the range of file directories you want to scan for new files.@X0A║@X07"
println "@X0A ║@X07 Y@X0Fou may enter a @X0Esingle @X0Fdirectory, a @X0Erange @X0Fof directories or @X0A║@X07"
println "@X0A ║ @X0DU @X0Ffor the upload directory or @X0CA @X0Ffor all directories and for all @X0A║@X07"
println " @X0A║ @X0Fconferences or @X0EQ for Quit @X0A║@X07"
println " @X0A ╚════════════════════════════════════════════════════════════════════╝@X07"
println
println " @X0F@X0BIndividual directories @X0Fshould be separated by a @X0Aspace@X07"
println " @X0ERange of directories @X0Fshould be separated by a @X0Ddash @X0F( - )@X07"
println
:directories
println " @X0FMain @X0BDirectories - (@X0C A@X0F)ll @X0EQ@X0F)uit @X0Erange @X0For @X0Asingle directory@X0B) @X07"
inputstr "@X0C Dir # @X07" , answer, 0Ch, 55, "0123456789UuAaQq- ", fieldlen+upcase+guide+newline
answer = upper(answer)
if (answer = "A") then
conf_scan = readline(pcbdat(),108)
dir_range = answer
goto make_list
elseif (answer = "") then
goto all_done
elseif (answer = "U") then
dir_range = "U"
goto make_list
elseif (answer = "Q") then
goto all_done
else
dir_range = answer
goto make_list
goto all_done
endif
println
:make_list
if (conf_num < 2 & answer <> "A") then ;******* change the 2******
newlines 2
scan_conf = "N"
println " T@X0Fhe @X07m@X0Fain @X07d@X0Firectories @X07s@X0Fcanned @X07i@X0Fs @X0E(@X0F",answer, answer2, "@X0E)@X07"
println
elseif (conf_num > 1 & answer = "A") then
scan_conf = "Y"
endif
:conf_scans
println " T@X0Fhe main @X0Afile directories @X07a@X0Fre @X07b@X0Feing @X07s@X0Fcanned @X07f@X0From @X0E(@X0F", date_since, "@X0E)@X07"
println
println " @X0B┌──────────────────────────────────────────────────────────────────┐@X07"
println " @X0B│ @X0FNow you can scan individual @X0Econferences @X0B(@X0Fall of the directories@X0B) @X0B│@X07"
println " @X0B └──────────────────────────────────────────────────────────────────┘@X07"
println
println " W@X0Fhich @X0EConferences @X07w@X0Fould @X07y@X0Fou @X07l@X0Fike @X07t@X0Fo @X07s@X0Fcan - @X07o@X0Fther @X07t@X0Fhan @X07t@X0Fhe @X07m@X0Fain @X07b@X0Foard@X07"
inputstr "@X0E (@X0BC/R @X0Ffor main -@X0B Q@X0F)uit - @X0BA@X0F)ll - or individual numbers@X0E)@X07",conf_to_scan, 0Bh, 30, "0123456789QA ", fieldlen + guide + upcase+newline + stacked
if (conf_to_scan = "") then
conf_to_scan = 0
; kbdstuff chr(13)
; join 0
gosub view_it
gosub scan_em
gosub clean_file
goto zip_it_up
;dir "N;" + date_since + ";" + dir_range + ";NS"
elseif (conf_to_scan = "Q") then
goto all_done
elseif (conf_to_scan = "A") then
dir_range = conf_to_scan
gosub view_it
gosub scan_em
gosub scan_all_conf
gosub clean_file
goto zip_it_up
else
gosub view_it
gosub scan_em
gosub scan_conf
gosub clean_file
goto zip_it_up
endif
;end
;********************************************************
:view_it
;********************************************************
view = "N"
println
inputstr " @X07 W@X0Fould @X07y@X0Fou @X07l@X0Fike @X07t@X0Fo @X0Aview @X0F@X07t@X0Fhe @X0Bscan process @X0F(@X0Eslower if viewed@X0F)(@X0EQ@X0F)@X0Euit@X07 ", view, 0Bh, 1, "YyNnQq", fieldlen+guide+upcase+newline
if (view = "N") showoff
if (view = "Q") goto all_done
dir_range = answer
temp = "newfilz" + string(pcbnode())
temp2 = ".zip"
zip_file = upld_path + temp
opencap temppath() + "newfile2.lst", retcode
return
;*********************************************************
:scan_em
;*********************************************************
println
println " @X07M@X0Faking @X07N@X0Few @X07F@X0Files @X07L@X0Fist - @X07T@X0Fhis @X07m@X0Fay @X07t@X0Fake a @X07l@X0Fittle @X07t@X0Fime @X07@X07"
kbdstuff chr(13)
dir "N;" + date_since + ";" + dir_range +";NS"
return
;**********************************************************
:scan_all_conf
;**********************************************************
showon
i=0
while (i < 2) do
i = i + 1
join i
kbdstuff chr(13)
dir "N;" + date_since + ";A;NS"
endwhile
goto all_done
return
;**********************************************************
:scan_conf
;**********************************************************
tokenize conf_to_scan
while (tokcount() > 0) do
let conf_to_scan = gettoken()
temp_tok_str = tokenstr()
join conf_to_scan
kbdstuff chr(13)
dir "N;" + date_since + ";A;NS"
tokenize temp_tok_str
endwhile
return
;**********************************************************
:clean_file
;**********************************************************
closecap
println
println " @X0FCleaning up the scanned list - this takes a little time@X07"
println
fopen 1, temppath() + "newfile2.lst", O_RD, S_DN
fcreate 2, temppath() + "newfiles.lst", O_RW, S_DN
i=0
'x=0
while (!FERR(1)) do
i=i+1
; x=x+1
fget 1, lines
lines_two = left(lines,79)
if (left(lines_two,70) = " ") goto continue_on
lines = rtrim(lines_two, " ")
if (left(lines, 6) = "L/Msg.") goto continue_on
if (left(lines, 9) = "High Msg.") goto continue_on
if (left(lines, 12) = "Active Msgs:") goto continue_on
if (left(lines,8) = "Scanning") goto continue_on
if (right(lines, 6) = "Joined") goto continue_on
if (right(lines, 8) = "missing!") goto continue_on
if (right(lines, 5) = "DizIt") goto continue_on
temp = ltrim(lines," ")
if (left(temp, 6) = "Making") goto continue_on
let files(i) = lines
fputln 2, lines_two
:continue_on
endwhile
fclose 1
fclose 2
showon
return
;***************************************************************
:zip_it_up
;***************************************************************
println
println " @X0EZipping @X0FFile list and moving to upload directory@X07"
println
zip_file = upld_path + "newfilz"+ string(pcbnode())
println zip_file
showoff
shell true, retcode, "PKZIP", " -ex " + zip_file + " " + temppath() + "NEWFILES.LST"
println
showon
answer = "N"
println " @X0F Would you like to @X0Aflag @X0Fthe @X0Bfile list @X0Fand @X0Aflag @X0Fthe files @X07"
inputstr " @X0Ffor @X0Edownload @X0F(up to 40 files) @X0Dautomatically@X07", answer, 0Eh, 1,"YyNn",fieldlen+guide+upcase
newlines 2
if (answer = "Y") goto flag_em
println
println " @X0AYou can either download the list now or it will be @X0Eflagged @X0Afor later download@X07"
println
inputstr " @X07W@X0Fould @X07y@X0Fou @X07l@X0Fike @X07t@X0Fo @X07d@X0Fownload @X07t@X0Fhe @X07l@X0Fist @X07n@X0Fow @X07u@X0Fsing @X07Z@X0Fmodem@X07", answer, 0Eh, 1, "YyNn", FIELDLEN + GUIDE+UPCASE+LFAFTER
if (answer = "Y") goto flag_list
temp = "newfilz" + string(pcbnode())
println
println " @X0CPlease @X0Bdont forget to @X0Fdownload@X0E " + temp + ".zip@X0F before logging off.@X07"
println
join 0
kbdstuff "f;flag " + temp + ".ZIP" + chr(13)
kbdstuff chr(13)
;kbdstuff chr(13)
goto all_done
;*********************************************************************
:flag_list
;********************************************************************
;kbdstuff "d;NEWFILES.ZIP;z"
shell 1, return_value, "dsz sz " + rtrim(readline(pcbdat(), 52), ":") + " " + upld_path + "newfiles.zip", ""
println
goto all_done
answer = ""
inputstr " @X0FWould you like to flag the new files for download now@X07", answer, 0Eh, 1,"YyNn", fieldlen + guide + upcase + lfafter
if (answer = "") goto all_done
if (answer = "Y") goto flag_em
if (answer = "N") goto all_done
;********************************************************************
:flag_em
;********************************************************************
join 0
println
println " Currently @X0Bmaking @X0Fa list of files to @X0Cflag! @X0FPlease be patient@X07"
println
z = 1
if (exist(temppath() + "flag.lst")) delete temppath() + "flag.lst"
;showoff
fopen 1, temppath() + "newfiles.lst", O_RD, S_DN
fopen 2, temppath() + "flag.lst", O_RW, S_DN
i=0
x=0
while (!FERR(1)) do
i=i+1
x=x+1
z=z+1
fget 1, lines
lines_two = left(lines,13)
if (left(lines,13) = " ") goto continue_it
if (left(lines,8) = "Scanning") goto continue_it
let files(i) = lines_two
lines_two = upper(lines_two)
lines_two = strip(lines_two, " ")
lines_two = rtrim(lines_two, "P")
lines_two = rtrim(lines_two, "I")
lines_two = rtrim(lines_two, "Z")
lines_two = rtrim(lines_two, ".")
LINES_TWO = (lines_two + " ")
print "."
fput 2, lines_two
:continue_it
endwhile
showon
x=0
for x = 1 to i
file_list = file_list + files(x)
next x
;showon
println
println " The @X0BFiles @X0Fwill now be @X0Cflagged @X0Ffor @X0Adownload@X07"
:make_it
kbdstuff "flag"
kbdfile temppath() + "flag.lst"
goto all_done
:all_done
if (exist(temppath() + "newfiles.lst")) delete temppath() + "newfiles.lst"
if (exist(temppath() + "newfile2.lst")) delete temppath() + "newfile2.lst"
if (exist(temppath() + "flag.lst")) delete temppath() + "flag.lst"
fclose 1
fclose 2
end
:center
position = 40 - (x/2)
return
:check_date
reg_date = "03-10-94"
if (date() > reg_date) then
beep
beep
println "@X0F PPE @X0Btrial period @X0Fhas @X0CEXPIRED@X0F - please tell @X0Esysop @X0Fto register it@X07"
end
;println
endif
println "@X0F This PPE is @X0EUNREGISTERED @X0F- please @X0Cregister @X0Fby " + string(reg_date) + " or it will @X0Dexpire@X07"
beep
delay 90
return
:version_num
newlines 1
println " ░▒▓█ @X0BNEWFILES@X0F.ppe v 2.0 █▓▒░"
println
println " ░▒▓█ @X07by DM Soft █▓▒░"
return
:register_num
return