Файл: pages/_serfing.php
Строк: 234
<?php
$pagetitle="Просмотр сайтов";
?>
<link rel="stylesheet" href="seo.css" type="text/css">
<script type="text/javascript" src="/scripts/showhide.js"></script>
<script type="text/javascript" language="JavaScript">
var elem = null;
var oldelem = null;
function hideserfcompblock(bid) {
elem = document.getElementById('comp'+bid);
if (elem.style.display == 'none') {
document.forms['comp'].compadsid.value = bid;
elem.style.display = '';
if (oldelem != null) {
oldelem.style.display = 'none';
}
oldelem = elem;
} else {
elem.style.display = 'none';
oldelem = null;
}
return false;
}
function goserf(eid)
{
document.cookie="viewserf="+eid;
document.getElementById("adstatus"+eid).className = 'serfimggo';
return false;
}
</script>
<center><script type="text/javascript" src="/scripts/showhide.js"></script>
<div align="left"><span style="font-weight: bold"> <u><i>Серфинг - на eco - game:</i></u></span><?php //include('includes/statlink.php');
?></div><br /></center>
<?php
$sd=date("d.m.Y",time()); $vd=date("d.m.Y",time()-24*3600); $s=0; $v=0;
$db->Query("SELECT * FROM wm_adsdate WHERE data='$sd'");
$res = $db->FetchRow();
if($res["kolvo"]!='') {$s=$res["kolvo"];}
$db->Query("SELECT * FROM wm_adsdate WHERE data='$vd'");
$res = $db->FetchRow();
if($res["kolvo"]!='') {$v=$res["kolvo"];}
?>
<a name="top"></a>
<h1>Здесь зарабатывают на просмотре сайтов</h1>
<h2>Зарабатывай, просматривая сайты рекламодателей</h2>
<br></br>
<?php
function GET_DOMAIN($url) {
$parts = parse_url($url);
$host = $parts['host'];
return $host;
}
?>
<form onclick="this.style.display='none'" ><table class="work-serf" border="0" cellpadding="0" cellspacing="0" width="100%"><tbody><tr><?
function format_serft($i, $a, $t, $v, $p, $h, $u, $d, $m, $o, $cl, $content){
if($a>0) { $active = '<span id="adstatus5723" class="serfimghigh"></span>'; }else{ $active='<span id="adstatus5723" class="serfimg"></span>'; }
?>
<form onclick="this.style.display='none'"><table class="work-serf" border="0" cellpadding="0" cellspacing="0" width="100%"><tbody><tr><td class="normal" valign="top" width="40">
<? echo $active; ?>
</td><td class="normal" valign="top">
<?
$time="0";
$crok1 = date(time());
$crok2 = date($time + (24 * 60 * 60));
$cr=date("H:i",$crok2);
$os=$crok2 - $crok1 - (3 * 60 * 60);
$ost=date("H:i:s",$os);
if($crok1 >= $crok2) { $block=0; }else{ $block=1; }
if($block!=1)
{
$symbolsdesc=strlen($d);
if($symbolsdesc>25)
{
$sdesc=$symbolsdesc-5;
$startbut=rand(5,$sdesc);
}else{
$sdesc=$symbolsdesc-3;
$startbut=rand(0,$sdesc);
}
//$d= iconv("utf-8","windows-1251",$d);
$newdesc=substr($d,0,$startbut);
$newdesc.='<a class="serfgo" href="view_sites.php?id='.$i.'&cap=1&scode='.md5(date("H")).'" title="" target="_blank" onclick="javascript:goserf($i);">';
$endbut=$startbut+3;
$frees=substr($d,$startbut,3);
$other=substr($d,$endbut);
$newdesc.="$frees</a>$other";
//$newdesc= iconv("windows-1251","utf-8",$newdesc);
}else{
}
if(!$v){
echo $v;?><?=$newdesc; ?>
<?
}else {
echo 'Ссылка просмотрена'; // просмотренная ссылка //
}
?>
<br><span class="desctext"></span><div id="comp5723" class="addcomplaintblock" style="display: none;">Что не так в этой ссылке? Вирусы? Порнография? Разрушение таймера?<br><input name="comptext5723" maxlength="80" value="" type="text"><input class="complaintbutton" value="Отправить" type="submit"></div></td><td class="normal" style="width: 60px; text-align: right; padding-right: 10px;" nowrap="nowrap" valign="top"><span class="smoolgray" title="Осталось визитов">(<? echo $p-$m; ?>)</span> <span class="clickprice">
<?
$cena_nax = $t*0.001;
if($a==1){
echo $cena_nax+0.005;
}
elseif($t<20)
{
echo '0.012';
}
else
{
echo $cena_nax;
}
?>
</span><span class="clickprice"></span><a class="workcomp" title="Скрыть" onclick="javascript:hideserfcompblock(5723);"></a>
<? echo '
<a class="workvir" href="http://online.us.drweb.com/result/?url=http://'.GET_DOMAIN($u).'" title="Проверить ссылку на вирусы" target="_blank"></a>'; ?>
</td></tr></tbody></table></form>
<?
}
function format_psevdo($i, $h, $u, $d, $m, $o) { ?>
<form name="comp"><table class="work-serf" border="0" cellpadding="0" cellspacing="0" width="100%"><tbody><tr><td class="normal" valign="top" width="40"><span id="adstatus5723" class="serfimgsys"></span></td><td class="normal" valign="top"><?
if($h=="1") {$stillinks='class="blocks2"';}else{$stillinks='class="blocks1"';}
echo '<a onclick="javascript: this.style.textDecoration='line-through';" href="viewp_sites.php?id='.$i.'" '.$stillinks.' target="_blank">'.$d.'</a>';
?></div></td></tr></tbody></table></form><?
}
if(isset($_SESSION["user"]))
{
$username = $_SESSION["user"];
$db->Query("SELECT `ident` FROM `wm_ads_visits` WHERE `tipo`='visit' AND `user`='{$username}' AND `visitime`>=UNIX_TIMESTAMP()-24*60*60");
if($db->NumRows() > 0){
// if(mysql_num_rows($sql) > 0){
while($row = $db->FetchArray())
//while($row = mysql_fetch_assoc($sql))
$visited[($row['ident'])] = true;
}else $visited = array();
}
$db->Query("SELECT id,active,timer,plan,color,url,description,members,outside,claims,content FROM `wm_ads` WHERE status='pay' AND category='0' ORDER BY id DESC");
if($db->NumRows() > 0){
//echo '<br><br><center><span style="color:#ff0000;"><b>VIP реклама</b></span></center>';
while($links_row = $db->FetchArray()) {
if(isset($visited[($links_row['id'])])) $is_visited = true;
else $is_visited = false;
format_serft(
$links_row['id'], // id
$links_row['active'], // active
$links_row['timer'], // timer
$is_visited, // is visited
$links_row['plan'], // plan
$links_row['color'], // highlight
$links_row['url'], // url
$links_row['description'], // description
$links_row['members'], // members
$links_row['outside'], // outside
$links_row['claims'], // claims
$links_row['content']
);
}
}else{
echo "";
}
$db->Query("SELECT id,active,timer,plan,color,url,description,members,outside,claims,content FROM `wm_ads` WHERE status='pay' AND category='1' ORDER BY id DESC");
if($db->NumRows() > 0){
//echo '<center><span style="color:#ff0000;"><b>Обычная реклама</b></span></center>';
while($links_row = $db->FetchArray()) {
if(isset($visited[($links_row['id'])])) $is_visited = true;
else $is_visited = false;
format_serft(
$links_row['id'], // id
$links_row['active'], // active
$links_row['timer'], // timer
$is_visited, // is visited
$links_row['plan'], // plan
$links_row['color'], // highlight
$links_row['url'], // url
$links_row['description'], // description
$links_row['members'], // members
$links_row['outside'], // outside
$links_row['claims'], // claims
$links_row['content']
);
}
}else{
echo "";
}
$db->Query("SELECT id,active,timer,plan,color,url,description,members,outside,claims,content FROM `wm_ads` WHERE status='pay' AND category='2' ORDER BY id DESC");
if($db->NumRows() > 0){
echo '<center><span style="color:#ff0000;"><b>Мини реклама</b></span></center>';
while($links_row = $db->FetchArray()) {
if(isset($visited[($links_row['id'])])) $is_visited = true;
else $is_visited = false;
format_serft(
$links_row['id'], // id
$links_row['active'], // active
$links_row['timer'], // timer
$is_visited, // is visited
$links_row['plan'], // plan
$links_row['color'], // highlight
$links_row['url'], // url
$links_row['description'], // description
$links_row['members'], // members
$links_row['outside'], // outside
$links_row['claims'], // claims
$links_row['content']
);
}
}else{
echo "";
}
echo '<div align="center">';
echo '</div>';
/*
$db->Query("SELECT `id`, `highlight`, `url`, `description`, `members`, `outside` FROM `wm_ads_psevdo` WHERE `status`='pay' ORDER BY id DESC");
if($db->NumRows() > 0){
echo '<br><h2>Псевдодинамические ссылки (не оплачиваются)</h2>';
while($links_row = $db->FetchArray()) {
format_psevdo(
$links_row['id'], // id
$links_row['highlight'], // highlight
$links_row['url'], // url
$links_row['description'], // description
$links_row['members'], // members
$links_row['outside'] // outside
);
}
}else
{
echo "";
}
*/
?>
<br></br><br></br><br></br><br></br>
<div align="center"><?php
//include('includes/banner.php');
?></div>
<?php
?>