Moved 2019 to the abyss.

This commit is contained in:
Pachira 2022-02-04 22:48:20 +00:00
parent 49eae219e5
commit 66679ae1df
6 changed files with 2 additions and 395 deletions

View file

@ -8,7 +8,7 @@ if($reqPath === '/contact.php' || $reqPath === '/contact.html') {
return FM_HIT | 302;
}
if($reqPath === '/nintendo') {
if($reqPath === '/nintendo' || $reqPath === '/nintendo.php') {
if($reqMethod !== 'GET')
return FM_ERR | 405;
header('Location: /contact#gaming');

View file

@ -1,25 +0,0 @@
<?php
http_response_code(404);
require_once __DIR__ . '/../_v4/includes.php';
define('FWH_STYLE', FWH_2019);
echo html_open()
. '<head>'
. html_head('Error 404 - Not Found', HEAD_ERROR)
. '</head><body>'
. html_navigation(NAV_ERROR, [
'title1' => '404 ',
'title2' => 'not found',
])
. '<div class="wrapper">';
?>
<div class="description" style="text-align: center" style="padding: 0;">
<p class="description__paragraph" style="padding: 10px 5px;"><img src="//abyss.flash.moe/flash.moe/assets/link.png" alt="" style="vertical-align: middle; max-width: 100%;"></p>
</div>
<?php
echo '</div>'
. html_footer()
. '</body>'
. html_close();

View file

@ -1,50 +0,0 @@
<?php
require_once __DIR__ . '/../_v4/includes.php';
define('FWH_STYLE', FWH_2019);
$postId = !empty($_GET['p']) && is_string($_GET['p']) && ctype_digit($_GET['p']) ? (int)($_GET['p']) : 0;
if($postId < 1) {
header('Location: /2019');
exit;
}
$getBlogPost = $pdo->prepare('
SELECT `post_id`, `post_title`, `post_text`, `post_published`
FROM `fm_blog_posts`
WHERE `post_id` = :id
AND `post_published` IS NOT NULL
AND `post_published` < CURRENT_TIMESTAMP
AND `post_deleted` IS NULL
');
$getBlogPost->bindValue('id', $postId);
$getBlogPost->execute();
$blogPost = $getBlogPost->fetch(PDO::FETCH_OBJ);
if (empty($blogPost)) die('Couldn\'t find that post.');
echo html_open()
. '<head>'
. html_head($blogPost->post_title, HEAD_FLASHWAVE)
. '</head><body class="blog">'
. html_navigation(NAV_FLASHWAVE)
. '<div class="wrapper">';
?>
<div class="index__blog" style="margin: 10px 0 0;">
<h1 class="index__blog__title"><?=$blogPost->post_title;?></h1>
<?php
$splitLines = explode("\n", $blogPost->post_text);
foreach ($splitLines as $paragraph)
if(!empty($paragraph))
echo '<p class="index__blog__paragraph">' . trim($paragraph) . '</p>';
?>
<span class="index__blog__continue">Posted <?=$blogPost->post_published;?></span>
</div>
<?php
echo '</div>'
. html_footer()
. '</body>'
. html_close();

View file

@ -1,236 +0,0 @@
<?php
require_once __DIR__ . '/../_v4/includes.php';
define('FWH_STYLE', FWH_2019);
$accounts = [
[
'icon' => 'fas fa-at',
'title' => 'E-mail',
'url' => 'mailto:me@flash.moe',
],
[
'icon' => 'fas fa-bolt',
'title' => 'Flashii',
'url' => 'https://flashii.net/profile.php?u=1',
],
[
'icon' => 'fab fa-github',
'title' => 'Github',
'url' => 'https://github.com/flashwave',
],
[
'icon' => 'fab fa-youtube',
'title' => 'YouTube',
'url' => 'https://youtube.com/c/flashwave',
],
[
'icon' => 'fab fa-twitch',
'title' => 'Twitch',
'url' => 'https://twitch.tv/flashwave0',
],
[
'icon' => 'fab fa-steam',
'title' => 'Steam',
'url' => 'https://steamcommunity.com/id/flashwave_',
],
[
'icon' => 'fab fa-twitter',
'title' => 'Twitter',
'url' => 'javascript:confirm(\'Proceed with caution.\') ? location.assign(\'https://twitter.com/smugwave\') : void(0);',
],
[
'icon' => 'fab fa-lastfm',
'title' => 'last.fm',
'url' => 'https://www.last.fm/user/flashwave_',
],
[
'icon' => 'fab fa-nintendo-switch',
'title' => 'Switch',
'url' => 'javascript:alert(\'SW-7446-8163-4902\');',
],
[
'icon' => 'fab fa-paypal',
'title' => 'Donate',
'url' => 'https://paypal.me/flashwave',
],
];
$getBlogPosts = $pdo->prepare('
SELECT `post_id`, `post_title`, `post_text`, `post_published`
FROM `fm_blog_posts` AS bp
WHERE `post_published` IS NOT NULL
AND `post_published` < CURRENT_TIMESTAMP
AND `post_deleted` IS NULL
ORDER BY `post_published` DESC
');
$getBlogPosts->execute();
$blogPosts = $getBlogPosts->fetchAll(PDO::FETCH_OBJ);
echo html_open()
. '<head>'
. html_head('flash.moe', HEAD_FLASHWAVE)
. '</head><body class="index">';
if(html_old_ie())
echo '<bgsound src="/assets/SMS-JBIOS-Demo.mid" loop="infinite"/>';
if(html_netscape())
echo '<embed src="/assets/SMS-JBIOS-Demo.mid" autostart="true" hidden="true" loop="true"></embed>';
echo '<div class="wrapper">';
?>
<div class="index__side">
<div class="index__header">
<img src="//flashii.net/user-assets.php?m=avatar&u=1&r=120" width="60" height="60" alt="avatar" class="index__header__avatar"/>
<div class="index__header__text">
<div class="index__header__name">flash<span class="index__header__name__highlight">wave</span></div>
<div class="index__header__slogan">if it ain't broke, i'll break it</div>
</div>
</div>
<div class="index__accounts">
<?php foreach($accounts as $account): ?>
<a href="<?=$account['url'];?>" class="index__account" rel="noreferrer noopener">
<div class="index__account__icon"><i class="<?=$account['icon'];?> fa-fw"></i></div>
<div class="index__account__title"><?=$account['title'];?></div>
</a>
<?php endforeach; ?>
</div>
<a href="/2019/projects.php" class="index__affil">
<div class="index__affil__name">Projects</div>
<div class="index__affil__desc">List of things I've made or am making.</div>
</a>
<a href="https://flashii.net" class="index__affil index__affil--flashii">
<div class="index__affil__name">Flashii</div>
<div class="index__affil__desc">Community site I run and develop.</div>
</a>
<a href="https://railgun.sh" class="index__affil index__affil--railgun">
<div class="index__affil__name">Railgun</div>
<div class="index__affil__desc">Chat server and chat protocols I work on.</div>
</a>
<?php if(!html_netscape()): ?>
<div class="index__playing">
<div class="index__playing__header" id="np-header">Loading...</div>
<div class="index__playing__content index__playing__content--hidden" id="np-content">
<div class="index__playing__cover" id="np-cover"></div>
<div class="index__playing__text">
<a class="index__playing__title" id="np-title"></a>
<a class="index__playing__artist" id="np-artist"></a>
</div>
</div>
</div>
<?php endif; ?>
</div>
<div class="index__main">
<?php foreach($blogPosts as $post) { ?>
<div class="index__blog">
<h1 class="index__blog__title"><?=$post->post_title;?></h1>
<p class="index__blog__paragraph"><?=trim(explode("\n", $post->post_text)[0]);?></p>
<a href="/2019/blog.php?p=<?=$post->post_id;?>" class="index__blog__continue">Continue reading</a>
<span class="index__blog__continue">Posted <?=$post->post_published;?></span>
</div>
<?php } ?>
</div>
<?php if(!html_netscape()): ?>
<script type="text/javascript">
function createXHR() {
if (window.XMLHttpRequest) {
return new XMLHttpRequest();
} else if (window.ActiveXObject) {
try {
return new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
try {
return new ActiveXObject("Microsoft.XMLHTTP");
} catch (e) {}
}
}
return null;
}
function getNowListening(username, cb) {
var xhr = createXHR();
xhr.onreadystatechange = function() {
if (xhr.readyState !== 4)
return;
var xml = null;
if(window.DOMParser) {
var parser = new DOMParser();
xml = parser.parseFromString(xhr.responseText, 'text/xml');
} else {
xml = new ActiveXObject('Microsoft.XMLDOM');
xml.async = 'false';
xml.loadXML(xhr.responseText);
xml = xml.childNodes[1];
}
cb(xml.getElementsByTagName('Track')[0]);
};
xhr.open('GET', '/np.php?u=' + username, true);
xhr.send();
}
function getNodeText(node) {
if (typeof node.textContent === 'undefined') {
return node.text;
} else {
return node.textContent;
}
}
function setNodeText(node, text) {
if (typeof node.textContent === 'undefined') {
node.innerText = text;
} else {
node.textContent = text;
}
}
function setNowListening(track) {
var cover = document.getElementById('np-cover'),
title = document.getElementById('np-title'),
artist = document.getElementById('np-artist'),
header = document.getElementById('np-header'),
content = document.getElementById('np-content'),
coverUrl = getNodeText(track.getElementsByTagName('Medium')[0]);
if (content.className.indexOf('index__playing__content--hidden') >= 0)
content.className = content.className.replace('index__playing__content--hidden', '');
setNodeText(header, getNodeText(track.getElementsByTagName('IsPlaying')[0]) != '0' ? 'Now Listening' : 'Last Listened');
cover.style.backgroundImage = coverUrl.length < 1 ? '' : "url('$')".replace('$', coverUrl);
setNodeText(title, getNodeText(track.getElementsByTagName('Name')[0]));
title.href = getNodeText(track.getElementsByTagName('Url')[0]);
setNodeText(artist, getNodeText(track.getElementsByTagName('Name')[1]));
artist.href = title.href.substring(0, title.href.indexOf('/_/'));
}
window.onload = function() {
var lastFmUsername = '';
var links = document.getElementsByTagName('a');
for (var i = 0; i < links.length; i++)
if(links[i].href.substring(0, 25) == 'https://www.last.fm/user/') {
lastFmUsername = links[i].href.substring(25);
break;
}
if(lastFmUsername) {
setInterval(function() { getNowListening(lastFmUsername, function(track) { setNowListening(track); }); }, 60000);
getNowListening(lastFmUsername, function(track) { setNowListening(track); });
}
};
</script>
<?php
endif;
echo '</div>'
. html_footer()
. '</body>'
. html_close();

View file

@ -1,82 +0,0 @@
<?php
require_once __DIR__ . '/../_v4/includes.php';
define('FWH_STYLE', FWH_2019);
echo html_open()
. '<head>'
. html_head('Projects', HEAD_FLASHWAVE)
. '</head><body>'
. html_navigation(NAV_FLASHWAVE)
. '<div class="wrapper">';
?>
<div class="projects projects--active">
<div class="projects-header">Active Projects</div>
<div class="projects-listing">
<?php
$archived = false;
$getProjects = $pdo->prepare('
SELECT `project_id`, `project_name`, `project_summary`, `project_homepage`, `project_repository`, `project_forum`, `project_archived`
FROM `fm_projects`
WHERE `project_deleted` IS NULL
ORDER BY !ISNULL(`project_archived`), `project_order` DESC
');
$getProjects->execute();
$projects = $getProjects->fetchAll(PDO::FETCH_OBJ);
$getLanguages = $pdo->prepare('
SELECT pl.`language_name`, pl.`language_colour`
FROM `fm_proglangs` AS pl
LEFT JOIN `fm_projects_proglangs` AS ppl
ON ppl.`language_id` = pl.`language_id`
WHERE ppl.`project_id` = :project_id
ORDER BY ppl.`priority`
');
foreach ($projects as $project) {
$getLanguages->bindValue('project_id', $project->project_id);
$getLanguages->execute();
$languages = $getLanguages->fetchAll(PDO::FETCH_OBJ);
if(!$archived && !empty($project->project_archived)) {
$archived = true;
?>
</div></div><div class="projects projects--archived">
<div class="projects-header">Archived Projects</div>
<div class="projects-listing">
<?php
}
?>
<div class="project-v2"<?php if(isset($languages[0]->language_colour)) { echo sprintf(' style="background-color: %1$s; box-shadow: 0 0 3px %1$s;"', html_colour($languages[0]->language_colour)); } ?>>
<div class="project-inner">
<h1 class="project-name"><?=$project->project_name;?></h1>
<div class="project-description"><?=trim($project->project_summary);?></div>
<div class="project-languages">
<?php foreach($languages as $language) { ?>
<div class="project-language" style="<?=sprintf('border-color: %1$s; box-shadow: 0 0 2px %1$s;', html_colour($language->language_colour));?>">
<?=$language->language_name;?>
</div>
<?php } ?>
</div>
<div class="project-links">
<?php if (!empty($project->project_homepage)): ?>
<a class="project-link" href="<?=$project->project_homepage;?>"><i class="fas fa-home fa-fw"></i> Homepage</a>
<?php endif; if (!empty($project->project_repository)): ?>
<a class="project-link" href="<?=$project->project_repository;?>"><i class="fas fa-code fa-fw"></i> Repository</a>
<?php endif; if(!empty($project->project_forum)): ?>
<a class="project-link" href="<?=$project->project_forum;?>"><i class="fas fa-comments fa-fw"></i> Forum</a>
<?php endif; ?>
</div>
</div>
</div>
<?php } ?>
</div>
</div>
<?php
echo '</div>'
. html_footer()
. '</body>'
. html_close();

View file

@ -1,2 +1,2 @@
<?php
require_once __DIR__ . '/2020/nintendo.php';
require_once __DIR__ . '/index.php';