function charts_graphs_amcharts_get_data in Charts and Graphs 6.2
Same name and namespace in other branches
- 7 apis/charts_graphs_amcharts/charts_graphs_amcharts.module \charts_graphs_amcharts_get_data()
1 string reference to 'charts_graphs_amcharts_get_data'
- charts_graphs_amcharts_menu in apis/
charts_graphs_amcharts/ charts_graphs_amcharts.module
File
- apis/
charts_graphs_amcharts/ charts_graphs_amcharts.module, line 51 - drupal module file implementing amcharts.
Code
function charts_graphs_amcharts_get_data() {
$cid = check_plain($_GET['cid']);
$op = check_plain(arg(2));
if ($op != 'settings' && $op != 'data') {
drupal_not_found();
exit;
}
$cache = cache_get($cid);
if (!$cache || empty($cache->data)) {
drupal_not_found();
exit;
}
$obj = $cache->data;
$ret = $obj->{$op};
drupal_set_header('Content-Type: text/xml; charset=utf-8');
print $ret;
exit;
}