DaLightz
See ya'll in the afterlife.
- May 19, 2012
- 1,136
- 262
Note: This will not be abandoned like CookieMS. I am actually having fun with this project.
-----
Overview-
WambaPHP is a C_CMS ( Component Content Management System ) that does anything you need it to do. Easily. The C_CMS is now for Habbo usage, however, it was originally coded for blogging use.
Features-
Development Snapshots (Default theme by
Snippets-
Template Class
MySQL Class
Core
If you are interested in testing some stuff, you can try my demo here:
NOTE!: I know there is major exploits, i havent made a filter yet.
Thanks!
-----
WambaPHP
Overview-
WambaPHP is a C_CMS ( Component Content Management System ) that does anything you need it to do. Easily. The C_CMS is now for Habbo usage, however, it was originally coded for blogging use.
Features-
- MySQLi & PDO Database Connections.
- Organization to the MAX.
- Fully functional Admin Panel.
- Template switching with pretty url's.
- Shortcut params. {sitename}.
- Support for the latest Xampp and IIS Builds.
- Fully documented.
- Version checker/Update notification system.
- Database backups. (Configurable to set time/date.)
- Page Caching.
- Error logging.
PHP:
###########################################################
# _ _ _ _____ _ _ _____ #
#| | | | | | | ___ \ | | || ___ \ #
#| | | | __ _ _ __ ___ | |__ __ _| |_/ / |_| || |_/ / #
#| |/\| |/ _` | '_ ` _ \| '_ \ / _` | __/| _ || __/ #
#\ /\ / (_| | | | | | | |_) | (_| | | | | | || | #
# \/ \/ \__,_|_| |_| |_|_.__/ \__,_\_| \_| |_/\_| #
###########################################################
# -> WambaPHP Coded by CookieMonsta. Build 1.0.0b #
# -> Changelog and Buglog are listed below. #
###########################################################
# 11/1/12
* Changelog
+ Started admin panel.
+ Ranking system 100% coded.
+ New admin panel functions. (delete user, make user admin, user list, make article)
- Removed top header. It was ugly as fuck. (Default template.)
+ Added HABBO intergration. Users can now modify their settings to make WambaPHP a HABBO cms.
+ Blogging system coded 100%.
- Removed article comments for now. It was bugging up the cms.
+ Page caching re-added in next BETA build.
+ Started to work on a new $_POST and $_GET filter.
* Buglog
* Any user can enter the admin panel.
* There is MANY exploits. We will maybe add a filter later.
* The params are not supported in any other directory then /Templates/{skin}
# 10/31/12 (mm/dd/yy)
* Changelog
+ Added advanced error messages with some CSS styling.
+ Fixed a bug within the MySQL class that would not notify you of db errors.
+ Certain content is now only allowed to logged in users. (Configurable soon.)
+ Default Template is now highly recommended for best performance.
+ Full login page is now complete.
+ Security update: loggin in will now have a new method. -> login->loginproc->security_check-> Logged in.
+ Logged out page is now coded.
* Buglog
* There is MANY exploits. We will maybe add a filter later.
* The params are not supported in any other directory then /Templates/{skin}
# 10/30/12 (mm/dd/yy)
* Changelog
+ Started the project.
+ Created a simple MySQL class.
+ Created a simple Template class.
+ Created custom Urls for the template sys. (/index.php?page=[name])
+ Added funcitons & library directory along with a relocated classes folder.
+ Template choosing now working 100%. (configurable in the configuration AND installer.)
+ Started to create Login and registration forms.
+ Started the default template. (Credits to RastaLulz, owner of http://thehabbos.org for style.)
+ Created simple assets directory for each template.
+ Cleaned up core and classes files.
+ New storage folder added for cached pages, db backups, and error logs.
+ Proper configuration created.
- Removed page cache for now. There was many bugs.
* Buglog
* The params are not supported in any other directory then /Templates/{skin}.
Development Snapshots (Default theme by
You must be registered for see links
)!Snippets-
Template Class
PHP:
<?php
/*================================================================+\
|| # WambaPHP- An all around Component Content Management System. ||
|+================================================================+|
|| # Copyright (C) 2012 CookieMonsta. All rights reserved. ||
|| # http://www.devbest.com/user/CookieMonsta ||
|| # This was a scratch development. Love to devbest for support! ||
|+================================================================+|
|| # WambaPHP is provided "as is" and comes without ||
|| # warrenty of any kind. WambaPHP is free software! ||
|| # License: GNU Public License 3.0 ||
|| # http://opensource.org/licenses/gpl-license.php ||
\+================================================================*/
/*
*
* WambaPHP- Template Class
*
*/
// #################################################################
// Secure this file.
if(!Defined('WambaPHP_Secure')) die ("Direct Access Denied");
// #################################################################
// Start script.
// Define the template.
Define('Skin', $_CONFIG['Site']['Template']);
// Define the class.
class Template
{
private $values = Array();
private $language;
private $tpl;
public function __construct()
{
// Gather config settings.
Global $_SETTINGS, $_CONFIG;
// Site params.
$this->AddParam('Sitename', $_CONFIG['Site']['Name']);
$this->AddParam('Sitemotto', $_CONFIG['Site']['Motto']);
$this->AddParam('Template', $_CONFIG['Site']['Template']);
$this->AddParam('Url', $_CONFIG['Site']['Url']);
$this->AddParam('Skin', $_CONFIG['Site']['Template']);
$this->AddParam('Username', $_SESSION['username']);
}
public function filter($values)
{
foreach($this->Value as $replace => $value) { $values = str_replace("{" . $replace . "}", $value, $values); }
return $values;
}
public function Write($data)
{
$replace = $data.PHP_EOL;
$this->tpl .= $replace;
}
public function AddParam($Tag, $Value)
{
$this->Value[$Tag] = $Value;
}
public function AddFile($file)
{
ob_start();
if (file_exists('Application/Templates/' . Skin . '/' . $file . '.html'))
{
Require_once('Application/Templates/' . Skin . '/' . $file . '.html');
} else {
Die('<center><div style="width: 50%; border: 2px solid #FF0000; background-color: #FF8C8C; padding: 10px; padding-top: 0; font-family: Arial;"><h3>WambaPHP has Encountered an Error.</h3>WambaPHP has failed to load the template: <b>Application/Templates/ '. Skin .' /'.$file.'.html </b></div></center>');
}
$this->tpl .= ob_get_contents();
ob_end_clean();
}
public function Finish()
{
print $this->filter($this->tpl);
}
}
// #################################################################
// Exit...
?>
MySQL Class
PHP:
<?php
/*================================================================+\
|| # WambaPHP- An all around Component Content Management System. ||
|+================================================================+|
|| # Copyright (C) 2012 CookieMonsta. All rights reserved. ||
|| # http://www.devbest.com/user/CookieMonsta ||
|| # This was a scratch development. Love to devbest for support! ||
|+================================================================+|
|| # WambaPHP is provided "as is" and comes without ||
|| # warrenty of any kind. WambaPHP is free software! ||
|| # License: GNU Public License 3.0 ||
|| # http://opensource.org/licenses/gpl-license.php ||
\+================================================================*/
/*
*
* WambaPHP- MySQL Class
*
*/
// #################################################################
// Secure this file.
if(!Defined('WambaPHP_Secure')) die ("Direct Access Denied");
// #################################################################
// Start the script.
// Define the class.
class MySQL
{
public function __construct()
{
// Fetch Configuration variables.
Global $_CONFIG;
$this->host = $_CONFIG['MySQL']['Hostname'];
$this->user = $_CONFIG['MySQL']['Username'];
$this->pass = $_CONFIG['MySQL']['Password'];
$this->db = $_CONFIG['MySQL']['Database'];
}
public function connect()
{
$this->link = @mysql_connect($this->host,$this->user,$this->pass);
if(!$this->link){ die('<center><div style="width: 50%; border: 2px solid #FF0000; background-color: #FF8C8C; padding: 10px; padding-top: 0; font-family: Arial;"><h3>WambaPHP has Encountered an Error.</h3>There was an error connecting to MySQL. The username or password is incorrect.</div></center>'); }
if(($this->link) and ($this->db))
{
if(@mysql_select_db($this->db,$this->link)) Return True;
}
die('<center><div style="width: 50%; border: 2px solid #FF0000; background-color: #FF8C8C; padding: 10px; padding-top: 0; font-family: Arial;"><h3>WambaPHP has Encountered an Error.</h3>There was an error connecting to the database. Please check your configuration.</div></center>');
}
public function disconnect()
{
@mysql_close($this->link);
}
}
// #################################################################
// End...
?>
Core
PHP:
<?php
/*================================================================+\
|| # WambaPHP- An all around Component Content Management System. ||
|+================================================================+|
|| # Copyright (C) 2012 CookieMonsta. All rights reserved. ||
|| # http://www.devbest.com/user/CookieMonsta ||
|| # This was a scratch development. Love to devbest for support! ||
|+================================================================+|
|| # WambaPHP is provided "as is" and comes without ||
|| # warrenty of any kind. WambaPHP is free software! ||
|| # License: GNU Public License 3.0 ||
|| # http://opensource.org/licenses/gpl-license.php ||
\+================================================================*/
/*
*
* WambaPHP- Core
*
*/
// #################################################################
// Secure this file.
if(!Defined('WambaPHP_Secure')) die ("Direct Access is Denied.");
// #################################################################
// Define class paths to initialize the CMS properly.
Define('WambaPHP_ROOT','Application/');
Define('WambaPHP_CONF','Management/');
Define('WambaPHP_TEMP','Templates/');
Define('WambaPHP_FUNC','Functions/');
Define('WambaPHP_STOR','Storage/');
Define('WambaPHP_LBRY','Library/');
Define('WambaPHP_CLSS','Classes/');
// #################################################################
// Require class paths to initialize the CMS properly.
// Require the error log core file to make it work properly.
Require_once WambaPHP_ROOT . WambaPHP_STOR . 'Error_logs/Global.php';
// Require configuration variables to use the users settings on the cms.
Require_once WambaPHP_ROOT . WambaPHP_CONF . 'Configuration.php';
// This template class initializes the enviroment to be able to use the template system.
Require_once WambaPHP_ROOT . WambaPHP_LBRY . WambaPHP_CLSS . 'Class.Template.php';
// Require the MySQL class so the cms is able to retrieve tables (etc) from the MySQL host.
Require_once WambaPHP_ROOT . WambaPHP_LBRY . WambaPHP_CLSS . 'Class.MySQL.php';
// Require this to grab the current date/time from MySQL.
Require_once WambaPHP_ROOT . WambaPHP_LBRY . WambaPHP_FUNC . 'Function.Get_date.php';
// Just an extra function.
Require_once WambaPHP_ROOT . WambaPHP_LBRY . WambaPHP_FUNC . 'Function.Set_chmod.php';
// #################################################################
// Initialize WambaPHP's enviroment.
// Initialize the MySQL Engine.
$MySQL = new MySQL();
// Initialize the Template
$Template = new Template();
// Connect to MySQL...
$MySQL->connect();
// #################################################################
// End...
?>
If you are interested in testing some stuff, you can try my demo here:
You must be registered for see links
Just please don't DoS that ip. Be nice NOTE!: I know there is major exploits, i havent made a filter yet.
Thanks!