query($Query_delete); header("location:view_available_time_direct.php?msg=sucess"); } if($_REQUEST['cancel_id']!='') { $id=$_REQUEST['cancel_id']; //$Delete_Question = "DELETE FROM tbl_appointment WHERE `id`='$id'"; //$Result_Question = mysql_query($Delete_Question); $Query_delete = "UPDATE tbl_doctor_appointment_office SET status='1' WHERE `id`='".$_REQUEST['cancel_id']."'"; $name_delete=$DB->query($Query_delete); header("location:view_available_time_direct.php?msg=sucess"); } ?>
Success! Data Deleted Sucessfully.
= '$dt2' order by date asc"; $namesss=$DB->query($Query); $nsssss=mysql_num_rows($namesss); $manssss='0'; while ($rowsss = mysql_fetch_array($namesss)) { $from_hour=$rowsss['from_hour']; $from_min=$rowsss['from_min']; $to_hour=$rowsss['to_hour']; $to_min=$rowsss['to_min']; $from_hour=sprintf("%02d", $from_hour); $to_hour=sprintf("%02d", $to_hour); $from_min=sprintf("%02d", $from_min); $to_min=sprintf("%02d", $to_min); $date=$rowsss['date']; /*$Query = "SELECT * from `tbl_job_email` where id='$invoice_id' "; $name=$DB->query($Query); $no=mysql_num_rows($name); $row = mysql_fetch_array($name);*/ $available = get_appt($rowsss['date'],$conn); $slots = get_tot_appt($rowsss['date'],$conn); ?>
S.No Date From To Slots Available Edit Delete
: :
'$new_cur' order by id asc "; $Query_job_move_free_job = mysqli_query($conn, "SELECT * from tbl_doctor_appointment_office where date='$new_date' and date >='$new_cur' order by id asc "); $num_rows_mal = mysqli_num_rows($Query_job_move_free_job); $k=0; if($num_rows_mal>0) { $si=0; while($row_job_move_free_job = mysqli_fetch_array($Query_job_move_free_job)) { $new_id=$row_job_move_free_job['id']; $from_hour=$row_job_move_free_job['from_hour']; $from_hour_1 = sprintf("%02d", $from_hour); $from_min=$row_job_move_free_job['from_min']; $from_min_1 = sprintf("%02d", $from_min); $from_sta=$row_job_move_free_job['from_sta']; $to_hour=$row_job_move_free_job['to_hour']; $to_hour_1 = sprintf("%02d", $to_hour); $to_min=$row_job_move_free_job['to_min']; $to_min_1 = sprintf("%02d", $to_min); $to_sta=$row_job_move_free_job['to_sta']; $new_date=$row_job_move_free_job['date']; $time=strtotime($new_date); $month=date("F",$time); $year=date("Y",$time); $new_date_1=date('D', strtotime($new_date)); $new_date_m=date('M', strtotime($new_date)); $new_date_m_mas=date('d', strtotime($new_date)); $selectedTime = ''.$from_hour_1.':'.$from_min_1.' '.$from_sta.''; $selectedTime2 = ''.$to_hour_1.':'.$to_min_1.' '.$to_sta.''; $endTime = strtotime("+10 minutes", strtotime($selectedTime)); /*echo $newtime1=date('h:i a', $selectedTime); $newtime2=date('h:i a', $selectedTime2);*/ $loginTime = strtotime($selectedTime); $checkTime = strtotime($selectedTime2); $diff = $checkTime - $loginTime; $newdif=round($diff/600); $new_time_ma=$selectedTime = ''.$from_hour_1.':'.$from_min_1.' '.$from_sta.''; $new_time_ma_1=strtotime($new_time_ma); for($i=0;$i<=$newdif;$i++) { $new_1=date('Y-m-d', strtotime($new_date)); $iy_h= date('h', $new_time_ma_1); $iy_m= date('i', $new_time_ma_1); $iy_am= date('a', $new_time_ma_1); $obj_1 = mysqli_query($conn, "SELECT id from tbl_appointment_office where appointment_date='$new_1' and hour_date='$iy_h' and min_date='$iy_m' and am_date='$iy_am' and status='1' "); $num_1 = mysqli_num_rows($obj_1); if($num_1==0) { $k=$k+1; } $new_time_ma_1 = strtotime("+10 minutes", $new_time_ma_1); } $si=$si+1; } } if($k > 0){ return $k; }else{ return $k=0; } } function get_tot_appt($prodid,$conn) { date_default_timezone_set('Asia/Kolkata'); $MALA_CU_DAY_AR_KAR=date("Y-m-d"); $myarr = Array(); $mas=date('Y-m-d', strtotime($prodid)); $n_t_d=strtotime($mas); $id=strtotime($mas); $Query_sp_in = "SELECT * from shop_category "; $name_fin_sp_in=mysqli_query($conn,$Query_sp_in); $num_max_job_sp_in=mysqli_num_rows($name_fin_sp_in); $new_date=date('Y-m-d',$id); $new_date_mal=date('Y-m-d H:i:s',$id); "SELECT * from tbl_doctor_appointment_office where date='$new_date' and date >'$new_cur' order by id asc "; $Query_job_move_free_job = mysqli_query($conn, "SELECT * from tbl_doctor_appointment_office where date='$new_date' and date >='$new_cur' order by id asc "); $num_rows_mal = mysqli_num_rows($Query_job_move_free_job); $k=0; if($num_rows_mal>0) { $si=0; while($row_job_move_free_job = mysqli_fetch_array($Query_job_move_free_job)) { $new_id=$row_job_move_free_job['id']; $from_hour=$row_job_move_free_job['from_hour']; $from_hour_1 = sprintf("%02d", $from_hour); $from_min=$row_job_move_free_job['from_min']; $from_min_1 = sprintf("%02d", $from_min); $from_sta=$row_job_move_free_job['from_sta']; $to_hour=$row_job_move_free_job['to_hour']; $to_hour_1 = sprintf("%02d", $to_hour); $to_min=$row_job_move_free_job['to_min']; $to_min_1 = sprintf("%02d", $to_min); $to_sta=$row_job_move_free_job['to_sta']; $new_date=$row_job_move_free_job['date']; $time=strtotime($new_date); $month=date("F",$time); $year=date("Y",$time); $new_date_1=date('D', strtotime($new_date)); $new_date_m=date('M', strtotime($new_date)); $new_date_m_mas=date('d', strtotime($new_date)); $selectedTime = ''.$from_hour_1.':'.$from_min_1.' '.$from_sta.''; $selectedTime2 = ''.$to_hour_1.':'.$to_min_1.' '.$to_sta.''; $endTime = strtotime("+10 minutes", strtotime($selectedTime)); /*echo $newtime1=date('h:i a', $selectedTime); $newtime2=date('h:i a', $selectedTime2);*/ $loginTime = strtotime($selectedTime); $checkTime = strtotime($selectedTime2); $diff = $checkTime - $loginTime; $newdif=round($diff/600); $new_time_ma=$selectedTime = ''.$from_hour_1.':'.$from_min_1.' '.$from_sta.''; $new_time_ma_1=strtotime($new_time_ma); for($i=0;$i<=$newdif;$i++) { $new_1=date('Y-m-d', strtotime($new_date)); $iy_h= date('h', $new_time_ma_1); $iy_m= date('i', $new_time_ma_1); $iy_am= date('a', $new_time_ma_1); $new_time_ma_1 = strtotime("+10 minutes", $new_time_ma_1); array_push($myarr, $new_time_ma_1); } $si=$si+1; } } return count($myarr); } ?>