<?php
$random = rand(95,358); // Random number range, closer the min and max more chance of winning
switch ($random){
case 98: // Credits
mysql_query("UPDATE users SET credits = credits+500 WHERE id = '".$_SESSION['user']['id']."'");
echo "<script>alert('Congratulations!, {username} You have won 500 credits');</script>";
break;
case 186: // Pixels
mysql_query("UPDATE users SET activity_points = activity_points+500 WHERE id = '".$_SESSION['user']['id']."'");
echo "<script>alert('Congratulations!, {username} You have won 500 pixels');</script>";
break;
case 356: // Points
mysql_query("UPDATE users SET vip_points = vip_points+50 WHERE id = '".$_SESSION['user']['id']."'");
echo "<script>alert('Congratulations!, {username} You have won 50 points');</script>";
break;
case 239: // furni // Furni ID 202 is throne in basic phx catalogue
mysql_query("INSERT INTO items (`user_id`, `base_item`) VALUES ('".$_SESSION['user']['id']."', 202);");
echo "<script>alert('Congratulations!, {username} You have won a rare throne');</script>";
break;
}
?>