if ($gEnvManager->isAdminDirAccess()){
if ($gAccessManager->isValidAdminKey()) session_id($gRequestManager->trimValueOf(session_name()));
}
-
+
// 管理画面用ライブラリを追加(フレームコンテナでの設定を反映)
if ($gEnvManager->isAdminDirAccess()){
if ($this->useBootstrap) $this->addAdminScript('', ScriptLibInfo::LIB_BOOTSTRAP); // 管理画面でBootstrapを使用するかどうか
list($libTask, $libs) = explode('=', trim($itemArray[$i]));
$libTask = trim($libTask);
$libs = trim($libs);
- if (empty($libTask) || $libTask != $task) $libs = ''; // タスクが異なるときは追加しない
+
+ if (strEndsWith($libTask, '_')){ // 「task_subtask」形式のタスクのとき
+ if (!strStartsWith($task, $libTask)) $libs = ''; // タスクIDの先頭部が異なるときは追加しない
+ } else {
+ if (empty($libTask) || $libTask != $task) $libs = ''; // タスクが異なるときは追加しない
+ }
}
if (!empty($libs)){ // // スクリプト、CSSの追加を行うとき
$libsArray = explode(',', $libs);
for ($j = 0; $j < count($libsArray); $j++){
$lib = strtolower(trim($libsArray[$j]));// 小文字に変換
-
if (isset($this->libFiles[$lib])){ // ライブラリが存在するとき
// 依存ライブラリを取得
if (strcmp($lib, ScriptLibInfo::LIB_ELFINDER) == 0 || strcmp($lib, ScriptLibInfo::LIB_JQUERY_TIMEPICKER) == 0){ // elFinderを使用する場合
DELETE FROM _widgets WHERE wd_id = 'admin_main';\r
INSERT INTO _widgets\r
(wd_id, wd_name, wd_admin, wd_version, wd_author, wd_copyright, wd_license, wd_official_level, wd_add_script_lib, wd_available, wd_editable, wd_has_admin, wd_enable_operation, wd_use_instance_def, wd_initialized, wd_release_dt, wd_install_dt, wd_create_dt) VALUES\r
-('admin_main', '管理用画面', true, '1.1.0', 'Naoki Hirata', 'Magic3.org', 'GPL', 10, 'pagedef=jquery-ui.tabs;pagedef_mobile=jquery-ui.tabs;pagedef_smartphone=jquery-ui.tabs;menudef=jquery.jstree;menudef_detail=wysiwyg_editor;smenudef_detail=wysiwyg_editor;analyzegraph=jquery.jqplot;adjustwidget=jquery-ui.tabs,wysiwyg_editor;filebrowser=elfinder;editmenu_others=elfinder', false, false, false, true, false, true, '2013-03-04', now(),now());\r
+('admin_main', '管理用画面', true, '1.1.0', 'Naoki Hirata', 'Magic3.org', 'GPL', 10, 'pagedef=jquery-ui.tabs;pagedef_mobile=jquery-ui.tabs;pagedef_smartphone=jquery-ui.tabs;menudef=jquery.jstree;menudef_detail=wysiwyg_editor;smenudef_detail=wysiwyg_editor;analyzegraph=jquery.jqplot;adjustwidget=jquery-ui.tabs,wysiwyg_editor;filebrowser=elfinder;editmenu_others=elfinder;initwizard_=bootstrap', false, false, false, true, false, true, '2013-03-04', now(),now());\r
DELETE FROM _widgets WHERE wd_id = 'admin/analytics';\r
INSERT INTO _widgets\r
(wd_id, wd_name, wd_admin, wd_version, wd_author, wd_copyright, wd_license, wd_official_level, wd_add_script_lib, wd_available, wd_editable, wd_has_admin, wd_initialized, wd_release_dt, wd_install_dt, wd_create_dt) VALUES\r
--- /dev/null
+<?php
+/**
+ * コンテナクラス
+ *
+ * PHP versions 5
+ *
+ * LICENSE: This source file is licensed under the terms of the GNU General Public License.
+ *
+ * @package Magic3 Framework
+ * @author 平田直毅(Naoki Hirata) <naoki@aplo.co.jp>
+ * @copyright Copyright 2006-2013 Magic3 Project.
+ * @license http://www.gnu.org/copyleft/gpl.html GPL License
+ * @version SVN: $Id$
+ * @link http://www.magic3.org
+ */
+require_once($gEnvManager->getCurrentWidgetContainerPath() . '/admin_mainBaseWidgetContainer.php');
+require_once($gEnvManager->getCurrentWidgetDbPath() . '/admin_mainDb.php');
+
+class admin_mainInitwizardBaseWidgetContainer extends admin_mainBaseWidgetContainer
+{
+ protected $_mainDb; // DB接続オブジェクト
+ const TASK_SITE = 'initwizard_site'; // サイト情報
+
+ /**
+ * コンストラクタ
+ */
+ function __construct()
+ {
+ // 親クラスを呼び出す
+ parent::__construct();
+
+ $this->gPage->useBootstrap(); // Bootstrapを使用
+
+ $this->_mainDb = new admin_mainDb();
+ }
+ /**
+ * テンプレートにデータ埋め込む
+ *
+ * _setTemplate()で指定したテンプレートファイルにデータを埋め込む。
+ *
+ * @param RequestManager $request HTTPリクエスト処理クラス
+ * @param object $param 任意使用パラメータ。_setTemplate()と共有。
+ * @return なし
+ */
+ function _postAssign($request, &$param)
+ {
+ // 表示画面を決定
+ $task = $request->trimValueOf(M3_REQUEST_PARAM_OPERATION_TASK);
+ }
+}
+?>
--- /dev/null
+<?php
+/**
+ * コンテナクラス
+ *
+ * PHP versions 5
+ *
+ * LICENSE: This source file is licensed under the terms of the GNU General Public License.
+ *
+ * @package Magic3 Framework
+ * @author 平田直毅(Naoki Hirata) <naoki@aplo.co.jp>
+ * @copyright Copyright 2006-2013 Magic3 Project.
+ * @license http://www.gnu.org/copyleft/gpl.html GPL License
+ * @version SVN: $Id$
+ * @link http://www.magic3.org
+ */
+require_once($gEnvManager->getCurrentWidgetContainerPath() . '/admin_mainInitwizardBaseWidgetContainer.php');
+require_once($gEnvManager->getCurrentWidgetDbPath() . '/admin_mainDb.php');
+
+class admin_mainInitwizard_siteWidgetContainer extends admin_mainInitwizardBaseWidgetContainer
+{
+
+ /**
+ * コンストラクタ
+ */
+ function __construct()
+ {
+ // 親クラスを呼び出す
+ parent::__construct();
+
+ // DB接続オブジェクト作成
+ }
+ /**
+ * テンプレートファイルを設定
+ *
+ * _assign()でデータを埋め込むテンプレートファイルのファイル名を返す。
+ * 読み込むディレクトリは、「自ウィジェットディレクトリ/include/template」に固定。
+ *
+ * @param RequestManager $request HTTPリクエスト処理クラス
+ * @param object $param 任意使用パラメータ。そのまま_assign()に渡る
+ * @return string テンプレートファイル名。テンプレートライブラリを使用しない場合は空文字列「''」を返す。
+ */
+ function _setTemplate($request, &$param)
+ {
+ return 'initwizard_site.tmpl.html';
+ }
+ /**
+ * テンプレートにデータ埋め込む
+ *
+ * _setTemplate()で指定したテンプレートファイルにデータを埋め込む。
+ *
+ * @param RequestManager $request HTTPリクエスト処理クラス
+ * @param object $param 任意使用パラメータ。_setTemplate()と共有。
+ * @param なし
+ */
+ function _assign($request, &$param)
+ {
+ }
+}
+?>
--- /dev/null
+<?php
+/**
+ * コンテナクラス
+ *
+ * PHP versions 5
+ *
+ * LICENSE: This source file is licensed under the terms of the GNU General Public License.
+ *
+ * @package Magic3 Framework
+ * @author 平田直毅(Naoki Hirata) <naoki@aplo.co.jp>
+ * @copyright Copyright 2006-2013 Magic3 Project.
+ * @license http://www.gnu.org/copyleft/gpl.html GPL License
+ * @version SVN: $Id$
+ * @link http://www.magic3.org
+ */
+require_once($gEnvManager->getCurrentWidgetContainerPath() . '/admin_mainBaseWidgetContainer.php');
+
+class admin_mainMenuWidgetContainer extends admin_mainBaseWidgetContainer
+{
+ /**
+ * コンストラクタ
+ */
+ function __construct()
+ {
+ // 親クラスを呼び出す
+ parent::__construct();
+ }
+ /**
+ * テンプレートファイルを設定
+ *
+ * _assign()でデータを埋め込むテンプレートファイルのファイル名を返す。
+ * 読み込むディレクトリは、「自ウィジェットディレクトリ/include/template」に固定。
+ *
+ * @param RequestManager $request HTTPリクエスト処理クラス
+ * @param object $param 任意使用パラメータ。そのまま_assign()に渡る
+ * @return string テンプレートファイル名。テンプレートライブラリを使用しない場合は空文字列「''」を返す。
+ */
+ function _setTemplate($request, &$param)
+ {
+ return 'menu.tmpl.html';
+ }
+ /**
+ * テンプレートにデータ埋め込む
+ *
+ * _setTemplate()で指定したテンプレートファイルにデータを埋め込む。
+ *
+ * @param RequestManager $request HTTPリクエスト処理クラス
+ * @param object $param 任意使用パラメータ。_setTemplate()と共有。
+ * @param なし
+ */
+ function _assign($request, &$param)
+ {
+ }
+}
+?>
{
private $redirectUrl; // リダイレクト先URL
private $content; // メッセージ用コンテンツ
+ private $permitTask; // 実行許可タスク
const CF_USE_CONTENT_MAINTENANCE = 'use_content_maintenance'; // メンテナンス画面に汎用コンテンツを使用するかどうか
const CF_USE_CONTENT_ACCESS_DENY = 'use_content_access_deny'; // アクセス不可画面に汎用コンテンツを使用するかどうか
const CF_USE_CONTENT_PAGE_NOT_FOUND = 'use_content_page_not_found'; // 存在しないページ画面に汎用コンテンツを使用するかどうか
{
// 親クラスを呼び出す
parent::__construct();
+
+ $this->permitTask = array('test_', 'initwizard_'); // 実行許可タスク
}
/**
* ディスパッチ処理(メインコンテナのみ実行)
// 表示画面を決定
$task = $request->trimValueOf(M3_REQUEST_PARAM_OPERATION_TASK);
$taskSrc = $task;
- if (empty($task) || $task == 'menu'){ // デフォルト値
+ if (empty($task) || $task == 'menuhelp'){ // デフォルト値
$task = 'top'; // トップメニュー
-// } else if ($task == 'master'){ // マスター管理
+// } else if ($task == 'menu'){ // マスター管理
// $task = 'pageinfo'; // ページ情報をデフォルトにする
} else if ($task == 'mainte'){ // システムメンテナンス
$task = 'resbrowse'; // ファイルブラウザをデフォルトにする
}
// コンテナを起動
switch ($task){
- case 'test'; // テスト用画面
- case 'top'; // トップ画面
+ case 'menu': //
+ case 'test': // テスト用画面
+ case 'top': // トップ画面
case 'userlist': // ユーザリスト
case 'usergroup': // ユーザグループ
case 'loginstatus': // ログイン状況
$this->gPage->redirect($this->getUrl($otherPage));
break;
default:
- if (strStartsWith($task, 'test_')){
- $this->gLaunch->goSubWidget($task);
- return false;
- } else {
+ foreach ($this->permitTask as $taskStart){
+ if (strStartsWith($task, $taskStart)){
+ $this->gLaunch->goSubWidget($task);
+ return false;
+ }
+ }
+// if (strStartsWith($task, )){
+// $this->gLaunch->goSubWidget($task);
+// return false;
+// } else {
$this->SetMsg(self::MSG_APP_ERR, $this->_('Can not access the page.')); // アクセスできません
$param = 'message'; // メッセージ画面表示
- }
+// }
break;
}
} else { // システム管理者以外の場合
--- /dev/null
+/**
+ * 表示データ作成用テンプレート(patTemplate)
+ *
+ * LICENSE: This source file is licensed under the terms of the GNU General Public License.
+ *
+ * @package Magic3 Framework
+ * @author 平田直毅(Naoki Hirata) <naoki@aplo.co.jp>
+ * @copyright Copyright 2006-2013 Magic3 Project.
+ * @license http://www.gnu.org/copyleft/gpl.html GPL License
+ * @version SVN: $Id$
+ * @link http://www.magic3.org
+ */
+<patTemplate:tmpl name="_widget">
+<script type="text/javascript">
+//<![CDATA[
+$(function(){
+ // 前後エントリー移動ボタン
+ <patTemplate:tmpl name="show_prev_button" visibility="hidden">m3SetPrevButtonEvent(editEntry, {SERIAL});</patTemplate:tmpl>
+ <patTemplate:tmpl name="show_next_button" visibility="hidden">m3SetNextButtonEvent(editEntry, {SERIAL});</patTemplate:tmpl>
+});
+function editEntry(serial){
+ document.main.entryid.value = ''; // 値キャンセル
+ document.main.task.value = 'entry_detail';
+ document.main.act.value = 'edit';
+ document.main.serial.value = serial;
+ document.main.submit();
+}
+//]]>
+</script>
+<!-- m3:ErrorMessage -->
+<form method="post" name="main">
+<input type="hidden" name="task" value="entry_detail" />
+<input type="hidden" name="act" />
+<input type="hidden" name="serial" value="{SERIAL}" />
+<input type="hidden" name="entryid" value="{ENTRYID}" />
+<table class="simple-table" width="500">
+ <caption>サイト情報</caption>
+ <tbody>
+ <tr>
+ <td class="table-headside" width="150"><span class="m3help" title="サイト名|サイトの名前を設定します。">サイト名</span></td>
+ <td><input type="text" name="sitename" value="" size="60" maxlength="100" /> <font color="red">*必須</font></td>
+ </tr>
+ <tr class="even">
+ <td class="table-headside"><span class="m3help" title="メールアドレス|このサイトのデフォルトのメールアドレスです。このメールアドレスは必須項目です。「name@example.com」や「名前< name@example.com>」の設定が可能です。<br />このメールアドレスは、システムからユーザへ送信する場合の送信元アドレスとして、またはこのシステム上でユーザがメールを送信した場合に送信先アドレスとして使用されます。ユーザからのメール送信先は、次のフォーマットで「CC」や「BCC」でのメール送信も可能です。フォーマット「アドレス1;cc:アドレス2;bcc:アドレス3」。">メールアドレス</span></td>
+ <td><input type="text" name="siteemail" value="" size="60" maxlength="100" /> <font color="red">*必須</font> <input type="button" class="button" onclick="testMail();" value="テストメール送信" disabled /></td>
+ </tr>
+ </tbody>
+</table>
+</form>
+</patTemplate:tmpl>
\ No newline at end of file
--- /dev/null
+/**
+ * 表示データ作成用テンプレート(patTemplate)
+ *
+ * LICENSE: This source file is licensed under the terms of the GNU General Public License.
+ *
+ * @package Magic3 Framework
+ * @author 平田直毅(Naoki Hirata) <naoki@aplo.co.jp>
+ * @copyright Copyright 2006-2013 Magic3 Project.
+ * @license http://www.gnu.org/copyleft/gpl.html GPL License
+ * @version SVN: $Id$
+ * @link http://www.magic3.org
+ */
+<patTemplate:tmpl name="_widget">
+<div align="center">
+<table border="0" cellpadding="0" cellspacing="0" align="center"><tr><td>
+<div class="m3toppage_menu">
+ <div class="ui-state-default ui-priority-primary ui-corner-tl ui-corner-tr"><span >システム制御</span></div>
+ <ul class="ui-widget-content ui-corner-bl ui-corner-br">
+ <li ><a href="http://192.168.1.45/magic3/admin/index.php?task=initwizard" ><span >システム初期化ウィザード</span></a></li>
+ <li ><a href="http://192.168.1.45/magic3/admin/index.php?task=editmenu" ><span >管理メニュー編集</span></a></li>
+ </ul>
+</div>
+</td></tr></table>
+</div>
+</patTemplate:tmpl>
+/**\r
+ * 表示データ作成用テンプレート(patTemplate)\r
+ *\r
+ * LICENSE: This source file is licensed under the terms of the GNU General Public License.\r
+ *\r
+ * @package Magic3 Framework\r
+ * @author 平田直毅(Naoki Hirata) <naoki@aplo.co.jp>\r
+ * @copyright Copyright 2006-2013 Magic3 Project.\r
+ * @license http://www.gnu.org/copyleft/gpl.html GPL License\r
+ * @version SVN: $Id$\r
+ * @link http://www.magic3.org\r
+ */\r
<patTemplate:tmpl name="_widget">\r
<script type="text/javascript">\r
//<![CDATA[\r
return true;\r
}\r
function editMenu(){\r
- window.location.href = '{ADMIN_URL}?task=editmenu';\r
+ window.location.href = '{ADMIN_URL}?task=menu';\r
}\r
$(document).ready(function(){\r
// メニュー編集機能キー登録\r
* @author 平田直毅(Naoki Hirata) <naoki@aplo.co.jp>\r
* @copyright Copyright 2006-2013 Magic3 Project.\r
* @license http://www.gnu.org/copyleft/gpl.html GPL License\r
- * @version SVN: $Id: index.tmpl.html 5505 2013-01-02 13:24:32Z fishbone $\r
+ * @version SVN: $Id$\r
* @link http://www.magic3.org\r
*/\r
<patTemplate:tmpl name="_widget">\r
}\r
function goHelp()\r
{\r
- location.href = '?task=menu';\r
+ location.href = '?task=menuhelp';\r
}\r
function logout()\r
{\r