home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 5 / 05.iso / a / a067 / 1.img / GRUMP501.EXE / CHK_APPT.PRG < prev    next >
Encoding:
Text File  |  1991-04-23  |  1.3 KB  |  52 lines

  1. /*
  2.    Function: CHECKAPPTS()
  3.    System:   GRUMPFISH LIBRARY
  4.    Author:   Greg Lief
  5.    Copyright (c) 1988-90, Greg Lief
  6.    Clipper 5.x Version
  7.    Compile instructions: clipper chk_appt /n/w/a
  8.    Calls: POPDATE.PRG
  9.    Uses: APPT.DBF
  10.    Indexes: APPT.NTX
  11. */
  12.  
  13. //───── begin preprocessor directives
  14.  
  15. #include "inkey.ch"
  16. #include "grump.ch"
  17.  
  18. //───── end preprocessor directives
  19.  
  20.  
  21. function checkappts(cdir)
  22. local wk_area := select(), oldscrn, ddate := date(), cfile, key
  23. cfile := IF(cdir = NIL, '', cdir + if(right(cdir, 1)!='\','\','')) + 'appt'
  24. if file(cfile + '.dbf') .and. file(cfile + '.dbt') .and. file(cfile + 'date.ntx')
  25.    use (cfile) index (cfile + 'date') new
  26.    seek dtos(ddate)
  27.    if found()
  28.       GFSaveEnv()
  29.       ColorSet(C_MESSAGE)
  30.       oldscrn := shadowbox(10, 24, 14, 55, 2)
  31.       tone(MUSIC_WAITON[1], 1)
  32.       tone(MUSIC_WAITON[2],1)
  33.       @ 12, 26 say 'Press F2 to check calendar,'
  34.       @ 13, 26 say 'or any other key to proceed'
  35.       ColorSet(C_MESSAGEBLINK)
  36.       @ 11, 26 say 'You have appointments today!'
  37.       key := ginkey(0)
  38.       byebyebox(oldscrn)
  39.       if key = K_F2
  40.          use
  41.          popdate()
  42.       endif
  43.       GFRestEnv()
  44.    else
  45.       use
  46.    endif
  47. endif
  48. select(wk_area)
  49. return NIL
  50.  
  51. * eof chk_appt.prg
  52.