website_jukni/dokuwiki/lib/tpl/dokuwikha/tpl_header.php
2017-12-29 15:51:59 +01:00

102 lines
3.4 KiB
PHP

<?php
/**
* Template header, included in the main and detail files
*/
// must be run from within DokuWiki
if (!defined('DOKU_INC')) die();
?>
<!-- ********** HEADER ********** -->
<div id="dokuwiki__header"><div class="pad group">
<?php tpl_includeFile('header.html') ?>
<div class="headings group">
<ul class="a11y skip">
<li><a href="#dokuwiki__content"><?php echo $lang['skip_to_content']; ?></a></li>
</ul>
<?php if ($conf['tagline']): ?>
<p class="claim"><?php echo $conf['tagline']; ?></p>
<?php endif ?>
</div>
<div class="tools group">
<!-- USER TOOLS -->
<?php if ($conf['useacl']): ?>
<div id="dokuwiki__usertools">
<h3 class="a11y"><?php echo $lang['user_tools']; ?></h3>
<ul>
<?php
tpl_action('admin', 1, 'li');
tpl_action('media', 1, 'li');
tpl_action('index', 1, 'li');
tpl_action('recent', 1, 'li');
?>
</ul>
</div>
<?php endif ?>
<!-- SITE TOOLS -->
<div id="dokuwiki__sitetools">
<h3 class="a11y"><?php echo $lang['site_tools']; ?></h3>
<div class="mobileTools">
<?php tpl_actiondropdown($lang['tools']); ?>
</div>
<ul>
<?php
if ($_SERVER['REMOTE_USER']) {
//username and userpage - affiche le nom du pseudo et lien vers une page perso
//vérifier et dire ce qu'est le nom logué
$loginname = "";
if (!empty($conf["useacl"])){
if (isset($_SERVER["REMOTE_USER"]) && //no empty() but isset(): "0" may be a valid username...
$_SERVER["REMOTE_USER"] !== ""){
$loginname = $_SERVER["REMOTE_USER"]; //$INFO["client"] would not work here (-> e.g. if
//current IP differs from the one used to login)
}
}
// Afficher la page utilisateur logué
echo " <li id=\"pt-userpage\">". $lang['loggedinas'].': '.(tpl_getConf("monobook_userpage")
? html_wikilink(tpl_getConf("monobook_userpage_ns").$loginname, hsc($loginname))
: hsc($loginname))."</li>";
}
tpl_action('login', 1, 'li');
tpl_action('register', 1, 'li');
tpl_action('profile', 1, 'li');
?>
</ul>
</div>
</div>
<div id="frame_nav">
<h1><?php
// get logo either out of the template images folder or data/media folder
$logoSize = array();
$logo = tpl_getMediaFile(array(':wiki:logo.png', 'images/logo.png'), false, $logoSize);
// display logo and wiki title in a link to the home page
tpl_link(
wl(),
/*'<img src="'.$logo.'" '.$logoSize[3].' alt="" /> <span>'.$conf['title'].'</span>',
'accesskey="h" title="[H]"'*/
'<img src="'.$logo.'" '.$logoSize[3].' alt="" />',
'accesskey="h" title="[H]"'
);
?>
</h1>
</div><!--frame_nav-->
<?php html_msgarea() ?>
</div></div><!-- /header -->