** (FBE) File Base Enhancer: by Douglas Bell Copyright 1991 ** ** TBBS Version Required: 2.2+ ****************************************************************************** ** Assign PUBLIC variables public tdbs && TDBS Public Variable public program && Name Of The Program " FBEplus " or " FBE Pro " public version && FBE Version public bywhom && By Whom FBE Was Written public towhom && To Whom FBE Is Registered public findtmp && Tmp Variable For Finding A File public doing && Tracks Which Routine Is Running public seclvl && Security Level Required For SysOp Options public intload && Interrupt Variable For Displaying DIR Screens public count && Common Counting Variable public desmatch && Tracks Whether Exd->File_No = Dir->File_No public altdrive && Alternate Drive For FBE CNF Files public do_anyway && Do The Specified Routine Anyway .. ** Arrays public parsed[40] && Common Parsing Array public a_path[len(parsed)] && Array for Holding the Path Info ** Saved Variables For DOTBBS Execution public saved_tf && .T. = Saved Before, .F. = First Time public save_act1 && Act-> (User_Name) public save_act2 && Act-> (Acct_No) public save_inf && Inf-> (Cnf_No) public save_pth && Pth-> (Dir_No + Path_No) public save_cnf && Cnf-> (Dir_No) public save_dir1 && Dir-> (Dir_No + File_Date) public save_dir2 && Dir-> (Dir_No + File_Name + File_Ext) public save_exd && Exd-> (Dir_No + File_No + Line_No) public save_byt && Byt-> (K_Sec) ** CNF & DIR Related Variables * public rowsave && Save ROW of Cursor in ANSI * public colsave && Save COL of Cursor in ANSI public pagenum && Directory Listing Page Number Or Quit FBE public cnffile && public tmpkey && Tmp Key Variable public linelen && Command Line Length public showboth && Show both cmd lines or just the input? public cnfkey && Cnf Key Variable (Typed Command Line) public intcnf && Interrupt Variable For CNF public numcnf && Number Of Conferences public cnfnum && Current CNF Number public dirkey && Dir Key Variable (Typed Command Line) public intdir && Interrupt Variable For DIR public numdir && Number Of Directories public dirnum && Current DIR Number public numfiles && public numext && Number Of Ext. Description Lines ** Parsed Key Variables public ns_key && Non-Stop/Continous Key Identifier public a_key && 'A' Key Identifier public b_key && 'B' Key Identifier public c_key && 'C' Key Identifier (If for 'NS' Mode use ns_key) public d_key && 'D' Key Identifier public e_key && 'E' Key Identifier public f_key && 'F' Key Identifier public g_key && 'G' Key Identifier public h_key && 'H' Key Identifier public i_key && 'I' Key Identifier public j_key && 'J' Key Identifier public k_key && 'K' Key Identifier public l_key && 'L' Key Identifier public m_key && 'M' Key Identifier public n_key && 'N' Key Identifier public o_key && 'O' Key Identifier public p_key && 'P' Key Identifier public q_key && 'Q' Key Identifier public r_key && 'R' Key Identifier public s_key && 'S' Key Identifier public t_key && 'T' Key Identifier public u_key && 'U' Key Identifier public v_key && 'V' Key Identifier public w_key && 'W' Key Identifier public x_key && 'X' Key Identifier public y_key && 'Y' Key Identifier public z_key && 'Z' Key Identifier ** User Information Variables public allow_kb && Allowed Bytes For Download public tagged_kb && Tagged Bytes For Download public username && User Full Name (According To TBBS) public userno && User Acct Number public userlvl && User Level (According To TBBS) public expert && Expert Level (According To TBBS) public line && Called On Line # (According To TBBS) public length && Page Length (According To TBBS) public width && Page Width (According To TBBS) public userlen && User Length public userwid && User Width public ulnum && UL Protocol Number (According To TBBS) public dlnum && DL Protocol Number (According To TBBS) public ulprot && Upload Protocol (According To TBBS) public dlprot && Download Protocol (According To TBBS) public ultot && Total Upload Bytes (According To TBBS) public dltot && Total Download Bytes (According To TBBS) * public daymin && Minutes Per Day (According To TBBS) * public daybyte && Bytes Per Day (According To TBBS) * public callmin && Minutes Per Call (According To TBBS) public auth1 && Autorization Flag 1 public auth2 && Autorization Flag 2 public auth3 && Autorization Flag 3 public auth4 && Autorization Flag 4 ****************************************************************************** ** Default settings for dBase III+ compatibility set scoreboard off set status off set talk off ** Optional settings for this program on disconnect do goodbye on error do errhand * on escape quit set typeahead to 10 set delimiters to "()" set delimiters on set intensity off set exclusive off set softseek off set confirm on set escape off set exact off set bell off ** Load User Info do userinfo ** Detect If User Is In ANSI Mode (If Not, Poll For ANSI Mode) ** 2 = ANSI, 1 = ANSI Poll (Yes), 0 = ANSI Poll (No) ** If Ansimode > 0 && User Has ANSI ** If Ansicolor && User Wants ANSI Color ansicolor = .T. && Tmp Solution Till reading from .ACT file if uansi() ansimode = 2 && User Is In ANSI else if substr(ulpeek(246,5),8,1) = "X" ansimode = 1 && ANSI Poll Successful tmp = ulreplace(uansi,.T.) && Set ANSI (On) For User Till Exit else ansimode = 0 && ANSI Poll Negative endif endif ** Set User Page To 80xNS tmp = ulreplace(umore,0) tmp = ulreplace(uwidth,80) ** Show Short FBE StartUp Screen set procedure to misc set procedure to towhom do towhom ** Load FBE DBF's / NDX's set procedure to loaddbf do load1 ** Minimum Security Level For SysOp Options seclvl = 254 ** Define Some ANSI And ASCII Differences dot = iif(uibm(),"ú",".") box = iif(uibm(),"þ","*") ** Logical Variables showboth = .T. save_tf = .T. intcnf = .F. intdir = .F. ns_key = .F. min_once = .F. pls_once = .T. ** Numerical Variables cnfnum = 0 numcnf = 0 dirnum = 0 numdir = 0 numfiles = 0 numext = 0 num_parsed = 0 ** Character Variables rampath = "" assume = "" settings = "" tmpkey = "" cnfkey = "" dirkey = "" ** Arrayed Variables - Fill all with "" tmp = afill(parsed, "") ****************************************************************************** ** Load External Procedure Files set procedure to loadcmd set procedure to parse set procedure to cnf set procedure to dir set procedure to download set procedure to search set procedure to viewfile set procedure to protocol set procedure to tagfile set procedure to upload ****************************************************************************** ** Continue With The Program do loadcmd do loadcnf do showcnf do goodbye ****************************************************************************** ** Quit routine procedure goodbye if ansimode = 1 tmp = ulreplace(uansi,.F.) && Set ANSI (Off) If ANSI Polled endif tmp = ulreplace(umore,userlen) && Reset Page Length tmp = ulreplace(uwidth,userwid) && Reset Page Width set color to do cls clear typeahead close all quit return ** Error Handler procedure errhand ? ? " Error: " + error() ? " Message: " + message() ? ? " Line: " + procline() ? "Procedure: " + procname() ? wait halt return ** Load UserInfo Routine procedure userinfo line = right(space(2)+uline(),2) username = left(uname()+space(30),30) userlvl = upriv() expert = ulpeek(69,1) userwid = uwidth() width = userwid userlen = umore() length = userlen ulnum = ulpeek(239,1) dlnum = ulpeek(240,1) ultot = right(space(8)+ltrim(rtrim(str(ulpeek(139,4)/1024000,7,1))),7) dltot = right(space(8)+ltrim(rtrim(str(ulpeek(135,4)/1024000,7,1))),7) auth1 = ltrim(rtrim(uauth(1))) auth2 = ltrim(rtrim(uauth(2))) auth3 = ltrim(rtrim(uauth(3))) auth4 = ltrim(rtrim(uauth(4))) * daymin = left(ltrim(rtrim(str(ulpeek(149,2),4)))+space(16),16) * daymin = iif(daymin="0","Infinite",daymin) * daybyte = left(ltrim(rtrim(str(ulpeek(143,4),8)))+space(16),16) * daybyte = iif(daybyte="0","Infinite",daybyte) * callmin = left(ltrim(rtrim(str(ulpeek(73,1),3)))+space(16),16) * callmin = iif(callmin="0","Infinite",callmin) return