Размер файла: 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>Ваши pефералы</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> [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)."\">Назад</a>";
}
if($count1>$start+5)
{
print "<a href=\"vreferal.php?start=".($start+5)."\"><br/>Далее</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/>
••••••••••<br/>
<a href="index.php">Управление аккаунтом</a> <br/>
<br/>
</small> </p>
</card>
</wml>