2022-12-20 20:17:03 +00:00
<! DOCTYPE html >
2023-05-09 18:23:52 +00:00
< html lang = " <?= LOCALE ?> " < ? = empty ( SERVICE ) ? '' : ' class="' . SERVICE . '"' ?> >
2022-12-20 20:17:03 +00:00
< head >
< meta charset = " utf-8 " >
< title >< ? php
2023-05-09 18:23:52 +00:00
foreach ( array_reverse ( TITLES_LINEAGE ) as $id => $title )
echo strip_tags ( $title ) . ( array_key_last ( TITLES_LINEAGE ) === $id ? '' : ' < ' );
2022-12-20 20:17:03 +00:00
?> </title>
< ? php
2023-05-09 18:23:52 +00:00
foreach ( glob ( 'css/*.css' ) as $css_path )
echo ' <link type="text/css" rel="stylesheet" media="screen" href="' . CONF [ 'common' ][ 'prefix' ] . '/' . $css_path . '">' . LF ;
2022-12-20 20:17:03 +00:00
?>
< meta name = " viewport " content = " width=device-width, initial-scale=1 " >
</ head >
< body >
< header >
2023-06-02 20:45:27 +00:00
< p class = " auth " >
2022-12-20 20:17:03 +00:00
< ? php if ( isset ( $_SESSION [ 'id' ])) { ?>
2023-06-02 20:45:27 +00:00
< span aria - hidden = " true " >< ? = ( $_SESSION [ 'type' ] === 'approved' ) ? '👤' : '⏳' ?> </span><strong><?= (defined('DISPLAY_USERNAME') ? DISPLAY_USERNAME : '<em>?</em>') ?></strong> <a href="<?= CONF['common']['prefix'] ?>/auth/logout"><?= _('Log out') ?></a><?= ($_SESSION['type'] === 'testing') ? '<br>' . _('You are using a testing account. It may be deleted anytime.') . ' <a href="' . CONF['common']['prefix'] . '/auth/#type">' . _('Read more') . '</a>' : '' ?>
2022-12-20 20:17:03 +00:00
< ? php } else { ?>
2023-06-02 20:45:27 +00:00
< span aria - hidden = " true " > 👻 </ span >< em >< ? = _ ( 'Anonymous' ) ?> </em> <a href="<?= redirUrl('auth/login') ?>"><?= _('Log in') ?></a>
2022-12-20 20:17:03 +00:00
< ? php } ?>
</ p >
< nav >
< ? php
2023-05-09 18:23:52 +00:00
foreach ( TITLES_LINEAGE as $id => $title ) {
$lastTitle = ( TITLES_LINEAGE [ array_key_last ( TITLES_LINEAGE )] === $title );
echo '<ul><li>' . ( $lastTitle ? '<h1>' : '' ) . '<a' . (( $id === 0 ) ? ' class="common"' : '' ) . ' 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 ));
2022-12-20 20:17:03 +00:00
?>
</ nav >
</ header >
< main >
< ? php
2023-05-09 23:34:45 +00:00
if ( CONF [ 'common' ][ 'services' ][ 'auth' ] === 'error' OR ( in_array ( SERVICE , SERVICES_USER , true ) AND CONF [ 'common' ][ 'services' ][ SERVICE ] === 'error' ))
2023-03-09 00:35:30 +00:00
echo '<p><strong>' . _ ( 'This service is currently under maintenance. No action can be taken on it until an administrator finishes repairing it.' ) . '</strong></p>' ;
2023-05-09 18:23:52 +00:00
require ROOT_PATH . '/pg-view/' . PAGE_ADDRESS . '.php' ;
2022-12-20 20:17:03 +00:00
2023-05-09 18:23:52 +00:00
if ( $_POST === [] AND PAGE_METADATA [ 'require-login' ] ? ? true !== false AND ! isset ( $_SESSION [ 'id' ]) AND PAGE_TERMINAL )
echo '<p>' . sprintf ( _ ( 'This form won\'t be accepted because you need to %slog in%s first.' ), '<a class="auth" href="' . redirUrl ( 'auth/login' ) . '">' , '</a>' ) . '</p>' ;
2022-12-20 20:17:03 +00:00
2023-05-09 18:23:52 +00:00
displayFinalMessage ( $data );
2022-12-20 20:17:03 +00:00
?>
</ main >
< footer >
2023-01-29 20:09:00 +00:00
< small >< ? = sprintf ( _ ( '%sSource code%s available under %s.' ), '<a rel="external" href="https://code.antopie.org/servnest/servnest" class="common">' , '</a>' , '<abbr title="Cooperative Nonviolent Public License No Attribution version 7 or more">CNPL-NAv7+</abbr>' ) ?> </small>
2022-12-20 20:17:03 +00:00
</ footer >
</ body >
</ html >