Closed.
No one thinks i can code my self so i wont code anymore.
Printable View
Closed.
No one thinks i can code my self so i wont code anymore.
verry sexxieeee! 10/10
very nice 10/10
nice good work 10/10
ill make a tut on how to install it
Thanks for all the feedback, and when the tut is done. Thanks for that too!
In the next release in the Habbo Info it will tell you how many friend requests you have, and your friend list. I'll try to get online friends working at a later date.
hold on m8 i got one question i get this error "Unknown column 'online' in 'field list'"
after i try and register a account try real quick
http://192.168.2.28/cms/files/register.php
One minute. When i register i don't get this error.
EDIT: Alright.. I see the problem replace register.php with this:
PHP Code:<?php
include('core.php');
session_start();
if(!session_is_registered(username)){
include("locale/".$language."/login.php");
if(isset($_GET['refer'])){
$getrefer = addslashes($_GET['refer']);
$some_sql = mysql_query("SELECT id FROM users WHERE name = '".$getrefer."'") or die(mysql_error());
$some_num = mysql_num_rows($some_sql);
if($some_num < 1){
$error = $locale['error_refer'];
$getrefer = "invalid";
}
}
if(isset($_POST['goregister'])){
// Collect POST variables
$name = addslashes($_POST['avatarName']);
$password = addslashes($_POST['password']);
$retypedpassword = addslashes($_POST['retypedPassword']);
$day = $_POST['day'];
$month = $_POST['month'];
$year = $_POST['year'];
$email = addslashes($_POST['email']);
$retypedemail = addslashes($_POST['retypedEmail']);
$accept_tos = $_POST['accepttos'];
$spam_me = $_POST['marketing'];
$refer = addslashes($_POST['refer']);
// Verify variables
$email_check = preg_match("/^[a-z0-9_\.-]+@([a-z0-9]+([\-]+[a-z0-9]+)*\.)+[a-z]{2,7}$/i", $email);
$output = preg_replace("/[^a-z\d]/i", "", $name);
// Start validating the input
if($accept_tos !== "true"){
$error = $locale['error_tos'];
} else {
if(empty($name) || empty($password) || empty($retypedpassword) || empty($day) || empty($month) || empty($year) || empty($email) || empty($retypedemail)){
$error = $locale['error_blanks'];
} else {
if($day < 1 || $day > 31 || $month < 1 || $month > 12 || $year < 1900 || $year > 2008){
$error = $locale['error_dob']; // Mhm, looks like this naughty lil' user uses an external form.. Sorry kid, uncle Meth0d can't let you do that.
} else {
if($password !== $retypedpassword){
$error = $locale['error_pass_match'];
} else {
if($email !== $retypedemail){
$error = $locale['error_mail_match'];
} else {
if($email_check !== 1){
$error = $locale['error_invalid_mail'];
} else {
if(strlen($name) > 25){
$error = $locale['error_name_too_long'];
} else {
if(strlen($password) < 6){
$error = $locale['error_pass_too_short'];
} else {
if(strlen($password) > 25){
$error = $locale['error_pass_too_long'];
} else {
if($name !== $output){
$error = $locale['error_invalid_username'];
} else {
$sql1 = mysql_query("SELECT id FROM users WHERE name = '".$output."' LIMIT 1") or die(mysql_error());
$num1 = mysql_num_rows($sql1);
if($num1 > 0){
$error = "Chosen username (".$output.") is taken";
} else { // Everything is OK; let's register the guy
$sql2 = mysql_query("SELECT id FROM users ORDER BY id DESC LIMIT 1");
$row2 = mysql_fetch_assoc($sql2);
$num2 = mysql_num_rows($sql2);
if($num2 !== 0){
$myid = $row2['id'] + 1;
} else {
$myid = "1";
}
$figure = $_POST['settings-figure'];
$sex = $_POST['settings-gender'];
if(empty($figure) || empty($sex)){
$error = "An unknown error occured";
} else {
if(!empty($refer)){
$refersql = mysql_query("SELECT id FROM users WHERE name = '".$refer."' LIMIT 1") or die(mysql_error());
$refernum = mysql_num_rows($refersql);
if($refernum > 0){
mysql_query("UPDATE users SET credits = credits + ".$reward." WHERE name = '".$refer."'") or die(mysql_error());
mysql_query("UPDATE cms_alerts SET alert = 'Someone filled you in as refer during registration, and you recieved ".$reward." credits as reward! Use them wisely.', pending = '1' WHERE username = '".$refer."'") or die(mysql_error());
$sql3 = mysql_query("INSERT INTO users (id,name,password,hash,app_key,ip,rank,email,newsletter,figure,poolFigure,sex,Mission,dob,lastOnline,consoleMission,consoleFriends,consoleRequests,groupID,groupBadge,groupName,groupDesc,credits,tickets,photos,hand,clubDays,clubPeriods,clubExpire,favoriteRooms,badge,badgestatus,badges,totalClubDays) VALUES ('".$myid."','".$output."','".$password."','0','1','".$getrefer."','user','".$email."','0','".$figure."','".$figure."','".$sex."','Marks v20','".$day.".".$month.".".$year."','".$regdate."','Consol Mission',' ','0','0','0',' ',' ','0','0','0',';','0','0','0',' ',' ','0',';','0')") or die(mysql_error());
//$sql4 = mysql_query("UPDATE system SET users = users + 1");
$sql5 = mysql_query("INSERT INTO cms_alerts (username,alert,pending) VALUES ('".$output."','','0')") or die(mysql_error());
$username = $name;
$_SESSION['username'] = $username;
$_SESSION['password'] = $password;
header("location:security_check.php");
} else {
$error = $locale['error_refer'];
}
} else {
$sql3 = mysql_query("INSERT INTO users (id,name,password,hash,app_key,ip,rank,email,newsletter,figure,poolFigure,sex,Mission,dob,lastOnline,consoleMission,consoleFriends,consoleRequests,groupID,groupBadge,groupName,groupDesc,credits,tickets,photos,hand,clubDays,clubPeriods,clubExpire,favoriteRooms,badge,badgestatus,badges,totalClubDays) VALUES ('".$myid."','".$output."','".$password."','0','1','".$getrefer."','user','".$email."','0','".$figure."','".$figure."','".$sex."','Marks v20','".$day.".".$month.".".$year."','".$regdate."','Consol Mission',' ','0','0','0',' ',' ','0','0','0',';','0','0','0',' ',' ','0',';','0')") or die(mysql_error());
//$sql4 = mysql_query("UPDATE system SET users = users + 1");
$sql5 = mysql_query("INSERT INTO cms_alerts (username,alert,pending) VALUES ('".$output."','','0')") or die(mysql_error());
$username = $name;
$_SESSION['username'] = $username;
$_SESSION['password'] = $password;
header("location:security_check.php");
}
}
}
}
}
}
}
}
}
}
}
}
}
}
include('templates/login/register_subheader.php');
include('templates/login/register_header.php');
?>
<div id="process-content">
<div id="column1" class="column">
<div class="habblet-container ">
<form method="post" action="register.php" id="registerform" autocomplete="off">
<input type="hidden" name="settings-figure" id="settings-figure" value="<?php if(isset($_POST['settings-figure'])){ echo $_POST['settings-figure']; } ?>" />
<input type="hidden" name="settings-gender" id="settings-gender" value="<?php if(isset($_POST['settings-gender'])){ echo $_POST['settings-gender']; } ?>" />
<input type="hidden" name="editorState" id="register-editor-state" value="" />
<div id="register-column-left">
<div class="action-confirmation flash-message">
<div class="rounded">
<font size="4"><b>1. <?php echo $locale['header1']; ?></b></font>
</div>
</div>
<div id="avatar-error-box">
</div>
<div id="register-avatar-editor">
<p><b><?php echo $locale['noflash']; ?></b></p>
</div>
<script type="text/javascript" language="JavaScript">
var swfobj = new SWFObject("http://www.habbo.co.uk/flash/HabboRegistration.swf", "habboreg", "435", "400", "8");
swfobj.addParam("base", "http://www.habbo.co.uk/flash/");
swfobj.addParam("wmode", "opaque");
swfobj.addParam("AllowScriptAccess", "always");
swfobj.addVariable("figuredata_url", "http://www.habbohotel.co.uk/gamedata/figuredata");
swfobj.addVariable("draworder_url", "http://www.habbohotel.co.uk/gamedata/figurepartconfig/draworder");
swfobj.addVariable("localization_url", "http://www.habbo.co.uk/figure/figure_editor_xml");
swfobj.addVariable("figure", "<?php if(isset($_POST['settings-figure'])){ echo $_POST['settings-figure']; } ?>");
swfobj.addVariable("gender", "<?php if(isset($_POST['settings-gender'])){ echo $_POST['settings-gender']; } ?>");
swfobj.addVariable("showClubSelections", "0");
swfobj.write("register-avatar-editor");
</script>
<?php
if(!empty($error)){
?>
<div class="action-error flash-message">
<div class="rounded">
<b><?php echo $locale['error_occured']; ?></b><br>
<?php echo $error; ?>
</div>
</div>
<?php
}
?>
</div>
<div id="register-column-right">
<div id="register-section-2">
<div class="rounded rounded-blue">
<h2 class="heading"><span class="numbering white">2.</span><?php echo $locale['header2']; ?></h2>
<fieldset id="register-fieldset-name">
<div class="register-label white"><?php echo $locale['habboname']; ?></div>
<div align="center"><input type="text" name="avatarName" class="register-text" value="<?php echo stripslashes($name); ?>" size="25" /></div>
</fieldset>
<div id="name-error-box">
</div>
</div>
</div>
<div id="register-section-3">
<div class="cbb clearfix gray">
<h2 class="title heading"><span class="numbering white">3.</span><?php echo $locale['header3']; ?></h2>
<div class="box-content">
<fieldset id="register-fieldset-password">
<div class="register-label"><label for="register-password"><?php echo $locale['regpassword']; ?></label></div>
<div class="register-label"><input type="password" name="password" id="register-password" class="register-text" size="25" value="" /></div>
<div class="register-label"><label for="register-password2"><?php echo $locale['retype_password']; ?></label></div>
<div class="register-label"><input type="password" name="retypedPassword" id="register-password2" class="register-text" size="25" value="" /></div>
</fieldset>
<div id="password-error-box"></div>
<fieldset>
<div class="register-label"><label><?php echo $locale['mydob']; ?></label></div>
<div id="register-birthday"><select name="day" id="bean_day" class="dateselector"><option value=""><?php echo $locale['day']; ?></option><option value="1">1</option><option value="2">2</option><option value="3">3</option><option value="4">4</option><option value="5">5</option><option value="6">6</option><option value="7">7</option><option value="8">8</option><option value="9">9</option><option value="10">10</option><option value="11">11</option><option value="12">12</option><option value="13">13</option><option value="14">14</option><option value="15">15</option><option value="16">16</option><option value="17">17</option><option value="18">18</option><option value="19">19</option><option value="20">20</option><option value="21">21</option><option value="22">22</option><option value="23">23</option><option value="24">24</option><option value="25">25</option><option value="26">26</option><option value="27">27</option><option value="28">28</option><option value="29">29</option><option value="30">30</option><option value="31">31</option></select> <select name="month" id="bean_month" class="dateselector"><option value=""><?php echo $locale['month']; ?></option><option value="1">January</option><option value="2">February</option><option value="3">March</option><option value="4">April</option><option value="5">May</option><option value="6">June</option><option value="7">July</option><option value="8">August</option><option value="9">September</option><option value="10">October</option><option value="11">November</option><option value="12">December</option></select> <select name="year" id="bean_year" class="dateselector"><option value=""><?php echo $locale['year']; ?></option><option value="2008">2008</option><option value="2007">2007</option><option value="2006">2006</option><option value="2005">2005</option><option value="2004">2004</option><option value="2003">2003</option><option value="2002">2002</option><option value="2001">2001</option><option value="2000">2000</option><option value="1999">1999</option><option value="1998">1998</option><option value="1997">1997</option><option value="1996">1996</option><option value="1995">1995</option><option value="1994">1994</option><option value="1993">1993</option><option value="1992">1992</option><option value="1991">1991</option><option value="1990">1990</option><option value="1989">1989</option><option value="1988">1988</option><option value="1987">1987</option><option value="1986">1986</option><option value="1985">1985</option><option value="1984">1984</option><option value="1983">1983</option><option value="1982">1982</option><option value="1981">1981</option><option value="1980">1980</option><option value="1979">1979</option><option value="1978">1978</option><option value="1977">1977</option><option value="1976">1976</option><option value="1975">1975</option><option value="1974">1974</option><option value="1973">1973</option><option value="1972">1972</option><option value="1971">1971</option><option value="1970">1970</option><option value="1969">1969</option><option value="1968">1968</option><option value="1967">1967</option><option value="1966">1966</option><option value="1965">1965</option><option value="1964">1964</option><option value="1963">1963</option><option value="1962">1962</option><option value="1961">1961</option><option value="1960">1960</option><option value="1959">1959</option><option value="1958">1958</option><option value="1957">1957</option><option value="1956">1956</option><option value="1955">1955</option><option value="1954">1954</option><option value="1953">1953</option><option value="1952">1952</option><option value="1951">1951</option><option value="1950">1950</option><option value="1949">1949</option><option value="1948">1948</option><option value="1947">1947</option><option value="1946">1946</option><option value="1945">1945</option><option value="1944">1944</option><option value="1943">1943</option><option value="1942">1942</option><option value="1941">1941</option><option value="1940">1940</option><option value="1939">1939</option><option value="1938">1938</option><option value="1937">1937</option><o tion value="1936">1936</option><option value="1935">1935</option><option value="1934">1934</option><option value="1933">1933</option><option value="1932">1932</option><option value="1931">1931</option><option value="1930">1930</option><option value="1929">1929</option><option value="1928">1928</option><option value="1927">1927</option><option value="1926">1926</option><option value="1925">1925</option><option value="1924">1924</option><option value="1923">1923</option><option value="1922">1922</option><option value="1921">1921</option><option value="1920">1920</option><option value="1919">1919</option><option value="1918">1918</option><option value="1917">1917</option><option value="1916">1916</option><option value="1915">1915</option><option value="1914">1914</option><option value="1913">1913</option><option value="1912">1912</option><option value="1911">1911</option><option value="1910">1910</option><option value="1909">1909</option><option value="1908">1908</option><option value="1907">1907</option><option value="1906">1906</option><option value="1905">1905</option><option value="1904">1904</option><option value="1903">1903</option><option value="1902">1902</option><option value="1901">1901</option><option value="1900">1900</option></select> </div>
</fieldset>
<div id="email-error-box">
</div>
<fieldset>
<div class="register-label"><label for="register-captcha"><?php echo $locale['refer']; ?></label></div>
<?php if(!empty($getrefer) && $getrefer !== "invalid"){ ?>
<div><input type="text" name="refer" id="register-captcha" class="register-text" value="<?php echo stripslashes($getrefer); ?>" size="25" /></div>
<?php } else { ?>
<div><input type="text" name="refer" id="register-captcha" class="register-text" value="<?php echo stripslashes($_POST['refer']); ?>" size="25" /></div>
<?php } ?>
</fieldset>
<fieldset>
<div class="register-label"><label for="register-email"><?php echo $locale['mail']; ?></label></div>
<div class="register-label"><input type="text" name="email" id="register-email" class="register-text" value="<?php echo stripslashes($email); ?>" size="25" maxlength="48" /></div>
<div class="register-label"><label for="register-email2"><?php echo $locale['mail_retype']; ?></label></div>
<div class="register-label"><input type="text" name="retypedEmail" id="register-email2" class="register-text" value="<?php echo stripslashes($retypedemail); ?>" size="25" maxlength="48" /></div>
<div id="register-marketing-box">
<input type="checkbox" name="marketing" id="bean_marketing" value="true" <?php if($spam_me == "true"){ echo "checked='checked'"; } ?> />
<label for="bean_marketing"><?php echo $locale['mailing']; ?></label>
</div>
</fieldset>
<div id="terms-error-box">
</div>
<fieldset id="register-fieldset-terms">
<div class="rounded rounded-darkgray" id="register-terms">
<div id="register-terms-content">
<p><a href="./disclaimer.php" target="_blank" id="register-terms-link"><?php echo $locale['link_disclaimer']; ?></a></p>
<p class="last">
<input type="checkbox" name="accepttos" id="register-terms-check" value="true" <?php if($_POST['accepttos'] == "true"){ echo "checked='checked'"; } ?> />
<label for="register-terms-check"><?php echo $locale['accept_tos']; ?></label>
</p>
</div>
</div>
</fieldset>
</div>
</div>
<div id="form-validation-error-box" style="display:none">
<div class="register-error">
<div class="rounded rounded-red">
Sorry, registration failed. Please check the information you gave in the red boxes.
</div>
</div>
</div>
</div>
</div>
<div id="register-buttons">
<input type="submit" name="goregister" value="<?php echo $locale['done']; ?>" class="continue" id="register-button-continue" />
<a href="index.php" class="cancel"><?php echo $locale['exit']; ?></a>
</div>
</form>
</div>
<script type="text/javascript">if (!$(document.body).hasClassName('process-template')) { Rounder.init(); }</script>
</div>
<?php
} else {
header("location:index.php");
}
include('templates/login/footer.php');
?>
ok i fixed it now, now i need to fix HC =/
EDIT: how do i get it so new users get coins?
I'll make it so in config you can just set a value and when the user registers they get those credits.
With the HC you can buy HC however you can't use HC clothes... I'm working on that and it will be released in 1.3 or 1.4.
Ok well any way i can help?
also i cant login to the hotel =/ ill try and fix that =p
In your MYsql database go to system_config and change game_port and mus_port to your ports.
Make sure however if you set game port to 1232 make your mus port 1233.. That should work, cause SSO works.. I fixed that.
still not working
http://192.168.2.28/cms/files/index.php
Did you start your server? If so it's probley on port 90 if you didn't change settings.exe.. And did you add your mysql information into settings.exe?
If the servers on port 90 make game_port = 90 and mus_port = 91
Download the OBDC Connector and MySQL Server
MySQL :: MySQL Connector/ODBC 3.51 Downloads
MySQL :: MySQL 5.0 Downloads