Exemplo n.º 1
0
function updateAppointment($complete_sess_id, $app_id, $description, $type, $date, $beg_time, $end_time, $url)
{
    if (!Validate_Session($complete_sess_id, $_SERVER['REMOTE_ADDR'], $GLOBALS['bd'])) {
        return "Invalid session ID!";
    }
    // Convert the time values
    $nrp_beg_time = time2nrptime($beg_time);
    $nrp_end_time = time2nrptime($end_time);
    // Convert the type
    $nrp_type = type2nrptype($type);
    // Update it
    Update_Appointment($app_id, $description, $nrp_type, $date, $nrp_beg_time, $nrp_end_time, $url, $GLOBALS['bd']);
    return 1;
}
Exemplo n.º 2
0
     $description = $_POST['description'];
     $type = $_POST['type'];
     $url = $_POST['url'];
     $day = $_POST['day'];
     $month = $_POST['month'];
     $year = $_POST['year'];
     if (!empty($_POST['submit_conf_yes'])) {
         $date = $year . "-" . $month . "-" . $day;
         Update_Appointment($app_id, $_POST['description'], $_POST['type'], $date, $_POST['beg_time'], $_POST['end_time'], $_POST['url'], $bd);
         $alert[$num_alerts++] = "Appointment Modified Successfully";
         if ($ins_at_master) {
             $apps = List_Appointments($account_id, '', '', '', '', '', '', '', $app_id, '', $cfg['time'], $array_type, $array_color, $array_image, $cfg['days'], $bd);
             $date = $apps[0][6] . "-" . $apps[0][5] . "-" . $apps[0][4];
             $apps_bef = List_Appointments($owner, '', '', '', '', '', $date, $date, $apps_bef[0][7], $apps_bef[0][9], $apps[0][7], $apps[0][9], $cfg['time'], $array_type, $array_color, $array_image, $cfg['days'], $bd);
             $app_id_owner = $apps_bef[0][0];
             Update_Appointment($app_id_owner, $_POST['description'], $_POST['type'], $date, $_POST['beg_time'], $_POST['end_time'], $_POST['url'], $bd);
             $alert[$num_alerts++] = "Appointment Modified Successfully at Owner's Schedule";
         }
     } else {
         $alert[$num_alerts++] = 'Appointment Modification Cancelled';
     }
     if (!$is_pop) {
         include "scheduling.php";
         exit;
     } else {
         $result_xsl = "xsl/" . $default_xsl . "/sch_pop_final.xsl";
     }
 } else {
     $apps = List_Appointments($account_id, 0, '', '', '', '', '', '', $app_id, '', $cfg['time'], $array_type, $array_color, $array_image, $cfg['days'], $bd);
     $description = $apps[0][2];
     $beg_time = $apps[0][7];