date_default_timezone_set('Asia/Kolkata');
?>
$id=$_REQUEST['id'];
$Query_job_move_free_job_1 = "SELECT * from tbl_doctor_appointment where date >= CURDATE() order by date asc ";
$Query_job_move_free_job=$DB->query($Query_job_move_free_job_1);
while($row_job_move_free_job = mysql_fetch_array($Query_job_move_free_job))
{
$new_date=$row_job_move_free_job['date'];
$idss=$row_job_move_free_job['id'];
//$dob=date('Y-m-d', strtotime($dob));
$appointment_date=date('Y-m-d', strtotime($new_date));
$new_ap_date=date('l', strtotime($appointment_date));
$new_date_m=date('M', strtotime($appointment_date));
$new_date_m_da=date('d', strtotime($appointment_date));
?>
echo $new_ap_date;?>, echo $new_date_m;?> echo $new_date_m_da;?> Change Timing
$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("+20 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;
//increase the time to +20 and also change the below newdiff
$newdif=round($diff/1200);
$new_time_ma=$selectedTime = ''.$from_hour_1.':'.$from_min_1.' '.$from_sta.'';
$new_time_ma_1=strtotime($new_time_ma);
echo $newdif+1;
?>
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;
$new_date;
$cur_d=date("Y-m-d");
$new_1_t=date('h:i a', $new_time_ma_1);
$cur_t=date("h:i a");
$new_1_t_1= strtotime($new_1_t);
$mal=0;
$mala=1;
$new_1_cur_t= strtotime($cur_t);
if($new_1 < $cur_d)
{
$mala=0;
}
if($new_1 == $cur_d)
{
if($new_1_cur_t<$new_1_t_1)
{
}
else
{
$mala=0;
}
}
?>
$obj_1_n ="SELECT id from tbl_appointment where appointment_date='$new_1' and hour_date='$iy_h' and min_date='$iy_m' and am_date='$iy_am' and status='1' ";
$obj_1=$DB->query($obj_1_n);
$num_1 = mysql_num_rows($obj_1);
?>
if($num_1==0)
{
?>
}
?>
if($num_1>0)
{
?>
}
?>
$new_time_ma_1 = strtotime("+20 minutes", $new_time_ma_1);
} ?>
}
?>