thilen03
New Member
- Oct 17, 2017
- 17
- 2
Hello so i have this problem where i cant change my password in account settings on my habbo retro. im not sure if it cause the passwords are encrypted but anyways i need help.
Settings.php
Settings.php
PHP:
<?php include('/inc/header.php'); ?>
<div class="col col-2">
<span class="hl blue">Account settings</span>
<form action="" method="post">
<table border="0" width="100%" style="margin: 10px;">
<?php if(isset($template->form->error)) { echo '<div id="message">'.$template->form->error.'</div>'; } ?>
<tr>
<td width="50%"><strong>E-mail</strong></td>
<td><input id="email" name="acc_email" class="textfield" type="text" value="{email}" /></td>
</tr>
<tr>
<td width="45%"><strong>Mission</strong></td>
<td><label for="motto"></label>
<input id="motto" name="acc_motto" class="textfield" type="text" value="{motto}" />
</td>
</tr>
<tr>
<td colspan="2"><i><small>Only if you want to change your password!</small></i></td>
</tr>
<tr>
<td width="50%"><strong>Current password</strong></td>
<td><input id="password" name="acc_old_password" class="textfield" type="password" /></td>
</tr>
<tr>
<td width="50%"><strong>New password</strong></td>
<td><input id="confirm_password" name="acc_new_password" class="textfield" type="password" /></td>
</tr>
<tr>
<td width="50%"> </td>
<td><input id="button" name="account" type="submit" value="Update informations" /></td>
</tr>
</table>
</form>
</div>
<div class="col col-2">
<span class="hl blue">Other account settings</span>
<?php
if(isset($_POST['acc'])) {
$block_newfriends = clean($_POST['block_newfriends']);
$hide_inroom = clean($_POST['hide_inroom']);
$hide_online = clean($_POST['hide_online']);
if($block_newfriends != 'nul') {
$block_newfriends = 1;
} else {
$block_newfriends = 0;
}
if($hide_inroom != 0 && $hide_inroom != 1) {
echo"<b>Dit kan niet</b>";
} else if($hide_online != 0 && $hide_online != 1) {
echo"<b>Dit kan niet</b>";
} else {
echo"<b>Succesvol aangepast</b>";
mysql_query("UPDATE `users` SET `block_newfriends`='$block_newfriends',`hide_inroom`='$hide_inroom',`hide_online`='$hide_online' WHERE `id`='$user->id'");
$user = mysql_fetch_object(mysql_query("SELECT * FROM `users` WHERE `id`='$userid'"));
}
}
?>
<form method="post">
<table width="100%">
<tr>
<td><strong><font size="2px">Friend requests</font></strong></td>
<td></td>
</tr>
<tr>
<td><i>Allow friends requests?</i></td>
<td><input <?php if($user->block_newfriends == 0) { ?> checked="checked" <?php } ?> name="block_newfriends" type="checkbox" value="nul"></td>
</tr>
<tr>
<td colstan="2"><strong><font size="2px">Follow</font></strong>
<br><i>Choose who is allowed to follow you in {hotelname}:</i></td>
</tr>
<tr>
<td>No one</td>
<td><input name="hide_inroom" type="radio" <?php if($user->hide_inroom == 1) { ?> checked="checked" <?php } ?> value="1"></td>
</tr>
<tr>
<td>My friends</td>
<td><input name="hide_inroom" type="radio" <?php if($user->hide_inroom == 0) { ?> checked="checked" <?php } ?> value="0"></td>
</tr>
<tr>
<td colstan="2"><strong><font size="2px">Online status</font></strong>
<br><i>Who can see that you are online:</i></td>
</tr>
<tr>
<td>No one<br></td>
<td><input name="hide_online" type="radio" <?php if($user->hide_online == 1) { ?> checked="checked" <?php } ?> value="1"></td>
</tr>
<tr>
<td>My friends</td>
<td><input name="hide_online" type="radio" <?php if($user->hide_online == 0) { ?> checked="checked" <?php } ?> value="0"></td>
</tr>
<tr>
<td><input id="button" name="acc" type="submit" value="Update informations"></td>
<td></td>
</tr>
</table>
</form>
</div>
<?php include('/inc/footer.php'); ?>