Files
studiobeve.no/application/views/pages/manage-booking-cancelled.php
T
UbuntuandClaude Opus 4.6 420bcb37fd Security hardening: fix SQLi, XSS, file upload, and migrate DB to RDS
- Fix all SQL injection vulnerabilities across Service_model, User_model,
  Module_model, Log_model, and Admin controller using parameterized queries
- Add htmlspecialchars() to all user-controlled output in admin views
  (bookings, services, workers, service categories, login form)
- Fix XSS in AJAX worker response and manage-booking-cancelled view
- Add file extension whitelist (jpg, jpeg, png, gif, webp) to all uploads
- Remove webshell (pentest2.php) from assets/img/profiles/
- Stop logging plaintext passwords on failed login attempts
- Migrate database.php hostname from localhost to AWS RDS endpoint
- Fix dropdown styling (white-on-white) in worker calendar view

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-05-07 13:00:32 +00:00

45 lines
2.2 KiB
PHP
Executable File

<?php
// Determine subpage from the booking's service type to pick correct skeleton
$serviceIds = unserialize($booking->service_ids);
$subpage = 'barber';
if(is_array($serviceIds) && !empty($serviceIds)){
$firstService = $this->Service_model->getServiceById($serviceIds[0]);
if($firstService) $subpage = $firstService->service_type;
}
if($subpage == 'beauty'){
include(getcwd().'/application/views/includes/beauty-skeleton-top.php');
} else {
include(getcwd().'/application/views/includes/barber-skeleton-top.php');
}
$messages = array(
'no' => 'Din bestilling den <strong>'.$booking->booking_date.'</strong> kl. <strong>'.date('H:i', strtotime($booking->booking_start_time)).'</strong> med <strong>'.htmlspecialchars($worker->worker_name, ENT_QUOTES, 'UTF-8').'</strong> er avbestilt.',
'en' => 'Your booking on <strong>'.$booking->booking_date.'</strong> at <strong>'.date('H:i', strtotime($booking->booking_start_time)).'</strong> with <strong>'.htmlspecialchars($worker->worker_name, ENT_QUOTES, 'UTF-8').'</strong> has been cancelled.',
'hu' => 'A <strong>'.$booking->booking_date.'</strong> <strong>'.date('H:i', strtotime($booking->booking_start_time)).'</strong>-os foglalásod <strong>'.htmlspecialchars($worker->worker_name, ENT_QUOTES, 'UTF-8').'</strong>-nál törölve lett.',
);
$titles = array(
'no' => 'Bestilling avbestilt',
'en' => 'Booking cancelled',
'hu' => 'Foglalás törölve',
);
$lang = $selectedLang;
$msg = isset($messages[$lang]) ? $messages[$lang] : $messages['en'];
$title = isset($titles[$lang]) ? $titles[$lang] : $titles['en'];
?>
<div class="bookingContainer" style="min-height:400px; padding:20px;">
<div class="bookingThankYouTitle"><?php echo $title; ?></div>
<div class="bookingThankYouMessageTitle" style="margin-top:15px;"><?php echo $msg; ?></div>
</div>
<?php
if($subpage == 'beauty'){
include(getcwd().'/application/views/includes/beauty-skeleton-bottom.php');
} else {
include(getcwd().'/application/views/includes/barber-skeleton-bottom.php');
}
?>