| Server IP : 104.21.21.239 / Your IP : 216.73.217.73 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/rpt/ |
Upload File : |
<?php include('mod/_mod_security.php'); ?>
<?php
$sql = "SELECT e.event_name, e.event_date_time, c.first_name, c.last_name, c.title, h.hotel_name, ec.nbr_of_guests, ec.guest_name, c.cell_phone, c.primary_email, IF(ec.conf_".nz(trim($_GET['venue']),'0')." = 1,'Y','') AS conf, ec.rsvp_date_time AS online_rsvp_date_time ".
"FROM concierges c INNER JOIN events_concierges ec ON c.concierge_id = ec.concierge_id INNER JOIN events e ON ec.event_id = e.event_id LEFT OUTER JOIN hotels h ON c.hotel_id = h.hotel_id ".
"WHERE ec.event_id = ".nz(trim($_GET['eid']),'0')." AND ec.rsvp_".nz(trim($_GET['venue']),'0')." = 1 ".
"ORDER BY first_name, last_name ";
//echo " === ".$sql." === ";
$result = $db->query($sql) or die('Database Error!');
$margin_left = 0.5;
$margin_right = 0.5;
$margin_top = 1.0;
$margin_bottom = 0.75;
$margin_header = 0.5;
$margin_footer = 0.5;
if ($_GET['fmt'] == 'excel') :
echo '<script>';
echo "window.location.href = 'ajax.php?call=_export_excel&sql=".urlencode(sys_encrypt(sys_compress($sql), $_SESSION['rand_key']))."';";
echo '</script>';
elseif ($_GET['fmt'] == 'pdf') :
$mpdf = new \Mpdf\Mpdf([
'format' => 'Letter-L',
'margin_left' => $margin_left * 25.4,
'margin_right' => $margin_right * 25.4,
'margin_top' => $margin_top * 25.4,
'margin_bottom' => $margin_bottom * 25.4,
'margin_header' => $margin_header * 25.4,
'margin_footer' => $margin_footer * 25.4,
]);
$mpdf->debug = false;
$mpdf->keep_table_proportions = true;
$mpdf->SetProtection(array('copy','print'));
$mpdf->SetTitle("Master Hotel Database - Report");
$mpdf->SetAuthor("Davler Media Group");
$mpdf->SetHTMLHeader('<table width="100%" style="vertical-align: bottom; font-size: 10pt; color: #000000;"><tr>'.
'<td width="30%" style="text-align: left;">Concierge Registration List</td>'.
'<td width="40%" style="text-align: center;">'.get_event_field(nz(trim($_GET['eid']),'0'),'event_name').'</td>'.
'<td width="30%" style="text-align: right;">'.nzdate_display_datetime(get_event_field(nz(trim($_GET['eid']),'0'),'event_date_time')).'</td>'.
'</tr></table><br /><br />');
$mpdf->SetHTMLFooter('<table width="100%" style="vertical-align: bottom; font-family: serif; font-size: 8pt; color: #000000; font-weight: bold; font-style: italic;"><tr>'.
'<td width="33%"><span style="font-weight: bold; font-style: italic;">{DATE m/j/Y}</span></td>'.
'<td width="33%" align="center" style="font-weight: bold; font-style: italic;">Page {PAGENO} of {nbpg}</td>'.
'<td width="33%" style="text-align: right; ">Davler Media Group</td>'.
'</tr></table>');
$mpdf->SetDisplayMode('fullpage');
$html = '<html><body style="font-family: Arial; font-size: 11pt; line-height: 12pt; ">';
$html .= '<table width="100%" style="vertical-align: top; text-align:left; font-size: 11pt; color: #000000; font-weight: normal; border-collapse:collapse;">';
$html .= '<thead style="font-weight:bold;"><tr>';
$html .= '<td style="border:1px solid #000000;" width="13%" align="center">First Name</td>';
$html .= '<td style="border:1px solid #000000;" width="18%" align="center">Last Name</td>';
$html .= '<td style="border:1px solid #000000;" width="35%" align="center">Hotel Name</td>';
$html .= '<td style="border:1px solid #000000;" width="7%" align="center"># of Guests</td>';
$html .= '<td style="border:1px solid #000000;" width="12%" align="center">Guest Name</td>';
$html .= '<td style="border:1px solid #000000;" width="5%" align="center">Conf</td>';
$html .= '<td style="border:1px solid #000000;" width="10%" align="center">RSVP Date</td>';
$html .= '</tr></thead><tbody>';
$total_guests = 0;
while($row = $result->fetch(PDO::FETCH_OBJ)) :
$html .= '<tr>';
$html .= '<td style="border:1px solid #000000;">'.$row->first_name.'</td>';
$html .= '<td style="border:1px solid #000000;">'.$row->last_name.'</td>';
$html .= '<td style="border:1px solid #000000;">'.$row->hotel_name.'</td>';
$html .= '<td style="border:1px solid #000000;" align="right">'.$row->nbr_of_guests.'</td>';
$html .= '<td style="border:1px solid #000000;">'.$row->guest_name.'</td>';
$html .= '<td style="border:1px solid #000000;" align="center">'.$row->conf.'</td>';
$html .= '<td style="border:1px solid #000000;">'.$row->online_rsvp_date_time.'</td>';
$html .= '</tr>';
$total_guests = $total_guests + $row->nbr_of_guests;
endwhile;
$html .= '<tr><td colspan="4" align="right">'.$total_guests.'</td></tr>';
$html .= '</tbody></table>';
/*
*/
$html .= '</body></html>';
$html = utf8_encode($html);
$mpdf->WriteHTML($html);
$mpdf->Output();
endif;
?>