2 /***************************************************************************
4 A small program to collect timecard information
6 begin : Thu Feb 24 2000
7 copyright : (C) 2000 by Stephen Toothman
8 email : stephen.toothman@cicplan.com
9 ***************************************************************************/
11 /***************************************************************************
13 * This program is free software; you can redistribute it and/or modify *
14 * it under the terms of the GNU General Public License as published by *
15 * the Free Software Foundation; either version 2 of the License, or *
16 * (at your option) any later version. *
18 ***************************************************************************/
22 /* User defined variable types */
24 char userid[4]; /* the user id or employee number */
25 int hour; /* time portion - hours */
26 int minute; /* time portion - minutes */
28 int month; /* date portion - month */
31 int action; /* holds the action being taken */
35 int month; /* date portion - month */
41 int initializeprogram(char *puserid, int *pusertype, int *pweekends);
42 int getenvironment(int *pweekends);
43 int getuserid(char *puserid, int *pusertype);
44 int startprogram(char *puserid, int *pusertype, int *pweekends);
46 int timecard(char userid[4], int usertype, int weekends);
47 int gettimeanddate(timecardrecord *currentpunch, char *pweekstring, char *pyearstring, int weekends);
48 int getfilename(char *pfilename, char *pweekstring, char *pyearstring);
49 int gettimecarddata(timecardrecord *currentpunch, timecardrecord *clockpunch, int *pitemflag, char *pfilename);
50 int printtimecarddata(timecardrecord *currentpunch, timecardrecord *clockpunch);
51 int getaction(timecardrecord *currentpunch, timecardrecord *clockpunch, int *pitemflag);
52 int writerecord(timecardrecord *currentpunch, char *pfilename);
54 int manager(char userid[4], int usertype, int weekends);
56 int reporter(char userid[4], int usertype, int weekends);
57 int usefilename(char *pusefile);
58 int printhoursreport(char *pusefile, int weekends);
59 int reportfilename(char usefile[13], char *preportfile);
60 int writereportdata(char usefile[13], char reportfile[13], int weekends);
61 int getreportdates(char usefile[13], daterecord *pfiledates, int weekends);
62 int generatereport(char usefile[13], char reportfile[13], daterecord filedates[7]);
64 int administrator(char userid[4], int usertype, int weekends);
66 void clearscreen(void);