389 lines
17 KiB
PHP
389 lines
17 KiB
PHP
|
<!doctype html>
|
||
|
<html lang="en" data-layout="vertical" data-topbar="light" data-sidebar="dark" data-sidebar-size="lg"
|
||
|
data-sidebar-image="none" data-preloader="disable">
|
||
|
|
||
|
|
||
|
<!-- Mirrored from themesbrand.com/velzon/html/default/ by HTTrack Website Copier/3.x [XR&CO'2014], Thu, 23 Mar 2023 12:52:34 GMT -->
|
||
|
|
||
|
<head>
|
||
|
|
||
|
<?php include 'link/links.php'?>
|
||
|
|
||
|
</head>
|
||
|
|
||
|
<body>
|
||
|
|
||
|
<!-- Begin page -->
|
||
|
<div id="layout-wrapper">
|
||
|
|
||
|
<?php include 'common_file/header.php'?>
|
||
|
<!-- removeNotificationModal -->
|
||
|
|
||
|
<!-- ========== App Menu ========== -->
|
||
|
<?php include 'common_file/sidebar.php'?>
|
||
|
<!-- Left Sidebar End -->
|
||
|
<!-- Vertical Overlay-->
|
||
|
<div class="vertical-overlay"></div>
|
||
|
|
||
|
<!-- ============================================================== -->
|
||
|
<!-- Start right Content here -->
|
||
|
<!-- ============================================================== -->
|
||
|
<div class="main-content">
|
||
|
|
||
|
<div class="page-content">
|
||
|
<div class="container-fluid">
|
||
|
<div class="row">
|
||
|
<div class="col-12">
|
||
|
<div class="page-title-box d-sm-flex align-items-center justify-content-between">
|
||
|
<h4 class="mb-sm-0">Add Language</h4>
|
||
|
|
||
|
<div class="page-title-right">
|
||
|
<ol class="breadcrumb m-0">
|
||
|
<li class="breadcrumb-item"><a href="<?php echo base_url('index')?>">Home</a>
|
||
|
</li>
|
||
|
<li class="breadcrumb-item active">Add Language</li>
|
||
|
</ol>
|
||
|
</div>
|
||
|
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
<div class="col-md-12">
|
||
|
<?php if ($this->session->flashdata('error')): ?>
|
||
|
<div class="alert alert-danger">
|
||
|
<?php echo $this->session->flashdata('error'); ?>
|
||
|
</div>
|
||
|
<?php endif; ?>
|
||
|
|
||
|
<?php if ($this->session->flashdata('success')): ?>
|
||
|
<div class="alert alert-success">
|
||
|
<?php echo $this->session->flashdata('success'); ?>
|
||
|
</div>
|
||
|
<?php endif; ?>
|
||
|
|
||
|
|
||
|
<div class="row">
|
||
|
<div class="col-xl-12">
|
||
|
<div class="card">
|
||
|
<div class="card-header align-items-center d-flex">
|
||
|
<h4 class="card-title mb-0 flex-grow-1">Language list</h4>
|
||
|
<div class="flex-shrink-0">
|
||
|
<!-- <div class="form-check form-switch form-switch-right form-switch-md">
|
||
|
<label for="responsive-table-showcode" class="form-label text-muted">Show
|
||
|
Code</label>
|
||
|
<input class="form-check-input code-switcher" type="checkbox"
|
||
|
id="responsive-table-showcode">
|
||
|
</div> -->
|
||
|
<div class="d-flex align-items-center gap-2">
|
||
|
<button data-bs-toggle="modal" data-bs-target="#adddeals"
|
||
|
class="btn btn-success btn-sm"><i
|
||
|
class="ri-add-fill align-bottom me-1"></i>
|
||
|
Add
|
||
|
Language</button>
|
||
|
<div class="search-box">
|
||
|
<input type="search" class="form-control search-input form-control-sm "
|
||
|
id=" searchMemberList" placeholder="Search here..."
|
||
|
data-table="table_list">
|
||
|
<i class="ri-search-line search-icon"></i>
|
||
|
</div>
|
||
|
</div>
|
||
|
<!-- <div id="example3_filter" class="dataTables_filter" style="float:right;">
|
||
|
<label>
|
||
|
<input id="abc" type="search" placeholder="Search"
|
||
|
class=" form-control search-input form-control-sm mt-2"
|
||
|
aria-controls="example3" data-table="table_list"></label>
|
||
|
</div> -->
|
||
|
</div>
|
||
|
</div><!-- end card header -->
|
||
|
|
||
|
<div class="card-body">
|
||
|
<!-- <p class="text-muted">Use <code>table-responsive</code> class to make any table
|
||
|
responsive across all viewports. Responsive tables allow tables to be scrolled
|
||
|
horizontally with ease.</p> -->
|
||
|
<div class="live-preview">
|
||
|
<div class="table-responsive">
|
||
|
<table
|
||
|
class="table align-middle table-bordered table-sortable table-nowrap mb-0 table_list">
|
||
|
<thead class="table-light">
|
||
|
<tr>
|
||
|
|
||
|
<th scope="col">Sr.No.</th>
|
||
|
|
||
|
<th scope="col">Language Name</th>
|
||
|
|
||
|
<th scope="col">Status</th>
|
||
|
|
||
|
|
||
|
|
||
|
<th scope="col">Action</th>
|
||
|
</tr>
|
||
|
</thead>
|
||
|
<tbody>
|
||
|
|
||
|
<?php
|
||
|
|
||
|
if(!empty($data)) {
|
||
|
$i=1;
|
||
|
foreach($data as $data) {
|
||
|
?>
|
||
|
|
||
|
<tr>
|
||
|
|
||
|
<td><a href="#" class="fw-medium"><?php echo $i;?></a></td>
|
||
|
|
||
|
|
||
|
|
||
|
<td>
|
||
|
<?php echo $data['name'];?>
|
||
|
</td>
|
||
|
<td>
|
||
|
<div
|
||
|
class=" form-switch form-switch-custom form-switch-warning ">
|
||
|
<input class="form-check-input" type="checkbox"
|
||
|
role="switch" id="SwitchCheck12" checked="">
|
||
|
<label class="form-check-label"
|
||
|
for="SwitchCheck12"></label>
|
||
|
</div>
|
||
|
</td>
|
||
|
<!-- <td>gvg</td> -->
|
||
|
|
||
|
<td>
|
||
|
<div class="">
|
||
|
|
||
|
<button type="button" data-bs-toggle="modal"
|
||
|
data-bs-target="#update_lang_<?php echo $data['id'];?>"
|
||
|
class="btn btn-warning btn-xs btn-icon waves-effect waves-light"><i
|
||
|
class="ri-pencil-fill"></i></button>
|
||
|
<a href="#" id="5" onclick="delete_Data('<?php echo $data['id'];?>')"><button
|
||
|
type="button"
|
||
|
class="btn btn-icon btn-danger sweet-multiple"><i
|
||
|
class="ri-delete-bin-5-line"></i></button></a>
|
||
|
<!-- <button type="button" id="custom-sa-warning"
|
||
|
onclick="delete_Data(this)"
|
||
|
class="btn btn-danger btn-icon waves-effect waves-light"><i
|
||
|
class="ri-delete-bin-5-line"></i></button> -->
|
||
|
</div>
|
||
|
</td>
|
||
|
</tr>
|
||
|
|
||
|
|
||
|
<!-- edit -->
|
||
|
<div class="modal fade " id="update_lang_<?php echo $data['id'];?>" tabindex="-1" aria-labelledby="exampleModalLabel" aria-modal="true"
|
||
|
role="dialog">
|
||
|
<div class="modal-dialog modal-dialog-centered">
|
||
|
<div class="modal-content">
|
||
|
<div class="modal-header bg-light p-3">
|
||
|
<h5 class="modal-title" id="exampleModalLabel">Update Language</h5>
|
||
|
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||
|
</div>
|
||
|
<form method="post" action="<?php echo base_url();?>User_management/edit_lang" enctype='multipart/form-data'>
|
||
|
<div class="modal-body">
|
||
|
|
||
|
<input type="hidden" name="id" value="<?php echo $data['id']; ?>">
|
||
|
<div class="mb-3">
|
||
|
<label for="" class="form-label">Language Name</label>
|
||
|
<input type="text" class="form-control" name="lang" value="<?php echo $data['name']; ?>" placeholder="" required="">
|
||
|
</div>
|
||
|
|
||
|
</div>
|
||
|
<div class="modal-footer">
|
||
|
|
||
|
<button type="submit" class="btn btn-success">
|
||
|
Update</button>
|
||
|
</div>
|
||
|
</form>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
|
||
|
|
||
|
<?php $i++; } } ?>
|
||
|
|
||
|
|
||
|
|
||
|
</tbody>
|
||
|
|
||
|
</table>
|
||
|
<p id="table_list" class="text-warning">No matching records found
|
||
|
</p>
|
||
|
<div class="d-flex justify-content-end mt-4">
|
||
|
|
||
|
<?php echo $this->pagination->create_links(); ?>
|
||
|
</div>
|
||
|
<!-- end table -->
|
||
|
</div>
|
||
|
|
||
|
<!-- end table responsive -->
|
||
|
</div>
|
||
|
|
||
|
</div><!-- end card-body -->
|
||
|
</div><!-- end card -->
|
||
|
</div><!-- end col -->
|
||
|
</div>
|
||
|
|
||
|
</div>
|
||
|
<!-- container-fluid -->
|
||
|
</div>
|
||
|
<!-- End Page-content -->
|
||
|
|
||
|
<footer class="footer">
|
||
|
<div class="container-fluid">
|
||
|
<div class="row">
|
||
|
<div class="col-sm-6">
|
||
|
<script>
|
||
|
document.write(new Date().getFullYear())
|
||
|
</script> © Chess.
|
||
|
</div>
|
||
|
<div class="col-sm-6">
|
||
|
<div class="text-sm-end d-none d-sm-block">
|
||
|
Design & Develop by Appzia
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</footer>
|
||
|
</div>
|
||
|
<!-- end main content-->
|
||
|
|
||
|
</div>
|
||
|
<!-- END layout-wrapper -->
|
||
|
|
||
|
|
||
|
|
||
|
<!--start back-to-top-->
|
||
|
<button onclick="topFunction()" class="btn btn-danger btn-icon" id="back-to-top">
|
||
|
<i class="ri-arrow-up-line"></i>
|
||
|
</button>
|
||
|
<!--end back-to-top-->
|
||
|
|
||
|
<!--preloader-->
|
||
|
<div id="preloader">
|
||
|
<div id="status">
|
||
|
<div class="spinner-border text-primary avatar-sm" role="status">
|
||
|
<span class="visually-hidden">Loading...</span>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
<div class="modal fade " id="adddeals" tabindex="-1" aria-labelledby="exampleModalLabel" aria-modal="true"
|
||
|
role="dialog">
|
||
|
<div class="modal-dialog modal-dialog-centered">
|
||
|
<div class="modal-content">
|
||
|
<div class="modal-header bg-light p-3">
|
||
|
<h5 class="modal-title" id="exampleModalLabel">Add Language</h5>
|
||
|
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||
|
</div>
|
||
|
<form method="post" action="<?php echo base_url();?>User_management/insert_lang" enctype='multipart/form-data'>
|
||
|
<div class="modal-body">
|
||
|
|
||
|
|
||
|
<div class="mb-3">
|
||
|
<label for="" class="form-label">Language Name</label>
|
||
|
<input type="text" class="form-control" name="lang" placeholder="" required="">
|
||
|
|
||
|
</div>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
</div>
|
||
|
<div class="modal-footer">
|
||
|
|
||
|
<button type="submit" class="btn btn-success"><i class="ri-add-fill align-bottom me-1"></i>
|
||
|
Add</button>
|
||
|
</div>
|
||
|
</form>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
|
||
|
<?php include 'link/script.php'?>
|
||
|
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.1/jquery.min.js"></script>
|
||
|
|
||
|
<script>
|
||
|
function delete_Data(idd) {
|
||
|
|
||
|
Swal.fire({
|
||
|
title: "Are you sure?",
|
||
|
text: "You won't be able to revert this!",
|
||
|
icon: "warning",
|
||
|
showCancelButton: !0,
|
||
|
confirmButtonText: "Yes, delete it!",
|
||
|
cancelButtonText: "No, cancel!",
|
||
|
confirmButtonClass: "btn btn-primary w-xs me-2 mt-2",
|
||
|
cancelButtonClass: "btn btn-danger w-xs mt-2",
|
||
|
buttonsStyling: !1,
|
||
|
showCloseButton: !0
|
||
|
}).then(function(t) {
|
||
|
t.value ? Swal.fire(
|
||
|
|
||
|
// ajax
|
||
|
$.ajax({
|
||
|
url: "<?php echo base_url("Dashboard_controller/deleterecords");?>",
|
||
|
type: "POST",
|
||
|
cache: false,
|
||
|
data:{
|
||
|
|
||
|
lang_id: idd
|
||
|
},
|
||
|
success: function(dataResult){
|
||
|
//alert(dataResult);
|
||
|
var dataResult = JSON.parse(dataResult);
|
||
|
if(dataResult.statusCode==200){
|
||
|
//$ele.fadeOut().remove();
|
||
|
swal.fire({
|
||
|
|
||
|
|
||
|
title: "Deleted!",
|
||
|
text: "Your file has been deleted.",
|
||
|
icon: "success",
|
||
|
confirmButtonClass: "btn btn-primary w-xs mt-2",
|
||
|
buttonsStyling: !1
|
||
|
|
||
|
});
|
||
|
|
||
|
setTimeout(function(){ location.reload();}, 2000);
|
||
|
}
|
||
|
|
||
|
else {
|
||
|
|
||
|
// swal.fire({
|
||
|
|
||
|
// title: "Cancelled",
|
||
|
// text: "Some Error is Occured :)",
|
||
|
// icon: "error",
|
||
|
// confirmButtonClass: "btn btn-primary mt-2",
|
||
|
// buttonsStyling: !1
|
||
|
|
||
|
// });
|
||
|
|
||
|
|
||
|
|
||
|
}//else
|
||
|
}// success
|
||
|
}),
|
||
|
// ajax
|
||
|
|
||
|
|
||
|
) : t.dismiss === Swal.DismissReason.cancel && Swal.fire({
|
||
|
title: "Cancelled",
|
||
|
text: "Your imaginary file is safe :)",
|
||
|
icon: "error",
|
||
|
confirmButtonClass: "btn btn-primary mt-2",
|
||
|
buttonsStyling: !1
|
||
|
})
|
||
|
})
|
||
|
|
||
|
}
|
||
|
|
||
|
|
||
|
</script>
|
||
|
|
||
|
</body>
|
||
|
|
||
|
|
||
|
|
||
|
</html>
|