Professional Documents
Culture Documents
defi window echo from 1,1 to 20,60 title "Student's profile" float mini close
acti windo echo
move windo echo center
CP=space(1)
Do Case
case CP="ADMINISTRATOR"
Do qwe1
clear
clear all
case CP="Guest"
Do QWEG
endcase
do qwe
PASSWORD LOGIN WINDOW
set exact on
set ansi on
clear
defi window echo from 1,1 to 20,60 title "Admin" float mini close double
acti windo echo
move windo echo center
@1,22 say "Log In" font"", 25
A1=space(10)
B1=space(8)
F=space(1)
F1=space(1)
If F="Back"
deact windo echo
clear
clear all
do qwe
else
If empty(B1)
messagebox('empty password')
do oraldef1
else
IF B1="====="
Do qwe2
else
clear
clear all
messagebox('your password was incorrect!')
Do QWE1
endif
endif
endif
DO QWE1
MAINMENU FOR ADMIN
set talk off
set status off
set echo off
clear
clear all
clear screen
define window echo from 1,1 to 30,105 title"GENSANTOS FOUNDATION, INC, General Santos
City"STYLE'';
COLOR W/BG FLOAT SHAD MINI CLOSE
@13,26 get sm1 function '* ADD ENTRY' SIZE 1,25 FONT"ARIAL BLACK",10
@16,26 get sm2 function '* EDIT ENTRY' SIZE 1,25 FONT"ARIAL BLACK",10
@19,26 get sm3 function '* DELETE ENTRY' SIZE 1,25 FONT"ARIAL BLACK",10
@22,26 get sm4 function '* PRINT ENTRY' SIZE 1,25 FONT"ARIAL BLACK",10
@25,26 get sm5 function '* RECORDS' SIZE 1,25 FONT"ARIAL BLACK",10
@28,26 get sm6 function '* QUIT' SIZE 1,25 FONT"ARIAL BLACK",10
@31,26 get sm7 function '* SIGN-OUT' SIZE 1,25 FONT"ARIAL BLACK",10
READ
IF SM1="ADD ENTRY"
CLEAR
CLEAR ALL
DO qwea
ELSE
ENDIF
IF SM2="EDIT ENTRY"
CLEAR
CLEAR ALL
DO QWEB
ELSE
ENDIF
IF SM3="DELETE ENTRY"
CLEAR
CLEAR ALL
DO QWEC
ELSE
ENDIF
IF SM4="PRINT ENTRY"
CLEAR
CLEAR ALL
DO QWED
ELSE
ENDIF
IF SM5="RECORDS"
CLEAR
CLEAR ALL
USE QWE.DBF
BROWSE NOEDIT
CLOSE DATABASE
DO QWE2
ENDIF
IF SM6="QUIT"
CLEAR
CLEAR ALL
DO QWEE
ELSE
ENDIF
IF SM7="SIGN-OUT"
CLEAR
CLEAR ALL
DO QWE
ELSE
ENDIF
DO QWE2
CLEAR ALL
ADDING STUDENT DATA
set readb on
CLEAR
close database
defi window echo from 1,1 to 40,150 title "add Reg student Form" style "b" mini float
@6,25 say "FIRST NAME" color G/GR+ font "arial" style "B"
@6,50 say "LAST NAME" font "arial" style "B" color G/GR+
@14,4 say "Birth Date (MM/DD/YYYY)" font "arial" style "B" color G/GR+
@21,20 say "GENDER (MALE/FEMALE)" font "Courier New" style "B" color B+/W*
SID=0
FIRST=SPACE(15)
LAST=SPACE(15)
ADDRESS1=SPACE(30)
Birth=SPACE(10)
AGE1=0
GENDER1=1
PHONE1=0
CLASS1=SPACE(10)
COURSE1=SPACE(30)
A1=SPACE(1)
A2=SPACE(1)
DO WHILE .T.
READ
IF GENDER1=1
G1="MALE"
else
G1="FEMALE"
endif
********************************************************************************
IF A2='BACK'
DO QWE2
ELSE
********************************************************************************
IF EMPTY(SID)
MESSAGEBOX('EMPTY ENTRY')
LOOP
ELSE
IF EMPTY(FIRST)
MESSAGEBOX('EMPTY ENTRY')
LOOP
ELSE
IF EMPTY(LAST)
MESSAGEBOX('EMPTY ENTRY')
LOOP
ELSE
IF EMPTY(Birth)
MESSAGEBOX('EMPTY ENTRY')
LOOP
ELSE
IF EMPTY(ADDRESS1)
MESSAGEBOX('EMPTY ENTRY')
LOOP
ELSE
IF EMPTY(AGE1)
MESSAGEBOX('EMPTY ENTRY')
LOOP
ELSE
IF EMPTY(PHONE1)
MESSAGEBOX('EMPTY ENTRY')
LOOP
ELSE
IF EMPTY(CLASS1)
MESSAGEBOX('EMPTY ENTRY')
LOOP
ELSE
IF EMPTY(COURSE1)
MESSAGEBOX('EMPTY ENTRY')
LOOP
ELSE
*******************************************************************************
IF AGE1>150
LOOP
ELSE
IF VAL (LEFT(BIRTH,2))>12
LOOP
ELSE
IF VAL (LEFT(BIRTH,2))=0
LOOP
ELSE
IF VAL (SUBSTR(BIRTH,4,2))>31
LOOP
ELSE
IF VAL (SUBSTR(BIRTH,4,2))=0
MESSAGEBOX('YOUR BIRTH DAY IS INVALID')
LOOP
ELSE
IF VAL (RIGHT(BIRTH,4))<1800
LOOP
ELSE
IF found()
LOOP
ELSE
CLOSE DATA
IF A1="SAVE"
USE QWE.DBF
APPEND BLANK
do qwea
ELSE
ENDIF
ENDIF
ENDIF
ENDIF
ENDIF
ENDIF
ENDIF
ENDIF
ENDIF
ENDIF
ENDIF
ENDIF
ENDIF
ENDIF
ENDIF
ENDIF
ENDIF
ENDIF
ENDIF
ENDIF
ENDDO
DO QWEA
* the End
EDITNG THE DATA
set talk off
set readb on
set delete on
close data
CLEAR
close database
defi window echo from 1,1 to 40,170 title "edit Reg Form" style "R" color G+/BG mini float
******************
Store 0 to sid,age1,phone1
store 1 to gender1
*********************
Do While .T.
Do While .T.
@4,43 say "SID :" font "arial",15 style "B" color R+/BG*
@4.2,68 get A2 function'* Search ID' font "arial" style "B" size 1.3,15
@40,100 get A2 function'* BACK' font "arial" style "B" size 1.3,15
read
IF A2="BACK"
clear all
Do qwe2
else
endif
use qwe.dbf
If found()
else
If .not. found()
loop
else
endif
endif
exit
Enddo
@10,1 get first font "arial",15 style "B" size 1,17 say "FIRST NAME :" font "arial",15 style "B"
@15,1 get last font "arial",15 style "B" size 1,17 say "LAST NAME :" font "arial",15 style "B"
@20,1 get address1 font "arial",15 style "B" say "ADDRESS :" font "arial",15 style "B"
@25,1 get birth font "arial",15 style "B" SIZE 1,11 say "Birth Date :" font "arial",15 style "B"
@30,1 get age1 font "arial",15 style "B" say "AGE :" font "arial",15 style "B"
@35,1 get gender1 font "arial",15 style "B" SIZE 1,8 PICT"@!" say "GENDER ;" font "arial",15 style "B"
@40,1 get phone1 font "arial",15 style "B" size 1,13 say "PHONE NUMBER :" font "arial",15 style "B"
@10,55 get class1 font "arial",15 style "B" say "CLASS :" font "arial",15 style "B"
@15,55 get course1 font "arial",15 style "B" say "COURSE :" font "arial",15 style "B"
@35,100 get A1 function'* Save change' font "arial" style "B" size 1.6,10
@40,100 get A2 function'* BACK' font "arial" style "B" size 1.3,15
read
If A1="Save change"
USE QWE.DBF
APPEND BLANK
do qweb
Else
endif
IF A2="BACK"
clear all
Do qwe2
ENDIF
*****************
loop
enddo
DELETING THE DATA
set readb on
CLEAR
DO WHILE .T.
close database
defi window echo from 1,1 to 30,100 title "Delete section Form" style "b" color G/N+ close float
A1=SPACE(1)
A2=SPACE(1)
A3=SPACE(1)
OK1=SPACE(1)
CANCEL1=SPACE(1)
SID=0
@27.2,15 get A3 function '* SEARCH & DELETE' size 1.5,42.5 font'arial'
READ
IF A2='BACK'
CLEAR
CLEAR ALL
DO QWE2
ELSE
IF A1='BROWSE'
BROW noedit
ELSE
IF .NOT. FOUND()
LOOP
ELSE
IF FOUND()
READ
IF OK1='OK'
PACK
LOOP
ELSE
IF CANCEL1='CANCEL'
CLEAR
LOOP
ELSE
ENDIF
ENDIF
ENDIF
ENDIF
ENDIF
ENDIF
ENDIF
ENDDO
PRINT DATA (ADMIN)
SET TALK OFF
CLEAR
DO while .t.
defi window echo from 1,1 to 30,100 title "PRINT FORM" style "b" color G/N+ close float
DEFI WIND printoutput from 1,1 TO 40,110 TITLE "GENSANTOS FOUNDATION, INC, General Santos City"
FLOAT MINI
A1=SPACE(1)
A2=SPACE(1)
A3=SPACE(1)
OK1=SPACE(1)
CANCEL1=SPACE(1)
SID=0
@27.2,15 get A3 function '* PREVIEW & PRINT' size 1.5,42.5 font'arial'
IF A2='BACK'
CLEAR
CLEAR ALL
DO QWEG
ELSE
IF A1='BROWSE'
BROW noedit
ELSE
IF .NOT. FOUND()
LOOP
ELSE
IF FOUND()
CLEAR
@1,27 SAY "GENSANTOS FOUNDATION, INC." font "Arial Black",20 style"Bold" color r/b
READ
IF OK1='PRINT'
SYS(1037)
SET PRINTER ON
@1,27 SAY "GENSANTOS FOUNDATION, INC." font "Arial Black",20 style"Bold" color r/b
SET PRINTER TO
MESSAGEBOX ("Done")
LOOP
ELSE
IF CANCEL1='CANCEL'
CLEAR
LOOP
ELSE
ENDIF
ENDIF
ENDIF
ENDIF
ENDIF
ENDIF
ENDIF
ENDDO
DO QWEF
QUIT (ADMIN)
CLEAR
defi wind echo from 1,1 to 10,40 title "Exit"mini shad style"B"
A1=SPACE(1)
READ
Do Case
Case A1="YES"
CLEAR ALL
QUIT
Case A1="NO"
CLEAR ALL
DO QWE2
Endcase
DO QWEE
MAIN MENU FOR GUEST
set talk off
clear all
DEFI WIND GROUP4 FROM 0,0 TO 24,80 TITLE"GENSANTOS FOUNDATION,INC, General Santos City"
FLOAT MINImize SHAD CLOSE zoom groW COLOR B/W
mButton = 3
@13,22 GET mButton FUNCTION'* FIND & PRINT ENTRY; SIGN-OUT;QUIT' SIZE 2,25
READ
DO CASE
CASE mButton = 1
CLEAR
CLEAR ALL
do QWEF
CASE mButton = 2
CLEAR
CLEAR ALL
do QWE
CASE mButton = 3
CLEAR ALL
do QWEH
endcase
PRINT (GUEST)
SET TALK OFF
CLEAR
DO while .t.
defi window echo from 1,1 to 30,100 title "PRINT FORM" style "b" color G/N+ close float
DEFI WIND printoutput from 1,1 TO 40,110 TITLE "GENSANTOS FOUNDATION, INC, General Santos City"
FLOAT MINI
SID=0
mButton = 3
mButtons = 2
@25,10 get mButton function '*H BACK; BROWSE; PREVIEW & PRINT' size 1.5,20 font'arial'
read
IF mButton= 1
CLEAR
CLEAR ALL
DO QWEG
else
IF mButton= 2
BROW noedit
close database
else
IF mButton= 3
IF .NOT. FOUND()
LOOP
ELSE
IF FOUND()
CLEAR
@1,27 SAY "GENSANTOS FOUNDATION, INC." font "Arial Black",20 style"Bold" color r/b
READ
IF mButtons= 1
SYS(1037)
SET PRINTER ON
@1,27 SAY "GENSANTOS FOUNDATION, INC." font "Arial Black",20 style"Bold" color r/b
SET PRINTER TO
MESSAGEBOX ("Done")
LOOP
ELSE
IF mButtons = 2
CLEAR
LOOP
ELSE
ENDIF
ENDIF
ENDIF
ENDIF
ENDIF
ENDIF
ENDIF
ENDDO
DO QWEF
QUIT (GUEST)
CLEAR
defi wind echo from 1,1 to 10,40 title "Exit"mini shad style"B"
A1=SPACE(1)
READ
Do Case
Case A1="YES"
CLEAR ALL
QUIT
Case A1="NO"
CLEAR ALL
DO QWEG
Endcase
DO QWEH