| Server IP : 104.21.21.239 / Your IP : 216.73.216.11 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/classes/ |
Upload File : |
<?php
class lcs_db_report_html extends lcs_db_report_base implements report_interface {
protected $html = '';
public function __construct() {
}
public function report_start()
{
$this->html .= '<html><head><title>Master Hotel Database Report</title>';
$this->html .= '<link rel="stylesheet" href="'.APP_BASE_SECURE.'css/main.css?ver='.filemtime(APP_ROOT_DIR.'/css/main.css').'" type="text/css" >';
$this->html .= '<link rel="stylesheet" href="'.APP_BASE_SECURE.'css/report.css?ver='.filemtime(APP_ROOT_DIR.'/css/report.css').'" type="text/css" >';
if ($_POST['orientation'] == 'L') :
$this->html .= '<style>';
$this->html .= 'table {width:10in!important;}';
$this->html .= '</style>';
endif;
$this->html .= '</head><body>';
$this->html .= '<center><input type="button" value="Print" onClick="window.print();" class="noprint" style="margin-bottom:10px;"></center>';
$this->html .= '<table>';
}
public function report_end()
{
$this->html .= '</table></body></html>';
}
public function header_start()
{
$this->html .= '<thead>';
$this->html .= '<tr class="page_header">';
$this->html .= '<td colspan="99">';
$this->html .= '<div style="width:33%; float:left; font-size:12px; font-style:italic; text-align:left;" >';
$this->html .= 'Davler Media Group';
$this->html .= '</div>';
$this->html .= '<div style="width:34%; float:left; font-size:12px; font-style:italic; text-align:center;" >Master Hotel Database</div>';
$this->html .= '<div style="width:33%; float:left; font-size:12px; font-style:italic; text-align:right;" >';
$this->html .= 'Date: '.date('m/d/Y');
$this->html .= '</div>';
$this->html .= '</td>';
$this->html .= '</tr>';
$this->html .= '<tr class="page_header"><td colspan="99"> </td></tr>';
$this->html .= '<tr class="page_header"><td colspan="99" align="center" style="font-size:20px;">'.htmlspecialchars($this->get_report_title()).'</td></tr>';
$this->html .= '<tr class="page_header"><td colspan="99"> </td></tr>';
}
public function header_end()
{
$this->html .= '</thead>';
}
public function header_row_start()
{
$this->html .= '<tr>';
}
public function header_row_end()
{
$this->html .= '</tr>';
}
public function header_cell_add($data = '', $args = [])
{
$attr = '';
foreach ($args as $key => $value) :
if (strtolower($key) == 'width') :
$attr .= ' style="width: ' . $value . 'px;"';
else :
$attr .= ' '.$key.'="'.$value.'"';
endif;
endforeach;
$this->html .= '<th '.$attr.' >'.$data.'</th>';
}
public function footer_start()
{
$this->html .= '<tfoot>';
}
public function footer_end()
{
$this->html .= '<tr class="page_header"><td colspan="99"> </td></tr>';
$this->html .= '<tr class="page_header"><td colspan="99">';
$this->html .= '<div style="width:33%; float:left; font-size:12px; font-style:italic; text-align:left;" >'.date('m/d/Y').'</div>';
$this->html .= '<div style="width:33%; float:left; font-size:12px; font-style:italic; text-align:center;" > </div>';
$this->html .= '<div style="width:33%; float:left; font-size:12px; font-style:italic; text-align:right;" >';
$this->html .= 'User: '.$_SESSION['user_full_name'];
$this->html .= '</div></td></tr>';
$this->html .= '</tfoot>';
}
public function footer_row_start()
{
$this->html .= '<tr>';
}
public function footer_row_end()
{
$this->html .= '</tr>';
}
public function footer_cell_add($data = '', $args = [])
{
$attr = '';
foreach ($args as $key => $value) :
$attr .= ' '.$key.'="'.$value.'"';
endforeach;
$this->html .= '<td '.$attr.' >'.$data.'</td>';
}
public function data_start()
{
$this->html .= '<tbody>';
}
public function data_end()
{
$this->html .= '</tbody>';
}
public function data_row_start()
{
$this->html .= '<tr>';
}
public function data_row_end()
{
$this->html .= '</tr>';
}
public function data_cell_add($data = '', $args = [])
{
$attr = '';
foreach ($args as $key => $value) :
$attr .= ' '.$key.'="'.$value.'"';
endforeach;
$this->html .= '<td '.$attr.' >'.$data.'</td>';
}
public function output_report($filename = '')
{
echo $this->html;
}
}