-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvisitors.php
executable file
·54 lines (45 loc) · 1.51 KB
/
visitors.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
<?php
include("header.php");
$_SESSION['returnPage'] = $_SERVER['PHP_SELF']."?".$_SERVER['QUERY_STRING'];
?>
<div id="xsnazzy">
<b class="xtop"><b class="xb1"></b><b class="xb2"></b><b class="xb3"></b><b class="xb4"></b></b>
<div class="xboxcontent" style="text-align:center">
<p> </p>
<a href="/ntscout.php">NT Scouter</a> | <a href="/visitors.php">Visitor Breakdown</a> | <a href="/world.php">World View</a>
<p> </p>
</div>
<b class="xbottom"><b class="xb4"></b><b class="xb3"></b><b class="xb2"></b><b class="xb1"></b></b>
</div>
<?
require_once('./scripts/charts/maxChart.class.php');
if($_SESSION['logged']!=1)
{
$mysqli = new mysqli('DATABASE SERVER','DATABASE USERNAME','DATABASE PASSWORD','DATABASE NAME');
$mysqli->set_charset("utf8");
$query="SELECT SUM(last)/last AS count, country FROM user_tracking GROUP BY country";
$items = $mysqli->query($query) or die("Visit Check Failed!");
while($return = mysqli_fetch_array($items))
{
$data[$return['country']] = $return['count'];
}
}
?>
<style>
<? include("scripts/charts/style/style.css"); ?>
</style>
<div id="xsnazzy">
<b class="xtop"><b class="xb1"></b><b class="xb2"></b><b class="xb3"></b><b class="xb4"></b></b>
<div class="xboxcontent">
<p> </p>
<?
$mc = new maxChart($data);
$mc->displayChart('Visitors by Country',0,600,1000,true);
?>
<p> </p>
</div>
<b class="xbottom"><b class="xb4"></b><b class="xb3"></b><b class="xb2"></b><b class="xb1"></b></b>
</div>
<?
include("footer.php");
?>