240 lines
10 KiB
PHP
240 lines
10 KiB
PHP
<?php include('include/headscript.php'); ?>
|
|
<!doctype html>
|
|
<html lang="en">
|
|
|
|
<head>
|
|
<!-- Required meta tags -->
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<!--favicon-->
|
|
<link rel="icon" href="assets/images/favicon-32x32.png" type="image/png" />
|
|
<?php include('cssinclude.php'); ?>
|
|
<title>TRF-Project - Template Dashboard</title>
|
|
<link rel="stylesheet" href="https://cdn.datatables.net/1.13.6/css/dataTables.bootstrap5.min.css">
|
|
</head>
|
|
|
|
<body>
|
|
<!--wrapper-->
|
|
<div class="wrapper">
|
|
<!--sidebar wrapper -->
|
|
<?php include('include/navbar.php'); ?>
|
|
<!--end sidebar wrapper -->
|
|
<!--start header -->
|
|
<?php include('include/topbar.php'); ?>
|
|
<!--end header -->
|
|
<!--start page wrapper -->
|
|
<div class="page-wrapper">
|
|
<div class="page-content">
|
|
<div class="row row-cols-1 row-cols-md-2 row-cols-xl-4">
|
|
<div class="col">
|
|
<div class="card radius-10 border-start border-0 border-4 border-info">
|
|
<div class="card-body">
|
|
<div class="d-flex align-items-center">
|
|
<div>
|
|
<p class="mb-0 text-secondary">Total Orders</p>
|
|
<h4 class="my-1 text-info">4805</h4>
|
|
<p class="mb-0 font-13">+2.5% from last week</p>
|
|
</div>
|
|
<div class="widgets-icons-2 rounded-circle bg-gradient-blues text-white ms-auto"><i class='bx bxs-cart'></i>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col">
|
|
<div class="card radius-10 border-start border-0 border-4 border-danger">
|
|
<div class="card-body">
|
|
<div class="d-flex align-items-center">
|
|
<div>
|
|
<p class="mb-0 text-secondary">Total Revenue</p>
|
|
<h4 class="my-1 text-danger">$84,245</h4>
|
|
<p class="mb-0 font-13">+5.4% from last week</p>
|
|
</div>
|
|
<div class="widgets-icons-2 rounded-circle bg-gradient-burning text-white ms-auto"><i class='bx bxs-wallet'></i>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col">
|
|
<div class="card radius-10 border-start border-0 border-4 border-success">
|
|
<div class="card-body">
|
|
<div class="d-flex align-items-center">
|
|
<div>
|
|
<p class="mb-0 text-secondary">Bounce Rate</p>
|
|
<h4 class="my-1 text-success">34.6%</h4>
|
|
<p class="mb-0 font-13">-4.5% from last week</p>
|
|
</div>
|
|
<div class="widgets-icons-2 rounded-circle bg-gradient-ohhappiness text-white ms-auto"><i class='bx bxs-bar-chart-alt-2'></i>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col">
|
|
<div class="card radius-10 border-start border-0 border-4 border-warning">
|
|
<div class="card-body">
|
|
<div class="d-flex align-items-center">
|
|
<div>
|
|
<p class="mb-0 text-secondary">Total Customers</p>
|
|
<h4 class="my-1 text-warning">8.4K</h4>
|
|
<p class="mb-0 font-13">+8.4% from last week</p>
|
|
</div>
|
|
<div class="widgets-icons-2 rounded-circle bg-gradient-orange text-white ms-auto"><i class='bx bxs-group'></i>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div><!--end row-->
|
|
|
|
|
|
|
|
<div class="card radius-10">
|
|
<div class="card-header">
|
|
<div class="d-flex align-items-center">
|
|
<div>
|
|
<h6 class="mb-0">Title</h6>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="card-body">
|
|
<div class="table-responsive">
|
|
<table id="xlsTemplatesTable" class="table table-striped table-bordered">
|
|
<thead>
|
|
<tr>
|
|
<th>ID</th>
|
|
<th>Name</th>
|
|
<th>Last Modified</th>
|
|
<th>Row Header</th>
|
|
<th>Column Header</th>
|
|
<th>Description</th>
|
|
<th>Destination Table</th>
|
|
<th>Actions</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<!-- DataTables riempirà questa sezione automaticamente -->
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
<!--end page wrapper -->
|
|
<!--start overlay-->
|
|
<div class="overlay toggle-icon"></div>
|
|
<!--end overlay-->
|
|
<!--Start Back To Top Button-->
|
|
<a href="javaScript:;" class="back-to-top"><i class='bx bxs-up-arrow-alt'></i></a>
|
|
<!--End Back To Top Button-->
|
|
<?php include('include/footer.php'); ?>
|
|
</div>
|
|
<!--end wrapper-->
|
|
|
|
|
|
<!-- search modal -->
|
|
<?php //include('include/searchmodal.php');
|
|
?>
|
|
<!-- end search modal -->
|
|
|
|
|
|
<!--start switcher-->
|
|
<?php //include('include/themeswitcher.php');
|
|
?>
|
|
<!--end switcher-->
|
|
<?php include('jsinclude.php'); ?>
|
|
<script src="https://cdn.datatables.net/1.13.6/js/jquery.dataTables.min.js"></script>
|
|
<script src="https://cdn.datatables.net/1.13.6/js/dataTables.bootstrap5.min.js"></script>
|
|
|
|
<script>
|
|
$(document).ready(function() {
|
|
$('#xlsTemplatesTable').DataTable({
|
|
processing: true,
|
|
serverSide: false,
|
|
ajax: 'load_templates.php',
|
|
columns: [{
|
|
data: 'id'
|
|
},
|
|
{
|
|
data: 'name'
|
|
},
|
|
{
|
|
data: 'updated_at',
|
|
render: function(data) {
|
|
return new Date(data).toLocaleDateString();
|
|
}
|
|
},
|
|
{
|
|
data: 'header_row'
|
|
},
|
|
{
|
|
data: 'start_column'
|
|
},
|
|
{
|
|
data: 'description',
|
|
defaultContent: 'No description'
|
|
},
|
|
{
|
|
data: 'target_table'
|
|
},
|
|
{
|
|
data: 'id',
|
|
orderable: false,
|
|
searchable: false,
|
|
render: function(data) {
|
|
return `
|
|
<div class="d-flex">
|
|
<a href="edit_template_xls.php?id=${data}" class="btn btn-sm btn-primary me-1">
|
|
<i class="bx bx-edit-alt"></i>
|
|
</a>
|
|
<a href="mapping_template_xls.php?id=${data}" class="btn btn-sm btn-success me-1">
|
|
<i class="bx bx-link-alt"></i>
|
|
</a>
|
|
<button class="btn btn-sm btn-danger" onclick="confirmDelete(${data})">
|
|
<i class="bx bx-trash"></i>
|
|
</button>
|
|
</div>`;
|
|
}
|
|
}
|
|
],
|
|
dom: '<"card-header border-bottom p-3"<"d-flex align-items-center"<"card-title mb-0 flex-grow-1"f>>>rt<"card-footer border-top p-3"<"d-flex align-items-center"<"me-auto"l><"d-flex gap-2"ip>>>',
|
|
lengthMenu: [10, 25, 50, 100],
|
|
language: {
|
|
url: "//cdn.datatables.net/plug-ins/1.13.6/i18n/Italian.json",
|
|
search: "Cerca:",
|
|
lengthMenu: "Mostra _MENU_ elementi",
|
|
info: "Visualizzando da _START_ a _END_ di _TOTAL_ elementi",
|
|
paginate: {
|
|
first: "Primo",
|
|
last: "Ultimo",
|
|
next: "Successivo",
|
|
previous: "Precedente"
|
|
}
|
|
}
|
|
});
|
|
});
|
|
|
|
function confirmDelete(id) {
|
|
Swal.fire({
|
|
title: "Are you sure?",
|
|
text: "This action cannot be undone!",
|
|
icon: "warning",
|
|
showCancelButton: true,
|
|
confirmButtonColor: "#d33",
|
|
cancelButtonColor: "#3085d6",
|
|
confirmButtonText: "Yes, delete it!",
|
|
cancelButtonText: "Cancel"
|
|
}).then((result) => {
|
|
if (result.isConfirmed) {
|
|
window.location.href = `delete_template_xls.php?id=${id}`;
|
|
}
|
|
});
|
|
}
|
|
</script>
|
|
|
|
</body>
|
|
|
|
</html>
|