Everything previously under www/src now are under www/ Moved style.CSS under www/ressources, to allow blocking http requests to www/lib completly Moved <head> and <header> generation under lib/PHP/output/sections.php to reduce redundancy within files. Also implemented a system to allow them to generate relatif paht for href to ressources depending on their deepness within www/ hierarchy.
12 lines
411 B
PHP
12 lines
411 B
PHP
<?php
|
|
|
|
require_once 'update.php'; // Open a session.
|
|
require_once 'nosessiontest.php';
|
|
|
|
// WHEN NO PRIV : Use nosession test, user is unauthentificated
|
|
// ALSO cannot yet test for privilegs higher than X.
|
|
// Expected priv : one of the ACCOUNT_PRIV_* const. defined in config.php
|
|
function has_privileges(string $expected_priv): bool
|
|
{
|
|
return (is_logged_in() && ($_SESSION["permissions"] === $expected_priv));
|
|
}
|