Просмотр файла banners.ru/www/users/vreferal.php

Размер файла: 2.89Kb
<?
error_reporting(E_ALL ^ E_NOTICE);            //<--
session_start();
require ('../data/config.php');
require ('../data/mysql.php');
require ('../data/functions.php');
if (!authenticateUser( $cookie_user, $cookie_passwd))
        {
        header("Location:/index.php?err=falce");
        exit();
        }
header ("Content-type:text/vnd.wap.wml; charset=utf-8");
print '<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN"
"http://www.wapforum.org/DTD/wml_1.1.xml">
<wml>'; ?>
<card title="<?print "$site_title";?>">
<p>
<?require ('../html/up_user.php');?>

<small><b>&#x0412;&#x0430;&#x0448;&#x0438; p&#x0435;&#x0444;&#x0435;&#x0440;&#x0430;&#x043B;&#x044B;</b>: <br/>

<?
$result= mysql_query("SELECT * FROM accounts WHERE user_login='$cookie_user'");
$row = mysql_fetch_array($result);

$today=time()-86400;
$i=1;
$result= mysql_query("SELECT * FROM accounts WHERE status=1 and referal= '$row[id]'");
//while ($row = mysql_fetch_array($result))

  $i=mysql_num_rows($result);
///////////////////////////////
while ($data=mysql_fetch_array($result))
{
if($cid==$data['id']) $start=count($chid);
$chid[] = $data['id'];
$name[] = $data['name_site'];
$url[] = $data['url'];

}
     $count=$i;
$count1=$count;
if(empty($start))
$start=0;
$start=intval($start);
if($start<0)
$start=0;
if($count>$start+5) $count=$start+5;
$name=str_replace("http://","",$name);


for($i=$start;$i<$count;$i++)
{
$pr_count = mysql_query("SELECT count(*) FROM `accounts` WHERE id='".$chid[$i]."';");
$pdc = mysql_fetch_array($pr_count);
$resul= mysql_query("SELECT * FROM stat WHERE id_account='$chid[$i]' AND action='view' AND date>='$today'");

$n=$i+1;
if(5%$i!=0||$i==1) $br="";
print "$n.<b><a href=\"$url[$i]\">$name[$i]</a></b>&nbsp;[id=$chid[$i]]";
print "<br/>";
$tu=mysql_num_rows($resul);
print "показов за последние 24 часа: $tu";
echo "";
print "<br/>";
}
if($start!=0)
{
print "<br/><a href=\"vreferal.php?start=".($start-5)."\">&#x41D;&#x430;&#x437;&#x430;&#x434;</a>";
}
if($count1>$start+5)
{
print "<a href=\"vreferal.php?start=".($start+5)."\"><br/>&#x414;&#x430;&#x43B;&#x435;&#x435;</a>";
}

      /*  {
        print "$i. <a href=\"$row[url]\" target=\"_blank\">$row[name_site]</a> [" ;
        $resul= mysql_query("SELECT * FROM stat WHERE id_account='$row[id]' AND action='view' AND date>='$today'");
        print mysql_num_rows($resul);
        print "]<br/>";
        $i++;
        }   */
     //[x] - количество показов за последние 24 часа
?>
  <br/>




&#8226;&#8226;&#8226;&#8226;&#8226;&#8226;&#8226;&#8226;&#8226;&#8226;<br/>
 <a href="index.php">&#x0423;&#x043F;&#x0440;&#x0430;&#x0432;&#x043B;&#x0435;&#x043D;&#x0438;&#x0435; &#x0430;&#x043A;&#x043A;&#x0430;&#x0443;&#x043D;&#x0442;&#x043E;&#x043C;</a> <br/>
 <br/>
   </small>    </p>
</card>
</wml>