Ejemplo n.º 1
0
<?php

// Start the session
session_start();
include "Header.inc.php";
$menu = array('company' => array('text' => 'Company', 'url' => 'CompanyDisplayGrid.php'), 'division' => array('text' => 'Division', 'url' => 'DivisionDisplayGrid.php'), 'Branch' => array('text' => 'Branch', 'url' => 'BranchDisplayGrid.php'), 'BusinessLevel' => array('text' => 'BusinessLevel', 'url' => 'BusinessLevelDisplayGrid.php'));
class Navigation
{
    public static function GenerateMenu($items)
    {
        $html = "<nav class='navbar'>\n";
        foreach ($items as $item) {
            $html .= "<a href='{$item['url']}'>{$item['text']}</a>&nbsp;&nbsp; ";
        }
        $html .= "<nav>\n";
        return $html;
    }
}
echo Navigation::GenerateMenu($menu);
Ejemplo n.º 2
0
	<?php 
if (isset($javascript_include)) {
    foreach ($javascript_include as $val) {
        ?>
		<script src='<?php 
        echo $val;
        ?>
'></script>
	<?php 
    }
}
?>
</head>
<body>
	<?php 
echo Navigation::GenerateMenu($menu, "navbar");
?>

	<div id="overlay"></div>

	<div id="loginarea">
		<button class="close" title="Close" onclick="hideLoginArea()"></button>

		<header>
			<h1>Welcome</h1>
			<i class="fa fa-sign-in fa-2x"></i>
		</header>
		
		<form method="POST" id="loginform" onsubmit="return login()">
			<div class="tags"><input type="text" name="username" id="username" placeholder="USERNAME"></div>
			<div class="tags"><input type="password" name="password" id="password" placeholder="PASSWORD"></div>