From 8c3c3982acdbb809d98329b08bea090955787b19 Mon Sep 17 00:00:00 2001 From: Claudio Date: Thu, 2 Oct 2025 13:51:33 +0200 Subject: [PATCH] fixed note userpanel --- public/userpanel.php | 1146 +++++++++++++++++++++--------------------- 1 file changed, 578 insertions(+), 568 deletions(-) diff --git a/public/userpanel.php b/public/userpanel.php index 2c1afac..f67ee1f 100644 --- a/public/userpanel.php +++ b/public/userpanel.php @@ -1,9 +1,12 @@ - - - + + + setQuery("SELECT * FROM option"); $optionquery->execute(); ?> @@ -14,7 +17,6 @@ $bookedclass = new WA_MySQLi_RS("bookedclass", $bkngstm, 0); // Verifica se è stata specificata una richiesta per cambiare il mese if (isset($_GET['prev_month'])) { $currentMonthStart = $_GET['prev_month'] . '-01'; - } elseif (isset($_GET['next_month'])) { $currentMonthStart = $_GET['next_month'] . '-01'; } else { @@ -60,15 +62,14 @@ $result = $conn->query($query); if (!$result) { die("Query fallita: " . $conn->error); - } +} if ($result->num_rows > 0) { while ($row = $result->fetch_assoc()) { $idOrdine = $row["idorderbook"]; - $totalTickets = $row["total_tickets"]; - + $totalTickets = $row["total_tickets"]; } -} else { +} else { $totalTickets = 0; // Imposta a zero se non ci sono righe nella query } @@ -108,11 +109,8 @@ if ($result) { $passedRecords = $row['passed']; $futureRecords = $row['future']; $lost = $row['lost']; - $pending= $row['pending']; - - - -} + $pending = $row['pending']; +} // Chiusura della connessione $conn->close(); ?> @@ -120,248 +118,256 @@ $conn->close(); - + - -YogiBook - Prenotazioni YogaSoul - - - - - + + YogiBook - Prenotazioni YogaSoul + + + + + - - - - - - - + + + + + + + - + - - - - - + + + + + - - + .pastel-color.perse { + background-color: #FBC7C4; + /* Arancio pastello */ + } + + + } + + @media (max-width: 768px) { + .pastel-color { + margin-right: 0; + /* Rimuovi lo spazio tra i box */ + margin-bottom: 20px; + /* Spazio tra i box */ + } + } + + + + - -
+ +
- -
-
-
+ + + +
+
+
- -
-
-
+
+
+
+
+
Benvenuta/o
+

Di seguito puoi vedere lo stato delle tue prenotazioni

- - - - -
- -
- - - -
- - -
-
-
-
- -
-
-
-
- -
-
- -
- - + +
+
+
+
+
Lezioni acquistate
+

+
+
+
+
Praticate
+

+
+
+
+
+
+
+
Prenotate
+

+
+
+
+
+
+
+
Da confermare
+

+
+
+
+
+
+
+
Da programmare
+

+
+
+
+
+
+
+
Perse
+

+
+
+
+
+ - +
+ + + +
+
+
+ + + + + +
+ +
+ + + +
+ + +
+
+
+
+ +
+
+
+
+ +
+
+ +
+ +
- - - - - +
- - -
- - - - - - "Gennaio", - "February" => "Febbraio", - "March" => "Marzo", - "April" => "Aprile", - "May" => "Maggio", - "June" => "Giugno", - "July" => "Luglio", - "August" => "Agosto", - "September" => "Settembre", - "October" => "Ottobre", - "November" => "Novembre", - "December" => "Dicembre" -]; - -?> - - - -
-
-
-
- - -TotalRows == 0) { - echo "

Prenotazioni non presenti per questo mese

"; -} else { - while (!$bookedclass->atEnd()) { - $wa_startindex = $bookedclass->Index; -?> - getColumnVal("dateschedule") -$dateschedule = $bookedclass->getColumnVal("dateschedule"); - -// Converti la data in un oggetto DateTime -$dateObj = new DateTime($dateschedule); - -// Estrai il giorno e il mese in italiano -$dayInItalian = $dateObj->format("d"); -$monthInItalian = $dateObj->format("F"); - -// Mappa dei nomi dei mesi in italiano -$italianMonths = [ - "January" => "Gennaio", - "February" => "Febbraio", - "March" => "Marzo", - "April" => "Aprile", - "May" => "Maggio", - "June" => "Giugno", - "July" => "Luglio", - "August" => "Agosto", - "September" => "Settembre", - "October" => "Ottobre", - "November" => "Novembre", - "December" => "Dicembre" -]; - -// Sostituisci il nome del mese con la versione italiana -$monthInItalian = $italianMonths[$monthInItalian]; -?> -getColumnVal("dateschedule") -$dateschedule = $bookedclass->getColumnVal("dateschedule"); - -// Converti la data in un oggetto DateTime -$dateObj = new DateTime($dateschedule); - -// Formatta la data nel nuovo formato desiderato -$newDateFormat = $dateObj->format("d-m-Y H:i"); - - // Calculate the time difference in hours - $currentTime = new DateTime(); - $classTime = new DateTime($dateschedule); - $timeDifference = $classTime->diff($currentTime); - $hoursDifference = $timeDifference->h + $timeDifference->days * 24; - - // Check if the time difference is less than 6 hours - $timetocancel=$optionquery->getColumnVal("maxbeforetimecancell"); - $canBeDeleted = ($hoursDifference > $timetocancel); - -?> -
-
-
-
-
-
"> -

getColumnVal("servicename")); ?>

-

Quando:

-

Luogo: via Valassina 62/B Seregno - Sala Contesto Yoga

-
- - - - getColumnVal("idbookingclass"); - $idservice=$bookedclass->getColumnVal("idservice"); - ?> - - - - - - - -
-
-
- - moveNext(); - } -} - -$bookedclass->moveFirst(); // Ritorna all'inizio del recordset -unset($wa_startindex); -unset($wa_repeatcount); -?>


- - - - - - - -
- + - +
+ + + + + + "Gennaio", + "February" => "Febbraio", + "March" => "Marzo", + "April" => "Aprile", + "May" => "Maggio", + "June" => "Giugno", + "July" => "Luglio", + "August" => "Agosto", + "September" => "Settembre", + "October" => "Ottobre", + "November" => "Novembre", + "December" => "Dicembre" + ]; + + ?> +
+ + + +

+ + + +
+ + +
+
+
+
+ + + TotalRows == 0) { + echo "

Prenotazioni non presenti per questo mese

"; + } else { + while (!$bookedclass->atEnd()) { + $wa_startindex = $bookedclass->Index; + ?> + getColumnVal("dateschedule") + $dateschedule = $bookedclass->getColumnVal("dateschedule"); + + // Converti la data in un oggetto DateTime + $dateObj = new DateTime($dateschedule); + + // Estrai il giorno e il mese in italiano + $dayInItalian = $dateObj->format("d"); + $monthInItalian = $dateObj->format("F"); + + // Mappa dei nomi dei mesi in italiano + $italianMonths = [ + "January" => "Gennaio", + "February" => "Febbraio", + "March" => "Marzo", + "April" => "Aprile", + "May" => "Maggio", + "June" => "Giugno", + "July" => "Luglio", + "August" => "Agosto", + "September" => "Settembre", + "October" => "Ottobre", + "November" => "Novembre", + "December" => "Dicembre" + ]; + + // Sostituisci il nome del mese con la versione italiana + $monthInItalian = $italianMonths[$monthInItalian]; + ?> + getColumnVal("dateschedule") + $dateschedule = $bookedclass->getColumnVal("dateschedule"); + + // Converti la data in un oggetto DateTime + $dateObj = new DateTime($dateschedule); + + // Formatta la data nel nuovo formato desiderato + $newDateFormat = $dateObj->format("d-m-Y H:i"); + + // Calculate the time difference in hours + $currentTime = new DateTime(); + $classTime = new DateTime($dateschedule); + $timeDifference = $classTime->diff($currentTime); + $hoursDifference = $timeDifference->h + $timeDifference->days * 24; + + // Check if the time difference is less than 6 hours + $timetocancel = $optionquery->getColumnVal("maxbeforetimecancell"); + $canBeDeleted = ($hoursDifference > $timetocancel); + + ?> + + + +
+
+
+
+
+
"> +

getColumnVal("servicename")); ?>

+

Quando:

+

Luogo: via Valassina 62/B Seregno - Sala Contesto Yoga

+
+ + + + getColumnVal("idbookingclass"); + $idservice = $bookedclass->getColumnVal("idservice"); + ?> + + + + + + + + + +
+
+
+ + moveNext(); + } + } + + $bookedclass->moveFirst(); // Ritorna all'inizio del recordset + unset($wa_startindex); + unset($wa_repeatcount); + ?> +
+
+
+


+ + + + + + + +
- + +
- + - - - - - - - - +
+ - - - - - - - + + + + + + + + + + + + + + + + \ No newline at end of file