necm1
Member
- Jan 27, 2014
- 111
- 16
Hey people,
Today I present my new project.
I currently create a CMS for the hotel HabboGT where I work as a technician.
While it will not be a big job, but I'm going to release it, it might.
Here's the first screens and snippets:
Index:
Me:
Client (works only new habbo ui client):
Snippets:
Site.class.php
Sincerely,
JazzerDEV
Today I present my new project.
I currently create a CMS for the hotel HabboGT where I work as a technician.
While it will not be a big job, but I'm going to release it, it might.
Here's the first screens and snippets:
Index:
You must be registered for see links
Me:
You must be registered for see links
Client (works only new habbo ui client):
You must be registered for see links
Snippets:
Site.class.php
Code:
<?php
/**
* @author Juka
* @copyright 2014
*/
include('db.connect.php');
class Site {
public $sitename = null;
public $path = null;
private $mysqli;
public function __construct(mysqli $mysqli) {
$this -> setConnect($mysqli);
$this -> fetchSiteNameFromDatabase();
$this -> getPath();
}
private function setConnect($mysqli) {
$this -> mysqli = $mysqli;
return $this;
}
public function fetchSiteNameFromDatabase() {
$result = $this -> mysqli->query("SELECT sitename FROM site_config");
$arrayFetch = $result->fetch_assoc();
$this -> sitename = $arrayFetch["sitename"];
return $this -> sitename;
}
public function __tostring() {
return (string)$this -> fetchSiteNameFromDatabase();
}
public function getPath() {
$result = $this -> mysqli->query("SELECT path FROM site_config");
$arrayFetch = $result->fetch_assoc();
$this -> path = $arrayFetch['path'];
return $this -> path;
}
}
?>
Sincerely,
JazzerDEV
Last edited: