7 * LICENSE: This source file is licensed under the terms of the GNU General Public License.
9 * @package Magic3 Framework
10 * @author 平田直毅(Naoki Hirata) <naoki@aplo.co.jp>
11 * @copyright Copyright 2006-2013 Magic3 Project.
12 * @license http://www.gnu.org/copyleft/gpl.html GPL License
13 * @version SVN: $Id: admin_mainUserBaseWidgetContainer.php 5814 2013-03-11 10:22:45Z fishbone $
14 * @link http://www.magic3.org
16 require_once($gEnvManager->getCurrentWidgetContainerPath() . '/admin_mainBaseWidgetContainer.php');
17 require_once($gEnvManager->getCurrentWidgetDbPath() . '/admin_mainDb.php');
19 class admin_mainUserBaseWidgetContainer extends admin_mainBaseWidgetContainer
21 protected $_mainDb; // DB接続オブジェクト
22 const TASK_USERLIST = 'userlist'; // ユーザ一覧
23 const TASK_USERLIST_DETAIL = 'userlist_detail'; // ユーザ詳細
24 const TASK_USERGROUP = 'usergroup'; // ユーザグループ
25 const DEFAULT_TOP_PAGE = 'userlist'; // デフォルトのトップ画面
30 function __construct()
33 parent::__construct();
35 $this->_mainDb = new admin_mainDb();
40 * _setTemplate()で指定したテンプレートファイルにデータを埋め込む。
42 * @param RequestManager $request HTTPリクエスト処理クラス
43 * @param object $param 任意使用パラメータ。_setTemplate()と共有。
46 function _postAssign($request, &$param)
49 $task = $request->trimValueOf(M3_REQUEST_PARAM_OPERATION_TASK);
50 if (empty($task)) $task = self::DEFAULT_TOP_PAGE;
54 case self::TASK_USERLIST: // ユーザ一覧
55 case self::TASK_USERLIST_DETAIL: // ユーザ詳細
56 $linkList = ' >> ユーザ一覧';
58 case self::TASK_USERGROUP: // ユーザグループ
59 $linkList = ' >> ユーザグループ';
63 // ####### 上段メニューの作成 #######
64 $menuText = '<div id="configmenu-upper">' . M3_NL;
65 $menuText .= '<ul>' . M3_NL;
68 $link = $this->gEnv->getDefaultAdminUrl() . '?' . M3_REQUEST_PARAM_OPERATION_COMMAND . '=' . M3_REQUEST_CMD_CONFIG_WIDGET .
69 '&' . M3_REQUEST_PARAM_WIDGET_ID . '=' . $this->gEnv->getCurrentWidgetId();
73 $link = $this->gEnv->getDefaultAdminUrl() . '?' . 'task=' . self::TASK_USERLIST;
74 if ($task == self::TASK_USERLIST ||
75 $task == self::TASK_USERLIST_DETAIL){ // ユーザ詳細
76 $current = 'id="current"';
79 $helpText = $this->gInstance->getHelpManager()->getHelpText(self::TASK_USERLIST);
80 $menuText .= '<li ' . $current . '><a href="'. $this->getUrl($link) .'"><span ' . $helpText . '>ユーザ一覧</span></a></li>' . M3_NL;
84 $link = $this->gEnv->getDefaultAdminUrl() . '?' . 'task=' . self::TASK_USERGROUP;
85 if ($task == self::TASK_USERGROUP){
86 $current = 'id="current"';
89 $helpText = $this->gInstance->getHelpManager()->getHelpText(self::TASK_USERGROUP);
90 $menuText .= '<li ' . $current . '><a href="'. $this->getUrl($link) .'"><span ' . $helpText . '>ユーザグループ</span></a></li>' . M3_NL;
93 $menuText .= '</ul>' . M3_NL;
94 $menuText .= '</div>' . M3_NL;
97 $linkList = '<div id="configmenu-top"><label>' . 'ユーザ管理' . $linkList . '</div>';
98 $outputText .= '<table width="90%"><tr><td>' . $linkList . $menuText . '</td></tr></table>' . M3_NL;
99 $this->tmpl->addVar("_widget", "menu_items", $outputText);