Sly
I don't break the rules I bend them.
- Oct 28, 2016
- 246
- 38
Any ideas/solutions what could be causing this? I have also enlisted "gift.php" for further inspection for this major error.
-------------------------------- PHP CODE BELOW BEWARE -------------------------------
You must be registered for see links
-------------------------------- PHP CODE BELOW BEWARE -------------------------------
PHP:
<!DOCTYPE html>
<html>
<head>
<title>Robbo - Daily Gift</title>
<link rel="shortcut icon" href="{url}/app/tpl/skins/{skin}/images/favicon.ico" type="image/vnd.microsoft.icon"/>
<link rel="stylesheet" href="https://robbo.pw/system/content/theme/brain/gift_styles/common.css" type="text/css">
<link rel="stylesheet" href="https://robbo.pw/system/content/theme/brain/gift_styles/styles/lightweightmepage.css" type="text/css">
<link rel="stylesheet" href="https://robbo.pw/system/content/theme/brain/gift_styles/styles/alert.css" type="text/css">
<link rel="stylesheet" href="https://robbo.pw/system/content/theme/brain/gift_styles/styles/campaigns.css" type="text/css">
<script type="text/javascript" src="https://robbo.pw/system/content/theme/brain/gift_styles/js/libs2.js"></script>
<script type="text/javascript" src="https://robbo.pw/system/content/theme/brain/gift_styles/js/visual.js"></script>
<script type="text/javascript" src="https://robbo.pw/system/content/theme/brain/gift_styles/js/libs.js"></script>
<script type="text/javascript" src="https://robbo.pw/system/content/theme/brain/gift_styles/js/common.js"></script>
<script type="text/javascript" src="https://robbo.pw/system/content/theme/brain/gift_styles/js/fullcontent.js"></script>
<script type="text/javascript" src="https://robbo.pw/system/content/theme/brain/gift_styles/js/lightweightmepage.js"></script>
</head>
<body>
<?php
$user = mysql_query("SELECT * FROM `users` WHERE id='".$_SESSION['user']['id']."'");
while ($u = mysql_fetch_array($user)){
if ($u['id'] > 0 || $u['id'] != null){
if(date("Y-m-d") == date("Y-m-d", $u['account_created'])){
echo "<br><div class=\"rounded-green rounded-done\">You need to be atleast a Robbo member for 1 day!</div>";
}
else
{
if ($u['online'] == 0){
if(date("Y-m-d") == $u['LastUsedGift']){
if ($u['lastmysteryprize'] == null){
echo '<div class="rounded-red rounded-done">You can only receieve one gift per day!</div>';
} else {
echo '<br><div class="rounded-red rounded-done">You can only receive one gift per day!</div>';
echo '<br><div class="rounded-red rounded-done">You last received a '.$u['LastDailyGift'].'!</div>';
}
} else {
$rare = mysql_query("SELECT * FROM `daily_gift` ORDER BY RAND() LIMIT 1");
$r = mysql_fetch_assoc($rare);
if ($r){
$urRare = $r['rare_id'];
$urRareName = $r['rare_name'];
$urRareImg = $r['rare_img'];
mysql_query("INSERT INTO `items` (`user_id`, `base_item`, `extra_data`) VALUES ('".$_SESSION['user']['id']."', '".$urRare."', '0')");
mysql_query("UPDATE `users` SET `LastUsedGift` = '".date("Y-m-d", time())."' WHERE `id` = '".$_SESSION['user']['id']."'");
mysql_query("UPDATE `users` SET `LastDailyGift` = '".$urRareName."' WHERE `id`='".$_SESSION['user']['id']."'");
echo '<br><div class="rounded-green rounded-done">You have just received a '.$urRareName.'!</div>';
}}
} else {
echo "<br><div class=\"rounded-red rounded-done\">Make sure you're logged out of the client first!</div>";
echo '<br><div class="rounded-red rounded-done">You last received a '.$u['LastDailyGift'].'!</div>';
}
}}}
?>
</body>
</html>