hajime/public/mio_news.php

143 lines
6.2 KiB
PHP
Raw Normal View History

2023-08-11 22:16:32 +00:00
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Flashii - News</title>
<meta http-equiv="content-language" content="en-gb" />
<link rel="shortcut icon" href="/assets/favicon.ico">
<link rel="stylesheet" type="text/css" href="/assets/global.css" />
<link rel="stylesheet" type="text/css" href="/assets/css/mio.css" />
<script type="text/javascript" src="/assets/jquery.js"></script>
<script type="text/javascript" src="/assets/js/flashii.js"></script>
</head>
<body>
<?php include FII_SRC_DIR . '/mio_bar.php'; ?>
<a href="/">
<img class="logo" src="/assets/pixel.png" alt="Flashii" />
</a><br />
<div class="pagecontent">
<?php
print '<h3 class="miotitle" style="margin: 0px;">'.(isset($_GET['id']) ? ($postExists ? $getNews[0]['title'] : 'Post does not exist') : 'News <span class="permalink"><a href="/news.xml">RSS</a></span>').'</h3>';
foreach($getNews as $newsPost) {
print '<div class="content">';
if(!isset($_GET['id'])) {
print '<h3 class="miotitle" id="';
print $newsPost['id'];
print '">';
print $newsPost['title'];
print '<span class="permalink"><a href="/news/#';
print $newsPost['id'];
print '" title="Permalink">#</a> <a href="/news/';
print $newsPost['id'];
print '" title="Direct Link">@</a></span>';
print '</h3>';
}
print '<div class="postcontent">';
print '<a href="/u/';
print $newsPost['uid'];
print '">';
print '<div class="news-poster">';
print '<img src="/a/';
print $newsPost['uid'];
print '" alt="';
print $flashii->getUserdata($newsPost['uid'])['username'];
print '" class="default-avatar-setting" />';
print '<h2 style="color: #';
print $flashii->getRankdata($flashii->getUserdata($newsPost['uid'])['userrole'])['colour'];
print '; text-shadow: 0px 0px 7px #888; padding: 0px 0px 10px;">';
print $flashii->getUserdata($newsPost['uid'])['username'];
print '</h2>';
print '</div>';
print '</a>';
print $mdparser->text($newsPost['content']);
print '<div class="clear"></div>';
print '</div>';
print '<div class="news-post-time">Posted on ';
print date($fwSettings['dateFormat'], $newsPost['date']);
print isset($_GET['id']) ? null : ' <a class="default" href="/news/'.$newsPost['id'].'#disqus_thread">View comments</a>';
print '</div>';
print '</div>';
}
print isset($postExists) ? '</div>' : null;
if(isset($_GET['id'])) {
if($postExists) {
print '<div class="pagecontent news-comments-container"><h3 class="miotitle">Comments</h3>';
print "<div id=\"disqus_thread\" style=\"padding: 0px 10px;\"></div>
<script type=\"text/javascript\">
/* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
var disqus_shortname = 'flashii';
var disqus_identifier = 'news_".$getNews[0]['id']."';
var disqus_title = '".$getNews[0]['title']."';
var disqus_url = 'http://".$_SERVER['HTTP_HOST']."/news/".$getNews[0]['id']."';
/* * * DON'T EDIT BELOW THIS LINE * * */
(function() {
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
})();
</script>
<noscript>Please enable JavaScript to view the <a href=\"http://disqus.com/?ref_noscript\">comments powered by Disqus.</a></noscript>
<a href=\"http://disqus.com\" class=\"dsq-brlink\">comments powered by <span class=\"logo-disqus\">Disqus</span></a>
";
print '</div>';
} else {
print '<div style="padding: 6px 20px; text-align: left;">';
print '<h1>The requested news post does not exist!</h1>';
print 'There are a few possible reasons for this:';
print '<ul>';
print '<li>The post may have been deleted due to irrelevancy.</li>';
print '<li>The post never existed.</li>';
print '</ul>';
print '</div>';
print '</div>';
}
} else {
print "<script type=\"text/javascript\">
/* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
var disqus_shortname = 'flashii';
/* * * DON'T EDIT BELOW THIS LINE * * */
(function () {
var s = document.createElement('script'); s.async = true;
s.type = 'text/javascript';
s.src = '//' + disqus_shortname + '.disqus.com/count.js';
(document.getElementsByTagName('HEAD')[0] || document.getElementsByTagName('BODY')[0]).appendChild(s);
}());
</script>
";
}
?>
</div>
<div class="navbar">
<?php include(FII_SRC_DIR . '/mio_menu.php'); ?>
</div>
<?php include(FII_SRC_DIR . '/mio_copyright.php'); ?>
<script type="text/javascript">
/* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
var disqus_shortname = 'flashii';
/* * * DON'T EDIT BELOW THIS LINE * * */
(function () {
var s = document.createElement('script'); s.async = true;
s.type = 'text/javascript';
s.src = '//' + disqus_shortname + '.disqus.com/count.js';
(document.getElementsByTagName('HEAD')[0] || document.getElementsByTagName('BODY')[0]).appendChild(s);
}());
</script>
</body>
</html>