prefix . "ap_appointments"; $appointmentdetails="SELECT * FROM $table_name WHERE `id` ='$appointmentid'"; $appointmentdetails = $wpdb->get_row($appointmentdetails); ?>

Update Appointment(s)

Name :  
Email :  
Service :  
Phone :  
Star Time :  
End Time :  
Date :  
Description :  
Status :  
Appointment By :  
    Cancel
prefix . "ap_appointments"; $update_appointment="UPDATE `$appointmentstable_name` SET `name` = '$name', `email` = '$email', `service_id` = '$serviceid', `phone` = '$phone', `start_time` = '$start_time', `end_time` = '$end_time', `date` = '$appointmentdate', `note` = '$note', `status` = '$status', `appointment_by` = '$appointment_by' WHERE `id` ='$up_app_id';"; if($wpdb->query($update_appointment)) { //send notification to client if appointment approved or cancelled if($status == 'approved' || $status == 'cancelled' ) { $GetAppKey = $wpdb->get_row("SELECT * FROM `$appointmentstable_name` WHERE `id` = '$up_app_id' ", OBJECT); $MangeAppointmentUrl = site_url().'/wp-admin/admin.php?page=manage-appointments'; $BlogUrl = site_url().'/wp-admin'; $BlogName = get_bloginfo(); $ServiceTable = $wpdb->prefix."ap_services"; $ServiceData = $wpdb->get_row("SELECT * FROM `$ServiceTable` WHERE `id` = '$serviceid'", OBJECT); $subject_to_recipent = "$BlogName: Your appointment has been $status."; $body_for_recipent = "

Dear ".ucwords($name).".

Your appointment has been $status by admin..

Your Appointment Details As:

Appointment For: ".ucwords($ServiceData->name)."
Appointment Note: $note
Appointment Status: $status
Appointment Date: $appointmentdate
Appointment Time: $start_time To $end_time
Appointment Key: $GetAppKey->appointment_key

Thank You!!!

"; $AdminEmailDetails = unserialize(get_option('emaildetails')); $recipent_email = $email; //send notification & chech mail type if(get_option('emailtype') == 'wpmail') { $wpmail_body_for_recipent = " Dear ".ucwords($name).", Your appointment has been $status by admin. Your Appointment Details As: Appointment For: ".ucwords($ServiceData->name)." Appointment Note: $note Appointment Status: $status Appointment Date: $appointmentdate Appointment Time: $start_time To $end_time Appointment Key: $GetAppKey->appointment_key Thank You!!! "; $admin_email = $AdminEmailDetails['wpemail']; $headers[] = "From: Admin <$admin_email>"; //recipent mail wp_mail( $recipent_email, $subject_to_recipent, $wpmail_body_for_recipent, $headers, $attachments = '' ); } if(get_option('emailtype') == 'phpmail') { $phpmail_body_for_recipent = " Dear ".ucwords($name).", Your appointment has been $status by admin. Your Appointment Details As: Appointment For: ".ucwords($ServiceData->name)." Appointment Note: $note Appointment Status: $status Appointment Date: $appointmentdate Appointment Time: $start_time To $end_time Appointment Key: $GetAppKey->appointment_key Thank You!!! "; $admin_email = $AdminEmailDetails['phpemail']; $headers = "From: Admin <$admin_email>" . //client mail mail($recipent_email, $subject_to_recipent, $phpmail_body_for_recipent, $headers); } if(get_option('emailtype') == 'smtp') { $admin_email = $AdminEmailDetails['smtpemail']; include('notification/Email.php'); $admin_email = $AdminEmailDetails['smtpemail']; $hostname = $AdminEmailDetails['hostname']; $portno = $AdminEmailDetails['portno']; $smtpemail = $AdminEmailDetails['smtpemail']; $password = $AdminEmailDetails['password']; $recipent_email = $email; $Email = new Email; $Email->notifyclient($hostname, $portno, $smtpemail, $password, $admin_email, $recipent_email, $subject_to_recipent, $body_for_recipent, $BlogName); } }// end of update check //redirect to updated appointment details page echo ""; }// end of if query }// end of isset ?> prefix . "ap_appointments"; $appdetails="SELECT * FROM $table_name WHERE `id` ='$appid'"; $appdetails = $wpdb->get_row($appdetails); ?>

View Appointment(s) : name); ?>

Name : name); ?>
Email : email; ?>
Service : service_id; $table_name = $wpdb->prefix . "ap_services"; $servicedetails= $wpdb->get_row("SELECT * FROM $table_name WHERE `id` ='$appdetails->service_id'"); echo ucwords($servicedetails->name); ?>
Phone : phone; ?>
Start Time : start_time)); ?>
End Time : end_time)); ?>
Date : date; ?>
Description : note); ?>
Appointment Key : appointment_key; ?>
Status : status); ?>
Appointment By : appointment_by); ?>
    Back