-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathworkday.class.php
More file actions
executable file
·86 lines (62 loc) · 1.72 KB
/
workday.class.php
File metadata and controls
executable file
·86 lines (62 loc) · 1.72 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
<?php
include_once 'helper.class.php';
class CWorkday {
private $help;
private $userId;
private $date;
private $day;
private $month;
private $year;
private $times;
private $work;
private $holliday;
private $hollidayOptions;
private $dbx;
//! Constructor with parameters
/*!
*
* Constructor that takes some parameters (see below)
*
* \param userid The user id the record belongs to
* \param pday The day of the data record
* \param pmonth The month of the data record
* \param pyear The year of the data record
*/
public function __construct ($userid, $pday , $pmonth, $pyear) {
$this->userId = $userId;
$this->day = $pday;
$this->month = $pmonth;
$this->year = $pyear;
$this->help = new Helper();
$this->times = $this->help->getTimes($userid, $pday, $pmonth, $pyear);
$this->work = $this->help->getWork($userid, $pday, $pmonth, $pyear);
$this->holliday = $this->help->getHollidayState($userid, $pday, $pmonth, $pyear);
}
//! Constructor without parameters
/*!
* Constructor without parameters. Normally this is used for new records.
*/
public function __construct () {
$this->userId = -1;
$this->day = "01";
$this->month = "01";
$this->year = "1900";
$this->help = new Helper();
}
//! Gets all data for re-use in javascript
/*!
* Detail: this method collects all data needed for the website to display.
*
*/
public function getJsonString() {
}
//! Collects data from a JSON string and assigns the values to the class.
/*!
* Afterwards the data of the object may be saved back to the database.
*
* \param jsonstring JSON String that contains all data to be saved
*/
public function saveJsonString($jsonstring) {
}
}
?>