The model was getting a bit more complicated than I would have liked. Went back to using straight redis commands and moved some of the user model logic into the custommodule.
129 lines
3.9 KiB
PHTML
129 lines
3.9 KiB
PHTML
<!doctype html>
|
|
<html>
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title><?php echo $this->config->site['name']; ?></title>
|
|
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.0.3/css/bootstrap.min.css">
|
|
<link rel="stylesheet" href="<?php echo $this->dynamic->css('/css/core.less'); ?>">
|
|
<!--link href="http://fonts.googleapis.com/css?family=Open+Sans" rel="stylesheet" type="text/css"-->
|
|
<!--[if lt IE 9]>
|
|
<script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7/html5shiv.js"></script>
|
|
<script src="//cdnjs.cloudflare.com/ajax/libs/respond.js/1.3.0/respond.js"></script>
|
|
<![endif]-->
|
|
<!-- TODO Analytics -->
|
|
</head>
|
|
<body>
|
|
<?php
|
|
if ($this->config->environment != 'local')
|
|
{
|
|
?>
|
|
<script>
|
|
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
|
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
|
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
|
|
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
|
|
ga('create', 'UA-46436973-1', '<?php echo $this->config->site['domain']; ?>');
|
|
ga('send', 'pageview');
|
|
</script>
|
|
<?php
|
|
}
|
|
?>
|
|
<header class="navbar navbar-inverse navbar-fixed-top" role="navigation">
|
|
<div class="container">
|
|
<div class="navbar-header">
|
|
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
|
|
<span class="sr-only">Toggle navigation</span>
|
|
<span class="icon-bar"></span>
|
|
<span class="icon-bar"></span>
|
|
<span class="icon-bar"></span>
|
|
</button>
|
|
<a class="navbar-brand" href="/"><?php echo $this->config->site['name']; ?></a>
|
|
</div>
|
|
<div class="collapse navbar-collapse pull-right">
|
|
<ul class="nav navbar-nav">
|
|
<?php
|
|
if (isset($this->module['uid']))
|
|
{
|
|
$links = array(
|
|
'/leaderboards' => 'My Leaderboards',
|
|
'/contact' => 'Contact Us',
|
|
'/logout' => 'Logout',
|
|
);
|
|
}
|
|
else
|
|
{
|
|
$links = array(
|
|
'/' => 'Home',
|
|
'/about' => 'About',
|
|
'/contact' => 'Contact Us',
|
|
'/login' => 'Sign In',
|
|
'/join' => 'Sign Up',
|
|
);
|
|
}
|
|
|
|
foreach ($links as $uri => $label)
|
|
{
|
|
$active = '';
|
|
|
|
if (($uri == '/' && $_REQUEST['request'] == 'home')
|
|
|| substr($uri, 1) == $_REQUEST['request'])
|
|
{
|
|
$active = ' class="active"';
|
|
}
|
|
|
|
echo '<li' . $active . '><a href="' . $uri . '">' . $label . '</a></li>';
|
|
}
|
|
?>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</header>
|
|
<?php
|
|
if ($_REQUEST['request'] == 'home')
|
|
{
|
|
require $this->template;
|
|
}
|
|
else
|
|
{
|
|
echo '<div class="container">';
|
|
require $this->template;
|
|
echo '</div>';
|
|
}
|
|
?>
|
|
<footer>
|
|
<div class="container">
|
|
<div class="row">
|
|
<div class="col-xs-12 col-sm-6">
|
|
<?php
|
|
$links = array(
|
|
'/about' => 'About',
|
|
'/contact' => 'Contact',
|
|
'/legal/terms' => 'Terms',
|
|
'/legal/privacy' => 'Privacy',
|
|
);
|
|
|
|
foreach ($links as $uri => $label)
|
|
{
|
|
echo '<a href="' . $uri . '">' . $label . '</a>';
|
|
|
|
if ($label != 'Privacy')
|
|
{
|
|
echo ' • ';
|
|
}
|
|
}
|
|
?>
|
|
</div>
|
|
<div class="col-xs-12 col-sm-6 text-right">
|
|
Made with ♥ in <a href="http://wecallhome.com/us/fl/tampa">Tampa, Florida</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</footer>
|
|
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script>
|
|
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery-validate/1.11.1/jquery.validate.min.js"></script>
|
|
<script src="//cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.0.3/js/bootstrap.min.js"></script>
|
|
<script src="<?php echo $this->dynamic->js('/js/jerky.js'); ?>"></script>
|
|
</body>
|
|
</html>
|