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-2009 Magic3 Project.
12 * @license http://www.gnu.org/copyleft/gpl.html GPL License
13 * @version SVN: $Id: admin_m_quizkBaseWidgetContainer.php 2458 2009-10-24 07:26:44Z fishbone $
14 * @link http://www.magic3.org
16 require_once($gEnvManager->getContainerPath() . '/baseAdminWidgetContainer.php');
18 class admin_m_quizkBaseWidgetContainer extends BaseAdminWidgetContainer
20 const DEFAULT_TASK = 'operation'; // デフォルトの画面
25 function __construct()
28 parent::__construct();
33 * _setTemplate()で指定したテンプレートファイルにデータを埋め込む。
35 * @param RequestManager $request HTTPリクエスト処理クラス
36 * @param object $param 任意使用パラメータ。_setTemplate()と共有。
39 function _postAssign($request, &$param)
42 $openBy = $request->trimValueOf(M3_REQUEST_PARAM_OPEN_BY); // ウィンドウオープンタイプ
43 if (!empty($openBy)) $this->addOptionUrlParam(M3_REQUEST_PARAM_OPEN_BY, $openBy);
46 $task = $request->trimValueOf(M3_REQUEST_PARAM_OPERATION_TASK);
47 if (empty($task)) $task = self::DEFAULT_TASK; // デフォルト画面を設定
50 $createList = true; // パンくずリストを作成するかどうか
52 case 'operation': // 運用管理
53 $linkList = ' >> 運用管理';// パンくずリスト
55 case 'csv': // アンケートデータアップロード
56 $linkList = ' >> CSVデータ';// パンくずリスト
59 $linkList = ' >> 集計';// パンくずリスト
65 if ($createList){ // パンくずリストを作成するとき
66 // ####### 上段メニューの作成 #######
67 $menuText = '<div id="configmenu-upper">' . M3_NL;
68 $menuText .= '<ul>' . M3_NL;
71 $baseUrl = $this->getAdminUrlWithOptionParam(true);// 画面定義ID付き
75 $link = $baseUrl . '&task=operation';
76 if ($task == 'operation'){
77 $current = 'id="current"';
79 $menuText .= '<li ' . $current . '><a href="'. $this->convertUrlToHtmlEntity($link) .'"><span>運用管理</span></a></li>' . M3_NL;
83 $link = $baseUrl . '&task=csv';
85 $current = 'id="current"';
87 $menuText .= '<li ' . $current . '><a href="'. $this->convertUrlToHtmlEntity($link) .'"><span>CSVデータ</span></a></li>' . M3_NL;
91 $link = $baseUrl . '&task=total';
92 if ($task == 'total'){
93 $current = 'id="current"';
95 $menuText .= '<li ' . $current . '><a href="'. $this->convertUrlToHtmlEntity($link) .'"><span>集計</span></a></li>' . M3_NL;
99 $menuText .= '</ul>' . M3_NL;
100 $menuText .= '</div>' . M3_NL;
103 $linkList = '<div id="configmenu-top"><label>' . '携帯クイズ' . $linkList . '</div>';
104 $outputText .= '<table width="90%"><tr><td>' . $linkList . $menuText . '</td></tr></table>' . M3_NL;
105 $this->tmpl->addVar("_widget", "menu_items", $outputText);
107 $this->tmpl->addVar("_widget", "menu_items", '');