Menu
Forums
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Trending
What's new
New posts
New profile posts
Latest activity
Members
Current visitors
New profile posts
Search profile posts
Upgrades
Log in
Register
What's new
Search
Search
Search titles only
By:
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
Server Development
Habbo Retros
Habbo Q&A
RevCMS Banned Page
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="Blasteh" data-source="post: 385082" data-attributes="member: 30540"><p>[CODE]<?php</p><p></p><p>namespace Revolution;</p><p>if(!defined('IN_INDEX')) { die('Sorry, you cannot access this file.'); }</p><p>class core implements iCore</p><p>{</p><p></p><p> final public function getOnline()</p><p> {</p><p> global $engine;</p><p> return $engine->result("SELECT COUNT(online) FROM users WHERE `online`='1' LIMIT 1");</p><p> }</p><p> final public function getBans()</p><p> {</p><p> global $engine;</p><p> return $engine->result("SELECT count(id) from bans");</p><p> }</p><p> </p><p> final public function GetRegisteredUsers()</p><p> {</p><p> global $engine;</p><p> return $engine->result("SELECT count(id) from users");</p><p> }</p><p> </p><p> final public function GetVIPUsers()</p><p> {</p><p> global $engine;</p><p> return $engine->result("SELECT count(id) from users WHERE rank = '2'");</p><p> }</p><p> </p><p> final public function GetStaffUsers()</p><p> {</p><p> global $engine;</p><p> return $engine->result("SELECT count(id) from users WHERE rank >= '5'");</p><p> }</p><p> </p><p> final public function getStatus()</p><p> {</p><p> global $engine;</p><p> return $engine->result("SELECT status FROM server_status");</p><p> }</p><p> </p><p> final public function systemError($who, $txt)</p><p> {</p><p> die('<b>' . $who . ' - RevCMS: </b><br /> <center>' . $txt . '</center>');</p><p> }</p><p> </p><p> final public function handleCall($k)</p><p> {</p><p> global $users, $template, $_CONFIG, $engine;</p><p> if($engine->result("SELECT maintenance FROM settings WHERE id = 1 AND maintenance = 'nope'"))</p><p> {</p><p> if(!isset($_SESSION['user']['id']))</p><p> {</p><p> switch($k)</p><p> {</p><p> case "index":</p><p> case null:</p><p> case "login":</p><p> $users->login();</p><p> break;</p><p> </p><p> case "register":</p><p> $users->register();</p><p> break;</p><p> </p><p> case "maintenance":</p><p> case "ToS":</p><p> //</p><p> break;</p><p> </p><p> case "me":</p><p> case "account":</p><p> case "news":</p><p> header('Location: '.$_CONFIG['hotel']['url'].'/index');</p><p> exit;</p><p> break;</p><p> </p><p> default:</p><p> //Nothing</p><p> break;</p><p> }</p><p> }</p><p> else</p><p> {</p><p> if($_SESSION['user']['ip_last'] != $_SERVER['REMOTE_ADDR'])</p><p> {</p><p> header('Location: '.$_CONFIG['hotel']['url'].'/logout');</p><p> }</p><p> </p><p> switch($k)</p><p> {</p><p> case "index":</p><p> case null:</p><p> header('Location: '.$_CONFIG['hotel']['url'].'/me');</p><p> exit;</p><p> break;</p><p> </p><p> case "register":</p><p> header('Location: '.$_CONFIG['hotel']['url'].'/me');</p><p> exit;</p><p> break;</p><p> </p><p> case "client":</p><p> $users->createSSO($_SESSION['user']['id']);</p><p> $users->updateUser($_SESSION['user']['id'], 'ip_last', $_SERVER['REMOTE_ADDR']);</p><p> $template->setParams('sso', $users->getInfo($_SESSION['user']['id'], 'auth_ticket'));</p><p> break;</p><p> </p><p> case "help":</p><p> $users->help();</p><p> break;</p><p> </p><p> case "account":</p><p> $users->updateAccount();</p><p> break;</p><p> </p><p> default:</p><p> //nothing</p><p> break;</p><p> }</p><p> }</p><p> }</p><p> elseif($_GET['url'] != 'maintenance')</p><p> {</p><p></p><p> if($_SESSION['user']['rank'] > 6){</p><p> </p><p> }</p><p></p><p> else{</p><p> header('Location: '. $_CONFIG['hotel']['url'] .'/maintenance');</p><p> exit;</p><p> }</p><p> } </p><p> }</p><p> </p><p> final public function handleCallHK($k)</p><p> {</p><p> global $users, $engine, $_CONFIG;</p><p> </p><p> if($_SESSION["in_hk"] != true)</p><p> {</p><p> if(isset($_SESSION['user']['id']))</p><p> {</p><p> if($k == 'login')</p><p> {</p><p> $users->loginHK();</p><p> }</p><p> else</p><p> {</p><p> header("Location:".$_CONFIG['hotel']['url']."/ase/login");</p><p> exit;</p><p> }</p><p> }</p><p> else</p><p> {</p><p> header("Location:".$_CONFIG['hotel']['url']."/index");</p><p> exit;</p><p> }</p><p> }</p><p> else</p><p> {</p><p> if(!isset($k))</p><p> {</p><p> header("Location:".$_CONFIG['hotel']['url']."/ase/dash");</p><p> exit;</p><p> }</p><p> else</p><p> {</p><p> if($k == 'balist')</p><p> {</p><p> </p><p> if(isset($_GET["unban"]))</p><p> {</p><p> $user = $engine->secure($_GET["unban"]);</p><p> $engine->query("DELETE FROM bans WHERE id = '" . $user . "'");</p><p> header("Location: ".$_CONFIG['hotel']['url']."/ase/banlist");</p><p> exit;</p><p> } </p><p> }</p><p> }</p><p> }</p><p> }</p><p> </p><p> final public function hashed($password)</p><p> {</p><p> return md5($password);</p><p> }</p><p>}</p><p>?>[/CODE]</p></blockquote><p></p>
[QUOTE="Blasteh, post: 385082, member: 30540"] [CODE]<?php namespace Revolution; if(!defined('IN_INDEX')) { die('Sorry, you cannot access this file.'); } class core implements iCore { final public function getOnline() { global $engine; return $engine->result("SELECT COUNT(online) FROM users WHERE `online`='1' LIMIT 1"); } final public function getBans() { global $engine; return $engine->result("SELECT count(id) from bans"); } final public function GetRegisteredUsers() { global $engine; return $engine->result("SELECT count(id) from users"); } final public function GetVIPUsers() { global $engine; return $engine->result("SELECT count(id) from users WHERE rank = '2'"); } final public function GetStaffUsers() { global $engine; return $engine->result("SELECT count(id) from users WHERE rank >= '5'"); } final public function getStatus() { global $engine; return $engine->result("SELECT status FROM server_status"); } final public function systemError($who, $txt) { die('<b>' . $who . ' - RevCMS: </b><br /> <center>' . $txt . '</center>'); } final public function handleCall($k) { global $users, $template, $_CONFIG, $engine; if($engine->result("SELECT maintenance FROM settings WHERE id = 1 AND maintenance = 'nope'")) { if(!isset($_SESSION['user']['id'])) { switch($k) { case "index": case null: case "login": $users->login(); break; case "register": $users->register(); break; case "maintenance": case "ToS": // break; case "me": case "account": case "news": header('Location: '.$_CONFIG['hotel']['url'].'/index'); exit; break; default: //Nothing break; } } else { if($_SESSION['user']['ip_last'] != $_SERVER['REMOTE_ADDR']) { header('Location: '.$_CONFIG['hotel']['url'].'/logout'); } switch($k) { case "index": case null: header('Location: '.$_CONFIG['hotel']['url'].'/me'); exit; break; case "register": header('Location: '.$_CONFIG['hotel']['url'].'/me'); exit; break; case "client": $users->createSSO($_SESSION['user']['id']); $users->updateUser($_SESSION['user']['id'], 'ip_last', $_SERVER['REMOTE_ADDR']); $template->setParams('sso', $users->getInfo($_SESSION['user']['id'], 'auth_ticket')); break; case "help": $users->help(); break; case "account": $users->updateAccount(); break; default: //nothing break; } } } elseif($_GET['url'] != 'maintenance') { if($_SESSION['user']['rank'] > 6){ } else{ header('Location: '. $_CONFIG['hotel']['url'] .'/maintenance'); exit; } } } final public function handleCallHK($k) { global $users, $engine, $_CONFIG; if($_SESSION["in_hk"] != true) { if(isset($_SESSION['user']['id'])) { if($k == 'login') { $users->loginHK(); } else { header("Location:".$_CONFIG['hotel']['url']."/ase/login"); exit; } } else { header("Location:".$_CONFIG['hotel']['url']."/index"); exit; } } else { if(!isset($k)) { header("Location:".$_CONFIG['hotel']['url']."/ase/dash"); exit; } else { if($k == 'balist') { if(isset($_GET["unban"])) { $user = $engine->secure($_GET["unban"]); $engine->query("DELETE FROM bans WHERE id = '" . $user . "'"); header("Location: ".$_CONFIG['hotel']['url']."/ase/banlist"); exit; } } } } } final public function hashed($password) { return md5($password); } } ?>[/CODE] [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Server Development
Habbo Retros
Habbo Q&A
RevCMS Banned Page
Top