librenms/html/includes/header.inc.php

70 lines
1.6 KiB
PHP
Raw Normal View History

2013-10-28 22:08:23 +00:00
2013-10-28 22:22:08 +00:00
<div id="gumax-header">
<div id="gumax-p-logo">
<div id="p-logo">
2013-10-28 22:22:08 +00:00
<?php
if ($config['title_image'])
{
echo('<a style="background-image: ' . $config['title_image'] . '" accesskey="z" href=""></a>');
}
else
{
2013-10-28 22:40:20 +00:00
echo('<a href=""><h2>'.$config['project_name'].'</h2></a>');
}
2013-10-28 22:22:08 +00:00
?>
</div>
<script type="text/javascript"> if (window.isMSIE55) fixalpha(); </script>
</div>
<!-- end of gumax-p-logo -->
<!-- Login Tools -->
<div id="gumax-p-login">
<?php
2013-11-09 19:01:32 +00:00
echo('<a target="_blank" href="'.$config['project_issues'].'">Report Bug</a> | ');
$toggle_url = preg_replace('/(\?|\&)widescreen=(yes|no)/', '', $_SERVER['REQUEST_URI']);
if (strstr($toggle_url,'?')) { $toggle_url .= '&amp;'; } else { $toggle_url .= '?'; }
if($_SESSION['widescreen'] === 1)
{
echo('<a href="' . $toggle_url . 'widescreen=no" title="Switch to normal screen width layout">Normal width</a> | ');
} else {
echo('<a href="' . $toggle_url . 'widescreen=yes" title="Switch to wide screen layout">Widescreen</a> | ');
}
if ($_SESSION['authenticated'])
{
echo("Logged in as <b>".$_SESSION['username']."</b>");
} else {
echo("Not logged in!");
}
if (Net_IPv6::checkIPv6($_SERVER['REMOTE_ADDR']))
{
echo(' via <b>IPv6</b>');
} else {
echo(' via <b>IPv4</b>');
}
if ($_SESSION['authenticated'])
{
echo(" (<a href='logout/'>Logout</a>)");
}
?>
</div>
<div style="float: right;">
<?php
if (isset($_SESSION['authenticated']) && $_SESSION['authenticated'])
{
include("includes/topnav.inc.php");
}
?>
</div>
</div>
<!-- //// end of gumax-header //// -->