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
Moving back to UberCMS from using PhoenixCMS.
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="Sledmore" data-source="post: 29370" data-attributes="member: 591"><p>Hey,</p><p></p><p>A friend wanted this done so he could switch back to UberCMS from Phoenix, but he had issues because of the UberHash and the SSO.</p><p></p><p style="text-align: center"><strong>NOTE: YOU MAY NEED SOME TABLES FROM UBERDB.</strong></p><p></p><p><strong>So here we are, firstly replace your current Uber index.php to:</strong></p><p></p><p>[php]<?php</p><p>/*=======================================================================</p><p>| UberCMS - Advanced Website and Content Management System for uberEmu</p><p>| #######################################################################</p><p>| Copyright (c) 2010, Roy 'Meth0d' and updates by Matthew 'MDK'</p><p>| http://www.meth0d.org & http://www.sulake.biz</p><p>| #######################################################################</p><p>| This program is free software: you can redistribute it and/or modify</p><p>| it under the terms of the GNU General Public License as published by</p><p>| the Free Software Foundation, either version 3 of the License, or</p><p>| (at your option) any later version.</p><p>| #######################################################################</p><p>| This program is distributed in the hope that it will be useful,</p><p>| but WITHOUT ANY WARRANTY; without even the implied warranty of</p><p>| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the</p><p>| GNU General Public License for more details.</p><p>\======================================================================*/</p><p></p><p>require_once "global.php"; </p><p> </p><p>if (LOGGED_IN)</p><p>{</p><p> header("Location: " . WWW . "/me");</p><p> exit;</p><p>}</p><p></p><p>$tpl->Init();</p><p></p><p>$tpl->SetParam('page_title', 'Create your avatar, decorate your room, chat and make new friends.');</p><p>$tpl->SetParam('credentials_username', '');</p><p></p><p>$tpl->AddGeneric('head-init');</p><p>$tpl->AddIncludeSet('frontpage');</p><p>$tpl->WriteIncludeFiles();</p><p>$tpl->AddGeneric('head-overrides-fp');</p><p>$tpl->AddGeneric('head-bottom');</p><p></p><p>$frontpage = new Template('page-fp');</p><p>$frontpage->SetParam('login_result', '');</p><p></p><p>if (isset($_POST['credentials_username']) && isset($_POST['credentials_password']))</p><p>{</p><p> $frontpage->SetParam('credentials_username', $_POST['credentials_username']);</p><p></p><p> $credUser = $_POST['credentials_username'];</p><p> $credPass = md5($_POST['credentials_password']);</p><p> </p><p> $errors = array();</p><p> </p><p> if (strlen($_POST['credentials_username']) < 1)</p><p> {</p><p> $errors[] = "Please enter your username";</p><p> }</p><p> </p><p> if (strlen($_POST['credentials_password']) < 1)</p><p> {</p><p> $errors[] = "Please enter your password";</p><p> }</p><p> </p><p> if (count($errors) == 0)</p><p> {</p><p> if ($users->ValidateUser($credUser, $credPass))</p><p> {</p><p> if (isset($_POST['page']))</p><p> {</p><p> $reqPage = filter($_POST['page']);</p><p> $pos = strrpos($reqPage, WWW);</p><p> </p><p> if ($pos === false || $pos != 0)</p><p> {</p><p> die("<b>Security warning!</b> A malicious request was detected that tried redirecting you to an external site. Please proceed with caution, this may have been an attempt to steal your login details. <a href='" . WWW . "'>Return to site</a>");</p><p> }</p><p> else</p><p> {</p><p> $_SESSION['page-redirect'] = $reqPage;</p><p> }</p><p> } </p><p> </p><p> $_SESSION['UBER_USER_N'] = $users->GetUserVar($users->Name2id($credUser), 'username');</p><p> $_SESSION['UBER_USER_H'] = $credPass;</p><p> </p><p> if (isset($_POST['_login_remember_me']))</p><p> {</p><p> $_SESSION['set_cookies'] = true;</p><p> }</p><p> </p><p> header("Location: " . WWW . "/security_check");</p><p> exit;</p><p> }</p><p> else</p><p> {</p><p> $errors[] = "Incorrect password";</p><p> }</p><p> }</p><p></p><p> if (count($errors) > 0)</p><p> {</p><p> $loginResult = '<div class="action-error flash-message"><div class="rounded"><ul>';</p><p></p><p> foreach ($errors as $err)</p><p> {</p><p> $loginResult .= '<li>' . $err . '</li>';</p><p> }</p><p> </p><p> $loginResult .= '</ul></div></div>';</p><p> </p><p> $frontpage->SetParam('login_result', $loginResult);</p><p> }</p><p>}</p><p></p><p>$tpl->AddTemplate($frontpage);</p><p>$tpl->AddGeneric('footer');</p><p></p><p>$tpl->Output();</p><p></p><p>?>[/php]</p><p></p><p><strong>Now replace your current register.php to this (so it doesn't UberHash any passwords).</strong></p><p></p><p>[php]<?php</p><p>/*=======================================================================</p><p>| UberCMS - Advanced Website and Content Management System for uberEmu</p><p>| #######################################################################</p><p>| Copyright (c) 2010, Roy 'Meth0d' and updates by Matthew 'MDK'</p><p>| http://www.meth0d.org & http://www.sulake.biz</p><p>| #######################################################################</p><p>| This program is free software: you can redistribute it and/or modify</p><p>| it under the terms of the GNU General Public License as published by</p><p>| the Free Software Foundation, either version 3 of the License, or</p><p>| (at your option) any later version.</p><p>| #######################################################################</p><p>| This program is distributed in the hope that it will be useful,</p><p>| but WITHOUT ANY WARRANTY; without even the implied warranty of</p><p>| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the</p><p>| GNU General Public License for more details.</p><p>\======================================================================*/</p><p></p><p>require_once "global.php";</p><p>require_once "inc/recaptchalib.php";</p><p></p><p>if (LOGGED_IN)</p><p>{</p><p> header("Location: " . WWW . "/me");</p><p> exit;</p><p>}</p><p></p><p>$tpl->SetParam('error-messages-holder', '');</p><p>$tpl->SetParam('post-name', '');</p><p>$tpl->SetParam('post-pass', '');</p><p>$tpl->SetParam('post-tos-check', '');</p><p>$tpl->SetParam('post-mail', '');</p><p></p><p>if (isset($_GET['doSubmit']))</p><p>{</p><p> if (isset($_POST['checkNameOnly']) && $_POST['checkNameOnly'] == 'true')</p><p> {</p><p> $name = $_POST['bean_avatarName'];</p><p></p><p> echo ' <div class="field field-habbo-name"></p><p> <label for="habbo-name">Username</label></p><p> <input type="text" id="habbo-name" size="32" value="' . clean($name) . '" name="bean.avatarName" class="text-field" maxlength="32"/></p><p> <a href="#" class="new-button" id="check-name-btn"><b>Check</b><i></i></a> </p><p> <input type="submit" name="checkNameOnly" id="check-name" value="Check"/></p><p> <div id="name-suggestions">';</p><p></p><p> if ($users->IsNameTaken($name))</p><p> {</p><p> echo '<div class="taken"><p>Sorry, the name <strong>' . clean($name) . '</strong> is taken!</p></div>';</p><p> }</p><p> else if ($users->IsNameBlocked($name))</p><p> {</p><p> echo '<div class="taken"><p>Sorry, that name is reserved or disallowed.</p></div>';</p><p> }</p><p> else if (!$users->IsValidName($name))</p><p> {</p><p> echo '<div class="taken"><p>Sorry, that name is invalid. Your name can contain lowercase, uppercase letters, and numbers.</p></div>';</p><p> }</p><p> else</p><p> {</p><p> echo '<div class="available"><p>The name <strong>' . clean($name) . '</strong> is available.</p></div>';</p><p> }</p><p> </p><p> echo ' </div> </p><p> <p class="help">Your name can contain lowercase and uppercase letters and numbers.</p></p><p> </div>';</p><p> </p><p> exit;</p><p> }</p><p> else if (isset($_POST['bean_avatarName']))</p><p> {</p><p> $registerErrors = Array();</p><p> </p><p> $name = $_POST['bean_avatarName'];</p><p> $password = $_POST['bean_password'];</p><p> $password2 = $_POST['bean_retypedPassword'];</p><p> $email = $_POST['bean_email'];</p><p> $dob_day = $_POST['bean_day'];</p><p> $dob_month = $_POST['bean_month'];</p><p> $dob_year = $_POST['bean_year'];</p><p> //$lang = $_POST['bean_lang'];</p><p> </p><p> $tpl->SetParam('post-name', $name);</p><p> $tpl->SetParam('post-pass', $password);</p><p> $tpl->SetParam('post-mail', $email);</p><p> </p><p> if (strlen($name) < 1 || strlen($name) > 32)</p><p> {</p><p> $registerErrors[] = "Your username must be 1 - 32 characters in length.";</p><p> }</p><p> </p><p> if ($users->IsNameTaken($name))</p><p> {</p><p> $registerErrors[] = "Sorry, that name is taken.";</p><p> } </p><p> else if ($users->IsNameBlocked($name))</p><p> {</p><p> $registerErrors[] = "Sorry, that name is reserved or disallowed.";</p><p> }</p><p> else if (!$users->IsValidName($name))</p><p> {</p><p> $registerErrors[] = "Sorry, that name is invalid. Your name can contain lowercase, uppercase letters, and numbers.";</p><p> }</p><p> </p><p> if (strlen($password) < 6)</p><p> {</p><p> $registerErrors[] = "Your password must be at least 6 characters long.";</p><p> }</p><p> </p><p> if ($password != $password2)</p><p> {</p><p> $registerErrors[] = "Your passwords do not match. Please try again.";</p><p> }</p><p> </p><p> if (!$users->IsValidEmail($email))</p><p> {</p><p> $registerErrors[] = "Invalid e-mail address.";</p><p> }</p><p> </p><p> if (!is_numeric($dob_day) || !is_numeric($dob_month) || !is_numeric($dob_year) || $dob_day <= 0 || $dob_day > 31 ||</p><p> $dob_month <= 0 || $dob_month > 12 || $dob_year < 1900 || $dob_year > 2010)</p><p> {</p><p> $registerErrors[] = "Please enter a valid date of birth.";</p><p> }</p><p> </p><p> if (!isset($_POST['bean_tos']) || $_POST['bean_tos'] != "accept")</p><p> {</p><p> $registerErrors[] = "You need to accept the Rules and Terms and Conditions to create an account.";</p><p> }</p><p> else</p><p> {</p><p> $tpl->SetParam('post-tos-check', 'checked');</p><p> }</p><p> </p><p> /*if (strtolower($lang) != "yes, i will speak english" && strtolower($lang) != "yes, i will speak english.")</p><p> {</p><p> $registerErrors[] = "You must verify you will speak English to create an account.";</p><p> }*/</p><p> </p><p> $resp = recaptcha_check_answer ('6Le-aQoAAAAAAKaqhlUT0lAQbjqokPqmj0F1uvQm', $_SERVER["REMOTE_ADDR"], $_POST["recaptcha_challenge_field"], $_POST["recaptcha_response_field"]);</p><p> </p><p> if (!$resp->is_valid)</p><p> {</p><p> $registerErrors[] = "Invalid captcha code.";</p><p> } </p><p> </p><p> if (count($registerErrors) <= 0)</p><p> { </p><p> // Add user</p><p> $users->add($name, md5($password), $email, 1, 'hr-165-45.hd-207-9.ch-255-64.lg-275-64.sh-305-64', 'M');</p><p> </p><p> // Log user in</p><p> $_SESSION['SHOW_WELCOME'] = true;</p><p> $_SESSION['UBER_USER_N'] = $name;</p><p> $_SESSION['UBER_USER_H'] = md5($password);</p><p> </p><p> // Redirect user to welcome page</p><p> header("Location: /register/welcome");</p><p> exit;</p><p> }</p><p> else</p><p> {</p><p> $errResult = '<div class="error-messages-holder"> </p><p> <h3>Please fix the following problems and resubmit the form.</h3> </p><p> <ul>';</p><p> </p><p> foreach ($registerErrors as $err)</p><p> {</p><p> $errResult .= '<li><p class="error-message">' . $err . '</p></li>';</p><p> }</p><p> </p><p> $errResult .= '</ul></div>';</p><p> </p><p> $tpl->SetParam('error-messages-holder', $errResult);</p><p> }</p><p> }</p><p>}</p><p></p><p>$tpl->Init();</p><p></p><p>$tpl->AddGeneric('head-init');</p><p>$tpl->AddIncludeSet('register');</p><p>$tpl->WriteIncludeFiles();</p><p>$tpl->AddGeneric('head-bottom');</p><p>$tpl->AddGeneric('page-register');</p><p>$tpl->AddGeneric('footer');</p><p></p><p>$tpl->SetParam('recaptcha_html', recaptcha_get_html("6Le-aQoAAAAAABnHRzXH_W-9-vx4B8oSP3_L5tb0"));</p><p>$tpl->SetParam('page_title', 'Register your account!');</p><p></p><p>$tpl->Output();</p><p></p><p>?>[/php]</p><p></p><p><strong>And finally replace your current page-client.php with this;</strong></p><p></p><p>[php]<?php</p><p>$rand1 = rand(100000, 999999);</p><p>$rand2 = rand(10000, 99999);</p><p>$rand3 = rand(10000, 99999);</p><p>$rand4 = rand(10000, 99999);</p><p>$rand5 = rand(10000, 99999);</p><p>$rand6 = rand(1, 9);</p><p></p><p>$ticket = "ST-".$rand1."-".$rand2.$rand3."-".$rand4.$rand5."-otaku-".$rand6;</p><p>$username = $_SESSION['UBER_USER_N'];</p><p></p><p>$query = mysql_query("UPDATE users SET auth_ticket = '$ticket' WHERE username = '$username'");</p><p>$query = mysql_query("UPDATE users SET ip_last = '".$_SERVER['REMOTE_ADDR']."' WHERE username = '$username'");</p><p></p><p>?></p><p></p><p><body id="client" class="flashclient"> </p><p> </p><p><script type="text/javascript"> </p><p>var habboDefaultClientPopupUrl = "%www%/client";</p><p></script> </p><p></p><p><noscript> </p><p> <meta http-equiv="refresh" content="0;url=%www%/client/nojs" /> </p><p></noscript></p><p></p><p><script type="text/javascript"> </p><p> FlashExternalInterface.loginLogEnabled = true;</p><p> </p><p> FlashExternalInterface.logLoginStep("web.view.start");</p><p> </p><p> if (top == self) {</p><p> FlashHabboClient.cacheCheck();</p><p> }</p><p> var flashvars = {</p><p> "client.allow.cross.domain" : "1", </p><p> "client.notify.cross.domain" : "0", </p><p> "connection.info.host" : "127.0.0.1", </p><p> "connection.info.port" : "30000", </p><p> "site.url" : "%www%", </p><p> "url.prefix" : "%www%", </p><p> "client.reload.url" : "%www%/account/reauthenticate?page=/flash_client", </p><p> "client.fatal.error.url" : "%www%/flash_client_error", </p><p> "client.connection.failed.url" : "%www%/client_connection_failed", </p><p> "external.hash" : "", </p><p> "external.variables.txt" : "http://64.186.134.48/gamedata/external_variables/1.txt", </p><p> "external.texts.txt" : "http://64.186.134.48/gamedata/external_flash_texts/1.txt", </p><p> "use.sso.ticket" : "1",</p><p><?php</p><p></p><p>if ($forwardType > 0)</p><p>{</p><p> echo ' "forward.type" : "' . $forwardType . '",' . LB;</p><p> echo ' "forward.id" : "' . $forwardId . '",' . LB;</p><p>}</p><p></p><p>?></p><p> "sso.ticket" : "<?php echo $ticket; ?>", </p><p> "processlog.enabled" : "0", </p><p> "account_id" : "0", </p><p> "client.starting" : "Welcome to Habbo, powered by UberCMS!", </p><p> "flash.client.url" : "http://64.186.134.48/gordon/RELEASE63-31911-31885-201103031054_04afc0571359f527bb305734c3b22878/", </p><p> "user.hash" : "", </p><p> "facebook.user" : "0", </p><p> "has.identity" : "0", </p><p> "flash.client.origin" : "popup" </p><p> };</p><p> var params = {</p><p> "base" : "http://64.186.134.48/gordon/RELEASE63-31911-31885-201103031054_04afc0571359f527bb305734c3b22878/",</p><p> "allowScriptAccess" : "always",</p><p> "menu" : "false" </p><p> };</p><p> </p><p> if (!(HabbletLoader.needsFlashKbWorkaround())) {</p><p> params["wmode"] = "opaque";</p><p> }</p><p> </p><p> var clientUrl = "http://64.186.134.48/gordon/RELEASE63-31911-31885-201103031054_04afc0571359f527bb305734c3b22878/Habbo.swf";</p><p> try {</p><p> if (swfobject.getFlashPlayerVersion().major <= 9) { </p><p> clientUrl = "http://64.186.134.48/gordon/RELEASE63-31911-31885-201103031054_04afc0571359f527bb305734c3b22878/Habbo.swf"; </p><p> }</p><p> } catch(e) {}</p><p> swfobject.embedSWF(clientUrl, "flash-container", "100%", "100%", "9.0.115", "http://images.habbo.com/habboweb/%web_build%/web-gallery/flash/expressInstall.swf", flashvars, params);</p><p></script> </p><p> </p><p><div id="overlay"></div> </p><p><div id="client-ui" > </p><p> <div id="flash-wrapper"> </p><p> <div id="flash-container"> </p><p> <div id="content" style="width: 400px; margin: 20px auto 0 auto; display: none"> </p><p><div class="cbb clearfix"> </p><p> <h2 class="title">Please install Adobe Flash Player.</h2> </p><p> <div class="box-content"> </p><p> <p>You can install and download Adobe Flash Player here: <a href="http://get.adobe.com/flashplayer/">Install flash player</a>. More instructions for installation can be found here: <a href="http://www.adobe.com/products/flashplayer/productinfo/instructions/">More information</a></p> </p><p> <p><a href="http://www.adobe.com/go/getflashplayer"><img src="http://images.habbo.com/habboweb/45_0061af58e257a7c6b931c91f771b4483/2/web-gallery/v2/images/client/get_flash_player.gif" alt="Get Adobe Flash player" /></a></p> </p><p> </div> </p><p></div> </p><p> </div> </p><p> <script type="text/javascript"> </p><p> $('content').show();</p><p> </script> </p><p> <noscript> </p><p> <div style="width: 400px; margin: 20px auto 0 auto; text-align: center"> </p><p> <p>If you are not automatically redirected, please <a href="/client/nojs">click here</a></p> </p><p> </div> </p><p> </noscript> </p><p> </div> </p><p> </div> </p><p> <div id="content" class="client-content"></div> </p><p></div> </p><p> <div style="display: none"> </p><p><div id="habboCountUpdateTarget"> </p><p>%hotel_status%</p><p></div> </p><p> <script language="JavaScript" type="text/javascript"> </p><p> setTimeout(function() {</p><p> HabboCounter.init(600);</p><p> }, 20000);</p><p> </script> </p><p> </div> </p><p> <script type="text/javascript"> </p><p> RightClick.init("flash-wrapper", "flash-container");</p><p> </script> </p><p> </p><p></body> </p><p></html>[/php]</p><p></p><p>- Cheers, have fun ;]</p></blockquote><p></p>
[QUOTE="Sledmore, post: 29370, member: 591"] Hey, A friend wanted this done so he could switch back to UberCMS from Phoenix, but he had issues because of the UberHash and the SSO. [CENTER][B]NOTE: YOU MAY NEED SOME TABLES FROM UBERDB.[/B][/CENTER] [B]So here we are, firstly replace your current Uber index.php to:[/B] [php]<?php /*======================================================================= | UberCMS - Advanced Website and Content Management System for uberEmu | ####################################################################### | Copyright (c) 2010, Roy 'Meth0d' and updates by Matthew 'MDK' | http://www.meth0d.org & http://www.sulake.biz | ####################################################################### | This program is free software: you can redistribute it and/or modify | it under the terms of the GNU General Public License as published by | the Free Software Foundation, either version 3 of the License, or | (at your option) any later version. | ####################################################################### | This program is distributed in the hope that it will be useful, | but WITHOUT ANY WARRANTY; without even the implied warranty of | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | GNU General Public License for more details. \======================================================================*/ require_once "global.php"; if (LOGGED_IN) { header("Location: " . WWW . "/me"); exit; } $tpl->Init(); $tpl->SetParam('page_title', 'Create your avatar, decorate your room, chat and make new friends.'); $tpl->SetParam('credentials_username', ''); $tpl->AddGeneric('head-init'); $tpl->AddIncludeSet('frontpage'); $tpl->WriteIncludeFiles(); $tpl->AddGeneric('head-overrides-fp'); $tpl->AddGeneric('head-bottom'); $frontpage = new Template('page-fp'); $frontpage->SetParam('login_result', ''); if (isset($_POST['credentials_username']) && isset($_POST['credentials_password'])) { $frontpage->SetParam('credentials_username', $_POST['credentials_username']); $credUser = $_POST['credentials_username']; $credPass = md5($_POST['credentials_password']); $errors = array(); if (strlen($_POST['credentials_username']) < 1) { $errors[] = "Please enter your username"; } if (strlen($_POST['credentials_password']) < 1) { $errors[] = "Please enter your password"; } if (count($errors) == 0) { if ($users->ValidateUser($credUser, $credPass)) { if (isset($_POST['page'])) { $reqPage = filter($_POST['page']); $pos = strrpos($reqPage, WWW); if ($pos === false || $pos != 0) { die("<b>Security warning!</b> A malicious request was detected that tried redirecting you to an external site. Please proceed with caution, this may have been an attempt to steal your login details. <a href='" . WWW . "'>Return to site</a>"); } else { $_SESSION['page-redirect'] = $reqPage; } } $_SESSION['UBER_USER_N'] = $users->GetUserVar($users->Name2id($credUser), 'username'); $_SESSION['UBER_USER_H'] = $credPass; if (isset($_POST['_login_remember_me'])) { $_SESSION['set_cookies'] = true; } header("Location: " . WWW . "/security_check"); exit; } else { $errors[] = "Incorrect password"; } } if (count($errors) > 0) { $loginResult = '<div class="action-error flash-message"><div class="rounded"><ul>'; foreach ($errors as $err) { $loginResult .= '<li>' . $err . '</li>'; } $loginResult .= '</ul></div></div>'; $frontpage->SetParam('login_result', $loginResult); } } $tpl->AddTemplate($frontpage); $tpl->AddGeneric('footer'); $tpl->Output(); ?>[/php] [B]Now replace your current register.php to this (so it doesn't UberHash any passwords).[/B] [php]<?php /*======================================================================= | UberCMS - Advanced Website and Content Management System for uberEmu | ####################################################################### | Copyright (c) 2010, Roy 'Meth0d' and updates by Matthew 'MDK' | http://www.meth0d.org & http://www.sulake.biz | ####################################################################### | This program is free software: you can redistribute it and/or modify | it under the terms of the GNU General Public License as published by | the Free Software Foundation, either version 3 of the License, or | (at your option) any later version. | ####################################################################### | This program is distributed in the hope that it will be useful, | but WITHOUT ANY WARRANTY; without even the implied warranty of | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | GNU General Public License for more details. \======================================================================*/ require_once "global.php"; require_once "inc/recaptchalib.php"; if (LOGGED_IN) { header("Location: " . WWW . "/me"); exit; } $tpl->SetParam('error-messages-holder', ''); $tpl->SetParam('post-name', ''); $tpl->SetParam('post-pass', ''); $tpl->SetParam('post-tos-check', ''); $tpl->SetParam('post-mail', ''); if (isset($_GET['doSubmit'])) { if (isset($_POST['checkNameOnly']) && $_POST['checkNameOnly'] == 'true') { $name = $_POST['bean_avatarName']; echo ' <div class="field field-habbo-name"> <label for="habbo-name">Username</label> <input type="text" id="habbo-name" size="32" value="' . clean($name) . '" name="bean.avatarName" class="text-field" maxlength="32"/> <a href="#" class="new-button" id="check-name-btn"><b>Check</b><i></i></a> <input type="submit" name="checkNameOnly" id="check-name" value="Check"/> <div id="name-suggestions">'; if ($users->IsNameTaken($name)) { echo '<div class="taken"><p>Sorry, the name <strong>' . clean($name) . '</strong> is taken!</p></div>'; } else if ($users->IsNameBlocked($name)) { echo '<div class="taken"><p>Sorry, that name is reserved or disallowed.</p></div>'; } else if (!$users->IsValidName($name)) { echo '<div class="taken"><p>Sorry, that name is invalid. Your name can contain lowercase, uppercase letters, and numbers.</p></div>'; } else { echo '<div class="available"><p>The name <strong>' . clean($name) . '</strong> is available.</p></div>'; } echo ' </div> <p class="help">Your name can contain lowercase and uppercase letters and numbers.</p> </div>'; exit; } else if (isset($_POST['bean_avatarName'])) { $registerErrors = Array(); $name = $_POST['bean_avatarName']; $password = $_POST['bean_password']; $password2 = $_POST['bean_retypedPassword']; $email = $_POST['bean_email']; $dob_day = $_POST['bean_day']; $dob_month = $_POST['bean_month']; $dob_year = $_POST['bean_year']; //$lang = $_POST['bean_lang']; $tpl->SetParam('post-name', $name); $tpl->SetParam('post-pass', $password); $tpl->SetParam('post-mail', $email); if (strlen($name) < 1 || strlen($name) > 32) { $registerErrors[] = "Your username must be 1 - 32 characters in length."; } if ($users->IsNameTaken($name)) { $registerErrors[] = "Sorry, that name is taken."; } else if ($users->IsNameBlocked($name)) { $registerErrors[] = "Sorry, that name is reserved or disallowed."; } else if (!$users->IsValidName($name)) { $registerErrors[] = "Sorry, that name is invalid. Your name can contain lowercase, uppercase letters, and numbers."; } if (strlen($password) < 6) { $registerErrors[] = "Your password must be at least 6 characters long."; } if ($password != $password2) { $registerErrors[] = "Your passwords do not match. Please try again."; } if (!$users->IsValidEmail($email)) { $registerErrors[] = "Invalid e-mail address."; } if (!is_numeric($dob_day) || !is_numeric($dob_month) || !is_numeric($dob_year) || $dob_day <= 0 || $dob_day > 31 || $dob_month <= 0 || $dob_month > 12 || $dob_year < 1900 || $dob_year > 2010) { $registerErrors[] = "Please enter a valid date of birth."; } if (!isset($_POST['bean_tos']) || $_POST['bean_tos'] != "accept") { $registerErrors[] = "You need to accept the Rules and Terms and Conditions to create an account."; } else { $tpl->SetParam('post-tos-check', 'checked'); } /*if (strtolower($lang) != "yes, i will speak english" && strtolower($lang) != "yes, i will speak english.") { $registerErrors[] = "You must verify you will speak English to create an account."; }*/ $resp = recaptcha_check_answer ('6Le-aQoAAAAAAKaqhlUT0lAQbjqokPqmj0F1uvQm', $_SERVER["REMOTE_ADDR"], $_POST["recaptcha_challenge_field"], $_POST["recaptcha_response_field"]); if (!$resp->is_valid) { $registerErrors[] = "Invalid captcha code."; } if (count($registerErrors) <= 0) { // Add user $users->add($name, md5($password), $email, 1, 'hr-165-45.hd-207-9.ch-255-64.lg-275-64.sh-305-64', 'M'); // Log user in $_SESSION['SHOW_WELCOME'] = true; $_SESSION['UBER_USER_N'] = $name; $_SESSION['UBER_USER_H'] = md5($password); // Redirect user to welcome page header("Location: /register/welcome"); exit; } else { $errResult = '<div class="error-messages-holder"> <h3>Please fix the following problems and resubmit the form.</h3> <ul>'; foreach ($registerErrors as $err) { $errResult .= '<li><p class="error-message">' . $err . '</p></li>'; } $errResult .= '</ul></div>'; $tpl->SetParam('error-messages-holder', $errResult); } } } $tpl->Init(); $tpl->AddGeneric('head-init'); $tpl->AddIncludeSet('register'); $tpl->WriteIncludeFiles(); $tpl->AddGeneric('head-bottom'); $tpl->AddGeneric('page-register'); $tpl->AddGeneric('footer'); $tpl->SetParam('recaptcha_html', recaptcha_get_html("6Le-aQoAAAAAABnHRzXH_W-9-vx4B8oSP3_L5tb0")); $tpl->SetParam('page_title', 'Register your account!'); $tpl->Output(); ?>[/php] [B]And finally replace your current page-client.php with this;[/B] [php]<?php $rand1 = rand(100000, 999999); $rand2 = rand(10000, 99999); $rand3 = rand(10000, 99999); $rand4 = rand(10000, 99999); $rand5 = rand(10000, 99999); $rand6 = rand(1, 9); $ticket = "ST-".$rand1."-".$rand2.$rand3."-".$rand4.$rand5."-otaku-".$rand6; $username = $_SESSION['UBER_USER_N']; $query = mysql_query("UPDATE users SET auth_ticket = '$ticket' WHERE username = '$username'"); $query = mysql_query("UPDATE users SET ip_last = '".$_SERVER['REMOTE_ADDR']."' WHERE username = '$username'"); ?> <body id="client" class="flashclient"> <script type="text/javascript"> var habboDefaultClientPopupUrl = "%www%/client"; </script> <noscript> <meta http-equiv="refresh" content="0;url=%www%/client/nojs" /> </noscript> <script type="text/javascript"> FlashExternalInterface.loginLogEnabled = true; FlashExternalInterface.logLoginStep("web.view.start"); if (top == self) { FlashHabboClient.cacheCheck(); } var flashvars = { "client.allow.cross.domain" : "1", "client.notify.cross.domain" : "0", "connection.info.host" : "127.0.0.1", "connection.info.port" : "30000", "site.url" : "%www%", "url.prefix" : "%www%", "client.reload.url" : "%www%/account/reauthenticate?page=/flash_client", "client.fatal.error.url" : "%www%/flash_client_error", "client.connection.failed.url" : "%www%/client_connection_failed", "external.hash" : "", "external.variables.txt" : "http://64.186.134.48/gamedata/external_variables/1.txt", "external.texts.txt" : "http://64.186.134.48/gamedata/external_flash_texts/1.txt", "use.sso.ticket" : "1", <?php if ($forwardType > 0) { echo ' "forward.type" : "' . $forwardType . '",' . LB; echo ' "forward.id" : "' . $forwardId . '",' . LB; } ?> "sso.ticket" : "<?php echo $ticket; ?>", "processlog.enabled" : "0", "account_id" : "0", "client.starting" : "Welcome to Habbo, powered by UberCMS!", "flash.client.url" : "http://64.186.134.48/gordon/RELEASE63-31911-31885-201103031054_04afc0571359f527bb305734c3b22878/", "user.hash" : "", "facebook.user" : "0", "has.identity" : "0", "flash.client.origin" : "popup" }; var params = { "base" : "http://64.186.134.48/gordon/RELEASE63-31911-31885-201103031054_04afc0571359f527bb305734c3b22878/", "allowScriptAccess" : "always", "menu" : "false" }; if (!(HabbletLoader.needsFlashKbWorkaround())) { params["wmode"] = "opaque"; } var clientUrl = "http://64.186.134.48/gordon/RELEASE63-31911-31885-201103031054_04afc0571359f527bb305734c3b22878/Habbo.swf"; try { if (swfobject.getFlashPlayerVersion().major <= 9) { clientUrl = "http://64.186.134.48/gordon/RELEASE63-31911-31885-201103031054_04afc0571359f527bb305734c3b22878/Habbo.swf"; } } catch(e) {} swfobject.embedSWF(clientUrl, "flash-container", "100%", "100%", "9.0.115", "http://images.habbo.com/habboweb/%web_build%/web-gallery/flash/expressInstall.swf", flashvars, params); </script> <div id="overlay"></div> <div id="client-ui" > <div id="flash-wrapper"> <div id="flash-container"> <div id="content" style="width: 400px; margin: 20px auto 0 auto; display: none"> <div class="cbb clearfix"> <h2 class="title">Please install Adobe Flash Player.</h2> <div class="box-content"> <p>You can install and download Adobe Flash Player here: <a href="http://get.adobe.com/flashplayer/">Install flash player</a>. More instructions for installation can be found here: <a href="http://www.adobe.com/products/flashplayer/productinfo/instructions/">More information</a></p> <p><a href="http://www.adobe.com/go/getflashplayer"><img src="http://images.habbo.com/habboweb/45_0061af58e257a7c6b931c91f771b4483/2/web-gallery/v2/images/client/get_flash_player.gif" alt="Get Adobe Flash player" /></a></p> </div> </div> </div> <script type="text/javascript"> $('content').show(); </script> <noscript> <div style="width: 400px; margin: 20px auto 0 auto; text-align: center"> <p>If you are not automatically redirected, please <a href="/client/nojs">click here</a></p> </div> </noscript> </div> </div> <div id="content" class="client-content"></div> </div> <div style="display: none"> <div id="habboCountUpdateTarget"> %hotel_status% </div> <script language="JavaScript" type="text/javascript"> setTimeout(function() { HabboCounter.init(600); }, 20000); </script> </div> <script type="text/javascript"> RightClick.init("flash-wrapper", "flash-container"); </script> </body> </html>[/php] - Cheers, have fun ;] [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Server Development
Habbo Retros
Habbo Releases
CMS Releases
Moving back to UberCMS from using PhoenixCMS.
Top