} } echo '<br clear="all">'; } //NOTES OUTPUT echo '<div class="infobox"><p class="notes"><strong>Notes:</strong><br />'; echo $person->get_notes() . '</p></div><br>'; //APPLICANT CHECK if ($person->get_first_name() != 'guest' && $person->get_status() == 'applicant') { //SHOW STATUS echo '<div class="infobox"><p><strong>Your application has been filed.</strong><br><br /><table><tr><td><strong>Step</strong></td><td><strong>Completed?</strong></td></tr><tr><td>Background Check</td><td>' . $person['background_check'] . '</td></tr><tr><td>Interview</td><td>' . $person['interview'] . '</td></tr><tr><td>Shadow</td><td>' . $person['shadow'] . '</td></tr></table></p></div>'; } //VOLUNTEER CHECK if ($_SESSION['access_level'] == 1) { //we need to populate their schedule. $shifts = selectScheduled_dbShifts($person->get_id()); $scheduled_shifts = []; foreach ($shifts as $shift) { $shift_month = get_shift_month($shift); $shift_day = get_shift_day($shift); $shift_year = get_shift_year($shift); $shift_time_s = get_shift_start($shift); $shift_time_e = get_shift_end($shift); $cur_month = date("m"); $cur_day = date("d"); $cur_year = date("y"); if ($shift_year > $cur_year) { $upcoming_shifts[] = $shift; } else { if ($shift_year == $cur_year) { if ($cur_month < $shift_month) {
echo '<li type="circle"><a href="' . $path . 'editShift.php?shift=' . $thisRow['id'] . '">' . get_shift_name_from_id($thisRow['id']) . '</a></li>'; } } echo '</ul></p></div><br>'; } // active volunteers who haven't worked recently $everyone = getall_names("active", "volunteer", $_SESSION['venue']); if ($everyone && mysql_num_rows($everyone) > 0) { //active volunteers who haven't worked for the last two months $two_months_ago = $today - 60 * 86400; echo '<div class="inactiveBox">'; echo '<p><strong>Unscheduled active house volunteers who haven\'t worked during the last two months:</strong>'; echo '<table class="searchResults"><tr><td class="searchResults"><u>Name</u></td><td class="searchResults"><u>Date Last Worked</u></td></tr>'; while ($thisRow = mysql_fetch_array($everyone, MYSQL_ASSOC)) { if (!preg_match("/manager/", $thisRow['type'])) { $shifts = selectScheduled_dbShifts($thisRow['id']); $havent_worked = true; $last_worked = ""; for ($i = 0; $i < count($shifts) && $havent_worked; $i++) { $date_worked = mktime(0, 0, 0, get_shift_month($shifts[$i]), get_shift_day($shifts[$i]), get_shift_year($shifts[$i])); $last_worked = substr($shifts[$i], 0, 8); if ($date_worked > $two_months_ago) { $havent_worked = false; } } if ($havent_worked) { echo '<tr><td class="searchResults"><a href="personEdit.php?id=' . $thisRow['id'] . '">' . $thisRow['first_name'] . ' ' . $thisRow['last_name'] . '</a></td><td class="searchResults">' . $last_worked . '</td></tr>'; } } } echo '</table></p></div><br>';