| Server IP : 172.67.201.108 / 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/rpt/ |
Upload File : |
<?php include('mod/_mod_security.php'); ?>
<?php
//var_dump($_GET);
switch ($_GET['cleanup_type']) :
case 'hotels' :
$sql = "SELECT CONCAT('".APP_BASE."index.php?IX=hotel_form&id=', h.hotel_id) AS link, h.hotel_id, h.hotel_name, h.bldg_nbr, h.street, h.city, h.state, h.zip, h.category, n.neighborhood_name, r.route, h.sequence_nbr, hp.dist_qty AS cg_dist_qty ".
"FROM hotels h LEFT OUTER JOIN neighborhoods n ON (h.neighborhood_id = n.neighborhood_id) ".
"LEFT OUTER JOIN routes r ON (h.route_id = r.route_id) ".
"LEFT OUTER JOIN hotels_products hp ON (h.hotel_id = hp.hotel_id AND hp.product_id = ".APP_DEFAULT_PRODUCT." AND hp.active = 1) ".
"WHERE status = 1 AND (h.category <= ' ' OR h.neighborhood_id < 1 OR h.route_id < 1 OR h.sequence_nbr < 1 OR hp.dist_qty < 1) ORDER BY hotel_name";
break;
case 'concierges' :
$sql = "SELECT CONCAT('".APP_BASE."index.php?IX=concierge_form&id=', c.concierge_id) AS link, c.first_name, c.last_name, c.title from concierges c WHERE c.status = 1 AND c.title <= ' ' ORDER BY c.last_name, c.first_name";
break;
case 'concierges_dup_email' :
$sql = "SELECT CONCAT('".APP_BASE."index.php?IX=concierge_form&id=', c.concierge_id) AS link, c.first_name, c.last_name, c.title, c.primary_email AS work_email from concierges c WHERE c.status = 1 AND ".
"(SELECT count(c2.primary_email) FROM concierges c2 WHERE c2.primary_email = c.primary_email AND c2.status = 1) > 1 ORDER BY c.primary_email, c.last_name, c.first_name";
break;
default :
echo 'Invalid report type selected';
return;
break;
endswitch;
//echo " === ".$sql." === ";
$result = $db->query($sql) or die('Database Error!');
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') :
endif;
?>