home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Simtel MSDOS 1992 December
/
simtel1292_SIMTEL_1292_Walnut_Creek.iso
/
msdos
/
clipper
/
code_1.arc
/
TEM_INIT.PRG
next >
Wrap
Text File
|
1988-12-16
|
9KB
|
239 lines
* ____INIT.PRG
* ________ SYSTEM STARTUP MODULE by Gary L. Cota
* Called from ________.PRG
* created: __/__/__
* last update: __/__/__
*
**************************************************
* NOTE: This routine has been put in an overlay *
* file to minimize the .EXE file size. *
**************************************************
*
****************************************************************
* User Defined Functions (UDFs) are in the TEM_UDFS.PRG file. *
****************************************************************
*
******************************************************************
* Get the color control variables from the memory variable file. *
******************************************************************
IF FILE("SSCOLORS.MEM")
RESTORE FROM SSCOLORS ADDITIVE
ELSE
IF ISCOLOR()
c_scrl_box="N/BG"
c_goto_box="+BG/N"
c_scrl_con="N/BG"
c_scrl_bar="+GR/B"
c_box_inv ="N/B"
sys_color ="GR+/N,GR+/B,W+/N,BG+/B" && system color string
ELSE
STORE "W/N" TO c_scrl_box,c_goto_box,c_scrl_con,c_scrl_bar,c_box_inv
STORE "W/N,W/N,W/N,W/N" TO sys_color
ENDIF
SAVE TO SSCOLORS
ENDIF
*
sys_comm="F1=Help ESC=Exit/Quit"
*
USE_DBF=.T. && dBDSCRL accessing .dbf files (rather than arrays) if required
*
*************************************************************
* The sys_dkey variable contains the key which was used to *
* encrypt secured data in the __WTFO.DBF file (see below). *
* The string used to create the encrypted data MUST be the *
* identical string used to decrypt the data. *
* Refer to PASSWORD.PRG (password encryption program) and *
* the __UTIL.PRG, Security Adminstration program for addi- *
* tional information. *
*************************************************************
sys_dkey="#@$uSa!&*" && This string required to decrypt secured data in __WTFO file
*
**************************
* Display Opening Screen *
**************************
*
*
SET COLOR TO W+/N
CLEAR
@ 01,07 SAY " ████████████████ █████████████████ ███████"
@ ROW()+1,07 SAY "█████████████████ ██████████████████ ████████"
@ ROW()+1,07 SAY "█████████████████ ███████▀▀▀▀▀▀▀▀▀▀ ████████"
@ ROW()+1,07 SAY "████████▀▀███████ ███████ ████████"
@ ROW()+1,07 SAY "████████ ███████ █████████████ ████████"
@ ROW()+1,07 SAY "█████████████████ █████████████ ████████"
@ ROW()+1,07 SAY "█████████████████ ███████▀▀▀▀▀ ████████"
@ ROW()+1,07 SAY "█████████████████ ███████ ████████"
@ ROW()+1,07 SAY "███████ ██████ ███████ ████████"
@ ROW()+1,07 SAY "███████ ██████ █████████████████ ██████████████████"
@ ROW()+1,07 SAY "███████ ██████ █████████████████ ██████████████████"
@ ROW()+1,07 SAY "██████ █████ ████████████████ █████████████████"
*
SET COLOR TO B/N
@ 02,07 SAY CHR(219)
@ ROW()+1,07 SAY CHR(219)
@ ROW()+1,07 SAY CHR(219)
@ ROW(),15 SAY REPLICATE(CHR(223),2)
@ ROW(),17 SAY CHR(219)
@ ROW()+1,07 SAY CHR(219)
@ ROW(),17 SAY CHR(219)
@ ROW()+1,07 SAY CHR(219)
@ ROW()+1,07 SAY CHR(219)
@ ROW()+1,07 SAY CHR(219)
@ ROW()+1,07 SAY CHR(219)
@ ROW(),18 SAY CHR(219)
@ ROW()+1,07 SAY CHR(219)
@ ROW(),18 SAY CHR(219)
@ ROW()+1,07 SAY CHR(219)
@ ROW(),18 SAY CHR(219)
@ ROW()+1,07 SAY REPLICATE(CHR(223),6)
@ ROW(),18 SAY REPLICATE(CHR(223),5)
*
@ 02,31 SAY CHR(219)
@ ROW()+1,31 SAY CHR(219)
@ ROW(),38 SAY REPLICATE(CHR(223),10)
@ ROW()+1,31 SAY CHR(219)
@ ROW()+1,31 SAY CHR(219)
@ ROW()+1,31 SAY CHR(219)
@ ROW()+1,31 SAY CHR(219)
@ ROW(),38 SAY REPLICATE(CHR(223),5)
@ ROW()+1,31 SAY CHR(219)
@ ROW()+1,31 SAY CHR(219)
@ ROW()+1,31 SAY CHR(219)
@ ROW()+1,31 SAY CHR(219)
@ ROW()+1,31 SAY REPLICATE(CHR(223),16)
*
@ 02,56 SAY CHR(219)
@ ROW()+1,56 SAY CHR(219)
@ ROW()+1,56 SAY CHR(219)
@ ROW()+1,56 SAY CHR(219)
@ ROW()+1,56 SAY CHR(219)
@ ROW()+1,56 SAY CHR(219)
@ ROW()+1,56 SAY CHR(219)
@ ROW()+1,56 SAY CHR(219)
@ ROW()+1,56 SAY CHR(219)
@ ROW()+1,56 SAY CHR(219)
@ ROW()+1,56 SAY REPLICATE(CHR(223),17)
*
mmsg="________________________________________________________________"
SET COLOR TO +B/N
@ 15,40-(LEN(mmsg)/2) SAY mmsg
@ 16,14 SAY " Copyright 1988 - American Electronic Laboratories"
SET COLOR TO +BG/N
@ 19,23 SAY "Please Enter User Name xxxxxxxxxx"
@ 20,23 SAY "Please Enter Password xxxxxxxxxx"
*
******************************
* Get User Name and Password *
******************************
*
*************************************************************
* The current field assignments for __WTFO are as follows: *
* *
* F01 .......... LOG_OUT - Did the user exit normally? *
* F02 .......... TIME_OUT - Time user logged out *
* F03 .......... DATE_OUT - Date user logged out *
* F04 .......... TIME_IN - Time user logged in *
* F05 .......... DATE_IN - Date user logged in *
* F06 .......... SECURITY - User access level (ENCRYPT) *
* F07 .......... USERPASS - User password (PASSWORD) *
* F08 .......... USERNAME - User name (ENCRYPT) *
* F09 .......... DUMMY - Bogus field *
* F10 .......... DUMMY - Bogus field *
* F11 .......... PRINTER - Local or Network printer *
* F12 .......... SERVER - Network SERVER name (for *
* print spooling purposes) *
* F13 .......... DUMMY - Bogus field *
* F14 .......... DUMMY - Bogus field *
* *
* If the field order seems strange, it is deliberate. The *
* order is the inverse of the original .dbf structure. The *
* original field names are also listed. *
* *
* NOTE: PASSWORD indicates field is protected using the *
* c_PASSWORD() function; ENCRYPT indicated fields are *
* protected using the c_ENCRYPT() function. Both of these *
* functions are 100% CLIPPER and are found at in the *
* TEM_UDFS.PRG program. *
*************************************************************
*
USE __WTFO
mlctr=1
SET CURSOR ON
DO WHILE .T.
IF mlctr>3
mmsg="INTRUDER ALERT!!! WORKSTATION & USER NOTED - ACCESS TO SYSTEM DENIED."
@ 23,40-(LEN(mmsg)/2) SAY mmsg
FOR I=1 TO 10
TONE(130.8,6)
TONE(196.0,6)
NEXT
*
*******************************************************
* Include the following statements if system requires *
* multi-user capabilities or single-user security. *
*******************************************************
* intr_adr=N_ADDR()
* intr_stn=N_STANUM()
* intr_who=N_WHOAMI()
* SAVE TO SSIARF ALL LIKE intr_*
QUIT
ENDIF
SET COLOR TO W/N,N/W,,,,
mwork=SPACE(10)
user_name=SPACE(10)
user_level=0
@ 19,47 GET user_name PICTURE "@!"
READ
IF user_name=SPACE(10)
EXIT
ENDIF
*
* Password
*
SET COLOR TO W/N,X
@ 21,47 GET mwork PICTURE "@!"
READ
CLEAR GETS
SET COLOR TO (sys_color)
*
********************************************************************
* c_ENCRYPT() and c_PASSWORD() functions should be included at the *
* bottom of the main menu/load program. *
********************************************************************
LOCATE FOR c_ENCRYPT(user_name,sys_dkey)=F08 .AND. c_PASSWORD(mwork,sys_dkey)=F07
IF EOF()
mmsg="INVALID USER AND/OR PASSWORD"
?? CHR(7)
@ 23,40-(LEN(mmsg)/2) SAY mmsg
ELSE
REPLACE F05 WITH DATE(),F04 WITH TIME(),F01 WITH .F.
user_level=F06
*
IF EMPTY(F11)
sys_prn="L" && LOCAL Printer
REPLACE F11 WITH sys_prn+sys_srv
ELSE
sys_prn=TRIM(F11)
ENDIF
*
IF EMPTY(F12)
sys_srv=c_BLANK(F12) && SERVER Name if network printer
ELSE
sys_srv=TRIM(F12)
ENDIF
EXIT
ENDIF
mlctr=mlctr+1
ENDDO
IF LASTKEY()=27 .OR. EMPTY(user_name)
CLEAR
QUIT
ENDIF
SET CURSOR OFF
CLOSE DATABASES
RETURN
*
*
*