fixed orders and riprogrammazione con scadenza
This commit is contained in:
parent
9254d420d2
commit
2d83c9da13
File diff suppressed because it is too large
Load Diff
@ -1,6 +1,7 @@
|
|||||||
<?php require_once('include/headscript.php'); ?>
|
<?php require_once('include/headscript.php'); ?>
|
||||||
<?php // optionquery
|
<?php
|
||||||
$optionquery = new WA_MySQLi_RS("optionquery",$bkngstm,0);
|
// optionquery
|
||||||
|
$optionquery = new WA_MySQLi_RS("optionquery", $bkngstm, 0);
|
||||||
$optionquery->setQuery("SELECT * FROM option");
|
$optionquery->setQuery("SELECT * FROM option");
|
||||||
$optionquery->execute();
|
$optionquery->execute();
|
||||||
?>
|
?>
|
||||||
@ -8,339 +9,644 @@ $optionquery->execute();
|
|||||||
<?php
|
<?php
|
||||||
// Verifica se è stato inviato un modulo
|
// Verifica se è stato inviato un modulo
|
||||||
if ($_SERVER["REQUEST_METHOD"] == "POST") {
|
if ($_SERVER["REQUEST_METHOD"] == "POST") {
|
||||||
// Verifica se è stato caricato un file correttamente
|
if (isset($_FILES["fileToUpload"]) && $_FILES["fileToUpload"]["error"] === UPLOAD_ERR_OK) {
|
||||||
if (isset($_FILES["fileToUpload"]) && $_FILES["fileToUpload"]["error"] === UPLOAD_ERR_OK) {
|
$conn = new mysqli($servername, $username, $password, $dbname);
|
||||||
|
if ($conn->connect_error) {
|
||||||
|
die("Connessione al database fallita: " . $conn->connect_error);
|
||||||
// Crea la connessione al database
|
|
||||||
$conn = new mysqli($servername, $username, $password, $dbname);
|
|
||||||
|
|
||||||
// Verifica la connessione
|
|
||||||
if ($conn->connect_error) {
|
|
||||||
die("Connessione al database fallita: " . $conn->connect_error);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Ottieni l'ID dell'utente (da dove viene?)
|
|
||||||
$iduserlogin = $_POST["iduserlogin"];
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Chiudi la connessione al database
|
|
||||||
$conn->close();
|
|
||||||
}
|
}
|
||||||
|
$iduserlogin = $_POST["iduserlogin"];
|
||||||
|
$conn->close();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
// Crea la connessione al database
|
$conn = new mysqli($servername, $username, $password, $dbname);
|
||||||
$conn = new mysqli($servername, $username, $password, $dbname);
|
|
||||||
|
|
||||||
// Verifica la connessione
|
|
||||||
if ($conn->connect_error) {
|
if ($conn->connect_error) {
|
||||||
die("Connessione al database fallita: " . $conn->connect_error);
|
die("Connessione al database fallita: " . $conn->connect_error);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Query per selezionare i dati filtrati per iduser
|
// Query per selezionare i dati filtrati per iduser
|
||||||
$query = "SELECT * FROM orderbook LEFT JOIN service ON orderbook.idservice=service.idservice WHERE iduser = '$iduserlogin'";
|
$query = "SELECT o.*, s.servicename, s.day, s.time
|
||||||
|
FROM orderbook o
|
||||||
|
LEFT JOIN service s ON o.idservice = s.idservice
|
||||||
|
WHERE o.iduser = '$iduserlogin'";
|
||||||
$result = $conn->query($query);
|
$result = $conn->query($query);
|
||||||
|
|
||||||
// Array per memorizzare i risultati
|
|
||||||
$documents = array();
|
$documents = array();
|
||||||
|
|
||||||
while ($row = $result->fetch_assoc()) {
|
while ($row = $result->fetch_assoc()) {
|
||||||
$documents[] = $row;
|
// Get lesson details for each order
|
||||||
|
$order_id = $row['order_id'];
|
||||||
|
$lesson_query = "SELECT bc.bookingstart, bc.status, bc.lostlesson, bc.expirylesson, s.servicename
|
||||||
|
FROM bookingclass bc
|
||||||
|
LEFT JOIN service s ON bc.idservice = s.idservice
|
||||||
|
WHERE bc.idorder = '$order_id'";
|
||||||
|
$lesson_result = $conn->query($lesson_query);
|
||||||
|
$lessons = array();
|
||||||
|
while ($lesson_row = $lesson_result->fetch_assoc()) {
|
||||||
|
$lessons[] = $lesson_row;
|
||||||
|
}
|
||||||
|
$row['lessons'] = $lessons;
|
||||||
|
$documents[] = $row;
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<!doctype html>
|
<!doctype html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
|
<meta charset="utf-8" />
|
||||||
|
<title>YogiBook - Prenotazioni YogaSoul</title>
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<meta content="YogiBook - Prenotazione facile YogaSOul" name="description" />
|
||||||
|
<meta content="Advanced Creative Solutions" name="author" />
|
||||||
|
<link rel="shortcut icon" href="assets/images/favicon.ico">
|
||||||
|
<link href="assets/css/bootstrap.min.css" id="bootstrap-style" rel="stylesheet" type="text/css" />
|
||||||
|
<link href="assets/css/icons.min.css" rel="stylesheet" type="text/css" />
|
||||||
|
<link href="assets/css/app.min.css" id="app-style" rel="stylesheet" type="text/css" />
|
||||||
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css">
|
||||||
|
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@10"></script>
|
||||||
|
<link rel="stylesheet" href="https://code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">
|
||||||
|
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
|
||||||
|
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
|
||||||
|
<script>
|
||||||
|
$(function() {
|
||||||
|
$("#expiryDate").datepicker({
|
||||||
|
dateFormat: "yy-mm-dd"
|
||||||
|
});
|
||||||
|
|
||||||
<meta charset="utf-8" />
|
// Handle order click for popup
|
||||||
<title>YogiBook - Prenotazioni YogaSoul</title>
|
$('.order-row').click(function() {
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
var lessons = $(this).data('lessons');
|
||||||
<meta content="YogiBook - Prenotazione facile YogaSOul" name="description" />
|
var total = $(this).data('total');
|
||||||
<meta content="Advanced Creative Solutions" name="author" />
|
var orderId = $(this).data('order-id');
|
||||||
<!-- App favicon -->
|
var isExpired = $(this).data('is-expired');
|
||||||
<link rel="shortcut icon" href="assets/images/favicon.ico">
|
|
||||||
|
|
||||||
<!-- Bootstrap Css -->
|
// Calcolo delle date
|
||||||
<link href="assets/css/bootstrap.min.css" id="bootstrap-style" rel="stylesheet" type="text/css" />
|
var now = new Date();
|
||||||
<!-- Icons Css -->
|
|
||||||
<link href="assets/css/icons.min.css" rel="stylesheet" type="text/css" />
|
|
||||||
<!-- App Css-->
|
|
||||||
<link href="assets/css/app.min.css" id="app-style" rel="stylesheet" type="text/css" />
|
|
||||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css">
|
|
||||||
|
|
||||||
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@10"></script>
|
// Calcolo dei conteggi
|
||||||
<link rel="stylesheet" href="https://code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">
|
var completed = lessons.filter(l => {
|
||||||
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
|
var lessonDate = new Date(l.bookingstart);
|
||||||
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
|
return (l.status === 'completed') ||
|
||||||
<script>
|
(l.status === 'booked' && lessonDate < now && l.lostlesson !== 'Y' && l.expirylesson !== 'Y');
|
||||||
$(function() {
|
}).length;
|
||||||
$("#expiryDate").datepicker({ dateFormat: "yy-mm-dd" });
|
var lost = lessons.filter(l => l.lostlesson === 'Y').length;
|
||||||
|
var expired = lessons.filter(l => l.expirylesson === 'Y').length;
|
||||||
|
var booked = lessons.filter(l => {
|
||||||
|
var lessonDate = new Date(l.bookingstart);
|
||||||
|
return (l.status === 'booked' && lessonDate >= now && l.lostlesson !== 'Y' && l.expirylesson !== 'Y');
|
||||||
|
}).length;
|
||||||
|
var toSchedule = total - (booked + completed + lost + expired);
|
||||||
|
|
||||||
|
var htmlContent = `
|
||||||
|
<h4 style="margin-bottom: 20px; color: #333; font-weight: 600;">
|
||||||
|
Dettagli Ordine #${orderId}
|
||||||
|
<span class="badge ${isExpired ? 'bg-danger' : 'bg-primary'}" style="margin-left: 10px; color: white;">
|
||||||
|
${isExpired ? 'Scaduto' : 'Attivo'}
|
||||||
|
</span>
|
||||||
|
</h4>
|
||||||
|
<div style="display: flex; justify-content: space-around; margin-bottom: 30px; gap: 10px;">
|
||||||
|
<div class="stat-box" style="background-color: #d1e7dd; border: 1px solid #a3cfbb;">
|
||||||
|
<h5 style="margin: 0; color: #0f5132; font-size: 14px;">Totale</h5>
|
||||||
|
<p style="font-size: 24px; font-weight: bold; margin: 5px 0; color: #0f5132;">${total}</p>
|
||||||
|
</div>
|
||||||
|
<div class="stat-box" style="background-color: #d4edda; border: 1px solid #b1d4b6;">
|
||||||
|
<h5 style="margin: 0; color: #155724; font-size: 14px;">Fatte</h5>
|
||||||
|
<p style="font-size: 24px; font-weight: bold; margin: 5px 0; color: #155724;">${completed}</p>
|
||||||
|
</div>
|
||||||
|
<div class="stat-box" style="background-color: #f8d7da; border: 1px solid #f1aeb5;">
|
||||||
|
<h5 style="margin: 0; color: #721c24; font-size: 14px;">Perse</h5>
|
||||||
|
<p style="font-size: 24px; font-weight: bold; margin: 5px 0; color: #721c24;">${lost}</p>
|
||||||
|
</div>
|
||||||
|
<div class="stat-box" style="background-color: #fff3cd; border: 1px solid #ffecb5;">
|
||||||
|
<h5 style="margin: 0; color: #856404; font-size: 14px;">Scadute</h5>
|
||||||
|
<p style="font-size: 24px; font-weight: bold; margin: 5px 0; color: #856404;">${expired}</p>
|
||||||
|
</div>
|
||||||
|
<div class="stat-box" style="background-color: #e2d3f5; border: 1px solid #c3b2d6;">
|
||||||
|
<h5 style="margin: 0; color: #4c2c92; font-size: 14px;">Da Programmare</h5>
|
||||||
|
<p style="font-size: 24px; font-weight: bold; margin: 5px 0; color: #4c2c92;">${toSchedule}</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div style="background-color: #f8f9fa; padding: 15px; border-radius: 8px;">
|
||||||
|
<table class="lesson-table">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>Data e Ora</th>
|
||||||
|
<th>Lezione</th>
|
||||||
|
<th>Stato</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
`;
|
||||||
|
|
||||||
|
if (lessons.length === 0) {
|
||||||
|
htmlContent += `
|
||||||
|
<tr>
|
||||||
|
<td colspan="3" style="text-align: center; padding: 10px; color: #666; font-size: 13px;">
|
||||||
|
Nessuna lezione trovata per questo ordine.
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
`;
|
||||||
|
} else {
|
||||||
|
lessons.forEach(function(lesson, index) {
|
||||||
|
var lessonDate = new Date(lesson.bookingstart);
|
||||||
|
var statusText = lesson.status;
|
||||||
|
var badgeClass = 'bg-primary';
|
||||||
|
var badgeTextColor = '#fff';
|
||||||
|
if (lesson.status === 'completed') {
|
||||||
|
badgeClass = 'bg-success';
|
||||||
|
badgeTextColor = '#fff';
|
||||||
|
statusText = 'Completata';
|
||||||
|
} else if (lesson.lostlesson === 'Y') {
|
||||||
|
badgeClass = 'bg-danger';
|
||||||
|
badgeTextColor = '#fff';
|
||||||
|
statusText = 'Persa';
|
||||||
|
} else if (lesson.expirylesson === 'Y') {
|
||||||
|
badgeClass = 'bg-warning';
|
||||||
|
badgeTextColor = '#000';
|
||||||
|
statusText = 'Scaduta';
|
||||||
|
} else if (lesson.status === 'booked') {
|
||||||
|
if (lessonDate < now && lesson.lostlesson !== 'Y' && lesson.expirylesson !== 'Y') {
|
||||||
|
statusText = 'Completata';
|
||||||
|
badgeClass = 'bg-success';
|
||||||
|
badgeTextColor = '#fff';
|
||||||
|
} else {
|
||||||
|
statusText = 'Programmata';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
htmlContent += `
|
||||||
|
<tr class="${index % 2 === 0 ? 'even-row' : 'odd-row'}">
|
||||||
|
<td style="padding: 8px; font-size: 13px;">${lessonDate.toLocaleString('it-IT', {
|
||||||
|
day: '2-digit',
|
||||||
|
month: '2-digit',
|
||||||
|
year: 'numeric',
|
||||||
|
hour: '2-digit',
|
||||||
|
minute: '2-digit'
|
||||||
|
})}</td>
|
||||||
|
<td style="padding: 8px; font-size: 13px;">${lesson.servicename}</td>
|
||||||
|
<td style="padding: 8px;">
|
||||||
|
<span class="badge ${badgeClass}" style="color: ${badgeTextColor}; padding: 6px 10px; font-size: 12px; font-weight: 500;">${statusText}</span>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
`;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
htmlContent += `
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
`;
|
||||||
|
|
||||||
|
Swal.fire({
|
||||||
|
title: '',
|
||||||
|
html: htmlContent,
|
||||||
|
confirmButtonText: 'Chiudi',
|
||||||
|
width: '1000px',
|
||||||
|
customClass: {
|
||||||
|
popup: 'custom-modal'
|
||||||
|
}
|
||||||
});
|
});
|
||||||
</script>
|
});
|
||||||
<style>
|
|
||||||
.custom-card {
|
|
||||||
margin: 10px auto;
|
|
||||||
display: flex;
|
|
||||||
width: 90%;
|
|
||||||
max-width: 700px;
|
|
||||||
background-color: white;
|
|
||||||
box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.1);
|
|
||||||
border-radius: 8px;
|
|
||||||
overflow: hidden;
|
|
||||||
cursor: pointer;
|
|
||||||
transition: transform 0.2s;
|
|
||||||
}
|
|
||||||
|
|
||||||
.custom-card:hover {
|
// Handle details button click
|
||||||
transform: translateY(-5px);
|
$('.details-btn').click(function(e) {
|
||||||
}
|
e.stopPropagation(); // Prevent row click event
|
||||||
|
var row = $(this).closest('tr');
|
||||||
|
var lessons = row.data('lessons');
|
||||||
|
var total = row.data('total');
|
||||||
|
var orderId = row.data('order-id');
|
||||||
|
var isExpired = row.data('is-expired');
|
||||||
|
|
||||||
.custom-date-box {
|
// Calcolo delle date
|
||||||
flex: 1;
|
var now = new Date();
|
||||||
background-color: red;
|
|
||||||
color: white;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
justify-content: center;
|
|
||||||
align-items: center;
|
|
||||||
padding: 0;
|
|
||||||
font-size: 60px;
|
|
||||||
font-weight: bold;
|
|
||||||
border-top-left-radius: 8px;
|
|
||||||
border-bottom-left-radius: 8px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.custom-day {
|
// Calcolo dei conteggi
|
||||||
line-height: 1;
|
var completed = lessons.filter(l => {
|
||||||
}
|
var lessonDate = new Date(l.bookingstart);
|
||||||
|
return (l.status === 'completed') ||
|
||||||
|
(l.status === 'booked' && lessonDate < now && l.lostlesson !== 'Y' && l.expirylesson !== 'Y');
|
||||||
|
}).length;
|
||||||
|
var lost = lessons.filter(l => l.lostlesson === 'Y').length;
|
||||||
|
var expired = lessons.filter(l => l.expirylesson === 'Y').length;
|
||||||
|
var booked = lessons.filter(l => {
|
||||||
|
var lessonDate = new Date(l.bookingstart);
|
||||||
|
return (l.status === 'booked' && lessonDate >= now && l.lostlesson !== 'Y' && l.expirylesson !== 'Y');
|
||||||
|
}).length;
|
||||||
|
var toSchedule = total - (booked + completed + lost + expired);
|
||||||
|
|
||||||
.custom-month {
|
var htmlContent = `
|
||||||
font-size: 28px;
|
<h4 style="margin-bottom: 20px; color: #333; font-weight: 600;">
|
||||||
}
|
Dettagli Ordine #${orderId}
|
||||||
|
<span class="badge ${isExpired ? 'bg-danger' : 'bg-primary'}" style="margin-left: 10px; color: white;">
|
||||||
|
${isExpired ? 'Scaduto' : 'Attivo'}
|
||||||
|
</span>
|
||||||
|
</h4>
|
||||||
|
<div style="display: flex; justify-content: space-around; margin-bottom: 30px; gap: 10px;">
|
||||||
|
<div class="stat-box" style="background-color: #d1e7dd; border: 1px solid #a3cfbb;">
|
||||||
|
<h5 style="margin: 0; color: #0f5132; font-size: 14px;">Totale</h5>
|
||||||
|
<p style="font-size: 24px; font-weight: bold; margin: 5px 0; color: #0f5132;">${total}</p>
|
||||||
|
</div>
|
||||||
|
<div class="stat-box" style="background-color: #d4edda; border: 1px solid #b1d4b6;">
|
||||||
|
<h5 style="margin: 0; color: #155724; font-size: 14px;">Fatte</h5>
|
||||||
|
<p style="font-size: 24px; font-weight: bold; margin: 5px 0; color: #155724;">${completed}</p>
|
||||||
|
</div>
|
||||||
|
<div class="stat-box" style="background-color: #f8d7da; border: 1px solid #f1aeb5;">
|
||||||
|
<h5 style="margin: 0; color: #721c24; font-size: 14px;">Perse</h5>
|
||||||
|
<p style="font-size: 24px; font-weight: bold; margin: 5px 0; color: #721c24;">${lost}</p>
|
||||||
|
</div>
|
||||||
|
<div class="stat-box" style="background-color: #fff3cd; border: 1px solid #ffecb5;">
|
||||||
|
<h5 style="margin: 0; color: #856404; font-size: 14px;">Scadute</h5>
|
||||||
|
<p style="font-size: 24px; font-weight: bold; margin: 5px 0; color: #856404;">${expired}</p>
|
||||||
|
</div>
|
||||||
|
<div class="stat-box" style="background-color: #e2d3f5; border: 1px solid #c3b2d6;">
|
||||||
|
<h5 style="margin: 0; color: #4c2c92; font-size: 14px;">Da Programmare</h5>
|
||||||
|
<p style="font-size: 24px; font-weight: bold; margin: 5px 0; color: #4c2c92;">${toSchedule}</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div style="background-color: #f8f9fa; padding: 15px; border-radius: 8px;">
|
||||||
|
<table class="lesson-table">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>Data e Ora</th>
|
||||||
|
<th>Lezione</th>
|
||||||
|
<th>Stato</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
`;
|
||||||
|
|
||||||
.custom-event-details {
|
if (lessons.length === 0) {
|
||||||
flex: 2;
|
htmlContent += `
|
||||||
display: flex;
|
<tr>
|
||||||
flex-direction: column;
|
<td colspan="3" style="text-align: center; padding: 10px; color: #666; font-size: 13px;">
|
||||||
padding: 10px 20px;
|
Nessuna lezione trovata per questo ordine.
|
||||||
background-color: lightblue;
|
</td>
|
||||||
}
|
</tr>
|
||||||
|
`;
|
||||||
|
} else {
|
||||||
|
lessons.forEach(function(lesson, index) {
|
||||||
|
var lessonDate = new Date(lesson.bookingstart);
|
||||||
|
var statusText = lesson.status;
|
||||||
|
var badgeClass = 'bg-primary';
|
||||||
|
var badgeTextColor = '#fff';
|
||||||
|
if (lesson.status === 'completed') {
|
||||||
|
badgeClass = 'bg-success';
|
||||||
|
badgeTextColor = '#fff';
|
||||||
|
statusText = 'Completata';
|
||||||
|
} else if (lesson.lostlesson === 'Y') {
|
||||||
|
badgeClass = 'bg-danger';
|
||||||
|
badgeTextColor = '#fff';
|
||||||
|
statusText = 'Persa';
|
||||||
|
} else if (lesson.expirylesson === 'Y') {
|
||||||
|
badgeClass = 'bg-warning';
|
||||||
|
badgeTextColor = '#000';
|
||||||
|
statusText = 'Scaduta';
|
||||||
|
} else if (lesson.status === 'booked') {
|
||||||
|
if (lessonDate < now && lesson.lostlesson !== 'Y' && lesson.expirylesson !== 'Y') {
|
||||||
|
statusText = 'Completata';
|
||||||
|
badgeClass = 'bg-success';
|
||||||
|
badgeTextColor = '#fff';
|
||||||
|
} else {
|
||||||
|
statusText = 'Programmata';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.custom-heading {
|
htmlContent += `
|
||||||
margin-top: 0;
|
<tr class="${index % 2 === 0 ? 'even-row' : 'odd-row'}">
|
||||||
font-size: 24px;
|
<td style="padding: 8px; font-size: 13px;">${lessonDate.toLocaleString('it-IT', {
|
||||||
}
|
day: '2-digit',
|
||||||
|
month: '2-digit',
|
||||||
|
year: 'numeric',
|
||||||
|
hour: '2-digit',
|
||||||
|
minute: '2-digit'
|
||||||
|
})}</td>
|
||||||
|
<td style="padding: 8px; font-size: 13px;">${lesson.servicename}</td>
|
||||||
|
<td style="padding: 8px;">
|
||||||
|
<span class="badge ${badgeClass}" style="color: ${badgeTextColor}; padding: 6px 10px; font-size: 12px; font-weight: 500;">${statusText}</span>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
`;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
.custom-paragraph {
|
htmlContent += `
|
||||||
margin-bottom: 5px;
|
</tbody>
|
||||||
}
|
</table>
|
||||||
|
</div>
|
||||||
|
`;
|
||||||
|
|
||||||
.custom-actions {
|
Swal.fire({
|
||||||
display: none;
|
title: '',
|
||||||
flex-direction: row;
|
html: htmlContent,
|
||||||
justify-content: space-between;
|
confirmButtonText: 'Chiudi',
|
||||||
margin-top: 10px;
|
width: '1000px',
|
||||||
}
|
customClass: {
|
||||||
|
popup: 'custom-modal'
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
.custom-card.expanded .custom-actions {
|
function confirmDelete(id, deletePageUrl) {
|
||||||
display: flex;
|
Swal.fire({
|
||||||
}
|
title: "Sei sicuro?",
|
||||||
|
text: "Questa prenotazione verrà cancellata definitivamente! Ricordati poi di riprogrammare la tua lezione!",
|
||||||
.custom-action-button {
|
icon: "warning",
|
||||||
background-color: #f0f0f0;
|
showCancelButton: true,
|
||||||
border: none;
|
confirmButtonColor: "#d33",
|
||||||
padding: 8px 12px;
|
cancelButtonColor: "#3085d6",
|
||||||
border-radius: 4px;
|
confirmButtonText: "Sì, cancella!",
|
||||||
cursor: pointer;
|
cancelButtonText: "Annulla"
|
||||||
transition: background-color 0.2s;
|
}).then((result) => {
|
||||||
}
|
if (result.isConfirmed) {
|
||||||
|
window.location.href = `deleteclass.php?id=${id}`;
|
||||||
.custom-action-button:hover {
|
}
|
||||||
background-color: #e0e0e0;
|
});
|
||||||
}
|
}
|
||||||
|
</script>
|
||||||
@media (max-width: 768px) {
|
<style>
|
||||||
.custom-card {
|
.custom-card {
|
||||||
|
margin: 10px auto;
|
||||||
|
display: flex;
|
||||||
|
width: 90%;
|
||||||
|
max-width: 700px;
|
||||||
|
background-color: white;
|
||||||
|
box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.1);
|
||||||
|
border-radius: 8px;
|
||||||
|
overflow: hidden;
|
||||||
|
cursor: pointer;
|
||||||
|
transition: transform 0.2s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.custom-card:hover {
|
||||||
|
transform: translateY(-5px);
|
||||||
|
}
|
||||||
|
|
||||||
|
.custom-date-box {
|
||||||
|
flex: 1;
|
||||||
|
background-color: #ff4d4f;
|
||||||
|
color: white;
|
||||||
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
padding: 0;
|
||||||
|
font-size: 60px;
|
||||||
|
font-weight: bold;
|
||||||
|
border-top-left-radius: 8px;
|
||||||
|
border-bottom-left-radius: 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.custom-date-box, .custom-event-details {
|
.custom-day {
|
||||||
width: 100%;
|
line-height: 1;
|
||||||
border-radius: 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.custom-event-time {
|
.custom-month {
|
||||||
|
font-size: 28px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.custom-event-details {
|
||||||
|
flex: 2;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
padding: 10px 20px;
|
||||||
|
background-color: #e6f3ff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.custom-heading {
|
||||||
|
margin-top: 0;
|
||||||
font-size: 24px;
|
font-size: 24px;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
</style>
|
.custom-paragraph {
|
||||||
<script>
|
margin-bottom: 5px;
|
||||||
function confirmDelete(id, deletePageUrl) {
|
|
||||||
Swal.fire({
|
|
||||||
title: "Sei sicuro?",
|
|
||||||
text: "Questa prenotazione verrà cancellata definitivamente! Ricordati poi di riprogrammare la tua lezione!",
|
|
||||||
icon: "warning",
|
|
||||||
showCancelButton: true,
|
|
||||||
confirmButtonColor: "#d33",
|
|
||||||
cancelButtonColor: "#3085d6",
|
|
||||||
confirmButtonText: "Sì, cancella!",
|
|
||||||
cancelButtonText: "Annulla"
|
|
||||||
}).then((result) => {
|
|
||||||
if (result.isConfirmed) {
|
|
||||||
// Reindirizza direttamente alla pagina di cancellazione con l'ID come parametro.
|
|
||||||
window.location.href = `deleteclass.php?id=${id}`;
|
|
||||||
}
|
}
|
||||||
});
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<body>
|
|
||||||
|
|
||||||
<!-- <body data-layout="horizontal"> -->
|
.custom-actions {
|
||||||
|
display: none;
|
||||||
|
flex-direction: row;
|
||||||
|
justify-content: space-between;
|
||||||
|
margin-top: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
<!-- Begin page -->
|
.custom-card.expanded .custom-actions {
|
||||||
<div id="layout-wrapper">
|
display: flex;
|
||||||
|
}
|
||||||
|
|
||||||
<!-- Top Bar -->
|
.custom-action-button {
|
||||||
<header id="page-topbar" class="isvertical-topbar">
|
background-color: #f0f0f0;
|
||||||
<div class="navbar-header">
|
border: none;
|
||||||
<div class="d-flex">
|
padding: 8px 12px;
|
||||||
<!-- LOGO -->
|
border-radius: 4px;
|
||||||
<?php include('include/logoarea.php'); ?>
|
cursor: pointer;
|
||||||
|
transition: background-color 0.2s;
|
||||||
|
}
|
||||||
|
|
||||||
<button type="button" class="btn btn-sm px-3 font-size-24 header-item waves-effect vertical-menu-btn">
|
.custom-action-button:hover {
|
||||||
<i class="bx bx-menu align-middle"></i>
|
background-color: #e0e0e0;
|
||||||
</button>
|
}
|
||||||
|
|
||||||
<!-- start page title -->
|
@media (max-width: 768px) {
|
||||||
<div class="page-title-box align-self-center d-none d-md-block">
|
.custom-card {
|
||||||
<h4 class="page-title mb-0">Prenotazione Classi</h4>
|
flex-direction: column;
|
||||||
</div>
|
}
|
||||||
<!-- end page title -->
|
|
||||||
|
|
||||||
</div>
|
.custom-date-box,
|
||||||
|
.custom-event-details {
|
||||||
|
width: 100%;
|
||||||
|
border-radius: 0;
|
||||||
|
}
|
||||||
|
|
||||||
<div class="d-flex">
|
.custom-event-time {
|
||||||
|
font-size: 24px;
|
||||||
<?php include('include/languageselection.php'); ?>
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.order-row {
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.order-row:hover {
|
||||||
|
background-color: #f8f9fa !important;
|
||||||
<?php include('include/profiletopbar.php'); ?>
|
}
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</header>
|
|
||||||
<?php include('include/sidebar.php'); ?>
|
|
||||||
|
|
||||||
<header class="ishorizontal-topbar">
|
|
||||||
<div class="navbar-header">
|
|
||||||
<div class="d-flex">
|
|
||||||
|
|
||||||
|
|
||||||
|
.stat-box {
|
||||||
|
padding: 12px;
|
||||||
|
border-radius: 8px;
|
||||||
|
text-align: center;
|
||||||
|
width: 18%;
|
||||||
|
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
|
||||||
|
transition: transform 0.2s;
|
||||||
|
}
|
||||||
|
|
||||||
</div>
|
.stat-box:hover {
|
||||||
|
transform: translateY(-3px);
|
||||||
|
}
|
||||||
|
|
||||||
|
.custom-modal .swal2-content {
|
||||||
</div>
|
padding: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
<div class="topnav">
|
.custom-modal .lesson-table {
|
||||||
<div class="container-fluid">
|
width: 100% !important;
|
||||||
<nav class="navbar navbar-light navbar-expand-lg topnav-menu">
|
border-collapse: collapse !important;
|
||||||
|
font-size: 13px !important;
|
||||||
|
color: #333 !important;
|
||||||
</nav>
|
}
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</header>
|
|
||||||
|
|
||||||
<!-- ============================================================== -->
|
.custom-modal .lesson-table th {
|
||||||
<!-- Start right Content here -->
|
background-color: #e9ecef !important;
|
||||||
<!-- ============================================================== -->
|
padding: 10px !important;
|
||||||
<div class="main-content">
|
text-align: left !important;
|
||||||
<div class="page-content">
|
font-weight: 600 !important;
|
||||||
<div class="container-fluid">
|
border-bottom: 2px solid #dee2e6 !important;
|
||||||
|
border-right: 1px solid #dee2e6 !important;
|
||||||
|
}
|
||||||
|
|
||||||
<div class="row">
|
.custom-modal .lesson-table th:last-child {
|
||||||
<div class="col-xl-12">
|
border-right: none !important;
|
||||||
<div class="card">
|
}
|
||||||
<div class="card-body">
|
|
||||||
<h5>Benvenuta/o <?php echo $firstname; ?> </h5>
|
|
||||||
<p>Di seguito puoi visualizzare i tuoi ordini</p>
|
|
||||||
<div class="table-responsive">
|
|
||||||
<table class="table table-striped mb-0">
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th>N. Ordine</th>
|
|
||||||
<th>Data Ordine</th>
|
|
||||||
<th>Classe</th>
|
|
||||||
<th>N. Ticket</th>
|
|
||||||
<th>Scadenza</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
<?php foreach ($documents as $document) { ?>
|
|
||||||
<tr>
|
|
||||||
<td><?php echo $document['order_id']; ?></td>
|
|
||||||
<td><?php echo date('d-m-Y', strtotime($document['order_date_created'])); ?></td>
|
|
||||||
<td><?php echo $document['servicename']; ?></td>
|
|
||||||
<td><?php echo $document['quantityclass']; ?></td>
|
|
||||||
<td><?php echo date('d-m-Y', strtotime($document['expireon'])); ?></td>
|
|
||||||
</tr>
|
|
||||||
<?php } ?>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
.custom-modal .lesson-table td {
|
||||||
</div>
|
padding: 8px !important;
|
||||||
</div>
|
line-height: 1.2 !important;
|
||||||
</div>
|
vertical-align: middle !important;
|
||||||
|
border-bottom: 1px solid #dee2e6 !important;
|
||||||
|
border-right: 1px solid #dee2e6 !important;
|
||||||
|
text-align: left !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.custom-modal .lesson-table td:last-child {
|
||||||
|
border-right: none !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.custom-modal .lesson-table .even-row {
|
||||||
|
background-color: #fff !important;
|
||||||
|
}
|
||||||
|
|
||||||
</div>
|
.custom-modal .lesson-table .odd-row {
|
||||||
<!-- container-fluid -->
|
background-color: #f8f9fa !important;
|
||||||
</div>
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<?php include('include/footer.php'); ?>
|
.custom-modal .lesson-table tr:hover {
|
||||||
</div>
|
background-color: #e9ecef !important;
|
||||||
<!-- end main content-->
|
}
|
||||||
|
|
||||||
|
.details-btn {
|
||||||
|
margin-left: 10px;
|
||||||
|
padding: 5px 10px;
|
||||||
|
font-size: 12px;
|
||||||
|
background-color: #007bff;
|
||||||
|
color: white;
|
||||||
|
border: none;
|
||||||
|
border-radius: 4px;
|
||||||
|
cursor: pointer;
|
||||||
|
transition: background-color 0.2s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.details-btn:hover {
|
||||||
|
background-color: #0056b3;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<div id="layout-wrapper">
|
||||||
|
<header id="page-topbar" class="isvertical-topbar">
|
||||||
|
<div class="navbar-header">
|
||||||
|
<div class="d-flex">
|
||||||
|
<?php include('include/logoarea.php'); ?>
|
||||||
|
<button type="button" class="btn btn-sm px-3 font-size-24 header-item waves-effect vertical-menu-btn">
|
||||||
|
<i class="bx bx-menu align-middle"></i>
|
||||||
|
</button>
|
||||||
|
<div class="page-title-box align-self-center d-none d-md-block">
|
||||||
|
<h4 class="page-title mb-0">Prenotazione Classi</h4>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- END layout-wrapper -->
|
<div class="d-flex">
|
||||||
|
<?php include('include/languageselection.php'); ?>
|
||||||
|
<?php include('include/profiletopbar.php'); ?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</header>
|
||||||
|
<?php include('include/sidebar.php'); ?>
|
||||||
|
<header class="ishorizontal-topbar">
|
||||||
|
<div class="navbar-header">
|
||||||
|
<div class="d-flex"></div>
|
||||||
|
</div>
|
||||||
|
<div class="topnav">
|
||||||
|
<div class="container-fluid">
|
||||||
|
<nav class="navbar navbar-light navbar-expand-lg topnav-menu"></nav>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</header>
|
||||||
|
<div class="main-content">
|
||||||
|
<div class="page-content">
|
||||||
|
<div class="container-fluid">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-xl-12">
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-body">
|
||||||
|
<h5>Benvenuta/o <?php echo $firstname; ?></h5>
|
||||||
|
<p>Di seguito puoi visualizzare i tuoi ordini</p>
|
||||||
|
<div class="table-responsive">
|
||||||
|
<table class="table table-striped mb-0">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>N. Ordine</th>
|
||||||
|
<th>Data Ordine</th>
|
||||||
|
<th>Classe</th>
|
||||||
|
<th>Giorno/Ora</th>
|
||||||
|
<th>N. Ticket</th>
|
||||||
|
<th>Prima Lezione</th>
|
||||||
|
<th>Scadenza</th>
|
||||||
|
<th>Stato</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<?php foreach ($documents as $document) {
|
||||||
|
$is_expired = strtotime($document['expireon']) < time();
|
||||||
|
?>
|
||||||
|
<tr class="order-row"
|
||||||
|
data-lessons='<?php echo json_encode($document['lessons']); ?>'
|
||||||
|
data-total='<?php echo $document['quantityclass']; ?>'
|
||||||
|
data-order-id='<?php echo $document['order_id']; ?>'
|
||||||
|
data-is-expired='<?php echo $is_expired ? 'true' : 'false'; ?>'>
|
||||||
|
<td><?php echo $document['order_id']; ?></td>
|
||||||
|
<td><?php echo date('d-m-Y', strtotime($document['order_date_created'])); ?></td>
|
||||||
|
<td><?php echo $document['servicename']; ?></td>
|
||||||
|
<td><?php echo $document['day'] . ' ' . $document['time']; ?></td>
|
||||||
|
<td><?php echo $document['quantityclass']; ?></td>
|
||||||
|
<td><?php echo $document['first_lesson_date'] ? date('d-m-Y', strtotime($document['first_lesson_date'])) : '-'; ?></td>
|
||||||
|
<td><?php echo date('d-m-Y', strtotime($document['expireon'])); ?></td>
|
||||||
|
<td>
|
||||||
|
<span class="badge <?php echo $is_expired ? 'bg-danger' : 'bg-primary'; ?>">
|
||||||
|
<?php echo $is_expired ? 'Scaduto' : 'Attivo'; ?>
|
||||||
|
</span>
|
||||||
|
<button class="details-btn" data-order-id="<?php echo $document['order_id']; ?>" data-lessons='<?php echo json_encode($document['lessons']); ?>' data-total='<?php echo $document['quantityclass']; ?>' data-is-expired='<?php echo $is_expired ? 'true' : 'false'; ?>'>Dettagli</button>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<?php } ?>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<?php include('include/footer.php'); ?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<script src="assets/libs/bootstrap/js/bootstrap.bundle.min.js"></script>
|
||||||
|
<script src="assets/libs/metismenujs/metismenujs.min.js"></script>
|
||||||
|
<script src="assets/libs/simplebar/simplebar.min.js"></script>
|
||||||
|
<script src="assets/libs/eva-icons/eva.min.js"></script>
|
||||||
|
<script src="assets/js/app.js"></script>
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</html>
|
||||||
|
<?php $conn->close(); ?>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- JAVASCRIPT -->
|
|
||||||
<script src="assets/libs/bootstrap/js/bootstrap.bundle.min.js"></script>
|
|
||||||
<script src="assets/libs/metismenujs/metismenujs.min.js"></script>
|
|
||||||
<script src="assets/libs/simplebar/simplebar.min.js"></script>
|
|
||||||
<script src="assets/libs/eva-icons/eva.min.js"></script>
|
|
||||||
|
|
||||||
<script src="assets/js/app.js"></script>
|
|
||||||
|
|
||||||
</body>
|
|
||||||
|
|
||||||
</html>
|
|
||||||
@ -195,44 +195,52 @@ if ($service_schedule_result->num_rows > 0) {
|
|||||||
}
|
}
|
||||||
$stmt_schedule->close();
|
$stmt_schedule->close();
|
||||||
|
|
||||||
// Recupera il numero di settimane da expiryparameter
|
// Recupera il numero di lezioni da expiryparameter (ora expirylessons)
|
||||||
$expiry_class_query = "SELECT quantityclass, first_lesson_date FROM orderbook WHERE idorderbook = ?";
|
$expiry_lessons_query = "SELECT expirylessons FROM expiryparameter WHERE quantityclass = ?";
|
||||||
$stmt_expiry = $conn->prepare($expiry_class_query);
|
$stmt_expiry_lessons = $conn->prepare($expiry_lessons_query);
|
||||||
$stmt_expiry->bind_param("i", $order_id);
|
$stmt_expiry_lessons->bind_param("i", $quantity_class);
|
||||||
$stmt_expiry->execute();
|
$stmt_expiry_lessons->execute();
|
||||||
$expiry_class_result = $stmt_expiry->get_result();
|
$expiry_lessons_result = $stmt_expiry_lessons->get_result();
|
||||||
|
|
||||||
if ($expiry_class_result && $expiry_class_result->num_rows > 0) {
|
if ($expiry_lessons_result && $expiry_lessons_result->num_rows > 0) {
|
||||||
$row = $expiry_class_result->fetch_assoc();
|
$expiry_row = $expiry_lessons_result->fetch_assoc();
|
||||||
$quantity_class = $row['quantityclass'];
|
$expirylessons = $expiry_row['expirylessons'];
|
||||||
$first_lesson_date = $row['first_lesson_date'];
|
|
||||||
|
|
||||||
$expiry_weeks_query = "SELECT expiryweeks FROM expiryparameter WHERE quantityclass = ?";
|
// Calcola la data della expirylessons-esima lezione disponibile
|
||||||
$stmt_expiry_weeks = $conn->prepare($expiry_weeks_query);
|
$expiry_date_query = "SELECT dateschedule FROM serviceschedule WHERE idservice = ? AND dateschedule >= ? ORDER BY dateschedule LIMIT ?, 1";
|
||||||
$stmt_expiry_weeks->bind_param("i", $quantity_class);
|
$stmt_expiry_date = $conn->prepare($expiry_date_query);
|
||||||
$stmt_expiry_weeks->execute();
|
$offset = $expirylessons - 1; // Per prendere la n-esima riga (0-based offset)
|
||||||
$expiry_weeks_result = $stmt_expiry_weeks->get_result();
|
$stmt_expiry_date->bind_param("isi", $service_id, $first_lesson_date, $offset);
|
||||||
|
$stmt_expiry_date->execute();
|
||||||
|
$expiry_date_result = $stmt_expiry_date->get_result();
|
||||||
|
|
||||||
if ($expiry_weeks_result && $expiry_weeks_result->num_rows > 0) {
|
if ($expiry_date_result->num_rows > 0) {
|
||||||
$expiry_row = $expiry_weeks_result->fetch_assoc();
|
$date_row = $expiry_date_result->fetch_assoc();
|
||||||
$expiry_weeks = $expiry_row['expiryweeks'];
|
$expireon = $date_row['dateschedule'];
|
||||||
|
|
||||||
// Aggiorna la colonna expireon in orderbook basandosi su first_lesson_date
|
// Aggiorna expireon in orderbook
|
||||||
$update_expiry_query = "UPDATE orderbook SET expireon = DATE_ADD(first_lesson_date, INTERVAL ? WEEK) WHERE idorderbook = ?";
|
$update_expiry_query = "UPDATE orderbook SET expireon = ? WHERE idorderbook = ?";
|
||||||
$stmt_update_expiry = $conn->prepare($update_expiry_query);
|
$stmt_update_expiry = $conn->prepare($update_expiry_query);
|
||||||
$stmt_update_expiry->bind_param("ii", $expiry_weeks, $order_id);
|
$stmt_update_expiry->bind_param("si", $expireon, $order_id);
|
||||||
$stmt_update_expiry->execute();
|
$stmt_update_expiry->execute();
|
||||||
$stmt_update_expiry->close();
|
$stmt_update_expiry->close();
|
||||||
|
|
||||||
echo "Aggiornata la colonna expireon per l'ordine ID: $order_id\n";
|
echo "Aggiornata la colonna expireon per l'ordine ID: $order_id (scadenza alla lezione n. $expirylessons: $expireon)\n";
|
||||||
} else {
|
} else {
|
||||||
echo "Nessun record trovato in expiryparameter per quantityclass: $quantity_class\n";
|
// Non abbastanza lezioni: imposta a NULL o gestisci come preferisci
|
||||||
|
$update_expiry_query = "UPDATE orderbook SET expireon = NULL WHERE idorderbook = ?";
|
||||||
|
$stmt_update_expiry = $conn->prepare($update_expiry_query);
|
||||||
|
$stmt_update_expiry->bind_param("i", $order_id);
|
||||||
|
$stmt_update_expiry->execute();
|
||||||
|
$stmt_update_expiry->close();
|
||||||
|
|
||||||
|
echo "Non abbastanza lezioni disponibili per calcolare la scadenza per l'ordine ID: $order_id\n";
|
||||||
}
|
}
|
||||||
$stmt_expiry_weeks->close();
|
$stmt_expiry_date->close();
|
||||||
} else {
|
} else {
|
||||||
echo "Nessun record trovato in orderbook per l'ordine ID: $order_id\n";
|
echo "Nessun record trovato in expiryparameter per quantityclass: $quantity_class\n";
|
||||||
}
|
}
|
||||||
$stmt_expiry->close();
|
$stmt_expiry_lessons->close();
|
||||||
|
|
||||||
// Recupera il numero da expiryparameter per maxreschedule
|
// Recupera il numero da expiryparameter per maxreschedule
|
||||||
$reschedule_number_query = "SELECT reschedulenumber FROM expiryparameter WHERE quantityclass = ?";
|
$reschedule_number_query = "SELECT reschedulenumber FROM expiryparameter WHERE quantityclass = ?";
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user