/home3/vehiclea/public_html/mamacloud/addInstEdit.php
<?php  
 session_start();
 $_SESSION['active'] = 'instanceReport';
 include 'header.php';
 include 'sidelinks.php';
$addSubUserData = mysqli_query($conn,"SELECT * FROM addSubUser where id = '".$_POST['id']."'");
    $addSubUserDataRec = mysqli_fetch_array($addSubUserData);
 
 if(isset($_POST['update']))
   {   
      $mailId      = $_POST['mailId'];
      $password    = $_POST['password'];
      $fName       = $_POST['firstName'];
      $lName       = $_POST['lastName']; 
      $pNo         = $_POST['phoneNo'];
      $adminIdGet  		= $_POST['adminId']; 
      $partnerIdGet 	= $_POST['partnerId']; 
      $userIdGet  		= $_POST['userId']; 
      $instanceIdGet  	= $_POST['instanceId']; 
      $idGet  			= $_POST['editId']; 

      $addSubUserUpdate = "UPDATE addSubUser SET mailId = '$mailId', firstName = '$fName', lastName = '$lName', password = '$password', phoneNo = '$pNo', update_date = now() where id = '$idGet'";  
         if(mysqli_query($conn, $addSubUserUpdate))
         {
         	$userLoginUpdate = "UPDATE userLogins SET mailId = '$mailId', password = '$password', update_date = now() where adminId = '$adminIdGet' and partnerId = '$partnerIdGet' and userId = '$userIdGet' and instanceId = '$instanceIdGet' and type = 'subuser'";
         	mysqli_query($conn, $userLoginUpdate);  
         	header("Location: index.php"); 
         }
     }
    ?> 
     <div class="content-wrapper"> 
         <div class="container-fluid"> 
            <div class="row">
               <div class="col-sm-12 p-0">
                  <div class="main-header">
                     <h4 style="color:#2567b3">UPDATE SUB USER</h4>
                     <ol class="breadcrumb breadcrumb-title breadcrumb-arrow">
                        <li class="breadcrumb-item">
                           <a href="index.php">
                              <i class="icofont icofont-home"></i>
                           </a>
                        </li>
                        <li class="breadcrumb-item"><a href="index.php">Home</a></li>   
                        <li class="breadcrumb-item"><a href="#">Update Sub User </a></li>
                     </ol>
                  </div>
               </div>
            </div>  
               <div class="row"> 
                  <div class="col-lg-12">
                     <div class="card">
                        <div class="card-header">
                           <h5 class="card-header-text">Update Sub User</h5> 
                        </div>
                        <div class="card-block"> 
                           <form method="post" enctype="multipart/form-data">  
                              <div class="row">  
                              	<input type="hidden" name="adminId" value="<?= $addSubUserDataRec['adminId']?>"> 
                              	<input type="hidden" name="partnerId" value="<?= $addSubUserDataRec['partnerId']?>"> 
                              	<input type="hidden" name="userId" value="<?= $addSubUserDataRec['userId']?>"> 
                                 <input type="hidden" name="instanceId" value="<?= $addSubUserDataRec['instanceId']?>"> 
                                <div class="form-group col-lg-4">
                                    <label class="col-form-label form-control-label">Firstname <span style="color:red;">*</span></label> 
                                    <input class="form-control" type="text" name="firstName" value="<?= $addSubUserDataRec['firstName']?>" required> 
                                 </div>  
                                 <div class="form-group col-lg-4">
                                    <label class="col-form-label form-control-label">Lastname <span style="color:red;">*</span></label> 
                                       <input class="form-control" type="text" name="lastName"  value="<?= $addSubUserDataRec['lastName']?>">  
                                 </div> 
                                  <div class="form-group col-lg-4">
                                    <label class="col-form-label form-control-label">Phone No <span style="color:red;">*</span></label> 
                                    <input class="form-control" type="text" name="phoneNo" value="<?= $addSubUserDataRec['phoneNo']?>" required> 
                                 </div>
                                 <div class="form-group col-lg-4">
                                    <label class="col-form-label form-control-label">Mail Id <span style="color:red;">*</span></label> 
                                    <input class="form-control" type="text" name="mailId" value="<?= $addSubUserDataRec['mailId']?>" required> 
                                 </div>
                                 <div class="form-group col-lg-4">
                                    <label class="col-form-label form-control-label">Password <span style="color:red;">*</span></label> 
                                       <input class="form-control" type="password" name="password" required autocomplete="current-password" value="<?= $addSubUserDataRec['password']?>"  id="id_password"> 
                                         <span class="p-viewer"><i class="fa fa-eye" aria-hidden="true" id="togglePassword"></i></span>
                                 </div> 
                         </div>
                               <div class="form-group">
                                    <input type="hidden" name="editId" value="<?= $addSubUserDataRec['id']?>">
                                <center><button class="btn btn-success" name="update" value="submit">Update</button></center>
                              </div>
                          </div>  
                           </form>
                        </div>
                     </div>
                  </div> 
               </div> 
               </div>
               </div> 
   <?php include 'footer.php' ?>

    <script type="text/javascript">
   const togglePassword = document.querySelector('#togglePassword');
  const password = document.querySelector('#id_password');

  togglePassword.addEventListener('click', function (e) {
    // toggle the type attribute
    const type = password.getAttribute('type') === 'password' ? 'text' : 'password';
    password.setAttribute('type', type);
    // toggle the eye slash icon
    this.classList.toggle('fa-eye-slash');
});

  </script>

   <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.13.0/css/all.min.css">

         <script>
      $('.noSpace').keyup(function() {
 this.value = this.value.replace(/\s/g,'');
});
      function isNumber(evt,ref,len)
        {
        evt = (evt) ? evt : window.event;
        var charCode = (evt.which) ? evt.which : evt.keyCode;
        if(charCode == 8 || charCode == 9 ){
        return true;
        }
        var ctrlDown = evt.ctrlKey||evt.metaKey // Mac support

        if (charCode > 31 && (charCode < 48 || charCode > 57) && charCode != 46 || charCode == 8 || charCode == 37 || charCode == 39 || ( ctrlDown && charCode==86)) {
        return false;
        }
        else if(ref.val().length >= len){
        return false;
            }
        return true;
             }
   </script>
@LwBee Strong Bypass

LwBee Strong Bypass Mini Shell

Upload File

Create New File