-
Notifications
You must be signed in to change notification settings - Fork 13
/
ajax.data.facebook2.php
59 lines (50 loc) · 1.7 KB
/
ajax.data.facebook2.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
55
56
57
58
59
<?
require_once('inc/db.php');
$profileId = 0;
if (isset($_REQUEST['profileId'])) {
$profileId = $_REQUEST['profileId'];
}
$startDate = '';
if (isset($_REQUEST['startDate'])) {
$startDate = $_REQUEST['startDate'];
}
$endDate = '';
if (isset($_REQUEST['endDate'])) {
$endDate = $_REQUEST['endDate'];
}
$interval = '';
if (isset($_REQUEST['interval'])) {
$interval = $_REQUEST['interval'];
}
$stats = getFacebookStat($profileId, $startDate, $endDate, $interval);
?>
<chart caption='Facebook Fans & Unsubscription' lineThickness='4' showValues='0' anchorRadius='4' anchorBgAlpha='50' showAlternateVGridColor='1' animation='1' scrollToEnd='1' showLegend='1' chartTopMargin='5' chartBottomMargin='10' chartLeftMargin='5' chartRightMargin='10' captionPadding='5' palette='3' setAdaptiveYMin='1' baseFontSize='9' baseFont='Lucida Grande, Arial' valuePadding='5' connectNullData='1'>
<categories >
<? for ($i = 0; $i < sizeof($stats); $i++) { ?>
<category label='<?=$stats[$i]['period']?>' />
<? } ?>
</categories>
<dataset seriesName='Unsubscription' color='6666FF'>
<? for ($i = 0; $i < sizeof($stats); $i++) { ?>
<set value='<?=emptyIfZero(round($stats[$i]['unsubscribe']))?>' />
<? } ?>
</dataset>
<dataset seriesName='Fans'>
<? for ($i = 0; $i < sizeof($stats); $i++) { ?>
<set value='<?=emptyIfZero(round($stats[$i]['fans']))?>' />
<? } ?>
</dataset>
<!--
<trendlines>
<line startValue='2000' color='91C728' displayValue='Target' showOnTop='0'/>
</trendlines>
-->
<styles>
<definition>
<style name='CaptionStyle' type='font' font='Lucida Grande, Arial' size='12'/>
</definition>
<application>
<apply toObject='Caption' styles='CaptionStyle' />
</application>
</styles>
</chart>