query($Query); $flag="sucess"; } $total_file=$_REQUEST['date']; $pieces = explode(",", $total_file); $total_file=count($pieces); for($i = 0; $i < $total_file; $i++) { $new_d=$pieces[$i]; date_default_timezone_set('Asia/Kolkata'); $date_ss = date('Y-m-d H:i:s ', time()); $tablename = "`tbl_doctor_visit`"; $new_d = date("Y-m-d", strtotime($new_d)); //$date=trim(addslashes($_REQUEST['date'])); $date = date("Y-m-d", strtotime($new_d)); if ($_REQUEST["form_action"] == "Insert") { $Query_last_invoice = "SELECT visit_date from tbl_doctor_visit where (visit_date='".$date."' ) "; $name_last_invoice=$DB->query($Query_last_invoice); $noo=mysql_num_rows($name_last_invoice); /*if($noo==0) {*/ $Query = "insert into $tablename values( NULL,'". $place . "','". $date . "','". $reason_from_hour . "','". $reason_from_min . "','". $reason_from_am . "','". $reason_to_hour . "','" . $reason_to_min . "','" . $reason_to_am."','". $reason_from_hour_1 . "','". $reason_from_min_1 . "','". $reason_from_am_1 . "','". $reason_to_hour_1 . "','" . $reason_to_min_2 . "','" . $reason_to_am_2."', '".$address ."','".$contact_no."','0')"; $DB->query($Query); $flag="sucess"; /*}*/ /* else { $flag="failure"; }*/ } } } date_default_timezone_set("Asia/Kolkata"); $tablename='tbl_job_details'; if ($update_option == 1) { $id=$_REQUEST['id']; $Query_last_data = "SELECT * from tbl_doctor_visit where id='$id' "; $name_last_data=$DB->query($Query_last_data); $row_12_123=mysql_fetch_array($name_last_data); $datea=$row_12_123['visit_date']; $place=$row_12_123['place']; $address=$row_12_123['address']; $from_hour=$row_12_123['time_am']; $from_min=$row_12_123['time_am_1']; $from_sta=$row_12_123['time_am_2']; $to_hour=$row_12_123['time_pm']; $to_min=$row_12_123['time_pm_1']; $to_sta=$row_12_123['time_pm_2']; $from_hour_1=$row_12_123['time_am_from']; $from_min_1=$row_12_123['time_am_1_from']; $from_sta_1=$row_12_123['time_am_2_from']; $to_hour_1=$row_12_123['time_pm_from']; $to_min_2=$row_12_123['time_pm_1_from']; $to_sta_2=$row_12_123['time_pm_2_from']; $contact_no=$row_12_123['contact_no']; $app_date = date("m/d/Y", strtotime($datea)); } ?>
Success! Data Added Sucessfully.
Danger! Already Exists.

Add Doctor Visit

- -
- -
- -
- -
'; echo''; echo''; } else { echo''; echo''; } ?>
0) { ?>