Minahito
minah****@users*****
2006年 1月 19日 (木) 21:06:34 JST
Index: xoops2jp/html/modules/user/admin/actions/GroupEditAction.class.php diff -u /dev/null xoops2jp/html/modules/user/admin/actions/GroupEditAction.class.php:1.1.2.1 --- /dev/null Thu Jan 19 21:06:34 2006 +++ xoops2jp/html/modules/user/admin/actions/GroupEditAction.class.php Thu Jan 19 21:06:34 2006 @@ -0,0 +1,42 @@ +<?php + +require_once XOOPS_MODULE_PATH . "/user/class/AbstractEditAction.class.php"; +require_once XOOPS_MODULE_PATH . "/user/admin/forms/GroupEditForm.class.php"; + +class User_GroupEditAction extends User_AbstractEditAction +{ + function _getId() + { + return isset($_REQUEST['groupid']) ? intval($_REQUEST['groupid']) : 0; + } + + function &_getHandler() + { + $handler =& xoops_gethandler('group'); + return $handler; + } + + function _setupActionForm() + { + $this->mActionForm =& new User_GroupEditForm(); + $this->mActionForm->prepare(); + } + + function executeViewInput(&$controller,&$xoopsUser,&$renderSystem) + { + $renderSystem->setTemplateName("group_edit.html"); + $renderSystem->setAttribute("actionForm",$this->mActionForm); + } + + function executeViewSuccess(&$controller,&$xoopsUser,&$renderSystem) + { + XCube_Utils::redirectHeader("index.php?action=GroupList", 1, "*SUCCESS*"); + } + + function executeViewError(&$controller,&$xoopsUser,&$renderSystem) + { + XCube_Utils::redirectHeader("index.php?action=GroupList", 1, "*ERROR*"); + } +} + +?> \ No newline at end of file Index: xoops2jp/html/modules/user/admin/actions/GroupDeleteAction.class.php diff -u /dev/null xoops2jp/html/modules/user/admin/actions/GroupDeleteAction.class.php:1.1.2.1 --- /dev/null Thu Jan 19 21:06:34 2006 +++ xoops2jp/html/modules/user/admin/actions/GroupDeleteAction.class.php Thu Jan 19 21:06:34 2006 @@ -0,0 +1,53 @@ +<?php + +require_once XOOPS_MODULE_PATH . "/user/class/AbstractDeleteAction.class.php"; +require_once XOOPS_MODULE_PATH . "/user/admin/forms/GroupAdminDeleteForm.class.php"; +require_once XOOPS_MODULE_PATH . "/user/admin/class/XoopsGroupEx.class.php"; + +class User_GroupDeleteAction extends User_AbstractDeleteAction +{ + function _getId() + { + return isset($_REQUEST['groupid']) ? $_REQUEST['groupid'] : 0; + } + + function &_getHandler() + { + $handler =& xoops_gethandler('group'); + return $handler; + } + + function _setupActionForm() + { + $this->mActionForm =& new GroupAdminDeleteForm(); + $this->mActionForm->prepare(); + } + + function _doExecute() + { + $handler =& xoops_gethandler('member'); + return $handler->delete($this->mObject) ? USER_FRAME_VIEW_SUCCESS + : USER_FRAME_VIEW_ERROR; + } + + function executeViewInput(&$controller, &$xoopsUser, &$render) + { + $group =& new XoopsGroupEx($this->mObject); + + $render->setTemplateName("group_delete.html"); + $render->setAttribute('actionForm', $this->mActionForm); + $render->setAttribute('object', $group); + } + + function executeViewSuccess(&$controller, &$xoopsUser, &$render) + { + $controller->executeForward("./index.php?action=GroupList"); + } + + function executeViewError(&$controller, &$xoopsUser, &$render) + { + redirect_header("./index.php?action=GroupList", 1, _AD_USER_ERROR_DBUPDATE_FAILED); + } +} + +?> Index: xoops2jp/html/modules/user/admin/actions/GroupListAction.class.php diff -u /dev/null xoops2jp/html/modules/user/admin/actions/GroupListAction.class.php:1.1.2.1 --- /dev/null Thu Jan 19 21:06:34 2006 +++ xoops2jp/html/modules/user/admin/actions/GroupListAction.class.php Thu Jan 19 21:06:34 2006 @@ -0,0 +1,40 @@ +<?php + +require_once XOOPS_MODULE_PATH . "/user/class/PageNavigator.class.php"; +require_once XOOPS_MODULE_PATH . "/user/class/AbstractListAction.class.php"; +require_once XOOPS_MODULE_PATH . "/user/admin/forms/GroupFilterForm.class.php"; +require_once XOOPS_MODULE_PATH . "/user/admin/class/XoopsGroupEx.class.php"; + +class User_GroupListAction extends User_AbstractListAction +{ + function &_getHandler() + { + $handler =& xoops_getmodulehandler('groups'); + return $handler; + } + + function &_getFilterForm(&$navi) + { + $filter =& new User_GroupFilterForm($navi); + return $filter; + } + + function _getBaseUrl() + { + return "./index.php?action=GroupsList"; + } + + function executeViewIndex(&$controller, &$xoopsUser, &$render) + { + $groups = array(); + foreach ($this->mObjects as $_group) { + $groups[] =& new XoopsGroupEx($_group); + } + + $render->setTemplateName("group_list.html"); + $render->setAttribute("objects", $groups); + $render->setAttribute("pageNavi", $this->mNavi); + } +} + +?>