<center>
<?php
include "conreal.php";
$id = (int)$_GET['id'];
if ($id >= "1")
{
echo "<font color='#FFFFFF'>";
$time = time();
$vrememinusedinden=$time-86400;
$ip = $_SERVER['REMOTE_ADDR'];
$query = mssql_query("SELECT * from items WHERE ip='$ip' and userid='$id' and vreme>$vrememinusedinden ORDER by vreme DESC");
$broi = mssql_num_rows($query);
if ($broi == "0")
{
$sel = mssql_query("SELECT * from MEMB_INFO where memb_guid='$id'");
$broq = mssql_num_rows($sel);
if ($broq > "0")
{
$rand = rand(1, 3);
$insert = mssql_query("INSERT INTO items (vreme, userid , ip ) VALUES('$time','$id','$ip')");
$fetch = mssql_fetch_array($sel);
$username = $fetch['memb___id'];
$update = mssql_query("Update MEMB_CREDITS set credits = credits+$rand WHERE memb___id='$username'");
echo "Вие успешно дадохте на $username $rand кредити за webshopa";
}
else
{
echo "Такъв потребител не съществува!";
}
}
else
{
echo "Вече сте гласували ще можете пак след 24 часа.";
}
echo "</font>";
}
else
{
echo "<font color='#FFFFFF'>Мразя тарикати...</font>";
}
?>
</center>