session_start();
if(!$_SESSION['uid'] && !$_SESSION['maximumrow']){
header("Location: index.php?page=login");
}else{
include("../include/connectdb.php");
?>
Banner Stat
$sql = "select * from banner where id='".$_GET['id']."' and memberid='".$_SESSION['uid']."'";
$result = mysql_query($sql);
$rowdata = mysql_fetch_array($result);
$totalview = 0;
$totalclick = 0;
?>
if($_GET["view"]==""){?>
Total |
Month |
Pageview |
Click |
$sql = "SELECT year, month, sum(click) as sumclick,sum(pageview) as sumpageview
FROM bannerstat where bannerid='".$rowdata['id']."'
group by year, month";
$result = mysql_query($sql);
while($statdata = mysql_fetch_array($result)){
$totalview = $totalview + $statdata['sumpageview'];
$totalclick = $totalclick + $statdata['sumclick'];
?>
|
0 |
0 |
} ?>
} else if($_GET["view"]=="month"){?>
Start for December |
Date |
Pageview |
Click |
$sql = "SELECT day ,year, month, sum(click) as sumclick,sum(pageview) as sumpageview
FROM bannerstat where bannerid='".$rowdata['id']."' and year='".$_GET['year']."' and month='".$_GET['month']."'
group by year, month, day";
$result = mysql_query($sql);
while($statdata = mysql_fetch_array($result)){
$totalview = $totalview + $statdata['sumpageview'];
$totalclick = $totalclick + $statdata['sumclick'];
?>
|
0 |
0 |
} ?>
} else if($_GET["view"]=="day"){?>
Start for December |
ชั่วโมงที่ |
Pageview |
Click |
$sql = "SELECT hour, day, year, month, click, pageview
FROM bannerstat where bannerid='".$rowdata['id']."' and year='".$_GET['year']."' and month='".$_GET['month']."' and day='".$_GET['day']."'
order by year, month, day, hour";
$result = mysql_query($sql);
while($statdata = mysql_fetch_array($result)){
$totalview = $totalview + $statdata['pageview'];
$totalclick = $totalclick + $statdata['click'];
?>
|
0 |
0 |
} ?>
} ?>
รวม |
0 |
0 |
View All Stat
include("include/closedb.php");
}
?>