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 Releases
CMS Releases
[LOGIN] index
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="Predict" data-source="post: 191104" data-attributes="member: 3953"><p>Sounds good.</p><p> </p><p>I got really into the theme and I thought to myself, why not make a CMS out of this? Heck I'll even throw in mysqli (OOP), a template system and a snazzy design by Louis, of course a few tweaks here and there by myself. Oh and best of all the source is completely coded by me.</p><p> </p><p>What do I have so far? UHM, not much, but I have been putting in time and effort into making this similar to how Habbo is templated, but keeping that Wabbo theme. So far I've already got the basics running, how to fetch pages, mysqli connector, template system and so forth.</p><p> </p><p>index.php</p><p> </p><p>[PHP]<?php</p><p>define('DH_PAGES', true);</p><p> </p><p>error_reporting(0);</p><p> </p><p>require_once ('resources/php/config/config.php');</p><p>require_once ('resources/php/classes/class.mysqli.php');</p><p>require_once ('resources/php/classes/class.template.php');</p><p> </p><p>$db = new db_mysqli('localhost', $config['user'], $config['pass'], $config['tble']);</p><p>$tmp = new template1();</p><p> </p><p>session_start();</p><p> </p><p>if (isset($_SESSION['username']) && isset($_SESSION['password']))</p><p>{</p><p> if ($user->ValidateUser($_SESSION['username'], $_SESSION['password']))</p><p> {</p><p> if ($user->ValidateBan($user->NameToId($_SESSION['username'])))</p><p> {</p><p> unset($_SESSION['username']);</p><p> unset($_SESSION['password']);</p><p> exit;</p><p> }</p><p> else</p><p> {</p><p> define('DH_LOGGED', true);</p><p> }</p><p> }</p><p>}</p><p>else</p><p>{</p><p> define('DH_LOGGED', false);</p><p>}</p><p> </p><p>$page = NULL;</p><p> </p><p>if (isset($_POST['p']))</p><p>{</p><p> $page = strtolower($db->real_escape_string(htmlspecialchars($_POST['p'])));</p><p>}</p><p> </p><p>if ($page == NULL && isset($_GET['p']))</p><p>{</p><p> $page = strtolower($db->real_escape_string($_GET['p']));</p><p>}</p><p> </p><p> </p><p>if ($page == NULL)</p><p>{</p><p> $initial = NULL;</p><p> </p><p> if (DH_LOGGED)</p><p> {</p><p> $initial = 'me';</p><p> }</p><p> else</p><p> {</p><p> $initial = 'login';</p><p> }</p><p> </p><p> header('Location: '.$config['path'].'?p='.$initial);</p><p> exit;</p><p>}</p><p> </p><p>switch($page)</p><p>{</p><p> case 'logout':</p><p> unset($_SESSION['username']);</p><p> unset($_SESSION['password']);</p><p> header('Location: '.$config['path'].'?p=login');</p><p> exit;</p><p> break;</p><p> </p><p> case 'login';</p><p> case 'me';</p><p> if (DH_LOGGED)</p><p> {</p><p> require_once ('resources/php/templates/me.php');</p><p> }</p><p> else</p><p> {</p><p> require_once ('resources/php/templates/login.php');</p><p> }</p><p> break;</p><p> </p><p> default:</p><p> if (file_exists('resources/php/templates/'.$page.'.php'))</p><p> {</p><p> require_once ('resources/php/templates/'.$page.'.php');</p><p> }</p><p> else</p><p> {</p><p> require_once ('resources/php/templates/error.php');</p><p> }</p><p> break;</p><p>}</p><p>?>[/PHP]</p><p> </p><p>Ignore the user class, I still haven't had chance to play around with it yet.</p><p> </p><p> </p><p><img src="http://oi50.tinypic.com/k0lfmg.jpg" alt="" class="fr-fic fr-dii fr-draggable " style="" /></p><p> </p><p>Template for the image shown above.</p><p> </p><p>[HTML]<!DOCTYPE html></p><p><html></p><p> <head></p><p> <title>%NME%: </title></p><p> <link rel="shortcut icon" href="resources/img/favicon.ico" type="image/vnd.microsoft.icon" /></p><p> <link rel="stylesheet" href="resources/css/style.css" tyle="text/css"></p><p> </p><p> <meta name="description" content="%NME% is a Habbo Hotel retro that is FREE! Meet and make friends, play games, chat with others, create your avatar, design rooms and more..."/></p><p> <meta name="keywords" content="%NME% hotel, virtual, world, social network, free, community, avatar, chat, online, teen, roleplaying, join, social, groups, forums, safe, play, games, online, friends, teens, rares, rare furni, collecting, create, collect, connect, furni, furniture, pets, room design, sharing, expression, badges, hangout, music, celebrity, celebrity visits, celebrities, mmo, mmorpg, massively multiplayer"/></p><p> </head></p><p> <body></p><p> <div id="container-header"></p><p> <div class="container"></p><p> <a href="%WWW%?p=login" target="_self" id="logo"></a></p><p> <div id="count">0 online<i></i></div></p><p> <a href="#" id="enter">Enter %NME%<i></i></a></p><p> <ul id="navi-container"></p><p> <li class="navi selected">Username</li></p><p> <li class="navi"><a href="#" target="_self">Community</a></li></p><p> <li class="navi"><a href="#" target="_self">Shop</a></li></p><p> </ul></p><p> </div></p><p> <div class="container clear"></p><p> <ul id="subnavi-container"></p><p> <li class="subnavi"><b>Homepage</b></li></p><p> <li class="subnavi last"><a href="#" target="_self">Test</a></li></p><p> </ul></p><p> </div></p><p> </div></p><p> </body></p><p></html>[/HTML]</p><p> </p><p>I'll make a development thread when I find more source to contribute.</p></blockquote><p></p>
[QUOTE="Predict, post: 191104, member: 3953"] Sounds good. I got really into the theme and I thought to myself, why not make a CMS out of this? Heck I'll even throw in mysqli (OOP), a template system and a snazzy design by Louis, of course a few tweaks here and there by myself. Oh and best of all the source is completely coded by me. What do I have so far? UHM, not much, but I have been putting in time and effort into making this similar to how Habbo is templated, but keeping that Wabbo theme. So far I've already got the basics running, how to fetch pages, mysqli connector, template system and so forth. index.php [PHP]<?php define('DH_PAGES', true); error_reporting(0); require_once ('resources/php/config/config.php'); require_once ('resources/php/classes/class.mysqli.php'); require_once ('resources/php/classes/class.template.php'); $db = new db_mysqli('localhost', $config['user'], $config['pass'], $config['tble']); $tmp = new template1(); session_start(); if (isset($_SESSION['username']) && isset($_SESSION['password'])) { if ($user->ValidateUser($_SESSION['username'], $_SESSION['password'])) { if ($user->ValidateBan($user->NameToId($_SESSION['username']))) { unset($_SESSION['username']); unset($_SESSION['password']); exit; } else { define('DH_LOGGED', true); } } } else { define('DH_LOGGED', false); } $page = NULL; if (isset($_POST['p'])) { $page = strtolower($db->real_escape_string(htmlspecialchars($_POST['p']))); } if ($page == NULL && isset($_GET['p'])) { $page = strtolower($db->real_escape_string($_GET['p'])); } if ($page == NULL) { $initial = NULL; if (DH_LOGGED) { $initial = 'me'; } else { $initial = 'login'; } header('Location: '.$config['path'].'?p='.$initial); exit; } switch($page) { case 'logout': unset($_SESSION['username']); unset($_SESSION['password']); header('Location: '.$config['path'].'?p=login'); exit; break; case 'login'; case 'me'; if (DH_LOGGED) { require_once ('resources/php/templates/me.php'); } else { require_once ('resources/php/templates/login.php'); } break; default: if (file_exists('resources/php/templates/'.$page.'.php')) { require_once ('resources/php/templates/'.$page.'.php'); } else { require_once ('resources/php/templates/error.php'); } break; } ?>[/PHP] Ignore the user class, I still haven't had chance to play around with it yet. [IMG]http://oi50.tinypic.com/k0lfmg.jpg[/IMG] Template for the image shown above. [HTML]<!DOCTYPE html> <html> <head> <title>%NME%: </title> <link rel="shortcut icon" href="resources/img/favicon.ico" type="image/vnd.microsoft.icon" /> <link rel="stylesheet" href="resources/css/style.css" tyle="text/css"> <meta name="description" content="%NME% is a Habbo Hotel retro that is FREE! Meet and make friends, play games, chat with others, create your avatar, design rooms and more..."/> <meta name="keywords" content="%NME% hotel, virtual, world, social network, free, community, avatar, chat, online, teen, roleplaying, join, social, groups, forums, safe, play, games, online, friends, teens, rares, rare furni, collecting, create, collect, connect, furni, furniture, pets, room design, sharing, expression, badges, hangout, music, celebrity, celebrity visits, celebrities, mmo, mmorpg, massively multiplayer"/> </head> <body> <div id="container-header"> <div class="container"> <a href="%WWW%?p=login" target="_self" id="logo"></a> <div id="count">0 online<i></i></div> <a href="#" id="enter">Enter %NME%<i></i></a> <ul id="navi-container"> <li class="navi selected">Username</li> <li class="navi"><a href="#" target="_self">Community</a></li> <li class="navi"><a href="#" target="_self">Shop</a></li> </ul> </div> <div class="container clear"> <ul id="subnavi-container"> <li class="subnavi"><b>Homepage</b></li> <li class="subnavi last"><a href="#" target="_self">Test</a></li> </ul> </div> </div> </body> </html>[/HTML] I'll make a development thread when I find more source to contribute. [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Server Development
Habbo Retros
Habbo Releases
CMS Releases
[LOGIN] index
Top