| Line 1... |
Line 1... |
| 1 |
<h1>Admin Dashboard</h1>
|
1 |
<h1>Admin Dashboard</h1>
|
| 2 |
<div id="registrations_chart_div" style="width:1200; height:300"></div>
|
2 |
<div id="registrations_chart_div" style="width:1200; height:300"></div>
|
| 3 |
<div id="clicks_chart_div" style="width:1200px; height:300px"></div>
|
3 |
<div id="clicks_chart_div" style="width:1200px; height:300px"></div>
|
| 4 |
<div id="orders_chart_div" style="width:1200px; height:300px"></div>
|
4 |
<div id="orders_chart_div" style="width:1200px; height:300px"></div>
|
| - |
|
5 |
<div id="brand_preferences_chart_div" style="width:1200px; height:300px"></div>
|
| 5 |
<div id="devices_chart_div" style="width:600px; height:300px"></div>
|
6 |
<div id="devices_chart_div" style="width:600px; height:300px"></div>
|
| 6 |
<script type="text/javascript" src="https://www.google.com/jsapi"></script>
|
7 |
<script type="text/javascript" src="https://www.google.com/jsapi"></script>
|
| 7 |
<script type="text/javascript">
|
8 |
<script type="text/javascript">
|
| 8 |
var dailysignups = [];
|
9 |
var dailysignups = [];
|
| 9 |
<?php foreach ($userbase as $key => $value):?>
|
10 |
<?php foreach ($userbase as $key => $value):?>
|
| Line 24... |
Line 25... |
| 24 |
devices.push(['Version Code','Number of Devices']);
|
25 |
devices.push(['Version Code','Number of Devices']);
|
| 25 |
<?php foreach ($devices as $key => $value):?>
|
26 |
<?php foreach ($devices as $key => $value):?>
|
| 26 |
var temp = ["<?php echo $value['devices']['versioncode'];?>" , <?php echo $value[0]['count'];?>];
|
27 |
var temp = ["<?php echo $value['devices']['versioncode'];?>" , <?php echo $value[0]['count'];?>];
|
| 27 |
devices.push(temp);
|
28 |
devices.push(temp);
|
| 28 |
<?php endforeach;?>
|
29 |
<?php endforeach;?>
|
| - |
|
30 |
var brandpreferences = [];
|
| - |
|
31 |
<?php foreach ($preferences_set as $key => $value):?>
|
| - |
|
32 |
var temp = ["<?php echo $value[0]['date'];?>" , <?php echo $value[0]['count'];?>];
|
| - |
|
33 |
brandpreferences.push(temp);
|
| - |
|
34 |
<?php endforeach;?>
|
| 29 |
|
35 |
|
| 30 |
google.load('visualization', '1', {packages: ['corechart', 'line']});
|
36 |
google.load('visualization', '1', {packages: ['corechart', 'line']});
|
| 31 |
google.setOnLoadCallback(drawBasic);
|
37 |
google.setOnLoadCallback(drawBasic);
|
| 32 |
|
38 |
|
| 33 |
function drawBasic() {
|
39 |
function drawBasic() {
|
| Line 77... |
Line 83... |
| 77 |
};
|
83 |
};
|
| 78 |
|
84 |
|
| 79 |
var chart3 = new google.visualization.LineChart(document.getElementById('orders_chart_div'));
|
85 |
var chart3 = new google.visualization.LineChart(document.getElementById('orders_chart_div'));
|
| 80 |
chart3.draw(ordersdata, options3);
|
86 |
chart3.draw(ordersdata, options3);
|
| 81 |
|
87 |
|
| - |
|
88 |
|
| - |
|
89 |
var brandpreferencesdata = new google.visualization.DataTable();
|
| - |
|
90 |
brandpreferencesdata.addColumn('date', 'Date');
|
| - |
|
91 |
brandpreferencesdata.addColumn('number', 'Brand Preferences Set');
|
| - |
|
92 |
brandpreferencesdata.addRows(dailyorders);
|
| - |
|
93 |
var options5 = {
|
| - |
|
94 |
hAxis: {
|
| - |
|
95 |
title: 'Date',
|
| - |
|
96 |
},
|
| - |
|
97 |
vAxis: {
|
| - |
|
98 |
title: 'Number of Users who set Brand Preferences'
|
| - |
|
99 |
}
|
| - |
|
100 |
};
|
| - |
|
101 |
|
| - |
|
102 |
var chart5 = new google.visualization.LineChart(document.getElementById('brand_preferences_chart_div'));
|
| - |
|
103 |
chart5.draw(brandpreferencesdata, options5);
|
| - |
|
104 |
|
| - |
|
105 |
|
| 82 |
var devicesdata = google.visualization.arrayToDataTable(devices);
|
106 |
var devicesdata = google.visualization.arrayToDataTable(devices);
|
| 83 |
var options4 = {
|
107 |
var options4 = {
|
| 84 |
title: 'Version Codes'
|
108 |
title: 'Version Codes'
|
| 85 |
};
|
109 |
};
|
| 86 |
var chart4 = new google.visualization.PieChart(document.getElementById('devices_chart_div'));
|
110 |
var chart4 = new google.visualization.PieChart(document.getElementById('devices_chart_div'));
|