2015-04-06 21:23:54 +00:00
<!DOCTYPE html>
<html>
<head>
<!-- META -->
<meta charset=" { { sakura . charset } } " />
<title> { { page . 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." />
2015-04-20 19:39:49 +00:00
<meta name="keywords" content="Flashii, Media, Flashwave, Circle, Zeniea, MalwareUp, Cybernetics, Saibateku, Community" />
2015-04-06 21:23:54 +00:00
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" />
2015-04-08 17:18:19 +00:00
{ % if page . redirect % }
2015-04-08 19:27:51 +00:00
<meta http-equiv="refresh" content="3; URL= { { page . redirect } } " />
2015-04-08 17:18:19 +00:00
{ % endif % }
2015-04-06 21:23:54 +00:00
<!-- CSS -->
2015-04-20 19:39:49 +00:00
<link rel="stylesheet" type="text/css" href="// { { sakura . urls . content } } /global.css?s= { { php . time } } " />
<link rel="stylesheet" type="text/css" href=" { { sakura . resources } } /css/yuuno.css?s= { { php . time } } " />
2015-04-06 21:23:54 +00:00
<link rel="stylesheet" type="text/css" href="//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css" />
<!-- JS -->
2015-04-20 19:39:49 +00:00
<script type="text/javascript" src=" { { sakura . resources } } /js/yuuno.js?s= { { php . time } } "></script>
2015-04-06 21:23:54 +00:00
<script type="text/javascript">
2015-04-17 22:14:31 +00:00
{ % if not user . checklogin % }
2015-04-20 19:39:49 +00:00
2015-04-06 21:23:54 +00:00
// Setting the shit so clicking the login link doesn't redirect to /login
2015-04-20 19:39:49 +00:00
function initHeaderLoginForm() {
2015-04-06 21:23:54 +00:00
2015-04-20 19:39:49 +00:00
var headerLoginForm = document.getElementById('headerLoginForm');
2015-04-06 21:23:54 +00:00
var headerLoginLink = document.getElementById('headerLoginLink');
2015-04-20 19:39:49 +00:00
var createInput = document.createElement('input');
createInput.setAttribute('name', 'ajax');
createInput.setAttribute('value', 'true');
createInput.setAttribute('type', 'hidden');
headerLoginForm.appendChild(createInput);
2015-04-06 21:23:54 +00:00
2015-04-20 19:39:49 +00:00
headerLoginLink.setAttribute('href', 'javascript:void(0);');
2015-04-06 21:23:54 +00:00
headerLoginLink.setAttribute('onclick', 'toggleLoginForm();');
}
// Toggling the dynamic login form
function toggleLoginForm() {
var headerLoginForm = document.getElementById('headerLoginForm');
headerLoginForm.className = (headerLoginForm.className == 'hidden' ? '' : 'hidden');
}
2015-04-20 19:39:49 +00:00
{ % else % }
// Prepare header logout stuff
function initHeaderLoginForm() {
var headerLogoutLink = document.getElementById('headerLogoutLink');
headerLogoutLink.setAttribute('href', 'javascript:void(0);');
headerLogoutLink.setAttribute('onclick', 'doHeaderLogout();');
}
function doHeaderLogout() {
generateForm("headerLogoutForm", { "class" : "hidden" , "method" : "post" , "action" : "//{{ sakura.urls.main }}/logout" } , { "mode" : "logout" , "ajax" : "true" , "time" : "{{ php.time }}" , "session" : "{{ php.sessionid }}" , "redirect" : "{{ sakura.currentpage }}" } ,"contentwrapper");
setTimeout(function() {
submitPost("headerLogoutForm", true, "Logging out...")
}, 10);
}
2015-04-06 21:23:54 +00:00
{ % endif % }
2015-04-20 19:39:49 +00:00
// Space for things that need to happen onload
window.onload = function() {
// Login form under header and ajax logout
initHeaderLoginForm();
{ % if php . self = = '/authenticate.php' % }
// AJAX Form Submission
var forms = {
2015-04-21 14:23:28 +00:00
{ % if not auth . changingPass % }
2015-04-20 19:39:49 +00:00
"loginForm": 'Logging in...',
{ % if not sakura . disableregister % } "registerForm": 'Processing registration...', { % endif % }
{ % if not sakura . requireactive % } "resendForm": 'Attempting to resend activation...', { % endif % }
"passwordForm": 'Sending password recovery mail...'
2015-04-21 14:23:28 +00:00
{ % else % }
"passwordForm": 'Changing password...'
{ % endif % }
2015-04-20 19:39:49 +00:00
};
for(var i in forms) {
var form = document.getElementById(i);
var submit = form.querySelector('[type="submit"]');
// TODO: Make hitting the enter key submit forms
//form.setAttribute('onkeypress', '');
submit.setAttribute('href', 'javascript:void(0);');
submit.setAttribute('onclick', 'submitPost(\''+ i +'\', true, \''+ forms[i] +'\');');
submit.setAttribute('type', 'button');
var createInput = document.createElement('input');
createInput.setAttribute('name', 'ajax');
createInput.setAttribute('value', 'true');
createInput.setAttribute('type', 'hidden');
form.appendChild(createInput);
}
{ % endif % }
};
2015-04-06 21:23:54 +00:00
</script>
</head>
<body>
<div id="container">
<span id="top"></span>
<div class="header" id="header">
2015-04-20 19:39:49 +00:00
<a class="logo" href="/"> { { sakura . sitename } } </a>
2015-04-06 21:23:54 +00:00
<div class="menu">
<div class="menu-nav" id="navMenuSite">
<!-- Navigation menu, displayed on left side of the bar. -->
2015-04-18 11:35:16 +00:00
<a class="menu-item" href="// { { sakura . urls . main } } /" title="Return to the front page of Flashii">Home</a>
<a class="menu-item" href="// { { sakura . urls . main } } /news" title="Here you can read updates on Flashii">News</a>
2015-04-18 18:26:52 +00:00
<a class="menu-item" href="// { { sakura . urls . chat } } /" title="Chat with other Flashii members">Chat</a>
{ % if user . checklogin % }
<a class="menu-item" href="// { { sakura . urls . main } } /members" title="View a list with all the activated user accounts">Members</a>
<a class="menu-item menu-donate" href="// { { sakura . urls . main } } /donate" title="Give us money to keep the site (and other services) up and running">Donate</a>
{ % endif % }
2015-04-06 21:23:54 +00:00
</div>
<div class="menu-ucp" id="navMenuUser">
<!-- User menu, displayed on right side of the bar. -->
2015-04-17 22:51:53 +00:00
{ % if user . checklogin % }
2015-04-18 11:35:16 +00:00
<a class="menu-item avatar" href="// { { sakura . urls . main } } /u/ { { user . data . id } } " title="View and edit your own profile" style="background-image: url('// { { sakura . urls . main } } /a/ { { user . data . id } } '); width: auto; color: { { user . rank . colour } } ; font-weight: 700;"> { { user . data . username } } </a>
<a class="menu-item" href="// { { sakura . urls . main } } /settings" title="Change your settings">Settings</a>
2015-04-20 19:39:49 +00:00
<a class="menu-item" href="// { { sakura . urls . main } } /logout?mode=logout&time= { { php . time } } &session= { { php . sessionid } } &redirect= { { sakura . currentpage } } " title="End your login session" id="headerLogoutLink">Logout</a>
2015-04-17 22:51:53 +00:00
{ % else % }
2015-04-18 11:35:16 +00:00
<a class="menu-item" id="headerLoginLink" href="// { { sakura . urls . main } } /login" title="Login to Flashii">Login</a>
<a class="menu-item" href="// { { sakura . urls . main } } /register" title="Create an account">Register</a>
2015-04-17 22:51:53 +00:00
{ % endif % }
2015-04-06 21:23:54 +00:00
</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">
2015-04-17 22:14:31 +00:00
{ % if not user . checklogin % }
2015-04-20 19:39:49 +00:00
<form method="post" action="/authenticate" class="hidden" id="headerLoginForm">
<input type="hidden" name="redirect" value=" { { sakura . currentpage } } " />
<input type="hidden" name="session" value=" { { php . sessionid } } " />
<input type="hidden" name="time" value=" { { php . time } } " />
<input type="hidden" name="mode" value="login" />
<label for="headerLoginUserName">Username:</label>
<input type="text" id="headerLoginUserName" name="username" class="inputStyling" placeholder="Username" />
<label for="headerLoginPassword">Password:</label>
<input type="password" id="headerLoginPassword" name="password" class="inputStyling" placeholder="Password" />
<input type="checkbox" name="remember" id="headerLoginRemember" />
<label for="headerLoginRemember">Remember me</label>
<input type="button" onclick="submitPost(this.parentNode.id, true, 'Logging in...');" id="headerLoginButton" name="submit" class="inputStyling small" value="Login" />
</form>
2015-04-06 21:23:54 +00:00
{ % endif % }