File manager - Edit - /home/autoph/public_html/portal/checkin-window.php
Back
<?php include 'core/init.php'; $compCode =$user_data['company_assignment']; $user = $user_data['u_name']; $page = $_SERVER['PHP_SELF']; $searchname = $_GET['searchname']; $getActiveWindow=$_GET['view']; $sec = "60"; header("Refresh: $sec; url=$page?view=$getActiveWindow&searchname=$searchname"); echo "<a href='checkin-window.php?view=in'> <input type='button' name='CheckIn' value='Check-In' style='width:100px;height:30px;font-size:14px;font-weight:bold;color:blue'></a> <a href='checkin-window.php?view=wait'><input type='button' name='WaitingArea' value='Waiting Area' style='width:100px;height:30px;font-size:14px;font-weight:bold;color:blue'></a> <a href='checkin-window.php?view=chk'><input type='button' name='ArrivalArea' value='Arrival Area' style='width:100px;height:30px;font-size:14px;font-weight:bold;color:blue'></a> <a href='checkin-window.php?view=on'><input type='button' name='OnGoing' value='On-Going Session' style='width:150px;height:30px;font-size:14px;font-weight:bold;color:blue'></a> <a href='checkin-window.php?view=out'><input type='button' name='NurseStation' value='Check-Out' style='width:100px;height:30px;font-size:14px;font-weight:bold;color:blue'></a> <a href='logout.php'><input type='button' name='logout' value='Logout' style='width:100px;height:30px;font-size:14px;font-weight:bold;color:red'></a>"; switch($getActiveWindow){ case 'wait': echo " <b style='font-size:18px;color:red'>WAITING AREA</b>"; break; case 'in': echo " <b style='font-size:18px;color:red'>CHECK-IN</b>"; break; case 'out': echo " <b style='font-size:18px;color:red'>CHECK-OUT</b>"; break; case 'on': echo " <b style='font-size:18px;color:red'>ON-GOING SESSION</b>"; break; case 'chk': echo " <b style='font-size:18px;color:red'>ARRIVAL AREA</b>"; break; } //===================================================== if(isset($_GET['action'])){ $getID = $_GET['hid']; //mysql_query("UPDATE `patient_list` SET `status` = 'In' WHERE `patient_id`='$getID'"); mysql_query("UPDATE `patient_list` SET `status` = 'In' WHERE `patient_id`='$getID'"); $sql="INSERT INTO `in_out` (`log_id`, `patient_id`, `log_date`, `log_time`, `trans_type`, `log_by`, `branch_code`,`notes`) VALUES('','$getID','$toDate','$currentTime','In','$user','$compCode','Check-In')"; if(!mysql_query($sql)){ die('Error: ' . mysql_error()); } echo " <center><div style='position:absolute;width:550px;height:150px;left:250px;top:200px;border:5px solid lightgray;border-radius:5px;background:white'><table> <tr> <td align='center' style='font-size:14px;font-weight:bold;color:red;width:500px;height:140px;background:white;border:1px solid white'> <br> Check-In Request has been confirmed. <br><br>Thank you!</font> <br> <br> <a href='mainindex.php?view=checkin'><br> <input style='background-color:#E5E4E2;border:1px black solid;border-radius:5px;width:120px;height:30px;color:black;font-size:16px;font-weight:bold;'type ='button' name ='edit' value = 'Close'> </a> <br><br> </td> </tr> </table></div></center>"; } switch($getActiveWindow){ case 'chk': //============================================================================================================== echo "<div style='width:100%;height:100%;border:2px solid lightgray;border-radius:5px;background:#F2F2F2;'>"; echo "<table style='width:100%;border-collapse:collapse:height:100%;background:white'>"; $searchname=$_GET['searchname']; //echo $searchname; echo "<tr>"; echo "<td valign='TOP' style='border:1px solid white;font-size:14px;weight:bold;color:gray;background:white'>"; $qq=mysql_query("SELECT * FROM `patient_list` WHERE `status`='In' AND `branch_code`='$compCode' ORDER by `time_last_in` ASC"); echo "<table style='width:100%; height:95% border:1px solid white; border-collapse:collapse;'>"; echo "<tr> <th class='Gradient' style='text-align:center;width:40px;background:lightgray;border:1px solid gray;font-size:18px;height:25px'>REC.NO</th> <th class='Gradient' align='center' style='width:150px;background:lightgray;border:1px solid gray;font-size:18px'>First Name</th> <th class='Gradient' align='center' style='width:150px;background:lightgray;border:1px solid gray;font-size:18px'>Last Name</th> <th class='Gradient' align='center' style='width:100px;background:lightgray;border:1px solid gray;font-size:18px'>Date IN</th> <th class='Gradient' align='center' style='width:50px;background:lightgray;border:1px solid gray;font-size:18px'>Time IN</th> <th class='Gradient' align='center' style='width:50px;background:lightgray;border:1px solid gray;font-size:18px'>Status</th> </tr>"; while($row = mysql_fetch_array($qq)){ $ptID = $row['index_patient_id']; echo "<tr>"; echo "<td style='font-size:18px;border:1px solid lightgray;text-align:center;width:40px;height:25px'>" . $row['patient_id'] . "</td>"; echo "<td style='font-size:18px;border:1px solid lightgray;text-align:left;width:100px;height:25px'>" . $row['patient_fname'] . "</td>"; echo "<td style='font-size:18px;border:1px solid lightgray;text-align:left;width:150px;height:25px'>" . $row['patient_lname'] . "</td>"; echo "<td style='font-size:18px;border:1px solid lightgray;text-align:center;width:150px;height:25px'>" . $row['date_last_in'] . "</td>"; echo "<td style='font-size:18px;border:1px solid lightgray;text-align:center;width:100px;height:25px'>" . $row['time_last_in']. "</td>"; echo "<td style='font-size:18px;color:red;border:1px solid lightgray;text-align:center;width:150px;height:25px'>" . $row['status'] . "</td>"; echo "</tr>"; } echo "</table>"; echo "</td>"; echo "</tr>"; echo "</table>"; echo "</div>"; break; case 'in': //============================================================================================================== echo "<div style='width:100%;height:100%;border:2px solid lightgray;border-radius:5px;background:#F2F2F2;'>"; echo "<table style='width:100%;border-collapse:collapse:height:100%;background:white'>"; echo "<tr>"; echo "<td valign='TOP' style='border:1px solid white;font-size:14px;weight:bold;color:gray;height:40px;background:white'> <form action='' method='GET'> <input type='hidden' name='view' value='in'> <center> <br> <table style='width:90%;background:white;border:1px solid #fff;border-collapse:collapse'> <tr> <td valign='bottom' style='width:400px;height:40px;background:white;border:1px solid white'> <center><b style='font-size:20px;color:blue'>Search Patient:</b> <input type='text' name='searchname' value='' style='text-align:center;width:300px;height:30px;font-size:20px;font-weight:bold;color:blue;border:1px solid gray;border-radius:5px;background:white' placeholder='Last name' required> <input type='submit' name='lookup' value='Search...' style='width:100px;height:30px;font-size:16px;font-weight:bold;color:red;border:1px solid blue;border-radius:5px;'> </center></td> </tr> </table> </center> </form> </td>"; echo "</tr>"; if(!empty($_GET['searchname'])){ $searchname=$_GET['searchname']; //echo $searchname; echo "<tr>"; echo "<td valign='TOP' style='border:1px solid white;font-size:14px;weight:bold;color:gray;background:white'>"; $q=mysql_query("SELECT * FROM `patient_list` WHERE `patient_lname` LIKE '%$searchname%' AND `status`='OUT' AND `branch_code`='$compCode'"); $row=mysql_fetch_array($q); $total=mysql_num_rows($q); $dis=20; $total_page=ceil($total/$dis); $page_cur=(isset($_GET['page']))?$_GET['page']:1; $k=($page_cur-1)*$dis; $page_cur = mysql_real_escape_string($page_cur); $qq=mysql_query("SELECT * FROM `patient_list` WHERE `patient_lname` LIKE '%$searchname%' AND `status`='OUT' AND `branch_code`='$compCode' ORDER by `patient_id` ASC"); echo "<table style='width:100%; height:95% border:1px solid white; border-collapse:collapse;'>"; echo "<tr> <th class='Gradient' style='text-align:center;width:40px;background:lightgray;border:1px solid gray;font-size:18px;height:25px'>REC.NO</th> <th class='Gradient' align='center' style='width:150px;background:lightgray;border:1px solid gray;font-size:18px'>First Name</th> <th class='Gradient' align='center' style='width:100px;background:lightgray;border:1px solid gray;font-size:18px'>Middle Name</th> <th class='Gradient' align='center' style='width:150px;background:lightgray;border:1px solid gray;font-size:18px'>Last Name</th> <th class='Gradient' align='center' style='width:100px;background:lightgray;border:1px solid gray;font-size:18px'>Birth Date</th> <th class='Gradient' align='center' style='width:50px;background:lightgray;border:1px solid gray;font-size:18px'>Gender</th> <th class='Gradient' align='center' style='width:50px;background:lightgray;border:1px solid gray;font-size:18px'>Status</th> <th class='Gradient' align='center' style='width:50px;background:lightgray;border:1px solid gray;font-size:18px'> - </th> </tr>"; while($row = mysql_fetch_array($qq)){ $ptID = $row['index_patient_id']; echo "<tr>"; echo "<td style='font-size:18px;border:1px solid lightgray;text-align:center;width:40px;height:25px'>" . $row['patient_id'] . "</td>"; echo "<td style='font-size:18px;border:1px solid lightgray;text-align:left;width:100px;height:25px'>" . $row['patient_fname'] . "</td>"; echo "<td style='font-size:18px;border:1px solid lightgray;text-align:left;width:150px;height:25px'>" . $row['patient_mname'] . "</td>"; echo "<td style='font-size:18px;border:1px solid lightgray;text-align:left;width:150px;height:25px'>" . $row['patient_lname'] . "</td>"; echo "<td style='font-size:18px;border:1px solid lightgray;text-align:center;width:150px;height:25px'>" . $row['patient_bday'] . "</td>"; echo "<td style='font-size:18px;border:1px solid lightgray;text-align:center;width:100px;height:25px'>" . $row['patient_sex']. "</td>"; echo "<td style='font-size:18px;color:red;border:1px solid lightgray;text-align:center;width:150px;height:25px'>" . $row['patient_status'] . "</td>"; echo "<td style='font-size:18px;border:1px solid lightgray;text-align:center;width:100px;height:30px'> "; echo "<a href='mainindex.php?view=checkin&action=confirm&hid=".$row['patient_id']."'><input type='button' name='gocheckin' value='Check-In' style='background:#A9F5A9;width:80px;height:25px;border:1px solid gray;font-size:14px;border-radius:5px'></a>"; echo "</td>"; echo "</tr>"; } echo "</table>"; echo "</td>"; echo "</tr>"; } echo "</table>"; echo "</div>"; break; case 'wait': //============================================================================================================== echo "<div style='width:100%;height:100%;border:2px solid lightgray;border-radius:5px;background:#F2F2F2;'>"; echo "<table style='width:100%;border-collapse:collapse:height:100%;background:white'>"; echo "<tr>"; echo "<td valign='TOP' style='border:1px solid white;font-size:14px;weight:bold;color:gray;background:white'>"; $q=mysql_query("SELECT * FROM `treatment_session` WHERE `session_status`='Waiting' AND `branch_code`='$compCode' ORDER by `session_lname` ASC"); $row=mysql_fetch_array($q); $total=mysql_num_rows($q); $dis=20; $total_page=ceil($total/$dis); $page_cur=(isset($_GET['page']))?$_GET['page']:1; $k=($page_cur-1)*$dis; $page_cur = mysql_real_escape_string($page_cur); $qq=mysql_query("SELECT * FROM `treatment_session` WHERE `session_status`='Waiting' AND `branch_code`='$compCode' ORDER by `session_lname` ASC"); echo "<table style='width:100%; height:95% border:1px solid white; border-collapse:collapse;'>"; echo "<tr> <th class='Gradient' style='text-align:center;width:40px;background:lightgray;border:1px solid gray;font-size:18px;height:25px'>REC.NO</th> <th class='Gradient' align='center' style='width:150px;background:lightgray;border:1px solid gray;font-size:18px'>First Name</th> <th class='Gradient' align='center' style='width:100px;background:lightgray;border:1px solid gray;font-size:18px'>Middle Name</th> <th class='Gradient' align='center' style='width:150px;background:lightgray;border:1px solid gray;font-size:18px'>Last Name</th> <th class='Gradient' align='center' style='width:50px;background:lightgray;border:1px solid gray;font-size:18px'>Status</th> </tr>"; while($row = mysql_fetch_array($qq)){ $ptID = $row['session_patient_id']; echo "<tr>"; echo "<td style='font-size:18px;border:1px solid lightgray;text-align:center;width:40px;height:25px'>" . $row['session_patient_id'] . "</td>"; echo "<td style='font-size:18px;border:1px solid lightgray;text-align:left;width:100px;height:25px'>" . $row['session_fname'] . "</td>"; echo "<td style='font-size:18px;border:1px solid lightgray;text-align:left;width:150px;height:25px'>" . $row['session_mname'] . "</td>"; echo "<td style='font-size:18px;border:1px solid lightgray;text-align:left;width:150px;height:25px'>" . $row['session_lname'] . "</td>"; echo "<td style='font-size:18px;color:red;border:1px solid lightgray;text-align:center;width:150px;height:25px'>" . $row['session_status'] . "</td>"; echo "</tr>"; } echo "</table>"; echo "</td>"; echo "</tr>"; echo "</table>"; echo "</div>"; break; case 'on': //============================================================================================================== echo "<div style='width:100%;height:100%;border:2px solid lightgray;border-radius:5px;background:#F2F2F2;'>"; echo "<table style='width:100%;border-collapse:collapse:height:100%;background:white'>"; echo "<tr>"; echo "<td valign='TOP' style='border:1px solid white;font-size:14px;weight:bold;color:gray;background:white'>"; $qq=mysql_query("SELECT * FROM `treatment_session` WHERE `session_status`='On-Going' AND `branch_code`='$compCode' ORDER by `session_lname` ASC"); //$qq=mysql_query("SELECT * FROM `treatment_session` WHERE `session_status`='On-Going' AND `branch_code`='$compCode' ORDER by `session_lname` ASC"); echo "<table style='width:100%; height:95% border:1px solid white; border-collapse:collapse;'>"; echo "<tr> <th class='Gradient' style='text-align:center;width:80px;background:#f5f5f5;border:1px solid gray;font-size:18px;height:25px'>Trans I.D</th> <th class='Gradient' style='text-align:center;width:80px;background:#f5f5f5;border:1px solid gray;font-size:18px;height:25px'>Patient I.D</th> <th class='Gradient' align='left' style='width:200px;background:#f5f5f5;border:1px solid gray;font-size:18px'>First Name</th> <th class='Gradient' align='left' style='width:200px;background:#f5f5f5;border:1px solid gray;font-size:18px'>Last Name</th> <th class='Gradient' align='center' style='width:50px;background:#f5f5f5;border:1px solid gray;font-size:18px'>Start Date</th> <th class='Gradient' align='center' style='width:50px;background:#f5f5f5;border:1px solid gray;font-size:18px'>Start Time</th> <th class='Gradient' align='center' style='width:50px;background:#f5f5f5;border:1px solid gray;font-size:18px'>End Time</th> </tr>"; while($row = mysql_fetch_array($qq)){ echo "<tr>"; echo "<td style='font-size:18px;border:1px solid lightgray;text-align:center;width:40px;height:25px'>" . $row['session_header_id'] . "</td>"; echo "<td style='font-size:18px;border:1px solid lightgray;text-align:center;width:40px;height:25px'>" . $row['session_patient_id'] . "</td>"; echo "<td style='font-size:18px;border:1px solid lightgray;text-align:left;width:150px;height:25px'>" . $row['session_fname'] . "</td>"; echo "<td style='font-size:18px;border:1px solid lightgray;text-align:left;width:150px;height:25px'>" . $row['session_lname'] . "</td>"; echo "<td style='font-size:18px;border:1px solid lightgray;text-align:center;width:50px;height:25px'>" . $row['session_date_started'] . "</td>"; echo "<td style='font-size:18px;border:1px solid lightgray;text-align:center;width:80px;height:25px'>" . $row['session_time_started'] . "</td>"; echo "<td style='font-size:18px;border:1px solid lightgray;text-align:center;width:80px;height:25px'>" . $row['session_time_ended'] . "</td>"; echo "</tr>"; } echo "</table>"; echo "</td>"; echo "</tr>"; echo "</table>"; echo "</div>"; break; case 'out': $searchname=$_GET['searchname']; if(isset($_GET['searchname'])){ $searchname = $_GET['searchname']; $q=mysql_query("SELECT * FROM `treatment_session` WHERE `session_status`='Cleared' AND `session_lname` LIKE '%$searchname%' AND `branch_code`='$comCode'"); $row=mysql_fetch_array($q); $total=mysql_num_rows($q); $dis=20; $total_page=ceil($total/$dis); $page_cur=(isset($_GET['page']))?$_GET['page']:1; $k=($page_cur-1)*$dis; $page_cur = mysql_real_escape_string($page_cur); $qq=mysql_query("SELECT * FROM `treatment_session` WHERE `session_status`='Cleared' AND `session_lname` LIKE '%$searchname%' AND `branch_code`='$comCode' ORDER by `session_id` ASC"); }else{ $q=mysql_query("SELECT * FROM `treatment_session` WHERE `session_status`='Cleared' AND `branch_code`='$comCode'"); $row=mysql_fetch_array($q); $total=mysql_num_rows($q); $dis=20; $total_page=ceil($total/$dis); $page_cur=(isset($_GET['page']))?$_GET['page']:1; $k=($page_cur-1)*$dis; $page_cur = mysql_real_escape_string($page_cur); $qq=mysql_query("SELECT * FROM `treatment_session` WHERE `session_status`='Cleared' || `session_status`='Cancelled' || `session_status`='Deferred' AND `branch_code`='$comCode' ORDER by `session_id` ASC"); } echo "<table style='width:100%; height:95% border:1px solid white; border-collapse:collapse;'>"; echo "<tr> <th class='Gradient' style='text-align:center;width:40px;background:lightgray;border:1px solid gray;font-size:18px;height:25px'>REC.NO</th> <th class='Gradient' align='center' style='width:100px;background:lightgray;border:1px solid gray;font-size:18px'>Transaction Number</th> <th class='Gradient' align='center' style='width:150px;background:lightgray;border:1px solid gray;font-size:18px'>First Name</th> <th class='Gradient' align='center' style='width:150px;background:lightgray;border:1px solid gray;font-size:18px'>Last Name</th> <th class='Gradient' align='center' style='width:50px;background:lightgray;border:1px solid gray;font-size:18px'>Gender</th> <th class='Gradient' align='center' style='width:50px;background:lightgray;border:1px solid gray;font-size:18px'>Status</th> <th class='Gradient' align='center' style='width:50px;background:lightgray;border:1px solid gray;font-size:18px'> - </th> </tr>"; while($row = mysql_fetch_array($qq)){ $ptID = $row['session_patient_id']; $gender = mysql_result(mysql_query("SELECT `patient_sex` FROM `patient_list` WHERE `patient_id`='$ptID'"),0); echo "<tr>"; echo "<td style='font-size:18px;border:1px solid lightgray;text-align:center;width:40px;height:25px'>" . $row['session_id'] . "</td>"; echo "<td style='font-size:18px;border:1px solid lightgray;text-align:center;width:100px;height:25px'>" . $row['session_header_id'] . "</td>"; echo "<td style='font-size:18px;border:1px solid lightgray;text-align:left;width:150px;height:25px'>" . $row['session_fname'] . "</td>"; echo "<td style='font-size:18px;border:1px solid lightgray;text-align:left;width:150px;height:25px'>" . $row['session_lname'] . "</td>"; echo "<td style='font-size:18px;border:1px solid lightgray;text-align:center;width:150px;height:25px'>" . $gender . "</td>"; echo "<td style='font-size:18px;border:1px solid lightgray;text-align:center;width:100px;height:25px'>" . $row['session_status']. "</td>"; echo "<td style='font-size:18px;border:1px solid lightgray;text-align:center;width:100px;height:25px'><a href='mainindex.php?view=checkout&action=checkout&transID=".$row['session_id']."&pID=".$ptID."&status=".$row['session_status']."'> <input type='button' name='checkout' value='Check-Out' style='background:#A9F5A9;width:80px;height:25px;border:1px solid #FF4000;font-size:14px;border-radius:5px'></a>"; echo "</td>"; echo "</tr>"; } echo "</table>"; break; } ?>
| ver. 1.4 |
.
| PHP 7.3.33 | Generation time: 0 |
proxy
|
phpinfo
|
Settings