$requestYear = rv('year', date('Y')); if (!preg_match('/^20[0-9]{2}$/', $requestYear)) { $requestYear = date('Y'); } $requestMonth = rv('month', date('n')); if (!is_numeric($requestMonth) || $requestMonth < 1 || $requestMonth > 12) { $requestMonth = date('n'); } $requestMonth = ltrim($requestMonth, '0'); if ($requestMonth * 1 < 10) { $requestMonth = '0' . $requestMonth; } } //closes if // set name id and reference URL (needed for AJAX reload) $nameID = getNameIDs($location_id); $refurl = getURL($nameID); // calendar info $date = strtotime("{$requestYear}-{$requestMonth}"); $days_in_month = date('t', $date); $day = 1 * date('d', $date); $month = 1 * date('m', $date); $year = date('Y', $date); $first_day = mktime(0, 0, 0, $month, 1, $year); // generate the first day of the month $title = date('F', $first_day); // get the month name $blank = date('w', $first_day); // find out what day of the week the first day of the month falls on ?>
?> </div><!-- closes first column --> <div class="span7 right-side"> <div id="map"> <div id="api"> </div> <div id="slide-content" class="scrollpane"> <?php // grab array of library name ids (login names) $name_id = getNameIDs(); // loop through these for the panel display for ($i = 0; $i < count($name_id); $i++) { // smaller functions used for future flexibility $nameid = $name_id[$i]; $id = getID($name_id[$i]); $url = getURL($name_id[$i]); $name = getName($name_id[$i]); $building = getBuilding($name_id[$i], 'at '); $description = getDescription($name_id[$i]); $notes = getHoursNotes($name_id[$i]); $map = getMapCode($name_id[$i]); $address = getAddress($name_id[$i]); $phone = getPhone($name_id[$i]); $accessurl = getAccessURL($name_id[$i]); $currentdate = date('Y-m-d');
//closes if-elseif-else // for no return } else { $row .= 'N/A</td>'; } //closes if-else } //closes if // close the row $row .= '</tr>'; // add the row to the widget $widget .= $row; } //closes for // grab name for monthly hours link $URLname = getNameIDs($location1); // grab available widget or emergency closure notes for location 1 $note1 = getWidgetNote($location1); $emergencynote1 = getHoursNotes($URLname); // when a note is included if ($note1 || $emergencynote1) { // add a row for notes $widget .= ' <tr class="widget-note"><td colspan="4"><em>Note:</em> '; if ($note1) { $widget .= $note1; } //closes if if ($note1 && $emergencynote1) { $widget .= '<br /><br />'; }