Minahito
minah****@users*****
2006年 1月 19日 (木) 21:05:35 JST
Index: xoops2jp/html/modules/user/admin/actions/RanksEditAction.class.php diff -u /dev/null xoops2jp/html/modules/user/admin/actions/RanksEditAction.class.php:1.1.2.1 --- /dev/null Thu Jan 19 21:05:35 2006 +++ xoops2jp/html/modules/user/admin/actions/RanksEditAction.class.php Thu Jan 19 21:05:35 2006 @@ -0,0 +1,55 @@ +<?php + +require_once XOOPS_MODULE_PATH . "/user/class/AbstractEditAction.class.php"; +require_once XOOPS_MODULE_PATH . "/user/admin/forms/RanksAdminEditForm.class.php"; + +class User_RanksEditAction extends User_AbstractEditAction +{ + function _getId() + { + return isset($_REQUEST['rank_id']) ? $_REQUEST['rank_id'] : 0; + } + + function &_getHandler() + { + $handler =& xoops_getmodulehandler('ranks'); + return $handler; + } + + function _setupActionForm() + { + $this->mActionForm =& new RanksAdminEditForm(); + $this->mActionForm->prepare(); + } + + function _doExecute() + { + if ($this->mActionForm->mFormFile != null) { + @unlink(XOOPS_UPLOAD_PATH . "/" . $this->mActionForm->mOldFileName); + if (!$this->mActionForm->mFormFile->SaveAs(XOOPS_UPLOAD_PATH)) { + return USER_FRAME_VIEW_ERROR; + } + } + + return parent::_doExecute(); + } + + function executeViewInput(&$controller, &$xoopsUser, &$render) + { + $render->setTemplateName("ranks_edit.html"); + $render->setAttribute('actionForm', $this->mActionForm); + $render->setAttribute('object', $this->mObject); + } + + function executeViewSuccess(&$controller, &$xoopsUser, &$render) + { + $controller->executeForward("./index.php?action=RanksList"); + } + + function executeViewError(&$controller, &$xoopsUser, &$render) + { + redirect_header("./index.php?action=RanksList", 1, _AD_USER_ERROR_DBUPDATE_FAILED); + } +} + +?> Index: xoops2jp/html/modules/user/admin/actions/AvatarListAction.class.php diff -u /dev/null xoops2jp/html/modules/user/admin/actions/AvatarListAction.class.php:1.1.2.1 --- /dev/null Thu Jan 19 21:05:35 2006 +++ xoops2jp/html/modules/user/admin/actions/AvatarListAction.class.php Thu Jan 19 21:05:35 2006 @@ -0,0 +1,34 @@ +<?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/AvatarFilterForm.class.php"; + +class User_AvatarListAction extends User_AbstractListAction +{ + function &_getHandler() + { + $handler =& xoops_getmodulehandler('avatar'); + return $handler; + } + + function &_getFilterForm(&$navi) + { + $filter =& new User_AvatarFilterForm($navi); + return $filter; + } + + function _getBaseUrl() + { + return "./index.php?action=AvatarList"; + } + + function executeViewIndex(&$controller, &$xoopsUser, &$render) + { + $render->setTemplateName("avatar_list.html"); + $render->setAttribute("objects", $this->mObjects); + $render->setAttribute("pageNavi", $this->mNavi); + } +} + +?> Index: xoops2jp/html/modules/user/admin/actions/AvatarEditAction.class.php diff -u /dev/null xoops2jp/html/modules/user/admin/actions/AvatarEditAction.class.php:1.1.2.1 --- /dev/null Thu Jan 19 21:05:35 2006 +++ xoops2jp/html/modules/user/admin/actions/AvatarEditAction.class.php Thu Jan 19 21:05:35 2006 @@ -0,0 +1,57 @@ +<?php + +require_once XOOPS_MODULE_PATH . "/user/class/AbstractEditAction.class.php"; +require_once XOOPS_MODULE_PATH . "/user/admin/forms/AvatarAdminEditForm.class.php"; + +class User_AvatarEditAction extends User_AbstractEditAction +{ + function _getId() + { + return isset($_REQUEST['avatar_id']) ? $_REQUEST['avatar_id'] : 0; + } + + function &_getHandler() + { + $handler =& xoops_getmodulehandler('avatar'); + + return $handler; + } + + function _setupActionForm() + { + $this->mActionForm =& new AvatarAdminEditForm(); + $this->mActionForm->prepare(); + } + + function _doExecute() + { + if (!$this->mActionForm->mFormFile->saveAs(XOOPS_UPLOAD_PATH)) { + return false; + } + + if ($this->mActionForm->mOldFileName != null && $this->mActionForm->mOldFileName != "blank.gif") { + @unlink(XOOPS_UPLOAD_PATH . "/" . $this->mActionForm->mOldFileName); + } + + return parent::_doExecute(); + } + + function executeViewInput(&$controller, &$xoopsUser, &$render) + { + $render->setTemplateName("avatar_edit.html"); + $render->setAttribute('actionForm', $this->mActionForm); + $render->setAttribute('object', $this->mObject); + } + + function executeViewSuccess(&$controller, &$xoopsUser, &$render) + { + $controller->executeForward("./index.php?action=AvatarList"); + } + + function executeViewError(&$controller, &$xoopsUser, &$render) + { + redirect_header("./index.php?action=AvatarList", 1, _AD_USER_ERROR_DBUPDATE_FAILED); + } +} + +?> Index: xoops2jp/html/modules/user/admin/actions/AvatarDeleteAction.class.php diff -u /dev/null xoops2jp/html/modules/user/admin/actions/AvatarDeleteAction.class.php:1.1.2.1 --- /dev/null Thu Jan 19 21:05:35 2006 +++ xoops2jp/html/modules/user/admin/actions/AvatarDeleteAction.class.php Thu Jan 19 21:05:35 2006 @@ -0,0 +1,43 @@ +<?php + +require_once XOOPS_MODULE_PATH . "/user/class/AbstractDeleteAction.class.php"; +require_once XOOPS_MODULE_PATH . "/user/admin/forms/AvatarAdminDeleteForm.class.php"; + +class User_AvatarDeleteAction extends User_AbstractDeleteAction +{ + function _getId() + { + return isset($_REQUEST['avatar_id']) ? $_REQUEST['avatar_id'] : 0; + } + + function &_getHandler() + { + $handler =& xoops_getmodulehandler('avatar'); + return $handler; + } + + function _setupActionForm() + { + $this->mActionForm =& new AvatarAdminDeleteForm(); + $this->mActionForm->prepare(); + } + + function executeViewInput(&$controller, &$xoopsUser, &$render) + { + $render->setTemplateName("avatar_delete.html"); + $render->setAttribute('actionForm', $this->mActionForm); + $render->setAttribute('object', $this->mObject); + } + + function executeViewSuccess(&$controller, &$xoopsUser, &$render) + { + $controller->executeForward("./index.php?action=AvatarList"); + } + + function executeViewError(&$controller, &$xoopsUser, &$render) + { + redirect_header("./index.php?action=AvatarList", 1, _AD_USER_ERROR_DBUPDATE_FAILED); + } +} + +?> Index: xoops2jp/html/modules/user/admin/actions/RanksDeleteAction.class.php diff -u /dev/null xoops2jp/html/modules/user/admin/actions/RanksDeleteAction.class.php:1.1.2.1 --- /dev/null Thu Jan 19 21:05:35 2006 +++ xoops2jp/html/modules/user/admin/actions/RanksDeleteAction.class.php Thu Jan 19 21:05:35 2006 @@ -0,0 +1,43 @@ +<?php + +require_once XOOPS_MODULE_PATH . "/user/class/AbstractDeleteAction.class.php"; +require_once XOOPS_MODULE_PATH . "/user/admin/forms/RanksAdminDeleteForm.class.php"; + +class User_RanksDeleteAction extends User_AbstractDeleteAction +{ + function _getId() + { + return isset($_REQUEST['rank_id']) ? $_REQUEST['rank_id'] : 0; + } + + function &_getHandler() + { + $handler =& xoops_getmodulehandler('ranks'); + return $handler; + } + + function _setupActionForm() + { + $this->mActionForm =& new RanksAdminDeleteForm(); + $this->mActionForm->prepare(); + } + + function executeViewInput(&$controller, &$xoopsUser, &$render) + { + $render->setTemplateName("ranks_delete.html"); + $render->setAttribute('actionForm', $this->mActionForm); + $render->setAttribute('object', $this->mObject); + } + + function executeViewSuccess(&$controller, &$xoopsUser, &$render) + { + $controller->executeForward("./index.php?action=RanksList"); + } + + function executeViewError(&$controller, &$xoopsUser, &$render) + { + redirect_header("./index.php?action=RanksList", 1, _AD_USER_ERROR_DBUPDATE_FAILED); + } +} + +?> Index: xoops2jp/html/modules/user/admin/actions/RanksListAction.class.php diff -u /dev/null xoops2jp/html/modules/user/admin/actions/RanksListAction.class.php:1.1.2.1 --- /dev/null Thu Jan 19 21:05:35 2006 +++ xoops2jp/html/modules/user/admin/actions/RanksListAction.class.php Thu Jan 19 21:05:35 2006 @@ -0,0 +1,34 @@ +<?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/RanksFilterForm.class.php"; + +class User_RanksListAction extends User_AbstractListAction +{ + function &_getHandler() + { + $handler =& xoops_getmodulehandler('ranks'); + return $handler; + } + + function &_getFilterForm(&$navi) + { + $filter =& new User_RanksFilterForm($navi); + return $filter; + } + + function _getBaseUrl() + { + return "./index.php?action=RanksList"; + } + + function executeViewIndex(&$controller, &$xoopsUser, &$render) + { + $render->setTemplateName("ranks_list.html"); + $render->setAttribute("objects", $this->mObjects); + $render->setAttribute("pageNavi", $this->mNavi); + } +} + +?>