Zeus
Active Member
- Jun 30, 2012
- 150
- 30
What is SellIt?
SellIt is an easy and manageable tool to sell your items online, such as emulators or CMS's. It will come with an easy way of editing your products with the dashboard and a nice, clean interface. And of course you can make your own templates with the easy system I am using, RainTPL
What are some features?
- RainTPL Template System
- Powerful PHP coding
- MySQLi Database Engine
- Easy-to-use original template
- Powerful dashboard
What are some snippets?
Some of the coding in the CMS is based upon LightCMS, please realise that I do NOT take credit for anyone else's work. I was merely inspired by Jontys work. The idea also came from Leon's client area.
config.php
PHP:
<?php
class Config {
// o-------------------------------------------------------o
// | Welcome to SellIt, an easy tool to sell your products |
// | without having to do everything yourself. Edit this |
// | configuration file and your good to go. |
// |-------------------------------------------------------|
// | Please read the documentation.txt file for more info |
// o-------------------------------------------------------o
// MySQLi Configuration
private $host = '127.0.0.1';
private $username = 'root';
private $password = 'hello123';
private $database = 'sellit';
// Site Settings
public $siteUrl = 'http://localhost';
public $siteName = 'Easy Sell';
public $inMaint = false;
// Registration Settings
public $maxAccs = '1';
public $regEnabled = true;
// Control Settings
public $owner = 'Josh';
public $minDashRank = '9';
// o-------------------------------------------------------o
// | Please do not edit below unless you know what you are |
// | doing, it powers most of SellIt. |
// o-------------------------------------------------------o
// Define The Directories
private $rainDir = 'classes/rain/';
private $classesDir = 'classes/';
// Start Execute Function
public function execute() {
require $this->rainDir . 'class.php';
require $this->classesDir . 'users.php';
require $this->classesDir . 'core.php';
require $this->classesDir . 'hash.php';
require $this->classesDir . 'template.php';
require $this->classesDir . 'tickets.php';
$this->MySQLi['host'] = $this->host;
$this->MySQLi['username'] = $this->username;
$this->MySQLi['password'] = $this->password;
$this->MySQLi['database'] = $this->database;
}
}
?>
global.php
PHP:
<?php
// o-------------------------------------------------------o
// | Welcome to SellIt, an easy tool to sell your products |
// | without having to do everything yourself. Edit this |
// | configuration file and your good to go. |
// |-------------------------------------------------------|
// | Please read the documentation.txt file for more info |
// o-------------------------------------------------------o
// Require The Config
require_once 'engine/config.php';
// Set Variables
$config = new Config;
// Start SellIt Engine
$config->execute();
// Set Class Variables
$core = new Core;
$users = new Users;
$hash = new Hash;
$tpl = new Template;
$tickets = new Tickets;
// Connect To Database
$db = @new MySQLi($config->MySQLi['host'], $config->MySQLi['username'], $config->MySQLi['password'], $config->MySQLi['database']);
// Check For Database Error
if (mysqli_connect_errno()) {
$core->throwError(mysqli_connect_error());
}
// Check For Maintenance
if($config->inMaint == false && !defined('MAINT_PAGE')) {
if($users->getVar($users->username(), 'rank') >= '2') {
header('Location: /maintenance');
}
}
?>
Thanks
- Josh