<?php

if (!defined('XOOPS_ROOT_PATH')) exit();

require_once XOOPS_MODULE_PATH . "/base/class/PageNavigator.class.php";
require_once XOOPS_MODULE_PATH . "/base/class/AbstractListAction.class.php";
require_once XOOPS_MODULE_PATH . "/base/forms/OnlineFilterForm.class.php";

class Legacy_OnlineAction extends Legacy_AbstractListAction
{
	function &_getHandler()
	{
		$handler =& xoops_getmodulehandler('online', 'base');
		return $handler;
	}

	function &_getFilterForm(&$navi)
	{
		$filter =& new Legacy_OnlineFilterForm($navi);
		return $filter;
	}

	function _getBaseUrl()
	{
		return "./index.php?type=Online";
	}

	function executeViewIndex(&$controller, &$xoopsUser, &$render)
	{
		$render->setTemplateName("legacy_misc_online.html");
		
		foreach (array_keys($this->mObjects) as $key) {
			$this->mObjects[$key]->loadModule();
		}
		
		$render->setAttribute("objects", $this->mObjects);
		$render->setAttribute("pageNavi", $this->mNavi);
	}
}

?>
