<?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 XOOPS_TRUST_PATH . '/libs/xoonips/class/action/UserSelectSubAction.class.php';
$fp = fopen('c:/temp/debug.txt','a');
fwrite($fp, "userselect step1\r\n");
fclose($fp);
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', 'search', 'sort'))) {
	die('illegal reuest');
}

// set action map
$actionMap = array();
$dirname = Xoonips_Utils::getDirname();
$actionMap['init_success'] = $dirname . '_userselect_sub.html';
$actionMap['search_success'] = $dirname . '_userselect_sub.html';
$actionMap['sort_success'] = $dirname . '_userselect_sub.html';

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

// forward
$response->forwardLayeredWindow($actionMap);
?>
