$result_xsl = "xsl/" . $default_xsl . "/sch_pop_final.xsl"; } } else { if ($is_pop) { $result_xsl = "xsl/" . $default_xsl . "/sch_ins_app_pop1.xsl"; } else { $result_xsl = "xsl/" . $default_xsl . "/sch_ins_app1.xsl"; } } } } elseif (!empty($_POST['submit_conf_yes']) || !empty($_POST['submit_conf_no'])) { if (!empty($_POST['submit_conf_yes'])) { Insert_Appointment($account_id, $_POST['description'], $_POST['type'], $_POST['year'] . "-" . $_POST['month'] . "-" . $_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_Appointment($owner, $_POST['description'], $_POST['type'], $_POST['year'] . "-" . $_POST['month'] . "-" . $_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"; } } else { $alert[$num_alerts++] = 'Appointment Insertion Cancelled'; } 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";
function Group_Insert_Appointment($group_id, $description, $type, $date, $beg_time, $end_time, $url, $owner, $bd) { $members = List_Members($group_id, 0, $bd); for ($i = 0; $i < count($members); $i++) { Insert_Appointment($members[$i][0], $description, $type, $date, $beg_time, $end_time, $url, $owner, $group_id, 1, 0, $bd); } }
function newAppointment($complete_sess_id, $description, $type, $date, $beg_time, $end_time, $url) { if (!Validate_Session($complete_sess_id, $_SERVER['REMOTE_ADDR'], $GLOBALS['bd'])) { return "Invalid session ID!"; } // Get the user account ID $sess_id = substr($complete_sess_id, 32); Get_Account_Id($sess_id, $account_id, $GLOBALS['bd']); // Convert the time values $nrp_beg_time = time2nrptime($beg_time); $nrp_end_time = time2nrptime($end_time); // Convert the type $nrp_type = type2nrptype($type); // Insert it Insert_Appointment($account_id, $description, $nrp_type, $date, $nrp_beg_time, $nrp_end_time, $url, $account_id, 0, 0, 1, $GLOBALS['bd']); return 1; }