fixed pages
This commit is contained in:
@@ -0,0 +1,30 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
use Phinx\Migration\AbstractMigration;
|
||||||
|
|
||||||
|
final class AddPropagationTracking extends AbstractMigration
|
||||||
|
{
|
||||||
|
public function change(): void
|
||||||
|
{
|
||||||
|
// Tabella che raggruppa ogni propagazione
|
||||||
|
$table = $this->table('propagation', ['id' => 'idpropagation']);
|
||||||
|
$table->addColumn('idservice', 'integer')
|
||||||
|
->addColumn('token', 'string', ['limit' => 64])
|
||||||
|
->addColumn('startdate', 'date', ['null' => true])
|
||||||
|
->addColumn('enddate', 'date', ['null' => true])
|
||||||
|
->addColumn('created_at', 'datetime', ['default' => 'CURRENT_TIMESTAMP'])
|
||||||
|
->addIndex(['token'], ['unique' => true])
|
||||||
|
->addIndex(['idservice'])
|
||||||
|
->create();
|
||||||
|
|
||||||
|
// Campo token sulle singole occorrenze del calendario
|
||||||
|
$schedule = $this->table('serviceschedule');
|
||||||
|
if (!$schedule->hasColumn('propagation_token')) {
|
||||||
|
$schedule->addColumn('propagation_token', 'string', ['limit' => 64, 'null' => true])
|
||||||
|
->addIndex(['propagation_token'])
|
||||||
|
->update();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
use Phinx\Migration\AbstractMigration;
|
||||||
|
|
||||||
|
final class FixPropagationCollation extends AbstractMigration
|
||||||
|
{
|
||||||
|
public function up(): void
|
||||||
|
{
|
||||||
|
$this->execute(
|
||||||
|
"ALTER TABLE propagation CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci"
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function down(): void
|
||||||
|
{
|
||||||
|
$this->execute(
|
||||||
|
"ALTER TABLE propagation CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci"
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -69,6 +69,20 @@ $services = $pdo->query(
|
|||||||
LEFT JOIN servicecategory ON service.category = servicecategory.idservicecategory
|
LEFT JOIN servicecategory ON service.category = servicecategory.idservicecategory
|
||||||
ORDER BY service.servicename"
|
ORDER BY service.servicename"
|
||||||
)->fetchAll();
|
)->fetchAll();
|
||||||
|
|
||||||
|
// Propagazioni già effettuate, raggruppate per servizio
|
||||||
|
$propagationsByService = [];
|
||||||
|
$propRows = $pdo->query(
|
||||||
|
"SELECT p.idpropagation, p.idservice, p.token, p.startdate, p.enddate, p.created_at,
|
||||||
|
COUNT(s.idserviceschedule) AS occorrenze
|
||||||
|
FROM propagation p
|
||||||
|
LEFT JOIN serviceschedule s ON s.propagation_token = p.token
|
||||||
|
GROUP BY p.idpropagation
|
||||||
|
ORDER BY p.created_at DESC"
|
||||||
|
)->fetchAll();
|
||||||
|
foreach ($propRows as $pr) {
|
||||||
|
$propagationsByService[$pr['idservice']][] = $pr;
|
||||||
|
}
|
||||||
?>
|
?>
|
||||||
<!doctype html>
|
<!doctype html>
|
||||||
<html lang="it">
|
<html lang="it">
|
||||||
@@ -227,6 +241,21 @@ $services = $pdo->query(
|
|||||||
<?php if ($message === 'success') : ?>
|
<?php if ($message === 'success') : ?>
|
||||||
<div class="alert alert-success" role="alert">Propagazione avvenuta con successo.</div>
|
<div class="alert alert-success" role="alert">Propagazione avvenuta con successo.</div>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
<?php if ($message === 'propdeleted') : ?>
|
||||||
|
<div class="alert alert-success" role="alert">Propagazione eliminata con successo.</div>
|
||||||
|
<?php endif; ?>
|
||||||
|
<?php if ($message === 'confirmdelete') : ?>
|
||||||
|
<div class="alert alert-warning" role="alert">
|
||||||
|
Attenzione: questa propagazione ha <strong><?php echo (int) ($_GET['count'] ?? 0); ?></strong> prenotazioni utente collegate.
|
||||||
|
Vuoi eliminarla comunque insieme alle lezioni?
|
||||||
|
<a href="cancelpropagation.php?token=<?php echo e($_GET['token'] ?? ''); ?>&confirm=Y"
|
||||||
|
class="btn btn-danger btn-sm ms-2"
|
||||||
|
onclick="return confirm('Confermi la cancellazione definitiva?');">
|
||||||
|
Sì, elimina tutto
|
||||||
|
</a>
|
||||||
|
<a href="admin-services.php" class="btn btn-secondary btn-sm ms-1">Annulla</a>
|
||||||
|
</div>
|
||||||
|
<?php endif; ?>
|
||||||
<?php if ($insertFeedback) : ?>
|
<?php if ($insertFeedback) : ?>
|
||||||
<div class="alert alert-<?php echo $insertFeedback['type'] === 'success' ? 'success' : 'danger'; ?>" role="alert">
|
<div class="alert alert-<?php echo $insertFeedback['type'] === 'success' ? 'success' : 'danger'; ?>" role="alert">
|
||||||
<?php echo e($insertFeedback['text']); ?>
|
<?php echo e($insertFeedback['text']); ?>
|
||||||
@@ -401,6 +430,40 @@ $services = $pdo->query(
|
|||||||
<input type="hidden" name="durationtime" value="<?php echo e($svc['classduration']); ?>">
|
<input type="hidden" name="durationtime" value="<?php echo e($svc['classduration']); ?>">
|
||||||
<button type="submit" class="btn btn-primary btn-save">Propaga sul calendario</button>
|
<button type="submit" class="btn btn-primary btn-save">Propaga sul calendario</button>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
|
<?php $props = $propagationsByService[$svc['idservice']] ?? []; ?>
|
||||||
|
<?php if (!empty($props)) : ?>
|
||||||
|
<hr>
|
||||||
|
<div class="section-title" style="font-size:13px;">Propagazioni effettuate</div>
|
||||||
|
<table class="table table-sm mt-2 mb-0">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>Inizio</th>
|
||||||
|
<th>Fine</th>
|
||||||
|
<th>Lezioni</th>
|
||||||
|
<th>Token</th>
|
||||||
|
<th class="text-end">Azioni</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<?php foreach ($props as $p) : ?>
|
||||||
|
<tr>
|
||||||
|
<td><?php echo e($p['startdate']); ?></td>
|
||||||
|
<td><?php echo e($p['enddate']); ?></td>
|
||||||
|
<td><?php echo e($p['occorrenze']); ?></td>
|
||||||
|
<td><code style="font-size:11px;"><?php echo e(substr((string)$p['token'], 0, 10)); ?>…</code></td>
|
||||||
|
<td class="text-end">
|
||||||
|
<a href="cancelpropagation.php?token=<?php echo e($p['token']); ?>"
|
||||||
|
class="btn btn-danger btn-sm"
|
||||||
|
onclick="return confirm('Eliminare questa propagazione e tutte le sue lezioni?');">
|
||||||
|
Elimina
|
||||||
|
</a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
<?php endif; ?>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|||||||
+75
-2
@@ -53,6 +53,16 @@ $stmtSchedule = $pdo->prepare($sqlSchedule);
|
|||||||
$stmtSchedule->execute([':start' => $currentMonthStart, ':end' => $currentMonthEnd]);
|
$stmtSchedule->execute([':start' => $currentMonthStart, ':end' => $currentMonthEnd]);
|
||||||
$scheduleRows = $stmtSchedule->fetchAll();
|
$scheduleRows = $stmtSchedule->fetchAll();
|
||||||
|
|
||||||
|
// Tipologie di classe presenti nel mese (per la barra filtri), con relativo colore
|
||||||
|
$classTypes = [];
|
||||||
|
foreach ($scheduleRows as $r) {
|
||||||
|
$name = $r['servicename'] ?? '';
|
||||||
|
if ($name !== '' && !isset($classTypes[$name])) {
|
||||||
|
$classTypes[$name] = $r['colorclass'] ?: '#1ebf73';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
ksort($classTypes);
|
||||||
|
|
||||||
$bookingsBySchedule = [];
|
$bookingsBySchedule = [];
|
||||||
$scheduleIds = array_filter(array_map(fn($r) => (int) $r['idserviceschedule'], $scheduleRows));
|
$scheduleIds = array_filter(array_map(fn($r) => (int) $r['idserviceschedule'], $scheduleRows));
|
||||||
|
|
||||||
@@ -114,6 +124,46 @@ $italianMonths = [
|
|||||||
margin: 10px 0 26px;
|
margin: 10px 0 26px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.class-filters {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
gap: 8px;
|
||||||
|
justify-content: center;
|
||||||
|
margin: 0 0 26px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.filter-chip {
|
||||||
|
display: inline-flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 7px;
|
||||||
|
border: 1px solid #e2e4e9;
|
||||||
|
background: #fff;
|
||||||
|
color: #374151;
|
||||||
|
font-size: 13px;
|
||||||
|
font-weight: 600;
|
||||||
|
padding: 7px 14px;
|
||||||
|
border-radius: 20px;
|
||||||
|
cursor: pointer;
|
||||||
|
transition: all 0.15s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.filter-chip:hover {
|
||||||
|
border-color: #1ebf73;
|
||||||
|
}
|
||||||
|
|
||||||
|
.filter-chip.active {
|
||||||
|
background: #1ebf73;
|
||||||
|
border-color: #1ebf73;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.filter-dot {
|
||||||
|
width: 12px;
|
||||||
|
height: 12px;
|
||||||
|
border-radius: 50%;
|
||||||
|
border: 1px solid rgba(0, 0, 0, 0.1);
|
||||||
|
}
|
||||||
|
|
||||||
.month-navigation h2 {
|
.month-navigation h2 {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
font-size: 22px;
|
font-size: 22px;
|
||||||
@@ -497,6 +547,18 @@ $italianMonths = [
|
|||||||
<a href="?next_month=<?php echo e(date('Y-m', strtotime('+1 month', strtotime($currentMonthStart)))); ?>"><i class="fas fa-chevron-right fa-2x"></i></a>
|
<a href="?next_month=<?php echo e(date('Y-m', strtotime('+1 month', strtotime($currentMonthStart)))); ?>"><i class="fas fa-chevron-right fa-2x"></i></a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<?php if (!empty($classTypes)) : ?>
|
||||||
|
<div class="class-filters">
|
||||||
|
<button type="button" class="filter-chip active" data-filter="__all__">Tutte</button>
|
||||||
|
<?php foreach ($classTypes as $typeName => $typeColor) : ?>
|
||||||
|
<button type="button" class="filter-chip" data-filter="<?php echo e($typeName); ?>">
|
||||||
|
<span class="filter-dot" style="background: <?php echo e($typeColor); ?>;"></span>
|
||||||
|
<?php echo e($typeName); ?>
|
||||||
|
</button>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
</div>
|
||||||
|
<?php endif; ?>
|
||||||
|
|
||||||
<?php if (empty($scheduleRows)) : ?>
|
<?php if (empty($scheduleRows)) : ?>
|
||||||
<div class="empty-month">
|
<div class="empty-month">
|
||||||
<i class="fas fa-calendar-xmark fa-2x mb-2"></i>
|
<i class="fas fa-calendar-xmark fa-2x mb-2"></i>
|
||||||
@@ -519,12 +581,12 @@ $italianMonths = [
|
|||||||
$isFull = $maxcap > 0 && $countPersons >= $maxcap;
|
$isFull = $maxcap > 0 && $countPersons >= $maxcap;
|
||||||
$colorclass = $sch['colorclass'] ?: '#e6f3ff';
|
$colorclass = $sch['colorclass'] ?: '#e6f3ff';
|
||||||
?>
|
?>
|
||||||
<div class="class-card" data-date="<?php echo e($dateObj->format('Y-m-d')); ?>">
|
<div class="class-card" data-date="<?php echo e($dateObj->format('Y-m-d')); ?>" data-type="<?php echo e($sch['servicename']); ?>">
|
||||||
<div class="class-date">
|
<div class="class-date">
|
||||||
<div class="day"><?php echo e($dayNum); ?></div>
|
<div class="day"><?php echo e($dayNum); ?></div>
|
||||||
<div class="month"><?php echo e($monthIt); ?></div>
|
<div class="month"><?php echo e($monthIt); ?></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="class-body" style="border-left: 6px solid <?php echo e($colorclass); ?>;">
|
<div class="class-body" style="border-left: 20px solid <?php echo e($colorclass); ?>;">
|
||||||
<h3 class="class-title">
|
<h3 class="class-title">
|
||||||
<?php echo e($sch['servicename']); ?>
|
<?php echo e($sch['servicename']); ?>
|
||||||
<span class="capacity-pill <?php echo $isFull ? 'full' : ''; ?>">
|
<span class="capacity-pill <?php echo $isFull ? 'full' : ''; ?>">
|
||||||
@@ -692,6 +754,17 @@ $italianMonths = [
|
|||||||
}
|
}
|
||||||
|
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
|
// Filtro per tipologia di classe
|
||||||
|
$(document).on('click', '.filter-chip', function() {
|
||||||
|
var filter = $(this).data('filter');
|
||||||
|
$('.filter-chip').removeClass('active');
|
||||||
|
$(this).addClass('active');
|
||||||
|
$('.class-card').each(function() {
|
||||||
|
var show = (filter === '__all__') || ($(this).data('type') === filter);
|
||||||
|
$(this).toggle(show);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
// Scroll automatico alla classe di oggi o alla prima futura
|
// Scroll automatico alla classe di oggi o alla prima futura
|
||||||
(function scrollToToday() {
|
(function scrollToToday() {
|
||||||
var cards = document.querySelectorAll('.class-card[data-date]');
|
var cards = document.querySelectorAll('.class-card[data-date]');
|
||||||
|
|||||||
+51
-38
@@ -177,66 +177,70 @@ $conn->close();
|
|||||||
|
|
||||||
<style>
|
<style>
|
||||||
.custom-card {
|
.custom-card {
|
||||||
margin: 10px auto;
|
background: #fff;
|
||||||
display: flex;
|
border-radius: 14px;
|
||||||
width: 90%;
|
box-shadow: 0 3px 16px rgba(0, 0, 0, 0.06);
|
||||||
max-width: 700px;
|
|
||||||
background-color: white;
|
|
||||||
box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.1);
|
|
||||||
border-radius: 8px;
|
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
margin-bottom: 18px;
|
||||||
|
display: flex;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
transition: transform 0.2s;
|
transition: box-shadow 0.2s;
|
||||||
}
|
}
|
||||||
|
|
||||||
.custom-card:hover {
|
.custom-card:hover {
|
||||||
transform: translateY(-5px);
|
box-shadow: 0 6px 22px rgba(0, 0, 0, 0.1);
|
||||||
}
|
}
|
||||||
|
|
||||||
.custom-date-box {
|
.custom-date-box {
|
||||||
flex: 1;
|
flex: 0 0 110px;
|
||||||
background-color: red;
|
color: #fff;
|
||||||
color: white;
|
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
padding: 0;
|
padding: 16px;
|
||||||
font-size: 60px;
|
|
||||||
font-weight: bold;
|
|
||||||
border-top-left-radius: 8px;
|
|
||||||
border-bottom-left-radius: 8px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.custom-day {
|
.custom-day {
|
||||||
|
font-size: 44px;
|
||||||
|
font-weight: 800;
|
||||||
line-height: 1;
|
line-height: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
.custom-month {
|
.custom-month {
|
||||||
font-size: 28px;
|
font-size: 18px;
|
||||||
|
text-transform: uppercase;
|
||||||
|
letter-spacing: 0.05em;
|
||||||
}
|
}
|
||||||
|
|
||||||
.custom-event-details {
|
.custom-event-details {
|
||||||
flex: 2;
|
flex: 1;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
padding: 10px 20px;
|
padding: 18px 22px;
|
||||||
background-color: lightblue;
|
background: #fff;
|
||||||
|
border-left: 20px solid #ccc;
|
||||||
|
/* colore impostato inline per ogni card in base allo stato */
|
||||||
}
|
}
|
||||||
|
|
||||||
.custom-heading {
|
.custom-heading {
|
||||||
margin-top: 0;
|
font-size: 19px;
|
||||||
font-size: 24px;
|
font-weight: 700;
|
||||||
|
color: #1f2937;
|
||||||
|
margin: 0 0 4px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.custom-paragraph {
|
.custom-paragraph {
|
||||||
margin-bottom: 5px;
|
color: #6b7280;
|
||||||
|
font-size: 14px;
|
||||||
|
margin-bottom: 3px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.custom-actions {
|
.custom-actions {
|
||||||
display: none;
|
display: none;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
justify-content: space-between;
|
gap: 8px;
|
||||||
|
flex-wrap: wrap;
|
||||||
margin-top: 10px;
|
margin-top: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -245,16 +249,19 @@ $conn->close();
|
|||||||
}
|
}
|
||||||
|
|
||||||
.custom-action-button {
|
.custom-action-button {
|
||||||
background-color: #f0f0f0;
|
|
||||||
border: none;
|
border: none;
|
||||||
padding: 8px 12px;
|
border-radius: 8px;
|
||||||
border-radius: 4px;
|
padding: 7px 14px;
|
||||||
|
font-size: 13px;
|
||||||
|
font-weight: 600;
|
||||||
|
background: #eef2f7;
|
||||||
|
color: #374151;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
transition: background-color 0.2s;
|
transition: filter 0.15s;
|
||||||
}
|
}
|
||||||
|
|
||||||
.custom-action-button:hover {
|
.custom-action-button:hover {
|
||||||
background-color: #e0e0e0;
|
filter: brightness(0.94);
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (max-width: 768px) {
|
@media (max-width: 768px) {
|
||||||
@@ -262,14 +269,20 @@ $conn->close();
|
|||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
}
|
}
|
||||||
|
|
||||||
.custom-date-box,
|
.custom-date-box {
|
||||||
.custom-event-details {
|
flex: 0 0 auto;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
border-radius: 0;
|
flex-direction: row;
|
||||||
|
gap: 10px;
|
||||||
|
padding: 12px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.custom-event-time {
|
.custom-day {
|
||||||
font-size: 24px;
|
font-size: 30px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.custom-month {
|
||||||
|
font-size: 18px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -531,11 +544,11 @@ $conn->close();
|
|||||||
<div class="custom-month"><?php echo $monthInItalian; ?></div>
|
<div class="custom-month"><?php echo $monthInItalian; ?></div>
|
||||||
</div>
|
</div>
|
||||||
<?php if ($alreadybooked == 'Y') { ?>
|
<?php if ($alreadybooked == 'Y') { ?>
|
||||||
<div class="custom-event-details" style="background-color:#FFAC7A">
|
<div class="custom-event-details" style="background-color:#FFAC7A;border-left-color:#FF6609">
|
||||||
<?php } elseif ($freeplace > 0) { ?>
|
<?php } elseif ($freeplace > 0) { ?>
|
||||||
<div class="custom-event-details" style="background-color:<?php echo ($bookedclass->getColumnVal("colorclass")); ?>">
|
<div class="custom-event-details" style="border-left-color:<?php echo ($bookedclass->getColumnVal("colorclass")); ?>">
|
||||||
<?php } else { ?>
|
<?php } else { ?>
|
||||||
<div class="custom-event-details" style="background-color:#CDCDCD">
|
<div class="custom-event-details" style="background-color:#CDCDCD;border-left-color:#9C9C9C">
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<h2 class="custom-heading"><?php echo ($bookedclass->getColumnVal("servicename")); ?> -<?php echo $countPersons; ?>/<?php echo ($bookedclass->getColumnVal("maxcapacity")); ?></h2>
|
<h2 class="custom-heading"><?php echo ($bookedclass->getColumnVal("servicename")); ?> -<?php echo $countPersons; ?>/<?php echo ($bookedclass->getColumnVal("maxcapacity")); ?></h2>
|
||||||
<p class="custom-paragraph">Quando: <?php echo $newDateFormat; ?></p>
|
<p class="custom-paragraph">Quando: <?php echo $newDateFormat; ?></p>
|
||||||
|
|||||||
+174
-154
@@ -1,12 +1,15 @@
|
|||||||
<?php require_once('include/headscript.php'); ?>
|
<?php require_once('include/headscript.php'); ?>
|
||||||
<?php // require_once('Connections/bkngstm.php'); ?>
|
<?php // require_once('Connections/bkngstm.php');
|
||||||
<?php // require_once('webassist/mysqli/rsobj.php'); ?>
|
?>
|
||||||
<?php // require_once('webassist/mysqli/queryobj.php'); ?>
|
<?php // require_once('webassist/mysqli/rsobj.php');
|
||||||
|
?>
|
||||||
|
<?php // require_once('webassist/mysqli/queryobj.php');
|
||||||
|
?>
|
||||||
<?php // optionquery
|
<?php // optionquery
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$optionquery = new WA_MySQLi_RS("optionquery",$bkngstm,0);
|
$optionquery = new WA_MySQLi_RS("optionquery", $bkngstm, 0);
|
||||||
$optionquery->setQuery("SELECT * FROM option");
|
$optionquery->setQuery("SELECT * FROM option");
|
||||||
$optionquery->execute();
|
$optionquery->execute();
|
||||||
?>
|
?>
|
||||||
@@ -65,7 +68,7 @@ if (isset($_GET['idserviceordered'])) {
|
|||||||
}
|
}
|
||||||
if (isset($_POST['idserviceordered'])) {
|
if (isset($_POST['idserviceordered'])) {
|
||||||
$idserviceordered = $_POST['idserviceordered'];
|
$idserviceordered = $_POST['idserviceordered'];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Query sulla tabella associateclass
|
// Query sulla tabella associateclass
|
||||||
@@ -128,13 +131,12 @@ $result = $conn->query($query);
|
|||||||
|
|
||||||
if (!$result) {
|
if (!$result) {
|
||||||
die("Query fallita: " . $conn->error);
|
die("Query fallita: " . $conn->error);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($result->num_rows > 0) {
|
if ($result->num_rows > 0) {
|
||||||
while ($row = $result->fetch_assoc()) {
|
while ($row = $result->fetch_assoc()) {
|
||||||
$idOrdine = $row["idorderbook"];
|
$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
|
$totalTickets = 0; // Imposta a zero se non ci sono righe nella query
|
||||||
@@ -169,8 +171,6 @@ if ($result) {
|
|||||||
$totalRecords = $row['total'];
|
$totalRecords = $row['total'];
|
||||||
$passedRecords = $row['passed'];
|
$passedRecords = $row['passed'];
|
||||||
$futureRecords = $row['future'];
|
$futureRecords = $row['future'];
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
// Chiusura della connessione
|
// Chiusura della connessione
|
||||||
$conn->close();
|
$conn->close();
|
||||||
@@ -179,10 +179,10 @@ $conn->close();
|
|||||||
<!doctype html>
|
<!doctype html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
|
|
||||||
<meta charset="utf-8" />
|
<meta charset="utf-8" />
|
||||||
<title>YogiBook - Prenotazioni YogaSoul</title>
|
<title>YogiBook - Prenotazioni YogaSoul</title>
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<meta content="YogiBook - Prenotazione facile YogaSOul" name="description" />
|
<meta content="YogiBook - Prenotazione facile YogaSOul" name="description" />
|
||||||
<meta content="Advanced Creative Solutions" name="author" />
|
<meta content="Advanced Creative Solutions" name="author" />
|
||||||
@@ -195,72 +195,76 @@ $conn->close();
|
|||||||
<link href="assets/css/icons.min.css" rel="stylesheet" type="text/css" />
|
<link href="assets/css/icons.min.css" rel="stylesheet" type="text/css" />
|
||||||
<!-- App Css-->
|
<!-- App Css-->
|
||||||
<link href="assets/css/app.min.css" id="app-style" 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">
|
<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>
|
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@10"></script>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
.custom-card {
|
.custom-card {
|
||||||
margin: 10px auto;
|
background: #fff;
|
||||||
display: flex;
|
border-radius: 14px;
|
||||||
width: 90%;
|
box-shadow: 0 3px 16px rgba(0, 0, 0, 0.06);
|
||||||
max-width: 700px;
|
|
||||||
background-color: white;
|
|
||||||
box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.1);
|
|
||||||
border-radius: 8px;
|
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
margin-bottom: 18px;
|
||||||
|
display: flex;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
transition: transform 0.2s;
|
transition: box-shadow 0.2s;
|
||||||
}
|
}
|
||||||
|
|
||||||
.custom-card:hover {
|
.custom-card:hover {
|
||||||
transform: translateY(-5px);
|
box-shadow: 0 6px 22px rgba(0, 0, 0, 0.1);
|
||||||
}
|
}
|
||||||
|
|
||||||
.custom-date-box {
|
.custom-date-box {
|
||||||
flex: 1;
|
flex: 0 0 110px;
|
||||||
background-color: red;
|
color: #fff;
|
||||||
color: white;
|
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
padding: 0;
|
padding: 16px;
|
||||||
font-size: 60px;
|
|
||||||
font-weight: bold;
|
|
||||||
border-top-left-radius: 8px;
|
|
||||||
border-bottom-left-radius: 8px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.custom-day {
|
.custom-day {
|
||||||
|
font-size: 44px;
|
||||||
|
font-weight: 800;
|
||||||
line-height: 1;
|
line-height: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
.custom-month {
|
.custom-month {
|
||||||
font-size: 28px;
|
font-size: 18px;
|
||||||
|
text-transform: uppercase;
|
||||||
|
letter-spacing: 0.05em;
|
||||||
}
|
}
|
||||||
|
|
||||||
.custom-event-details {
|
.custom-event-details {
|
||||||
flex: 2;
|
flex: 1;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
padding: 10px 20px;
|
padding: 18px 22px;
|
||||||
background-color: lightblue;
|
background: #fff;
|
||||||
|
border-left: 20px solid #ccc;
|
||||||
|
/* colore impostato inline per ogni card in base allo stato */
|
||||||
}
|
}
|
||||||
|
|
||||||
.custom-heading {
|
.custom-heading {
|
||||||
margin-top: 0;
|
font-size: 19px;
|
||||||
font-size: 24px;
|
font-weight: 700;
|
||||||
|
color: #1f2937;
|
||||||
|
margin: 0 0 4px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.custom-paragraph {
|
.custom-paragraph {
|
||||||
margin-bottom: 5px;
|
color: #6b7280;
|
||||||
|
font-size: 14px;
|
||||||
|
margin-bottom: 3px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.custom-actions {
|
.custom-actions {
|
||||||
display: none;
|
display: none;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
justify-content: space-between;
|
gap: 8px;
|
||||||
|
flex-wrap: wrap;
|
||||||
margin-top: 10px;
|
margin-top: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -269,16 +273,19 @@ $conn->close();
|
|||||||
}
|
}
|
||||||
|
|
||||||
.custom-action-button {
|
.custom-action-button {
|
||||||
background-color: #f0f0f0;
|
|
||||||
border: none;
|
border: none;
|
||||||
padding: 8px 12px;
|
border-radius: 8px;
|
||||||
border-radius: 4px;
|
padding: 7px 14px;
|
||||||
|
font-size: 13px;
|
||||||
|
font-weight: 600;
|
||||||
|
background: #eef2f7;
|
||||||
|
color: #374151;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
transition: background-color 0.2s;
|
transition: filter 0.15s;
|
||||||
}
|
}
|
||||||
|
|
||||||
.custom-action-button:hover {
|
.custom-action-button:hover {
|
||||||
background-color: #e0e0e0;
|
filter: brightness(0.94);
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (max-width: 768px) {
|
@media (max-width: 768px) {
|
||||||
@@ -286,38 +293,44 @@ $conn->close();
|
|||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
}
|
}
|
||||||
|
|
||||||
.custom-date-box, .custom-event-details {
|
.custom-date-box {
|
||||||
|
flex: 0 0 auto;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
border-radius: 0;
|
flex-direction: row;
|
||||||
|
gap: 10px;
|
||||||
|
padding: 12px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.custom-event-time {
|
.custom-day {
|
||||||
font-size: 24px;
|
font-size: 30px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.custom-month {
|
||||||
|
font-size: 18px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<style>
|
<style>
|
||||||
.month-navigation {
|
.month-navigation {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
margin-bottom: 20px;
|
margin-bottom: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.month-nav-button {
|
.month-nav-button {
|
||||||
background: none;
|
background: none;
|
||||||
border: none;
|
border: none;
|
||||||
font-size: 24px;
|
font-size: 24px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
.current-month {
|
.current-month {
|
||||||
font-size: 24px;
|
font-size: 24px;
|
||||||
margin: 0 20px;
|
margin: 0 20px;
|
||||||
}
|
}
|
||||||
|
</style>
|
||||||
</style>
|
<script>
|
||||||
<script>
|
|
||||||
function confirmDelete(id, deletePageUrl) {
|
function confirmDelete(id, deletePageUrl) {
|
||||||
Swal.fire({
|
Swal.fire({
|
||||||
title: "Sei sicuro?",
|
title: "Sei sicuro?",
|
||||||
@@ -334,75 +347,82 @@ $conn->close();
|
|||||||
window.location.href = `deleteclass.php?id=${id}`;
|
window.location.href = `deleteclass.php?id=${id}`;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
.pastel-color {
|
.pastel-color {
|
||||||
border: 1px solid #D1C4CC;
|
border: 1px solid #D1C4CC;
|
||||||
padding: 0px;
|
padding: 0px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
margin-right: 20px; /* Spazio tra i box */
|
margin-right: 20px;
|
||||||
|
/* Spazio tra i box */
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.pastel-color.blue {
|
.pastel-color.blue {
|
||||||
background-color: #D4E1F1; /* Azzurro pastello */
|
background-color: #D4E1F1;
|
||||||
|
/* Azzurro pastello */
|
||||||
}
|
}
|
||||||
|
|
||||||
.pastel-color.green {
|
.pastel-color.green {
|
||||||
background-color: #FFD8B5; /* Verde pastello */
|
background-color: #FFD8B5;
|
||||||
|
/* Verde pastello */
|
||||||
}
|
}
|
||||||
|
|
||||||
.pastel-color.pink {
|
.pastel-color.pink {
|
||||||
background-color: #C3E6CB; /* Rosa pastello */
|
background-color: #C3E6CB;
|
||||||
|
/* Rosa pastello */
|
||||||
}
|
}
|
||||||
|
|
||||||
.pastel-color.purple {
|
.pastel-color.purple {
|
||||||
background-color: #F4CCCC; /* Viola pastello */
|
background-color: #F4CCCC;
|
||||||
|
/* Viola pastello */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (max-width: 768px) {
|
@media (max-width: 768px) {
|
||||||
.pastel-color {
|
.pastel-color {
|
||||||
margin-right: 0; /* Rimuovi lo spazio tra i box */
|
margin-right: 0;
|
||||||
margin-bottom: 20px; /* Spazio tra i box */
|
/* Rimuovi lo spazio tra i box */
|
||||||
|
margin-bottom: 20px;
|
||||||
|
/* Spazio tra i box */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<style>
|
<style>
|
||||||
.booking-details {
|
.booking-details {
|
||||||
margin-top: 10px;
|
margin-top: 10px;
|
||||||
border-top: 1px solid #ccc;
|
border-top: 1px solid #ccc;
|
||||||
padding-top: 10px;
|
padding-top: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.booking-table {
|
.booking-table {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
border-collapse: collapse;
|
border-collapse: collapse;
|
||||||
margin-top: 10px;
|
margin-top: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.booking-table td {
|
.booking-table td {
|
||||||
padding: 5px;
|
padding: 5px;
|
||||||
border-bottom: 1px solid #ccc;
|
border-bottom: 1px solid #ccc;
|
||||||
}
|
}
|
||||||
|
|
||||||
.delete-button {
|
.delete-button {
|
||||||
background-color: #ff6347;
|
background-color: #ff6347;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
border: none;
|
border: none;
|
||||||
padding: 5px 10px;
|
padding: 5px 10px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
.delete-button:hover {
|
.delete-button:hover {
|
||||||
background-color: #d64937;
|
background-color: #d64937;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
<!-- <body data-layout="horizontal"> -->
|
<!-- <body data-layout="horizontal"> -->
|
||||||
|
|
||||||
@@ -520,8 +540,8 @@ $conn->close();
|
|||||||
<div class="text-sm-end">
|
<div class="text-sm-end">
|
||||||
<?php if ($toprogram > 0) {
|
<?php if ($toprogram > 0) {
|
||||||
echo '<button type="button" class="btn btn-info btn-rounded waves-effect waves-light mb-2 me-2" data-bs-toggle="modal" data-bs-target=".create-task"><i class="mdi mdi-plus me-1"></i> Programma Lezioni</button>';
|
echo '<button type="button" class="btn btn-info btn-rounded waves-effect waves-light mb-2 me-2" data-bs-toggle="modal" data-bs-target=".create-task"><i class="mdi mdi-plus me-1"></i> Programma Lezioni</button>';
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<button type="button" class="btn btn-success btn-rounded waves-effect waves-light mb-2 me-2" data-bs-toggle="modal" data-bs-target=".create-task"><i class="mdi mdi-plus me-1"></i> Acquista Pacchetto Lezioni</button>
|
<button type="button" class="btn btn-success btn-rounded waves-effect waves-light mb-2 me-2" data-bs-toggle="modal" data-bs-target=".create-task"><i class="mdi mdi-plus me-1"></i> Acquista Pacchetto Lezioni</button>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@@ -547,8 +567,8 @@ $conn->close();
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- Aggiungi le frecce per la navigazione tra i mesi -->
|
<!-- Aggiungi le frecce per la navigazione tra i mesi -->
|
||||||
<?php
|
<?php
|
||||||
$italianMonths = [
|
$italianMonths = [
|
||||||
"January" => "Gennaio",
|
"January" => "Gennaio",
|
||||||
"February" => "Febbraio",
|
"February" => "Febbraio",
|
||||||
@@ -562,47 +582,47 @@ $conn->close();
|
|||||||
"October" => "Ottobre",
|
"October" => "Ottobre",
|
||||||
"November" => "Novembre",
|
"November" => "Novembre",
|
||||||
"December" => "Dicembre"
|
"December" => "Dicembre"
|
||||||
];
|
];
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<div class="month-navigation">
|
<div class="month-navigation">
|
||||||
|
|
||||||
<a href="?prev_month=<?php echo date('Y-m', strtotime('-1 month', strtotime($currentMonthStart))); ?>&idserviceordered=<?php echo $idserviceordered; ?>&idorder=<?php echo $idorder; ?>" class="arrow-link">
|
<a href="?prev_month=<?php echo date('Y-m', strtotime('-1 month', strtotime($currentMonthStart))); ?>&idserviceordered=<?php echo $idserviceordered; ?>&idorder=<?php echo $idorder; ?>" class="arrow-link">
|
||||||
<i class="fas fa-chevron-left fa-2x"></i>
|
<i class="fas fa-chevron-left fa-2x"></i>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
<h2><?php echo $italianMonths[date("F", strtotime($currentMonthStart))] . ' ' . date("Y", strtotime($currentMonthStart)); ?></h2>
|
<h2><?php echo $italianMonths[date("F", strtotime($currentMonthStart))] . ' ' . date("Y", strtotime($currentMonthStart)); ?></h2>
|
||||||
<a href="?next_month=<?php echo date('Y-m', strtotime('+1 month', strtotime($currentMonthStart))); ?>&idserviceordered=<?php echo $idserviceordered; ?>&idorder=<?php echo $idorder; ?>" class="arrow-link">
|
<a href="?next_month=<?php echo date('Y-m', strtotime('+1 month', strtotime($currentMonthStart))); ?>&idserviceordered=<?php echo $idserviceordered; ?>&idorder=<?php echo $idorder; ?>" class="arrow-link">
|
||||||
<i class="fas fa-chevron-right fa-2x"></i>
|
<i class="fas fa-chevron-right fa-2x"></i>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
$wa_startindex = 0;
|
$wa_startindex = 0;
|
||||||
|
|
||||||
if ($bookedclass->TotalRows == 0) {
|
if ($bookedclass->TotalRows == 0) {
|
||||||
echo "<p>Classi non presenti per questo mese</p>";
|
echo "<p>Classi non presenti per questo mese</p>";
|
||||||
} else {
|
} else {
|
||||||
while (!$bookedclass->atEnd()) {
|
while (!$bookedclass->atEnd()) {
|
||||||
$wa_startindex = $bookedclass->Index;
|
$wa_startindex = $bookedclass->Index;
|
||||||
?>
|
?>
|
||||||
<?php
|
<?php
|
||||||
// Data dalla variabile $bookedclass->getColumnVal("dateschedule")
|
// Data dalla variabile $bookedclass->getColumnVal("dateschedule")
|
||||||
$dateschedule = $bookedclass->getColumnVal("dateschedule");
|
$dateschedule = $bookedclass->getColumnVal("dateschedule");
|
||||||
|
|
||||||
// Converti la data in un oggetto DateTime
|
// Converti la data in un oggetto DateTime
|
||||||
$dateObj = new DateTime($dateschedule);
|
$dateObj = new DateTime($dateschedule);
|
||||||
|
|
||||||
// Estrai il giorno e il mese in italiano
|
// Estrai il giorno e il mese in italiano
|
||||||
$dayInItalian = $dateObj->format("d");
|
$dayInItalian = $dateObj->format("d");
|
||||||
$monthInItalian = $dateObj->format("F");
|
$monthInItalian = $dateObj->format("F");
|
||||||
|
|
||||||
// Mappa dei nomi dei mesi in italiano
|
// Mappa dei nomi dei mesi in italiano
|
||||||
$italianMonths = [
|
$italianMonths = [
|
||||||
"January" => "Gennaio",
|
"January" => "Gennaio",
|
||||||
"February" => "Febbraio",
|
"February" => "Febbraio",
|
||||||
"March" => "Marzo",
|
"March" => "Marzo",
|
||||||
@@ -615,20 +635,20 @@ $italianMonths = [
|
|||||||
"October" => "Ottobre",
|
"October" => "Ottobre",
|
||||||
"November" => "Novembre",
|
"November" => "Novembre",
|
||||||
"December" => "Dicembre"
|
"December" => "Dicembre"
|
||||||
];
|
];
|
||||||
|
|
||||||
// Sostituisci il nome del mese con la versione italiana
|
// Sostituisci il nome del mese con la versione italiana
|
||||||
$monthInItalian = $italianMonths[$monthInItalian];
|
$monthInItalian = $italianMonths[$monthInItalian];
|
||||||
?>
|
?>
|
||||||
<?php
|
<?php
|
||||||
// Data dalla variabile $bookedclass->getColumnVal("dateschedule")
|
// Data dalla variabile $bookedclass->getColumnVal("dateschedule")
|
||||||
$dateschedule = $bookedclass->getColumnVal("dateschedule");
|
$dateschedule = $bookedclass->getColumnVal("dateschedule");
|
||||||
|
|
||||||
// Converti la data in un oggetto DateTime
|
// Converti la data in un oggetto DateTime
|
||||||
$dateObj = new DateTime($dateschedule);
|
$dateObj = new DateTime($dateschedule);
|
||||||
|
|
||||||
// Formatta la data nel nuovo formato desiderato
|
// Formatta la data nel nuovo formato desiderato
|
||||||
$newDateFormat = $dateObj->format("d-m-Y H:i");
|
$newDateFormat = $dateObj->format("d-m-Y H:i");
|
||||||
|
|
||||||
// Calculate the time difference in hours
|
// Calculate the time difference in hours
|
||||||
$currentTime = new DateTime();
|
$currentTime = new DateTime();
|
||||||
@@ -637,13 +657,13 @@ $newDateFormat = $dateObj->format("d-m-Y H:i");
|
|||||||
$hoursDifference = $timeDifference->h + $timeDifference->days * 24;
|
$hoursDifference = $timeDifference->h + $timeDifference->days * 24;
|
||||||
|
|
||||||
// Check if the time difference is less than 6 hours
|
// Check if the time difference is less than 6 hours
|
||||||
$timetocancel=$optionquery->getColumnVal("maxbeforetimecancell");
|
$timetocancel = $optionquery->getColumnVal("maxbeforetimecancell");
|
||||||
$canBeDeleted = ($hoursDifference >= $timetocancel);
|
$canBeDeleted = ($hoursDifference >= $timetocancel);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<?php $mysqli = new mysqli($servername, $username, $password, $dbname);
|
<?php $mysqli = new mysqli($servername, $username, $password, $dbname);
|
||||||
// Esegui una nuova query per ottenere le persone prenotate per l'evento corrente
|
// Esegui una nuova query per ottenere le persone prenotate per l'evento corrente
|
||||||
$eventId = $bookedclass->getColumnVal("idserviceschedule");
|
$eventId = $bookedclass->getColumnVal("idserviceschedule");
|
||||||
$bookingQuery = "SELECT iduser FROM bookingclass
|
$bookingQuery = "SELECT iduser FROM bookingclass
|
||||||
@@ -653,42 +673,42 @@ $newDateFormat = $dateObj->format("d-m-Y H:i");
|
|||||||
// Calcola il numero di persone prenotate
|
// Calcola il numero di persone prenotate
|
||||||
$countPersons = $bookingResult->num_rows;
|
$countPersons = $bookingResult->num_rows;
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<?php // check if service possible to bookedclass
|
<?php // check if service possible to bookedclass
|
||||||
|
|
||||||
// Esempio: Simula il valore di $bookedclass->getColumnVal("servicename")
|
// Esempio: Simula il valore di $bookedclass->getColumnVal("servicename")
|
||||||
$cardservice = $bookedclass->getColumnVal("idservice");
|
$cardservice = $bookedclass->getColumnVal("idservice");
|
||||||
|
|
||||||
// Verifica se il valore di $cardservice è presente nell'array $idassociateservices
|
// Verifica se il valore di $cardservice è presente nell'array $idassociateservices
|
||||||
if (in_array($cardservice, $idassociateservices)) {
|
if (in_array($cardservice, $idassociateservices)) {
|
||||||
// Il valore è presente, esegui il codice successivo
|
// Il valore è presente, esegui il codice successivo
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<?php
|
<?php
|
||||||
$maxcapacity=$bookedclass->getColumnVal("maxcapacity");
|
$maxcapacity = $bookedclass->getColumnVal("maxcapacity");
|
||||||
$freeplace=$maxcapacity-$countPersons;
|
$freeplace = $maxcapacity - $countPersons;
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<?php //query check active bookingclass
|
<?php //query check active bookingclass
|
||||||
// Crea la connessione al database
|
// Crea la connessione al database
|
||||||
$conn = new mysqli($servername, $username, $password, $dbname);
|
$conn = new mysqli($servername, $username, $password, $dbname);
|
||||||
// Variabili dei dati da verificare
|
// Variabili dei dati da verificare
|
||||||
$idcheckservice = $bookedclass->getColumnVal("idserviceschedule"); // Sostituisci con il tuo valore
|
$idcheckservice = $bookedclass->getColumnVal("idserviceschedule"); // Sostituisci con il tuo valore
|
||||||
$iduser = $iduserlog; // Sostituisci con il tuo valore
|
$iduser = $iduserlog; // Sostituisci con il tuo valore
|
||||||
|
|
||||||
// Query per verificare l'esistenza del record
|
// Query per verificare l'esistenza del record
|
||||||
$query = "SELECT * FROM bookingclass WHERE idserviceschedule = $idcheckservice AND iduser = $iduser";
|
$query = "SELECT * FROM bookingclass WHERE idserviceschedule = $idcheckservice AND iduser = $iduser";
|
||||||
$resultcheck = $conn->query($query);
|
$resultcheck = $conn->query($query);
|
||||||
|
|
||||||
if ($resultcheck->num_rows > 0) {
|
if ($resultcheck->num_rows > 0) {
|
||||||
$alreadybooked='Y'; // record found
|
$alreadybooked = 'Y'; // record found
|
||||||
} else {
|
} else {
|
||||||
$alreadybooked='N';
|
$alreadybooked = 'N';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
|
||||||
<div class="custom-card" onclick="toggleCard(this)">
|
<div class="custom-card" onclick="toggleCard(this)">
|
||||||
@@ -698,21 +718,21 @@ if ($resultcheck->num_rows > 0) {
|
|||||||
|
|
||||||
<?php if ($alreadybooked == 'Y') { ?>
|
<?php if ($alreadybooked == 'Y') { ?>
|
||||||
<div class="custom-date-box" style="background-color:#FF6609">
|
<div class="custom-date-box" style="background-color:#FF6609">
|
||||||
<?php } elseif ($freeplace > 0) { ?><div class="custom-date-box" style="background-color: #1ebf73">
|
<?php } elseif ($freeplace > 0) { ?><div class="custom-date-box" style="background-color:#1ebf73">
|
||||||
<?php } else { ?><div class="custom-date-box" style="background-color: #9C9C9C"><?php } ?>
|
<?php } else { ?><div class="custom-date-box" style="background-color:#9C9C9C"><?php } ?>
|
||||||
<div class="custom-day"><?php echo $dayInItalian; ?></div>
|
<div class="custom-day"><?php echo $dayInItalian; ?></div>
|
||||||
<div class="custom-month"><?php echo $monthInItalian; ?></div>
|
<div class="custom-month"><?php echo $monthInItalian; ?></div>
|
||||||
</div>
|
</div>
|
||||||
<?php if ($alreadybooked == 'Y') { ?>
|
<?php if ($alreadybooked == 'Y') { ?>
|
||||||
<div class="custom-event-details" style="background-color:#FFAC7A">
|
<div class="custom-event-details" style="background-color:#FFAC7A;border-left-color:#FF6609">
|
||||||
<?php } elseif ($freeplace > 0) { ?>
|
<?php } elseif ($freeplace > 0) { ?>
|
||||||
<div class="custom-event-details" style="background-color:<?php echo($bookedclass->getColumnVal("colorclass")); ?>">
|
<div class="custom-event-details" style="border-left-color:<?php echo ($bookedclass->getColumnVal("colorclass")); ?>">
|
||||||
<?php } else { ?><div class="custom-event-details" style="background-color:#CDCDCD"><?php } ?>
|
<?php } else { ?><div class="custom-event-details" style="background-color:#CDCDCD;border-left-color:#9C9C9C"><?php } ?>
|
||||||
<h2 class="custom-heading"><?php echo($bookedclass->getColumnVal("servicename")); ?> -<?php echo $countPersons; ?>/<?php echo($bookedclass->getColumnVal("maxcapacity")); ?></h2>
|
<h2 class="custom-heading"><?php echo ($bookedclass->getColumnVal("servicename")); ?> -<?php echo $countPersons; ?>/<?php echo ($bookedclass->getColumnVal("maxcapacity")); ?></h2>
|
||||||
<p class="custom-paragraph">Quando: <?php echo $newDateFormat; ?></p>
|
<p class="custom-paragraph">Quando: <?php echo $newDateFormat; ?></p>
|
||||||
<p class="custom-paragraph">Luogo: via Valassina 62/B Seregno - Sala Contesto Yoga</p>
|
<p class="custom-paragraph">Luogo: via Valassina 62/B Seregno - Sala Contesto Yoga</p>
|
||||||
<?php $idnewbooking=$bookedclass->getColumnVal("idserviceschedule"); ?>
|
<?php $idnewbooking = $bookedclass->getColumnVal("idserviceschedule"); ?>
|
||||||
<?php $idservicenew=$bookedclass->getColumnVal("idservice"); ?>
|
<?php $idservicenew = $bookedclass->getColumnVal("idservice"); ?>
|
||||||
<!-- Mostra l'elenco delle persone prenotate solo se ce ne sono -->
|
<!-- Mostra l'elenco delle persone prenotate solo se ce ne sono -->
|
||||||
|
|
||||||
<div class="booking-details">
|
<div class="booking-details">
|
||||||
@@ -720,11 +740,11 @@ if ($resultcheck->num_rows > 0) {
|
|||||||
<button class="booking-button"><i class="fa fa-check"></i> Sei già prenotata/o</button>
|
<button class="booking-button"><i class="fa fa-check"></i> Sei già prenotata/o</button>
|
||||||
<?php } elseif ($freeplace > 0) {
|
<?php } elseif ($freeplace > 0) {
|
||||||
?>
|
?>
|
||||||
<a href="bookandgo.php?idpreviousbooking=<?php echo '0'; ?>&idorder=<?php echo $idorder; ?>&idservicenew=<?php echo $idservicenew; ?>&idnewbooking=<?php echo $idnewbooking; ?>&iduser=<?php echo $iduserlogin; ?>"?><button class="booking-button"><i class="fas fa-arrow-circle-right"></i> Riprogramma Classe</button></a>
|
<a href="bookandgo.php?idpreviousbooking=<?php echo '0'; ?>&idorder=<?php echo $idorder; ?>&idservicenew=<?php echo $idservicenew; ?>&idnewbooking=<?php echo $idnewbooking; ?>&iduser=<?php echo $iduserlogin; ?>" ?><button class="booking-button"><i class="fas fa-arrow-circle-right"></i> Riprogramma Classe</button></a>
|
||||||
<?php } else { ?>
|
<?php } else { ?>
|
||||||
<button class="booking-button"><i class="fa fa-stop"></i> Classe Piena</button>
|
<button class="booking-button"><i class="fa fa-stop"></i> Classe Piena</button>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -740,12 +760,12 @@ if ($resultcheck->num_rows > 0) {
|
|||||||
}
|
}
|
||||||
$bookedclass->moveNext();
|
$bookedclass->moveNext();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$bookedclass->moveFirst(); // Ritorna all'inizio del recordset
|
$bookedclass->moveFirst(); // Ritorna all'inizio del recordset
|
||||||
unset($wa_startindex);
|
unset($wa_startindex);
|
||||||
unset($wa_repeatcount);
|
unset($wa_repeatcount);
|
||||||
?>
|
?>
|
||||||
<!-- Aggiungi altre card qui con le stesse classi -->
|
<!-- Aggiungi altre card qui con le stesse classi -->
|
||||||
|
|
||||||
|
|
||||||
@@ -782,6 +802,6 @@ unset($wa_repeatcount);
|
|||||||
|
|
||||||
<script src="assets/js/app.js"></script>
|
<script src="assets/js/app.js"></script>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
<?php
|
||||||
|
require_once('include/headscript.php');
|
||||||
|
$pdo = DBHandlerSelect::getInstance()->getConnection();
|
||||||
|
|
||||||
|
$token = $_GET['token'] ?? '';
|
||||||
|
$confirm = ($_GET['confirm'] ?? '') === 'Y';
|
||||||
|
|
||||||
|
if ($token === '') {
|
||||||
|
header('Location: admin-services.php');
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Conta le prenotazioni utente collegate alle lezioni di questa propagazione
|
||||||
|
$stmt = $pdo->prepare(
|
||||||
|
"SELECT COUNT(*) FROM bookingclass b
|
||||||
|
JOIN serviceschedule s ON b.idserviceschedule = s.idserviceschedule
|
||||||
|
WHERE s.propagation_token = :token"
|
||||||
|
);
|
||||||
|
$stmt->execute([':token' => $token]);
|
||||||
|
$prenotazioni = (int) $stmt->fetchColumn();
|
||||||
|
|
||||||
|
// Se ci sono prenotazioni e non è ancora arrivata la conferma esplicita -> chiedi
|
||||||
|
if ($prenotazioni > 0 && !$confirm) {
|
||||||
|
header('Location: admin-services.php?message=confirmdelete&token=' . urlencode($token) . '&count=' . $prenotazioni);
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Procedi con la cancellazione
|
||||||
|
$stmt = $pdo->prepare("DELETE FROM serviceschedule WHERE propagation_token = :token");
|
||||||
|
$stmt->execute([':token' => $token]);
|
||||||
|
|
||||||
|
$stmt = $pdo->prepare("DELETE FROM propagation WHERE token = :token");
|
||||||
|
$stmt->execute([':token' => $token]);
|
||||||
|
|
||||||
|
header('Location: admin-services.php?message=propdeleted');
|
||||||
|
exit;
|
||||||
@@ -55,6 +55,19 @@ $daysUntilNext = ($desiredDayValue + 7 - $dayOfWeekStart) % 7;
|
|||||||
$currentTs = $startTs + $daysUntilNext * 86400;
|
$currentTs = $startTs + $daysUntilNext * 86400;
|
||||||
$dateEnd = date('Y-m-d', $endTs);
|
$dateEnd = date('Y-m-d', $endTs);
|
||||||
|
|
||||||
|
// Token univoco della propagazione + record riepilogativo
|
||||||
|
$token = bin2hex(random_bytes(16));
|
||||||
|
$insertPropagation = $pdo->prepare(
|
||||||
|
"INSERT INTO propagation (idservice, token, startdate, enddate)
|
||||||
|
VALUES (:idservice, :token, :startdate, :enddate)"
|
||||||
|
);
|
||||||
|
$insertPropagation->execute([
|
||||||
|
':idservice' => $idservice,
|
||||||
|
':token' => $token,
|
||||||
|
':startdate' => date('Y-m-d', $startTs),
|
||||||
|
':enddate' => $dateEnd,
|
||||||
|
]);
|
||||||
|
|
||||||
// --- Statement preparati una sola volta e riusati nel loop ---
|
// --- Statement preparati una sola volta e riusati nel loop ---
|
||||||
$checkClass = $pdo->prepare(
|
$checkClass = $pdo->prepare(
|
||||||
"SELECT idserviceschedule FROM serviceschedule
|
"SELECT idserviceschedule FROM serviceschedule
|
||||||
@@ -65,8 +78,8 @@ $checkDayoff = $pdo->prepare(
|
|||||||
"SELECT iddayoff FROM dayoff WHERE dayoffdate = :dayoffdate LIMIT 1"
|
"SELECT iddayoff FROM dayoff WHERE dayoffdate = :dayoffdate LIMIT 1"
|
||||||
);
|
);
|
||||||
$insertSchedule = $pdo->prepare(
|
$insertSchedule = $pdo->prepare(
|
||||||
"INSERT INTO serviceschedule (idservice, dateschedule, scheduleday, startingtime, durationtime)
|
"INSERT INTO serviceschedule (idservice, dateschedule, scheduleday, startingtime, durationtime, propagation_token)
|
||||||
VALUES (:idservice, :dateschedule, :scheduleday, :startingtime, :durationtime)"
|
VALUES (:idservice, :dateschedule, :scheduleday, :startingtime, :durationtime, :propagation_token)"
|
||||||
);
|
);
|
||||||
|
|
||||||
$inserted = 0;
|
$inserted = 0;
|
||||||
@@ -93,6 +106,7 @@ while (date('Y-m-d', $currentTs) <= $dateEnd) {
|
|||||||
':scheduleday' => $dayclass,
|
':scheduleday' => $dayclass,
|
||||||
':startingtime' => $timeclass,
|
':startingtime' => $timeclass,
|
||||||
':durationtime' => $durationtime,
|
':durationtime' => $durationtime,
|
||||||
|
':propagation_token' => $token,
|
||||||
]);
|
]);
|
||||||
$inserted++;
|
$inserted++;
|
||||||
}
|
}
|
||||||
|
|||||||
+134
-38
@@ -58,6 +58,23 @@ $stmtBooked->execute([
|
|||||||
]);
|
]);
|
||||||
$bookedRows = $stmtBooked->fetchAll();
|
$bookedRows = $stmtBooked->fetchAll();
|
||||||
|
|
||||||
|
// Lezioni in attesa di conferma (pending) dell'utente, nel mese visualizzato
|
||||||
|
$sqlPending = "SELECT bookingclass.*, service.servicename, service.colorclass, serviceschedule.dateschedule
|
||||||
|
FROM bookingclass
|
||||||
|
LEFT JOIN service ON bookingclass.idservice = service.idservice
|
||||||
|
LEFT JOIN serviceschedule ON bookingclass.idserviceschedule = serviceschedule.idserviceschedule
|
||||||
|
WHERE bookingclass.iduser = :iduser
|
||||||
|
AND bookingclass.status = 'pending'
|
||||||
|
AND serviceschedule.dateschedule BETWEEN :monthStart AND DATE_ADD(:monthEnd, INTERVAL 1 DAY)
|
||||||
|
ORDER BY serviceschedule.dateschedule";
|
||||||
|
$stmtPending = $pdo->prepare($sqlPending);
|
||||||
|
$stmtPending->execute([
|
||||||
|
':iduser' => $iduserlogin,
|
||||||
|
':monthStart' => $currentMonthStart,
|
||||||
|
':monthEnd' => $currentMonthEnd,
|
||||||
|
]);
|
||||||
|
$pendingRows = $stmtPending->fetchAll();
|
||||||
|
|
||||||
/* -------------------------------------------------------------------------
|
/* -------------------------------------------------------------------------
|
||||||
* 3) Somma dei ticket acquistati dall'utente
|
* 3) Somma dei ticket acquistati dall'utente
|
||||||
* ---------------------------------------------------------------------- */
|
* ---------------------------------------------------------------------- */
|
||||||
@@ -175,67 +192,97 @@ $italianMonths = [
|
|||||||
|
|
||||||
<style>
|
<style>
|
||||||
.custom-card {
|
.custom-card {
|
||||||
margin: 10px auto;
|
background: #fff;
|
||||||
display: flex;
|
border-radius: 14px;
|
||||||
width: 90%;
|
box-shadow: 0 3px 16px rgba(0, 0, 0, 0.06);
|
||||||
max-width: 700px;
|
|
||||||
background-color: white;
|
|
||||||
box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.1);
|
|
||||||
border-radius: 8px;
|
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
margin-bottom: 18px;
|
||||||
|
display: flex;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
transition: transform 0.2s;
|
transition: box-shadow 0.2s;
|
||||||
}
|
}
|
||||||
|
|
||||||
.custom-card:hover {
|
.custom-card:hover {
|
||||||
transform: translateY(-5px);
|
box-shadow: 0 6px 22px rgba(0, 0, 0, 0.1);
|
||||||
|
}
|
||||||
|
|
||||||
|
.pending-card {
|
||||||
|
cursor: default;
|
||||||
|
}
|
||||||
|
|
||||||
|
.pending-card .custom-date-box {
|
||||||
|
flex: 0 0 90px;
|
||||||
|
padding: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.pending-card .custom-day {
|
||||||
|
font-size: 30px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.pending-card .custom-month {
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.pending-card .custom-event-details {
|
||||||
|
padding: 12px 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.pending-card .custom-heading {
|
||||||
|
font-size: 17px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.custom-date-box {
|
.custom-date-box {
|
||||||
flex: 1;
|
flex: 0 0 110px;
|
||||||
background-color: red;
|
background: #1ebf73;
|
||||||
color: white;
|
color: #fff;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
padding: 0;
|
padding: 16px;
|
||||||
font-size: 60px;
|
|
||||||
font-weight: bold;
|
|
||||||
border-top-left-radius: 8px;
|
|
||||||
border-bottom-left-radius: 8px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.custom-day {
|
.custom-day {
|
||||||
|
font-size: 44px;
|
||||||
|
font-weight: 800;
|
||||||
line-height: 1;
|
line-height: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
.custom-month {
|
.custom-month {
|
||||||
font-size: 28px;
|
font-size: 18px;
|
||||||
|
text-transform: uppercase;
|
||||||
|
letter-spacing: 0.05em;
|
||||||
}
|
}
|
||||||
|
|
||||||
.custom-event-details {
|
.custom-event-details {
|
||||||
flex: 2;
|
flex: 1;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
padding: 10px 20px;
|
padding: 18px 22px;
|
||||||
background-color: lightblue;
|
background: #fff;
|
||||||
|
border-left: 20px solid #ccc;
|
||||||
|
/* colore impostato inline per ogni card */
|
||||||
}
|
}
|
||||||
|
|
||||||
.custom-heading {
|
.custom-heading {
|
||||||
margin-top: 0;
|
font-size: 19px;
|
||||||
font-size: 24px;
|
font-weight: 700;
|
||||||
|
color: #1f2937;
|
||||||
|
margin: 0 0 4px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.custom-paragraph {
|
.custom-paragraph {
|
||||||
margin-bottom: 5px;
|
color: #6b7280;
|
||||||
|
font-size: 14px;
|
||||||
|
margin-bottom: 3px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.custom-actions {
|
.custom-actions {
|
||||||
display: none;
|
display: none;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
justify-content: space-between;
|
gap: 8px;
|
||||||
margin-top: 10px;
|
flex-wrap: wrap;
|
||||||
|
margin-top: 12px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.custom-card.expanded .custom-actions {
|
.custom-card.expanded .custom-actions {
|
||||||
@@ -243,16 +290,19 @@ $italianMonths = [
|
|||||||
}
|
}
|
||||||
|
|
||||||
.custom-action-button {
|
.custom-action-button {
|
||||||
background-color: #f0f0f0;
|
|
||||||
border: none;
|
border: none;
|
||||||
padding: 8px 12px;
|
border-radius: 8px;
|
||||||
border-radius: 4px;
|
padding: 7px 14px;
|
||||||
|
font-size: 13px;
|
||||||
|
font-weight: 600;
|
||||||
|
background: #eef2f7;
|
||||||
|
color: #374151;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
transition: background-color 0.2s;
|
transition: filter 0.15s;
|
||||||
}
|
}
|
||||||
|
|
||||||
.custom-action-button:hover {
|
.custom-action-button:hover {
|
||||||
background-color: #e0e0e0;
|
filter: brightness(0.94);
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (max-width: 768px) {
|
@media (max-width: 768px) {
|
||||||
@@ -260,14 +310,20 @@ $italianMonths = [
|
|||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
}
|
}
|
||||||
|
|
||||||
.custom-date-box,
|
.custom-date-box {
|
||||||
.custom-event-details {
|
flex: 0 0 auto;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
border-radius: 0;
|
flex-direction: row;
|
||||||
|
gap: 10px;
|
||||||
|
padding: 12px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.custom-event-time {
|
.custom-day {
|
||||||
font-size: 24px;
|
font-size: 30px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.custom-month {
|
||||||
|
font-size: 18px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -543,10 +599,50 @@ $italianMonths = [
|
|||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<?php if (!empty($pendingRows)) : ?>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-xl-12">
|
<div class="col-xl-12">
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
|
<h5 style="color:#8a6d00;margin-bottom:14px;">
|
||||||
|
<i class="fas fa-hourglass-half me-1"></i> In attesa di conferma
|
||||||
|
</h5>
|
||||||
|
<?php foreach ($pendingRows as $prow) :
|
||||||
|
$pDateObj = new DateTime($prow['dateschedule']);
|
||||||
|
$pDay = $pDateObj->format("d");
|
||||||
|
$pMonth = $italianMonths[$pDateObj->format("F")];
|
||||||
|
$pWhen = $pDateObj->format("d-m-Y H:i");
|
||||||
|
$pColor = $prow['colorclass'] ?? '#1ebf73';
|
||||||
|
$pName = $prow['servicename'] ?? '';
|
||||||
|
?>
|
||||||
|
<div class="custom-card pending-card">
|
||||||
|
<div class="custom-date-box" style="background:#e0a800;">
|
||||||
|
<div class="custom-day"><?php echo e($pDay); ?></div>
|
||||||
|
<div class="custom-month"><?php echo e($pMonth); ?></div>
|
||||||
|
</div>
|
||||||
|
<div class="custom-event-details" style="border-left-color:<?php echo e($pColor); ?>">
|
||||||
|
<h2 class="custom-heading">
|
||||||
|
<?php echo e($pName); ?>
|
||||||
|
<span style="display:inline-block;background:#fff4d6;color:#8a6d00;font-size:11px;font-weight:700;padding:2px 9px;border-radius:20px;margin-left:6px;vertical-align:middle;">In attesa</span>
|
||||||
|
</h2>
|
||||||
|
<p class="custom-paragraph">Quando: <?php echo e($pWhen); ?></p>
|
||||||
|
<p class="custom-paragraph">Luogo: via Valassina 62/B Seregno - Sala Contesto Yoga</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<?php endif; ?>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-xl-12">
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-body">
|
||||||
|
<h5 style="color:#1a7f52;margin-bottom:14px;">
|
||||||
|
<i class="fas fa-check-circle me-1"></i> Prenotate
|
||||||
|
</h5>
|
||||||
<?php if (empty($bookedRows)) { ?>
|
<?php if (empty($bookedRows)) { ?>
|
||||||
<p>Prenotazioni non presenti per questo mese</p>
|
<p>Prenotazioni non presenti per questo mese</p>
|
||||||
<?php
|
<?php
|
||||||
@@ -591,11 +687,11 @@ $italianMonths = [
|
|||||||
$servicename = $row['servicename'] ?? '';
|
$servicename = $row['servicename'] ?? '';
|
||||||
?>
|
?>
|
||||||
<div class="custom-card" onclick="toggleCard(this)">
|
<div class="custom-card" onclick="toggleCard(this)">
|
||||||
<div class="custom-date-box" style="background-color:#1ebf73">
|
<div class="custom-date-box">
|
||||||
<div class="custom-day"><?php echo e($dayInItalian); ?></div>
|
<div class="custom-day"><?php echo e($dayInItalian); ?></div>
|
||||||
<div class="custom-month"><?php echo e($monthInItalian); ?></div>
|
<div class="custom-month"><?php echo e($monthInItalian); ?></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="custom-event-details" style="background-color:<?php echo e($colorclass); ?>">
|
<div class="custom-event-details" style="border-left-color:<?php echo e($colorclass); ?>">
|
||||||
<h2 class="custom-heading"><?php echo e($servicename); ?></h2>
|
<h2 class="custom-heading"><?php echo e($servicename); ?></h2>
|
||||||
<p class="custom-paragraph">Quando: <?php echo e($newDateFormat); ?></p>
|
<p class="custom-paragraph">Quando: <?php echo e($newDateFormat); ?></p>
|
||||||
<p class="custom-paragraph">Luogo: via Valassina 62/B Seregno - Sala Contesto Yoga</p>
|
<p class="custom-paragraph">Luogo: via Valassina 62/B Seregno - Sala Contesto Yoga</p>
|
||||||
|
|||||||
Reference in New Issue
Block a user