<?php
include_once "../../../../tools/inc.php";
$page = include("../../../common.php");
$n_id=intval($n_id);

$graph_list=array();
$graph_list['total']=array(
	'SEND'	=> array (
				'title'		=> '{rs:LEGEND_TOTAL_EMAILS}',
				'color'		=> '#FF8A00',

			),
);
$graph_list['open']=array(
	'OPENED'	=> array (
				'title'		=> '{rs:LEGEND_OPEN}',
				'color'		=> '#FF8A00',

			),
);
$graph_list['unopened']=array(
	'UNOPENED'	=> array (
				'title'		=> '{rs:LEGEND_UNOPENED}',
				'color'		=> '#FF8A00',

			),
);
$graph_source=(isset($graph_list[$graph_source]) ? $graph_source : 'total');

$db->close();
$page=new Template('templates/statistics/charts/amstock/settings.tpl');
$page->dictionary("common/dict.ru");
$i=0;
foreach($graph_list[$graph_source] as $key => $graph) {
	$graph['id']=$i;
	$graph['name']=$key;
	$graph['width']=3;
	$page->addrow('GRAPH', $graph);
	$i++;
}
$page->assign(array(
	'title'		=> '',
	'short'		=> '',
	'dataUrl'	=> "topChartData.php?n_id={$n_id}&graph_source={$graph_source}",
	'scrollerData'	=> key($graph_list[$graph_source]),
));
header('Content-type: text-xml');
print $page->evaluate(false);
?>