I had this lying around that I was working on at one point, this ain't a full release, there are things that need to be finished on, but maybe you guys want to finish it, or rip some of the pages to add to your own? Everything is my own coding, except the template system that was from UberCMS, although the structure system is a lot better.
Attachments are below
Some code:
PHP Code:<?php
if (!defined('IN_PAGES'))
{
die ('<h1>Access denied</h1><p>You do not have the privileges to access this webpage.</p>');
}
class html
{
public static function meta ()
{
GLOBAL $config;
return ('<meta name="description" content="Check into the world\'s largest virtual hotel for FREE! Meet and make friends, play games, chat with others, create your avatar, design rooms and more..." />
<meta name="keywords" content="'.strtolower($config['www']['name']).' hotel, virtual, world, social network, free, community, avatar, chat, online, teen, roleplaying, join, social, groups, forums, safe, play, games, online, friends, teens, rares, rare furni, collecting, create, collect, connect, furni, furniture, pets, room design, sharing, expression, badges, hangout, music, celebrity, celebrity visits, celebrities, mmo, mmorpg, massively multiplayer">');
}
public static function header ()
{
GLOBAL $config;
$colour = array();
if (isset($_GET['p']))
{
if ($_GET['p'] == 'me')
{
$colour[0] = ' white';
}
else if ($_GET['p'] == 'home')
{
$colour[1] = ' class="white"';
}
else if ($_GET['p'] == 'account')
{
$colour[2] = ' class="white"';
}
else if ($_GET['p'] == 'news')
{
$colour[3] = ' class="white"';
}
else if ($_GET['p'] == 'staff')
{
$colour[4] = ' class="white"';
}
else if ($_GET['p'] == 'shop')
{
$colour[5] = ' class="white"';
}
else
{
$colour = NULL;
}
}
return ('<div id="container-header">
<div id="backdrop"></div>
<div class="container">
<div id="container-navigation">
<a href="'.$config['www']['url'].'/?p=me" target="_self" id="logo"></a>
<ul class="navigation">
<li><a href="'.$config['www']['url'].'/?p=me" target="_self" class="first'.$colour[0].'">Predict</a></li>
<li><a href="'.$config['www']['url'].'/?p=home" target="_self"'.$colour[1].'>Home</a></li>
<li><a href="'.$config['www']['url'].'/?p=account" target="_self"'.$colour[2].'>Account</a></li>
<li><a href="'.$config['www']['url'].'/?p=news" target="_self"'.$colour[3].'>News</a></li>
<li><a href="'.$config['www']['url'].'/?p=staff" target="_self"'.$colour[4].'>Staff</a></li>
<li><a href="'.$config['www']['url'].'/?p=shop" target="_self"'.$colour[5].'>Shop</a></li>
<li><a href="'.$config['www']['url'].'/?p=logout" target="_self" class="last">Logout</a></li>
</ul>
<ul class="navigation">
<li><a href="'.$config['www']['url'].'/?p=client" target="_self" class="first green">Enter '.$config['www']['name'].' Hotel</a></li>
<li><a href="'.$config['www']['url'].'/?p=users" target="_self" class="last white">0 users online</a></li>
</ul>
</div>
</div>
</div>');
}
public static function advertisement ()
{
return ('<div id="container-column-03" class="container-column">
<div class="container-title orange">Advertisement</div>
<div class="container-body"></div>
</div>');
}
public static function footer ()
{
GLOBAL $config;
return ('<div id="container-footer">
<a href="'.$config['www']['url'].'/" target="_self" class="link">Homepage</a> |
<a href="'.$config['www']['url'].'/?p=paper&sub=1" target="_self" class="link">Terms of use</a> |
<a href="'.$config['www']['url'].'/?p=paper&sub=2" target="_self" class="link">Privacy policy</a> |
<a href="'.$config['www']['url'].'/?p=paper&sub=3" target="_self" class="link">'.$config['www']['name'].' way</a>
</div>');
}
}
?>
PHP Code:<?php
define ('IN_PAGES', true);
require_once ('private/application/bootstrap.php');
$page = NULL;
if (isset($_POST['p']) || isset($_GET['p']))
{
$initial = NULL;
if ($_POST['p'])
{
$initial = $_POST['p'];
}
else if ($_GET['p'])
{
$initial = $_GET['p'];
}
$page = strtolower(trim(htmlentities($initial)));
}
if (isset($_SESSION['username']) && isset($_SESSION['password']))
{
if ($usr->user_login($_SESSION['username'], $_SESSION['password']))
{
define ('LOGGED_IN', true);
}
else
{
define ('LOGGED_IN', false);
}
}
else
{
define ('LOGGED_IN', false);
}
if ($page == NULL)
{
$initial = NULL;
if (LOGGED_IN)
{
$initial = 'me';
}
else
{
$initial = 'login';
}
header ('Location: '.$config['www']['url'].'/?p='.$initial);
exit;
}
switch($page)
{
case 'logout':
unset ($_SESSION['username']);
unset ($_SESSION['password']);
header ('Location: '.$config['www']['url'].'/?p=login');
exit;
break;
case 'ase';
if (!LOGGED_IN) // CHANGE
{
require_once ('private/application/theme/public/housekeeping/dash.php');
}
else
{
require_once ('private/application/theme/public/error.php');
}
break;
default:
if (file_exists('private/application/theme/public/'.$page.'.php'))
{
require_once ('private/application/theme/public/'.$page.'.php');
}
else
{
require_once ('private/application/theme/public/error.php');
}
break;
}
?>
PHP Code:<?php
if (!defined('IN_PAGES'))
{
die ('<h1>Access denied</h1><p>You do not have the privileges to access this webpage.</p>');
}
if(isset($_SERVER['HTTP_CF_CONNECTING_IP']))
{
$_SERVER['REMOTE_ADDR'] = $_SERVER['HTTP_CF_CONNECTING_IP'];
}
// error_reporting(0);
date_default_timezone_set('Europe/London');
require_once ('private/application/config/config.php');
require_once ('private/application/library/class.mysqli.php');
$db = new db_mysqli($config['mysqli']['hostname'], $config['mysqli']['username'], $config['mysqli']['password'], $config['mysqli']['database']);
require_once ('private/application/library/class.template.php');
$tpl = new template();
require_once ('private/application/library/class.user.php');
$usr = new user();
require_once ('private/application/library/class.html.php');
session_start();
?>

