Campustream 1.0
A social network MQP for WPI
application/views/template/main.php
Go to the documentation of this file.
00001 <?
00002 $notify = null;
00003 if (sess::is_logged_in()) {
00004         if (sess::getUser()->confirmed == 0) {
00005                 Hub::redirect('/confirm/wait');
00006                 exit;
00007         }
00008 }
00009 ?>
00010 
00011 <!DOCTYPE html>
00012 <html lang="en" <?=isset($enable_fbml) ? 'xmlns="http://www.w3.org/1999/xhtml" 
00013         xmlns:fb="http://www.facebook.com/2008/fbml"' : ''?>>
00014 <head>
00015         <title>Campustream<?=isset($title) ? " - $title" : ''?></title>
00016         
00017         <?=View::factory('template/_css')->render()?>
00018         <?=View::factory('template/_javascript')->set('enable_fbml', $enable_fbml)->render()?>
00019         
00020         <? if(!$GLOBALS['ISDEV']): ?>
00021         <script type="text/javascript">
00022 
00023   var _gaq = _gaq || [];
00024   _gaq.push(['_setAccount', 'UA-387759-14']);
00025   _gaq.push(['_trackPageview']);
00026 
00027   (function() {
00028     var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
00029     ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
00030     var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
00031   })();
00032 
00033   </script>
00034         <? endif; ?>
00035 </head>
00036 <body>
00037         <?=isset($enable_fbml) ? '<div id="fb-root"></div>' : ''?>
00038         <div id="header-wrap">
00039                 <div id="header">
00040                         <h1><a href="/">Campustream</a></h1>
00041                 </div>
00042         </div>
00043         
00044         <div id="nav-wrap">
00045                 <ul id="nav">
00046                         <li <?=(isset($active) && $active == 'home') ? 'class="active"' : ''?>><a href="/">Home</a></li>
00047                         
00048                         <? if($this->session->get('authenticated')): ?>
00049                         <li <?=(isset($active) && $active == 'profile') ? 'class="active"' : ''?>><a href="/user/<?=sess::getUsername()?>">Profile</a></li>
00050                         <li <?=(isset($active) && $active == 'newsevents') ? 'class="active"' : ''?>><a href="/news_events">News &amp; Events</a></li>
00051                         <li <?=(isset($active) && $active == 'collaborate') ? 'class="active"' : ''?>><a href="/collaborate">Collaborate</a></li>
00052                         <li <?=(isset($active) && $active == 'users') ? 'class="active"' : ''?>><a href="/users">Users</a></li>
00053                         <li <?=(isset($active) && $active == 'settings') ? 'class="active"' : ''?>><a href="/settings/profile">Settings</a></li>
00054                         <li><a href="/session/destroy">Logout</a></li>
00055                         <? else: ?>
00056                         <li <?=(isset($active) && $active == 'register') ? 'class="active"' : ''?>><a href="/register">Register</a></li>
00057                         <li <?=(isset($active) && $active == 'login') ? 'class="active"' : ''?>><a href="/login">Login</a></li>
00058                         <? endif; ?>
00059                         
00060                         <!--<li <?=(isset($active) && $active == 'stats') ? 'class="active"' : ''?>><a href="/admin/stats">Stats</a></li>-->
00061                 </ul>
00062         </div>
00063         
00064         <div id="content-wrap-outer">
00065                 <div id="content-wrap-inner">
00066                         <?=$content?>
00067                 </div>
00068         </div>
00069         
00070         <div id="footer">
00071                 <p>&copy; <?=date('Y')?> Campustream - Powered by Hub</p>
00072         </div>
00073         
00074         <? if(sess::is_logged_in()): ?>
00075                 <?=View::factory('notifications/main')->render()?>
00076         <? endif; ?>
00077         
00078         <iframe id="xd-receiver" src="http://api<?=$GLOBALS['ISDEV'] ? 'dev' : ''?>.campustream.com/xd_receiver.html" width="1" height="1" scrolling="no" frameborder="0"></iframe>
00079 </body>
00080 </html>