*
* @package Magic3 Framework
* @author 平田直毅(Naoki Hirata) <naoki@aplo.co.jp>
- * @copyright Copyright 2006-2013 Magic3 Project.
+ * @copyright Copyright 2006-2016 Magic3 Project.
* @license http://www.gnu.org/copyleft/gpl.html GPL License
- * @version SVN: $Id: admin_mainConfigmessageWidgetContainer.php 5726 2013-02-25 05:45:25Z fishbone $
+ * @version SVN: $Id$
* @link http://www.magic3.org
*/
require_once($gEnvManager->getCurrentWidgetContainerPath() . '/admin_mainConfigsystemBaseWidgetContainer.php');
$useContentAccessDeny = ($request->trimValueOf('item_use_content_access_deny') == 'on') ? 1 : 0; // アクセス不可用コンテンツを汎用コンテンツから取得するかどうか
$msg_pageNotFound = $request->trimValueOf('item_msg_page_not_found'); // 存在しない画面メッセージ
$useContentPageNotFound = ($request->trimValueOf('item_use_content_page_not_found') == 'on') ? 1 : 0; // 存在しない画面用コンテンツを汎用コンテンツから取得するかどうか
+ $msg_adminPopupLogin = $request->trimValueOf('item_msg_admin_popup_login'); // ログイン時管理者向けポップアップメッセージ
$replaceNew = false; // データを再取得するかどうか
if ($act == 'update'){ // 設定更新のとき
if (!$this->gInstance->getMessageManager()->updateMessage(MessageManager::MSG_PAGE_NOT_FOUND, $msg_pageNotFound, $this->langId)) $isErr = true;
}
if (!$isErr){
+ if (!$this->gInstance->getMessageManager()->updateMessage(MessageManager::MSG_ADMIN_POPUP_LOGIN, $msg_adminPopupLogin, $this->langId)) $isErr = true;
+ }
+ if (!$isErr){
if (!$this->db->updateSystemConfig(self::CF_USE_CONTENT_PAGE_NOT_FOUND, $useContentPageNotFound)) $isErr = true; // 存在しない画面用コンテンツを汎用コンテンツから取得するかどうか
}
if ($isErr){ // エラー発生のとき
$useContentAccessDeny = $this->db->getSystemConfig(self::CF_USE_CONTENT_ACCESS_DENY); // アクセス不可用コンテンツを汎用コンテンツから取得するかどうか
$msg_pageNotFound = $this->gInstance->getMessageManager()->getMessage(MessageManager::MSG_PAGE_NOT_FOUND, $this->langId);// 存在しない画面メッセージ
$useContentPageNotFound = $this->db->getSystemConfig(self::CF_USE_CONTENT_PAGE_NOT_FOUND); // 存在しない画面用コンテンツを汎用コンテンツから取得するかどうか
+ $msg_adminPopupLogin = $this->gInstance->getMessageManager()->getMessage(MessageManager::MSG_ADMIN_POPUP_LOGIN, $this->langId); // ログイン時管理者向けポップアップメッセージ
}
// 画面にデータを埋め込む
- $this->tmpl->addVar("_widget", "msg_site_in_maintenance", $msg_siteInMaintenance);// メンテナンスメッセージ
- $this->tmpl->addVar("_widget", "content_key_maintenance", M3_CONTENT_KEY_MAINTENANCE); // メンテナンス用コンテンツ取得キー
+ $this->tmpl->addVar("_widget", "msg_site_in_maintenance", $this->convertToDispString($msg_siteInMaintenance));// メンテナンスメッセージ
+ $this->tmpl->addVar("_widget", "content_key_maintenance", $this->convertToDispString(M3_CONTENT_KEY_MAINTENANCE)); // メンテナンス用コンテンツ取得キー
$checked = '';
if (!empty($useContentMaintenance)) $checked = 'checked';
$this->tmpl->addVar("_widget", "use_content_maintenance", $checked);// メンテナンス画面用コンテンツを汎用コンテンツから取得するかどうか
- $this->tmpl->addVar("_widget", "msg_access_deny", $msg_accessDeny); // アクセス不可メッセージ
- $this->tmpl->addVar("_widget", "content_key_access_deny", M3_CONTENT_KEY_ACCESS_DENY); // アクセス不可用コンテンツ取得キー
+ $this->tmpl->addVar("_widget", "msg_access_deny", $this->convertToDispString($msg_accessDeny)); // アクセス不可メッセージ
+ $this->tmpl->addVar("_widget", "content_key_access_deny", $this->convertToDispString(M3_CONTENT_KEY_ACCESS_DENY)); // アクセス不可用コンテンツ取得キー
$checked = '';
if (!empty($useContentAccessDeny)) $checked = 'checked';
$this->tmpl->addVar("_widget", "use_content_access_deny", $checked);// アクセス不可用コンテンツを汎用コンテンツから取得するかどうか
- $this->tmpl->addVar("_widget", "msg_page_not_found", $msg_pageNotFound); // 存在しない画面メッセージ
- $this->tmpl->addVar("_widget", "content_key_page_not_found", M3_CONTENT_KEY_PAGE_NOT_FOUND); // 存在しない画面用コンテンツ取得キー
+ $this->tmpl->addVar("_widget", "msg_page_not_found", $this->convertToDispString($msg_pageNotFound)); // 存在しない画面メッセージ
+ $this->tmpl->addVar("_widget", "content_key_page_not_found", $this->convertToDispString(M3_CONTENT_KEY_PAGE_NOT_FOUND)); // 存在しない画面用コンテンツ取得キー
$checked = '';
if (!empty($useContentPageNotFound)) $checked = 'checked';
$this->tmpl->addVar("_widget", "use_content_page_not_found", $checked);// 存在しない画面用コンテンツを汎用コンテンツから取得するかどうか
+
+ $this->tmpl->addVar("_widget", "msg_admin_popup_login", $this->convertToDispString($msg_adminPopupLogin)); // ログイン時管理者向けポップアップメッセージ
}
}
?>
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'; // 存在しないページ画面に汎用コンテンツを使用するかどうか
-
+ const SK_SHOW_POPUP_STATUS = 'show_popup_status'; // ポップアップメッセージの表示状態
+
/**
* コンストラクタ
*/
} else {
$retValue = $this->gPage->standardLoginLogoutRedirect($request, $success, $url);
}
- if ($retValue == 0){
+ if ($retValue == 0){ // 何も処理を行わなかったとき
if ($this->gEnv->isCurrentUserLogined()){ // ログインしている場合
if ($this->gEnv->isSystemAdmin()){ // システム管理者の場合
+ // ##### ポップアップメッセージ表示状態を取得 #####
+ $popupStatus = intval($this->getWidgetSession(self::SK_SHOW_POPUP_STATUS));
+ if (empty($popupStatus)){ // 1度もメッセージが表示されていない場合
+ // セッションにログイン状態を更新
+ $this->setWidgetSession(self::SK_SHOW_POPUP_STATUS, 1);
+
+ // ログイン直後のダッシュボードでメッセージを表示
+ $message = $this->gInstance->getMessageManager()->getMessage(MessageManager::MSG_ADMIN_POPUP_LOGIN, $this->_langId);
+ if (!empty($message)) $this->gInstance->getMessageManager()->addPopupMsg($message);
+ }
+
// 表示画面を決定
$task = $request->trimValueOf(M3_REQUEST_PARAM_OPERATION_TASK);
$taskSrc = $task;
} else { // ログインしていないとき
// メッセージは何も表示しないでログイン画面へ
}
- } else if ($retValue == 1 && $success == false){ // ログイン失敗の場合
- $this->SetMsg(self::MSG_APP_ERR, $this->_('Failed to login.')); // ログインに失敗しました
- if (!empty($url)) $this->redirectUrl = $url; // リダイレクト先が設定されている場合は再設定
+ } else if ($retValue == 1){ // ログインの場合
+ if (!$success){ // ログイン失敗の場合
+ $this->SetMsg(self::MSG_APP_ERR, $this->_('Failed to login.')); // ログインに失敗しました
+ if (!empty($url)) $this->redirectUrl = $url; // リダイレクト先が設定されている場合は再設定
+ }
} else if ($retValue == 3){ // パスワード送信のとき
// $this->setGuidanceMsg($this->_('Password sent.')); // パスワードを送信しました
$this->setSuccessMsg($this->_('Password sent.')); // パスワードを送信しました
*\r
* @package Magic3 Framework\r
* @author 平田直毅(Naoki Hirata) <naoki@aplo.co.jp>\r
- * @copyright Copyright 2006-2014 Magic3 Project.\r
+ * @copyright Copyright 2006-2016 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
$(function() {\r
m3SetConfigTable('config_table');\r
+ m3SetConfigTable('config_table2');\r
});\r
//]]>\r
</script>\r
<form method="post" name="main">\r
<input type="hidden" name="task" value="configmessage" />\r
<input type="hidden" name="act" />\r
-<h3><span {_HELP_CONFIGMESSAGE_MESSAGE}>メッセージ</span></h3>\r
+<h3><span {_HELP_CONFIGMESSAGE_MESSAGE}>ã\83\95ã\83ã\83³ã\83\88ç\94»é\9d¢ç\94¨ã\83¡ã\83\83ã\82»ã\83¼ã\82¸</span></h3>\r
<table id="config_table">\r
<tbody>\r
<tr>\r
</tr>\r
</tbody>\r
</table>\r
+<h3>管理画面用メッセージ</h3>\r
+<table id="config_table2">\r
+ <tbody>\r
+ <tr>\r
+ <th><span {_HELP_CONFIGMESSAGE_ADMIN_POPUP_LOGIN}>ログイン時<br />ポップアップ</span></th>\r
+ <td><input type="text" name="item_msg_admin_popup_login" class="form-control" value="{MSG_ADMIN_POPUP_LOGIN}" maxlength="200" />\r
+ </td>\r
+ </tr>\r
+ </tbody>\r
+</table>\r
<div class="well m3config_update_buttons"><input type="button" class="button" onclick="updateItem();" value="更新" /></div>\r
</form>\r
</div>\r