Exemplo n.º 1
0
     if (!$is_pop) {
         $result_xsl = "xsl/" . $default_xsl . "/sch_del_week_app1.xsl";
     } else {
         $result_xsl = "xsl/" . $default_xsl . "/sch_del_week_app_pop1.xsl";
     }
 } else {
     if (!empty($_POST['submit_conf_yes']) || !empty($_POST['submit_conf_no'])) {
         if (!empty($_POST['submit_conf_yes'])) {
             Delete_Weekly_Appointment($account_id, $_POST['app_id'], $bd);
             $alert[$num_alerts++] = 'Appointment deleted successfully';
             if (!empty($_POST['master_del'])) {
                 $apps = List_Weekly_Appointments($account_id, 0, '', '', '', '', '', '', $_POST['app_id'], '', $cfg['time'], $array_type, $array_color, $array_image, $cfg['days'], $bd);
                 $found_date = $apps[0][14];
                 $apps1 = List_Weekly_Appointments($owner, 0, '', '', '', '', '', '', $_POST['app_id'], '', $cfg['time'], $array_type, $array_color, $array_image, $cfg['days'], $bd);
                 if (!empty($apps1)) {
                     Delete_Weekly_Appointment($owner, $apps1[0][0], $bd);
                     $alerts[$num_alerts++] = "Appointment in Owner Schedule Deleted";
                 }
             }
         } else {
             $alert[$num_alerts++] = 'Appointment deletion cancelled';
         }
         if (!$is_pop) {
             include "scheduling.php";
             exit;
         } else {
             $result_xsl = "xsl/" . $default_xsl . "/sch_pop_final.xsl";
         }
     } else {
         $apps = List_Weekly_Appointments($account_id, 0, '', '', '', '', '', '', $_POST['app_id'], $owner, $cfg['time'], $array_type, $array_color, $array_image, $cfg['days'], $bd);
         $result_xsl = "xsl/" . $default_xsl . "/sch_del_week_app.xsl";
Exemplo n.º 2
0
 $var_image = $role . '_icon';
 $array_type = $cfg[$var_type];
 $array_color = $cfg[$var_color];
 $array_image = $cfg[$var_image];
 if ($perio == 'common') {
     $app = List_Appointments($account_id, '', '', '', '', '', '', '', $app_id, '', $cfg['time'], $array_type, $array_color, $array_image, $cfg['days'], $bd);
 } else {
     $app = List_Weekly_Appointments($account_id, '', '', '', '', '', '', '', $app_id, '', $cfg['time'], $array_type, $array_color, $array_image, $cfg['days'], $bd);
 }
 if (!empty($_POST['submit_conf_yes'])) {
     if ($app[0][1] == 'weekly') {
         $overlap_apps = Check_Weekly_Appointment_Overlap($account_id, $app[0][15], $app[0][7], $app[0][9], '', $bd);
         if ($overlap_apps) {
             for ($i = 0; $i < $bd->NumberOfRows($overlap_apps); $i++) {
                 $overlap_app_id = $bd->FetchResult($overlap_apps, $i, 'app_id');
                 Delete_Weekly_Appointment($account_id, $overlap_app_id, $bd);
             }
         }
         if ($conf == 'yes') {
             $update = "UPDATE weekly_appointments SET authorized = 1 WHERE\n\t\t\t\t\tapp_id = " . $app[0][0];
             $alert[$num_alerts++] = "Appointment authorized successfully";
         } else {
             if ($conf == 'no') {
                 $update = "DELETE FROM weekly_appointments WHERE app_id = " . $app[0][0];
                 $alert[$num_alerts++] = "Unauthorized Appointment removed successfully";
             }
         }
         $bd->Query($update);
         include "sch_auth.php";
         exit;
     } else {