if ($_SESSION["user_type"] == 'admin'){ ?>
On Air VOD : Recent 1 Month
$query = "select count(*) as count from stats_vodview b inner join vod a on b.vod_id=a.vod_id
where b.access_date>=date_add(now(), interval -1 month) and a.show_date > '2000-01-01' limit 1";
$result = mysql_query($query, $conn);
$row=mysql_fetch_array($result);
$total = $row['count'];
$query = "select a.owner, count(*) as count from stats_vodview b inner join vod a on b.vod_id=a.vod_id
where b.access_date>=date_add(now(), interval -1 month) and a.show_date > '2000-01-01' group by a.owner order by count DESC";
$result = mysql_query($query, $conn);
//echo $query;
$owner_num = mysql_num_rows($result);
$i=1;
while($row=mysql_fetch_array($result)){
if($i==1) $max=$row['count'];
$graph = (int)(($row['count']*150) / $max);
if($graph==0) $graph = 1;
$percentage = round((($row['count'] / $total ) * 100), 2);
echo "";
echo "| ".$i++." | ";
echo "".$row[0]." | ";
echo "Click | ";
echo "";
echo " | ".$percentage."% (".$row['count'].") | ";
echo " | ";
echo " ";
}
?>
On Air VOD : Monthly Rank
$query = "select date_format(a.access_date, '%Y-%m') as s_month, count(*) as count from stats_vodview a inner join vod b on a.vod_id=b.vod_id
where b.show_date > '2000-01-01' group by s_month order by s_month DESC limit 12";
$result = mysql_query($query, $conn);
while($row=mysql_fetch_array($result)){
echo "";
echo "| ".$row[0]." | ";
if($owner_num > 1 )
echo "Click | ";
else
echo "Click | ";
if ($_SESSION["user_type"] == 'admin') echo "".number_format($row[1])." | ";
echo " ";
}
?>
|
} ?>
Encore VOD : PAID Contents Recent 1 Month
$query = "select count(*) as count from stats_vodview as a left join vod b on b.vod_id=a.vod_id
left join genre c on b.gen_id=c.gen_id
where a.access_date>=date_add(now(), interval -1 month)
and b.show_date ='0000-00-00'
and c.category='TV' and b.price_id_1>1 limit 1";
$result = mysql_query($query, $conn);
$row=mysql_fetch_array($result);
$total = $row['count'];
$query = "select b.owner, count(*) as count from stats_vodview as a left join vod b on b.vod_id=a.vod_id
left join genre c on b.gen_id=c.gen_id
where a.access_date>=date_add(now(), interval -1 month)
and b.show_date ='0000-00-00' and b.price_id_1>1
and c.category='TV' group by b.owner order by count DESC";
$result = mysql_query($query, $conn);
//echo $query;
$owner_num = mysql_num_rows($result);
$i=1;
while($row=mysql_fetch_array($result)){
if($i==1) $max=$row['count'];
$graph = (int)(($row['count']*150) / $max);
if($graph==0) $graph = 1;
$percentage = round((($row['count'] / $total ) * 100), 2);
echo "";
echo "| ".$i++." | ";
echo "".$row[0]." | ";
echo "Click | ";
echo "";
echo " | ".$percentage."% (".$row['count'].") | ";
echo " | ";
echo " ";
}
?>
Encore VOD : Free Contents Recent 1 Month
$query = "select count(*) as count from stats_vodview as a left join vod b on b.vod_id=a.vod_id
left join genre c on b.gen_id=c.gen_id
where a.access_date>=date_add(now(), interval -1 month)
and b.show_date ='0000-00-00'
and c.category='TV' and b.price_id_1=1 limit 1";
$result = mysql_query($query, $conn);
$row=mysql_fetch_array($result);
$total = $row['count'];
$query = "select b.owner, count(*) as count from stats_vodview as a left join vod b on b.vod_id=a.vod_id
left join genre c on b.gen_id=c.gen_id
where a.access_date>=date_add(now(), interval -1 month)
and b.show_date ='0000-00-00' and b.price_id_1=1
and c.category='TV' group by b.owner order by count DESC";
$result = mysql_query($query, $conn);
//echo $query;
$owner_num = mysql_num_rows($result);
$i=1;
while($row=mysql_fetch_array($result)){
if($i==1) $max=$row['count'];
$graph = (int)(($row['count']*150) / $max);
if($graph==0) $graph = 1;
$percentage = round((($row['count'] / $total ) * 100), 2);
echo "";
echo "| ".$i++." | ";
echo "".$row[0]." | ";
echo "Click | ";
echo "";
echo " | ".$percentage."% (".$row['count'].") | ";
echo " | ";
echo " ";
}
?>
Encore VOD : Monthly Rank
$query = "select date_format(a.access_date, '%Y-%m') as s_month, count(*) as count from stats_vodview as a left join vod b on b.vod_id=a.vod_id
left join genre c on b.gen_id=c.gen_id
where b.show_date ='0000-00-00' and b.price_id_1>1
and c.category='TV' group by s_month order by s_month DESC limit 12";
$result = mysql_query($query, $conn);
while($row=mysql_fetch_array($result)){
echo "";
echo "| ".$row[0]." | ";
if($owner_num > 1 )
echo "Click | ";
else
echo "Click | ";
if ($_SESSION["user_type"] == 'admin') echo "".number_format($row[1])." | ";
echo " ";
}
?>
|
Movie : Recent 1 Month
$query = "select count(*) as count from stats_vodview as a left join vod b on b.vod_id=a.vod_id
left join genre c on b.gen_id=c.gen_id
where a.access_date>=date_add(now(), interval -1 month)
and b.show_date ='0000-00-00'
and c.category='Movie' limit 1";
$result = mysql_query($query, $conn);
$row=mysql_fetch_array($result);
$total = $row['count'];
$query = "select b.owner, count(*) as count from stats_vodview as a left join vod b on b.vod_id=a.vod_id
left join genre c on b.gen_id=c.gen_id
where a.access_date>=date_add(now(), interval -1 month)
and b.show_date ='0000-00-00'
and c.category='Movie' group by b.owner order by count DESC";
$result = mysql_query($query, $conn);
//echo $query;
$owner_num = mysql_num_rows($result);
$i=1;
while($row=mysql_fetch_array($result)){
if($i==1) $max=$row['count'];
$owner = $row[0];
$graph = (int)(($row['count']*150) / $max);
if($graph==0) $graph = 1;
$percentage = round((($row['count'] / $total ) * 100), 2);
echo "";
echo "| ".$i++." | ";
echo "".$row[0]." | ";
echo "Click | ";
echo "";
echo " | ".$percentage."% (".$row['count'].") | ";
echo " | ";
echo " ";
}
?>
if($owner_num > 1 ) echo "Movie : Monthly Rank";
else echo "Movie : Monthly Detail";
?>
$query = "select date_format(a.access_date, '%Y-%m') as s_month, count(*) as count from stats_vodview as a left join vod b on b.vod_id=a.vod_id
left join genre c on b.gen_id=c.gen_id
where b.show_date ='0000-00-00'
and c.category='Movie' group by s_month order by s_month DESC limit 12";
$result = mysql_query($query, $conn);
while($row=mysql_fetch_array($result)){
echo "";
echo "| ".$row[0]." | ";
if($owner_num > 1 )
echo "Click | ";
else
echo "Click | ";
if ($_SESSION["user_type"] == 'admin') echo "".number_format($row[1])." | ";
echo " ";
}
?>
|
Go Game : Recent 1 Month
$query = "select count(*) as count from stats_vodview as a left join vod b on b.vod_id=a.vod_id
left join genre c on b.gen_id=c.gen_id
where a.access_date>=date_add(now(), interval -1 month)
and b.show_date ='0000-00-00'
and c.category='Gogame' limit 1";
$result = mysql_query($query, $conn);
$row=mysql_fetch_array($result);
$total = $row['count'];
$query = "select b.owner, count(*) as count from stats_vodview as a left join vod b on b.vod_id=a.vod_id
left join genre c on b.gen_id=c.gen_id
where a.access_date>=date_add(now(), interval -1 month)
and b.show_date ='0000-00-00'
and c.category='Gogame' group by b.owner order by count DESC";
$result = mysql_query($query, $conn);
//echo $query;
$owner_num = mysql_num_rows($result);
$i=1;
while($row=mysql_fetch_array($result)){
if($i==1) $max=$row['count'];
$owner = $row[0];
$graph = (int)(($row['count']*150) / $max);
if($graph==0) $graph = 1;
$percentage = round((($row['count'] / $total ) * 100), 2);
echo "";
echo "| ".$i++." | ";
echo "".$row[0]." | ";
echo "Click | ";
echo "";
echo " | ".$percentage."% (".$row['count'].") | ";
echo " | ";
echo " ";
}
?>
if($owner_num > 1 ) echo "Go Game : Monthly Rank";
else echo "Go Game : Monthly Detail";
?>
$query = "select date_format(a.access_date, '%Y-%m') as s_month, count(*) as count from stats_vodview as a left join vod b on b.vod_id=a.vod_id
left join genre c on b.gen_id=c.gen_id
where b.show_date ='0000-00-00'
and c.category='Gogame' group by s_month order by s_month DESC limit 12";
$result = mysql_query($query, $conn);
while($row=mysql_fetch_array($result)){
echo "";
echo "| ".$row[0]." | ";
if($owner_num > 1 )
echo "Click | ";
else
echo "Click | ";
if ($_SESSION["user_type"] == 'admin') echo "".number_format($row[1])." | ";
echo " ";
}
?>
|