Exemplo n.º 1
0
function header_html()
{
    $html = "<div id='page_box'>\n";
    $html .= "<div id='header'>\n";
    $html .= "<h2>Haze Watch</h2>";
    $html .= "<div id='menu'>";
    $html .= "<div class='nav_menu'>\n";
    $html .= "<ul>";
    $html .= "<li><a href='/'>Home</a></li>";
    $html .= "<li><a href='/about.php'>About</a></li>";
    $html .= "<li><a href='/contact.php'>Contact</a></li>";
    $html .= "<li><a href='/publications.php'>Publications</a></li>";
    if (user_authenticated()) {
        $html .= "<li><a href='/import-data.php'>Import</a></li>";
    }
    $html .= "<li><a target='_blank' href='/map.php'>Map</a></li>";
    $html .= "<li><a target='_blank' href='/cgi-bin/carbonmap.py'> Estimates</a></li>";
    $html .= "</ul>";
    $html .= "</div>\n";
    $html .= "<div id='login_menu'>";
    if (user_authenticated()) {
        $name = authenicated_username();
        $name = $name ? " as {$name}" : "";
        $html .= "Logged in{$name}, <a href='/authenticate.php?logout'>Logout</a>";
    } else {
        $html .= "<a href='/login.php'>Login</a>";
    }
    $html .= "</div>\n";
    $html .= "</div>\n";
    // end menu
    $html .= "<div class='logo'><img src='images/unsw.jpg'></div>";
    $html .= "</div>\n";
    // end header
    $html .= "<div id='main_content_box'>\n";
    return $html;
}
Exemplo n.º 2
0
	<!-- Date: 2010-03-05 -->
	
	<?php 
echo $PAGE_CSS_IMPORTS_HTML;
?>
</head>
<body>
<?php 
echo $PAGE_HEADER_HTML;
?>

<?php 
if (isset($_GET['error'])) {
    echo "<p>Invalid username and password</p>";
}
?>

<?php 
if (user_authenticated()) {
    echo "<a href='authenticate.php?logout'>Logout</a>";
} else {
    echo $LOGIN_FORM_HTML;
}
?>

<?php 
echo $PAGE_FOOTER_HTML;
?>
</body>
</html>