*  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', 'shortactivity');
$nodes = $nodeSet->nodes;
$data = getUserActivityAnalysisData($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;
?>
"));
 *  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("core/embedlib.php");
$url = required_param('url', PARAM_URL);
$userurl = optional_param('userurl', '', PARAM_URL);
$langurl = optional_param('langurl', '', PARAM_URL);
$withposts = optional_param('withposts', false, PARAM_BOOL);
$timeout = optional_param('timeout', 60, PARAM_INT);
$withtitle = optional_param('withtitle', true, PARAM_BOOL);
$withdesc = optional_param('withdesc', true, PARAM_BOOL);
$dashboard = optional_param('dashboard', false, PARAM_BOOL);
$data = getUserActivityAnalysisData($url, $timeout, $withposts);
if ($dashboard == true) {
    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();
NODE_ARGS['data'] = <?php 
echo json_encode($data);
?>
;
NODE_ARGS['userurl'] = '<?php 
echo $userurl;