Search
Search
Search
Search
Information
Information
Light
Dark
Open actions menu
Basic upload method
Bypass upload method
Tips!
If you encounter an error (by firewall) while uploading using both methods,
try changing extension of the file before uploading it and rename it right after.
Submit
~
home
cmediaonline-mnfgj
cmediaonline.in
public
admin
File Content:
editusers.php
<?php ob_start(); ?> <?php session_start(); if (!isset($_SESSION['username'])) { $_SESSION['msg'] = "You must log in first"; header('location: login.php'); } if (isset($_GET['logout'])) { session_destroy(); unset($_SESSION['username']); header("location: login.php"); } ?> <?php include "assets/includes/functions.php";?> <?php include "assets/includes/header.php";?> <!-- Page content start --> <div class="page-contentbar"> <!--left navigation start--> <?php include "assets/includes/sidebar.php";?> <!--left navigation end--> <style> #bg{ height:100%; width:100%; background-color: lightblue; clip-path: polygon(0 1%, 0% 100%, 100% 100%); position: absolute; z-index: -1; } </style> <!-- START PAGE CONTENT --> <div id="page-right-content"> <div class="container"> <div class="row"> <div class="col-sm-12"> <div class="wrapper-page"> <div class="m-t-40 card-box"> <div class="account-content"> <form class="form-horizontal" name="f1" method="post"> <h4 class="text-uppercase" style="text-align: center;text-underline-position: under;text-decoration: underline;">User Credentials Changing Form</h4><br> <?php if (isset($_GET['edit'])) { $the_cat_id = $_GET['edit']; $query = "select * from users WHERE id = {$the_cat_id}"; $select_edits = mysqli_query($connection,$query); while($row1 = mysqli_fetch_assoc($select_edits)) { $post_rid = $row1['id']; $post_name = $row1['username']; $post_email = $row1['email']; $post_sub = $row1['password']; ?> <div class="form-group m-b-20"> <div class="col-xs-12"> <input class="form-control" type="hidden" id="userid" required="" placeholder="" name="userid" value="<?php if(isset($post_rid )){echo $post_rid ;} ?>"> </div> </div> <div class="form-group m-b-20"> <div class="col-xs-12"> <label for="emailaddress">User Name</label> <input class="form-control" type="text" id="username" required="" placeholder="" name="username" value="<?php if(isset($post_name )){echo $post_name ;} ?>"> </div> </div> <div class="form-group m-b-20"> <div class="col-xs-12"> <label for="emailaddress">Email address</label> <input class="form-control" type="email" id="emailaddress" required="" placeholder="john@gmail.com" name="email" value="<?php if(isset($post_email )){echo $post_email ;} ?>"> </div> </div> <div class="form-group m-b-20"> <div class="col-xs-12"> <input type="checkbox" name=others onclick="enable_text(this.checked)" style="align-items: right;"> Do you want to change your password?<br><br> <label for="password">Password</label> <input class="form-control" type="password" required="" id="password" placeholder="Enter your password" name="password"> </div> </div> <div class="form-group account-btn text-center m-t-10"> <div class="col-xs-6"> <button class="btn btn-lg btn-primary btn-block" type="submit" name="update_user">Update Details</button> </div> <div class="col-xs-6"> <button class="btn btn-lg btn-primary btn-block" type="button" name="cancel" id="cancel">Close</button> </div> </div> <?php // update USER if (isset($_POST['update_user'])) { // receive all input values from the form $userid = mysqli_real_escape_string($db, $_POST['userid']); $username = mysqli_real_escape_string($db, $_POST['username']); $email = mysqli_real_escape_string($db, $_POST['email']); if (isset($_POST['password'])) { $password = mysqli_real_escape_string($db, $_POST['password']);} // $password_2 = mysqli_real_escape_string($db, $_POST['password_2']); // form validation: ensure that the form is correctly filled if (empty($username)) { array_push($errors, "Username is required"); } if (empty($email)) { array_push($errors, "Email is required"); } // if (empty($password)) { array_push($errors, "Password is required"); } // if ($password_1 != $password_2) { // array_push($errors, "The two passwords do not match"); // } // register user if there are no errors in the form if (count($errors) == 0) { if (isset($_POST['password'])) { $password = md5($password);//encrypt the password before saving in the database $query="update users set username='". mysqli_real_escape_string($connection,$username)."',email='" . mysqli_real_escape_string($connection,$email)."',password='" . mysqli_real_escape_string($connection,$password)."' WHERE id = {$userid}"; } else { $query="update users set username='". mysqli_real_escape_string($connection,$username)."',email='" . mysqli_real_escape_string($connection,$email)."' WHERE id = {$userid}"; } mysqli_query($db, $query); $_SESSION['username'] = $username; $_SESSION['success'] = "You are now logged in"; header('location: users.php'); } } ?> <?php } } ?> </form> <div class="clearfix"></div> </div> </div> </div> </div> </div> </div> <!-- ================================ --> <!-- end container --> <div class="footer"> <div class="pull-right hidden-xs"> Project Completed <strong class="text-custom">99%</strong>. </div> <div> <strong>Cmedia</strong> - Copyright © 2021 </div> </div> <!-- end footer --> </div> <!-- End #page-right-content --> </div> <!-- end .page-contentbar --> </div> <!-- End #page-wrapper --> <!-- js placed at the end of the document so the pages load faster --> <script src="assets/js/jquery-2.1.4.min.js"></script> <script src="assets/js/bootstrap.min.js"></script> <script src="assets/js/metisMenu.min.js"></script> <script src="assets/js/jquery.slimscroll.min.js"></script> <script src="assets/plugins/bootstrap-tagsinput/js/bootstrap-tagsinput.min.js"></script> <script src="assets/plugins/select2/js/select2.min.js" type="text/javascript"></script> <script src="assets/plugins/bootstrap-filestyle/js/bootstrap-filestyle.min.js" type="text/javascript"></script> <script src="assets/plugins/switchery/switchery.min.js"></script> <script type="text/javascript" src="assets/plugins/parsleyjs/parsley.min.js"></script> <script src="assets/plugins/moment/moment.js"></script> <script src="assets/plugins/timepicker/bootstrap-timepicker.js"></script> <script src="assets/plugins/bootstrap-colorpicker/js/bootstrap-colorpicker.min.js"></script> <script src="assets/plugins/bootstrap-datepicker/js/bootstrap-datepicker.min.js"></script> <script src="assets/plugins/clockpicker/js/bootstrap-clockpicker.min.js"></script> <script src="assets/plugins/bootstrap-daterangepicker/daterangepicker.js"></script> <script src="assets/plugins/summernote/summernote.min.js"></script> <!-- form advanced init js --> <script src="assets/pages/jquery.form-advanced.init.js"></script> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> <!-- App Js --> <!-- <script src="assets/js/jquery.app.js"></script> --> <!-- <script type="text/javascript"> $(document).ready(function() { $('.form-validation').parsley(); $('.summernote').summernote({ height: 350, // set editor height minHeight: null, // set minimum height of editor maxHeight: null, // set maximum height of editor focus: false // set focus to editable area after initializing summernote }); }); </script> --> <script> function myFunction(e) { $rre=$( "#packtype option:selected" ).text(); // alert($rre); document.getElementById("pname").value = e.target.value; document.getElementById("pid").value = $rre; // $('#pname').val(product_id); } </script> <script> $(document).ready(function(e){ $('#cancel').delegate('','click change',function(){ window.location = "users.php"; return false; }); }); </script> <script type="text/javascript"> document.f1.password.disabled = true; function enable_text(status) { // alert(status); if (status==false){ $("#password").val(''); } status=!status; document.f1.password.disabled = status; } </script> </body> </html> <?php ob_end_flush(); ?>
Edit
Rename
Chmod
Delete