ok
Direktori : /proc/thread-self/root/proc/self/root/home2/selectio/www/y1jobportal.in/admin/ |
Current File : //proc/thread-self/root/proc/self/root/home2/selectio/www/y1jobportal.in/admin/users-add.php |
<?php include 'header.php'; ?> <div class="page-wrapper" > <div class="page-content"> <form id="form_details"> <div class="row" style="margin-top: 25px;" id="content-div"> <div class="col-lg-12"> <div class="card" style="margin: 0px 10px 30px 10px; box-shadow: rgba(60, 64, 67, 0.3) 0px 1px 2px 0px, rgba(60, 64, 67, 0.15) 0px 2px 6px 2px;"> <div class="card-body"> <!-- <div class="row">--> <!-- <h4 class="col-md-6 float-left d-block">USER ADD</h4>--> <!-- <div class="col-md-6 float-left text-end d-block"><a href="users-list.php" class="btn btn-primary">Back</a></div>--> <!--</div> --> <div class="row"> <div class="col-12 col-lg-12"> <a href="users-list.php" class="btn btn-danger btn-sm" style="float: right;"><i class="bi bi-arrow-left-circle"></i> Back to List</a> <b style="font-weight: bolder;font-size: 17px;">Add Users Details</b> <hr> </div> <div class="col-md-4"> <div class="form-group p-2"> <label class="required pb-1" for="name">Full Name</label> <input type="text" name="name" value="" placeholder="Enter the Name" class="form-control tip" id="name" required="required" /> </div> </div> <div class="col-md-4"> <div class="form-group p-2"> <label class="required pb-1" for="username">User Name</label> <input type="username" name="username" placeholder="Enter the User Name" value="" class="form-control tip" id="password" required="required" /> </div> </div> <div class="col-md-4"> <div class="form-group p-2"> <label class="required pb-1" for="password">Password</label> <input type="password" name="password" placeholder="Enter the Password" value="" class="form-control tip" id="password" required="required" /> </div> </div> <div class="col-md-4"> <div class="form-group p-2"> <label class="required pb-1" for="role">Select Role</label> <select name="role" class="form-control" style="width:100%" id="role" required="required"> <option value="">Select Role Name</option> <?php $statement = $pdo->prepare("SELECT * FROM `tbl_role` where status=1 and id!=1"); $statement->execute(); $location_result = $statement->fetchAll(PDO::FETCH_ASSOC); foreach ($location_result as $result) { ?> <option value="<?=$result['id']?>"><?=$result['role_name']?></option> <?php } ?> </select> </div> </div> <div class="col-md-4"> <div class="form-group p-2"> <label class="required pb-1" for="mobile">Mobile Number</label> <input type="number" name="mobile" placeholder="Enter the Mobile Number" value="" class="form-control tip" id="mobile" required="required" /> </div> </div> <div class="col-md-4"> <div class="form-group p-2"> <label class="required pb-1" for="email">Email</label> <input type="email" name="email" value="" placeholder="Enter the Email" class="form-control tip" id="email" required="required" /> </div> </div> <div class="col-md-4"> <div class="form-group p-2"> <label class="required pb-1" for="role">User Type</label> <select name="user_type" class="form-control" style="width:100%" id="user_type" required="required"> <option value="">Select User Type</option> <?php $user_type = $pdo->prepare("SELECT * FROM `tbl_user_type` where status=1"); $user_type->execute(); $usertype_result = $user_type->fetchAll(PDO::FETCH_ASSOC); foreach ($usertype_result as $usertype_datas) { ?> <option value="<?=$usertype_datas['id']?>"><?=$usertype_datas['name']?></option> <?php } ?> </select> </div> </div> <!--<div class="col-md-4">--> <!-- <div class="form-group p-2">--> <!-- <label class="optional" for="address">Address</label> --> <!-- <textarea name="address" placeholder="Enter the Address" class="form-control tip" id="address" ></textarea>--> <!-- </div>--> <!--</div>--> </div> </div> </div> <div class="col text-center"> <button type="submit" class="btn btn-primary px-5">Save Details</button> </div> </div> </div> </form> <div class="container" id="loading-div" style="display: none;"> <center> <img src="img/loading.gif" style="width: 250px;"><br><b class="blinking">Processing Please Wait...</b></center> </div> <div class="container" id="success-div" style="display: none; margin-top: 40px;"> <center><b class="blinking" style="font-size:22px;">User Details Added Successfully...</b><br> <img src="img/success.gif" style="width: 250px;"> <br><br><a href="users-list.php"><button class="btn btn-warning"><i class="fa fa-list"></i> Back to Users List</button></a> <a href="users-add.php"><button class="btn btn-success"><i class="fa fa-plus"></i> Add User Details</button></a> </center> </div> </div> </div> <?php include 'footer.php'; ?> <script> $(document).ready(function(){ $('#form_details').on('submit', function(e){ e.preventDefault(); console.log("Form Submitted Successfully !!!") $('#loading-div').show(); $('#content-div').hide(); var formData = new FormData(this); formData.append('type', 'add_users'); $.ajax({ url: 'apis/users.php', type: 'post', dataType: 'json', data: formData, cache: false, contentType: false, processData: false, enctype: 'multipart/form-data', success: function (response) { //console.log(response); if(response['status']==200){ success(response['message']); $('#loading-div').hide(); $('#form_details').trigger("reset"); $('#success-div').show(); }else{ warning(response['message']); $('#loading-div').hide(); $('#content-div').show(); } } }); }); }); </script>