ESH/audit_log_pdf.php

76 lines
2.3 KiB
PHP
Raw Normal View History

2024-10-23 18:28:06 +05:30
<?php
include('pdf_header.php');
//include('includes/config/config.php');
//include('includes/functions.php');
include('log_entry.php');
//include('pop_up_top.php');
?>
<link href="includes/css-js/admin.css" rel="stylesheet" type="text/css" />
<style>
</style>
<table width="100%">
<tr>
<div style="font-size:12px">
<td width="25%" align="left"> Run Date :
<?php echo date("d-M-Y"); ?>
</td>
<td width="50%" align="center" style="font-size:40px"><strong>AUDIT LOG</strong></td>
<td width="25%" align="left"> User :
<?php echo $username ?>
</td>
</tr>
</table>
<table width="100%" border="1px solid black">
<?php
$sql=base64_decode($filterkey);
error_log("query: ".$sql);
$result = @mysqli_query($conn,$sql);
//echo $result;
?><tr bgcolor="#eeeeee">
<th width="2%">Sr.</th>
<th width="6%">Timestamp</th>
<th width="12%">Feature Name</th>
<th width="6%">Feature Action</th>
<th width="6%">File Name</th>
<th width="6%">Modified By</th>
<th width="20%">Request Param</th>
</tr><?php
$i=0;
while($row=@mysqli_fetch_array($result)){
$id=$row['id'];
// $tdate="select DATE(created_time) from audit_log where id='".$id."'";
// $result_schedule = @mysqli_query($conn,$tdate);
// while($rows_schedule = mysqli_fetch_assoc($result_schedule)){
// $created_time=$rows_schedule['DATE(created_time)'];
// }
$user=$row['modified_by'];
$user_query="SELECT b.role_name FROM tbl_users a left join role_master b on a.role_id=b.role_id left join patient_master e on a.emp_id=e.id where a.user_id='".$user."'";
$result2=mysqli_query($conn,$user_query);
while($rows_schedule = mysqli_fetch_assoc($result2)){
$modified=$rows_schedule['role_name'];
}
$i++;
?><tr>
<td><?php echo $i?></td>
<td><?php echo date_format(date_create($row['created_time']), "d-M-Y H:i A")?></td>
<td><?php echo $row['feature_name']?></td>
<td><?php echo $row['feature_action']?></td>
<td><?php echo $row['file_name']?></td>
<td><?php echo $modified?></td>
<td><?php echo $row['request_param']?></td>
</tr><?php
}
?>
</table>
<?php
include('pdf_footer.php');
?>
<script>
</script>