예제 #1
0
	
	$visitsSummary->addSpacer();
	$visitsSummary->renderStatsData(array($lang->get("when", "When"), $lang->get("visits")));
	$form->add($visitsSummary);
	
	$form->add(new StatsDiagram($lang->get("ret_vis", "Returning visitors"), "visitors,nxone_time_visitors,nxreturning_visitors", array($lang->get("visitors"), $lang->get("vis_first", "First time visitors"), $lang->get("vis_ret", "Returning visitors"))));
	$retSummary = new StatsSummary($lang->get("ret_vis"), "visitors", 3);
	$retSummary->addField($lang->get("visitors"), phpOpenTracker::get(array_merge(array('api_call' =>'visitors'), $rangeArray )));
	$retSummary->addField($lang->get("vis_first", "First time visitors"), phpOpenTracker::get(array_merge(array('api_call' =>'nxone_time_visitors'), $rangeArray )));
	$retSummary->addField($lang->get("vis_ret"), phpOpenTracker::get(array_merge(array('api_call' =>'nxreturning_visitors'), $rangeArray )));
	$retSummary->addField($lang->get("time_betw_visits", "Average time between visits"), (date('m', phpOpenTracker::get(array_merge(array('api_call' =>'nxavg_time_between_visits'), $rangeArray )))-1)." months ".
		date('d', phpOpenTracker::get(array_merge(array('api_call' =>'nxavg_time_between_visits'), $rangeArray )))." days");
	$retSummary->addField($lang->get("vis_per_vis", "Average visits per visitor"), sprintf("%01.2f", phpOpenTracker::get(array_merge(array('api_call' =>'nxavg_visits'), $rangeArray ))));
	$form->add($retSummary);
	
	$form->add(new StatsDiagram($lang->get("avg_vis_length", "Average visit length (seconds)"), "avg_visit_length", array($lang->get("avg_vis_length", "Average visit length (seconds)"))));
	$vls = new StatsSummary($lang->get("avg_vis_length"), "avg_visit_length", 3);
	$vls->addField($lang->get("minimum"), date('i:s', $vls->minTs[1]).' min');
	$vls->addField($lang->get("maximum"), date('i:s', $vls->maxTs[1]).' min');
	$form->add($vls);
	
	$form->add(new StatsDiagram($lang->get("avg_clickstream", "Average clickstream"), "avg_clickstream", array($lang->get("avg_clickstream", "Average clickstream"))));
	$clickstreamSummary = new StatsSummary($lang->get("avg_clickstream"), "avg_clickstream", 3);
	$clickstreamSummary->setMinimumFields();
	$form->add($clickstreamSummary);
	
	$page->addMenu($menu);
	$page->add($form);
	$page->draw();

?>
예제 #2
0
        $auth = new auth("TRAFFIC");
        require_once "statsinit.php";
        
	$form->add(new AlignedLabel("lbl", '<h2>'.$lang->get("weekday_as", "Weekday Analysis").'</h2>', "center","", 3));
	$rangeArray = $statsinfo->getRangeArray();
	unset($rangeArray['interval']);
	
	$form->add(new StatsDiagram($lang->get("visits", "Visits"), "nxweekdays:visits", array($lang->get("visits"))));
	$visitsSummary = new StatsSummary($lang->get("visits_overview"), "nxweekdays:visits", 3);
	$visitsSummary->setMinimumFields();
	$visitsSummary->addSpacer();
	$visitsSummary->renderStatsData(array($lang->get("when"), $lang->get("visits")));
	$form->add($visitsSummary);
	
	$form->add(new StatsDiagram($lang->get("pi_overview"), "nxweekdays:pi", array($lang->get("pi"))));
	$pi = new StatsSummary($lang->get("pi_overview"), "nxweekdays:pi", 3);
	$pi->setMinimumFields();
	$pi->addSpacer();
	$pi->renderStatsData(array($lang->get("when"), $lang->get("pi")));
	$form->add($pi);
	
	$form->add(new StatsDiagram($lang->get("avg_clickstream"), "nxweekdays:avg_clickstream", array($lang->get("avg_clickstream"))));
	$clkstream = new StatsSummary($lang->get("avg_clickstream"), "nxweekdays:avg_clickstream", 3);
	$clkstream->setMinimumFields();
	$form->add($clkstream);
	
	$page->addMenu($menu);
	$page->add($form);
	$page->draw();

?>