| Server IP : 104.21.21.239 / Your IP : 216.73.216.25 Web Server : Apache/2.4.68 (Amazon Linux) OpenSSL/3.5.5 System : Linux ip-172-31-69-123.ec2.internal 6.1.176-223.369.amzn2023.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Jul 24 13:34:27 UTC 2026 x86_64 User : ec2-user ( 1000) PHP Version : 8.4.23 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /home/hotel-dev/public_html/mod/ |
Upload File : |
<?php include('_mod_security.php'); ?>
<?php
$sql = '';
switch ($_GET['func']):
case 'grid' :
require_once('classes/lcs_db_grid.php');
$dbg = new lcs_db_grid;
$dbg->start_header_section();
$dbg->start_header();
$dbg->add_column(array('label' => 'Timestamp', 'dbcol' => 'timestamp', 'width' => '175px'));
$dbg->add_column(array('label' => 'IP Address', 'dbcol' => 'ip', 'width' => '150px'));
$dbg->add_column(array('label' => 'Type', 'dbcol' => 'log_type', 'width' => '40px', 'align' => 'center'));
$dbg->add_column(array('label' => 'Message', 'dbcol' => 'log_text', 'width' => '250px'));
$dbg->end_header();
$dbg->end_header_section();
$sql = "SELECT * FROM log ".
"WHERE ".$dbg->search_spec()." AND user_id = ".nz($_GET['parm1'], '0')." ".
"ORDER BY ".$dbg->sort_spec();
$xls_sql = $sql;
$xls_sql_encoded = xls_sql_encrypt($xls_sql);
$result = $db->query($sql) or die('Database Error!');
$dbg->start_data_section();
if ($result->rowCount() > 0) :
while ($row = $result->fetch(PDO::FETCH_OBJ)) :
$dbg->start_row();
$dbg->add_cell($row->timestamp);
$dbg->add_cell($row->ip);
$dbg->add_cell($row->log_type);
$dbg->add_cell($row->log_text);
$dbg->end_row();
endwhile;
else :
$dbg->start_row();
$dbg->add_cell('No records found');
$dbg->end_row();
endif;
$dbg->end_data_section();
echo json_encode(array('row_count' => $result->rowCount(), 'html' => $dbg->get_html(), 'xls_sql' => $xls_sql_encoded));
return;
break;
endswitch;
?>