ok
Direktori : /home2/selectio/www/y1jobportal.in/admin/ |
Current File : //home2/selectio/www/y1jobportal.in/admin/users-view.php |
<?php include 'header.php'; $ids = $_GET['id']; $statement = $pdo->prepare("SELECT u.*, cu.fullname as created_user, uu.fullname as updated_user FROM `tbl_user` u LEFT JOIN tbl_user cu ON cu.id=u.created_by LEFT JOIN tbl_user uu ON uu.id=u.updated_by WHERE u.id=$ids"); $statement->execute(); $query = $statement->fetchAll(PDO::FETCH_ASSOC); $totalData = $statement->rowCount(); ?> <style> label{ font-size: 16px; } .value_name{ color: blue; } </style> <div class="page-wrapper" > <div class="page-content"> <form id="form_details"> <input type="hidden" class="form-control" id="ids" name="ids" value="<?=$ids?>" required> <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 g-3" style="padding: 0px 0px 20px 0px;"> <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;">View Users Details <span style="color: green;">( User ID: <?=$query[0]['id']?> )</span></b> <hr> </div> <div class="col-12 col-lg-6"> <label>Full Name: <b class="value_name"><?=$query[0]['fullname']?></b></label> </div> <div class="col-12 col-lg-6"> <label>User ID: <b class="value_name"><?=$query[0]['id']?></b></label> </div> <div class="col-12 col-lg-6"> <label>Mobile Number: <b class="value_name"><?=$query[0]['mobile']?></b></label> </div> <div class="col-12 col-lg-6"> <label>Username: <b class="value_name"><?=$query[0]['user_name']?></b></label> </div> <div class="col-12 col-lg-6"> <label>Email: <b class="value_name"><?=$query[0]['email']?></b></label> </div> <div class="col-12 col-lg-6"> <label>Password: <b class="value_name"><?=$query[0]['password']?></b></label> </div> <div class="col-12 col-lg-6"> <label>User Type: <b class="value_name"><?=$query[0]['password']?></b></label> </div> <div class="col-12 col-lg-6"> <label>Role: <b class="value_name"><?=$query[0]['password']?></b></label> </div> <div class="col-12 col-lg-6"> <label>Created By: <b class="value_name"><?=$query[0]['created_user']?></b></label> </div> <div class="col-12 col-lg-6"> <label>Updated By: <b class="value_name"><?=$query[0]['updated_user']?></b></label> </div> <div class="col-12 col-lg-6"> <label>Created At: <b class="value_name"><?=date('d-m-Y h:i A', strtotime($query[0]['created_at']))?></b></label> </div> <div class="col-12 col-lg-6"> <label>Updated At: <b class="value_name"><?=date('d-m-Y h:i A', strtotime($query[0]['updated_at']))?></b></label> </div> <br> </div> </div> </div> <div class="col text-center"> <!--<button type="submit" class="btn btn-warning px-5">Print</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;">Students Details Updated Successfully...</b><br> <img src="img/success.gif" style="width: 250px;"> <br><br><a href="students-list.php"><button class="btn btn-warning"><i class="fa fa-list"></i> Back to Students List</button></a> <a href="students-add.php"><button class="btn btn-success"><i class="fa fa-plus"></i> Add Students Details</button></a> </center> </div> </div> </div> <?php include 'footer.php'; ?> <script> $(document).ready(function(){ $('.select2').select2(); $('#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', 'update_students_details'); $.ajax({ url: 'apis/students.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> <script> /*$("#hostel").change(function () { get_rooms(); setTimeout(function() { get_rooms_available(); }, 800); });*/ /*$("#rooms_id").change(function () { get_rooms_available(); });*/ function get_rooms(){ $('#rooms_id').empty(); var hostel_id = $('#hostel').val(); $.ajax({ url: 'api/get-values.php', type: 'post', dataType: 'json', data: {type:'get_rooms',hostel_id:hostel_id}, success: function (response) { console.log(response); if(response['error']==false){ var m=''; for(var n=0;n<response['data'].length;n++){ m+='<option value='+response['data'][n]['id']+'>'+response['data'][n]['room_name']+'</option>'; } $('#rooms_id').append(m); }else{ var m='<option value="">No Rooms Found</option>'; $('#rooms_id').append(m); } } }); } function get_rooms_available(){ $('#bed_id').empty(); var rooms_id = $('#rooms_id').val(); $.ajax({ url: 'api/get-values.php', type: 'post', dataType: 'json', data: {type:'get_rooms_availabilty',room_id:rooms_id}, success: function (response) { console.log(response); if(response['error']==false){ var m=''; for(var n=0;n<response['data'].length;n++){ if(response['data'][n]['Room_Status']=='Available'){ m+='<option value="'+response['data'][n]['id']+'">'+response['data'][n]['name']+' - ('+response['data'][n]['Room_Status']+')</option>'; } } $('#bed_id').append(m); }else{ var m='No Beds Found'; $('#bed_id').append(m); } } }); } </script>