@@ -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 . 'Week.php'; |
|
17 | +require_once CALENDAR_ROOT.'Week.php'; |
|
18 | 18 | |
19 | 19 | if (!isset($_GET['y'])) { |
20 | 20 | $_GET['y'] = date('Y'); |
@@ -42,19 +42,19 @@ discard block |
||
42 | 42 | </head> |
43 | 43 | <body> |
44 | 44 | <h1>Paging Weeks</h1> |
45 | -<h2>Week: <?php echo $Week->thisWeek() . ' ' . date('F Y', $Week->thisMonth(true)); ?></h2> |
|
45 | +<h2>Week: <?php echo $Week->thisWeek().' '.date('F Y', $Week->thisMonth(true)); ?></h2> |
|
46 | 46 | <?php |
47 | 47 | $Week->build(); |
48 | 48 | while ($Day = $Week->fetch()) { |
49 | - echo '<p>' . date('jS F', $Day->thisDay(true)) . "</p>\n"; |
|
49 | + echo '<p>'.date('jS F', $Day->thisDay(true))."</p>\n"; |
|
50 | 50 | } |
51 | 51 | $days = $Week->fetchAll(); |
52 | 52 | |
53 | 53 | $prevWeek = $Week->prevWeek('array'); |
54 | -$prevWeekLink = $_SERVER['PHP_SELF'] . '?y=' . $prevWeek['year'] . '&m=' . $prevWeek['month'] . '&d=' . $prevWeek['day']; |
|
54 | +$prevWeekLink = $_SERVER['PHP_SELF'].'?y='.$prevWeek['year'].'&m='.$prevWeek['month'].'&d='.$prevWeek['day']; |
|
55 | 55 | |
56 | 56 | $nextWeek = $Week->nextWeek('array'); |
57 | -$nextWeekLink = $_SERVER['PHP_SELF'] . '?y=' . $nextWeek['year'] . '&m=' . $nextWeek['month'] . '&d=' . $nextWeek['day']; |
|
57 | +$nextWeekLink = $_SERVER['PHP_SELF'].'?y='.$nextWeek['year'].'&m='.$nextWeek['month'].'&d='.$nextWeek['day']; |
|
58 | 58 | ?> |
59 | 59 | <p><a href="<?php echo $prevWeekLink; ?>"><<</a> | <a href="<?php echo $nextWeekLink; ?>">>></a></p> |
60 | 60 | </body> |
@@ -9,7 +9,7 @@ discard block |
||
9 | 9 | { |
10 | 10 | list($usec, $sec) = explode(' ', microtime()); |
11 | 11 | |
12 | - return (float)$usec + (float)$sec; |
|
12 | + return (float) $usec + (float) $sec; |
|
13 | 13 | } |
14 | 14 | |
15 | 15 | // Switch to PEAR::Date engine |
@@ -42,27 +42,27 @@ discard block |
||
42 | 42 | default: |
43 | 43 | $_GET['view'] = 'calendar_year'; |
44 | 44 | case 'calendar_year': |
45 | - require_once CALENDAR_ROOT . 'Year.php'; |
|
45 | + require_once CALENDAR_ROOT.'Year.php'; |
|
46 | 46 | $c = new Calendar_Year($_GET['y']); |
47 | 47 | break; |
48 | 48 | case 'calendar_month': |
49 | - require_once CALENDAR_ROOT . 'Month.php'; |
|
49 | + require_once CALENDAR_ROOT.'Month.php'; |
|
50 | 50 | $c = new Calendar_Month($_GET['y'], $_GET['m']); |
51 | 51 | break; |
52 | 52 | case 'calendar_day': |
53 | - require_once CALENDAR_ROOT . 'Day.php'; |
|
53 | + require_once CALENDAR_ROOT.'Day.php'; |
|
54 | 54 | $c = new Calendar_Day($_GET['y'], $_GET['m'], $_GET['d']); |
55 | 55 | break; |
56 | 56 | case 'calendar_hour': |
57 | - require_once CALENDAR_ROOT . 'Hour.php'; |
|
57 | + require_once CALENDAR_ROOT.'Hour.php'; |
|
58 | 58 | $c = new Calendar_Hour($_GET['y'], $_GET['m'], $_GET['d'], $_GET['h']); |
59 | 59 | break; |
60 | 60 | case 'calendar_minute': |
61 | - require_once CALENDAR_ROOT . 'Minute.php'; |
|
61 | + require_once CALENDAR_ROOT.'Minute.php'; |
|
62 | 62 | $c = new Calendar_Minute($_GET['y'], $_GET['m'], $_GET['d'], $_GET['h'], $_GET['i']); |
63 | 63 | break; |
64 | 64 | case 'calendar_second': |
65 | - require_once CALENDAR_ROOT . 'Second.php'; |
|
65 | + require_once CALENDAR_ROOT.'Second.php'; |
|
66 | 66 | $c = new Calendar_Second($_GET['y'], $_GET['m'], $_GET['d'], $_GET['h'], $_GET['i'], $_GET['s']); |
67 | 67 | break; |
68 | 68 | } |
@@ -71,8 +71,8 @@ discard block |
||
71 | 71 | $date = new Date($c->getTimestamp()); |
72 | 72 | |
73 | 73 | echo '<h1>Using PEAR::Date engine</h1>'; |
74 | -echo 'Viewing: ' . @$_GET['view'] . '<br>'; |
|
75 | -echo 'The time is now: ' . $date->format('%Y %a %e %T') . '<br >'; |
|
74 | +echo 'Viewing: '.@$_GET['view'].'<br>'; |
|
75 | +echo 'The time is now: '.$date->format('%Y %a %e %T').'<br >'; |
|
76 | 76 | |
77 | 77 | $i = 1; |
78 | 78 | echo '<h1>First Iteration</h1>'; |
@@ -82,15 +82,15 @@ discard block |
||
82 | 82 | $c->build(); |
83 | 83 | while ($e = $c->fetch()) { |
84 | 84 | $class = strtolower(get_class($e)); |
85 | - $link = '&y=' . $e->thisYear() . '&m=' . $e->thisMonth() . '&d=' . $e->thisDay() . '&h=' . $e->thisHour() . '&i=' . $e->thisMinute() . '&s=' . $e->thisSecond(); |
|
86 | - $method = 'this' . str_replace('calendar_', '', $class); |
|
87 | - echo '<a href="' . $_SERVER['PHP_SELF'] . '?view=' . $class . $link . '">' . $e->{$method}() . '</a> : '; |
|
85 | + $link = '&y='.$e->thisYear().'&m='.$e->thisMonth().'&d='.$e->thisDay().'&h='.$e->thisHour().'&i='.$e->thisMinute().'&s='.$e->thisSecond(); |
|
86 | + $method = 'this'.str_replace('calendar_', '', $class); |
|
87 | + echo '<a href="'.$_SERVER['PHP_SELF'].'?view='.$class.$link.'">'.$e->{$method}().'</a> : '; |
|
88 | 88 | if (($i % 10) == 0) { |
89 | 89 | echo '<br>'; |
90 | 90 | } |
91 | 91 | ++$i; |
92 | 92 | } |
93 | -echo '<p><b>Took: ' . (getmicrotime() - $start) . ' seconds</b></p>'; |
|
93 | +echo '<p><b>Took: '.(getmicrotime() - $start).' seconds</b></p>'; |
|
94 | 94 | |
95 | 95 | $i = 1; |
96 | 96 | echo '<h1>Second Iteration</h1>'; |
@@ -99,12 +99,12 @@ discard block |
||
99 | 99 | $start = getmicrotime(); |
100 | 100 | while ($e = $c->fetch()) { |
101 | 101 | $class = strtolower(get_class($e)); |
102 | - $link = '&y=' . $e->thisYear() . '&m=' . $e->thisMonth() . '&d=' . $e->thisDay() . '&h=' . $e->thisHour() . '&i=' . $e->thisMinute() . '&s=' . $e->thisSecond(); |
|
103 | - $method = 'this' . str_replace('calendar_', '', $class); |
|
104 | - echo '<a href="' . $_SERVER['PHP_SELF'] . '?view=' . $class . $link . '">' . $e->{$method}() . '</a> : '; |
|
102 | + $link = '&y='.$e->thisYear().'&m='.$e->thisMonth().'&d='.$e->thisDay().'&h='.$e->thisHour().'&i='.$e->thisMinute().'&s='.$e->thisSecond(); |
|
103 | + $method = 'this'.str_replace('calendar_', '', $class); |
|
104 | + echo '<a href="'.$_SERVER['PHP_SELF'].'?view='.$class.$link.'">'.$e->{$method}().'</a> : '; |
|
105 | 105 | if (($i % 10) == 0) { |
106 | 106 | echo '<br>'; |
107 | 107 | } |
108 | 108 | ++$i; |
109 | 109 | } |
110 | -echo '<p><b>Took: ' . (getmicrotime() - $start) . ' seconds</b></p>'; |
|
110 | +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(); |
@@ -18,8 +18,8 @@ discard block |
||
18 | 18 | if (!@include 'Calendar/Calendar.php') { |
19 | 19 | define('CALENDAR_ROOT', '../../'); |
20 | 20 | } |
21 | -require_once CALENDAR_ROOT . 'Month/Weekdays.php'; |
|
22 | -require_once CALENDAR_ROOT . 'Day.php'; |
|
21 | +require_once CALENDAR_ROOT.'Month/Weekdays.php'; |
|
22 | +require_once CALENDAR_ROOT.'Day.php'; |
|
23 | 23 | |
24 | 24 | // Initialize GET variables if not set |
25 | 25 | if (!isset($_GET['y'])) { |
@@ -47,9 +47,9 @@ discard block |
||
47 | 47 | |
48 | 48 | // Construct strings for next/previous links |
49 | 49 | $PMonth = $month->prevMonth('object'); // Get previous month as object |
50 | -$prev = $_SERVER['PHP_SELF'] . '?y=' . $PMonth->thisYear() . '&m=' . $PMonth->thisMonth() . '&d=' . $PMonth->thisDay(); |
|
50 | +$prev = $_SERVER['PHP_SELF'].'?y='.$PMonth->thisYear().'&m='.$PMonth->thisMonth().'&d='.$PMonth->thisDay(); |
|
51 | 51 | $NMonth = $month->nextMonth('object'); |
52 | -$next = $_SERVER['PHP_SELF'] . '?y=' . $NMonth->thisYear() . '&m=' . $NMonth->thisMonth() . '&d=' . $NMonth->thisDay(); |
|
52 | +$next = $_SERVER['PHP_SELF'].'?y='.$NMonth->thisYear().'&m='.$NMonth->thisMonth().'&d='.$NMonth->thisDay(); |
|
53 | 53 | |
54 | 54 | $thisDate = new Date($month->thisMonth('timestamp')); |
55 | 55 | ?> |
@@ -116,7 +116,7 @@ discard block |
||
116 | 116 | <?php |
117 | 117 | while ($day = $month->fetch()) { |
118 | 118 | // Build a link string for each day |
119 | - $link = $_SERVER['PHP_SELF'] . '?y=' . $day->thisYear() . '&m=' . $day->thisMonth() . '&d=' . $day->thisDay(); |
|
119 | + $link = $_SERVER['PHP_SELF'].'?y='.$day->thisYear().'&m='.$day->thisMonth().'&d='.$day->thisDay(); |
|
120 | 120 | |
121 | 121 | // isFirst() to find start of week |
122 | 122 | if ($day->isFirst()) { |
@@ -124,11 +124,11 @@ discard block |
||
124 | 124 | } |
125 | 125 | |
126 | 126 | if ($day->isSelected()) { |
127 | - echo '<td class="selected">' . $day->thisDay() . '</td>' . "\n"; |
|
127 | + echo '<td class="selected">'.$day->thisDay().'</td>'."\n"; |
|
128 | 128 | } elseif ($day->isEmpty()) { |
129 | - echo '<td> </td>' . "\n"; |
|
129 | + echo '<td> </td>'."\n"; |
|
130 | 130 | } else { |
131 | - echo '<td><a href="' . $link . '">' . $day->thisDay() . '</a></td>' . "\n"; |
|
131 | + echo '<td><a href="'.$link.'">'.$day->thisDay().'</a></td>'."\n"; |
|
132 | 132 | } |
133 | 133 | |
134 | 134 | // isLast() to find end of week |
@@ -148,7 +148,7 @@ discard block |
||
148 | 148 | </tr> |
149 | 149 | </table> |
150 | 150 | <?php |
151 | -echo '<p><b>Took: ' . (getmicrotime() - $start) . ' seconds</b></p>'; |
|
151 | +echo '<p><b>Took: '.(getmicrotime() - $start).' seconds</b></p>'; |
|
152 | 152 | ?> |
153 | 153 | </body> |
154 | 154 | </html> |
@@ -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(); |
@@ -18,8 +18,8 @@ discard block |
||
18 | 18 | if (!@include 'Calendar/Calendar.php') { |
19 | 19 | define('CALENDAR_ROOT', '../../'); |
20 | 20 | } |
21 | -require_once CALENDAR_ROOT . 'Month/Weeks.php'; |
|
22 | -require_once CALENDAR_ROOT . 'Day.php'; |
|
21 | +require_once CALENDAR_ROOT.'Month/Weeks.php'; |
|
22 | +require_once CALENDAR_ROOT.'Day.php'; |
|
23 | 23 | |
24 | 24 | // Initialize GET variables if not set |
25 | 25 | if (!isset($_GET['y'])) { |
@@ -48,9 +48,9 @@ discard block |
||
48 | 48 | |
49 | 49 | // Construct strings for next/previous links |
50 | 50 | $PMonth = $Month->prevMonth('object'); // Get previous month as object |
51 | -$prev = $_SERVER['PHP_SELF'] . '?y=' . $PMonth->thisYear() . '&m=' . $PMonth->thisMonth() . '&d=' . $PMonth->thisDay(); |
|
51 | +$prev = $_SERVER['PHP_SELF'].'?y='.$PMonth->thisYear().'&m='.$PMonth->thisMonth().'&d='.$PMonth->thisDay(); |
|
52 | 52 | $NMonth = $Month->nextMonth('object'); |
53 | -$next = $_SERVER['PHP_SELF'] . '?y=' . $NMonth->thisYear() . '&m=' . $NMonth->thisMonth() . '&d=' . $NMonth->thisDay(); |
|
53 | +$next = $_SERVER['PHP_SELF'].'?y='.$NMonth->thisYear().'&m='.$NMonth->thisMonth().'&d='.$NMonth->thisDay(); |
|
54 | 54 | ?> |
55 | 55 | <!doctype html public "-//W3C//DTD HTML 4.0 Transitional//EN"> |
56 | 56 | <html> |
@@ -124,19 +124,19 @@ discard block |
||
124 | 124 | while ($Day = $Week->fetch()) { |
125 | 125 | |
126 | 126 | // Build a link string for each day |
127 | - $link = $_SERVER['PHP_SELF'] . '?y=' . $Day->thisYear() . '&m=' . $Day->thisMonth() . '&d=' . $Day->thisDay(); |
|
127 | + $link = $_SERVER['PHP_SELF'].'?y='.$Day->thisYear().'&m='.$Day->thisMonth().'&d='.$Day->thisDay(); |
|
128 | 128 | |
129 | 129 | // Check to see if day is selected |
130 | 130 | if ($Day->isSelected()) { |
131 | - echo '<td class="selected">' . $Day->thisDay() . '</td>' . "\n"; |
|
131 | + echo '<td class="selected">'.$Day->thisDay().'</td>'."\n"; |
|
132 | 132 | // Check to see if day is empty |
133 | 133 | } elseif ($Day->isEmpty()) { |
134 | - echo '<td class="empty">' . $Day->thisDay() . '</td>' . "\n"; |
|
134 | + echo '<td class="empty">'.$Day->thisDay().'</td>'."\n"; |
|
135 | 135 | } else { |
136 | - echo '<td><a href="' . $link . '">' . $Day->thisDay() . '</a></td>' . "\n"; |
|
136 | + echo '<td><a href="'.$link.'">'.$Day->thisDay().'</a></td>'."\n"; |
|
137 | 137 | } |
138 | 138 | } |
139 | - echo '</tr>' . "\n"; |
|
139 | + echo '</tr>'."\n"; |
|
140 | 140 | } |
141 | 141 | ?> |
142 | 142 | <tr> |
@@ -150,7 +150,7 @@ discard block |
||
150 | 150 | </tr> |
151 | 151 | </table> |
152 | 152 | <?php |
153 | -echo '<p><b>Took: ' . (getmicrotime() - $start) . ' seconds</b></p>'; |
|
153 | +echo '<p><b>Took: '.(getmicrotime() - $start).' seconds</b></p>'; |
|
154 | 154 | ?> |
155 | 155 | </body> |
156 | 156 | </html> |
@@ -5,19 +5,19 @@ |
||
5 | 5 | if (!@include 'Calendar/Calendar.php') { |
6 | 6 | define('CALENDAR_ROOT', '../../'); |
7 | 7 | } |
8 | -require_once CALENDAR_ROOT . 'Day.php'; |
|
9 | -require_once CALENDAR_ROOT . 'Decorator/Weekday.php'; |
|
8 | +require_once CALENDAR_ROOT.'Day.php'; |
|
9 | +require_once CALENDAR_ROOT.'Decorator/Weekday.php'; |
|
10 | 10 | |
11 | 11 | $Day = new Calendar_Day(date('Y'), date('n'), date('d')); |
12 | 12 | $WeekDay = new Calendar_Decorator_Weekday($Day); |
13 | 13 | // $WeekDay->setFirstDay(0); // Make Sunday first Day |
14 | 14 | |
15 | -echo 'Yesterday: ' . $WeekDay->prevWeekDay() . '<br>'; |
|
16 | -echo 'Today: ' . $WeekDay->thisWeekDay() . '<br>'; |
|
17 | -echo 'Tomorrow: ' . $WeekDay->nextWeekDay() . '<br>'; |
|
15 | +echo 'Yesterday: '.$WeekDay->prevWeekDay().'<br>'; |
|
16 | +echo 'Today: '.$WeekDay->thisWeekDay().'<br>'; |
|
17 | +echo 'Tomorrow: '.$WeekDay->nextWeekDay().'<br>'; |
|
18 | 18 | |
19 | 19 | $WeekDay->build(); |
20 | 20 | echo 'Hours today:<br>'; |
21 | 21 | while ($Hour = $WeekDay->fetch()) { |
22 | - echo $Hour->thisHour() . '<br>'; |
|
22 | + echo $Hour->thisHour().'<br>'; |
|
23 | 23 | } |
@@ -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 . 'Decorator/Uri.php'; |
|
8 | +require_once CALENDAR_ROOT.'Month/Weekdays.php'; |
|
9 | +require_once CALENDAR_ROOT.'Decorator/Uri.php'; |
|
10 | 10 | |
11 | 11 | if (!isset($_GET['jahr'])) { |
12 | 12 | $_GET['jahr'] = date('Y'); |
@@ -18,17 +18,17 @@ 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_Decorator_Uri($Calendar); |
24 | 24 | $Uri->setFragments('jahr', 'monat'); |
25 | 25 | // $Uri->setSeperator('/'); // Default is & |
26 | 26 | // $Uri->setScalar(); // Omit variable names |
27 | -echo "<pre>Previous Uri:\t" . $Uri->prev('month') . "\n"; |
|
28 | -echo "This Uri:\t" . $Uri->this('month') . "\n"; |
|
29 | -echo "Next Uri:\t" . $Uri->next('month') . "\n</pre>"; |
|
27 | +echo "<pre>Previous Uri:\t".$Uri->prev('month')."\n"; |
|
28 | +echo "This Uri:\t".$Uri->this('month')."\n"; |
|
29 | +echo "Next Uri:\t".$Uri->next('month')."\n</pre>"; |
|
30 | 30 | ?> |
31 | 31 | <p> |
32 | - <a href="<?php echo $_SERVER['PHP_SELF'] . '?' . $Uri->prev('month'); ?>">Prev</a> : |
|
33 | - <a href="<?php echo $_SERVER['PHP_SELF'] . '?' . $Uri->next('month'); ?>">Next</a> |
|
32 | + <a href="<?php echo $_SERVER['PHP_SELF'].'?'.$Uri->prev('month'); ?>">Prev</a> : |
|
33 | + <a href="<?php echo $_SERVER['PHP_SELF'].'?'.$Uri->next('month'); ?>">Next</a> |
|
34 | 34 | </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,8 +15,8 @@ discard block |
||
15 | 15 | if (!@include 'Calendar/Calendar.php') { |
16 | 16 | define('CALENDAR_ROOT', '../../'); |
17 | 17 | } |
18 | -require_once CALENDAR_ROOT . 'Month/Weekdays.php'; |
|
19 | -require_once CALENDAR_ROOT . 'Day.php'; |
|
18 | +require_once CALENDAR_ROOT.'Month/Weekdays.php'; |
|
19 | +require_once CALENDAR_ROOT.'Day.php'; |
|
20 | 20 | |
21 | 21 | if (!isset($_GET['y'])) { |
22 | 22 | $_GET['y'] = date('Y'); |
@@ -33,9 +33,9 @@ discard block |
||
33 | 33 | |
34 | 34 | // Construct strings for next/previous links |
35 | 35 | $PMonth = $Month->prevMonth('object'); // Get previous month as object |
36 | -$prev = $_SERVER['PHP_SELF'] . '?y=' . $PMonth->thisYear() . '&m=' . $PMonth->thisMonth() . '&d=' . $PMonth->thisDay(); |
|
36 | +$prev = $_SERVER['PHP_SELF'].'?y='.$PMonth->thisYear().'&m='.$PMonth->thisMonth().'&d='.$PMonth->thisDay(); |
|
37 | 37 | $NMonth = $Month->nextMonth('object'); |
38 | -$next = $_SERVER['PHP_SELF'] . '?y=' . $NMonth->thisYear() . '&m=' . $NMonth->thisMonth() . '&d=' . $NMonth->thisDay(); |
|
38 | +$next = $_SERVER['PHP_SELF'].'?y='.$NMonth->thisYear().'&m='.$NMonth->thisMonth().'&d='.$NMonth->thisDay(); |
|
39 | 39 | ?> |
40 | 40 | <!doctype html public "-//W3C//DTD HTML 4.0 Transitional//EN"> |
41 | 41 | <html> |
@@ -110,7 +110,7 @@ discard block |
||
110 | 110 | while ($Day = $Month->fetch()) { |
111 | 111 | |
112 | 112 | // Build a link string for each day |
113 | - $link = $_SERVER['PHP_SELF'] . '?y=' . $Day->thisYear() . '&m=' . $Day->thisMonth() . '&d=' . $Day->thisDay(); |
|
113 | + $link = $_SERVER['PHP_SELF'].'?y='.$Day->thisYear().'&m='.$Day->thisMonth().'&d='.$Day->thisDay(); |
|
114 | 114 | |
115 | 115 | // isFirst() to find start of week |
116 | 116 | if ($Day->isFirst()) { |
@@ -118,11 +118,11 @@ discard block |
||
118 | 118 | } |
119 | 119 | |
120 | 120 | if ($Day->isSelected()) { |
121 | - echo '<td class="selected">' . $Day->thisDay() . "</td>\n"; |
|
121 | + echo '<td class="selected">'.$Day->thisDay()."</td>\n"; |
|
122 | 122 | } elseif ($Day->isEmpty()) { |
123 | 123 | echo "<td> </td>\n"; |
124 | 124 | } else { |
125 | - echo '<td><a href="' . $link . '">' . $Day->thisDay() . "</a></td>\n"; |
|
125 | + echo '<td><a href="'.$link.'">'.$Day->thisDay()."</a></td>\n"; |
|
126 | 126 | } |
127 | 127 | |
128 | 128 | // isLast() to find end of week |
@@ -142,7 +142,7 @@ discard block |
||
142 | 142 | </tr> |
143 | 143 | </table> |
144 | 144 | <?php |
145 | -echo '<p><b>Took: ' . (getmicrotime() - $start) . ' seconds</b></p>'; |
|
145 | +echo '<p><b>Took: '.(getmicrotime() - $start).' seconds</b></p>'; |
|
146 | 146 | ?> |
147 | 147 | </body> |
148 | 148 | </html> |
@@ -6,9 +6,9 @@ discard block |
||
6 | 6 | if (!@include 'Calendar/Calendar.php') { |
7 | 7 | define('CALENDAR_ROOT', '../../'); |
8 | 8 | } |
9 | -require_once CALENDAR_ROOT . 'Day.php'; |
|
10 | -require_once CALENDAR_ROOT . 'Hour.php'; |
|
11 | -require_once CALENDAR_ROOT . 'Decorator.php'; |
|
9 | +require_once CALENDAR_ROOT.'Day.php'; |
|
10 | +require_once CALENDAR_ROOT.'Hour.php'; |
|
11 | +require_once CALENDAR_ROOT.'Decorator.php'; |
|
12 | 12 | |
13 | 13 | // Decorator to "attach" functionality to selected hours |
14 | 14 | |
@@ -54,9 +54,9 @@ discard block |
||
54 | 54 | FROM |
55 | 55 | diary |
56 | 56 | WHERE |
57 | - eventtime >= '" . $Day->thisDay(true) . "' |
|
57 | + eventtime >= '" . $Day->thisDay(true)."' |
|
58 | 58 | AND |
59 | - eventtime < '" . $Day->nextDay(true) . "';"; |
|
59 | + eventtime < '" . $Day->nextDay(true)."';"; |
|
60 | 60 | |
61 | 61 | // An array simulating data from a database |
62 | 62 | $result = array( |
@@ -112,7 +112,7 @@ discard block |
||
112 | 112 | |
113 | 113 | // If the hour is selected, call the decorator method... |
114 | 114 | if ($Hour->isSelected()) { |
115 | - echo '<td bgcolor="silver">' . $Hour->getEntry() . "</td>\n"; |
|
115 | + echo '<td bgcolor="silver">'.$Hour->getEntry()."</td>\n"; |
|
116 | 116 | } else { |
117 | 117 | echo "<td> </td>\n"; |
118 | 118 | } |
@@ -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(); |
@@ -15,7 +15,7 @@ discard block |
||
15 | 15 | define('CALENDAR_ROOT', '../../'); |
16 | 16 | } |
17 | 17 | |
18 | -require_once CALENDAR_ROOT . 'Year.php'; |
|
18 | +require_once CALENDAR_ROOT.'Year.php'; |
|
19 | 19 | |
20 | 20 | define('CALENDAR_MONTH_STATE', CALENDAR_USE_MONTH_WEEKDAYS); |
21 | 21 | |
@@ -100,7 +100,7 @@ discard block |
||
100 | 100 | } |
101 | 101 | |
102 | 102 | echo "<td>\n<table class=\"month\">\n"; |
103 | - echo '<caption class="month">' . date('F', $Month->thisMonth(true)) . '</caption>'; |
|
103 | + echo '<caption class="month">'.date('F', $Month->thisMonth(true)).'</caption>'; |
|
104 | 104 | echo "<tr>\n<th>M</th><th>T</th><th>W</th><th>T</th><th>F</th><th>S</th><th>S</th>\n</tr>"; |
105 | 105 | $Month->build(); |
106 | 106 | while ($Day = $Month->fetch()) { |
@@ -110,7 +110,7 @@ discard block |
||
110 | 110 | if ($Day->isEmpty()) { |
111 | 111 | echo "<td> </td>\n"; |
112 | 112 | } else { |
113 | - echo '<td>' . $Day->thisDay() . "</td>\n"; |
|
113 | + echo '<td>'.$Day->thisDay()."</td>\n"; |
|
114 | 114 | } |
115 | 115 | if ($Day->isLast()) { |
116 | 116 | echo "</tr>\n"; |