Rain
c
- Mar 13, 2015
- 558
- 243
You must be registered for see links
You must be registered for see links
HOTEL:
EDIT: Updated a few bits and pieces around the hotel, so I updated the images.
EMULATOR:
Yobba hotel is currently on Azure as we got a bit behind in developing mango for it. When mango is finished, we'll switch over to that. Just using azure for the time being as I need to get it up to pay the server bills. After setting up mango & taking a look at it, it's a really nice emulator and I have incredibly high hopes for it.
CMS / WEBSITE:
Yobba's CMS is LightShot CMS, which is a CMS coded from scratch, using PDO. I have completely re-ripped habbo's site and their JSON on the register. Also, I got the client register working, but the json responses on that weren't so easy, so until I get it going 100%, i'm using a little register process I've whipped up using JSON for the name chooser, and a nice change looks thingy I found on another forum & edited a little.
PHP:
public static function Initiate(){ //Starts up the page output
self::SetRequest(); //Sets the request params
self::SendToTemplater(self::$RequestParameters); //Sends the request to the templater
}
public static function SetRequest(){ // This is self explanitory
$Request = explode("/", $_SERVER['REQUEST_URI']); //Separates the request into an array by the use of "/"
foreach($Request as $k => $v){ //For each loop to set the params into an array
self::$RequestParameters[$k] = $v; //Sets the params
}
}
public static function SendToTemplater($Request){ // This is self explanitory
LightShot::$Templater->Process($Request); // Makes the Templater process the page
}
PHP:
public static function Login($Input, $Password){
if(self::EmailExists($Input) || self::NameExists($Input)){ //Email? Or Name? O.o
//Input is fine
if(LightShot::$MySQL->num_rows("SELECT null FROM users WHERE mail = ? AND password = ?", array($Input, Site::Hash($Password))) >= 1 || LightShot::$MySQL->num_rows("SELECT null FROM users WHERE username = ? AND password = ?", array($Input, Site::Hash($Password))) >= 1){
//Password is fine
LightShot::$MySQL->query("UPDATE users SET ip_last = ?, last_online = ? WHERE username = ?", array($_SERVER['REMOTE_ADDR'], time(), $Input));
$Data = LightShot::$MySQL->fetch_array("SELECT id, username, password, mail, rank, pm_level FROM users WHERE username = ? OR mail = ?", array($Input, $Input));
$_SESSION['user_id'] = $Data['id']; //ID
$_SESSION['username'] = Site::Filter($Data['username']); //USERNAME
$_SESSION['password'] = Site::Hash(Site::Key($Input), $Password, $Username); //PASSWORD :D
$_SESSION['email'] = $Data['mail']; //EMAIL
$_SESSION['permission'] = $Data['rank']; //RANK
$_SESSION['ip_addr'] = LightShot::$ClientIP; //IP ADDR
Templater::$Notice = "Welcome, ".$Input.", your login was successful, and your account status has been updated. Redirecting you now...";
return true;
}else{
//Password wrong
Templater::$Notice = "Wrong password entered. Please check your data carefully and resubmit!";
return false;
}
}else{
//Email or Username wrong
Templater::$Notice = "Wrong username or email address entered. Please check your data carefully and resubmit!";
return false;
}
Feel free to check us out @
To be done:
- Recode the login function.. I don't like the way it's done.
- A few bits & peices on the client..
- Add a staff page
- Improve the shop page
- Changes a few queries because they're all set to use a mango database
Credits:
- Me
- Jaden(moonshine)
- Azure developers
Planned Launch: Was tomorrow (Friday the 28th, but a few delays meant that it may be saturday).
You must be registered for see links
To be done:
- Recode the login function.. I don't like the way it's done.
- A few bits & peices on the client..
- Add a staff page
- Improve the shop page
- Changes a few queries because they're all set to use a mango database
Credits:
- Me
- Jaden(moonshine)
- Azure developers
Planned Launch: Was tomorrow (Friday the 28th, but a few delays meant that it may be saturday).
Last edited: