403Webshell
Server IP : 172.67.201.108  /  Your IP : 216.73.216.76
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 :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/hotel-dev/public_html/rpt/distribution_city_guide.php
<?php include('mod/_mod_security.php'); ?>
<?php
	$filter_route = '';
	if ($_GET['route_type'] != '0') :
		$filter_route = " AND r.route_type = ".nz(trim($_GET['route_type']), '0')." ";
	endif;
	$sql = "SELECT description from products WHERE active = 1 AND product_id = ".nz($_GET['product_id'], '0');
	$result_product = $db->query($sql) or die('Database Error!');
	if ($row_product = $result_product->fetch(PDO::FETCH_OBJ)) :
		$product_name = $row_product->description;
	endif;
	$sql = "SELECT r.route_code, h.sequence_nbr, h.hotel_name, h.zip, h.nbr_of_rooms, p.description, hp.drop_location, hp.dist_qty, h.bldg_nbr, h.street, h.delivery_address, h.cross_street, hp.instructions, h.concierge_phone, r.route_type, v.create_date AS verification_date ".
			"FROM products p INNER JOIN hotels_products hp ON (p.product_id = hp.product_id) INNER JOIN hotels h ON (hp.hotel_id = h.hotel_id) LEFT OUTER JOIN routes r ON h.route_id = r.route_id ".
			"LEFT OUTER JOIN verifications v ON (v.hotel_id = h.hotel_id AND v.create_date = (SELECT MAX(create_date) FROM verifications v2 WHERE v2.hotel_id = v.hotel_id)) ".
			"WHERE p.active = 1 AND hp.active = 1 AND h.status = 1 AND p.product_id = ".nz($_GET['product_id'], '0')." ".$filter_route." ".
			"ORDER BY r.route_code, h.sequence_nbr, h.hotel_name, hp.drop_location ";
	//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['route_type'] == '1') :
		$route_type = 'Nighttime Route';
	elseif ($_GET['route_type'] == '2'):
		$route_type = 'Daytime Route';
	elseif ($_GET['route_type'] == '0'):
		$route_type = 'All Routes';
	endif;
	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: top; font-size: 16pt; color: #000000;"><tr>'.
							'<td width="50%" style="text-align: left;" >'.$product_name.' Distribution</td>'.
							'<td width="50%" style="text-align: right;" >'.$route_type.'</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: 8pt; line-height: 8pt; ">';
		$html .= '<table width="100%" style="vertical-align: top; text-align:left; font-size: 8pt; color: #000000; font-weight: normal; border-collapse:collapse;">';
		$html .= '<thead style="font-weight:bold;"><tr>';
		$html .= '<td style="border:1px solid #000000;" width="4%" align="center">Route</td>';
		$html .= '<td style="border:1px solid #000000;" width="4%" align="center">Seq #</td>';
		$html .= '<td style="border:1px solid #000000;" width="16%" align="center">Hotel Name</td>';
		$html .= '<td style="border:1px solid #000000;" width="5%" align="center">Zip</td>';
		$html .= '<td style="border:1px solid #000000;" width="9%" align="center">Drop Loc.</td>';
		$html .= '<td style="border:1px solid #000000;" width="5%" align="center">Quantity</td>';
		$html .= '<td style="border:1px solid #000000;" width="5%" align="center">BLDG #</td>';
		$html .= '<td style="border:1px solid #000000;" width="13%" align="center">Street</td>';
		$html .= '<td style="border:1px solid #000000;" width="13%" align="center">Delivery Address</td>';
		$html .= '<td style="border:1px solid #000000;" width="13%" align="center">Cross Street</td>';
		$html .= '<td style="border:1px solid #000000;" width="13%" align="center">Delivery Instructions</td>';
		$html .= '<td style="border:1px solid #000000;" width="9%" align="center">Concierge Phone</td>';
		$html .= '</tr></thead><tbody>';
		while($row = $result->fetch(PDO::FETCH_OBJ)) :
			$html .= '<tr>';
			$html .= '<td style="border:1px solid #000000;">'.$row->route_code.'</td>';
			$html .= '<td style="border:1px solid #000000;">'.$row->sequence_nbr.'</td>';
			$html .= '<td style="border:1px solid #000000;">'.$row->hotel_name.'</td>';
			$html .= '<td style="border:1px solid #000000;">'.$row->zip.'</td>';
			$html .= '<td style="border:1px solid #000000;">'.$row->drop_location.'</td>';
			$html .= '<td style="border:1px solid #000000;" align="right">'.$row->dist_qty.'</td>';
			$html .= '<td style="border:1px solid #000000;">'.$row->bldg_nbr.'</td>';
			$html .= '<td style="border:1px solid #000000;">'.$row->street.'</td>';
			$html .= '<td style="border:1px solid #000000;">'.$row->delivery_address.'</td>';
			$html .= '<td style="border:1px solid #000000;">'.$row->cross_street.'</td>';
			$html .= '<td style="border:1px solid #000000;">'.$row->city_guide_instructions.'</td>';
			$html .= '<td style="border:1px solid #000000;">'.$row->concierge_phone.'</td>';
			$html .= '</tr>';
		endwhile;
		$html .= '</tbody></table>';
		$html .= '</body></html>';
		$html = utf8_encode($html);
		$mpdf->WriteHTML($html);
		$mpdf->Output(); 
	endif;
?>

Youez - 2016 - github.com/yon3zu
LinuXploit