Ejemplo n.º 1
0
function process_fill_vacancy($post, $msentry)
{
    $venues = array("portland" => "RMH Portland", "bangor" => "RMH Bangor");
    if (!array_key_exists('_submit_fill_vacancy', $post)) {
        return false;
    }
    echo "<table align=\"center\"><tr><td align=\"center\" width=\"450\"><b>\n\t\tFilling a vacancy for " . $msentry->get_name() . "\n\t\t</b></td></tr>\n\t\t<tr><td><form method=\"POST\" style=\"margin-bottom:0;\">\n\t\t\t<select name=\"scheduled_vol\">\n\t\t\t<option value=\"0\" style=\"width: 371px;\">Select a volunteer with this availability</option>" . get_available_volunteer_options($msentry, get_persons($msentry->get_id())) . "</select><br><br>\n\t\t\t<select name=\"all_vol\">\n\t\t\t<option value=\"0\" style=\"width: 371px;\">Select from all volunteers</option>" . get_all_volunteer_options(get_persons($msentry->get_id()), $msentry->get_venue()) . "</select><br><br>\n\t\t\t<input type=\"hidden\" name=\"_submit_add_volunteer\" value=\"1\">\n\t\t\t<input type=\"submit\" value=\"Add Volunteer\" name=\"submit\" style=\"width: 400px\">\n\t\t\t</form></td></tr>";
    echo "</table>";
    echo "<table align=\"center\"><tr><td align=\"center\" width=\"450\">\n\t\t<a href=\"editMasterSchedule.php?group=" . $msentry->get_week_no() . "&day=" . $msentry->get_day() . "&shift=" . $msentry->get_hours() . "&venue=" . $msentry->get_venue() . "\">Back to Shift</a><br></td></tr></table>";
    return true;
    // check that person is not already working that shift
    // check that person is available
}
function process_fill_vacancy($post, $group, $day, $week_no)
{
    if (!array_key_exists('_submit_fill_vacancy', $post)) {
        return false;
    }
    echo "<table align=\"center\"><tr><td align=\"center\" border=\"1px\"><br><b>\n\t\tFilling a vacancy for " . do_group_name($group) . ", " . do_week_name($week_no) . " " . do_day_name($day) . "\n\t\t</b></td></tr>\n\t\t<tr><td align=\"center\"><form method=\"POST\" style=\"margin-bottom:0;\">\n\t\t\t<select name=\"scheduled_vol\">\n\t\t\t<option value=\"0\" style=\"width: 371px;\">Select a volunteer with " . do_week_name($week_no) . " " . do_day_name($day) . " availability</option>" . get_available_volunteer_options($group, $day, $week_no, get_persons($group, $day, $week_no)) . "</select><br><br>\n\t\t\t<select name=\"all_vol\">\n\t\t\t<option value=\"0\" style=\"width: 371px;\">Select from all volunteers in the " . do_group_name($group) . " group</option>" . get_all_volunteer_options($group, get_persons($group, $day, $week_no)) . "</select><br><br>\n\t\t\t<input type=\"hidden\" name=\"_submit_add_volunteer\" value=\"1\">\n\t\t\t<input type=\"submit\" value=\"Add Volunteer\" name=\"submit\" style=\"width: 200px\">\n\t\t\t</form></td></tr>";
    echo "</table>";
    echo "<br><table align=\"center\"><tr><td align=\"center\" width=\"450\">\n\t\t<a href=\"editMasterSchedule.php?group=" . $group . "&day=" . $day . "&week_no=" . $week_no . "\">Back to Crew</a><br></td></tr></table>";
    return true;
    // check that person is not already working that crew
    // check that person is available
}