]>
Commit | Line | Data |
---|---|---|
80ee600a | 1 | |
2 | /*************************************************************************** | |
3 | timecard.h | |
4 | A small program to collect timecard information | |
5 | ------------------- | |
6 | begin : Thu Feb 24 2000 | |
7 | copyright : (C) 2000 by Stephen Toothman | |
8 | email : stephen.toothman@cicplan.com | |
9 | ***************************************************************************/ | |
10 | ||
11 | /*************************************************************************** | |
12 | * * | |
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. * | |
17 | * * | |
18 | ***************************************************************************/ | |
19 | ||
20 | /*DEFINE list*/ | |
21 | ||
22 | /* User defined variable types */ | |
23 | typedef struct { | |
24 | char userid[4]; /* the user id or employee number */ | |
25 | int hour; /* time portion - hours */ | |
26 | int minute; /* time portion - minutes */ | |
27 | int second; | |
28 | int month; /* date portion - month */ | |
29 | int day; | |
30 | int year; | |
31 | int action; /* holds the action being taken */ | |
32 | }timecardrecord; | |
33 | ||
34 | typedef struct { | |
35 | int month; /* date portion - month */ | |
36 | int day; | |
37 | int year; | |
38 | }daterecord; | |
39 | ||
40 | /* Function List*/ | |
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); | |
45 | ||
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); | |
53 | ||
54 | int manager(char userid[4], int usertype, int weekends); | |
55 | ||
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]); | |
63 | ||
64 | int administrator(char userid[4], int usertype, int weekends); | |
65 | ||
66 | void clearscreen(void); |