Example #1
0
 public static function login()
 {
     if (\Core\Session::authenticated()) {
         header('Location: ' . \Config::$base) || exit;
     }
     $vars = array('js' => array('https://login.persona.org/include.js', 'public/js/auth/' . __FUNCTION__ . '.js'));
     \Core\View::show('auth/' . __FUNCTION__, $vars);
 }
Example #2
0
?>
" />
<link rel="stylesheet" href="public/css/style.css" />
</head>

<body>
<!-- This Source Code Form is subject to the terms of the Mozilla Public
	- License, v. 2.0. If a copy of the MPL was not distributed with this
	- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<header>
<h1 id="site-title">
	<a href="">DM.track</a>
</h1>

<?php 
if (\Core\Session::authenticated()) {
    ?>
<nav><ul>
<?php 
    foreach (array('' => 'Table', 'graphs/glucose' => 'Graph:Glucose', 'auth/logout' => 'Logout') as $url => $name) {
        ?>
	<li><a href="<?php 
        echo $url;
        ?>
"><?php 
        echo $name;
        ?>
</a></li>
<?php 
    }
    ?>