|
|
@@ -1,4 +1,6 @@
|
|
|
<?php
|
|
|
+
|
|
|
+use \lithium\security\Auth;
|
|
|
/**
|
|
|
* Lithium: the most rad php framework
|
|
|
*
|
|
|
@@ -36,48 +38,23 @@
|
|
|
<!-- logo -->
|
|
|
<h1 id="logo"><a href="/">Kameleon</a></h1>
|
|
|
<!-- nav -->
|
|
|
- <nav>
|
|
|
-<ul id="nav">
|
|
|
- <li class="current"><a href="/users/feed">Home</a></li>
|
|
|
- <li><a href="about.html">Anime</a>
|
|
|
- <ul>
|
|
|
- <li><a href="about.html">Top Anime</a></li>
|
|
|
- <li><a href="#">recomendations</a>
|
|
|
- </ul>
|
|
|
- <li><a href="about.html">Manga</a>
|
|
|
- <ul>
|
|
|
- <li><a href="about.html">Top Manga</a></li>
|
|
|
- <li><a href="#">recomendations</a>
|
|
|
- </ul>
|
|
|
- </li>
|
|
|
- </li>
|
|
|
- <li><a href="portfolio.html">Stuff</a>
|
|
|
+
|
|
|
+
|
|
|
+<?php
|
|
|
+ //Get the current user from the session
|
|
|
+ $user = Auth::check('default');
|
|
|
|
|
|
- <ul>
|
|
|
- <li><a href="portfolio.html">3 Column Portfolio</a></li>
|
|
|
- <li><a href="portfolio-list.html">Portfolio List</a></li>
|
|
|
- </ul>
|
|
|
-
|
|
|
- </li>
|
|
|
- <li><a href="services.html">Foo</a>
|
|
|
- <ul>
|
|
|
- <li><a href="pricing.html">Pricing Table</a></li>
|
|
|
- </ul>
|
|
|
- </li>
|
|
|
- <li><a href="contact.html">Contact Us</a></li>
|
|
|
- <li><a href="/login?iframe=true&width=100%&height=600px" rel="prettyPhoto[iframes]">Login</a></li>
|
|
|
- <li>
|
|
|
- <?= $this->form->create(null, array('url' => '/search/index/anime', 'class' => 'search', 'style' => 'height:20px', 'method' => 'get')); ?>
|
|
|
- <?= $this->form->text('search', array('value' => 'Search...', 'onFocus' => 'clearDefault(this)', 'class' => 'sidebar-search', 'style' => 'width:200px')); ?>
|
|
|
- <button class="search" type="submit">Go</button>
|
|
|
- <br class="cl"/>
|
|
|
- <?= $this->form->end(); ?>
|
|
|
- </li>
|
|
|
-</ul>
|
|
|
-<br class="cl" />
|
|
|
- </nav>
|
|
|
- <br class="cl" />
|
|
|
- </header>
|
|
|
+ //If their is data (the user has logged in)
|
|
|
+ if ($user) {
|
|
|
+ echo $this->_render('element', 'authnav', compact('user'));
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ echo $this->_render('element', 'normalnav', compact('user'));
|
|
|
+ }
|
|
|
+ ?>
|
|
|
+
|
|
|
+<br class="cl" />
|
|
|
+</header>
|
|
|
<!-- end header -->
|
|
|
<div id="page">
|
|
|
<?php echo $this->content(); ?>
|