<div class="cl-right"> <figure class="sforegroun" id="sforegroun" style="background-image: url(/images/bg/shapk.png);"></figure>
<div class="container floated">
<!--BONUS-->
<div class="page-title sixteen columns floated">
<div class="title"><h1>BONUS</h1></div>
<nav id="breadcrumbs">
<ul>
<li><span class="highlight color" style="font-size:16px;">Баланс: Для покупок: {!BALANCE_B!} На вывод: {!BALANCE_P!}</span></li>
</ul>
</nav>
</div>
</div>
<div><center><table align="center" border="1" cellpadding="1" cellspacing="1" style="width: 1000px">
<tbody>
<tr>
<td> <ul>
<li><a href="/account" class="button color"><i class="icon-user"></i> Профиль </a></li></ul></td>
<td> <ul>
<li><a href="/account/bonus" class="button color"><i class="icon-thumbs-up"></i> Бонус </a></li></ul></td>
<td> <ul>
<li><a href="/account/lottery" class="button color"><i class="icon-gift"></i> Лотерея </a></li></ul></td>
<td> <ul>
<li><a href="/account/swap" class="button color"><i class=""></i> Обмен копеек</a></li></ul></td>
<td> <ul>
<li><a href="/account/referals" class="button color"><i class="icon-group"></i> Рефералы </a></li></ul></td>
<td> <ul>
<li><a href="/account/insert" class="button color"><i class=""></i> Пополнить баланс </a></li></ul></td>
<td> <ul>
<li><a href="/account/payment" class="button color"><i class=""></i> Заказать выплату</a></li></ul></td>
<td> <ul>
<li><a href="/account/serfing" class="button color"><i class="icon-signout"></i> Серфинг</a></li></ul></td>
<td> <ul>
<li><a href="/account/baners" class="button color"><i class=""></i> Банерная реклама</a></li></ul></td>
<td> <ul>
<li><a href="/account/exit" class="button color"><i class="icon-signout"></i> Выход</a></li></ul></td>
</tr>
</tbody>
</table> </center> </div>
<!--Серфинг-->
<?php
//error_reporting(E_ALL);
//ini_set('display_errors', 1);
/*
* Серфинг для фермы
* Версия: 1.00
* SKYPE: sereega393
* Использование без оплаты ЗАПРЕЩЕНО!!!
*/
define('TIME', time());
header("Content-Type: text/html; charset=windows-1251");
$db->Query("SELECT * FROM db_users_a WHERE id = '".$_SESSION['user_id']."'");
$users_info = $db->FetchAssoc();
function GeoIpClient()
{
$xml=@simplexml_load_file('http://ipgeobase.ru:7020/geo?ip='.$_SERVER["REMOTE_ADDR"]);
$country = ($xml->ip->country) ? $xml->ip->country : FALSE;
if ($country)
{
$_SESSION['country'] = $country;
}
else
{
$_SESSION['country'] = 'FUCK';
}
}
if (!isset($_SESSION['country'])) { GeoIpClient(); }
//unset($_SESSION['country']);
//echo 'test = '.$_SESSION['country'];
if (isset($_GET['delete']))
{
$id = (int)$_GET['delete'];
if (isset($_SESSION['admin']))
{
$db->query("SELECT money, user_name FROM db_serfing WHERE id = '".$id."' LIMIT 1");
$result = $db->FetchAssoc();
$db->query("UPDATE db_users_b SET money_b = money_b + '".$result['money']."' WHERE user = '".$result['user_name']."'");
$db->query("DELETE FROM db_serfing WHERE id = '".$id."'");
$db->query("DELETE FROM db_serfing_view WHERE ident = '".$id."'");
}
}
?>
<script>
function getHTTPRequest()
{
var req = false;
try {
req = new XMLHttpRequest();
} catch(err) {
try {
req = new ActiveXObject("MsXML2.XMLHTTP");
} catch(err) {
try {
req = new ActiveXObject("Microsoft.XMLHTTP");
} catch(err) {
req = false;
}
}
}
return req;
}
jQuery(document).ready(function(){
$(".normalm").click(function(e){
var oLeft = 0, oTop = 0;
element = this;
if (element.className == 'normalm') {
do {
oLeft += element.offsetLeft;
oTop += element.offsetTop;
} while (element = element.offsetParent);
var sx = e.pageX - oLeft;
var sy = e.pageY - oTop;
var elid = $(this).attr("id");
fixed(elid, sx, sy);
}
});
})
function goserf(obj)
{
obj.parentNode.innerHTML = "<span class='textgreen'><center>Спасибо за визит</center></span>";
return false;
}
function fixed(p1, p2, p3)
{
var myReq = getHTTPRequest();
var params = "p1="+p1+"&p2="+p2+"&p3="+p3;
function setstate()
{
if ((myReq.readyState == 4)&&(myReq.status == 200)) {
var resvalue = myReq.responseText;
if (resvalue != '') {
if (resvalue.length > 12) {
if (elem = document.getElementById(p1)) {
elem.style.backgroundImage = 'none';
elem.className = 'goadvsite';
elem.innerHTML = '<div><a target="_blank" href="/'+resvalue+'" onclick="javascript:goserf(this);"><center>ЗАРАБОТАТЬ</center></a></div>';
}
} else {
if (elem = document.getElementById(resvalue)) {
$(elem).fadeOut('low', function() {
elem.innerHTML = "<td colspan='3'></td>";
});
}
}
}
}
}
myReq.open("POST", "/ajax/us-fixedserf.php", true);
myReq.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
myReq.setRequestHeader("Content-lenght", params.length);
myReq.setRequestHeader("Connection", "close");
myReq.onreadystatechange = setstate;
myReq.send(params);
return false;
}
</script>
<link rel="stylesheet" href="/style/main.css" type="text/css" />
<!--<div class="s-bk-lf">
<div class="acc-title9">Серфинг</div>
</div> -->
<div class="silver-bk">
<p style="text-align: center;">Зарабатывай, просматривая сайты рекламодателей</p>
<table class="work-serf">
<?php
$db->query("SELECT ident, time_add FROM db_serfing_view WHERE user_id = '".$_SESSION['user_id']."' and time_add + INTERVAL 24*60*60 SECOND > NOW()");
while ($row_view = $db->FetchAssoc())
{
$visits[$row_view['ident']] = $row_view;
}
$db->Query("SELECT * FROM db_serfing WHERE money >= price and status = '2' ORDER BY high DESC, time_add DESC");
if ($db->NumRows())
{
while ($row = $db->FetchAssoc())
{
if (isset($visits[$row['id']])) continue;
if ($row['speed'] > 1)
{
if (mt_rand(1, $row['speed']) != 1) continue;
}
$high = ($row['high']) ? 'serfimghigh' : 'serfimg';
$pay_user = number_format($row['price'] - $row['price'] * (10/100), 2); //оплата пользователю
if ($row['country'])
{
$country = explode('|', $row['country']);
if ($row['crev'])
{
if (in_array($_SESSION['country'], $country)) continue; //показывать всем кроме указаных
}
else
{
if (!in_array($_SESSION['country'], $country)) continue; //показывать только указаным
}
}
if ($row['rating'])
{
if ($row['rating'] == 1 && $users_info['insert_sum'] > 10)
{
continue;
}
if ($row['rating'] == 2 && ($users_info['insert_sum'] < 10 && $users_info['insert_sum'] > 100))
{
continue;
}
if ($row['rating'] == 3 && ($users_info['insert_sum'] < 100 && $users_info['insert_sum'] > 500))
{
continue;
}
if ($row['rating'] == 4 && ($users_info['insert_sum'] < 500 && $users_info['insert_sum'] > 1000))
{
continue;
}
if ($row['rating'] == 5 && $users_info['insert_sum'] < 1000)
{
continue;
}
}
?>
<!--<tr id="tr<?php echo $row['id']; ?>">
<td class="normal" width="1" valign="top"> -->
<!-- <span id="adstatus<?php echo $row['id']; ?>" class="<?php echo $high; ?>" title="Реклама: <?php echo $row['id']; ?>, Рекламодатель: <?php echo $row['user_name']; ?> | <?php echo $row['url']; ?>"></span> -->
</td>
<table align="left" border="1" cellpadding="1" cellspacing="1" style="width: 80px; height: 50px">
<tbody>
<tr>
<td>
<td id="<?php echo $row['id']; ?>" class="normalm" valign="top">
<img src="/images/slide-02m.gif" title="ЖМИ" style=" width: 60px; height: 60px;" >
</td>
</tr>
</tbody>
</table>
<!-- <td class="normal" nowrap="nowrap" valign="top" style="width: 60px; text-align: right; padding-right: 10px;">
<?php if (isset($_SESSION['admin'])) { ?><a class="workcomp" href="/account/serfing/delete/<?php echo $row['id']; ?>" title="Удалить ссылку и вернуть деньги"></a><?php } ?>
<!--<a class="workevents" href="/account/wall/<?php echo $row['user_name']; ?>" title="Рекламодатель" target="_blank"></a>-->
<!--<a class="workvir" href="http://online.us.drweb.com/result/?url=<?php echo $row['url']; ?>" title="Проверить ссылку на вирусы" target="_blank"></a> -->
</td>
</tr>
<?php
}
}
else
{
}
?>
</table>
</div>
<div class="clr"></div>
<BR />
<center>Бонус выдается после клика по банеру
<BR />
10% <b>0.31</b> до <b>0.40</b> RUB .
<br>
20% <b>0.21</b> до <b>0.30</b> RUB .
<br>
20% <b>0.11</b> до <b>0.20</b> RUB .
<br>
20% <b>0.06</b> до <b>0.10</b> RUB .
<br>
30% <b>0.01</b> до <b>0.05</b> RUB .
</center>
<?PHP
$_OPTIMIZATION["title"] = "Аккаунт - Ежедневный бонус";
$usid = $_SESSION["user_id"];
$uname = $_SESSION["user"];
# Настройки бонусов
$bonus_min = 4;
$bonus_max = 20;
?>
<?PHP
$ddel = time() + 60*60*1;
$dadd = time();
$db->Query("SELECT COUNT(*) FROM db_bonus_list WHERE user_id = '$usid' AND date_del > '$dadd'");
$hide_form = false;
if($db->FetchRow() == 0){
# Выдача бонуса
if(isset($_POST["bonus"])){
$sum = rand($bonus_min, rand($bonus_min, $bonus_max) );
# Зачилсяем юзверю
$db->Query("UPDATE db_users_b SET money_b = money_b + '$sum' WHERE id = '$usid'");
# Вносим запись в список бонусов
$db->Query("INSERT INTO db_bonus_list (user, user_id, sum, date_add, date_del) VALUES ('$uname','$usid','$sum','$dadd','$ddel')");
# Случайная очистка устаревших записей
$db->Query("DELETE FROM db_bonus_list WHERE date_del < '$dadd'");
echo "<center><font color = '#1900CF'><b>На Ваш счет зачислен бонус в размере {$sum} копеек</b></font></center><BR />";
$hide_form = true;
}
# Показывать или нет форму
if(!$hide_form){
?>
<!--Скрыть кнопку бонуса-->
<script>
var show;
function hidetxt(type){
param=document.getElementById(type);
if(param.style.display == "none") {
if(show) show.style.display = "none";
param.style.display = "block";
show = param;
}else param.style.display = "none"
}
</script>
<div onclick="hidetxt('div1');">
<center><table align="center" border="1" cellpadding="1" cellspacing="1" style="width: 1000px">
<tbody>
<tr>
<td style="text-align: center;">
<?php $func->rotator(); ?> </td>
<td style="text-align: center;">
<?php $func->rotator(); ?> </td>
</tr>
</tbody>
</table>
</center>
<div style="display:none;" id="div1">
<center><form action="" method="post">
<table width="30" border="0" align="center">
<tr>
<td align="center"></td>
</tr>
<tr>
<td align="center"><input type="submit" name="bonus" value="Получить бонус" style="height: 30px; margin-top:20px;"></td>
</tr>
</table>
</form></center>
</div>
</div>
</div>
<?PHP
}
}else
{
$db->Query("SELECT * FROM db_bonus_list WHERE user_id = '$usid' order by ID DESC limit 1");
$lidermen = $db->FetchArray();
$time = $lidermen['date_del'] - $dadd;
$amount = floor($time/2678400);//days
floor($days =($time/2678400 - $amount)*86400);
$days = floor($time/86400);//days
floor($hours =($time/86400 - $days)*3600);
$hours = floor($time/3600);
floor($minutes =($time/3600 - $hours)*60);
$seconds = ceil(($minutes - floor($minutes))*60);
$min=ceil($minutes)-01;
$crok1 = date(time());
$crok2 = date($lidermen["date_del"] );
$cr=date("H:i",$crok2);
$os = $crok2 - $crok1 - (19 * 60 * 60);
$ost= date("H:i:s",$os);
//echo $data['sec'] - time().' сек.';
//echo "<b>$hours :$min :$seconds</font></b>";
echo "<div align=center>
<font color = 'red'><b>Вы уже получали бонус за последние 1 час</b></font><BR />
<font color = 'red' ><span style='font-size: 20px'><b>До следующего бонуса осталось:</b></span></font><BR /></br>
<div style='padding-left: 420px;'>
<div id='counter_2' ></div>
<div class='desc'>
<div align=center>Часов </div>
<div align=center>Минут</div>
<div align=center>Секунд</div>
</div>
</div>
</div>
";
}
?>
<script src="/js/jquery.countdown.js" type="text/javascript" charset="utf-8"></script>
<script>
$(function() {
$('#counter_2').countdown({
image: '/img/digits.png',
startTime: '<?=$ost;?>',
timerEnd: function(){ alert('Обновите страницу и получите бонус!'); },
format: 'hh:mm:ss',
});
})
</script>
<style type='text/css'>
br { clear: both; }
.cntSeparator {
font-size: 54px;
margin: 10px 7px;
color: #000;
}
.desc { margin: 7px 3px; }
.desc div {
float: left;
font-family: Arial;
width: 60px;
margin-right: 85px;
font-size: 13px;
font-weight: bold;
color: #000;
}
</style>
</br>
<center><td colspan="5" align="center"><h4>Последние 20 бонусов</h4></td>
<div style="width: 630px;max-height: 600px;overflow: auto;">
<table cellpadding='3' cellspacing='0' border='0' bordercolor='#336633' align='center' width="100%" >
<tr bgcolor="#efefef">
<td style="border: 1px dashed #db8;" align="center" class="m-tb">ID</td>
<td style="border: 1px dashed #db8;" align="center" class="m-tb">Пользователь</td>
<td style="border: 1px dashed #db8;" align="center" class="m-tb">Сумма</td>
<td style="border: 1px dashed #db8;" align="center" class="m-tb">Дата</td>
</tr>
<?PHP
$db->Query("SELECT * FROM db_bonus_list ORDER BY id DESC LIMIT 20");
if($db->NumRows() > 0){
while($bon = $db->FetchArray()){
?>
<tr class="htt">
<td align="center"><?=$bon["id"]; ?></td>
<td align="center"><?=$bon["user"]; ?></td>
<td align="center"><?=$bon["sum"]; ?></td>
<td align="center"><?=date("d.m.Y",$bon["date_add"]); ?></td>
</tr>
<?PHP
}
}else echo '<tr><td align="center" colspan="5">Нет записей</td></tr>'
?>
</div>
</table>
</div>
<div class="clr"></div>
</div>