Update home page
This commit is contained in:
parent
5269bf5539
commit
ed98c2c3c2
41
app/bootstrap.php
Normal file
41
app/bootstrap.php
Normal file
|
@ -0,0 +1,41 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
///
|
||||||
|
// This is the bootstrap file; grabs all the important things the library
|
||||||
|
// used to but needed separated.
|
||||||
|
///
|
||||||
|
*/
|
||||||
|
|
||||||
|
ini_set('display_errors', 'On');
|
||||||
|
error_reporting(E_ALL | E_STRICT);
|
||||||
|
|
||||||
|
session_start();
|
||||||
|
|
||||||
|
require_once('../app/library.php');
|
||||||
|
|
||||||
|
// ---------------------------------------------------------------------------- //
|
||||||
|
// ---------------------------------------------------------------------------- //
|
||||||
|
/// Autoloader to get all our classes.
|
||||||
|
|
||||||
|
const MAP = [
|
||||||
|
'Article' => 'classes/Article.php',
|
||||||
|
'ArticleComment' => 'classes/ArticleComment.php',
|
||||||
|
'EpisodeComment' => 'classes/EpisodeComment.php',
|
||||||
|
'Project' => 'classes/Project.php',
|
||||||
|
'Show' => 'classes/Show.php',
|
||||||
|
'User' => 'classes/User.php',
|
||||||
|
|
||||||
|
'DatabaseModule' => 'modules/DatabaseModule.php',
|
||||||
|
'CommunityModule' => 'modules/CommunityModule.php',
|
||||||
|
'DisplayModule' => 'modules/DisplayModule.php',
|
||||||
|
'ParserModule' => 'modules/ParserModule.php',
|
||||||
|
|
||||||
|
'CommunityHub' => 'hubs/CommunityHub.php'
|
||||||
|
];
|
||||||
|
|
||||||
|
spl_autoload_register(function ($class) {
|
||||||
|
if (!isset(MAP[$class])) return false;
|
||||||
|
require_once '../app/' . MAP[$class];
|
||||||
|
return true;
|
||||||
|
});
|
|
@ -7,24 +7,6 @@
|
||||||
///
|
///
|
||||||
*/
|
*/
|
||||||
|
|
||||||
ini_set('display_errors', 'On');
|
|
||||||
error_reporting(E_ALL | E_STRICT);
|
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------- //
|
|
||||||
// ---------------------------------------------------------------------------- //
|
|
||||||
/// Includes, so we can use them elsewhere without having to call them each time.
|
|
||||||
|
|
||||||
include($_SERVER["DOCUMENT_ROOT"] . "/Resources/Scripts/PHP/Classes/User.php");
|
|
||||||
include($_SERVER["DOCUMENT_ROOT"] . "/Resources/Scripts/PHP/Classes/Show.php");
|
|
||||||
include($_SERVER["DOCUMENT_ROOT"] . "/Resources/Scripts/PHP/Classes/Article.php");
|
|
||||||
include($_SERVER["DOCUMENT_ROOT"] . "/Resources/Scripts/PHP/Classes/Project.php");
|
|
||||||
include($_SERVER["DOCUMENT_ROOT"] . "/Resources/Scripts/PHP/Classes/ArticleComment.php");
|
|
||||||
include($_SERVER["DOCUMENT_ROOT"] . "/Resources/Scripts/PHP/Classes/EpisodeComment.php");
|
|
||||||
|
|
||||||
include($_SERVER["DOCUMENT_ROOT"] . "/Resources/Scripts/PHP/Modules/DisplayModule.php");
|
|
||||||
include($_SERVER["DOCUMENT_ROOT"] . "/Resources/Scripts/PHP/Modules/DatabaseModule.php");
|
|
||||||
include($_SERVER["DOCUMENT_ROOT"] . "/Resources/Scripts/PHP/Modules/CommunityModule.php");
|
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------- //
|
// ---------------------------------------------------------------------------- //
|
||||||
// ---------------------------------------------------------------------------- //
|
// ---------------------------------------------------------------------------- //
|
||||||
/// Misc functions - used for who-knows-what and who-knows-when.
|
/// Misc functions - used for who-knows-what and who-knows-when.
|
||||||
|
@ -83,8 +65,7 @@
|
||||||
// This function serves to prevent tags within HTML getting into things. It's basically a symbol cleaner.
|
// This function serves to prevent tags within HTML getting into things. It's basically a symbol cleaner.
|
||||||
// Kudos to Atli from Dream.In.Code for showing me htmlentities()!
|
// Kudos to Atli from Dream.In.Code for showing me htmlentities()!
|
||||||
function magicClean($text) {
|
function magicClean($text) {
|
||||||
$text = htmlentities($text, ENT_QUOTES, "UTF-8");
|
return htmlentities($text, ENT_QUOTES, "UTF-8");
|
||||||
return $text;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Hash a password thousands of times using a random salt.
|
// Hash a password thousands of times using a random salt.
|
||||||
|
|
|
@ -1,20 +1,4 @@
|
||||||
<?php
|
<?php
|
||||||
if(!defined('SAFE')) {
|
|
||||||
$page = <<<CANTTOUCH
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
|
|
||||||
</head>
|
|
||||||
|
|
||||||
<body style="padding:0px; margin:0px; background-color: #888; padding-top: 18px;">
|
|
||||||
<center><img style="max-height: 600px;" src="../../../Images/General/CantTouchThis.png" /></center>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
CANTTOUCH;
|
|
||||||
|
|
||||||
die($page);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
--- The Display Module
|
--- The Display Module
|
||||||
--- This module is for the general listing and displaying of things.
|
--- This module is for the general listing and displaying of things.
|
||||||
|
@ -24,8 +8,8 @@ CANTTOUCH;
|
||||||
|
|
||||||
class DisplayModule {
|
class DisplayModule {
|
||||||
|
|
||||||
private $BlogCovers = 'http://localhost:8888/Resources/Images/Covers/BlogPosts/';
|
private $BlogCovers = '/assets/images/Covers/BlogPosts/';
|
||||||
private $ProjectThumbnails = 'http://localhost:8888/Resources/Images/Thumbs/';
|
private $ProjectThumbnails = '/assets/images/Thumbs/';
|
||||||
|
|
||||||
private $ListedArticle;
|
private $ListedArticle;
|
||||||
private $Article4Reading;
|
private $Article4Reading;
|
||||||
|
@ -39,7 +23,7 @@ CANTTOUCH;
|
||||||
|
|
||||||
/* --- Constructor - creates the module's instance. --- */
|
/* --- Constructor - creates the module's instance. --- */
|
||||||
public function __construct() {
|
public function __construct() {
|
||||||
|
/*
|
||||||
$this->ListedArticle = GetTemplate('articles/listedarticle');
|
$this->ListedArticle = GetTemplate('articles/listedarticle');
|
||||||
$this->Article4Reading = GetTemplate('articles/articlebody');
|
$this->Article4Reading = GetTemplate('articles/articlebody');
|
||||||
$this->FeaturedArticle = GetTemplate('articles/featured');
|
$this->FeaturedArticle = GetTemplate('articles/featured');
|
||||||
|
@ -48,7 +32,7 @@ CANTTOUCH;
|
||||||
|
|
||||||
$this->CommentBox = GetTemplate('comments/commentbox');
|
$this->CommentBox = GetTemplate('comments/commentbox');
|
||||||
$this->CommentForm = GetTemplate('comments/commentform');
|
$this->CommentForm = GetTemplate('comments/commentform');
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ------------------------------------------------------------------------------------------------------- */
|
/* ------------------------------------------------------------------------------------------------------- */
|
||||||
|
|
|
@ -1,54 +0,0 @@
|
||||||
<!DOCTYPE html>
|
|
||||||
<html lang="en">
|
|
||||||
|
|
||||||
<head>
|
|
||||||
<meta charset="utf-8" />
|
|
||||||
<title>Stuff, Community, Fun | Mad Splash!</title>
|
|
||||||
|
|
||||||
<link rel="stylesheet" href="Resources/CSS/MadSplash_v3.css" type="text/css" />
|
|
||||||
<link rel="stylesheet" href="../Resources/CSS/CustomFonts.css" type="text/css" />
|
|
||||||
|
|
||||||
<script src="Resources/Scripts/JavaScript/latestTweet.js"></script>
|
|
||||||
|
|
||||||
<!--[if IE]>
|
|
||||||
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
|
|
||||||
<!--[if lte IE 7]>
|
|
||||||
<script src="js/IE8.js" type="text/javascript"></script><![endif]-->
|
|
||||||
<!--[if lt IE 7]>
|
|
||||||
|
|
||||||
<link rel="stylesheet" type="text/css" media="all" href="Resources/CSS/ie6.css"/><![endif]-->
|
|
||||||
</head>
|
|
||||||
|
|
||||||
<body id="index" class="home">
|
|
||||||
<?php
|
|
||||||
include('Resources/Scripts/PHP/Library.php');
|
|
||||||
require_once('Resources/Scripts/PHP/SuperNav.php');
|
|
||||||
|
|
||||||
$display = new DisplayModule();
|
|
||||||
?>
|
|
||||||
|
|
||||||
<header>
|
|
||||||
<img class="Logo" src="Resources/Images/Logos/LogoV7.png" alt="Mad Splash" title="Mad Splash!" />
|
|
||||||
|
|
||||||
<nav>
|
|
||||||
<ul>
|
|
||||||
<li><a class="navLink" href="index.php">Home</a></li>
|
|
||||||
<li><a class="navLink" href="blog/blog.php">Blog</a></li>
|
|
||||||
<li><a class="navLink" href="http://forums.madsplash.net/">Forums</a></li>
|
|
||||||
|
|
||||||
<li class="dropdown">
|
|
||||||
<a class="dropLink" href="projects.php">Projects</a>
|
|
||||||
|
|
||||||
<div class="drop">
|
|
||||||
<section>
|
|
||||||
<a style="font: bold 18px Arial, Geneva, sans-serif;" href="projects.php?a=main&type=game">Games</a>
|
|
||||||
<a style="font: bold 18px Arial, Geneva, sans-serif;" href="projects.php?a=main&type=book">Books</a>
|
|
||||||
<a style="font: bold 18px Arial, Geneva, sans-serif;" href="projects.php?a=main&type=show">Shows</a>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<div class="clear"> </div>
|
|
||||||
</div>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</nav>
|
|
||||||
</header>
|
|
41
app/templates/header.php
Executable file
41
app/templates/header.php
Executable file
|
@ -0,0 +1,41 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<title>Stuff, Community, Fun | Mad Splash!</title>
|
||||||
|
|
||||||
|
<link rel="stylesheet" href="Resources/CSS/MadSplash_v3.css" type="text/css" />
|
||||||
|
<link rel="stylesheet" href="../Resources/CSS/CustomFonts.css" type="text/css" />
|
||||||
|
|
||||||
|
<script src="Resources/Scripts/JavaScript/latestTweet.js"></script>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body id="index" class="home">
|
||||||
|
<?php require_once '../app/supernav.php'; ?>
|
||||||
|
|
||||||
|
<header>
|
||||||
|
<img class="Logo" src="Resources/Images/Logos/LogoV7.png" alt="Mad Splash" title="Mad Splash!" />
|
||||||
|
|
||||||
|
<nav>
|
||||||
|
<ul>
|
||||||
|
<li><a class="navLink" href="index.php">Home</a></li>
|
||||||
|
<li><a class="navLink" href="blog/blog.php">Blog</a></li>
|
||||||
|
<li><a class="navLink" href="http://forums.madsplash.net/">Forums</a></li>
|
||||||
|
|
||||||
|
<li class="dropdown">
|
||||||
|
<a class="dropLink" href="projects.php">Projects</a>
|
||||||
|
|
||||||
|
<div class="drop">
|
||||||
|
<section>
|
||||||
|
<a style="font: bold 18px Arial, Geneva, sans-serif;" href="projects.php?a=main&type=game">Games</a>
|
||||||
|
<a style="font: bold 18px Arial, Geneva, sans-serif;" href="projects.php?a=main&type=book">Books</a>
|
||||||
|
<a style="font: bold 18px Arial, Geneva, sans-serif;" href="projects.php?a=main&type=show">Shows</a>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<div class="clear"> </div>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</nav>
|
||||||
|
</header>
|
|
@ -6,7 +6,7 @@
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<?php
|
<?php
|
||||||
$display->frontPageArticles();
|
//$display->frontPageArticles();
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,5 +1,9 @@
|
||||||
<?php
|
<?php
|
||||||
include("Pieces/header.htm");
|
require '../app/bootstrap.php';
|
||||||
|
|
||||||
|
$DM = new DisplayModule();
|
||||||
|
|
||||||
|
echo render('header');
|
||||||
|
|
||||||
if (!empty($_GET['page'])) {
|
if (!empty($_GET['page'])) {
|
||||||
$page = "home";
|
$page = "home";
|
||||||
|
@ -15,11 +19,10 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
if($page == "home") {
|
if($page == "home") {
|
||||||
include("Pieces/slider.htm");
|
echo render('slider');
|
||||||
}
|
}
|
||||||
|
|
||||||
// Include $page
|
// Include $page
|
||||||
include("Pieces/$page.htm");
|
echo render($page);
|
||||||
|
|
||||||
include("Pieces/footer.htm");
|
echo render('footer');
|
||||||
?>
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user