33763-dev/view-website.php
2025-08-31 09:55:15 +00:00

15 lines
360 B
PHP

<?php
session_start();
if (!isset($_SESSION['user'])) {
header('Location: login.php');
exit;
}
$websitePath = '/home/blari/executor/workspace/users_data/' . session_id() . '/websites/index.html';
if (file_exists($websitePath)) {
readfile($websitePath);
} else {
echo "Website not found. Please generate it first from the Website Builder.";
}