File manager - Edit - /home/autoph/public_html/api/aha/HR_OTList.php
Back
<?php include '../../../cfg/connhr.php'; $mykey = $_GET['keyID']; if($mykey == "TO6e59e008b5348b452X615a3033729daae383KEN"){ $employee_id = $_GET['employee_id']; $year = $_GET['year']; if($year ==""){ $myYear = date("Y"); }else{ $myYear = $year; } $sql = "SELECT * FROM `employee_overtimes` WHERE `employee_id` = $employee_id AND `date_from` LIKE '%$myYear%'"; $result = $connhr->query($sql); if ($result->num_rows > 0) { $count = 0; $rows = array(); while($row = $result->fetch_assoc()) { $count = $count + 1; $rows[] = $row; } } header('Content-Type: application/json'); echo json_encode([$rows,"count"=>"$count"]); } // Close connection $conn->close(); ?>
| ver. 1.4 |
.
| PHP 7.3.33 | Generation time: 0 |
proxy
|
phpinfo
|
Settings