home *** CD-ROM | disk | FTP | other *** search
- /*
- Function: CHECKAPPTS()
- System: GRUMPFISH LIBRARY
- Author: Greg Lief
- Copyright (c) 1988-90, Greg Lief
- Clipper 5.x Version
- Compile instructions: clipper chk_appt /n/w/a
- Calls: POPDATE.PRG
- Uses: APPT.DBF
- Indexes: APPT.NTX
- */
-
- //───── begin preprocessor directives
-
- #include "inkey.ch"
- #include "grump.ch"
-
- //───── end preprocessor directives
-
-
- function checkappts(cdir)
- local wk_area := select(), oldscrn, ddate := date(), cfile, key
- cfile := IF(cdir = NIL, '', cdir + if(right(cdir, 1)!='\','\','')) + 'appt'
- if file(cfile + '.dbf') .and. file(cfile + '.dbt') .and. file(cfile + 'date.ntx')
- use (cfile) index (cfile + 'date') new
- seek dtos(ddate)
- if found()
- GFSaveEnv()
- ColorSet(C_MESSAGE)
- oldscrn := shadowbox(10, 24, 14, 55, 2)
- tone(MUSIC_WAITON[1], 1)
- tone(MUSIC_WAITON[2],1)
- @ 12, 26 say 'Press F2 to check calendar,'
- @ 13, 26 say 'or any other key to proceed'
- ColorSet(C_MESSAGEBLINK)
- @ 11, 26 say 'You have appointments today!'
- key := ginkey(0)
- byebyebox(oldscrn)
- if key = K_F2
- use
- popdate()
- endif
- GFRestEnv()
- else
- use
- endif
- endif
- select(wk_area)
- return NIL
-
- * eof chk_appt.prg
-