fixed finances my lesson etc
This commit is contained in:
+232
-296
@@ -1,366 +1,302 @@
|
||||
<?php include('include/headscript.php'); ?>
|
||||
<?php
|
||||
// Ottieni l'istanza del DBHandlerSelect
|
||||
$dbHandler = DBHandlerSelect::getInstance();
|
||||
$pdo = $dbHandler->getConnection();
|
||||
include('include/headscript.php');
|
||||
|
||||
// Recupera lo school_id e user_id dalla sessione
|
||||
$school_id = session('school_id');
|
||||
|
||||
|
||||
// Controlla se l'utente è loggato
|
||||
if (empty($iduserlogin)) {
|
||||
header('Location: login.php?error=not_logged_in');
|
||||
if (!isset($iduserlogin)) {
|
||||
header('Location: login.php');
|
||||
exit;
|
||||
}
|
||||
|
||||
$school = null;
|
||||
// Costruisci manualmente l'URL assoluto per il logo di default
|
||||
$base_url = rtrim(env('APP_URL'), '/') . '/public/userarea/';
|
||||
$school_logo_path = $base_url . 'yogibook_logo.png'; // Default logo
|
||||
$dbHandler = DBHandlerSelect::getInstance();
|
||||
$pdo = $dbHandler->getConnection();
|
||||
|
||||
// === DATI UTENTE ===
|
||||
$stmt = $pdo->prepare("SELECT first_name, last_name, email, avatar FROM auth_users WHERE id = ?");
|
||||
$stmt->execute([$iduserlogin]);
|
||||
$user = $stmt->fetch();
|
||||
$avatar = $user['avatar'] ? '../upload/users/' . $user['avatar'] : '../assets/images/default-avatar.png';
|
||||
|
||||
// === SCUOLA CORRENTE ===
|
||||
$school_id = session('school_id');
|
||||
$school_name = 'Nessuna scuola selezionata';
|
||||
$school_logo_path = null; // niente default
|
||||
|
||||
if ($school_id) {
|
||||
// Usa il modello School per recuperare i dati della scuola
|
||||
$school = \Vanguard\Models\School::find($school_id);
|
||||
$stmt = $pdo->prepare("SELECT name, logo FROM schools WHERE id = ?");
|
||||
$stmt->execute([$school_id]);
|
||||
$school = $stmt->fetch();
|
||||
|
||||
if ($school) {
|
||||
// Se la scuola esiste, aggiorna il percorso del logo
|
||||
$school_logo_path = $school->logo ? $base_url . $school->logo : $school_logo_path;
|
||||
$school_name = $school['name'];
|
||||
if (!empty($school['logo']) && file_exists("photoschool/" . $school['logo'])) {
|
||||
$school_logo_path = "photoschool/" . $school['logo'];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Query per i dati dell'utente
|
||||
$stmt = $pdo->prepare("SELECT first_name, last_name, avatar FROM auth_users WHERE id = ?");
|
||||
$stmt->execute([$iduserlogin]);
|
||||
$user = $stmt->fetch();
|
||||
// Dopo aver recuperato i dati dell'utente
|
||||
$avatar = !empty($user['avatar']) ? '../upload/users/' . $user['avatar'] : '../assets/images/default-avatar.png';
|
||||
|
||||
// Query per recuperare gli ordini dell'utente per la scuola corrente
|
||||
// === ORDINI UTENTE ===
|
||||
$stmt = $pdo->prepare("
|
||||
SELECT o.order_number, o.created_at, o.price, o.total_entries, o.available_entries, o.available_recoveries, o.expiration_date, o.activation_date,
|
||||
p.name AS product_name, pv.name AS variation_name, c.name AS class_name, ct.level, ct.day_of_week
|
||||
SELECT o.*, p.name AS product_name, pv.name AS variation_name,
|
||||
c.name AS class_name, ct.level, ct.day_of_week
|
||||
FROM orders o
|
||||
JOIN products p ON o.product_id = p.id
|
||||
JOIN product_variations pv ON o.variation_id = pv.id
|
||||
LEFT JOIN product_variations pv ON o.variation_id = pv.id
|
||||
LEFT JOIN classes c ON o.class_id = c.id
|
||||
LEFT JOIN class_types ct ON o.class_type_id = ct.id
|
||||
LEFT JOIN classes c ON ct.class_id = c.id
|
||||
WHERE o.user_id = ? AND o.school_id = ?
|
||||
ORDER BY o.created_at DESC
|
||||
");
|
||||
$stmt->execute([$iduserlogin, $school_id]);
|
||||
$orders = $stmt->fetchAll(PDO::FETCH_ASSOC);
|
||||
$orders = $stmt->fetchAll();
|
||||
|
||||
// === STATISTICHE RAPIDE ===
|
||||
$total_spent = array_sum(array_column($orders, 'price'));
|
||||
$total_entries = array_sum(array_column($orders, 'total_entries'));
|
||||
$available_entries = array_sum(array_column($orders, 'available_entries'));
|
||||
$active_orders = count(array_filter($orders, fn($o) => $o['status'] === 'completed' && (!$o['expiration_date'] || strtotime($o['expiration_date']) >= time())));
|
||||
?>
|
||||
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<html lang="it">
|
||||
|
||||
<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" />
|
||||
<title>La mia Dashboard - Yogiboook</title>
|
||||
<?php include('cssinclude.php'); ?>
|
||||
<?php include('siteinfo.php'); ?>
|
||||
<style>
|
||||
.page-content {
|
||||
background-color: #f0f4f5;
|
||||
/* Sfondo pastello chiaro (grigio-azzurro) */
|
||||
:root {
|
||||
--pastel-blue: #94bacc;
|
||||
--pastel-green: #a3d9b1;
|
||||
--pastel-pink: #f8bbd0;
|
||||
--pastel-yellow: #fff8c4;
|
||||
}
|
||||
|
||||
.card-pastel {
|
||||
background-color: rgb(149, 217, 248);
|
||||
/* Verde menta pastello */
|
||||
box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
|
||||
/* Ombra leggera */
|
||||
border: none;
|
||||
/* Rimuoviamo il bordo predefinito */
|
||||
}
|
||||
|
||||
.avatar-border {
|
||||
border: 3px solid #a3d9b1;
|
||||
/* Bordo verde pastello intorno all'avatar */
|
||||
}
|
||||
|
||||
.btn-pastel {
|
||||
background-color: rgb(148, 186, 204);
|
||||
/* Colore pulsante coordinato */
|
||||
border: none;
|
||||
transition: background-color 0.3s ease;
|
||||
/* Effetto hover */
|
||||
}
|
||||
|
||||
.btn-pastel:hover {
|
||||
background-color: rgb(155, 189, 221);
|
||||
/* Colore più scuro al passaggio del mouse */
|
||||
}
|
||||
|
||||
h5,
|
||||
h6 {
|
||||
font-family: 'Poppins', sans-serif;
|
||||
/* Font moderno e morbido, se disponibile */
|
||||
color: #333;
|
||||
/* Colore testo scuro per contrasto */
|
||||
}
|
||||
|
||||
.calendar-header {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
/* Permette ai filtri di andare a capo su schermi piccoli */
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: 1.5rem;
|
||||
gap: 10px;
|
||||
/* Spazio tra gli elementi */
|
||||
}
|
||||
|
||||
.lesson-card,
|
||||
.order-card {
|
||||
background-color: #ffffff;
|
||||
border-left: 4px solid #c8e6c9;
|
||||
/* Verde per le lezioni programmate e ordini */
|
||||
transition: transform 0.2s ease;
|
||||
}
|
||||
|
||||
.lesson-card:hover,
|
||||
.order-card:hover {
|
||||
transform: translateY(-3px);
|
||||
}
|
||||
|
||||
.filter-btn {
|
||||
background-color: #f8bbd0;
|
||||
border: none;
|
||||
background: linear-gradient(135deg, #94bacc, #a3d9b1);
|
||||
color: white;
|
||||
padding: 5px 15px;
|
||||
border-radius: 20px;
|
||||
font-size: 0.9rem;
|
||||
margin: 0 5px;
|
||||
/* Spazio tra i pulsanti */
|
||||
}
|
||||
|
||||
.filter-btn.active {
|
||||
background-color: #bbdefb;
|
||||
.card-soft {
|
||||
background: #ffffff;
|
||||
border: 1px solid #e0e0e0;
|
||||
}
|
||||
|
||||
.reschedule-btn {
|
||||
background-color: #c8e6c9;
|
||||
border: none;
|
||||
color: white;
|
||||
font-size: 0.85rem;
|
||||
padding: 5px 10px;
|
||||
.stat-card {
|
||||
background: white;
|
||||
border-radius: 15px;
|
||||
box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
|
||||
transition: all 0.3s ease;
|
||||
}
|
||||
|
||||
.lesson-details p,
|
||||
.order-details p {
|
||||
margin-bottom: 0.2rem;
|
||||
/* Spazio ridotto tra le righe */
|
||||
.stat-card:hover {
|
||||
transform: translateY(-5px);
|
||||
box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
|
||||
}
|
||||
|
||||
.avatar-circle {
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
object-fit: cover;
|
||||
border: 4px solid white;
|
||||
box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
|
||||
}
|
||||
|
||||
.table-pastel thead {
|
||||
background-color: var(--pastel-blue);
|
||||
color: white;
|
||||
}
|
||||
|
||||
.badge-soft {
|
||||
padding: 0.4em 0.8em;
|
||||
border-radius: 50px;
|
||||
font-size: 0.85rem;
|
||||
/* Testo più piccolo per adattarsi meglio */
|
||||
}
|
||||
|
||||
.order-details .price {
|
||||
font-weight: bold;
|
||||
color: #28a745;
|
||||
/* Verde per il prezzo */
|
||||
}
|
||||
</style>
|
||||
</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="page-content" style="background: linear-gradient(to bottom, #f0f8ff, #f8f9fa); min-height: 100vh;">
|
||||
|
||||
<!-- Sezione Scuola -->
|
||||
<div class="card card-pastel radius-10 mb-4">
|
||||
<div class="card-body text-center">
|
||||
<?php if ($school): ?>
|
||||
<h5 class="mb-3">Sei loggato nella scuola: <?php echo htmlspecialchars($school->name); ?></h5>
|
||||
<img src="<?php echo $school_logo_path; ?>" alt="School Logo" style="max-height: 100px;">
|
||||
<?php else: ?>
|
||||
<h5 class="mb-3">Nessuna scuola selezionata</h5>
|
||||
<img src="<?php echo $school_logo_path; ?>" alt="Default Logo" style="max-height: 100px;">
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Sezione Profilo -->
|
||||
<div class="card card-pastel radius-10">
|
||||
<div class="card-header">
|
||||
<div class="d-flex align-items-center">
|
||||
<div>
|
||||
<h6 class="mb-0">Stato Utente</h6>
|
||||
<!-- SCUOLA + BENVENUTO -->
|
||||
<div class="container-fluid px-4 pt-4">
|
||||
<div class="card card-pastel radius-20 shadow-lg mb-4 position-relative">
|
||||
<div class="card-body text-center py-5">
|
||||
|
||||
<!-- Logo solo se esiste -->
|
||||
<?php if ($school_logo_path): ?>
|
||||
<img src="<?php echo htmlspecialchars($school_logo_path); ?>"
|
||||
alt="Logo <?php echo htmlspecialchars($school_name); ?>"
|
||||
class="mb-4 rounded-3 shadow"
|
||||
style="height: 90px; object-fit: contain;">
|
||||
<?php endif; ?>
|
||||
|
||||
<!-- Saluto -->
|
||||
<h2 class="mb-2 text-white">
|
||||
Ciao<?php echo $user['first_name'] ? ', ' . htmlspecialchars($user['first_name']) : ''; ?>!
|
||||
</h2>
|
||||
<p class="mb-0 fs-4 text-white opacity-90">
|
||||
Sei nella scuola: <strong><?php echo htmlspecialchars($school_name); ?></strong>
|
||||
</p>
|
||||
|
||||
<!-- PULSANTI IN RIGA (uno accanto all'altro) -->
|
||||
<div class="position-absolute top-0 end-0 mt-3 me-3 d-flex gap-2">
|
||||
<a href="my_lessons.php" class="btn btn-light btn-lg shadow-sm px-4">
|
||||
<i class="bx bx-calendar-heart me-2"></i>Le mie lezioni
|
||||
</a>
|
||||
<button type="button" class="btn btn-outline-light btn-lg shadow-sm px-4"
|
||||
data-bs-toggle="modal" data-bs-target="#changeSchoolModal">
|
||||
<i class="bx bx-transfer me-2"></i>Cambia scuola
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="d-flex flex-column align-items-center text-center">
|
||||
<!-- Saluto e Nome -->
|
||||
<h5 class="mb-3">Ciao, <?php echo htmlspecialchars($user['first_name']); ?>!</h5>
|
||||
</div>
|
||||
|
||||
<!-- Sezione dei box -->
|
||||
<div class="row">
|
||||
<!-- Lezioni programmate -->
|
||||
<div class="col-12 col-md-4 mb-3">
|
||||
<div class="card card-pastel radius-10 text-center" style="background-color: #c8e6c9;">
|
||||
<div class="card-body">
|
||||
<h6 class="mb-2">Lezioni Programmate</h6>
|
||||
<h3 class="mb-0 text-primary">5</h3>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Ticket da programmare -->
|
||||
<div class="col-12 col-md-4 mb-3">
|
||||
<div class="card card-pastel radius-10 text-center" style="background-color: #f8bbd0;">
|
||||
<div class="card-body">
|
||||
<h6 class="mb-2">Ticket da Programmare</h6>
|
||||
<h3 class="mb-0 text-primary">3</h3>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Lezioni da confermare -->
|
||||
<div class="col-12 col-md-4 mb-3">
|
||||
<div class="card card-pastel radius-10 text-center" style="background-color: #bbdefb;">
|
||||
<div class="card-body">
|
||||
<h6 class="mb-2">Lezioni da Confermare</h6>
|
||||
<h3 class="mb-0 text-primary">2</h3>
|
||||
</div>
|
||||
<!-- PROFILO + STATISTICHE -->
|
||||
<div class="row g-4 mb-5">
|
||||
<div class="col-lg-4">
|
||||
<div class="card stat-card text-center h-100">
|
||||
<div class="card-body">
|
||||
<img src="<?php echo $avatar; ?>" alt="Avatar" class="rounded-circle avatar-circle mb-3">
|
||||
<h5><?php echo htmlspecialchars($user['first_name'] . ' ' . $user['last_name']); ?></h5>
|
||||
<p class="text-muted"><?php echo htmlspecialchars($user['email']); ?></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Sezione delle lezioni future -->
|
||||
<div class="card card-pastel radius-10 mt-4">
|
||||
<div class="card-header">
|
||||
<div class="d-flex align-items-center">
|
||||
<div>
|
||||
<h6 class="mb-0">Le tue Lezioni Future</h6>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<!-- Header con calendario e filtri -->
|
||||
<div class="calendar-header">
|
||||
<!-- Calendario per cambiare mese -->
|
||||
<div>
|
||||
<input type="month" id="monthPicker" value="2025-04" class="form-control" style="width: 150px;">
|
||||
</div>
|
||||
<!-- Filtri -->
|
||||
<div>
|
||||
<button class="filter-btn active">Programmate</button>
|
||||
<button class="filter-btn">Effettuate</button>
|
||||
<button class="filter-btn">Perse</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Lista delle lezioni -->
|
||||
<div class="row">
|
||||
<!-- Lezione 1 -->
|
||||
<div class="col-12 col-md-6 mb-3">
|
||||
<div class="card lesson-card radius-10">
|
||||
<div class="card-body d-flex justify-content-between align-items-center">
|
||||
<div class="lesson-details">
|
||||
<h6 class="mb-1">Yoga Flow</h6>
|
||||
<p class="text-muted">15 Apr 2025, 18:00</p>
|
||||
<p class="text-muted">Scuola: Yoga Harmony</p>
|
||||
<p class="text-muted">Via Roma 12, Milano</p>
|
||||
</div>
|
||||
<button class="reschedule-btn">Riprogramma</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Lezione 2 -->
|
||||
<div class="col-12 col-md-6 mb-3">
|
||||
<div class="card lesson-card radius-10">
|
||||
<div class="card-body d-flex justify-content-between align-items-center">
|
||||
<div class="lesson-details">
|
||||
<h6 class="mb-1">Hatha Yoga</h6>
|
||||
<p class="text-muted">20 Apr 2025, 09:00</p>
|
||||
<p class="text-muted">Scuola: Zen Studio</p>
|
||||
<p class="text-muted">Corso Italia 45, Torino</p>
|
||||
</div>
|
||||
<button class="reschedule-btn">Riprogramma</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Nuova Sezione: Riepilogo Ordini -->
|
||||
<div class="card card-pastel radius-10 mt-4">
|
||||
<div class="card-header">
|
||||
<div class="d-flex align-items-center">
|
||||
<div>
|
||||
<h6 class="mb-0">I tuoi Ordini</h6>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<?php if (empty($orders)): ?>
|
||||
<p class="text-center text-muted">Non hai ancora effettuato ordini per questa scuola.</p>
|
||||
<?php else: ?>
|
||||
<div class="row">
|
||||
<?php foreach ($orders as $order): ?>
|
||||
<div class="col-12 col-md-6 mb-3">
|
||||
<div class="card order-card radius-10">
|
||||
<div class="card-body">
|
||||
<div class="order-details">
|
||||
<h6 class="mb-1">Ordine #<?php echo htmlspecialchars($order['order_number']); ?></h6>
|
||||
<p class="text-muted">Data: <?php echo date('d/m/Y H:i', strtotime($order['created_at'])); ?></p>
|
||||
<p><strong>Prodotto:</strong> <?php echo htmlspecialchars($order['product_name']); ?></p>
|
||||
<p><strong>Variazione:</strong> <?php echo htmlspecialchars($order['variation_name']); ?></p>
|
||||
<?php if (!empty($order['class_name'])): ?>
|
||||
<p><strong>Classe:</strong> <?php echo htmlspecialchars($order['class_name'] . ' - ' . $order['level'] . ' (' . $order['day_of_week'] . ')'); ?></p>
|
||||
<?php endif; ?>
|
||||
<p><strong>Entrate Totali:</strong> <?php echo $order['total_entries']; ?></p>
|
||||
<p><strong>Recuperi Disponibili:</strong> <?php echo $order['available_recoveries']; ?></p>
|
||||
<?php if (!empty($order['expiration_date'])): ?>
|
||||
<p><strong>Valido fino al:</strong> <?php echo date('d/m/Y', strtotime($order['expiration_date'])); ?></p>
|
||||
<?php endif; ?>
|
||||
<p class="price"><strong>Prezzo:</strong> €<?php echo number_format($order['price'], 2); ?></p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-8">
|
||||
<div class="row g-4">
|
||||
<div class="col-md-4">
|
||||
<div class="card stat-card text-center h-100">
|
||||
<div class="card-body">
|
||||
<h3 class="text-primary fw-bold"><?php echo count($orders); ?></h3>
|
||||
<p class="mb-0">Ordini totali</p>
|
||||
</div>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="card stat-card text-center h-100">
|
||||
<div class="card-body">
|
||||
<h3 class="text-success fw-bold">€<?php echo number_format($total_spent, 2); ?></h3>
|
||||
<p class="mb-0">Speso in totale</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="card stat-card text-center h-100">
|
||||
<div class="card-body">
|
||||
<h3 class="text-info fw-bold"><?php echo $available_entries; ?></h3>
|
||||
<p class="mb-0">Ingressi disponibili</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- I TUOI ORDINI -->
|
||||
<div class="card radius-20 shadow-lg">
|
||||
<div class="card-header bg-primary text-white d-flex justify-content-between align-items-center">
|
||||
<h4 class="mb-0">I tuoi ordini</h4>
|
||||
<span class="badge bg-light text-dark"><?php echo count($orders); ?> totali</span>
|
||||
</div>
|
||||
<div class="card-body p-0">
|
||||
<?php if (empty($orders)): ?>
|
||||
<div class="text-center py-5">
|
||||
<i class="bx bx-package bx-lg text-muted"></i>
|
||||
<h5 class="text-muted mt-3">Non hai ancora effettuato ordini</h5>
|
||||
<a href="products.php" class="btn btn-primary mt-3">Vai ai corsi</a>
|
||||
</div>
|
||||
<?php else: ?>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-hover align-middle mb-0">
|
||||
<thead class="table-pastel">
|
||||
<tr>
|
||||
<th>Data</th>
|
||||
<th>Ordine</th>
|
||||
<th>Prodotto</th>
|
||||
<th>Ingressi</th>
|
||||
<th>Scadenza</th>
|
||||
<th>Prezzo</th>
|
||||
<th>Stato</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach ($orders as $o): ?>
|
||||
<tr class="table-light">
|
||||
<td><?php echo date('d/m/Y', strtotime($o['created_at'])); ?></td>
|
||||
<td><strong>#<?php echo $o['order_number']; ?></strong></td>
|
||||
<td>
|
||||
<strong><?php echo htmlspecialchars($o['product_name']); ?></strong>
|
||||
<?php if ($o['variation_name']): ?>
|
||||
<br><small class="text-success"><?php echo htmlspecialchars($o['variation_name']); ?></small>
|
||||
<?php endif; ?>
|
||||
<?php if ($o['class_name']): ?>
|
||||
<br><small class="text-info"><?php echo htmlspecialchars($o['class_name']); ?></small>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<td>
|
||||
<?php if ($o['available_entries'] != $o['total_entries']): ?>
|
||||
<span class="text-success"><?php echo $o['available_entries']; ?></span>/<?php echo $o['total_entries']; ?>
|
||||
<?php else: ?>
|
||||
<?php echo $o['total_entries']; ?>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<td>
|
||||
<?php if ($o['expiration_date']): ?>
|
||||
<span class="<?php echo strtotime($o['expiration_date']) < time() ? 'text-danger' : 'text-warning'; ?>">
|
||||
<?php echo date('d/m/Y', strtotime($o['expiration_date'])); ?>
|
||||
</span>
|
||||
<?php else: ?>
|
||||
<em>Nessuna</em>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<td class="text-success fw-bold">€<?php echo number_format($o['price'], 2); ?></td>
|
||||
<td>
|
||||
<span class="badge-soft <?php echo $o['status'] == 'completed' ? 'bg-success' : ($o['status'] == 'pending' ? 'bg-warning' : 'bg-secondary'); ?>">
|
||||
<?php echo ucfirst($o['status']); ?>
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</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'); ?>
|
||||
<!-- Modal Cambia Scuola -->
|
||||
<div class="modal fade" id="changeSchoolModal" tabindex="-1">
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header bg-primary text-white">
|
||||
<h5 class="modal-title">Scegli la scuola</h5>
|
||||
<button type="button" class="btn-close btn-close-white" data-bs-dismiss="modal"></button>
|
||||
</div>
|
||||
<div class="modal-body text-center py-5">
|
||||
<i class="bx bx-building-house bx-lg text-muted"></i>
|
||||
<h4 class="mt-3 text-muted">Le tue scuole</h4>
|
||||
<p class="text-muted">Qui compariranno tutte le scuole in cui sei iscritto</p>
|
||||
<div class="spinner-border text-primary mt-4" role="status">
|
||||
<span class="visually-hidden">Caricamento...</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
Reference in New Issue
Block a user