function Group_Insert_Weekly_Appointment($group_id, $description, $type, $day, $beg_time, $end_time, $url, $owner, $bd) { $members = List_Members($group_id, 0, $bd); for ($i = 0; $i < count($members); $i++) { Insert_Weekly_Appointment($members[$i][0], $description, $type, $day, $beg_time, $end_time, $url, $owner, $group_id, 1, 0, $bd); } }
$check = Check_Weekly_Appointments_Overlap($owner, $_POST['day'], $_POST['beg_time'], $_POST['end_time'], '', $bd); if ($check) { $error[$num_errors++] = "There is another weekly appointment on the owner's schedule within this time span"; } } if ($_POST['room']) { $check = Check_Weekly_Appointments_Overlap($_POST['room'], $_POST['day'], $_POST['beg_time'], $_POST['end_time'], '', $bd); if ($check) { $error[$num_errors++] = "There is another weekly appointment in the rooms' schedule within this time span"; } } if (empty($error)) { Insert_Weekly_Appointment($account_id, $_POST['description'], $_POST['type'], $_POST['day'], $_POST['beg_time'], $_POST['end_time'], $_POST['url'], $owner, 0, 0, 1, $bd); $alert[$num_alerts++] = "Appointment Inserted Successfully"; if ($ins_at_master) { Insert_Weekly_Appointment($owner, $_POST['description'], $_POST['type'], $_POST['day'], $_POST['beg_time'], $_POST['end_time'], $_POST['url'], $owner, 0, 0, 1, $bd); $alert[$num_alerts++] = "Appointment Inserted Successfully at Owner's Schedule"; } if (!$is_pop) { include "scheduling.php"; exit; } else { $result_xsl = "xsl/" . $default_xsl . "/sch_pop_final.xsl"; } } } } else { $error[$num_errors++] = "Invalid Session ID"; include "logout.php"; exit; }