current(); if (isset($_GET['logout'])) { $users->logout(); $user = null; } if (!$user) { header(sprintf('Location: %slogin.php', WWW_URL)); exit; } $quota = $users->quota($user); $server = new Server; $free = format_bytes($quota->free); $used = format_bytes($quota->used); $total = format_bytes($quota->total); $percent = floor(($quota->used / $quota->total)*100) . '%'; $www_url = WWW_URL; $username = htmlspecialchars($user->login); html_head('My files'); echo <<Manage my files

Hello, {$username} !

{$percent} used, {$free} free

Used {$used} out of a total of {$total}.
WebDAV URL

{$user->dav_url}

NextCloud URL
{$www_url}
Use this URL to setup a NextCloud or ownCloud client to access your files.

Logout

EOF; if ($user->is_admin) { echo '

Manager users

'; } html_foot();