<?php

$xoopsOption['pagetype'] = 'user';
require_once 'include/common.inc.php';
require_once XOOPS_TRUST_PATH . '/libs/xoonips/class/core/BeanFactory.class.php';
require_once XOOPS_TRUST_PATH . '/libs/xoonips/class/core/Request.class.php';
require_once XOOPS_TRUST_PATH . '/libs/xoonips/class/core/Response.class.php';
require_once XOOPS_TRUST_PATH . '/libs/xoonips/class/core/Utils.class.php';
require_once dirname(__FILE__) . '/class/action/ItemTypeAction.class.php';

global $xoopsUser;
$uid = is_object($xoopsUser) ? $xoopsUser->getVar('uid') : XOONIPS_UID_GUEST;

$dirname = Xoonips_Utils::getDirname();
$xoopsOption['template_main'] = $dirname . '_index.html';
include XOOPS_ROOT_PATH . '/header.php';

$request = new Xoonips_Request();
$response = new Xoonips_Response();
$action = new Xoonips_ItemTypeAction($dirname);
$action->doAction($request, $response);

$block = $response->getViewData();

if (count($block['explain']) != 0) {
	$xoopsTpl->assign('blocks', $block['explain']);
}

$xoopsTpl->assign($dirname . '_editprofile_url', XOOPS_URL . '/modules/' . $dirname . '/edituser.php?uid=' . $uid);
include XOOPS_ROOT_PATH . '/footer.php';
?>
