*  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';
$url = required_param('url', PARAM_URL);
$withposts = optional_param('miniwithposts', false, PARAM_BOOL);
include $HUB_FLM->getCodeDirPath("ui/minislib.php");
include_once $HUB_FLM->getCodeDirPath("ui/headerminiembed.php");
?>

<script type='text/javascript'>

Event.observe(window, 'load', function() {
	loadHealthViewingData('<?php 
echo $url;
?>
', '<?php 
echo $withposts;
?>
');
});
</script>

<?php 
insertMiniHealthViewing();
?>

<?php 
include_once $HUB_FLM->getCodeDirPath("ui/footerminiembed.php");
 }
 $item = $minidata[$next - 1];
 if ($item[6] == $CFG->MINI_PAGE_USER_VIEWING) {
     insertMiniUserViewing(true);
     $loadString .= 'loadUserViewingData(\'' . $url . '\',\'' . rawurlencode($timeout) . '\', \'' . $withpostsinner . '\'); ';
 } else {
     if ($item[6] == $CFG->MINI_PAGE_USER_CONTRIBUTIONS) {
         insertMiniUserContributions(true);
         $loadString .= 'loadUserContributionData(\'' . $url . '\',\'' . rawurlencode($timeout) . '\', \'' . $withpostsinner . '\', \'false\'); ';
     } else {
         if ($item[6] == $CFG->MINI_PAGE_HEALTH_PARTICIPATION) {
             insertMiniHealthParticipation(true);
             $loadString .= 'loadHealthParticipationData(\'' . $url . '\',\'' . rawurlencode($timeout) . '\', \'' . $withpostsinner . '\'); ';
         } else {
             if ($item[6] == $CFG->MINI_PAGE_HEALTH_VIEWING) {
                 insertMiniHealthViewing(true);
                 $loadString .= 'loadHealthViewingData(\'' . $url . '\',\'' . rawurlencode($timeout) . '\', \'' . $withpostsinner . '\'); ';
             } else {
                 if ($item[6] == $CFG->MINI_PAGE_HEALTH_CONTRIBUTION) {
                     insertMiniHealthContribution(true);
                     $loadString .= 'loadHealthContributionData(\'' . $url . '\',\'' . rawurlencode($timeout) . '\', \'' . $withpostsinner . '\'); ';
                 } else {
                     if ($item[6] == $CFG->MINI_PAGE_WORD_STATS) {
                         insertMiniWordStats(true);
                         $loadString .= 'loadWordStatsData(\'' . $url . '\',\'' . rawurlencode($timeout) . '\', \'' . $withpostsinner . '\'); ';
                     }
                 }
             }
         }
     }
 }