AliceClass/dashboard.php

27 lines
691 B
PHP

<?php
// Autenticação básica HTTP para obter o nome de usuário
$username = $_SERVER['PHP_AUTH_USER'];
$target_dir = "/var/www/html/aliceclass_videos/" . $username;
# check if user dir exists
if (!file_exists($target_dir)) {
# if not, create it
if (mkdir($target_dir, 0775, true)) {
// echo "Directory created successfully.";
}
if (mkdir($target_dir . "/src", 0775, true)) {
// echo "Directory created successfully.";
}
if (mkdir($target_dir . "/dest", 0775, true)) {
// echo "Directory created successfully.";
}
}
// Exibir o nome de usuário
echo '<div class="username">';
echo 'Usuário: ' . htmlspecialchars($username);
echo '</div>';
?>