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-2010 Magic3 Project.
12 * @license http://www.gnu.org/copyleft/gpl.html GPL License
13 * @version SVN: $Id: admin_s_custom_footerWidgetContainer.php 3440 2010-07-30 03:47:05Z fishbone $
14 * @link http://www.magic3.org
16 require_once($gEnvManager->getContainerPath() . '/baseAdminWidgetContainer.php');
18 class admin_s_custom_footerWidgetContainer extends BaseAdminWidgetContainer
23 function __construct()
26 parent::__construct();
31 * _assign()でデータを埋め込むテンプレートファイルのファイル名を返す。
32 * 読み込むディレクトリは、「自ウィジェットディレクトリ/include/template」に固定。
34 * @param RequestManager $request HTTPリクエスト処理クラス
35 * @param object $param 任意使用パラメータ。そのまま_assign()に渡る
36 * @return string テンプレートファイル名。テンプレートライブラリを使用しない場合は空文字列「''」を返す。
38 function _setTemplate($request, &$param)
40 return 'admin.tmpl.html';
45 * _setTemplate()で指定したテンプレートファイルにデータを埋め込む。
47 * @param RequestManager $request HTTPリクエスト処理クラス
48 * @param object $param 任意使用パラメータ。_setTemplate()と共有。
51 function _assign($request, &$param)
53 $act = $request->trimValueOf('act');
54 if ($act == 'update'){ // 設定更新のとき
56 $footContent = $request->valueOf('item_content'); // フッタコンテンツ
58 if ($this->getMsgCount() == 0){ // エラーのないとき
59 $paramObj->footContent = $footContent; // フッタコンテンツ
60 $ret = $this->updateWidgetParamObj($paramObj);
62 $this->setMsg(self::MSG_GUIDANCE, 'データを更新しました');
64 $this->setMsg(self::MSG_APP_ERR, 'データ更新に失敗しました');
67 $this->gPage->updateParentWindow();// 親ウィンドウを更新
70 $footContent = ''; // フッタコンテンツ
71 $footContent .= '<div align="center">(C) ' . date("Y") . ' Magic3.org</div>' . M3_NL;
72 $footContent .= '<div align="center"><a href="http://www.magic3.org">Magic3 ' . M3_SYSTEM_VERSION . '</a> is licensed under the terms of the GNU General Public License.</div>' . M3_NL;
73 $paramObj = $this->getWidgetParamObj();
74 if (!empty($paramObj)){
75 $footContent = $paramObj->footContent; // フッタコンテンツ
80 $this->tmpl->addVar("_widget", "content", $footContent);