<?php

$xoopsOption['pagetype'] = 'user';
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__) . '/actions/UserValueSetSubAction.class.php';
require_once XOOPS_ROOT_PATH . '/modules/legacyRender/kernel/Legacy_AdminRenderSystem.class.php';
Xoonips_Utils::denyGuestAccess();

$request = new Xoonips_Request();
$response = new Xoonips_Response();
$op = $request->getParameter('op');
if ($op == null) {
    $op = 'init';
}

// check request
if (!in_array($op, array('init', 'update'))) {
    die('illegal reuest');
}

// set action map
$dirname = Xoonips_Utils::getDirname();
$actionMap['init_success'] = $dirname . '_value_set_sub.html';
$actionMap['update_success'] = 'admin_common_msg_sub.html';
$actionMap['input_error'] = $dirname . '_value_set_sub.html';

//do action
$action = new User_UserValueSetSubAction();
$action->doAction($request, $response);

// forward
$response->forwardLayeredWindow($actionMap,true);

