*  are disclaimed. In no event shall the copyright owner or contributors be    *
 *  liable for any direct, indirect, incidental, special, exemplary, or         *
 *  consequential damages (including, but not limited to, procurement of        *
 *  substitute goods or services; loss of use, data, or profits; or business    *
 *  interruption) however caused and on any theory of liability, whether in     *
 *  contract, strict liability, or tort (including negligence or otherwise)     *
 *  arising in any way out of the use of this software, even if advised of the  *
 *  possibility of such damage.                                                 *
 *                                                                              *
 ********************************************************************************/
/** Author: Michelle Bachler, KMi, The Open University **/
require_once $_SERVER['DOCUMENT_ROOT'] . '/config.php';
require_once $HUB_FLM->getCodeDirPath("ui/headerstats.php");
$nodeset = getNodesByGlobal(0, -1, 'date', 'ASC', 'Map,Challenge,Issue,Solution,Pro,Con,Argument,Idea', 'shortactivity');
$nodes = $nodeset->nodes;
$data = getActivityAnalysisData($nodes);
?>
<script type='text/javascript'>
var NODE_ARGS = new Array();

Event.observe(window, 'load', function() {
	NODE_ARGS['data'] = <?php 
echo json_encode($data);
?>
;
	$('messagearea').update(getLoadingLine("<?php 
echo $LNG->LOADING_DATA;
?>
"));

	var data = NODE_ARGS['data'];
 *  arising in any way out of the use of this software, even if advised of the  *
 *  possibility of such damage.                                                 *
 *                                                                              *
 ********************************************************************************/
/** Author: Michelle Bachler, KMi, The Open University **/
require_once $_SERVER['DOCUMENT_ROOT'] . '/config.php';
// override lang if supplied.
$langurl = optional_param('langurl', '', PARAM_URL);
if ($langurl != '') {
    overrideLanguageCore($langurl);
}
require_once $HUB_FLM->getCodeDirPath("core/embedlib.php");
$url = required_param('url', PARAM_URL);
$withposts = optional_param('withposts', false, PARAM_BOOL);
$timeout = optional_param('timeout', 60, PARAM_INT);
$data = getActivityAnalysisData($url, $timeout, $withposts);
$withtitle = optional_param('withtitle', true, PARAM_BOOL);
$withdesc = optional_param('withdesc', true, PARAM_BOOL);
$dashboard = optional_param('dashboard', false, PARAM_BOOL);
if ($dashboard) {
    include_once $HUB_FLM->getCodeDirPath("ui/headerdashboard.php");
} else {
    include_once $HUB_FLM->getCodeDirPath("ui/headerembed.php");
}
?>
<script type='text/javascript'>
var NODE_ARGS = new Array();

Event.observe(window, 'load', function() {
	NODE_ARGS['data'] = <?php 
echo json_encode($data);