$caller_direct="active"; $caller1="open"; $caller_det="active"; require_once '../template/superadmin/action_connection.php' ; include("../settings/adminsession.php"); include '../../include/conf.php'; include 'sms_api.php'; session_start(); ?> if($_REQUEST['id']!='') { $update_option =1; } ?> if(isset($_POST['Submit'])) { $ses_ma_id=$_SESSION["userid"]; date_default_timezone_set('Asia/Kolkata'); $date = date('Y-m-d H:i:s ', time()); $mobile=trim(addslashes($_POST['mobile'])); $name=trim(addslashes($_POST['name'])); $location=trim(addslashes($_POST['location'])); $consulting=trim(addslashes($_POST['consulting'])); $amount=trim(addslashes($_POST['age'])); $payment_type = $_POST['req_pay']; $prodid=$_POST['from_date']; $paid_amount = $_POST['paid_amount']; $order_id = $_POST['order_id']; $mas=date('Y-m-d', strtotime($_REQUEST["from_date"])); $vehicle=trim(addslashes($_POST['vehicle'])); $id=$_REQUEST['id']; $m_id=$n_t_d; $dob=date('Y-m-d', strtotime($dob)); $time_id=trim(addslashes($_POST['time_id'])); $time_id_1=strtotime($time_id); $date_id=trim(addslashes($_POST['date_id'])); $date_id_1=strtotime($date_id); $appointment_time=date('h:i a', $time_id_1); $appointment_date=date('Y-m-d', $date_id_1); $appointment_time_1=date('h', $time_id_1); $appointment_time_2=date('i', $time_id_1); $appointment_time_3=date('a', $time_id_1); //$time_t=date('h:i a', $time_id); //$date_t=date('Y-m-d', $date_id); $app_id=$_REQUEST['app_id']; $Query="INSERT INTO tbl_appointment_office VALUES (NULL,'6','".$mas."','".$date."','$appointment_time_1','$appointment_time_2','$appointment_time_3','$consulting','','$mobile','','$name','$location','2021-11-02 18:49:38','NULL','$amount','$order_id','def','1','0','admin','$vehicle', NULL, NULL, '$payment_type','$paid_amount', NULL)"; $DB->query($Query); $mod_date = date('Y-m-d', strtotime($prodid)); $mysql_insert_id= mysql_insert_id(); $app_info = date('d-m-Y', strtotime($prodid)).' : '.date('l', strtotime($prodid)).' : '; echo "select * from tbl_doctor_appointment_office where date = '$prodid'"; $get_appt = mysqli_query($conn, "select * from tbl_doctor_appointment_office where date = '$mod_date'"); $get_apps = mysqli_fetch_array($get_appt, MYSQLI_ASSOC); if($get_apps['from_min'] == '0'){ $from_min = '00'; }else{ $from_min = $get_apps['from_min']; } if($get_apps['to_min'] == '0'){ $to_min = '00'; }else{ $to_min = $get_apps['to_min']; } $app_info.=$get_apps['from_hour'].'.'.$from_min.' '.$get_apps['from_sta'].' to '.$get_apps['to_hour'].'.'.$to_min.' '.$get_apps['to_sta']; sms_api($name, $app_info, $mobile); sleep(5); $flag="sucess"; // header("location:appointment-confirmation.php?id=".$id ."&m_id=".$m_id); } ?>