2022-12-20 21:17:03 +01:00
<! DOCTYPE html >
< html lang = " fr " < ? php if ( ! empty ( SERVICE )) echo ' class="' . SERVICE . '"' ; ?> >
< head >
< meta charset = " utf-8 " >
< title >< ? php
foreach ( array_reverse ( TITLES_LINEAGE ) as $id => $title )
echo strip_tags ( $title ) . ( array_key_last ( TITLES_LINEAGE ) === $id ? '' : ' < ' );
?> </title>
< ? php
foreach ( glob ( 'css/*.css' ) as $css_path )
echo ' <link type="text/css" rel="stylesheet" media="screen" href="' . CONF [ 'common' ][ 'prefix' ] . '/' . $css_path . '">' . LF ;
?>
< meta name = " viewport " content = " width=device-width, initial-scale=1 " >
</ head >
< body >
< header >
< p >
< ? php if ( isset ( $_SESSION [ 'id' ])) { ?>
2023-01-07 23:11:44 +01:00
< ? = ( $_SESSION [ 'type' ] === 'approved' ) ? '<span title="Compte approuvé">👤 </span>' : '<span title="Compte de test">⏳ </span>' ?> <strong><?= (defined('DISPLAY_USERNAME')
? DISPLAY_USERNAME : '<em>?</em>' ) ?> </strong> <a class="auth" href="<?= CONF['common']['prefix'] ?>/auth/logout">Se déconnecter</a>
2022-12-20 21:17:03 +01:00
< ? php } else { ?>
< span aria - hidden = " true " > 👻 </ span >< em > Anonyme </ em > < a class = " auth " href = " <?= redirUrl('auth/login') ?> " > Se connecter </ a >
< ? php } ?>
</ p >
< nav >
< ? php
foreach ( TITLES_LINEAGE as $id => $title ) {
$lastTitle = ( TITLES_LINEAGE [ array_key_last ( TITLES_LINEAGE )] === $title );
echo '<ul><li>' . ( $lastTitle ? '<h1>' : '' ) . '<a' . (( $id === 0 ) ? ' class="niver"' : '' ) . ' href="' . CONF [ 'common' ][ 'prefix' ] . ( $lastTitle ? '/' . PAGE_URL : '/' . implode ( '/' , array_slice ( PAGE_LINEAGE , 0 , $id )) . (( $lastTitle OR $id === 0 ) ? '' : '/' )) . '">' . $title . '</a>' . ( $lastTitle ? '</h1>' : '' ) . LF ;
}
echo str_repeat ( '</li></ul>' , count ( TITLES_LINEAGE ));
?>
</ nav >
</ header >
< main >
< ? php
require 'pg-view/' . PAGE_ADDRESS . '.php' ;
if ( $_POST === [] AND PAGE_METADATA [ 'require-login' ] ? ? true !== false AND ! isset ( $_SESSION [ 'id' ]) AND PAGE_TERMINAL )
echo '<p>Ce formulaire ne sera pas accepté car il faut <a class="auth" href="' . redirUrl ( 'auth/login' ) . '">se connecter</a> avant.</p>' ;
displayFinalMessage ( $data );
?>
</ main >
< footer >
< small >< a rel = " external " href = " https://code.antopie.org/niver/niver " class = " niver " > Code source </ a > sous < abbr title = " Cooperative Nonviolent Public License No Attribution version 7 ou plus " > CNPL - NAv7 +</ abbr >.</ small >
</ footer >
</ body >
</ html >