home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Media Share 13
/
mediashare_13.zip
/
mediashare_13
/
ZIPPED
/
NETWORK
/
GP25.ZIP
/
SERVLI.PRG
< prev
next >
Wrap
Text File
|
1994-03-18
|
5KB
|
173 lines
* *********************************************************
* *
* * 03/18/94 SERVLI.PRG 07:25:20
* *
* *********************************************************
* *
* * Author's Name
* *
* * Copyright (c) 1994 Company Name
* * Address
* * City, Zip
* *
* * Description:
* * This program was automatically generated by GENSCRN.
* *
* *********************************************************
#REGION 0
REGIONAL m.currarea, m.talkstat, m.compstat
IF SET("TALK") = "ON"
SET TALK OFF
m.talkstat = "ON"
ELSE
m.talkstat = "OFF"
ENDIF
m.compstat = SET("COMPATIBLE")
SET COMPATIBLE FOXPLUS
* *********************************************************
* *
* * MS-DOS Window definitions
* *
* *********************************************************
*
IF NOT WEXIST("_qof0fwpj0")
DEFINE WINDOW _qof0fwpj0 ;
FROM INT((SROW()-16)/2),INT((SCOL()-61)/2) ;
TO INT((SROW()-16)/2)+15,INT((SCOL()-61)/2)+60 ;
TITLE " Server Login " ;
FLOAT ;
NOCLOSE ;
SHADOW ;
NOMINIMIZE ;
DOUBLE ;
COLOR SCHEME 5
ENDIF
* *********************************************************
* *
* * SERVLI/MS-DOS Setup Code - SECTION 2
* *
* *********************************************************
*
#REGION 1
Private cPassword, nExit, nServer, aServArry, nServers,n , nDeletes
external array aServArry
push key clear
nServer=1
nExit=2
cPassword=space(40)
cUserID=space(40)
nServers=n_GetSList('aServArry')
nDeletes=0
for n=alen(aServArry,1) to 1 step -1
if n_attached(aServArry[n])
=adel(aServArry,n)
nDeletes=nDeletes+1
endif
endfor
if nDeletes=nServers
=msgwin('You are already logged into all servers')
return
endif
Declare aServArry[nServers-nDeletes]
* *********************************************************
* *
* * SERVLI/MS-DOS Screen Layout
* *
* *********************************************************
*
#REGION 1
IF WVISIBLE("_qof0fwpj0")
ACTIVATE WINDOW _qof0fwpj0 SAME
ELSE
ACTIVATE WINDOW _qof0fwpj0 NOSHOW
ENDIF
@ 2,4 SAY "Server Name:" ;
SIZE 1,12, 0
@ 7,7 SAY "Password:" ;
SIZE 1,9, 0
@ 5,8 SAY "User ID:" ;
SIZE 1,8, 0
@ 1,19 GET nServer ;
PICTURE "@^" ;
FROM aServArry ;
SIZE 3,28 ;
DEFAULT 1 ;
COLOR SCHEME 5, 6
@ 5,20 GET cUserID ;
SIZE 1,27 ;
DEFAULT " " ;
PICTURE "@!"
@ 7,20 GET cPassword ;
SIZE 1,27 ;
DEFAULT " " ;
PICTURE "@!"
@ 11,12 GET nExit ;
PICTURE "@*HT \!\<OK;\?Cancel" ;
SIZE 1,16,1 ;
DEFAULT 1
IF NOT WVISIBLE("_qof0fwpj0")
ACTIVATE WINDOW _qof0fwpj0
ENDIF
READ CYCLE
RELEASE WINDOW _qof0fwpj0
#REGION 0
IF m.talkstat = "ON"
SET TALK ON
ENDIF
IF m.compstat = "ON"
SET COMPATIBLE ON
ENDIF
* *********************************************************
* *
* * SERVLI/MS-DOS Cleanup Code
* *
* *********************************************************
*
#REGION 1
cServer=n_defservr()
if nExit=1 and not empty(cUserid)
nResult=n_login(cUserID, cPassword,aServArry[nServer])
do case
case nResult=0
cMsg='Login Successful!'
append blank
=N_DefServr(aServArry[nServer])
replace ServName with aServArry[nServer], serialno with n_SerialNo(), MaxConns with n_maxconns(), version with N_ServVers()
case nResult=197 && Intruder detection activated
cMsg='Intruder detection activated for account!'
case nResult=220 && Account Disabled
cMsg='Account has been disabled!'
case nResult=252
cMsg='No such object!'
case nResult=254 && Login Disabled
cMsg='Login disabled on server!'
case nResult=255 && No Response From Server
cMsg='No Response from server!'
otherwise
cMsg='Unknown error number '+str(nResult,3)+'.'
endcase
if nResult!=0
=n_ServDtch(aServArry[nServer])
=n_defservr(cServer)
endif
=msgwin(cMsg,.t.)
endif
pop key