139 lines
6.6 KiB
PHP
139 lines
6.6 KiB
PHP
<?php
|
|
function desHeader($title, $add = null, $dev = false) {
|
|
global $flashii;
|
|
|
|
$dev = true;
|
|
$css = null;
|
|
$js = null;
|
|
$meta = null;
|
|
|
|
if($add) {
|
|
if(!empty($add['css'])) {
|
|
foreach($add['css'] as $meh => $sheet) {
|
|
$css .= '<link rel="stylesheet" type="text/css" href="'.$sheet.'" />'."\r\n";
|
|
}
|
|
}
|
|
|
|
if(!empty($add['js'])) {
|
|
foreach($add['js'] as $meh => $script) {
|
|
$js .= '<script type="text/javascript" src="'.$script.'"></script>'."\r\n";
|
|
}
|
|
}
|
|
|
|
if(!empty($add['meta'])) {
|
|
foreach($add['meta'] as $meh => $metas) {
|
|
$meta .= $metas."\r\n";
|
|
}
|
|
}
|
|
}
|
|
|
|
$header = '
|
|
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<!-- META -->
|
|
<meta charset="utf-8" />
|
|
<title>'.$title.'</title>
|
|
<meta name="description" content="Any community that gets its laughs by pretending to be idiots will eventually be flooded by actual idiots who mistakenly believe that they\'re in good company. Welcome to Flashii." />
|
|
<meta name="keywords" content="Flashii, Media, Flashwave, Murasaki, Misaka, Circle, Zeniea, MalwareUp, Cybernetics, Saibateku, Community" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" />
|
|
'.$meta.'
|
|
<!-- CSS -->
|
|
<link rel="stylesheet" type="text/css" href="/assets/global.css" />
|
|
<link rel="stylesheet" type="text/css" href="/assets/css/yuuno'.($dev ? '' : '.min').'.css" />
|
|
<link rel="stylesheet" type="text/css" href="//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css" />
|
|
'.$css.'
|
|
<!-- JS -->
|
|
<script type="text/javascript" src="/assets/js/yuuno.min.js"></script>
|
|
'.$js.'
|
|
</head>
|
|
<body>
|
|
<div id="container">
|
|
<span id="top"></span>
|
|
<div class="header" id="header">
|
|
<a class="logo" href="/"></a>
|
|
<div class="menu">
|
|
<div class="menu-nav" id="navMenuSite">
|
|
<!-- Navigation menu, displayed on left side of the bar. -->
|
|
<a class="menu-item" href="/" title="Return to the front page of Flashii">Home</a>
|
|
<a class="menu-item" href="/news" title="Here you can read updates on Flashii">News</a>
|
|
<a class="menu-item" href="#" title="Chat with other Flashii members">Chat</a>'.
|
|
($flashii->loggedIn() ?
|
|
'<a class="menu-item" href="/members" title="View a list with all the activated user accounts">Members</a>
|
|
<a class="menu-item menu-donate" href="/donate" title="Give us money to keep the site (and other services) up and running">Donate</a>'
|
|
: null)
|
|
.'</div>
|
|
<div class="menu-ucp" id="navMenuUser">
|
|
<!-- "UCP" menu, displayed on right side of the bar. -->'.
|
|
($flashii->loggedIn() ?
|
|
'<a class="menu-item avatar" href="/u/'.$_SESSION['uid'].'" title="View and edit your own profile" style="background-image: url(/a/'.$_SESSION['uid'].'); width: auto;">'.$_SESSION['user'].'</a>
|
|
<a class="menu-item" href="/settings" title="Change your settings">Settings</a>'.
|
|
($flashii->isMod($_SESSION['uid']) ?
|
|
'<a class="menu-item" href="/manage" title="Manage users, the API, etc.">Manage</a>'
|
|
: null)
|
|
.'<a class="menu-item" href="/sys/logout" title="Log out of Flashii">Logout</a>'
|
|
: '<a class="menu-item" href="/login" title="Login to Flashii">Login</a>
|
|
<a class="menu-item" href="/register" title="Create an account">Register</a>'
|
|
)
|
|
.'</div>
|
|
<div class="menu-mob">
|
|
<a class="menu-item" id="mobileNavToggle" href="javascript:;" onclick="mobileMenu(true);">Open Menu</a>
|
|
</div>
|
|
<div class="clear"></div>
|
|
</div>
|
|
</div>
|
|
<div id="contentwrapper"> <!-- I DIDN\'T WANT TO DO THIS -->';
|
|
|
|
return $header;
|
|
}
|
|
|
|
function desFooter($add = null) {
|
|
global $flashii;
|
|
|
|
$footer = '
|
|
<a href="#top" id="gotop" class="gotop hidden"></a>
|
|
</div>
|
|
<div class="footer">
|
|
<div class="ftsections">
|
|
<div class="copycentre">Copyright © 2013-2015 <a href="https://flash.moe/" target="_blank">Flashwave</a> [<a href="?smode=mio">Switch to Mio</a>]'.$add.'</div>
|
|
<ul class="ftsection">
|
|
<li class="fthead">General</li>
|
|
<li><a href="/" title="Flashii Frontpage">Home</a></li>
|
|
<li><a href="/news" title="Flashii News & Updates">News</a></li>
|
|
<li><a href="/contact" title="Contact Flashii Staff">Contact</a></li>
|
|
<li><a href="/r/terms" title="Our Terms of Service">Terms of Service</a></li>
|
|
<li><a href="/r/rules" title="Some Rules and Information kind of summing up the ToS">Rules and Information</a></li>
|
|
<li><a href="/r/faq" title="Questions that get Asked Frequently">Frequently Asked Questions</a></li>
|
|
</ul>
|
|
<ul class="ftsection">
|
|
<li class="fthead">Affiliates</li>
|
|
<li><a href="https://flash.moe" title="Site of the Creator and Owner">Flash.moe</a></li>
|
|
<li><a href="http://malwareup.org" target="_blank" title="Community about everything except malware">MalwareUp</a></li>
|
|
<li><a href="http://aroltd.com" target="_blank" title="Where e meets the rest of the alvabet">Aroltd</a></li>
|
|
<li><a href="http://zeniea.com" target="_blank" title="Fun to read webcomic for if you\'re bored at some point">Zeniea</a></li>
|
|
<li><a href="http://nookls.org" target="_blank" title="I don\'t even know">Nookls</a></li>
|
|
</ul>
|
|
<ul class="ftsection">
|
|
<li class="fthead">Status & Social</li>
|
|
<li><a href="https://status.flashii.net" target="_blank" title="Check the status on the Flashii Server and related services">Server Status</a></li>
|
|
<li><a href="https://twitter.com/flashiinet" target="_blank" title="Follow us on Twitter for news messages that are too short for the news page">Twitter</a></li>
|
|
<li><a href="https://youtube.com/user/flashiinet" target="_blank" title="Our YouTube page where stuff barely ever gets uploaded, mainly used to archive community creations">YouTube</a></li>
|
|
<li><a href="https://steamcommunity.com/groups/flashiinet" target="_blank" title="Our Steam group, play games with other members on the site">Steam</a></li>
|
|
</ul>
|
|
<ul class="ftsection">
|
|
<li class="fthead">Contribution</li>
|
|
<li><a href="/changelog.php" title="All the changes made to Flashii are listed here">Changelog</a></li>
|
|
<li><a href="/r/credits" title="Here everyone who\'s helped Flashii get to where it is now is listed">Credits</a></li>
|
|
<li><a href="/feedback" target="_blank" title="Give us feedback on what to do">Feedback & Suggestions</a></li>
|
|
<li><a href="/donate" target="_blank" title="Give us money to keep the site (and other services) up and running">Donate</a></li>
|
|
<li><a href="https://github.com/flashii" target="_blank" title="Our Open Source repository thing">Github</a></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html>';
|
|
|
|
return $footer;
|
|
}
|