44 lines
1.2 KiB
PHP
44 lines
1.2 KiB
PHP
<?php
|
|
include('includes/config/config.php');
|
|
include ('includes/functions.php');
|
|
include ('log_entry.php');
|
|
error_log ( "Start Printing Request Attributes" );
|
|
$requestStr="";
|
|
foreach ( $_REQUEST as $key => $value ) {
|
|
$requestStr.=$key . " : " . $value . "\n";
|
|
error_log ( $key . " : " . $value . "<br />\r\n" );
|
|
}
|
|
error_log ( "End Printing Request Attributes" );
|
|
save_log($requestStr,'Vaccine Master','SAVE','save_vaccine.php');
|
|
$id = $_POST['id'];
|
|
$doctor_id =$_POST['doctor_name'];
|
|
|
|
$days = $_POST['days'];
|
|
$days = implode(',', $days);
|
|
$slots = $_POST['slots'];
|
|
$slots = implode(',', $slots);
|
|
|
|
|
|
|
|
|
|
if(!empty($id)){
|
|
$query = "update doctor_available_master set doctor_id = '$doctor_id', days = '$days', slots = '$slots', modified_by = '".$_SESSION['user_id']."' where id = '".$id."'";
|
|
}
|
|
else {
|
|
$query = "insert into doctor_available_master(doctor_id, days, slots, modified_by)
|
|
values ('$doctor_id', '$days', '$slots','".$_SESSION['user_id']."' ); ";
|
|
}
|
|
error_log($query."save_dr_available");
|
|
if (!$result = @mysqli_query($conn,$query)) {
|
|
exit(mysqli_error($conn));
|
|
}
|
|
|
|
|
|
if($data==null)
|
|
{
|
|
$data['status'] = 200;
|
|
$data['message'] = "Data not found!";
|
|
}
|
|
echo json_encode($data);
|
|
?>
|