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.
|
||||
|
@ -83,8 +65,7 @@
|
|||
// 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()!
|
||||
function magicClean($text) {
|
||||
$text = htmlentities($text, ENT_QUOTES, "UTF-8");
|
||||
return $text;
|
||||
return htmlentities($text, ENT_QUOTES, "UTF-8");
|
||||
}
|
||||
|
||||
// Hash a password thousands of times using a random salt.
|
||||
|
|
|
@ -1,20 +1,4 @@
|
|||
<?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);
|
||||
}
|
||||
|
||||
<?php
|
||||
/*
|
||||
--- The Display Module
|
||||
--- This module is for the general listing and displaying of things.
|
||||
|
@ -24,8 +8,8 @@ CANTTOUCH;
|
|||
|
||||
class DisplayModule {
|
||||
|
||||
private $BlogCovers = 'http://localhost:8888/Resources/Images/Covers/BlogPosts/';
|
||||
private $ProjectThumbnails = 'http://localhost:8888/Resources/Images/Thumbs/';
|
||||
private $BlogCovers = '/assets/images/Covers/BlogPosts/';
|
||||
private $ProjectThumbnails = '/assets/images/Thumbs/';
|
||||
|
||||
private $ListedArticle;
|
||||
private $Article4Reading;
|
||||
|
@ -39,7 +23,7 @@ CANTTOUCH;
|
|||
|
||||
/* --- Constructor - creates the module's instance. --- */
|
||||
public function __construct() {
|
||||
|
||||
/*
|
||||
$this->ListedArticle = GetTemplate('articles/listedarticle');
|
||||
$this->Article4Reading = GetTemplate('articles/articlebody');
|
||||
$this->FeaturedArticle = GetTemplate('articles/featured');
|
||||
|
@ -48,7 +32,7 @@ CANTTOUCH;
|
|||
|
||||
$this->CommentBox = GetTemplate('comments/commentbox');
|
||||
$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>
|
|
@ -1,32 +1,32 @@
|
|||
<section id="body">
|
||||
<div style="width: 100%; margin-bottom: 4px; height: 1px;"> </div>
|
||||
|
||||
|
||||
<section id="leftColumn">
|
||||
<h1>Latest Updates</h1>
|
||||
|
||||
|
||||
<div>
|
||||
<?php
|
||||
$display->frontPageArticles();
|
||||
//$display->frontPageArticles();
|
||||
?>
|
||||
</div>
|
||||
|
||||
|
||||
<a class="more" href="blog/blog.php" style="margin: 8px 0px 0px 8px;">Read more news »</a>
|
||||
</section>
|
||||
|
||||
|
||||
<section id="rightColumn">
|
||||
|
||||
|
||||
<h1>Latest socials</h1>
|
||||
<div id="tweets">
|
||||
<a class="Twitter" style="background-color: #666; margin-right: 4px; float: left;"> </a>
|
||||
|
||||
|
||||
<div id="tweet" style="float: right;">
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="clear"> </div>
|
||||
</div>
|
||||
|
||||
|
||||
</section>
|
||||
|
||||
|
||||
<div class="clear"> </div>
|
||||
</section>
|
||||
</section>
|
|
@ -8,34 +8,34 @@
|
|||
|
||||
<section id="body">
|
||||
<div style="width: 100%; margin-bottom: 4px; height: 1px;"> </div>
|
||||
|
||||
|
||||
<div style="padding: 4px 8px 36px 8px;">
|
||||
<h3>
|
||||
1. Terms
|
||||
</h3>
|
||||
|
||||
|
||||
<p style="padding-left: 8px;">
|
||||
By accessing this web site, you are agreeing to be bound by these
|
||||
web site Terms and Conditions of Use, all applicable laws and regulations,
|
||||
and agree that you are responsible for compliance with any applicable local
|
||||
laws. If you do not agree with any of these terms, you are prohibited from
|
||||
using or accessing this site. The materials contained in this web site are
|
||||
By accessing this web site, you are agreeing to be bound by these
|
||||
web site Terms and Conditions of Use, all applicable laws and regulations,
|
||||
and agree that you are responsible for compliance with any applicable local
|
||||
laws. If you do not agree with any of these terms, you are prohibited from
|
||||
using or accessing this site. The materials contained in this web site are
|
||||
protected by applicable copyright and trade mark law.
|
||||
</p>
|
||||
|
||||
|
||||
<br />
|
||||
|
||||
|
||||
<h3>
|
||||
2. Use License
|
||||
</h3>
|
||||
|
||||
|
||||
<ol type="a" style="padding-left: 16px; margin-left: 16px;">
|
||||
<li>
|
||||
Permission is granted to download copies of the materials
|
||||
(information or software) on Mad Splash's web site for personal,
|
||||
non-commercial viewing and usage only. This is the grant of a license,
|
||||
Permission is granted to download copies of the materials
|
||||
(information or software) on Mad Splash's web site for personal,
|
||||
non-commercial viewing and usage only. This is the grant of a license,
|
||||
not a transfer of title, and under this license you may not:
|
||||
|
||||
|
||||
<ol type="i" style="padding-left: 16px; margin-left: 16px;">
|
||||
<li>use the materials for any commercial purpose without express permission from the CEO/President of Mad Splash;</li>
|
||||
<li>attempt to decompile or reverse engineer any software contained on Mad Splash's web site;</li>
|
||||
|
@ -47,67 +47,67 @@
|
|||
This license shall automatically terminate if you violate any of these restrictions and may be terminated by Mad Splash at any time. Upon terminating your viewing of these materials or upon the termination of this license, you must destroy any downloaded materials in your possession whether in electronic or printed format.
|
||||
</li>
|
||||
</ol>
|
||||
|
||||
|
||||
<br />
|
||||
|
||||
|
||||
<h3>
|
||||
3. Disclaimer
|
||||
</h3>
|
||||
|
||||
|
||||
<p style="padding-left: 8px;">
|
||||
The materials on Mad Splash's web site are provided "as is". Mad Splash makes no implied warranties, and hereby disclaims and negates all other warranties, including without limitation, implied warranties or conditions of merchantability, fitness for a particular purpose, or non-infringement of intellectual property or other violation of rights. Further, Mad Splash does not warrant or make any representations concerning the accuracy, likely results, or reliability of the use of the materials on its Internet web site or otherwise relating to such materials or on any sites linked to this site.
|
||||
</p>
|
||||
|
||||
|
||||
<br />
|
||||
|
||||
|
||||
<h3>
|
||||
4. Limitations
|
||||
</h3>
|
||||
|
||||
|
||||
<p style="padding-left: 8px;">
|
||||
In no event shall Mad Splash or its suppliers be liable for any damages (including, without limitation, damages for loss of data or profit, or due to business interruption,) arising out of the use or inability to use the materials on Mad Splash's Internet site, even if Mad Splash or a Mad Splash authorized representative has been notified orally or in writing of the possibility of such damage. Because some jurisdictions do not allow limitations on implied warranties, or limitations of liability for consequential or incidental damages, these limitations may not apply to you.
|
||||
</p>
|
||||
|
||||
|
||||
<br />
|
||||
|
||||
|
||||
<h3>
|
||||
5. Revisions and Errata
|
||||
</h3>
|
||||
|
||||
|
||||
<p style="padding-left: 8px;">
|
||||
The materials appearing on Mad Splash's web site could include technical, typographical, or photographic errors. Mad Splash does not warrant that any of the materials on its web site are accurate, complete, or current. Mad Splash may make changes to the materials contained on its web site at any time without notice. Mad Splash does not, however, make any commitment to update the materials.
|
||||
</p>
|
||||
|
||||
|
||||
<br />
|
||||
|
||||
|
||||
<h3>
|
||||
6. Links
|
||||
</h3>
|
||||
|
||||
|
||||
<p style="padding-left: 8px;">
|
||||
Mad Splash has not reviewed all of the sites linked to its Internet web site and is not responsible for the contents of any such linked site. The inclusion of any link does not imply endorsement by Mad Splash of the site. Use of any such linked web site is at the user's own risk.
|
||||
</p>
|
||||
|
||||
|
||||
<br />
|
||||
|
||||
|
||||
<h3>
|
||||
7. Site Terms of Use Modifications
|
||||
</h3>
|
||||
|
||||
|
||||
<p style="padding-left: 8px;">
|
||||
Mad Splash may revise these terms of use for its web site at any time without notice. By using this web site you are agreeing to be bound by the then current version of these Terms and Conditions of Use.
|
||||
</p>
|
||||
|
||||
|
||||
<br />
|
||||
|
||||
|
||||
<h3>
|
||||
8. Governing Law
|
||||
</h3>
|
||||
|
||||
|
||||
<p style="padding-left: 8px;">
|
||||
Any claim relating to Mad Splash's web site shall be governed by the laws of the State of Kansas without regard to its conflict of law provisions.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="clear"> </div>
|
||||
</section>
|
||||
</section>
|
||||
|
|
|
@ -1,5 +1,9 @@
|
|||
<?php
|
||||
include("Pieces/header.htm");
|
||||
require '../app/bootstrap.php';
|
||||
|
||||
$DM = new DisplayModule();
|
||||
|
||||
echo render('header');
|
||||
|
||||
if (!empty($_GET['page'])) {
|
||||
$page = "home";
|
||||
|
@ -15,11 +19,10 @@
|
|||
}
|
||||
|
||||
if($page == "home") {
|
||||
include("Pieces/slider.htm");
|
||||
echo render('slider');
|
||||
}
|
||||
|
||||
// Include $page
|
||||
include("Pieces/$page.htm");
|
||||
echo render($page);
|
||||
|
||||
include("Pieces/footer.htm");
|
||||
?>
|
||||
echo render('footer');
|
||||
|
|
Loading…
Reference in New Issue
Block a user