@@ -8,7 +8,7 @@ discard block |
||
8 | 8 | { |
9 | 9 | list($usec, $sec) = explode(' ', microtime()); |
10 | 10 | |
11 | - return (float)$usec + (float)$sec; |
|
11 | + return (float) $usec + (float) $sec; |
|
12 | 12 | } |
13 | 13 | |
14 | 14 | $start = getmicrotime(); |
@@ -16,8 +16,8 @@ discard block |
||
16 | 16 | if (!@include 'Calendar/Calendar.php') { |
17 | 17 | define('CALENDAR_ROOT', '../../'); |
18 | 18 | } |
19 | -require_once CALENDAR_ROOT . 'Month/Weekdays.php'; |
|
20 | -require_once CALENDAR_ROOT . 'Day.php'; |
|
19 | +require_once CALENDAR_ROOT.'Month/Weekdays.php'; |
|
20 | +require_once CALENDAR_ROOT.'Day.php'; |
|
21 | 21 | |
22 | 22 | if (!isset($_GET['y'])) { |
23 | 23 | $_GET['y'] = date('Y'); |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | <anchor> |
49 | 49 | Back to Month View |
50 | 50 | <go href="<?php |
51 | - echo '?y=' . $Day->thisYear() . '&m=' . $Day->thisMonth() . '&d=' . $Day->thisDay() . '&mime=wml'; ?>"> |
|
51 | + echo '?y='.$Day->thisYear().'&m='.$Day->thisMonth().'&d='.$Day->thisDay().'&mime=wml'; ?>"> |
|
52 | 52 | </anchor> |
53 | 53 | </p> |
54 | 54 | <table> |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | $Day->build(); |
57 | 57 | while ($Hour = $Day->fetch()) { |
58 | 58 | echo "<tr>\n"; |
59 | - echo '<td>' . date('g a', $Hour->getTimestamp()) . "</td><td>Free time!</td>\n"; |
|
59 | + echo '<td>'.date('g a', $Hour->getTimestamp())."</td><td>Free time!</td>\n"; |
|
60 | 60 | echo "</tr>\n"; |
61 | 61 | } ?> |
62 | 62 | </table> |
@@ -83,9 +83,9 @@ discard block |
||
83 | 83 | if ($Day->isEmpty()) { |
84 | 84 | echo "<td></td>\n"; |
85 | 85 | } elseif ($Day->isSelected()) { |
86 | - echo '<td><anchor><strong><u>' . $Day->thisDay() . "</u></strong>\n<go href=\"" . $_SERVER['PHP_SELF'] . '?viewday=true&y=' . $Day->thisYear() . '&m=' . $Day->thisMonth() . '&d=' . $Day->thisDay() . "&mime=wml\">\n</anchor></td>\n"; |
|
86 | + echo '<td><anchor><strong><u>'.$Day->thisDay()."</u></strong>\n<go href=\"".$_SERVER['PHP_SELF'].'?viewday=true&y='.$Day->thisYear().'&m='.$Day->thisMonth().'&d='.$Day->thisDay()."&mime=wml\">\n</anchor></td>\n"; |
|
87 | 87 | } else { |
88 | - echo '<td><anchor>' . $Day->thisDay() . "\n<go href=\"?viewday=true&y=" . $Day->thisYear() . '&m=' . $Day->thisMonth() . '&d=' . $Day->thisDay() . "&mime=wml\"></anchor></td>\n"; |
|
88 | + echo '<td><anchor>'.$Day->thisDay()."\n<go href=\"?viewday=true&y=".$Day->thisYear().'&m='.$Day->thisMonth().'&d='.$Day->thisDay()."&mime=wml\"></anchor></td>\n"; |
|
89 | 89 | } |
90 | 90 | if ($Day->isLast()) { |
91 | 91 | echo "</tr>\n"; |
@@ -96,7 +96,7 @@ discard block |
||
96 | 96 | <anchor> |
97 | 97 | << |
98 | 98 | <go href="<?php |
99 | - echo '?y=' . $Month->thisYear() . '&m=' . $Month->prevMonth() . '&d=' . $Month->thisDay() . '&mime=wml'; ?>"> |
|
99 | + echo '?y='.$Month->thisYear().'&m='.$Month->prevMonth().'&d='.$Month->thisDay().'&mime=wml'; ?>"> |
|
100 | 100 | </anchor> |
101 | 101 | </td> |
102 | 102 | <td></td> |
@@ -108,7 +108,7 @@ discard block |
||
108 | 108 | <anchor> |
109 | 109 | >> |
110 | 110 | <go href="<?php |
111 | - echo '?y=' . $Month->thisYear() . '&m=' . $Month->nextMonth() . '&d=' . $Month->thisDay() . '&mime=wml'; ?>"> |
|
111 | + echo '?y='.$Month->thisYear().'&m='.$Month->nextMonth().'&d='.$Month->thisDay().'&mime=wml'; ?>"> |
|
112 | 112 | </anchor> |
113 | 113 | </td> |
114 | 114 | </tr> |
@@ -117,7 +117,7 @@ discard block |
||
117 | 117 | <?php |
118 | 118 | } ?> |
119 | 119 | <p><a href="<?php echo $_SERVER['PHP_SELF']; ?>">Back to HTML</a></p> |
120 | - <?php echo '<p>Took: ' . (getmicrotime() - $start) . ' seconds</p>'; ?> |
|
120 | + <?php echo '<p>Took: '.(getmicrotime() - $start).' seconds</p>'; ?> |
|
121 | 121 | </wml> |
122 | 122 | <?php |
123 | 123 | #-----------------------------------------------------------------------------# |
@@ -141,14 +141,14 @@ discard block |
||
141 | 141 | <p> |
142 | 142 | <anchor> |
143 | 143 | <a href="<?php |
144 | - echo '?y=' . $Day->thisYear() . '&m=' . $Day->thisMonth() . '&d=' . $Day->thisDay(); ?>">Back to Month View</a> |
|
144 | + echo '?y='.$Day->thisYear().'&m='.$Day->thisMonth().'&d='.$Day->thisDay(); ?>">Back to Month View</a> |
|
145 | 145 | </p> |
146 | 146 | <table> |
147 | 147 | <?php |
148 | 148 | $Day->build(); |
149 | 149 | while ($Hour = $Day->fetch()) { |
150 | 150 | echo "<tr>\n"; |
151 | - echo '<td>' . date('g a', $Hour->getTimestamp()) . "</td><td>Free time!</td>\n"; |
|
151 | + echo '<td>'.date('g a', $Hour->getTimestamp())."</td><td>Free time!</td>\n"; |
|
152 | 152 | echo "</tr>\n"; |
153 | 153 | } ?> |
154 | 154 | </table> |
@@ -175,9 +175,9 @@ discard block |
||
175 | 175 | if ($Day->isEmpty()) { |
176 | 176 | echo "<td></td>\n"; |
177 | 177 | } elseif ($Day->isSelected()) { |
178 | - echo '<td><a href="' . $_SERVER['PHP_SELF'] . '?viewday=true&y=' . $Day->thisYear() . '&m=' . $Day->thisMonth() . '&d=' . $Day->thisDay() . '&wml"><strong><u>' . $Day->thisDay() . "</u></strong></a></td>\n"; |
|
178 | + echo '<td><a href="'.$_SERVER['PHP_SELF'].'?viewday=true&y='.$Day->thisYear().'&m='.$Day->thisMonth().'&d='.$Day->thisDay().'&wml"><strong><u>'.$Day->thisDay()."</u></strong></a></td>\n"; |
|
179 | 179 | } else { |
180 | - echo '<td><a href="' . $_SERVER['PHP_SELF'] . '?viewday=true&y=' . $Day->thisYear() . '&m=' . $Day->thisMonth() . '&d=' . $Day->thisDay() . '">' . $Day->thisDay() . "</a></td>\n"; |
|
180 | + echo '<td><a href="'.$_SERVER['PHP_SELF'].'?viewday=true&y='.$Day->thisYear().'&m='.$Day->thisMonth().'&d='.$Day->thisDay().'">'.$Day->thisDay()."</a></td>\n"; |
|
181 | 181 | } |
182 | 182 | if ($Day->isLast()) { |
183 | 183 | echo "</tr>\n"; |
@@ -186,7 +186,7 @@ discard block |
||
186 | 186 | <tr> |
187 | 187 | <td> |
188 | 188 | <a href="<?php |
189 | - echo '?y=' . $Month->thisYear() . '&m=' . $Month->prevMonth() . '&d=' . $Month->thisDay(); ?>"> |
|
189 | + echo '?y='.$Month->thisYear().'&m='.$Month->prevMonth().'&d='.$Month->thisDay(); ?>"> |
|
190 | 190 | <<</a> |
191 | 191 | </td> |
192 | 192 | <td></td> |
@@ -196,7 +196,7 @@ discard block |
||
196 | 196 | <td></td> |
197 | 197 | <td> |
198 | 198 | <a href="<?php |
199 | - echo '?y=' . $Month->thisYear() . '&m=' . $Month->nextMonth() . '&d=' . $Month->thisDay(); ?>">>></a> |
|
199 | + echo '?y='.$Month->thisYear().'&m='.$Month->nextMonth().'&d='.$Month->thisDay(); ?>">>></a> |
|
200 | 200 | </td> |
201 | 201 | </tr> |
202 | 202 | </table> |
@@ -204,7 +204,7 @@ discard block |
||
204 | 204 | <?php |
205 | 205 | } ?> |
206 | 206 | |
207 | - <?php echo '<p><b>Took: ' . (getmicrotime() - $start) . ' seconds</b></p>'; ?> |
|
207 | + <?php echo '<p><b>Took: '.(getmicrotime() - $start).' seconds</b></p>'; ?> |
|
208 | 208 | </body> |
209 | 209 | </html> |
210 | 210 | <?php |
@@ -6,7 +6,7 @@ discard block |
||
6 | 6 | { |
7 | 7 | list($usec, $sec) = explode(' ', microtime()); |
8 | 8 | |
9 | - return (float)$usec + (float)$sec; |
|
9 | + return (float) $usec + (float) $sec; |
|
10 | 10 | } |
11 | 11 | |
12 | 12 | $start = getmicrotime(); |
@@ -14,7 +14,7 @@ discard block |
||
14 | 14 | if (!@include 'Calendar/Calendar.php') { |
15 | 15 | define('CALENDAR_ROOT', '../../'); |
16 | 16 | } |
17 | -require_once CALENDAR_ROOT . 'Second.php'; |
|
17 | +require_once CALENDAR_ROOT.'Second.php'; |
|
18 | 18 | |
19 | 19 | if (!isset($_GET['y'])) { |
20 | 20 | $_GET['y'] = date('Y'); |
@@ -37,14 +37,14 @@ discard block |
||
37 | 37 | |
38 | 38 | $Unit = new Calendar_Second($_GET['y'], $_GET['m'], $_GET['d'], $_GET['h'], $_GET['i'], $_GET['s']); |
39 | 39 | |
40 | -echo '<p><b>Result:</b> ' . $Unit->thisYear() . '-' . $Unit->thisMonth() . '-' . $Unit->thisDay() . ' ' . $Unit->thisHour() . ':' . $Unit->thisMinute() . ':' . $Unit->thisSecond(); |
|
40 | +echo '<p><b>Result:</b> '.$Unit->thisYear().'-'.$Unit->thisMonth().'-'.$Unit->thisDay().' '.$Unit->thisHour().':'.$Unit->thisMinute().':'.$Unit->thisSecond(); |
|
41 | 41 | if ($Unit->isValid()) { |
42 | 42 | echo ' is valid!</p>'; |
43 | 43 | } else { |
44 | - $V =& $Unit->getValidator(); |
|
44 | + $V = & $Unit->getValidator(); |
|
45 | 45 | echo ' is invalid:</p>'; |
46 | 46 | while ($error = $V->fetch()) { |
47 | - echo $error->toString() . '<br>'; |
|
47 | + echo $error->toString().'<br>'; |
|
48 | 48 | } |
49 | 49 | } |
50 | 50 | ?> |
@@ -61,4 +61,4 @@ discard block |
||
61 | 61 | <p><b>Note:</b> Error messages can be controlled with the constants <code>CALENDAR_VALUE_TOOSMALL</code> and <code>CALENDAR_VALUE_TOOLARGE</code> |
62 | 62 | - see <code>Calendar_Validator.php</code></p> |
63 | 63 | |
64 | -<?php echo '<p><b>Took: ' . (getmicrotime() - $start) . ' seconds</b></p>'; |
|
64 | +<?php echo '<p><b>Took: '.(getmicrotime() - $start).' seconds</b></p>'; |
@@ -7,7 +7,7 @@ discard block |
||
7 | 7 | { |
8 | 8 | list($usec, $sec) = explode(' ', microtime()); |
9 | 9 | |
10 | - return (float)$usec + (float)$sec; |
|
10 | + return (float) $usec + (float) $sec; |
|
11 | 11 | } |
12 | 12 | |
13 | 13 | $start = getmicrotime(); |
@@ -15,12 +15,12 @@ discard block |
||
15 | 15 | if (!@include 'Calendar/Calendar.php') { |
16 | 16 | define('CALENDAR_ROOT', '../../'); |
17 | 17 | } |
18 | -require_once CALENDAR_ROOT . 'Year.php'; |
|
19 | -require_once CALENDAR_ROOT . 'Month.php'; |
|
20 | -require_once CALENDAR_ROOT . 'Day.php'; |
|
21 | -require_once CALENDAR_ROOT . 'Hour.php'; |
|
22 | -require_once CALENDAR_ROOT . 'Minute.php'; |
|
23 | -require_once CALENDAR_ROOT . 'Second.php'; |
|
18 | +require_once CALENDAR_ROOT.'Year.php'; |
|
19 | +require_once CALENDAR_ROOT.'Month.php'; |
|
20 | +require_once CALENDAR_ROOT.'Day.php'; |
|
21 | +require_once CALENDAR_ROOT.'Hour.php'; |
|
22 | +require_once CALENDAR_ROOT.'Minute.php'; |
|
23 | +require_once CALENDAR_ROOT.'Second.php'; |
|
24 | 24 | |
25 | 25 | // Initialize if not set |
26 | 26 | if (!isset($_POST['y'])) { |
@@ -53,14 +53,14 @@ discard block |
||
53 | 53 | if (isset($_POST['update'])) { |
54 | 54 | $Second = new Calendar_Second($_POST['y'], $_POST['m'], $_POST['d'], $_POST['h'], $_POST['i'], $_POST['s']); |
55 | 55 | if (!$Second->isValid()) { |
56 | - $V =& $Second->getValidator(); |
|
56 | + $V = & $Second->getValidator(); |
|
57 | 57 | echo '<p>Validation failed:</p>'; |
58 | 58 | while ($error = $V->fetch()) { |
59 | - echo $error->toString() . '<br>'; |
|
59 | + echo $error->toString().'<br>'; |
|
60 | 60 | } |
61 | 61 | } else { |
62 | 62 | echo '<p>Validation success.</p>'; |
63 | - echo '<p>New timestamp is: ' . $Second->getTimestamp() . ' which could be used to update a database, for example'; |
|
63 | + echo '<p>New timestamp is: '.$Second->getTimestamp().' which could be used to update a database, for example'; |
|
64 | 64 | } |
65 | 65 | } else { |
66 | 66 | $Year = new Calendar_Year($_POST['y']); |
@@ -78,9 +78,9 @@ discard block |
||
78 | 78 | $Year->build($selection); |
79 | 79 | while ($Child = $Year->fetch()) { |
80 | 80 | if ($Child->isSelected()) { |
81 | - echo '<option value="' . $Child->thisMonth() . '" selected>' . $Child->thisMonth() . "\n"; |
|
81 | + echo '<option value="'.$Child->thisMonth().'" selected>'.$Child->thisMonth()."\n"; |
|
82 | 82 | } else { |
83 | - echo '<option value="' . $Child->thisMonth() . '">' . $Child->thisMonth() . "\n"; |
|
83 | + echo '<option value="'.$Child->thisMonth().'">'.$Child->thisMonth()."\n"; |
|
84 | 84 | } |
85 | 85 | } ?> |
86 | 86 | </select> |
@@ -90,9 +90,9 @@ discard block |
||
90 | 90 | $Month->build($selection); |
91 | 91 | while ($Child = $Month->fetch()) { |
92 | 92 | if ($Child->isSelected()) { |
93 | - echo '<option value="' . $Child->thisDay() . '" selected>' . $Child->thisDay() . "\n"; |
|
93 | + echo '<option value="'.$Child->thisDay().'" selected>'.$Child->thisDay()."\n"; |
|
94 | 94 | } else { |
95 | - echo '<option value="' . $Child->thisDay() . '">' . $Child->thisDay() . "\n"; |
|
95 | + echo '<option value="'.$Child->thisDay().'">'.$Child->thisDay()."\n"; |
|
96 | 96 | } |
97 | 97 | } ?> |
98 | 98 | </select> |
@@ -102,9 +102,9 @@ discard block |
||
102 | 102 | $Day->build($selection); |
103 | 103 | while ($Child = $Day->fetch()) { |
104 | 104 | if ($Child->isSelected()) { |
105 | - echo '<option value="' . $Child->thisHour() . '" selected>' . $Child->thisHour() . "\n"; |
|
105 | + echo '<option value="'.$Child->thisHour().'" selected>'.$Child->thisHour()."\n"; |
|
106 | 106 | } else { |
107 | - echo '<option value="' . $Child->thisHour() . '">' . $Child->thisHour() . "\n"; |
|
107 | + echo '<option value="'.$Child->thisHour().'">'.$Child->thisHour()."\n"; |
|
108 | 108 | } |
109 | 109 | } ?> |
110 | 110 | </select> |
@@ -114,9 +114,9 @@ discard block |
||
114 | 114 | $Hour->build($selection); |
115 | 115 | while ($Child = $Hour->fetch()) { |
116 | 116 | if ($Child->isSelected()) { |
117 | - echo '<option value="' . $Child->thisMinute() . '" selected>' . $Child->thisMinute() . "\n"; |
|
117 | + echo '<option value="'.$Child->thisMinute().'" selected>'.$Child->thisMinute()."\n"; |
|
118 | 118 | } else { |
119 | - echo '<option value="' . $Child->thisMinute() . '">' . $Child->thisMinute() . "\n"; |
|
119 | + echo '<option value="'.$Child->thisMinute().'">'.$Child->thisMinute()."\n"; |
|
120 | 120 | } |
121 | 121 | } ?> |
122 | 122 | </select> |
@@ -126,9 +126,9 @@ discard block |
||
126 | 126 | $Minute->build($selection); |
127 | 127 | while ($Child = $Minute->fetch()) { |
128 | 128 | if ($Child->isSelected()) { |
129 | - echo '<option value="' . $Child->thisSecond() . '" selected>' . $Child->thisSecond() . "\n"; |
|
129 | + echo '<option value="'.$Child->thisSecond().'" selected>'.$Child->thisSecond()."\n"; |
|
130 | 130 | } else { |
131 | - echo '<option value="' . $Child->thisSecond() . '">' . $Child->thisSecond() . "\n"; |
|
131 | + echo '<option value="'.$Child->thisSecond().'">'.$Child->thisSecond()."\n"; |
|
132 | 132 | } |
133 | 133 | } ?> |
134 | 134 | </select> |
@@ -136,6 +136,6 @@ discard block |
||
136 | 136 | <?php |
137 | 137 | } |
138 | 138 | ?> |
139 | - <?php echo '<p><b>Took: ' . (getmicrotime() - $start) . ' seconds</b></p>'; ?> |
|
139 | + <?php echo '<p><b>Took: '.(getmicrotime() - $start).' seconds</b></p>'; ?> |
|
140 | 140 | </body> |
141 | 141 | </html> |
@@ -9,8 +9,8 @@ discard block |
||
9 | 9 | if (!@include 'Calendar/Calendar.php') { |
10 | 10 | define('CALENDAR_ROOT', '../../'); |
11 | 11 | } |
12 | -require_once CALENDAR_ROOT . 'Month/Weekdays.php'; |
|
13 | -require_once CALENDAR_ROOT . 'Decorator.php'; |
|
12 | +require_once CALENDAR_ROOT.'Month/Weekdays.php'; |
|
13 | +require_once CALENDAR_ROOT.'Decorator.php'; |
|
14 | 14 | |
15 | 15 | // Decorate a Month with methods to improve formatting |
16 | 16 | |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | $prevStamp = parent::prevMonth(true); |
38 | 38 | |
39 | 39 | // Build the URL for the previous month |
40 | - return $_SERVER['PHP_SELF'] . '?y=' . date('Y', $prevStamp) . '&m=' . date('n', $prevStamp) . '&d=' . date('j', $prevStamp); |
|
40 | + return $_SERVER['PHP_SELF'].'?y='.date('Y', $prevStamp).'&m='.date('n', $prevStamp).'&d='.date('j', $prevStamp); |
|
41 | 41 | } |
42 | 42 | |
43 | 43 | /** |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | $nextStamp = parent::nextMonth(true); |
60 | 60 | |
61 | 61 | // Build the URL for next month |
62 | - return $_SERVER['PHP_SELF'] . '?y=' . date('Y', $nextStamp) . '&m=' . date('n', $nextStamp) . '&d=' . date('j', $nextStamp); |
|
62 | + return $_SERVER['PHP_SELF'].'?y='.date('Y', $nextStamp).'&m='.date('n', $nextStamp).'&d='.date('j', $nextStamp); |
|
63 | 63 | } |
64 | 64 | } |
65 | 65 | |
@@ -95,7 +95,7 @@ discard block |
||
95 | 95 | if ($Day->isEmpty()) { |
96 | 96 | echo '<td> </td>'; |
97 | 97 | } else { |
98 | - echo '<td>' . $Day->thisDay() . '</td>'; |
|
98 | + echo '<td>'.$Day->thisDay().'</td>'; |
|
99 | 99 | } |
100 | 100 | if ($Day->isLast()) { |
101 | 101 | echo "\n</tr>\n"; |
@@ -5,9 +5,9 @@ discard block |
||
5 | 5 | if (!@include 'Calendar/Calendar.php') { |
6 | 6 | define('CALENDAR_ROOT', '../../'); |
7 | 7 | } |
8 | -require_once CALENDAR_ROOT . 'Month.php'; |
|
9 | -require_once CALENDAR_ROOT . 'Decorator.php'; // Not really needed but added to help this make sense |
|
10 | -require_once CALENDAR_ROOT . 'Decorator/Wrapper.php'; |
|
8 | +require_once CALENDAR_ROOT.'Month.php'; |
|
9 | +require_once CALENDAR_ROOT.'Decorator.php'; // Not really needed but added to help this make sense |
|
10 | +require_once CALENDAR_ROOT.'Decorator/Wrapper.php'; |
|
11 | 11 | |
12 | 12 | /** |
13 | 13 | * Class MyBoldDecorator. |
@@ -27,7 +27,7 @@ discard block |
||
27 | 27 | */ |
28 | 28 | public function thisDay() |
29 | 29 | { |
30 | - return '<b>' . parent::thisDay() . '</b>'; |
|
30 | + return '<b>'.parent::thisDay().'</b>'; |
|
31 | 31 | } |
32 | 32 | } |
33 | 33 | |
@@ -39,5 +39,5 @@ discard block |
||
39 | 39 | echo '<h2>The Wrapper decorator</h2>'; |
40 | 40 | echo '<i>Day numbers are rendered in bold</i><br> <br>'; |
41 | 41 | while ($DecoratedDay = $Wrapper->fetch('MyBoldDecorator')) { |
42 | - echo $DecoratedDay->thisDay() . '<br>'; |
|
42 | + echo $DecoratedDay->thisDay().'<br>'; |
|
43 | 43 | } |
@@ -11,9 +11,9 @@ discard block |
||
11 | 11 | define('CALENDAR_ROOT', '../../'); |
12 | 12 | } |
13 | 13 | |
14 | -require_once CALENDAR_ROOT . 'Month/Weekdays.php'; |
|
15 | -require_once CALENDAR_ROOT . 'Day.php'; |
|
16 | -require_once CALENDAR_ROOT . 'Decorator.php'; |
|
14 | +require_once CALENDAR_ROOT.'Month/Weekdays.php'; |
|
15 | +require_once CALENDAR_ROOT.'Day.php'; |
|
16 | +require_once CALENDAR_ROOT.'Decorator.php'; |
|
17 | 17 | |
18 | 18 | // accepts multiple entries |
19 | 19 | |
@@ -76,8 +76,8 @@ discard block |
||
76 | 76 | */ |
77 | 77 | public function build($events = array()) |
78 | 78 | { |
79 | - require_once CALENDAR_ROOT . 'Day.php'; |
|
80 | - require_once CALENDAR_ROOT . 'Table/Helper.php'; |
|
79 | + require_once CALENDAR_ROOT.'Day.php'; |
|
80 | + require_once CALENDAR_ROOT.'Table/Helper.php'; |
|
81 | 81 | |
82 | 82 | $this->tableHelper = new Calendar_Table_Helper($this, $this->firstDay); |
83 | 83 | $this->cE = $this->getEngine(); |
@@ -230,7 +230,7 @@ discard block |
||
230 | 230 | <h2>Sample Calendar Payload Decorator (using <?php echo CALENDAR_ENGINE; ?> engine)</h2> |
231 | 231 | <table class="calendar" width="98%" cellspacing="0" cellpadding="0"> |
232 | 232 | <caption> |
233 | - <?php echo $MonthDecorator->thisMonth() . ' / ' . $MonthDecorator->thisYear(); ?> |
|
233 | + <?php echo $MonthDecorator->thisMonth().' / '.$MonthDecorator->thisYear(); ?> |
|
234 | 234 | </caption> |
235 | 235 | <tr> |
236 | 236 | <th>Monday</th> |
@@ -254,14 +254,14 @@ discard block |
||
254 | 254 | echo ' calCellEmpty'; |
255 | 255 | } |
256 | 256 | echo '">'; |
257 | - echo '<div class="dayNumber">' . $Day->thisDay() . '</div>'; |
|
257 | + echo '<div class="dayNumber">'.$Day->thisDay().'</div>'; |
|
258 | 258 | |
259 | 259 | if ($Day->isEmpty()) { |
260 | 260 | echo ' '; |
261 | 261 | } else { |
262 | 262 | echo '<div class="dayContents"><ul>'; |
263 | 263 | while ($entry = $Day->getEntry()) { |
264 | - echo '<li>' . $entry['desc'] . '</li>'; |
|
264 | + echo '<li>'.$entry['desc'].'</li>'; |
|
265 | 265 | //you can print the time range as well |
266 | 266 | } |
267 | 267 | echo '</ul></div>'; |
@@ -5,8 +5,8 @@ discard block |
||
5 | 5 | if (!@include 'Calendar/Calendar.php') { |
6 | 6 | define('CALENDAR_ROOT', '../../'); |
7 | 7 | } |
8 | -require_once CALENDAR_ROOT . 'Month/Weekdays.php'; |
|
9 | -require_once CALENDAR_ROOT . 'Util/Uri.php'; |
|
8 | +require_once CALENDAR_ROOT.'Month/Weekdays.php'; |
|
9 | +require_once CALENDAR_ROOT.'Util/Uri.php'; |
|
10 | 10 | |
11 | 11 | if (!isset($_GET['jahr'])) { |
12 | 12 | $_GET['jahr'] = date('Y'); |
@@ -18,15 +18,15 @@ discard block |
||
18 | 18 | // Build the month |
19 | 19 | $Calendar = new Calendar_Month_Weekdays($_GET['jahr'], $_GET['monat']); |
20 | 20 | |
21 | -echo '<p>The current month is ' . $Calendar->thisMonth() . ' of year ' . $Calendar->thisYear() . '</p>'; |
|
21 | +echo '<p>The current month is '.$Calendar->thisMonth().' of year '.$Calendar->thisYear().'</p>'; |
|
22 | 22 | |
23 | 23 | $Uri = new Calendar_Util_Uri('jahr', 'monat'); |
24 | 24 | $Uri->setFragments('jahr', 'monat'); |
25 | 25 | |
26 | 26 | echo '"Vector" URIs<pre>'; |
27 | -echo "Previous Uri:\t" . htmlentities($Uri->prev($Calendar, 'month')) . "\n"; |
|
28 | -echo "This Uri:\t" . htmlentities($Uri->this($Calendar, 'month')) . "\n"; |
|
29 | -echo "Next Uri:\t" . htmlentities($Uri->next($Calendar, 'month')) . "\n"; |
|
27 | +echo "Previous Uri:\t".htmlentities($Uri->prev($Calendar, 'month'))."\n"; |
|
28 | +echo "This Uri:\t".htmlentities($Uri->this($Calendar, 'month'))."\n"; |
|
29 | +echo "Next Uri:\t".htmlentities($Uri->next($Calendar, 'month'))."\n"; |
|
30 | 30 | echo '</pre>'; |
31 | 31 | |
32 | 32 | // Switch to scalar URIs |
@@ -34,9 +34,9 @@ discard block |
||
34 | 34 | $Uri->scalar = true; // Omit variable names |
35 | 35 | |
36 | 36 | echo '"Scalar" URIs<pre>'; |
37 | -echo "Previous Uri:\t" . $Uri->prev($Calendar, 'month') . "\n"; |
|
38 | -echo "This Uri:\t" . $Uri->this($Calendar, 'month') . "\n"; |
|
39 | -echo "Next Uri:\t" . $Uri->next($Calendar, 'month') . "\n"; |
|
37 | +echo "Previous Uri:\t".$Uri->prev($Calendar, 'month')."\n"; |
|
38 | +echo "This Uri:\t".$Uri->this($Calendar, 'month')."\n"; |
|
39 | +echo "Next Uri:\t".$Uri->next($Calendar, 'month')."\n"; |
|
40 | 40 | echo '</pre>'; |
41 | 41 | |
42 | 42 | // Restore the vector URIs |
@@ -44,6 +44,6 @@ discard block |
||
44 | 44 | $Uri->scalar = false; |
45 | 45 | ?> |
46 | 46 | <p> |
47 | - <a href="<?php echo $_SERVER['PHP_SELF'] . '?' . $Uri->prev($Calendar, 'month'); ?>">Prev</a> : |
|
48 | - <a href="<?php echo $_SERVER['PHP_SELF'] . '?' . $Uri->next($Calendar, 'month'); ?>">Next</a> |
|
47 | + <a href="<?php echo $_SERVER['PHP_SELF'].'?'.$Uri->prev($Calendar, 'month'); ?>">Prev</a> : |
|
48 | + <a href="<?php echo $_SERVER['PHP_SELF'].'?'.$Uri->next($Calendar, 'month'); ?>">Next</a> |
|
49 | 49 | </p> |
@@ -49,7 +49,7 @@ |
||
49 | 49 | /** |
50 | 50 | * Load Calendar base class. |
51 | 51 | */ |
52 | -require_once CALENDAR_ROOT . 'Calendar.php'; |
|
52 | +require_once CALENDAR_ROOT.'Calendar.php'; |
|
53 | 53 | |
54 | 54 | /** |
55 | 55 | * Represents a Second<br> |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | /** |
50 | 50 | * Load Calendar base class. |
51 | 51 | */ |
52 | -require_once CALENDAR_ROOT . 'Calendar.php'; |
|
52 | +require_once CALENDAR_ROOT.'Calendar.php'; |
|
53 | 53 | |
54 | 54 | /** |
55 | 55 | * Represents a Minute and builds Seconds |
@@ -95,7 +95,7 @@ discard block |
||
95 | 95 | */ |
96 | 96 | public function build($sDates = array()) |
97 | 97 | { |
98 | - require_once CALENDAR_ROOT . 'Second.php'; |
|
98 | + require_once CALENDAR_ROOT.'Second.php'; |
|
99 | 99 | $sIM = $this->cE->getSecondsInMinute($this->year, $this->month, $this->day, $this->hour, $this->minute); |
100 | 100 | for ($i = 0; $i < $sIM; ++$i) { |
101 | 101 | $this->children[$i] = new Calendar_Second($this->year, $this->month, $this->day, $this->hour, $this->minute, $i); |
@@ -121,7 +121,7 @@ discard block |
||
121 | 121 | && $this->day == $sDate->thisDay() |
122 | 122 | && $this->hour == $sDate->thisHour() |
123 | 123 | && $this->minute == $sDate->thisMinute()) { |
124 | - $key = (int)$sDate->thisSecond(); |
|
124 | + $key = (int) $sDate->thisSecond(); |
|
125 | 125 | if (isset($this->children[$key])) { |
126 | 126 | $sDate->setSelected(); |
127 | 127 | $this->children[$key] = $sDate; |