|
@@ 113-122 (lines=10) @@
|
| 110 |
|
$today = getTodayInfo(); |
| 111 |
|
|
| 112 |
|
// Need a start date for all views |
| 113 |
|
if (!empty($_REQUEST['start_date'])) |
| 114 |
|
{ |
| 115 |
|
$start_parsed = date_parse($_REQUEST['start_date']); |
| 116 |
|
if (empty($start_parsed['error_count']) && empty($start_parsed['warning_count'])) |
| 117 |
|
{ |
| 118 |
|
$_REQUEST['year'] = $start_parsed['year']; |
| 119 |
|
$_REQUEST['month'] = $start_parsed['month']; |
| 120 |
|
$_REQUEST['day'] = $start_parsed['day']; |
| 121 |
|
} |
| 122 |
|
} |
| 123 |
|
$year = !empty($_REQUEST['year']) ? (int) $_REQUEST['year'] : $today['year']; |
| 124 |
|
$month = !empty($_REQUEST['month']) ? (int) $_REQUEST['month'] : $today['month']; |
| 125 |
|
$day = !empty($_REQUEST['day']) ? (int) $_REQUEST['day'] : (!empty($_REQUEST['month']) ? 1 : $today['day']); |
|
@@ 130-139 (lines=10) @@
|
| 127 |
|
$start_object = checkdate($month, $day, $year) === true ? date_create(implode('-', array($year, $month, $day))) : date_create(implode('-', array($today['year'], $today['month'], $today['day']))); |
| 128 |
|
|
| 129 |
|
// Need an end date for the list view |
| 130 |
|
if (!empty($_REQUEST['end_date'])) |
| 131 |
|
{ |
| 132 |
|
$end_parsed = date_parse($_REQUEST['end_date']); |
| 133 |
|
if (empty($end_parsed['error_count']) && empty($end_parsed['warning_count'])) |
| 134 |
|
{ |
| 135 |
|
$_REQUEST['end_year'] = $end_parsed['year']; |
| 136 |
|
$_REQUEST['end_month'] = $end_parsed['month']; |
| 137 |
|
$_REQUEST['end_day'] = $end_parsed['day']; |
| 138 |
|
} |
| 139 |
|
} |
| 140 |
|
$end_year = !empty($_REQUEST['end_year']) ? (int) $_REQUEST['end_year'] : null; |
| 141 |
|
$end_month = !empty($_REQUEST['end_month']) ? (int) $_REQUEST['end_month'] : null; |
| 142 |
|
$end_day = !empty($_REQUEST['end_day']) ? (int) $_REQUEST['end_day'] : null; |