Showing posts with label login security in clipper summer 87. Show all posts
Showing posts with label login security in clipper summer 87. Show all posts

Saturday, October 28, 2017

Login Security in Clipper Summer 87

Here is a sample program that I wrote more than 20 years ago a login security program that I wrote using Clipper Summer '87 I hope you find my work useful.

My email address are the following jakerpomperada@gmail.com and jakerpomperada@yahoo.com.

My mobile number here in the Philippines is 09173084360.

My telephone number at home here in Bacolod City, Negros Occidental is (034) 4335675.


Program Listing

login.prg

save screen to sPassword

clear

cUser = space(10)
cPwds = 'fctc      bacolod   ±'
nTrys = 0

@ 10,27 say 'ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ '
@ 11,27 say '³ Login User :            ³Û'
@ 12,27 say '³ Password   :            ³Û'
@ 13,27 say 'ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙÛ'
@ 14,27 say '  ßßßßßßßßßßßßßßßßßßßßßßßßßß'

do while .t.

    set color to w/n,w/n,,,w/n

    @ 11,42 get cUser valid .not. empty(cUser)
    read

    if lastkey() = 27
        lAccess = .f.
        exit
    endif

    set confirm on
    set color to x/x
    set cursor off
    set intensity off

    cKeys = space(10)
    @ 12,42 get cKeys picture '@S1' valid .not. chr(177) $ cKeys
    read

    set confirm off
    set color to
    set cursor on
    set intensity on

    nTrys = iif(lastkey()#27,nTrys+1,nTrys)

    do case
        case lastkey() = 27
            lAccess = .f.
            exit
        case cUser+cKeys $ cPwds
            select 100
            use users
            locate for user = cUser
            if .not. found()
                append blank
            endif
            replace user with cUser,;
                    date with date(),;
                    time with time()
            lAccess = .t.
            exit
        case nTrys > 2
            clear
            set color to w+
            @ 12,27 say 'A C C E S S  D E N I E D ...'
            set colo to
            tone(300,1)
            tone(499,5)
            tone(700,5)
            inkey(5)
            lAccess = .f.
            exit
    endcase

enddo

restore screen from sPassword

return

* --- EOF