PhoenixPHP
I know PhoenixPHP is filled with Exploits but i would like to get some experience with PHP coding.
Request Title:
- Name : ex. Private Msg System
- Function : You can send mail to other users
Here is some pic that i coded myself small but suitable for my liking :-)
Images:












PHP Snippets:
PHP Code:
<?php
$error = "";
### The Badge which you want to sell ###
$badge = "<?php echo $core->CmsSetting('badge_shop'); ?>";
### How many PIXELS costs the badge? ###
$price = "1";
if(isset($_POST['buy-bad']))
{
$user_info = @mysql_query("SELECT * FROM users WHERE username='".$_POST["habbo"]."'");
if($row = mysql_fetch_assoc($user_info))
{
$id = $row['id'];
$check_bag = mysql_query("SELECT * FROM user_badges WHERE user_id='". $id ."' AND badge_id='". $badge_shop ."'");
$check_user = mysql_query("SELECT * FROM users WHERE id='". $id ."'");
if(mysql_num_rows($check_bag) > 0)
{
$error.= '<br><font color="#FF0000">You have already bought this badge!</font>';
}
else
{
if($db_pixels_check = mysql_fetch_assoc($check_user))
{
$pixels = $db_pixels_check['activity_points'];
if($pixels >= $price)
{
$pixels_total = $pixels - $price;
mysql_query("UPDATE `users` SET `activity_points` = '". $pixels_total ."' WHERE `id` = '". $id ."';");
mysql_query("INSERT INTO `user_badges` (`user_id`, `badge_id`, `badge_slot`) VALUES (". $id .", '". $core->CmsSetting('badge_shop') ."', 0)");
$pixels_total = number_format($pixels_total);
$error.= "<br /><font color='#009900'>You have successfully bought this badge.</font>";
}
else
{
$error.= "<br><font color='#FF0000'>You haven't enough pixels to buy this badge!</font>";
}
}
}
}
}
?>
It's an Edit of badgeshop that can be controlled from Housekeeping