| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596 |
- <?php
- use \lithium\security\Auth;
- ?>
- <!DOCTYPE html>
- <html>
- <head>
- <?= $this->html->charset(); ?>
- <title>OtakuHub<?php $title = $this->title(); if ($title) echo " > $title" ?></title>
- <?= $this->html->style(array('style', 'base')); ?>
- <?= $this->html->style('themes/light'); ?>
- <?= $this->html->style('prettyPhoto'); ?>
- <?= $this->styles(); ?>
- <script type="text/javascript" >
- function clearDefault(el) {
- if (el.defaultValue == el.value)
- el.value = ""
- }
- function resetValue(el) {
- el.value = "Search..."
- }
- </script>
- <link href='http://fonts.googleapis.com/css?family=Cantarell:regular,bold&v1' rel='stylesheet' type='text/css'>
- </head>
- <header>
- <?php
- $links = array(
- 'Home' => '/',
- 'Anime' => '/anime',
- 'Manga' => '/manga',
- );
- $user = Auth::check('default');
- if ($user)
- {
- $links['Feed'] = '/users/feed';
- $links['Profile'] = '/users/feed';
- $links['Logout'] = '/logout';
- }
- else
- {
- $links['Sign up'] = '/users/signup';
- $links['Login'] = '/login'; // overwritten with JS
- echo '
- <div id="login" style="display: none">
- <h2>Login</h2>
- ';
- echo $this->form->create(null, array('url' => '/login'));
- echo $this->form->field('username', array('type' => 'text'));
- echo $this->form->field('password', array('type' => 'password'));
- echo $this->form->submit('Login');
- echo $this->form->end();
- echo '</div>';
- }
- echo '
- <nav>
- <ul>
- ';
- foreach ($links as $name => $path) {
- if ($path == '/')
- echo '<li class="current">';
- else
- echo '<li>';
- echo "<a href=\"$path\">$name</a></li>";
- }
- echo '
- </ul>
- </nav>
- ';
- ?>
- <?= $this->form->create(null, array('url' => '/search/index/anime', 'class' => 'search', 'method' => 'get')); ?>
- <?= $this->form->text('search', array('value' => 'Search...', 'onFocus' => 'clearDefault(this)', 'style' => 'width: 200px')); ?>
- <input type="submit" value="Go">
- <?= $this->form->end(); ?>
- <br class="cl" />
- </header>
- <div id="page">
- <?php echo $this->content() ?>
- </div>
- <footer>
- <p>Copyright ©2011, <a href="http://www.melenion.org">Melenion Dev Studios</a></p>
- <br class="cl" />
- </footer>
- <?= $this->html->script("/js/jquery-1.6.1.min.js"); ?>
- <?= $this->html->script("/js/jquery.anchor.js"); ?>
- <?= $this->html->script("/js/jquery.tools.min.js"); ?>
- <?= $this->html->script("/js/jquery.form.js"); ?>
- <?= $this->html->script("/js/jquery.tipsy.js"); ?>
- <?= $this->html->script("/js/jquery.prettyPhoto.js"); ?>
- <?= $this->html->script("/js/functions.js"); ?>
- <?= $this->scripts(); ?>
- </body>
- </html>
|