diff --git a/.gitignore b/.gitignore index 71a9b13..36b49f3 100644 --- a/.gitignore +++ b/.gitignore @@ -26,3 +26,17 @@ /.settings /.buildpath /.project + +# MacOSXシステムファイル無視設定 +.DS_Store +__MACOSX +thumbs.db +._* +.Spotlight-V100 +.Trashes + +# Windowsシステムファイル無視設定 +Thumbs.db +ehthumbs.db +Desktop.ini +$RECYCLE.BIN/ diff --git a/docs/CHANGES.txt b/docs/CHANGES.txt old mode 100644 new mode 100755 index f8888ac..0f85e08 --- a/docs/CHANGES.txt +++ b/docs/CHANGES.txt @@ -1,6 +1,68 @@ - NetComomns2 Changelog + NetCommons2 Changelog =============================== +2015/03/19: Version 2.4.2.1 +- PHP5.6対応 +- 脆弱性に関する修正 +- IE11対応 +- IE10以上の場合は互換表示にする修正 +- IE7のとき、プルダウンメニューテンプレートのものを使用しているとJSエラーが発生する問題への対応 +- SQLエラー時のメッセージ変更 +- インポート・エクスポート・ダウンロード時に環境依存文字が文字化けする問題への対応 +- 日本語ファイルのダウンロード時に文字化けする問題の対応 +- action_nameの形式によってはNoticeが発生する問題への対応 +- PHP5.2.7以上の環境だとエラーログが表示されない問題への対応 +- トップページでページスタイルダイアログの設定ができない問題への対応 +- mysqli使用時でも正常に動作するように修正 +- smarty_cacheが溜まらない不具合の修正 +- リクエストパラメータのlangでNoticeが発生する不具合の修正 +- ファイルを削除する処理でwarningが発生する場合がある不具合の修正(XAMPPの場合のみ発生) +- WYSIWYGの箇条書きで全角入力すると、先頭の文字が2行目に表示される不具合の修正 +- WYSIWYGで、一般権限でyoutubeを貼り付けても消える問題の修正 +- バックアップのリストア時、メモリを節約するように修正 +- クリーンアップで削除するまでの期間を正しく計算していない不具合の修正 +- ルーム管理の設定をすることで、当該ルームに配置してあるグループ枠中の配置が全て消される不具合の対応 +- ルーム管理で公開中⇔準備中の切り替えがサブルームに反映されない不具合の修正 +- システム管理とページスタイル設定のページ/サイトの説明とキーワードの表示順を統一するように修正 +- キャビネットでファイル・フォルダがないときにソートするとjavascriptエラーとなる不具合の修正 +- カレンダーで時間順⇔会員順を切り替えるとエラーとなることがある不具合の修正 +- カレンダーで12/31の年単位の繰り返しが正常に登録されない不具合の修正 +- 回覧板でログインしていないと検索モジュールの検索でエラーが発生するため修正 +- 回覧板のtextのデータ型のDefault指定を削除 +- 日誌のトラックバックの不具合の修正 +- 日誌のラベルの「by:」を「by 」に修正 +- 汎用DBで、状態項目を数値化するように修正 +- 汎用DBの、重複している条件式を削除 +- 汎用DBの検索で、ハンドルに「?」を入力するとエラーになる不具合の修正 +- 汎用DBの検索で、ソート順判定処理の条件分岐の修正 +- プライベートメッセージの不要なコメントの削除 +- アンケートで質問の編集リンクが効かないことがある不具合の修正 +- 登録フォームで英語の一部言語が未定義だったため修正 +- 登録フォームでメールアドレス欄が複数ある場合の不具合の修正 +- 施設予約の変数名を一部修正 +- RSSでPHP5.3以上の環境でwarningが出る問題への対応 +- 新着情報でタイトルが入らない場合がある不具合の修正 + + + +2013/08/29: Version 2.4.2.0 +- メニューでプルダウンテンプレートを追加 +- メニューでパンくずリストテンプレートを追加 +- ルーム管理で参加会員エクスポート、インポート機能を追加 +- 施設予約で時間枠機能を追加 +- アンケートでキーフレーズ機能を追加 +- アンケートで回答非表示機能を追加 +- Todoにブロックコピー機能を追加 +- PHP5.4暫定対応 +- GitHub無視ファイルの定義を追加 +- Thumbs.dbファイルを削除 +- ソースコードのインデントを一部修正 +- 会員登録で択一選択の必須入力エラーメッセージが正しく表示されるように修正 +- カレンダーでセンターカラム以外に配置した時のデフォルトルームを表示しているルームになるように修正 +- フォトアルバムがIE10で動作しない不具合を修正 + + + 2013/05/20: Version 2.4.1.0 =============================== - 会員の新規申込みで複数選択項目があった場合、その項目を条件とした会員検索にヒットしないバグを修正 diff --git a/html/htdocs/index.php b/html/htdocs/index.php index 047f140..bc87e65 100644 --- a/html/htdocs/index.php +++ b/html/htdocs/index.php @@ -15,7 +15,7 @@ * @access public */ if (version_compare(phpversion(), '5.3.0', '>=')) { - error_reporting(E_ALL ^ E_DEPRECATED); + error_reporting(E_ALL & ~E_DEPRECATED & ~E_STRICT); } else { error_reporting(E_ALL); } diff --git a/html/index.php b/html/index.php index 907e236..23b2e18 100644 --- a/html/index.php +++ b/html/index.php @@ -15,7 +15,7 @@ * @access public */ if (version_compare(phpversion(), '5.3.0', '>=')) { - error_reporting(E_ALL ^ E_DEPRECATED); + error_reporting(E_ALL & ~E_DEPRECATED & ~E_STRICT); } else { error_reporting(E_ALL); } diff --git a/html/maple/core/FilterChain.class.php b/html/maple/core/FilterChain.class.php index 7f44f14..e32ed17 100644 --- a/html/maple/core/FilterChain.class.php +++ b/html/maple/core/FilterChain.class.php @@ -114,7 +114,7 @@ function add($name, $alias = '') // // ファイルが存在していなければエラー // - if (!(@include_once $filename) or !class_exists($className)) { + if (!(include_once $filename) or !class_exists($className)) { $log->error("存在していないFilterが指定されています(${name}[alias:${alias}])", "FilterChain#add"); return false; } diff --git a/html/maple/filter/Filter_AllowIdList.class.php b/html/maple/filter/Filter_AllowIdList.class.php index 483fe6d..c59abf4 100644 --- a/html/maple/filter/Filter_AllowIdList.class.php +++ b/html/maple/filter/Filter_AllowIdList.class.php @@ -285,7 +285,7 @@ function setShowPagesList() { $params = array(); if($where_params) { - $where_str = $this->_db->getWhereSQL(&$params, &$where_params, false); + $where_str = $this->_db->getWhereSQL($params, $where_params, false); $sql .= $where_str; if(!empty($sql2)) $sql2 .= $where_str; diff --git a/html/maple/filter/Filter_RequestCheck.class.php b/html/maple/filter/Filter_RequestCheck.class.php index e1491ed..2e97ac3 100644 --- a/html/maple/filter/Filter_RequestCheck.class.php +++ b/html/maple/filter/Filter_RequestCheck.class.php @@ -18,130 +18,130 @@ * @access public */ class Filter_RequestCheck extends Filter { - + var $_container; var $_log; var $_filterChain; - + var $_actionChain; - + var $_request; - + var $_className; - - /** - * コンストラクター - * - * @access public - */ - function Filter_RequestCheck() { - parent::Filter(); - } - - /** - * Viewの処理を実行 - * - * @access public - **/ - function execute() { - $this->_container =& DIContainerFactory::getContainer(); + + /** + * コンストラクター + * + * @access public + */ + function Filter_RequestCheck() { + parent::Filter(); + } + + /** + * Viewの処理を実行 + * + * @access public + **/ + function execute() { + $this->_container =& DIContainerFactory::getContainer(); $this->_log =& LogFactory::getLog(); $this->_filterChain =& $this->_container->getComponent("FilterChain"); $this->_actionChain =& $this->_container->getComponent("ActionChain"); $this->_request =& $this->_container->getComponent("Request"); - + $this->_className = get_class($this); - - $this->_prefilter(); - + + $this->_prefilter(); + $this->_log->trace("{$this->_className}の前処理が実行されました", "{$this->_className}#execute"); - + $this->_filterChain->execute(); $this->_postfilter(); $this->_log->trace("{$this->_className}の後処理が実行されました", "{$this->_className}#execute"); - } - - /** + } + + /** * プレフィルタ * 初期処理を行う * @access private */ function _prefilter() { - $errorList =& $this->_actionChain->getCurErrorList(); - if ($errorList->isExists()) { - //既にエラーがあればそのまま返却 - return; - } - //アクション名取得 - $action_name = $this->_actionChain->getCurActionName(); - $pathList = explode("_", $action_name); - $attributes = $this->getAttributes(); - if (isset($attributes["request"])) { - if ($attributes["request"] == "BOTH" || $this->_request->getMethod() == $attributes["request"]) { - //登録処理の場合、リファラチェック - if ($this->_request->getMethod() == "POST" && $this->_refcheck()) { - return; - } else if($this->_request->getMethod() == "GET"){ - return; - } - } - } else if ($this->_request->getMethod() == "POST" && isset($_FILES) && (0 < count($_FILES))) { - //ファイルアップロード処理の場合、リファラチェック - if ($this->_refcheck()) { - return; - } - } else { - //Default - //system_view(action)_XXXX - $i = 1; - //if($pathList[1] == "system" && isset($pathList[2])) { - // $i = 2; - //} - if($pathList[$i] != "action" && $pathList[$i] != "view") { - //module名_action or module名_viewのどちらでもない場合、チェックしない - return; - }else if ($this->_request->getMethod() == "POST" && $pathList[$i] == "action") { - //登録処理の場合、リファラチェック - if (isset($attributes["refcheck"]) && $attributes["refcheck"] == "none") { - return; - } - if ($this->_refcheck()) { - return; - } - } else if($this->_request->getMethod() == "GET" && $pathList[$i] == "view"){ - return; - } - } - //エラー - $errorList->add("RquestCheck_Error", sprintf(_REQUESTCHECK_FAILURE,CURRENT_URL)); - $errorList->setType(VALIDATE_ERROR_TYPE); //VALIDATE_ERRORとする - return; - + $errorList =& $this->_actionChain->getCurErrorList(); + if ($errorList->isExists()) { + //既にエラーがあればそのまま返却 + return; + } + //アクション名取得 + $action_name = $this->_actionChain->getCurActionName(); + $pathList = explode("_", $action_name); + $attributes = $this->getAttributes(); + if (isset($attributes["request"])) { + if ($attributes["request"] == "BOTH" || $this->_request->getMethod() == $attributes["request"]) { + //登録処理の場合、リファラチェック + if ($this->_request->getMethod() == "POST" && $this->_refcheck()) { + return; + } else if($this->_request->getMethod() == "GET"){ + return; + } + } + } else if ($this->_request->getMethod() == "POST" && isset($_FILES) && (0 < count($_FILES))) { + //ファイルアップロード処理の場合、リファラチェック + if ($this->_refcheck()) { + return; + } + } else { + //Default + //system_view(action)_XXXX + $i = 1; + //if($pathList[1] == "system" && isset($pathList[2])) { + // $i = 2; + //} + if($pathList[$i] != "action" && $pathList[$i] != "view") { + //module名_action or module名_viewのどちらでもない場合、チェックしない + return; + }else if ($this->_request->getMethod() == "POST" && $pathList[$i] == "action") { + //登録処理の場合、リファラチェック + if (isset($attributes["refcheck"]) && $attributes["refcheck"] == "none") { + return; + } + if ($this->_refcheck()) { + return; + } + } else if($this->_request->getMethod() == "GET" && $pathList[$i] == "view"){ + return; + } + } + //エラー + $errorList->add("RquestCheck_Error", sprintf(_REQUESTCHECK_FAILURE,CURRENT_URL)); + $errorList->setType(VALIDATE_ERROR_TYPE); //VALIDATE_ERRORとする + return; + } - + /** * リファラチェック * @access private */ function _refcheck() { - $ref = isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : ''; - if ($ref != '' && strpos($ref, BASE_URL) === 0) { - return true; - } - // httpsの場合 - $ssl_base_url = preg_replace("/^http:\/\//i","https://", BASE_URL); - if ($ref != '' && strpos($ref, $ssl_base_url) === 0) { - return true; - } - return false; + $ref = isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : ''; + if ($ref != '' && strpos($ref, BASE_URL) === 0) { + return true; + } + // httpsの場合 + $ssl_base_url = preg_replace("/^http:\/\//i","https://", BASE_URL); + if ($ref != '' && strpos($ref, $ssl_base_url) === 0) { + return true; + } + return false; } - + /** * ポストフィルタ * @access private diff --git a/html/maple/filter/Filter_SetConfig.class.php b/html/maple/filter/Filter_SetConfig.class.php index efa0554..eb017b0 100644 --- a/html/maple/filter/Filter_SetConfig.class.php +++ b/html/maple/filter/Filter_SetConfig.class.php @@ -243,7 +243,7 @@ function _prefilter() } // 言語セット - $_lang = $this->_request->getParameter('lang'); + $_lang = trim($this->_request->getParameter('lang')); if(!empty($_lang)) { $languages = $this->_languagesView->getLanguages(array("lang_dirname"=>$_lang)); if (!isset($languages[0])) { @@ -387,7 +387,7 @@ function _prefilter() $this->_session->setParameter("_php_debug",$php_debug); if ($php_debug && version_compare(phpversion(), '5.3.0', '>=')) { - error_reporting(E_ALL ^ E_DEPRECATED); + error_reporting(E_ALL & ~E_DEPRECATED & ~E_STRICT); } elseif ($php_debug) { error_reporting(E_ALL); } else { diff --git a/html/maple/generate/script/generate.php b/html/maple/generate/script/generate.php index 6c74f17..943c7ad 100644 --- a/html/maple/generate/script/generate.php +++ b/html/maple/generate/script/generate.php @@ -23,7 +23,7 @@ define('BASE_DIR', dirname(dirname(dirname(dirname(__FILE__))))); -error_reporting(E_ALL ^ E_DEPRECATED); +error_reporting(E_ALL & ~E_DEPRECATED & ~E_STRICT); //error_reporting(0); define('DEBUG_MODE', 0); diff --git a/html/maple/logger/Logger_ViewDisplayManage.class.php b/html/maple/logger/Logger_ViewDisplayManage.class.php index 3898f57..6214939 100644 --- a/html/maple/logger/Logger_ViewDisplayManage.class.php +++ b/html/maple/logger/Logger_ViewDisplayManage.class.php @@ -147,7 +147,9 @@ function setLoggerHandle($errNo, $errStr, $errFile, $errLine=NULL) $write_flag = false; if($errNo != LEVEL_SQL) { - if (defined("PHP_DEBUG")) { + if ((version_compare(phpversion(), '5.2.7', '>=') && PHP_DEBUG==true) + || + (version_compare(phpversion(), '5.2.7', '<') && defined("PHP_DEBUG"))) { if(PHP_DEBUG) $php_debug = 1; else diff --git a/html/maple/nccore/RequestExtra.class.php b/html/maple/nccore/RequestExtra.class.php index a639fe2..4467165 100644 --- a/html/maple/nccore/RequestExtra.class.php +++ b/html/maple/nccore/RequestExtra.class.php @@ -102,7 +102,7 @@ function _rawurlDecode(&$params, $security_chk_flag = false) { } if(is_array($value)) { - $this->_rawurlDecode($params[$key]); + $this->_rawurlDecode($params[$key], $security_chk_flag); } else { if($security_chk_flag) { // ヌル文字列をスペースに変更する diff --git a/html/maple/nccore/SecurityManager.class.php b/html/maple/nccore/SecurityManager.class.php index 03fcff9..600a01d 100644 --- a/html/maple/nccore/SecurityManager.class.php +++ b/html/maple/nccore/SecurityManager.class.php @@ -126,7 +126,7 @@ function chkContamiAction($key) { // Variables contamination if( $this->_config[_SECURITY_CONF_CATID]['contami_action']['conf_value'] && - in_array($key, $this->bad_globals) ) { + in_array($key, $this->bad_globals, true) ) { $this->message = sprintf(_SECURITY_CONTAMI_ACTION_ERROR, $key); $user_id = $this->_session->getParameter("_user_id"); $this->outputLog( 'CONTAMI', $user_id) ; diff --git a/html/maple/nccore/SessionExtra.class.php b/html/maple/nccore/SessionExtra.class.php index 9955b86..679fdc5 100644 --- a/html/maple/nccore/SessionExtra.class.php +++ b/html/maple/nccore/SessionExtra.class.php @@ -230,7 +230,16 @@ function start($regenerate_flag = _ON) // smarty_cacheのセッションIDも同時に更新 // Cacheフィルターがうまく動作しなくなるため $adodb =& $this->_db->getAdoDbObject(); - if(is_object($adodb)) { + $container =& DIContainerFactory::getContainer(); + $actionChain =& $container->getComponent("ActionChain"); + if($actionChain->getCurActionName() == "login_action_main_init") { + $params = array( + "base_sess_id" => $_base_sess_id, + "sess_id" => $this->new_session_id, + ); + $result = $this->_db->execute("DELETE FROM {session} " . + " WHERE base_sess_id = ? AND sess_id != ? ",$params); + } else if(is_object($adodb)) { $this->_db->updateExecute("smarty_cache", array("session_id" => $this->new_session_id), array("session_id" => $this->old_session_id)); if(rand(0, $this->regenerate_session_num) == 0) { // regenerate_session_num分の1の確立で、regenerate前のセッションデータ削除 diff --git a/html/maple/nccore/SmartyTemplate.class.php b/html/maple/nccore/SmartyTemplate.class.php index 79d4ee5..c77153c 100644 --- a/html/maple/nccore/SmartyTemplate.class.php +++ b/html/maple/nccore/SmartyTemplate.class.php @@ -767,7 +767,7 @@ function smartyTemplateCacheHandler($action, &$smarty_obj, &$cache_content, $tpl $time = date("YmdHis",timezone_date(null, true, "U") - $renderer->cache_lifetime); $result = $db->execute("DELETE FROM {smarty_cache} " . - $where_str." OR update_time <'".$time."' ",$params); + $where_str." OR expire_time <'".$time."' ",$params); } else { $result = $db->execute("DELETE FROM {smarty_cache} " . $where_str,$params); diff --git a/html/maple/nccore/TokenExtra.class.php b/html/maple/nccore/TokenExtra.class.php index 19693a0..d15a3da 100644 --- a/html/maple/nccore/TokenExtra.class.php +++ b/html/maple/nccore/TokenExtra.class.php @@ -74,11 +74,17 @@ function build() //_nameを付与することにより複雑にした //多次元配列化 $token_value = $this->getName(); + + $tokenString = $this->_name; + if (is_array($tokenString)) { + $tokenString = '_token'; + } + if(is_array($token_value)) { $token_value = array_merge(array("_token"), $token_value); - $this->_session->setParameter($token_value, md5($this->_name.uniqid(rand(),1))); + $this->_session->setParameter($token_value, md5($tokenString . uniqid(rand(),1))); } else { - $this->_session->setParameter(array("_token",$this->getName()), md5($this->_name.uniqid(rand(),1))); + $this->_session->setParameter(array("_token",$this->getName()), md5($tokenString . uniqid(rand(),1))); } } diff --git a/html/maple/nccore/db/DbObjectAdodb.class.php b/html/maple/nccore/db/DbObjectAdodb.class.php index ac84a6d..8258c9e 100644 --- a/html/maple/nccore/db/DbObjectAdodb.class.php +++ b/html/maple/nccore/db/DbObjectAdodb.class.php @@ -55,7 +55,7 @@ class DbObjectAdodb /** * DSNをセットする - *  + * * @param string $dsn DSN $driver://$username:$password@hostname/$database * @access public */ @@ -65,7 +65,7 @@ function setDsn($dsn) { /** * DSNをゲットする - *  + * * @return string $dsn DSN $driver://$username:$password@hostname/$database * @access public */ @@ -75,7 +75,7 @@ function getDsn() { /** * Prefixをセットする - *  + * * @param string $prefix * @access public */ @@ -85,7 +85,7 @@ function setPrefix($prefix) { /** * Prefixをゲットする - *  + * * @return string $prefix * @access public */ @@ -106,7 +106,7 @@ function setOption($key, $value) { /** * 接続時のoptionをゲットする - *  + * * @return array $option * @access public */ @@ -130,7 +130,7 @@ function setDebugMode($debugMode=true) { /** * デバッグモードをゲットする - *  + * * @return bool $debugMode デバッグモードをセットする * @access public */ @@ -186,7 +186,11 @@ function connect() { // http://php.net/manual/ja/function.mysql-set-charset.php if (version_compare(phpversion(), '5.2.3', '>=') && $server_info['version'] >= '5.0.7') { - mysql_set_charset(DATABASE_CHARSET); + if (strpos($this->_dsn, 'mysqli') === 0) { + $this->_conn->SetCharSet(DATABASE_CHARSET); + } else { + mysql_set_charset(DATABASE_CHARSET); + } } } @@ -236,7 +240,7 @@ function setSql($sql) { /** * デバッグモードをゲットする - *  + * * @return string $sql 実行するSQL文 * @access public */ @@ -295,6 +299,15 @@ function execute($sql, $params = array(), $limit = 0, $offset = 0, $key_flag = t else $this->_conn->SetFetchMode(ADODB_FETCH_NUM); + // paramsのvalueに配列の入力パラメータがはいった場合、adodb内で複数のSQLを実行しようとするため、ここで対処。 + if (is_array($params)) { + foreach($params as $param) { + if (is_array($param)) { + return false; + } + } + } + if ($limit || $offset) { $result =& $this->_conn->SelectLimit($sql, $limit, $offset, $params); } else { @@ -552,7 +565,7 @@ function &getSelectSQL($tableName, &$params, &$where_params, &$order_params) * パラメータよりwhere文を生成し返す * @param array $params WHERE句のデータ配列 * @param array $where_params キー名称配列、whereデータ配列 - * @param array $where_prefix_flag 接頭語句をANDでなくwhereにして返す場合、true defaut:true + * @param array $where_prefix_flag 接頭語句をANDでなくwhereにして返す場合、true default:true * @return string where文 * @access public */ @@ -579,15 +592,19 @@ function &getWhereSQL(&$params, &$where_params, $where_prefix_flag = true) /** * パラメータよりorder文を生成し返す * @param array $order_params キー名称配列、orderデータ配列 + * @param array $allow_keys キー名称で設定できるカラムの配列 * @return string order文 * @access public */ - function &getOrderSQL(&$order_params) + function &getOrderSQL(&$order_params, $allow_keys = array()) { $sql_order = ""; if (!empty($order_params)) { foreach ($order_params as $key=>$item) { - $sql_order .= ",".$key." ".(empty($item) ? "ASC" : $item); + if (!empty($allow_keys) && !in_array($key, $allow_keys)) { + $key = $allow_keys[0]; + } + $sql_order .= ",".$key." ".((empty($item) || ($item != 'DESC' && $item != 'desc')) ? "ASC" : $item); } } $sql_order = ($sql_order ? " ORDER BY ".substr($sql_order,1) : ""); @@ -620,7 +637,7 @@ function &selectExecute($tableName, $where_params=null, $order_params=null, $lim /** * テーブルInsert - *  + * * @param string $tableName 対象テーブル名称 * @param array $params キー名称配列、パラメータ配列 * @param boolean true or false insert_time-update_user_nameを自動的に付与する @@ -647,7 +664,7 @@ function insertExecute($tableName, $params=array(), $footer_flag=false, $create_ /** * テーブルUpdate - *  + * * @param string $tableName 対象テーブル名称 * @param array $params キー名称配列、更新カラム配列 * @param array $where_params キー名称配列、whereデータ配列 @@ -667,7 +684,7 @@ function updateExecute($tableName, $params=array(), $where_params=array(), $foot /** * テーブルDelete - *  + * * @param string $tableName 対象テーブル名称 * @param array $where_params キー名称配列、whereデータ配列 * @return boolean true or false @@ -899,8 +916,10 @@ function addError($error_no=null, $error_mes=null) $session =& $container->getComponent("Session"); if(isset($session) && $session->getParameter("_php_debug") == _ON) { $errorList->add($this->ErrorNo(), $this->ErrorMsg(). ":\n". $this->_bck_sql); + } else if (defined('_INVALID_INPUT')) { + $errorList->add($this->ErrorNo(), _INVALID_INPUT); } else { - $errorList->add($this->ErrorNo(), "SQL Error!"); + $errorList->add($this->ErrorNo(), "Security Error! Unauthorized input."); } } else { $errorList->add($error_no, $error_mes); @@ -909,7 +928,7 @@ function addError($error_no=null, $error_mes=null) /** * MATCH AGAINST用の文字列に変換する - *  + * * @return bool $debugMode デバッグモードをセットする * @access public */ diff --git a/html/maple/nccore/db/adodb/cute_icons_for_site/Thumbs.db b/html/maple/nccore/db/adodb/cute_icons_for_site/Thumbs.db deleted file mode 100644 index 0ae45f3..0000000 Binary files a/html/maple/nccore/db/adodb/cute_icons_for_site/Thumbs.db and /dev/null differ diff --git a/html/webapp/components/authcheck/Main.class.php b/html/webapp/components/authcheck/Main.class.php index 6f6643c..ced6aea 100644 --- a/html/webapp/components/authcheck/Main.class.php +++ b/html/webapp/components/authcheck/Main.class.php @@ -349,7 +349,7 @@ function AuthCheck($action_name, $page_id, $block_id) { $isMobileAction = ($pathList[0] == 'common' && $pathList[1] == 'mobile'); $isMobileAction = ($isMobileAction - || $pathList[2] == 'mobile'); + || isset($pathList[2]) && $pathList[2] == 'mobile'); if ($isMobileAction && empty($mobile_flag)) { return false; diff --git a/html/webapp/components/calendar/Action.class.php b/html/webapp/components/calendar/Action.class.php old mode 100644 new mode 100755 index a96a882..84a9a46 --- a/html/webapp/components/calendar/Action.class.php +++ b/html/webapp/components/calendar/Action.class.php @@ -713,6 +713,7 @@ function _insertYearly($params, &$rrule, $first=false, $bymonthday=0) $bymonthday = intval(substr($start_date,6,2)); } + $result = true; $current_month = intval(substr($start_date,4,2)); foreach ($rrule["BYMONTH"] as $i=>$month) { if ($first && $current_month > $month) { continue; } @@ -724,7 +725,8 @@ function _insertYearly($params, &$rrule, $first=false, $bymonthday=0) } else { $params["start_date"] = substr($start_date,0,4).sprintf("%02d",$month)."01"; $params["start_time"] = $start_time; - $params["end_date"] = substr($end_date,0,4).sprintf("%02d",$month).sprintf("%02d", 1 + $diff_num); + // end_dateにはstart_date + $diff_numの日付をセット(12/31の場合に翌年がセットされるため) + $params["end_date"] = substr($start_date,0,4) . sprintf("%02d", $month) . sprintf("%02d", 1 + $diff_num); $params["end_time"] = $end_time; } if (!empty($rrule["BYDAY"]) && count($rrule["BYDAY"]) > 0) { @@ -736,10 +738,16 @@ function _insertYearly($params, &$rrule, $first=false, $bymonthday=0) return false; } } - $params["start_date"] = timezone_date($start_date.$start_time, true, "Ymd"); - $params["start_time"] = timezone_date($start_date.$start_time, true, "His"); - $params["end_date"] = timezone_date($end_date.$end_time, true, "Ymd"); - $params["end_time"] = timezone_date($end_date.$end_time, true, "His"); + $startDate = $start_date.$start_time; + $endDate = $end_date.$end_time; + if (is_array($result)) { + list($startDate, $endDate) = $result; + } + + $params["start_date"] = timezone_date($startDate, true, "Ymd"); + $params["start_time"] = timezone_date($startDate, true, "His"); + $params["end_date"] = timezone_date($endDate, true, "Ymd"); + $params["end_time"] = timezone_date($endDate, true, "His"); if (!empty($rrule["BYDAY"]) && count($rrule["BYDAY"]) > 0) { return $this->_insertYearly($params, $rrule); @@ -749,8 +757,10 @@ function _insertYearly($params, &$rrule, $first=false, $bymonthday=0) } /** - * 登録処理 + * 登録処理(年単位-開始日と同日) * + * @return mixed boolean true:登録せず終了 false:失敗 + * array 登録成功: array(登録した開始年月日時分秒, 登録した終了年月日時分秒) * @access private */ function __insertYearlyByMonthday($params, &$rrule, $bymonthday, $first) @@ -798,13 +808,15 @@ function __insertYearlyByMonthday($params, &$rrule, $bymonthday, $first) if ($calendar_id === false) { return false; } else { - return true; + return array($start_date.$start_time, $end_date.$end_time); } } /** - * 登録処理 + * 登録処理(年単位-第○週○曜日) * + * @return mixed boolean true:登録せず終了 false:失敗 + * array 登録成功: array(登録した開始年月日時分秒, 登録した終了年月日時分秒) * @access private */ function __insertYearlyByday($params, &$rrule, $first=false) @@ -862,7 +874,7 @@ function __insertYearlyByday($params, &$rrule, $first=false) if ($calendar_id === false) { return false; } else { - return true; + return array($start_date.$start_time, $end_date.$end_time); } } diff --git a/html/webapp/components/common/Main.class.php b/html/webapp/components/common/Main.class.php old mode 100644 new mode 100755 index febd5c0..460b2c0 --- a/html/webapp/components/common/Main.class.php +++ b/html/webapp/components/common/Main.class.php @@ -187,7 +187,7 @@ function viewAssign(&$renderer) { $renderer->assign('module_id',$modules[$pathList[0]]['module_id']); } else { $module_id = 0; - $renderer->assign('module_obj',""); + $renderer->assign('module_obj', array()); $renderer->assign('module_id',0); } @@ -465,13 +465,11 @@ function redirectHeader($url="", $time = 2, $message = "") if($url == "") { $url = BASE_URL.INDEX_FILE_NAME."?".ACTION_KEY."=".DEFAULT_ACTION; } - //$url = htmlspecialchars(str_replace("?action=","?_sub_action=",str_replace("&","@",BASE_URL.INDEX_FILE_NAME.$this->_request->getStrParameters(false))), ENT_QUOTES); $renderer =& SmartyTemplate::getInstance(); $renderer->assign('header_field',$meta); $renderer->assign('time', $time); - $renderer->assign('url',$url); - $renderer->assign('lang_ifnotreload', sprintf(_IFNOTRELOAD,$url)); + $renderer->assign('redirect_url', $url); if($message != "") { $renderer->assign('redirect_message', $message); } else { diff --git a/html/webapp/components/csv/Main.class.php b/html/webapp/components/csv/Main.class.php index 90c8b4c..4b6c544 100644 --- a/html/webapp/components/csv/Main.class.php +++ b/html/webapp/components/csv/Main.class.php @@ -60,7 +60,7 @@ class Csv_Main */ function Csv_Main() { $this->_LE = "\n"; - $this->charSet = "SJIS"; + $this->charSet = _CLIENT_OS_CHARSET; $this->mimeType = "document/unknown"; $this->division = ","; $this->extension = ".csv"; diff --git a/html/webapp/components/escape/Text.class.php b/html/webapp/components/escape/Text.class.php index 85f158e..7572899 100644 --- a/html/webapp/components/escape/Text.class.php +++ b/html/webapp/components/escape/Text.class.php @@ -234,9 +234,9 @@ function escapeWysiwyg(&$string) { continue; } } else { - // ./ と ../ の許可 - if($attribute_split[2] != "#" && !preg_match("/^\.\//", $attribute_split[2]) && !preg_match("/^\.\.\//", $attribute_split[2])) { - $attribute_split[2] = "./".$attribute_split[2]; + // ./ と ../ とvideo の許可 + if($attribute_split[2] != "#" && !preg_match("/^\.\//", $attribute_split[2]) && !preg_match("/^\.\.\//", $attribute_split[2]) && !$this->_checkVideoURL($attribute_split[2], $allowable_video)) { + $attribute_split[2] = "./".$attribute_split[2]; } } } @@ -445,6 +445,11 @@ function _escapeWysiwygAllowHtmltag($string) { $script_flag = false; foreach ($parts as $part) { // script-/scriptまではそのまま連結 + if(preg_match("/<\/script>$/u", $part)) { + $script_flag = false; + $string .= $part; + continue; + } if(preg_match("/^/u", $part) || $script_flag == true) { $script_flag = true; if (preg_match("/<\!\-\-comment\-\->/u", $part)) { @@ -453,10 +458,6 @@ function _escapeWysiwygAllowHtmltag($string) { } $string .= $part; continue; - } else if(preg_match("/<\/script>$/u", $part)) { - $script_flag = false; - $string .= $part; - continue; } if (preg_match("/<\!\-\-comment\-\->/u", $part)) { diff --git a/html/webapp/components/holiday/View.class.php b/html/webapp/components/holiday/View.class.php index 2b544c1..2f81c74 100644 --- a/html/webapp/components/holiday/View.class.php +++ b/html/webapp/components/holiday/View.class.php @@ -116,6 +116,12 @@ function getYear($year=null, $lang=null, $sort_col="holiday", $sort_dir="ASC") $session =& $this->_container->getComponent("Session"); $lang = $session->getParameter("_lang"); } + if (!in_array($sort_col, array('holiday', 'summary'))) { + $sort_col = 'holiday'; + } + if ($sort_dir != 'DESC') { + $sort_dir = 'ASC'; + } $sql = "SELECT * FROM {holiday} "; $sql .= "WHERE lang_dirname = ? "; $sql .= "AND holiday >= ? "; diff --git a/html/webapp/components/monthlynumber/View.class.php b/html/webapp/components/monthlynumber/View.class.php index 2414e19..b7e8c9c 100644 --- a/html/webapp/components/monthlynumber/View.class.php +++ b/html/webapp/components/monthlynumber/View.class.php @@ -144,33 +144,33 @@ function getMonthlyNumberList($year, $room_id = null, $user_id = null, $role_aut } //$_user_auth_id = $session->getParameter("_user_auth_id"); - if($room_id != null) { - //ルーム管理:ルーム毎のSUM - $params = array( - //"user_id"=>$user_id, - "room_id"=>$room_id - //"sub_room_id"=>$room_id - ); - $sql = "SELECT {pages}.page_id,{pages}.root_id, {pages}.parent_id,{pages}.thread_num, {pages}.display_sequence, {pages}.page_name, {pages}.private_flag, {pages}.space_type, {monthly_number}.name, {monthly_number}.year, {monthly_number}.month, SUM({monthly_number}.number) AS number " . - " FROM {pages} "; + if($room_id != null) { + //ルーム管理:ルーム毎のSUM + $params = array( + //"user_id"=>$user_id, + "room_id"=>$room_id + //"sub_room_id"=>$room_id + ); + $sql = "SELECT {pages}.page_id,{pages}.root_id, {pages}.parent_id,{pages}.thread_num, {pages}.display_sequence, {pages}.page_name, {pages}.private_flag, {pages}.space_type, {monthly_number}.name, {monthly_number}.year, {monthly_number}.month, SUM({monthly_number}.number) AS number " . + " FROM {pages} "; $sql .= " LEFT JOIN {monthly_number} ON {pages}.room_id = {monthly_number}.room_id "; //$sql .= " LEFT JOIN {pages_users_link} ON {pages}.room_id = {pages_users_link}.room_id AND {pages_users_link}.room_id = ? "; - $sql .= " WHERE 1=1 "; + $sql .= " WHERE 1=1 "; - } else { - $params = array( - "user_id"=>$user_id, - "user_id_monthly"=>$user_id - ); + } else { + $params = array( + "user_id"=>$user_id, + "user_id_monthly"=>$user_id + ); $sql = "SELECT {pages}.page_id, {pages}.root_id, {pages}.parent_id, {pages}.thread_num, {pages}.display_sequence, {pages}.page_name, {pages}.private_flag, {pages}.space_type, {monthly_number}.name, {monthly_number}.year, {monthly_number}.month, {monthly_number}.number " . - " FROM {pages} "; + " FROM {pages} "; $sql .= " LEFT JOIN {monthly_number} ON {pages}.room_id = {monthly_number}.room_id AND {monthly_number}.user_id = ? "; - $sql .= " LEFT JOIN {pages_users_link} ON {pages}.room_id = {pages_users_link}.room_id AND {pages_users_link}.user_id = ? "; + $sql .= " LEFT JOIN {pages_users_link} ON {pages}.room_id = {pages_users_link}.room_id AND {pages_users_link}.user_id = ? "; - $sql .= " WHERE (({pages}.private_flag = "._ON." " . - "AND {pages_users_link}.user_id IS NOT NULL) OR ({pages}.private_flag = "._OFF." AND ({pages}.space_type = "._SPACE_TYPE_GROUP." OR {pages}.space_type ="._SPACE_TYPE_PUBLIC."))) "; - } + $sql .= " WHERE (({pages}.private_flag = "._ON." " . + "AND {pages_users_link}.user_id IS NOT NULL) OR ({pages}.private_flag = "._OFF." AND ({pages}.space_type = "._SPACE_TYPE_GROUP." OR {pages}.space_type ="._SPACE_TYPE_PUBLIC."))) "; + } //ルームのみ $sql .= " AND {pages}.node_flag = ". _ON . " AND {pages}.room_id = {pages}.page_id "; @@ -237,11 +237,11 @@ function _fetchcallbackMonthlyNumberList($result, $func_params) { // name, thread_num, parent_id, display_sequence $monthly_row_exists["nc".$row['name']][$row['page_id']] = true; - if(!empty($monthly_list["nc".$row['name']][$row['page_id']][$row['month']])) { - $monthly_list["nc".$row['name']][$row['page_id']][$row['month']] = $monthly_list["nc".$row['name']][$row['page_id']][$row['month']] + intval($row['number']); - } else { + //if(!empty($monthly_list["nc".$row['name']][$row['page_id']][$row['month']])) { + // $monthly_list["nc".$row['name']][$row['page_id']][$row['month']] = $monthly_list["nc".$row['name']][$row['page_id']][$row['month']] + intval($row['number']); + //} else { $monthly_list["nc".$row['name']][$row['page_id']][$row['month']] = intval($row['number']); - } + //} if($room_id == 0) { //root_id,parent_idしか考慮しないため、サブグループが2つ以上作れる仕様にしてしまうと diff --git a/html/webapp/components/uploads/Action.class.php b/html/webapp/components/uploads/Action.class.php index fce1a68..8b28673 100644 --- a/html/webapp/components/uploads/Action.class.php +++ b/html/webapp/components/uploads/Action.class.php @@ -550,16 +550,7 @@ function _setFileByPath($set_path, &$files) { } function getEncode() { - if (stristr($_SERVER['HTTP_USER_AGENT'], "Mac")) { - // Macの場合 - $encode = "UTF-8"; - } else if (stristr($_SERVER['HTTP_USER_AGENT'], "Windows")) { - // Windowsの場合 - $encode = "SJIS"; - } else { - $encode = _CHARSET; - } - return $encode; + return _CLIENT_OS_CHARSET; } function setFileTemporaryPath($file_path) { diff --git a/html/webapp/components/uploads/View.class.php b/html/webapp/components/uploads/View.class.php old mode 100644 new mode 100755 index b58970e..d974e04 --- a/html/webapp/components/uploads/View.class.php +++ b/html/webapp/components/uploads/View.class.php @@ -337,9 +337,9 @@ function _headerOutput($filename, $pathname, $filesize, $mimetype, $cache_flag = if (!isset($_SERVER['HTTP_USER_AGENT'])) { //HTTP_USER_AGENTがない場合、 header("Content-disposition: inline; filename=\"".$filename."\""); - } elseif (stristr($_SERVER['HTTP_USER_AGENT'], "MSIE")) { + } elseif (stristr($_SERVER['HTTP_USER_AGENT'], "MSIE") || stristr($_SERVER['HTTP_USER_AGENT'], "Trident")) { // IEの場合 - header("Content-disposition: inline; filename=\"".mb_convert_encoding($filename, "SJIS", _CHARSET)."\""); + header("Content-disposition: inline; filename=\"".mb_convert_encoding($filename, _CLIENT_OS_CHARSET, _CHARSET)."\""); } elseif (stristr($_SERVER['HTTP_USER_AGENT'], "Opera")) { // Operaの場合 header("Content-disposition: attachment; filename=\"".$filename."\""); @@ -350,17 +350,8 @@ function _headerOutput($filename, $pathname, $filesize, $mimetype, $cache_flag = } else { header("Content-disposition: attachment; filename=\"".$filename."\""); } - } elseif (stristr($_SERVER['HTTP_USER_AGENT'], "Chrome")) { - // GoogleChromeの場合 - if (stristr($_SERVER['HTTP_USER_AGENT'], "Windows")) { - // Windows版 - header("Content-disposition: inline; filename=\"".mb_convert_encoding($filename, "SJIS", _CHARSET)."\""); - } else { - // それ以外 - header("Content-disposition: inline; filename=\"".$filename."\""); - } } else { - // 上記以外(Mozilla, Firefox, NetScape) + // 上記以外(Mozilla, NetScape, GoogleChrome) header("Content-disposition: inline; filename=\"".$filename."\""); } if(!empty($pathname)) { diff --git a/html/webapp/components/users/View.class.php b/html/webapp/components/users/View.class.php old mode 100644 new mode 100755 index 76e19af..b55098f --- a/html/webapp/components/users/View.class.php +++ b/html/webapp/components/users/View.class.php @@ -540,8 +540,12 @@ function &getSendMailUsers($page_id=null, $more_than_authority_id=null, $type = $sql .= ")"; $func = array($this, '_fetchcallbackSendMail'); $authoritiesView =& $this->_container->getComponent("authoritiesView"); - $authorities = $authoritiesView->getAuthorities(null, null, null, null, true); - $func_params = array($more_than_authority_id, $authorities, $items); + $authorities = $authoritiesView->getAuthorities(null, null); + $authoritiesById = array(); + foreach ((array)$authorities as $authority) { + $authoritiesById[$authority['role_authority_id']] = $authority; + } + $func_params = array($more_than_authority_id, $authoritiesById, $items); } else { // ルームID指定なし // 会員の user_authority_idのみでメールを送信 diff --git a/html/webapp/config/define.inc.php b/html/webapp/config/define.inc.php index a4e3a1e..b78f962 100644 --- a/html/webapp/config/define.inc.php +++ b/html/webapp/config/define.inc.php @@ -3,6 +3,19 @@ define("_OFF",0); define('_CHARSET', 'UTF-8'); +if (stristr($_SERVER['HTTP_USER_AGENT'], 'Mac')) { + // Macの場合 + $encode = 'UTF-8'; +} else if (stristr($_SERVER['HTTP_USER_AGENT'], 'Windows')) { + // Windowsの場合 + $encode = 'SJIS-win'; + if (!extension_loaded('mbstring') && !function_exists("mb_convert_encoding")) { + $encode = 'SJIS'; + } +} else { + $encode = _CHARSET; +} +define('_CLIENT_OS_CHARSET', $encode); define("_SPACE_TYPE_UNDEFINED",0); //未定義 define("_SPACE_TYPE_PUBLIC",1); //パブリックスペース diff --git a/html/webapp/config/version.php b/html/webapp/config/version.php index c35760a..1086c60 100644 --- a/html/webapp/config/version.php +++ b/html/webapp/config/version.php @@ -1,4 +1,4 @@ \ No newline at end of file diff --git a/html/webapp/modules/assignment/components/View.class.php b/html/webapp/modules/assignment/components/View.class.php index 0f83b04..d47fc46 100644 --- a/html/webapp/modules/assignment/components/View.class.php +++ b/html/webapp/modules/assignment/components/View.class.php @@ -172,7 +172,7 @@ function &getAssignments() " ON (Assign.assignment_id = Submitter.assignment_id)". " WHERE Assign.room_id = ?" . " GROUP BY Assign.assignment_id". - " ".$this->_db->getOrderSQL($order); + " ".$this->_db->getOrderSQL($order, array('Assign.assignment_id', 'assignment_name', 'activity', 'insert_user_name', 'insert_time')); $assignments = $this->_db->execute($sql, $params, $limit, $offset, true); if ($assignments === false) { @@ -749,7 +749,7 @@ function &getSubmitters($yet_submit=false) $sort_col = "submit_time"; } $sort_dir = $this->_request->getParameter("sort_dir"); - if (empty($sort_dir)) { + if (empty($sort_dir) || $sort_dir != 'ASC') { $sort_dir = "DESC"; } diff --git a/html/webapp/modules/assignment/install.ini b/html/webapp/modules/assignment/install.ini old mode 100644 new mode 100755 index 31e0034..6fc6b7f --- a/html/webapp/modules/assignment/install.ini +++ b/html/webapp/modules/assignment/install.ini @@ -1,4 +1,4 @@ -version = "2.4.0.0" +version = "2.4.0.1" action_name = "assignment_view_main_init" edit_action_name = "assignment_view_edit_list" search_action = "assignment_view_admin_search" diff --git a/html/webapp/modules/backup/components/Restore.class.php b/html/webapp/modules/backup/components/Restore.class.php index ed18790..bd5e1c8 100644 --- a/html/webapp/modules/backup/components/Restore.class.php +++ b/html/webapp/modules/backup/components/Restore.class.php @@ -214,7 +214,11 @@ function getRestoreArray($upload_id, $backup_page_id, $module_id, $temporary_fil //$options = array ('parseAttributes' => true); 属性値を含める //$unserializer =& new XML_Unserializer($options); - $result = $unserializer->unserialize($xml); + // XML を読み込んだ変数から処理すると、環境によってはメモリを使いすぎてエラーになるケースがあった。 + // そのため、XML は再度、ファイルから取得するように修正し、メモリの消費を抑えた。 + // 2014-08-15 by nagahara@opensource-workshop.jp + // $result = $unserializer->unserialize($xml); + $result = $unserializer->unserialize($temporary_file_path.BACKUP_ROOM_XML_FILE_NAME, true); if($result !== true) { $this->_fileAction->delDir($temporary_file_path); $errorList->add("backup", BACKUP_FAILURE_UNSERIALIZE); diff --git a/html/webapp/modules/backup/install.ini b/html/webapp/modules/backup/install.ini old mode 100644 new mode 100755 index 90f8a1b..d4a005a --- a/html/webapp/modules/backup/install.ini +++ b/html/webapp/modules/backup/install.ini @@ -1,4 +1,4 @@ -version = "2.4.0.1" +version = "2.4.0.2" action_name="backup_view_main_init" module_icon="backup.gif" system_flag=1 diff --git a/html/webapp/modules/bbs/components/View.class.php b/html/webapp/modules/bbs/components/View.class.php index f50520d..32c1541 100644 --- a/html/webapp/modules/bbs/components/View.class.php +++ b/html/webapp/modules/bbs/components/View.class.php @@ -160,7 +160,7 @@ function &getBbses() $sql = "SELECT bbs_id, bbs_name, activity, insert_time, insert_user_id, insert_user_name ". "FROM {bbs} ". "WHERE room_id = ? ". - $this->_db->getOrderSQL($orderParams); + $this->_db->getOrderSQL($orderParams, array('bbs_name', 'activity', 'insert_user_name', 'insert_time')); $bbses = $this->_db->execute($sql, $params, $limit, $offset); if ($bbses === false) { $this->_db->addError(); diff --git a/html/webapp/modules/bbs/install.ini b/html/webapp/modules/bbs/install.ini old mode 100644 new mode 100755 index 4f27b34..4bc9d68 --- a/html/webapp/modules/bbs/install.ini +++ b/html/webapp/modules/bbs/install.ini @@ -1,4 +1,4 @@ -version = "2.4.0.1" +version = "2.4.0.2" action_name = "bbs_view_main_init" edit_action_name = "bbs_view_edit_list" search_action = "bbs_view_admin_search" diff --git a/html/webapp/modules/cabinet/action/main/decompress/Decompress.class.php b/html/webapp/modules/cabinet/action/main/decompress/Decompress.class.php index 1aadbd2..edbf63f 100644 --- a/html/webapp/modules/cabinet/action/main/decompress/Decompress.class.php +++ b/html/webapp/modules/cabinet/action/main/decompress/Decompress.class.php @@ -32,16 +32,8 @@ class Cabinet_Action_Main_Decompress extends Action */ function execute() { - if (stristr($_SERVER['HTTP_USER_AGENT'], "Mac")) { - // Macの場合 - $this->cabinetAction->encode = "UTF-8"; - } else if (stristr($_SERVER['HTTP_USER_AGENT'], "Windows")) { - // Windowsの場合 - $this->cabinetAction->encode = "SJIS"; - } else { - $this->cabinetAction->encode = _CHARSET; - } - + $this->cabinetAction->encode = _CLIENT_OS_CHARSET; + $decompress_new_folder = $this->cabinetView->getDecompressNewFolder(); if ($decompress_new_folder == _ON) { diff --git a/html/webapp/modules/cabinet/components/Action.class.php b/html/webapp/modules/cabinet/components/Action.class.php old mode 100644 new mode 100755 index 8efcf8e..4bc51af --- a/html/webapp/modules/cabinet/components/Action.class.php +++ b/html/webapp/modules/cabinet/components/Action.class.php @@ -522,15 +522,7 @@ function compressFile() $archive_file_name = $upload_id; $this->archive_full_path = FILEUPLOADS_DIR."/".$file_path."/".$archive_file_name.".".$extension; - if (stristr($_SERVER['HTTP_USER_AGENT'], "Mac")) { - // Macの場合 - $this->encode = "UTF-8"; - } else if (stristr($_SERVER['HTTP_USER_AGENT'], "Windows")) { - // Windowsの場合 - $this->encode = "SJIS"; - } else { - $this->encode = _CHARSET; - } + $this->encode = _CLIENT_OS_CHARSET; if ($file["file_type"] == CABINET_FILETYPE_FOLDER) { $result = $this->_compressFile($file["file_id"], mb_convert_encoding($file["org_file_name"], $this->encode, "auto")."/"); diff --git a/html/webapp/modules/cabinet/components/View.class.php b/html/webapp/modules/cabinet/components/View.class.php index 0c235fd..98faa62 100644 --- a/html/webapp/modules/cabinet/components/View.class.php +++ b/html/webapp/modules/cabinet/components/View.class.php @@ -201,7 +201,7 @@ function &getCabinets() $sort_col = "insert_time"; } $sort_dir = $this->_request->getParameter("sort_dir"); - if (empty($sort_dir)) { + if ((empty($sort_dir) || ($sort_dir != 'ASC' && $sort_dir != 'asc'))) { $sort_dir = "DESC"; } @@ -215,6 +215,9 @@ function &getCabinets() if ($sort_col == "total_size") { $sql .= " ORDER BY ".$sort_col." ".$sort_dir; } else { + if(!in_array($sort_col, array('cabinet_name', 'total_size', 'insert_user_name', 'insert_time'))) { + $sort_col = "insert_time"; + } $sql .= " ORDER BY manage.".$sort_col." ".$sort_dir; } $sql .= ", manage.cabinet_id DESC"; @@ -672,6 +675,10 @@ function getFileList($offset, $limit) $sort_dir = $this->_request->getParameter("sort_dir"); if (isset($sort_col)) { + if(!in_array($sort_col, array('file_name', 'size', 'insert_user_name', 'insert_time', 'update_user_name', 'update_time', 'comment'))) { + $sort_col = 'file_name'; + } + $sort_dir = (empty($sort_dir) || ($sort_dir != 'DESC' && $sort_dir != 'desc')) ? 'ASC' : 'DESC'; if ($sort_col == "comment") { $order_params = array( "F.file_type" => ($sort_dir == "ASC" ? "DESC" : "ASC"), diff --git a/html/webapp/modules/cabinet/files/js/default/cabinet.js b/html/webapp/modules/cabinet/files/js/default/cabinet.js old mode 100644 new mode 100755 index 2945245..8bd57d3 --- a/html/webapp/modules/cabinet/files/js/default/cabinet.js +++ b/html/webapp/modules/cabinet/files/js/default/cabinet.js @@ -105,6 +105,11 @@ clsCabinet.prototype = { }, sortBy: function(sort_col) { + var fileListEl = $("cabinet_file_list" + this.id); + if (!fileListEl) { + return; + } + if(this.sortCol == null) { this.sortDir = "DESC"; }else { @@ -121,8 +126,6 @@ clsCabinet.prototype = { } this.sortCol = sort_col; - $("cabinet_file_list" + this.id).innerHTML = ""; - var top_el = $(this.id); var params = new Object(); params["param"] = { @@ -134,7 +137,7 @@ clsCabinet.prototype = { "success":"html" }; params["top_el"] = top_el; - params["target_el"] = $("cabinet_file_list" + this.id); + params["target_el"] = fileListEl; params["callbackfunc"] = function(res) { var imgObj = $("cabinet_sort_img" + this.id + "_" + this.sortCol); if(this.sortDir == "ASC") { @@ -149,7 +152,7 @@ clsCabinet.prototype = { this.oldSortCol = null; } }.bind(this); - + commonCls.send(params); }, diff --git a/html/webapp/modules/cabinet/install.ini b/html/webapp/modules/cabinet/install.ini old mode 100644 new mode 100755 index 276732b..061634b --- a/html/webapp/modules/cabinet/install.ini +++ b/html/webapp/modules/cabinet/install.ini @@ -1,4 +1,4 @@ -version = "2.4.0.0" +version = "2.4.0.1" action_name="cabinet_view_main_init" edit_action_name="cabinet_view_edit_list" block_add_action="cabinet_view_edit_create" diff --git a/html/webapp/modules/calendar/files/js/default/calendar.js b/html/webapp/modules/calendar/files/js/default/calendar.js old mode 100644 new mode 100755 index a18397a..9953ff4 --- a/html/webapp/modules/calendar/files/js/default/calendar.js +++ b/html/webapp/modules/calendar/files/js/default/calendar.js @@ -633,21 +633,23 @@ clsCalendar.prototype = { if (!el) { switch (type) { case this.CALENDAR_YEARLY: - var el = $("calendar_yearly"+this.id); + el = $("calendar_yearly"+this.id); break; case this.CALENDAR_S_MONTHLY: - var el = $("calendar_s_monthly"+this.id); + el = $("calendar_s_monthly"+this.id); break; case this.CALENDAR_L_MONTHLY: - var el = $("calendar_l_monthly"+this.id); + el = $("calendar_l_monthly"+this.id); break; case this.CALENDAR_WEEKLY: - var el = $("calendar_weekly"+this.id); + el = $("calendar_weekly"+this.id); break; case this.CALENDAR_DAILY: - var el = $("calendar_daily"+this.id); + el = $("calendar_daily"+this.id); break; default: + // スケジュール表示の場合は処理終了 + return; } } if (!Element.hasClassName(el, "display-none")) { diff --git a/html/webapp/modules/calendar/install.ini b/html/webapp/modules/calendar/install.ini old mode 100644 new mode 100755 index c43cbfe..0144c70 --- a/html/webapp/modules/calendar/install.ini +++ b/html/webapp/modules/calendar/install.ini @@ -1,4 +1,4 @@ -version = "2.4.0.1" +version = "2.4.2.1" action_name="calendar_view_main_init" edit_action_name="calendar_view_edit_init" search_action = "calendar_view_admin_search" diff --git a/html/webapp/modules/calendar/view/main/plan/add/Add.class.php b/html/webapp/modules/calendar/view/main/plan/add/Add.class.php index c98d9c5..04bc858 100644 --- a/html/webapp/modules/calendar/view/main/plan/add/Add.class.php +++ b/html/webapp/modules/calendar/view/main/plan/add/Add.class.php @@ -116,7 +116,7 @@ function execute() $this->calendar_obj = array( "calendar_id" => 0, - "room_id" => ($this->plan_room_id > 0 ? $this->plan_room_id : $this->room_id), + "room_id" => ($this->plan_room_id > 0 ? $this->plan_room_id : $this->session->getParameter('_main_room_id')), "title" => $this->title, "title_icon" => $this->title_icon, "allday_flag" => $this->allday_flag, diff --git a/html/webapp/modules/chat/files/js/default/chat.js b/html/webapp/modules/chat/files/js/default/chat.js old mode 100644 new mode 100755 index 1bec06a..ff8dfae --- a/html/webapp/modules/chat/files/js/default/chat.js +++ b/html/webapp/modules/chat/files/js/default/chat.js @@ -50,6 +50,9 @@ clsChat.prototype = { var top_el = $("chat_form" + this.id); var val_el = Element.getChildElementByClassName(top_el, "chat_text"); var chat_text = val_el ? val_el.value : null; + if (chat_text === '' || chat_text === null) { + return; + } var params = new Object(); params["method"] = "post"; params["top_el"] = top_el; diff --git a/html/webapp/modules/chat/install.ini b/html/webapp/modules/chat/install.ini old mode 100644 new mode 100755 index 5ed9258..82b3805 --- a/html/webapp/modules/chat/install.ini +++ b/html/webapp/modules/chat/install.ini @@ -1,4 +1,4 @@ -version = "2.4.0.1" +version = "2.4.0.2" action_name="chat_view_main_init" edit_action_name = "chat_view_edit_init" block_add_action = "chat_action_edit_create" diff --git a/html/webapp/modules/circular/action/main/add/maple.ini b/html/webapp/modules/circular/action/main/add/maple.ini old mode 100644 new mode 100755 index 6db5e47..035fe32 --- a/html/webapp/modules/circular/action/main/add/maple.ini +++ b/html/webapp/modules/circular/action/main/add/maple.ini @@ -11,7 +11,7 @@ circular_subject.required:g="1:lang._required,lang.circular_subject" circular_subject.maxlength = "1,_VALIDATOR_TITLE_LEN:lang._maxlength_error,lang.circular_subject,_VALIDATOR_TITLE_LEN" circular_body.required:g="1:lang._required,lang.circular_body" circular_body.maxlength = "1,_VALIDATOR_TEXTAREA_LEN:lang._maxlength_error,lang.circular_body,_VALIDATOR_TEXTAREA_LEN" -receive_user_ids.required:g="1:lang.circular_required_select" +receive_user_ids.circular.receiveUser = "1:lang.circular_required_select" key:choice_value,reply_type,choice_id.circular.circularChoice:choice = "1:lang.circular_choice_not_exist" period.date:period = "1:lang._invalid_date,lang.circular_period" key:period_checkbox,period.circular.period = "1:lang.circular_period_invalid" diff --git a/html/webapp/modules/circular/components/Action.class.php b/html/webapp/modules/circular/components/Action.class.php old mode 100644 new mode 100755 index ccac87b..fb31768 --- a/html/webapp/modules/circular/components/Action.class.php +++ b/html/webapp/modules/circular/components/Action.class.php @@ -149,7 +149,6 @@ function registCircular() $circularId = intval($circularId); $receiveUserIds = $this->_request->getParameter('receive_user_ids'); - $receiveUserIds = explode(",", $receiveUserIds); foreach ($receiveUserIds as $userID) { $insertParams = array( 'room_id' => $roomId, @@ -476,39 +475,39 @@ function updateUserSeen($type) return true; } - /** - * 新着情報にセットする - * + /** + * 新着情報にセットする + * * @param string $circularId 回覧ID * @return boolean (true:正常/false:異常) - * @access public - */ - function setWhatsnew($circularId) - { - $posts = $this->_db->selectExecute("circular", array("circular_id"=>$circularId)); - if (empty($posts)) { - return false; - } - + * @access public + */ + function setWhatsnew($circularId) + { + $posts = $this->_db->selectExecute("circular", array("circular_id"=>$circularId)); + if (empty($posts)) { + return false; + } + $pageId = $this->_request->getParameter("page_id"); - $whatsnewAction =& $this->_container->getComponent("whatsnewAction"); - - $whatsnew = array( - "unique_id" => $circularId, - "title" => $posts[0]["circular_subject"], - "description" => $posts[0]["circular_body"], - "action_name" => "circular_view_main_detail", - "parameters" => "circular_id=". $circularId . "&page_id=" . $pageId, - "insert_time" => $posts[0]["update_time"], - "update_time" => $posts[0]["update_time"] - ); - $result = $whatsnewAction->auto($whatsnew); - if ($result === false) { - return false; - } - - return true; - } + $whatsnewAction =& $this->_container->getComponent("whatsnewAction"); + + $whatsnew = array( + "unique_id" => $circularId, + "title" => $posts[0]["circular_subject"], + "description" => $posts[0]["circular_body"], + "action_name" => "circular_view_main_detail", + "parameters" => "circular_id=". $circularId . "&page_id=" . $pageId, + "insert_time" => $posts[0]["update_time"], + "update_time" => $posts[0]["update_time"] + ); + $result = $whatsnewAction->auto($whatsnew); + if ($result === false) { + return false; + } + + return true; + } /** * 期限を更新する diff --git a/html/webapp/modules/circular/install.ini b/html/webapp/modules/circular/install.ini old mode 100644 new mode 100755 index 8f51fda..b986437 --- a/html/webapp/modules/circular/install.ini +++ b/html/webapp/modules/circular/install.ini @@ -1,4 +1,4 @@ -version = "2.4.0.1" +version = "2.4.1.0" action_name = "circular_view_main_init" edit_action_name = "circular_view_edit_option" search_action = "circular_view_admin_search" diff --git a/html/webapp/modules/circular/language/chinese/main.ini b/html/webapp/modules/circular/language/chinese/main.ini index 9466fb5..f5a46d7 100644 --- a/html/webapp/modules/circular/language/chinese/main.ini +++ b/html/webapp/modules/circular/language/chinese/main.ini @@ -54,7 +54,7 @@ circulr_mobile_reply = "Reply" circulr_mobile_show_reply = "Show reply list" [Circular_View_Main_Detail:Circular_View_Main_Postscript_Add] -circular_postscript_from = "by:" +circular_postscript_from = "by " [Circular_View_Main_Reply] circular_mobile_reply = "Reply" diff --git a/html/webapp/modules/circular/language/english/main.ini b/html/webapp/modules/circular/language/english/main.ini index 9466fb5..f5a46d7 100644 --- a/html/webapp/modules/circular/language/english/main.ini +++ b/html/webapp/modules/circular/language/english/main.ini @@ -54,7 +54,7 @@ circulr_mobile_reply = "Reply" circulr_mobile_show_reply = "Show reply list" [Circular_View_Main_Detail:Circular_View_Main_Postscript_Add] -circular_postscript_from = "by:" +circular_postscript_from = "by " [Circular_View_Main_Reply] circular_mobile_reply = "Reply" diff --git a/html/webapp/modules/circular/language/japanese/main.ini b/html/webapp/modules/circular/language/japanese/main.ini index 6a11205..e8352f6 100644 --- a/html/webapp/modules/circular/language/japanese/main.ini +++ b/html/webapp/modules/circular/language/japanese/main.ini @@ -54,7 +54,7 @@ circulr_mobile_reply = "回答する" circulr_mobile_show_reply = "回答一覧を見る" [Circular_View_Main_Detail:Circular_View_Main_Postscript_Add] -circular_postscript_from = "by:" +circular_postscript_from = "by " [Circular_View_Main_Reply] circular_mobile_reply = "回答する" diff --git a/html/webapp/modules/circular/sql/mysql/table.sql b/html/webapp/modules/circular/sql/mysql/table.sql index 39f8356..cdd7715 100644 --- a/html/webapp/modules/circular/sql/mysql/table.sql +++ b/html/webapp/modules/circular/sql/mysql/table.sql @@ -87,7 +87,7 @@ CREATE TABLE `circular_config` ( `room_id` int(11) NOT NULL default '0', `create_authority` tinyint(1) NOT NULL default '0', `mail_subject` varchar(255) default '', - `mail_body` text NOT NULL default '', + `mail_body` text NOT NULL, `insert_time` varchar(14) NOT NULL default '', `insert_site_id` varchar(40) NOT NULL default '', `insert_user_id` varchar(40) NOT NULL default '', diff --git a/html/webapp/modules/circular/validator/Validator_ReceiveUser.class.php b/html/webapp/modules/circular/validator/Validator_ReceiveUser.class.php new file mode 100755 index 0000000..ddab603 --- /dev/null +++ b/html/webapp/modules/circular/validator/Validator_ReceiveUser.class.php @@ -0,0 +1,57 @@ +getComponent('ActionChain'); + $actionName = $actionChain->getCurActionName(); + + if (empty($attributes)) { + if ($actionName === 'circular_view_main_users') { + return; + } + return $errStr; + } + $db =& $container->getComponent('DbObject'); + + $params = explode(',', $attributes); + $inClauseValue = str_repeat(",?", count($params)); + $sql = "SELECT user_id" . + " FROM {users}" . + " WHERE user_id IN (" . substr($inClauseValue, 1) . ")"; + $users = $db->execute($sql, $params); + if ($users === false) { + return _INVALID_INPUT; + } + $receiveUserIdArr = array(); + foreach ($users as $user) { + $receiveUserIdArr[] = $user['user_id']; + } + $request =& $container->getComponent('Request'); + $request->setParameter('receive_user_ids', $receiveUserIdArr); + + return; + } +} +?> diff --git a/html/webapp/modules/circular/validator/Validator_UserAuthCheck.class.php b/html/webapp/modules/circular/validator/Validator_UserAuthCheck.class.php index e47b1e1..9b7d243 100644 --- a/html/webapp/modules/circular/validator/Validator_UserAuthCheck.class.php +++ b/html/webapp/modules/circular/validator/Validator_UserAuthCheck.class.php @@ -24,18 +24,17 @@ class Circular_Validator_UserAuthCheck extends Validator function validate($attributes, $errStr, $params) { $container =& DIContainerFactory::getContainer(); - $session =& $container->getComponent('Session'); - - if (!$session->getParameter('_user_id')) { - return $errStr; - } - $actionChain =& $container->getComponent('ActionChain'); $actionName = $actionChain->getCurActionName(); if ($actionName == "circular_view_admin_search") { return; } + $session =& $container->getComponent('Session'); + if (!$session->getParameter('_user_id')) { + return $errStr; + } + if ($session->getParameter('_auth_id') < _AUTH_GENERAL) { $filterChain =& $container->getComponent('FilterChain'); $smartyAssign =& $filterChain->getFilterByName('SmartyAssign'); diff --git a/html/webapp/modules/circular/view/admin/search/Search.class.php b/html/webapp/modules/circular/view/admin/search/Search.class.php index 9c01117..c42a15a 100644 --- a/html/webapp/modules/circular/view/admin/search/Search.class.php +++ b/html/webapp/modules/circular/view/admin/search/Search.class.php @@ -40,15 +40,14 @@ class Circular_View_Admin_Search extends Action */ function execute() { - if ($this->block_id_arr) { - $sqlwhere = ' WHERE block.block_id IN ('.implode(',', $this->block_id_arr).')'; - } else { + $user_id = $this->session->getParameter('_user_id'); + if ($user_id === '0' || $user_id === null || !$this->block_id_arr) { return 'success'; } + $sqlwhere = ' WHERE block.block_id IN ('.implode(',', $this->block_id_arr).')'; $sqlwhere .= $this->sqlwhere; $sqlwhere .= ' AND (circular.post_user_id = ? OR user.receive_user_id = ?)'; - $user_id = $this->session->getParameter('_user_id'); $this->params[] = $user_id; $this->params[] = $user_id; diff --git a/html/webapp/modules/circular/view/main/create/Create.class.php b/html/webapp/modules/circular/view/main/create/Create.class.php old mode 100644 new mode 100755 index dfdba8f..b12b7f7 --- a/html/webapp/modules/circular/view/main/create/Create.class.php +++ b/html/webapp/modules/circular/view/main/create/Create.class.php @@ -26,7 +26,7 @@ class Circular_View_Main_Create extends Action var $circularView = null; // 値をセットするため - var $circular_info = null; + var $circular_info = array(); var $circular_user_list = null; var $room_list_array = null; var $group_member_list = null; diff --git a/html/webapp/modules/circular/view/main/users/Users.class.php b/html/webapp/modules/circular/view/main/users/Users.class.php old mode 100644 new mode 100755 index e5e0135..62d01cd --- a/html/webapp/modules/circular/view/main/users/Users.class.php +++ b/html/webapp/modules/circular/view/main/users/Users.class.php @@ -31,7 +31,7 @@ class Circular_View_Main_Users extends Action */ function execute() { - $users = explode(',', $this->receive_user_ids); + $users = (array)$this->receive_user_ids; if (intval($this->selected_room_id) == 0) { $result = $this->circularView->getGroupInfo($this->selected_group_id, $users); if ($result === false) { diff --git a/html/webapp/modules/circular/view/main/users/maple.ini b/html/webapp/modules/circular/view/main/users/maple.ini old mode 100644 new mode 100755 index 4f50e6b..f1e7f72 --- a/html/webapp/modules/circular/view/main/users/maple.ini +++ b/html/webapp/modules/circular/view/main/users/maple.ini @@ -1,6 +1,9 @@ [TokenExtra] mode="nobuild" +[ValidateDef] +receive_user_ids.circular.receiveUser = "1:lang._invalid_input" + [View] define:theme = 0 success = "circular_select_user_list.html" \ No newline at end of file diff --git a/html/webapp/modules/cleanup/action/main/init/Init.class.php b/html/webapp/modules/cleanup/action/main/init/Init.class.php index 50e1cb1..bad5d57 100644 --- a/html/webapp/modules/cleanup/action/main/init/Init.class.php +++ b/html/webapp/modules/cleanup/action/main/init/Init.class.php @@ -75,9 +75,10 @@ function _fileCleanUp($module, $module_name, $cleanup_params) $error_flag = false; $sum_data_count = 0; $file_exists_name_arr = array(); + $delayTime = _CLEANUP_DEL_DAY * 24 * 60 * 60; if(count($uploads) > 0) { foreach($uploads as $upload) { - if($upload['update_time'] >= date("YmdHis",timezone_date(null, true, "U") - _CLEANUP_DEL_DAY*60*60)) { + if($upload['update_time'] >= date("YmdHis",timezone_date(null, true, "U") - $delayTime)) { // ファイルが使用されていたものを配列に格納 $file_exists_name_arr[FILEUPLOADS_DIR.$upload['file_path'] . $upload['physical_file_name']] = true; $file_exists_name_arr[FILEUPLOADS_DIR.$upload['file_path'] .$upload['upload_id']."_thumbnail.".$upload['extension']] = true; diff --git a/html/webapp/modules/cleanup/install.ini b/html/webapp/modules/cleanup/install.ini old mode 100644 new mode 100755 index dd4b11e..8c2c41a --- a/html/webapp/modules/cleanup/install.ini +++ b/html/webapp/modules/cleanup/install.ini @@ -1,4 +1,4 @@ -version = "2.4.0.0" +version = "2.4.0.1" action_name="cleanup_view_main_init" module_icon="cleanup.gif" system_flag=1 diff --git a/html/webapp/modules/common/files/js/common.js b/html/webapp/modules/common/files/js/common.js index b9caa57..c499616 100644 --- a/html/webapp/modules/common/files/js/common.js +++ b/html/webapp/modules/common/files/js/common.js @@ -1175,7 +1175,7 @@ clsCommon.prototype = { //} if(this['callbackfunc']){ - if (transport.getResponseHeader("Content-Type") == "text/xml" && transport.responseXML) { + if (transport.getResponseHeader("Content-Type").substring(0, 8) === "text/xml" && transport.responseXML) { res = transport.responseXML; } diff --git a/html/webapp/modules/common/files/js/jqcheck.js b/html/webapp/modules/common/files/js/jqcheck.js new file mode 100644 index 0000000..c3cefae --- /dev/null +++ b/html/webapp/modules/common/files/js/jqcheck.js @@ -0,0 +1,18 @@ +var clsJqcheck = Class.create(); + +clsJqcheck.prototype = { + initialize: function() { + this.loadedFiles = new Array(); + }, + jqload: function(dir_name, check, next) { + if(!this.loadedFiles[dir_name]) { + this.loadedFiles[dir_name] = true; + commonCls.load(_nc_core_base_url + _nc_index_file_name + "?action=common_download_js&add_block_flag=1&dir_name=" + dir_name + "&vs=" + _nc_js_vs, check, function(){jQuery.noConflict(); if(next) {next();}}); + } + else { + jcheck = new Function('return !!(' + check + ')'); + commonCls.wait(jcheck,next); + } + } +} +jqcheckCls = new clsJqcheck(); diff --git a/html/webapp/modules/common/files/js/prototype.js b/html/webapp/modules/common/files/js/prototype.js index cbe70f3..7f76192 100644 --- a/html/webapp/modules/common/files/js/prototype.js +++ b/html/webapp/modules/common/files/js/prototype.js @@ -343,7 +343,7 @@ var Enumerable = { } catch (e) { /* add Code 2011/04/21 Windows7 64bitOS IE9でWYSIWYGにカーソルを移動し、画面遷移し、再度、WYSIWYGを表示する際にエラーとなるため * こちらでエラーを表示しないようにして対応 */ - if(!(browser.isIE && browser.version >= 9)) { + if(!(browser.isIE && browser.version >= 9) && !browser.isEdge) { if (e != $break) throw e; } } @@ -2966,7 +2966,9 @@ function Browser() { this.isFirefox = false; // FireFox this.isOpera = false; this.isSafari = false; - this.version = null; + this.isEdge = false; + + this.version = null; ua = navigator.userAgent; @@ -2984,6 +2986,25 @@ function Browser() { return; } + s = "Edge"; + if ((i = ua.indexOf(s)) >= 0) { + this.isEdge = true; + this.isGecko = true; + this.isSafari = true; + //this.version = parseFloat(ua.substr(i + s.length)); + return; + } + + // IE11 + s = "Trident"; + if ((i = ua.indexOf(s)) >= 0) { + s = "rv:"; + i = ua.indexOf(s); + this.isIE = true; + this.version = parseFloat(ua.substr(i + s.length)); + return; + } + s = "Netscape"; if ((i = ua.indexOf(s)) >= 0) { this.isGecko = true; diff --git a/html/webapp/modules/comp/config/insertamazon/define.inc.php b/html/webapp/modules/comp/config/insertamazon/define.inc.php index dcde365..26d4a03 100644 --- a/html/webapp/modules/comp/config/insertamazon/define.inc.php +++ b/html/webapp/modules/comp/config/insertamazon/define.inc.php @@ -11,12 +11,15 @@ * @project NetCommons Project, supported by National Institute of Informatics * @access public */ +/* --- + * 2014-6-4 AWS ACCESS KEY 情報を削除しました define("COMP_XML_ENCODING", "UTF-8"); -define("COMP_AWS_ACCESS_KEY_ID", "AKIAILVYEX6M4DJCGHGA"); -define("COMP_AWS_SECRET_KEY_ID", "ndjGU+Nl0DFdDKPlzvLQsr5CZGduzMO1JtQwEhmJ"); -define("COMP_AWS_ASSOCIATE_TAG", "commonsnet109-22"); +define("COMP_AWS_ACCESS_KEY_ID", "****"); +define("COMP_AWS_SECRET_KEY_ID", "****"); +define("COMP_AWS_ASSOCIATE_TAG", "*****"); define("COMP_AWS_URL", "http://webservices.amazon.co.jp/onca/xml"); define("COMP_AWS_REST", "GET\nwebservices.amazon.co.jp\n/onca/xml\n%s"); //define("COMP_AWS_VISIBLE_ROW", 10); //Amazonでは固定 define("COMP_AWS_DEFAULT_PAGE_NEXT", 4); -?> \ No newline at end of file + */ +?> diff --git a/html/webapp/modules/comp/files/js/comp_popup.js b/html/webapp/modules/comp/files/js/comp_popup.js index dbb5ce2..a0e9606 100644 --- a/html/webapp/modules/comp/files/js/comp_popup.js +++ b/html/webapp/modules/comp/files/js/comp_popup.js @@ -364,7 +364,7 @@ compPopup.prototype = { } if((browser.isIE && browser.version < 9)) iframe.style.display = "none"; //safariの場合、再描画する時に描画処理がはしってしまうためコメント iframe.style.visibility = "hidden"; - if(browser.isOpera) { + if(browser.isOpera || browser.isEdge) { $(this.popupElement).remove(); this.src = null; this.popupElement = null; diff --git a/html/webapp/modules/comp/files/js/comp_textarea.js b/html/webapp/modules/comp/files/js/comp_textarea.js index 308dd99..a387f97 100644 --- a/html/webapp/modules/comp/files/js/comp_textarea.js +++ b/html/webapp/modules/comp/files/js/comp_textarea.js @@ -96,7 +96,9 @@ compTextarea.prototype = { // addFocusの別名 focusEditor : function(now, callback) { - this.textarea.addFocus(now, callback); + if (this.textarea != null || this.textarea != undefined) { + this.textarea.addFocus(now, callback); + } }, setOptions : function() { diff --git a/html/webapp/modules/comp/files/js/plugins/comp_textareamain.js b/html/webapp/modules/comp/files/js/plugins/comp_textareamain.js index 02d9af0..3c636c0 100644 --- a/html/webapp/modules/comp/files/js/plugins/comp_textareamain.js +++ b/html/webapp/modules/comp/files/js/plugins/comp_textareamain.js @@ -338,7 +338,7 @@ compTextareamain.prototype = { exec : function() { var self = this; - if(browser.isIE) { + if(browser.isIE || browser.isEdge) { var spans, font, loop_flag = true; var f = self.currentNode ? self.currentNode : self.getSelectNode(); // 選択NodeTopをselect @@ -358,7 +358,7 @@ compTextareamain.prototype = { return; } f = self.applyInlineStyle('font'); - } else if(f.style.color != '' || f.style.backgroundColor != '' || f.style.fonSize != '' || f.style.fontFamily != '') { + } else if(f.style.color || f.style.backgroundColor || f.style.fonSize || f.style.fontFamily) { font = this.editorDoc.createElement('font'); f = self.replace(font, f, true); } @@ -395,7 +395,7 @@ compTextareamain.prototype = { } } this.editorDoc.execCommand('removeFormat', false, []); - if(browser.isSafari && f.nodeName.toLowerCase() != "body") { + if(browser.isSafari && f.nodeName.toLowerCase() != "body" && !browser.isEdge) { // Class Apple-style-spanを検索し、削除 var remove_el_arr = []; var buf_f = f; @@ -460,7 +460,35 @@ compTextareamain.prototype = { } } else { var sel_n = null; - this.editorDoc.execCommand(name, false, []); + if(!browser.isEdge) + this.editorDoc.execCommand(name, false, []); + else { + var n = this.currentNode ? this.currentNode : this.getSelectNode(); + var r = this.getRange(); + if(n && n.nodeName.toLowerCase() != 'div') { + if(r.startContainer && r.endContainer && + r.startContainer == r.endContainer) { + + var br = r.startContainer.nextSibling; + if(!br) { + br = this.editorDoc.createTextNode(""); + r.insertNode(br); + br = br.nextSibling; + r.setStartBefore(br); + } else { + r.setStartBefore(r.startContainer); + } + r.setEndAfter(br); + this.setRange(r); + } + n = this.applyInlineStyle('div'); + if(n) { + this.rangeSelect(n, 1); + } + } + this.editorDoc.execCommand(name, false, []); + } + var r = this.getRange(); if(r.endContainer && r.endContainer.parentNode) { sel_n = r.endContainer.parentNode; @@ -488,7 +516,7 @@ compTextareamain.prototype = { value : { insertOrderedList : { visible : true, tags : ['ol'], exec : function(e) { - if(!browser.isIE) + if(!browser.isIE && !browser.isEdge) this.editorDoc.execCommand("insertOrderedList", false, []); else { var n = this.applyInlineStyle('div'); @@ -504,7 +532,7 @@ compTextareamain.prototype = { }, insertUnorderedList : { visible : true, tags : ['ul'], exec : function(e) { - if(!browser.isIE) + if(!browser.isIE && !browser.isEdge) this.editorDoc.execCommand("insertUnorderedList", false, []); else { var n = this.applyInlineStyle('div'); @@ -777,7 +805,6 @@ compTextareamain.prototype = { callback : function(args) { var a, bm, v; // リンク挿入 - self.removeDialog(self.dialog_id); self.addFocus(true); if(n && n.nodeName.toLowerCase() != 'a') { bm = self.bookmark; @@ -808,6 +835,7 @@ compTextareamain.prototype = { n.setAttribute(key,args[key],0); a = n; } + self.removeDialog(self.dialog_id); self.rangeSelect(a); self.addUndo(); @@ -1147,7 +1175,8 @@ compTextareamain.prototype = { Event.observe(this.editorDoc,"mouseup", function(e) { self.bookmark = self.getBookmark(); // IEはbookmarkを保持しないため - self.currentNode = self.getSelectNode(); + if (!browser.isEdge) + self.currentNode = self.getSelectNode(); self.checkTargets(Event.element(e)); self.addUndo(); self.closeDialogs(); @@ -1159,7 +1188,7 @@ compTextareamain.prototype = { }, false, this.id); Event.observe(this.editorDoc,"keydown", function(e) { - if(browser.isSafari && (e.keyCode == 46 || e.keyCode == 8)) { + if(browser.isSafari && (e.keyCode == 46 || e.keyCode == 8) && !browser.isEdge) { // 1行選択してdelete(backspace)ボタン、 // または、1行にわたるNodeを選択してdelete(backspace) // ボタンを押すと、そのelementが削除されないため対処 @@ -1274,7 +1303,8 @@ compTextareamain.prototype = { Event.observe(this.editorDoc,"keyup", function(e) { var k = e.keyCode; self.bookmark = self.getBookmark(); // IEはbookmarkを保持しないため - self.currentNode = self.getSelectNode(); + if (!browser.isEdge) + self.currentNode = self.getSelectNode(); if ((k >= 33 && k <= 36) || (k >= 37 && k <= 40) || k == 13 || k == 45 || k == 46 || k == 8 || (e.ctrlKey && (k == 86 || k == 88)) || k.ctrlKey || (this.is_mac && (k == 91 || k == 93))) { // enter、上下左右、baskspace, Delキー,カット&ペーストならば、checkTargetsを呼び出す @@ -1756,6 +1786,11 @@ compTextareamain.prototype = { self.resize.parentNode.removeChild(self.resize); Event.stopObserving(document,"mousemove", resizeMouseMove,false); Event.stopObserving(document,"mouseup", resizeMouseUp,false); + if (browser.isIE && document.removeEventListener) { + // 画像アップロードのポップアップを2度表示すると、イベントが止まらなくなるため、原因不明だが手動で停止 + document.removeEventListener("mousemove", resizeMouseMove,false); + document.removeEventListener("mouseup", resizeMouseUp,false); + } (mode != "html") ? Element.setStyle(self.editor, {display:'block'}) : Element.setStyle(self.original, {display:'block'}); self._setStyleWithCSS(); @@ -1959,11 +1994,14 @@ compTextareamain.prototype = { var path = document.getElementById('path_'+ this.top_id); path.innerHTML = ''; path.appendChild(spn); - var n_el = el, buf_n; + var n_el = el, buf_n,currentNode; do { nodeN = el.nodeName.toLowerCase(); - if ( el.nodeType != 1 || nodeN == 'body' || nodeN == 'html') + if ( el.nodeType != 1 || nodeN == 'body' || nodeN == 'html') break; + if(!currentNode) { + currentNode = el; + } if(nodeN == "b") nodeN = "strong"; @@ -2005,6 +2043,8 @@ compTextareamain.prototype = { pa = a; t++; } while ( el = el.parentNode ); + if (browser.isEdge) + self.currentNode = currentNode; }, checkTargets : function( element ) @@ -3643,14 +3683,18 @@ compTextareamain.prototype = { function replaceFonts() { var bm, c_el, r_el; - var tags = new Array('span', 'font', 'img'); + if (!browser.isEdge) { + var tags = new Array('span', 'font', 'img'); + } else { + var tags = new Array('span', 'font', 'img', 'a'); + } var tags_length = tags.length; for (var k = tags_length; k > 0; ) { var target_ar = t.editorDoc.getElementsByTagName(tags[--k]); var target_ar_length = target_ar.length; for (var i = target_ar_length; i > 0; i--) { var el = target_ar[i - 1]; - if (el.style.fontFamily == 'nc_wysiwygfont' || (el.face && el.face == 'nc_wysiwygfont') || (el.src && el.src.match(/nc_wysiwygurl$/))) { + if (el.style.fontFamily == 'nc_wysiwygfont' || (el.face && el.face == 'nc_wysiwygfont') || (el.src && el.src.match(/nc_wysiwygurl$/)) || (el.href && el.href.match(/nc_wysiwygurl$/))) { if (!bm) bm = t.getBookmark(); @@ -3661,8 +3705,9 @@ compTextareamain.prototype = { spn.innerHTML = na; c_el = spn.childNodes[0]; - } else + } else { c_el = t.editorDoc.createElement(na); + } if (!r_el) r_el = c_el; t.replace(t.attrs(c_el, at), el, 1); @@ -3758,10 +3803,17 @@ compTextareamain.prototype = { // Create inline elements t.addFocus(); - if(collapsed) + + var r = t.getRange(); + if (r.collapsed && browser.isEdge) { + t.editorDoc.execCommand('inserthtml', false, ''); + } else if (collapsed) { t.editorDoc.execCommand('insertImage', false, 'nc_wysiwygurl'); - else + } else if (browser.isEdge) { + t.editorDoc.execCommand('createLink', false, 'nc_wysiwygurl'); + } else { t.editorDoc.execCommand('fontName', false, 'nc_wysiwygfont'); + } r_el = replaceFonts(); if(t._keyhandler) { Event.stopObserving(this.editorDoc,"keyup",t._keyhandler); diff --git a/html/webapp/modules/dialog/files/js/default/pagestyle.js b/html/webapp/modules/dialog/files/js/default/pagestyle.js index d47fcd3..41edb87 100644 --- a/html/webapp/modules/dialog/files/js/default/pagestyle.js +++ b/html/webapp/modules/dialog/files/js/default/pagestyle.js @@ -1,533 +1,533 @@ -var clsPagestyle = Class.create(); - -clsPagestyle.prototype = { - initialize: function() { - this.id = null; - this.top_el = null; - - this.lang_down_arrow = null; - this.lang_right_arrow = null; - - this.lang_cancel_confirm = null; - - this.themefields = null; - this.theme_name = null; - this.header_flag = null; - this.leftcolumn_flag = null; - this.rightcolumn_flag = null; - - this.header_el = null; - this.header_id_el = null; - this.leftcolumn_el = null; - this.centercolumn_el = null; - this.rightcolumn_el = null; - this.footer_el = null; - - this.colorclick_flag = false; - - this.chg_flag = false; - this.initColorFlag = false; - this.initStr = ""; - this.tabset = null; - }, - init: function(id, page_id, theme_name, header_flag, leftcolumn_flag, rightcolumn_flag, active_tab, change_flag, lang_cancel_confirm, lang_style, lang_theme, lang_layout, lang_coloration, lang_down_arrow, lang_right_arrow, pages_action, permalink_prohibition, permalink_prohibition_replace) { - this.id = id; - this.page_id = page_id; - this.theme_name = theme_name; - this.header_flag = header_flag; - this.leftcolumn_flag = leftcolumn_flag; - this.rightcolumn_flag = rightcolumn_flag; - - this.pages_action = pages_action; - this.permalink_prohibition = permalink_prohibition; - this.permalink_prohibition_replace = permalink_prohibition_replace; - - var top_el = $(id); - this.top_el = top_el; - this.header_id_el = $("__headercolumn"); - this.header_el = $("_headercolumn"); - if(this.header_el) { - this.header_add_module_el = Element.getChildElementByClassName(this.header_el, "headercolumn_addmodule"); - } - this.leftcolumn_el = $("_leftcolumn"); - this.centercolumn_el = $("_centercolumn"); - this.rightcolumn_el =$("_rightcolumn"); - this.footer_el = $("_footercolumn"); - - /* タブ */ - tabset = new compTabset(top_el); - tabset.addTabset(lang_theme, null); - tabset.addTabset(lang_style,pagestyleCls.clkStyle.bind($(id))); - tabset.addTabset(lang_layout); - tabset.addTabset(lang_coloration, null, pagestyleCls.clkColor.bind(this)); - - tabset.setActiveIndex(valueParseInt(active_tab)); - - tabset.render(); - if(change_flag != "") { - this.chg_flag = true; - } else { - this.chg_flag = false; - } - this.tabset = tabset; - this.lang_cancel_confirm = lang_cancel_confirm; - this.lang_down_arrow = lang_down_arrow; - this.lang_right_arrow = lang_right_arrow; - - //Initに時間がかかる処理は後回し - //setTimeout(pagestyleCls.InitTimer.bind(this), 0); - }, - clkStyle: function() { - var top_el = this; - var form = top_el.getElementsByTagName("form")[0]; - commonCls.focus(form.page_name); - }, - clkColor: function() { - this.initColorFlag = true; - this.initStr = ""; - var coloration_el =$("_pagestyle_color"); - if(coloration_el != null) { - //配色取得 - this.setHighlightColor(document.body, "_pagestyle_body","backgroundColor"); - this.setHighlightColor(this.header_el, "_pagestyle_headercolumn","backgroundColor"); - this.setHighlightColor(this.leftcolumn_el, "_pagestyle_leftcolumn","backgroundColor"); - this.setHighlightColor(this.centercolumn_el, "_pagestyle_centercolumn","backgroundColor"); - this.setHighlightColor(this.rightcolumn_el, "_pagestyle_rightcolumn","backgroundColor"); - this.setHighlightColor(this.footer_el, "_pagestyle_footercolumn","backgroundColor"); - - this.setHighlightColor(this.header_el, "_pagestyle_headercolumn_border_top_color","borderTopColor"); - this.setHighlightColor(this.header_el, "_pagestyle_headercolumn_border_right_color","borderRightColor"); - this.setHighlightColor(this.header_el, "_pagestyle_headercolumn_border_bottom_color","borderBottomColor"); - this.setHighlightColor(this.header_el, "_pagestyle_headercolumn_border_left_color","borderLeftColor"); - - this.setHighlightColor(this.leftcolumn_el, "_pagestyle_leftcolumn_border_top_color","borderTopColor"); - this.setHighlightColor(this.leftcolumn_el, "_pagestyle_leftcolumn_border_right_color","borderRightColor"); - this.setHighlightColor(this.leftcolumn_el, "_pagestyle_leftcolumn_border_bottom_color","borderBottomColor"); - this.setHighlightColor(this.leftcolumn_el, "_pagestyle_leftcolumn_border_left_color","borderLeftColor"); - - this.setHighlightColor(this.centercolumn_el, "_pagestyle_centercolumn_border_top_color","borderTopColor"); - this.setHighlightColor(this.centercolumn_el, "_pagestyle_centercolumn_border_right_color","borderRightColor"); - this.setHighlightColor(this.centercolumn_el, "_pagestyle_centercolumn_border_bottom_color","borderBottomColor"); - this.setHighlightColor(this.centercolumn_el, "_pagestyle_centercolumn_border_left_color","borderLeftColor"); - - this.setHighlightColor(this.rightcolumn_el, "_pagestyle_rightcolumn_border_top_color","borderTopColor"); - this.setHighlightColor(this.rightcolumn_el, "_pagestyle_rightcolumn_border_right_color","borderRightColor"); - this.setHighlightColor(this.rightcolumn_el, "_pagestyle_rightcolumn_border_bottom_color","borderBottomColor"); - this.setHighlightColor(this.rightcolumn_el, "_pagestyle_rightcolumn_border_left_color","borderLeftColor"); - - this.setHighlightColor(this.footer_el, "_pagestyle_footercolumn_border_top_color","borderTopColor"); - this.setHighlightColor(this.footer_el, "_pagestyle_footercolumn_border_right_color","borderRightColor"); - this.setHighlightColor(this.footer_el, "_pagestyle_footercolumn_border_bottom_color","borderBottomColor"); - this.setHighlightColor(this.footer_el, "_pagestyle_footercolumn_border_left_color","borderLeftColor"); - } - this.initColorFlag = false; - if(this.initStr != "") { - var color_params = new Object(); - color_params["method"] = "post"; - color_params["param"] = "dialog_pagestyle_action_edit_change&page_id="+this.page_id+"&_pagestyle_flag=1"+this.initStr; - commonCls.send(color_params); - } - }, - setHighlightColor: function(el, child_class_name, property_name) { - if(el) { - //background-image対応 - var bgImageStyle = "none"; - if(property_name == "backgroundColor" || property_name == "background-color") { - bgImageStyle = Element.getStyle(el, "backgroundImage"); - } - - var color = commonCls.getColorCode(el,property_name); - var column_el = $(child_class_name); - ////var highlight_flag = false; - var count = 0; - for (var i = 0,column_len = column_el.childNodes.length; i < column_len; i++) { - var child_el = column_el.childNodes[i]; - if(child_el.nodeType == 1) { - if(child_el.tagName.toLowerCase() == "a" && child_el.title == color && bgImageStyle == "none") { - Element.addClassName(child_el, "highlight"); - //if(count != 0) { - child_el.onclick(); - //} - break; - } else if(child_el.tagName.toLowerCase() == "select") { - //background-image - if(bgImageStyle != "none") { - var selected_flag = false; - var select_el = child_el; - // urlの中身だけ残す - if(bgImageStyle.match("^url[(]{1}\"")) { - var repBgImageStyle = bgImageStyle.replace(_nc_base_url, "").replace("../", "").replace("url(\"", "").replace("\")", ""); - } else { - var repBgImageStyle = bgImageStyle.replace(_nc_base_url, "").replace("../", "").replace("url(", "").replace(")", ""); - } - for (var j = 0, option_len = select_el.childNodes.length; j < option_len; j++) { - var option_el = select_el.childNodes[j]; - if(option_el.value.match(repBgImageStyle)) { - option_el.selected = "selected"; - selected_flag = true; - select_el.onchange(); - break; - } - } - } - } else if(child_el.tagName.toLowerCase() == "input" && child_el.type != "hidden") { - if(color != "transparent") { - child_el.value = color; - child_el.onchange(); - } - //break; - } - count++; - } - } - - } else { - //レイアウトで表示していないカラム - commonCls.displayNone($(child_class_name)); - var sub_el = $(child_class_name + "_border"); - if(sub_el) { - commonCls.displayNone(sub_el); - } - } - }, - displayChange: function(this_el, el) { - var img_el = Element.getChildElement(this_el); - if(img_el.src.match("down_arrow.gif")) { - img_el.src = img_el.src.replace("down_arrow.gif","right_arrow.gif"); - img_el.alt = this.lang_right_arrow; - this_el.title = this.lang_right_arrow; - } else { - img_el.src = img_el.src.replace("right_arrow.gif","down_arrow.gif"); - img_el.alt = this.lang_down_arrow; - this_el.title = this.lang_down_arrow; - } - if(el == null || el == undefined) { - var next_el = this_el.nextSibling; - if(Element.hasClassName(next_el,"_blockstyle_custom_sample")) { - next_el = next_el.nextSibling; - } - commonCls.displayChange(next_el); - } else { - commonCls.displayChange($(el)); - } - }, - themeClick: function(this_el, theme_name) { - if(!this.themefields) { - var pagestyle_top = $("_pagestyle_top"); - this.themefields = Element.getElementsByClassName(pagestyle_top, "_pagestyle"); - } - var return_flag = false; - this.themefields.each(function(field) { - if(Element.hasClassName(field,"highlight")) { - if(field == this_el) { - /* 変更なし */ - return_flag = true; - return; - } else { - Element.removeClassName(field,"highlight"); - } - } - }.bind(this)); - if(return_flag) { - return; - } - Element.addClassName(this_el,"highlight"); - - /* send */ - var all_apply = 0; - var defultcolor_params = new Object(); - - defultcolor_params["method"] = "post"; - defultcolor_params["param"] = {"action":"dialog_pagestyle_action_edit_setdefault","page_id":this.page_id,"_pagestyle_flag":1,"all_apply":all_apply,"sesson_only":1}; - defultcolor_params["callbackfunc"] = function(){ - var theme_params = new Object(); - theme_params["method"] = "post"; - theme_params["param"] = {"action":"dialog_pagestyle_action_edit_change","page_id":this.page_id,"_pagestyle_flag":1,"theme_name": theme_name}; - theme_params["callbackfunc"] = function(){ - this.refresh(0); - }.bind(this); - commonCls.send(theme_params); - }.bind(this); - commonCls.send(defultcolor_params); - }, - /* 配色クリック */ - colorClick: function(class_name, property_name, color, this_el) { - if(this_el.tagName.toLowerCase() != "select" && (color == "" || color =="1px solid " || this.colorclick_flag == true || (color.length == 7 && color.indexOf('#') != 0))) { - return; - } - if(property_name == "backgroundColor" && color == null) color = this_el.title; - else if(color == null && this_el.title == "transparent") color = "0px none"; - else if(color == null) color = "1px solid " + this_el.title; - if(typeof class_name == "string") { - var el = Element.getChildElementByClassName(document.body, class_name); - var send_name = class_name+"_"+property_name; - } else { - var el = class_name; - var send_name = "body"+"_"+property_name; - } - if(!this.initColorFlag) { - this.colorclick_flag = true; - if(property_name == "backgroundColor") { - // backgroundクリア - el.style.background = "none" ; - } - if(property_name == "background" && color == "") { - color = "none"; - } - eval("el.style."+property_name + "=\"" + color+"\";"); - if(!(browser.isIE) && property_name.match("border")) { - //firefoxのborderの場合、すぐに反映されないため - $("_container").style.display = "none"; - } - var color_params = new Object(); - color_params["method"] = "post"; - color_params["param"] = "dialog_pagestyle_action_edit_change&page_id="+this.page_id+"&_pagestyle_flag=1&"+send_name+"="+encodeURIComponent(color); - color_params["callbackfunc"] = function(){ - this.colorclick_flag = false; - if(!(browser.isIE) && property_name.match("border") ) { - $("_container").style.display = "table"; - } - }.bind(this); - commonCls.send(color_params); - this.setHighlight(this_el); - this.chg_flag = true; - } else { - //pagestyle_list初期化文字列作成 - this.initStr += "&"+send_name+"="+encodeURIComponent(color); - } - }, - setHighlight: function(this_el) { - for (var i = 0; i < this_el.parentNode.childNodes.length; i++) { - var child_el = this_el.parentNode.childNodes[i]; - if(child_el.nodeType != 1) continue; - if(Element.hasClassName(child_el,"highlight")) { - Element.removeClassName(child_el,"highlight"); - } else if(this_el.tagName.toLowerCase() != "select" && child_el.tagName.toLowerCase() == "select") { - child_el.selectedIndex = 0; - } else if(this_el.tagName.toLowerCase() != "input" && child_el.tagName.toLowerCase() == "input" && child_el.type != "hidden") { - child_el.value = ""; - } - } - if(this_el.tagName.toLowerCase() != "input" && this_el.tagName.toLowerCase() != "select") { - Element.addClassName(this_el,"highlight"); - } - }, - /* 規定値に戻す */ - defaultColorClick: function() { - var top_el = $(this.id); - var form = top_el.getElementsByTagName("form")[0]; - if(form.pagestyle_all_apply) { - if(form.pagestyle_all_apply.checked) { - var all_apply = 1; - } else { - var all_apply = 0; - } - } else { - var all_apply = 0; - } - /* send */ - var defultcolor_params = new Object(); - - defultcolor_params["method"] = "post"; - defultcolor_params["param"] = {"action":"dialog_pagestyle_action_edit_setdefault","page_id":this.page_id,"_pagestyle_flag":1,"all_apply":all_apply}; - defultcolor_params["callbackfunc"] = function(){ - this.refresh(3); - }.bind(this); - commonCls.send(defultcolor_params); - }, - /* レイアウトクリック */ - layoutClick: function(el , header_flag, leftcolum_flag, rightcolumn_flag) { - if(Element.hasClassName(el,"highlight")) { - //変更なし - return; - } - this.chg_flag = true; - var pagestyle_layout_el = Element.getParentElementByClassName(el, "_pagestyle_layout"); - var highlight_el = Element.getChildElementByClassName(pagestyle_layout_el, "highlight"); - Element.removeClassName(highlight_el,"highlight"); - Element.addClassName(el,"highlight"); - var refresh_flag = false; - if(header_flag) { - if(this.header_id_el) { - if(this.header_add_module_el) commonCls.displayVisible(this.header_add_module_el); - commonCls.displayVisible(this.header_id_el); - } else { - refresh_flag = true; - } - this.header_flag = 1; - } else { - if(this.header_add_module_el) commonCls.displayNone(this.header_add_module_el); - if(this.header_id_el) commonCls.displayNone(this.header_id_el); - this.header_flag = 0; - } - var colspan = 1; - if(leftcolum_flag) { - colspan++; - if(this.leftcolumn_el) { - commonCls.displayVisible(this.leftcolumn_el); - } else { - refresh_flag = true; - } - this.leftcolumn_flag = 1; - } else { - if(this.leftcolumn_el) commonCls.displayNone(this.leftcolumn_el); - this.leftcolumn_flag = 0; - } - if(rightcolumn_flag) { - colspan++; - if(this.rightcolumn_el) { - commonCls.displayVisible(this.rightcolumn_el); - } else { - refresh_flag = true; - } - this.rightcolumn_flag = 1; - } else { - if(this.rightcolumn_el) commonCls.displayNone(this.rightcolumn_el); - this.rightcolumn_flag = 0; - } - if(this.header_id_el) { - this.header_id_el.colspan = colspan; - } - if(this.footer_el) { - this.footer_el.colspan = colspan; - } - var layout_params = new Object(); - layout_params["method"] = "post"; - layout_params["param"] = {"action":"dialog_pagestyle_action_edit_change","_pagestyle_flag":1,"page_id":this.page_id,"header_flag": this.header_flag,"leftcolumn_flag": this.leftcolumn_flag,"rightcolumn_flag": this.rightcolumn_flag}; - layout_params["callbackfunc"] = function(){ - if(refresh_flag != "" || !(browser.isIE)) { - this.refresh(2); - } - }.bind(this); - commonCls.send(layout_params); - }, - refresh: function(active_tab, append_str) { - var top_el = $(this.id); - append_str = (append_str == undefined || append_str == null) ? "" : append_str; - var str = "&_layoutmode=off"; - if(active_tab != undefined && active_tab != null) { - str += "&active_tab="+active_tab; - } - location.href = _nc_base_url + _nc_index_file_name + "?action="+ this.pages_action+"&page_id="+this.page_id+ - "&_pagestyle_flag=1&pagestyle_x="+top_el.parentNode.style.left+"&pagestyle_y="+top_el.parentNode.style.top+ - str + append_str; - }, - //行揃え変更 - chgGeneral: function(el) { - var top_el = $(this.id); - var form = top_el.getElementsByTagName("form")[0]; - var name = el.name; - var hidden_el = el.nextSibling; - if(hidden_el.value == el.value) { - // 変更なし - return; - } - this.chg_flag = true; - var container_el = $("_container"); - if(name == "align") { - if(el.value == "center") { - form.leftmargin.value = "0"; - form.rightmargin.value = "0"; - container_el.style.marginRight = ""; - container_el.style.marginLeft = ""; - var buf_hidden_el = form.leftmargin.nextSibling; - buf_hidden_el.value = "0"; - var buf_hidden_el = form.rightmargin.nextSibling; - buf_hidden_el.value = "0"; - } - container_el.align = el.value; - container_el.style.textAlign = el.value; - } else if(name == "topmargin") { - container_el.style.marginTop = el.value + "px"; - } else if(name == "rightmargin") { - container_el.style.marginRight = el.value + "px"; - } else if(name == "bottommargin") { - container_el.style.marginBottom = el.value + "px"; - } else if(name == "leftmargin") { - container_el.style.marginLeft = el.value + "px"; - } - if((name == "leftmargin" || name == "rightmargin") && el.value != "0" && form.align.value == "center") { - form.align.value = "left"; - container_el.align = "left"; - container_el.style.textAlign = "left"; - var buf_hidden_el = form.align.nextSibling; - buf_hidden_el.value = "left"; - } - if(name == "page_name") { - var robj = new RegExp(this.permalink_prohibition, "ig"); - if(hidden_el.value.replace(robj, this.permalink_prohibition_replace) == form.permalink.value.replace(robj, this.permalink_prohibition_replace)) { - form.permalink.value = el.value.replace(robj, this.permalink_prohibition_replace); - } - } - hidden_el.value = el.value; - //session情報に追記 - var general_params = new Object(); - general_params["method"] = "post"; - general_params["param"] = {"action":"dialog_pagestyle_action_edit_change","_pagestyle_flag":1,"page_id":this.page_id}; - general_params["param"][name] = el.value; - commonCls.send(general_params); - }, - /*OK*/ - okClick: function(id) { - var top_el = $(this.id); - var form = top_el.getElementsByTagName("form")[0]; - if(form.pagestyle_all_apply) { - if(form.pagestyle_all_apply.checked) { - var all_apply = 1; - } else { - var all_apply = 0; - } - } else { - var all_apply = 0; - } - if(this.chg_flag) { - setTimeout(function() { - var top_el = $(this.id); - var theme_params = new Object(); - if(typeof form.titletag != "undefined") { - var titletag = form.titletag.value; - } else { - var titletag = null; - } - if(typeof form.permalink != "undefined") { - var permalink = form.permalink.value; - } else { - var permalink = null; - } - - theme_params["method"] = "post"; - theme_params["top_el"] = $(this.id); - theme_params["param"] = {"action":"dialog_pagestyle_action_edit_init","page_id":this.page_id,"page_name":form.page_name.value,"permalink":permalink,"titletag":titletag,"meta_description":form.meta_description.value,"meta_keywords":form.meta_keywords.value,"_pagestyle_flag":1,"all_apply":all_apply,"prefix_id_name":"dialog_pagestyle"}; - theme_params["callbackfunc"] = function(res){ - if(form.permalink_url && form.permalink.value != undefined && form.permalink.value != '') { - location.href = form.permalink_url.value + form.permalink.value + '/'; - } else { - location.href = _nc_base_url + _nc_index_file_name + "?action=" + this.pages_action + "&page_id="+this.page_id; - } - }.bind(this); - theme_params["callbackfunc_error"] = function(res){ - commonCls.alert(res); - this.tabset.setActiveIndex(1); - this.tabset.refresh(); - }.bind(this); - commonCls.send(theme_params); - }.bind(this),300); - } else { - //変更なし - commonCls.removeBlock(id); - } - }, - /*キャンセル*/ - cancelClick: function(id) { - if(this.chg_flag) { - if(!commonCls.confirm(this.lang_cancel_confirm))return false; - location.href = _nc_base_url + _nc_index_file_name + "?action=pages_view_main&page_id="+this.page_id; - } else { - //変更なし - commonCls.removeBlock(id); - } - //location.href = _nc_base_url + _nc_index_file_name + "?action=pages_view_main&page_id="+this.page_id; - } -} - +var clsPagestyle = Class.create(); + +clsPagestyle.prototype = { + initialize: function() { + this.id = null; + this.top_el = null; + + this.lang_down_arrow = null; + this.lang_right_arrow = null; + + this.lang_cancel_confirm = null; + + this.themefields = null; + this.theme_name = null; + this.header_flag = null; + this.leftcolumn_flag = null; + this.rightcolumn_flag = null; + + this.header_el = null; + this.header_id_el = null; + this.leftcolumn_el = null; + this.centercolumn_el = null; + this.rightcolumn_el = null; + this.footer_el = null; + + this.colorclick_flag = false; + + this.chg_flag = false; + this.initColorFlag = false; + this.initStr = ""; + this.tabset = null; + }, + init: function(id, page_id, theme_name, header_flag, leftcolumn_flag, rightcolumn_flag, active_tab, change_flag, lang_cancel_confirm, lang_style, lang_theme, lang_layout, lang_coloration, lang_down_arrow, lang_right_arrow, pages_action, permalink_prohibition, permalink_prohibition_replace) { + this.id = id; + this.page_id = page_id; + this.theme_name = theme_name; + this.header_flag = header_flag; + this.leftcolumn_flag = leftcolumn_flag; + this.rightcolumn_flag = rightcolumn_flag; + + this.pages_action = pages_action; + this.permalink_prohibition = permalink_prohibition; + this.permalink_prohibition_replace = permalink_prohibition_replace; + + var top_el = $(id); + this.top_el = top_el; + this.header_id_el = $("__headercolumn"); + this.header_el = $("_headercolumn"); + if(this.header_el) { + this.header_add_module_el = Element.getChildElementByClassName(this.header_el, "headercolumn_addmodule"); + } + this.leftcolumn_el = $("_leftcolumn"); + this.centercolumn_el = $("_centercolumn"); + this.rightcolumn_el =$("_rightcolumn"); + this.footer_el = $("_footercolumn"); + + /* タブ */ + tabset = new compTabset(top_el); + tabset.addTabset(lang_theme, null); + tabset.addTabset(lang_style,pagestyleCls.clkStyle.bind($(id))); + tabset.addTabset(lang_layout); + tabset.addTabset(lang_coloration, null, pagestyleCls.clkColor.bind(this)); + + tabset.setActiveIndex(valueParseInt(active_tab)); + + tabset.render(); + if(change_flag != "") { + this.chg_flag = true; + } else { + this.chg_flag = false; + } + this.tabset = tabset; + this.lang_cancel_confirm = lang_cancel_confirm; + this.lang_down_arrow = lang_down_arrow; + this.lang_right_arrow = lang_right_arrow; + + //Initに時間がかかる処理は後回し + //setTimeout(pagestyleCls.InitTimer.bind(this), 0); + }, + clkStyle: function() { + var top_el = this; + var form = top_el.getElementsByTagName("form")[0]; + commonCls.focus(form.page_name); + }, + clkColor: function() { + this.initColorFlag = true; + this.initStr = ""; + var coloration_el =$("_pagestyle_color"); + if(coloration_el != null) { + //配色取得 + this.setHighlightColor(document.body, "_pagestyle_body","backgroundColor"); + this.setHighlightColor(this.header_el, "_pagestyle_headercolumn","backgroundColor"); + this.setHighlightColor(this.leftcolumn_el, "_pagestyle_leftcolumn","backgroundColor"); + this.setHighlightColor(this.centercolumn_el, "_pagestyle_centercolumn","backgroundColor"); + this.setHighlightColor(this.rightcolumn_el, "_pagestyle_rightcolumn","backgroundColor"); + this.setHighlightColor(this.footer_el, "_pagestyle_footercolumn","backgroundColor"); + + this.setHighlightColor(this.header_el, "_pagestyle_headercolumn_border_top_color","borderTopColor"); + this.setHighlightColor(this.header_el, "_pagestyle_headercolumn_border_right_color","borderRightColor"); + this.setHighlightColor(this.header_el, "_pagestyle_headercolumn_border_bottom_color","borderBottomColor"); + this.setHighlightColor(this.header_el, "_pagestyle_headercolumn_border_left_color","borderLeftColor"); + + this.setHighlightColor(this.leftcolumn_el, "_pagestyle_leftcolumn_border_top_color","borderTopColor"); + this.setHighlightColor(this.leftcolumn_el, "_pagestyle_leftcolumn_border_right_color","borderRightColor"); + this.setHighlightColor(this.leftcolumn_el, "_pagestyle_leftcolumn_border_bottom_color","borderBottomColor"); + this.setHighlightColor(this.leftcolumn_el, "_pagestyle_leftcolumn_border_left_color","borderLeftColor"); + + this.setHighlightColor(this.centercolumn_el, "_pagestyle_centercolumn_border_top_color","borderTopColor"); + this.setHighlightColor(this.centercolumn_el, "_pagestyle_centercolumn_border_right_color","borderRightColor"); + this.setHighlightColor(this.centercolumn_el, "_pagestyle_centercolumn_border_bottom_color","borderBottomColor"); + this.setHighlightColor(this.centercolumn_el, "_pagestyle_centercolumn_border_left_color","borderLeftColor"); + + this.setHighlightColor(this.rightcolumn_el, "_pagestyle_rightcolumn_border_top_color","borderTopColor"); + this.setHighlightColor(this.rightcolumn_el, "_pagestyle_rightcolumn_border_right_color","borderRightColor"); + this.setHighlightColor(this.rightcolumn_el, "_pagestyle_rightcolumn_border_bottom_color","borderBottomColor"); + this.setHighlightColor(this.rightcolumn_el, "_pagestyle_rightcolumn_border_left_color","borderLeftColor"); + + this.setHighlightColor(this.footer_el, "_pagestyle_footercolumn_border_top_color","borderTopColor"); + this.setHighlightColor(this.footer_el, "_pagestyle_footercolumn_border_right_color","borderRightColor"); + this.setHighlightColor(this.footer_el, "_pagestyle_footercolumn_border_bottom_color","borderBottomColor"); + this.setHighlightColor(this.footer_el, "_pagestyle_footercolumn_border_left_color","borderLeftColor"); + } + this.initColorFlag = false; + if(this.initStr != "") { + var color_params = new Object(); + color_params["method"] = "post"; + color_params["param"] = "dialog_pagestyle_action_edit_change&page_id="+this.page_id+"&_pagestyle_flag=1"+this.initStr; + commonCls.send(color_params); + } + }, + setHighlightColor: function(el, child_class_name, property_name) { + if(el) { + //background-image対応 + var bgImageStyle = "none"; + if(property_name == "backgroundColor" || property_name == "background-color") { + bgImageStyle = Element.getStyle(el, "backgroundImage"); + } + + var color = commonCls.getColorCode(el,property_name); + var column_el = $(child_class_name); + ////var highlight_flag = false; + var count = 0; + for (var i = 0,column_len = column_el.childNodes.length; i < column_len; i++) { + var child_el = column_el.childNodes[i]; + if(child_el.nodeType == 1) { + if(child_el.tagName.toLowerCase() == "a" && child_el.title == color && bgImageStyle == "none") { + Element.addClassName(child_el, "highlight"); + //if(count != 0) { + child_el.onclick(); + //} + break; + } else if(child_el.tagName.toLowerCase() == "select") { + //background-image + if(bgImageStyle != "none") { + var selected_flag = false; + var select_el = child_el; + // urlの中身だけ残す + if(bgImageStyle.match("^url[(]{1}\"")) { + var repBgImageStyle = bgImageStyle.replace(_nc_base_url, "").replace("../", "").replace("url(\"", "").replace("\")", ""); + } else { + var repBgImageStyle = bgImageStyle.replace(_nc_base_url, "").replace("../", "").replace("url(", "").replace(")", ""); + } + for (var j = 0, option_len = select_el.childNodes.length; j < option_len; j++) { + var option_el = select_el.childNodes[j]; + if(option_el.value.match(repBgImageStyle)) { + option_el.selected = "selected"; + selected_flag = true; + select_el.onchange(); + break; + } + } + } + } else if(child_el.tagName.toLowerCase() == "input" && child_el.type != "hidden") { + if(color != "transparent") { + child_el.value = color; + child_el.onchange(); + } + //break; + } + count++; + } + } + + } else { + //レイアウトで表示していないカラム + commonCls.displayNone($(child_class_name)); + var sub_el = $(child_class_name + "_border"); + if(sub_el) { + commonCls.displayNone(sub_el); + } + } + }, + displayChange: function(this_el, el) { + var img_el = Element.getChildElement(this_el); + if(img_el.src.match("down_arrow.gif")) { + img_el.src = img_el.src.replace("down_arrow.gif","right_arrow.gif"); + img_el.alt = this.lang_right_arrow; + this_el.title = this.lang_right_arrow; + } else { + img_el.src = img_el.src.replace("right_arrow.gif","down_arrow.gif"); + img_el.alt = this.lang_down_arrow; + this_el.title = this.lang_down_arrow; + } + if(el == null || el == undefined) { + var next_el = this_el.nextSibling; + if(Element.hasClassName(next_el,"_blockstyle_custom_sample")) { + next_el = next_el.nextSibling; + } + commonCls.displayChange(next_el); + } else { + commonCls.displayChange($(el)); + } + }, + themeClick: function(this_el, theme_name) { + if(!this.themefields) { + var pagestyle_top = $("_pagestyle_top"); + this.themefields = Element.getElementsByClassName(pagestyle_top, "_pagestyle"); + } + var return_flag = false; + this.themefields.each(function(field) { + if(Element.hasClassName(field,"highlight")) { + if(field == this_el) { + /* 変更なし */ + return_flag = true; + return; + } else { + Element.removeClassName(field,"highlight"); + } + } + }.bind(this)); + if(return_flag) { + return; + } + Element.addClassName(this_el,"highlight"); + + /* send */ + var all_apply = 0; + var defultcolor_params = new Object(); + + defultcolor_params["method"] = "post"; + defultcolor_params["param"] = {"action":"dialog_pagestyle_action_edit_setdefault","page_id":this.page_id,"_pagestyle_flag":1,"all_apply":all_apply,"sesson_only":1}; + defultcolor_params["callbackfunc"] = function(){ + var theme_params = new Object(); + theme_params["method"] = "post"; + theme_params["param"] = {"action":"dialog_pagestyle_action_edit_change","page_id":this.page_id,"_pagestyle_flag":1,"theme_name": theme_name}; + theme_params["callbackfunc"] = function(){ + this.refresh(0); + }.bind(this); + commonCls.send(theme_params); + }.bind(this); + commonCls.send(defultcolor_params); + }, + /* 配色クリック */ + colorClick: function(class_name, property_name, color, this_el) { + if(this_el.tagName.toLowerCase() != "select" && (color == "" || color =="1px solid " || this.colorclick_flag == true || (color.length == 7 && color.indexOf('#') != 0))) { + return; + } + if(property_name == "backgroundColor" && color == null) color = this_el.title; + else if(color == null && this_el.title == "transparent") color = "0px none"; + else if(color == null) color = "1px solid " + this_el.title; + if(typeof class_name == "string") { + var el = Element.getChildElementByClassName(document.body, class_name); + var send_name = class_name+"_"+property_name; + } else { + var el = class_name; + var send_name = "body"+"_"+property_name; + } + if(!this.initColorFlag) { + this.colorclick_flag = true; + if(property_name == "backgroundColor") { + // backgroundクリア + el.style.background = "none" ; + } + if(property_name == "background" && color == "") { + color = "none"; + } + eval("el.style."+property_name + "=\"" + color+"\";"); + if(!(browser.isIE) && property_name.match("border")) { + //firefoxのborderの場合、すぐに反映されないため + $("_container").style.display = "none"; + } + var color_params = new Object(); + color_params["method"] = "post"; + color_params["param"] = "dialog_pagestyle_action_edit_change&page_id="+this.page_id+"&_pagestyle_flag=1&"+send_name+"="+encodeURIComponent(color); + color_params["callbackfunc"] = function(){ + this.colorclick_flag = false; + if(!(browser.isIE) && property_name.match("border") ) { + $("_container").style.display = "table"; + } + }.bind(this); + commonCls.send(color_params); + this.setHighlight(this_el); + this.chg_flag = true; + } else { + //pagestyle_list初期化文字列作成 + this.initStr += "&"+send_name+"="+encodeURIComponent(color); + } + }, + setHighlight: function(this_el) { + for (var i = 0; i < this_el.parentNode.childNodes.length; i++) { + var child_el = this_el.parentNode.childNodes[i]; + if(child_el.nodeType != 1) continue; + if(Element.hasClassName(child_el,"highlight")) { + Element.removeClassName(child_el,"highlight"); + } else if(this_el.tagName.toLowerCase() != "select" && child_el.tagName.toLowerCase() == "select") { + child_el.selectedIndex = 0; + } else if(this_el.tagName.toLowerCase() != "input" && child_el.tagName.toLowerCase() == "input" && child_el.type != "hidden") { + child_el.value = ""; + } + } + if(this_el.tagName.toLowerCase() != "input" && this_el.tagName.toLowerCase() != "select") { + Element.addClassName(this_el,"highlight"); + } + }, + /* 規定値に戻す */ + defaultColorClick: function() { + var top_el = $(this.id); + var form = top_el.getElementsByTagName("form")[0]; + if(form.pagestyle_all_apply) { + if(form.pagestyle_all_apply.checked) { + var all_apply = 1; + } else { + var all_apply = 0; + } + } else { + var all_apply = 0; + } + /* send */ + var defultcolor_params = new Object(); + + defultcolor_params["method"] = "post"; + defultcolor_params["param"] = {"action":"dialog_pagestyle_action_edit_setdefault","page_id":this.page_id,"_pagestyle_flag":1,"all_apply":all_apply}; + defultcolor_params["callbackfunc"] = function(){ + this.refresh(3); + }.bind(this); + commonCls.send(defultcolor_params); + }, + /* レイアウトクリック */ + layoutClick: function(el , header_flag, leftcolum_flag, rightcolumn_flag) { + if(Element.hasClassName(el,"highlight")) { + //変更なし + return; + } + this.chg_flag = true; + var pagestyle_layout_el = Element.getParentElementByClassName(el, "_pagestyle_layout"); + var highlight_el = Element.getChildElementByClassName(pagestyle_layout_el, "highlight"); + Element.removeClassName(highlight_el,"highlight"); + Element.addClassName(el,"highlight"); + var refresh_flag = false; + if(header_flag) { + if(this.header_id_el) { + if(this.header_add_module_el) commonCls.displayVisible(this.header_add_module_el); + commonCls.displayVisible(this.header_id_el); + } else { + refresh_flag = true; + } + this.header_flag = 1; + } else { + if(this.header_add_module_el) commonCls.displayNone(this.header_add_module_el); + if(this.header_id_el) commonCls.displayNone(this.header_id_el); + this.header_flag = 0; + } + var colspan = 1; + if(leftcolum_flag) { + colspan++; + if(this.leftcolumn_el) { + commonCls.displayVisible(this.leftcolumn_el); + } else { + refresh_flag = true; + } + this.leftcolumn_flag = 1; + } else { + if(this.leftcolumn_el) commonCls.displayNone(this.leftcolumn_el); + this.leftcolumn_flag = 0; + } + if(rightcolumn_flag) { + colspan++; + if(this.rightcolumn_el) { + commonCls.displayVisible(this.rightcolumn_el); + } else { + refresh_flag = true; + } + this.rightcolumn_flag = 1; + } else { + if(this.rightcolumn_el) commonCls.displayNone(this.rightcolumn_el); + this.rightcolumn_flag = 0; + } + if(this.header_id_el) { + this.header_id_el.colspan = colspan; + } + if(this.footer_el) { + this.footer_el.colspan = colspan; + } + var layout_params = new Object(); + layout_params["method"] = "post"; + layout_params["param"] = {"action":"dialog_pagestyle_action_edit_change","_pagestyle_flag":1,"page_id":this.page_id,"header_flag": this.header_flag,"leftcolumn_flag": this.leftcolumn_flag,"rightcolumn_flag": this.rightcolumn_flag}; + layout_params["callbackfunc"] = function(){ + if(refresh_flag != "" || !(browser.isIE)) { + this.refresh(2); + } + }.bind(this); + commonCls.send(layout_params); + }, + refresh: function(active_tab, append_str) { + var top_el = $(this.id); + append_str = (append_str == undefined || append_str == null) ? "" : append_str; + var str = "&_layoutmode=off"; + if(active_tab != undefined && active_tab != null) { + str += "&active_tab="+active_tab; + } + location.href = _nc_base_url + _nc_index_file_name + "?action="+ this.pages_action+"&page_id="+this.page_id+ + "&_pagestyle_flag=1&pagestyle_x="+top_el.parentNode.style.left+"&pagestyle_y="+top_el.parentNode.style.top+ + str + append_str; + }, + //行揃え変更 + chgGeneral: function(el) { + var top_el = $(this.id); + var form = top_el.getElementsByTagName("form")[0]; + var name = el.name; + var hidden_el = el.nextSibling; + if(hidden_el.value == el.value) { + // 変更なし + return; + } + this.chg_flag = true; + var container_el = $("_container"); + if(name == "align") { + if(el.value == "center") { + form.leftmargin.value = "0"; + form.rightmargin.value = "0"; + container_el.style.marginRight = ""; + container_el.style.marginLeft = ""; + var buf_hidden_el = form.leftmargin.nextSibling; + buf_hidden_el.value = "0"; + var buf_hidden_el = form.rightmargin.nextSibling; + buf_hidden_el.value = "0"; + } + container_el.align = el.value; + container_el.style.textAlign = el.value; + } else if(name == "topmargin") { + container_el.style.marginTop = el.value + "px"; + } else if(name == "rightmargin") { + container_el.style.marginRight = el.value + "px"; + } else if(name == "bottommargin") { + container_el.style.marginBottom = el.value + "px"; + } else if(name == "leftmargin") { + container_el.style.marginLeft = el.value + "px"; + } + if((name == "leftmargin" || name == "rightmargin") && el.value != "0" && form.align.value == "center") { + form.align.value = "left"; + container_el.align = "left"; + container_el.style.textAlign = "left"; + var buf_hidden_el = form.align.nextSibling; + buf_hidden_el.value = "left"; + } + if(name == "page_name") { + var robj = new RegExp(this.permalink_prohibition, "ig"); + if(hidden_el.value.replace(robj, this.permalink_prohibition_replace) == form.permalink.value.replace(robj, this.permalink_prohibition_replace)) { + form.permalink.value = el.value.replace(robj, this.permalink_prohibition_replace); + } + } + hidden_el.value = el.value; + //session情報に追記 + var general_params = new Object(); + general_params["method"] = "post"; + general_params["param"] = {"action":"dialog_pagestyle_action_edit_change","_pagestyle_flag":1,"page_id":this.page_id}; + general_params["param"][name] = el.value; + commonCls.send(general_params); + }, + /*OK*/ + okClick: function(id) { + var top_el = $(this.id); + var form = top_el.getElementsByTagName("form")[0]; + if(form.pagestyle_all_apply) { + if(form.pagestyle_all_apply.checked) { + var all_apply = 1; + } else { + var all_apply = 0; + } + } else { + var all_apply = 0; + } + if(this.chg_flag) { + setTimeout(function() { + var top_el = $(this.id); + var theme_params = new Object(); + if(typeof form.titletag != "undefined") { + var titletag = form.titletag.value; + } else { + var titletag = null; + } + if(typeof form.permalink != "undefined") { + var permalink = form.permalink.value; + } else { + var permalink = null; + } + + theme_params["method"] = "post"; + theme_params["top_el"] = $(this.id); + theme_params["param"] = {"action":"dialog_pagestyle_action_edit_init","page_id":this.page_id,"page_name":form.page_name.value,"permalink":permalink,"titletag":titletag,"meta_description":form.meta_description.value,"meta_keywords":form.meta_keywords.value,"_pagestyle_flag":1,"all_apply":all_apply,"prefix_id_name":"dialog_pagestyle"}; + theme_params["callbackfunc"] = function(res){ + if(form.permalink_url && form.permalink.type != "hidden" && form.permalink.value != '') { + location.href = form.permalink_url.value + form.permalink.value + '/'; + } else { + location.href = _nc_base_url + _nc_index_file_name + "?action=" + this.pages_action + "&page_id="+this.page_id; + } + }.bind(this); + theme_params["callbackfunc_error"] = function(res){ + commonCls.alert(res); + this.tabset.setActiveIndex(1); + this.tabset.refresh(); + }.bind(this); + commonCls.send(theme_params); + }.bind(this),300); + } else { + //変更なし + commonCls.removeBlock(id); + } + }, + /*キャンセル*/ + cancelClick: function(id) { + if(this.chg_flag) { + if(!commonCls.confirm(this.lang_cancel_confirm))return false; + location.href = _nc_base_url + _nc_index_file_name + "?action=pages_view_main&page_id="+this.page_id; + } else { + //変更なし + commonCls.removeBlock(id); + } + //location.href = _nc_base_url + _nc_index_file_name + "?action=pages_view_main&page_id="+this.page_id; + } +} + pagestyleCls = new clsPagestyle(); \ No newline at end of file diff --git a/html/webapp/modules/dialog/pagestyle/view/edit/init/Init.class.php b/html/webapp/modules/dialog/pagestyle/view/edit/init/Init.class.php old mode 100644 new mode 100755 index e96e140..54925aa --- a/html/webapp/modules/dialog/pagestyle/view/edit/init/Init.class.php +++ b/html/webapp/modules/dialog/pagestyle/view/edit/init/Init.class.php @@ -213,23 +213,23 @@ function execute() } else { $this->background_color[$key] = ""; } - - foreach($border_array as $border => $border_value) { - if(isset($theme_list[$key][$border])) { - if($key == "general") { - $this->headercolumn[$border_value] = explode(",",$theme_list[$key][$border]); - $this->leftcolumn[$border_value] = explode(",",$theme_list[$key][$border]); - $this->rightcolumn[$border_value] = explode(",",$theme_list[$key][$border]); - $this->centercolumn[$border_value] = explode(",",$theme_list[$key][$border]); - $this->footercolumn[$border_value] = explode(",",$theme_list[$key][$border]); - } else { - $this->$key[$border_value] = explode(",",$theme_list[$key][$border]); - } + + foreach ($border_array as $border => $border_value) { + if (!isset($theme_list[$key][$border])) { + // 未定義の場合はセットせず、generalの値を使用する + continue; + } + if ($key == "general") { + $this->headercolumn[$border_value] = explode(",", $theme_list[$key][$border]); + $this->leftcolumn[$border_value] = explode(",", $theme_list[$key][$border]); + $this->rightcolumn[$border_value] = explode(",", $theme_list[$key][$border]); + $this->centercolumn[$border_value] = explode(",", $theme_list[$key][$border]); + $this->footercolumn[$border_value] = explode(",", $theme_list[$key][$border]); } else { - $this->$key[$border_value] = ""; + // 定義されている場合は定義内容をセットする + $this->{$key}[$border_value] = explode(",", $theme_list[$key][$border]); } } - } } } diff --git a/html/webapp/modules/dialog/templates/pagestyle.html b/html/webapp/modules/dialog/templates/pagestyle.html index 4417dde..aad9d92 100644 --- a/html/webapp/modules/dialog/templates/pagestyle.html +++ b/html/webapp/modules/dialog/templates/pagestyle.html @@ -1,401 +1,405 @@ -<{strip}> -<{* TODO:style属性、後にクラス化 *}> -
-
-<{*タブコンポーネント*}> -
-
-
- <{assign var="pagetheme_name" value=$action.theme_name}> -
- <{foreach from=$action.category_list|smarty:nodefaults key=key item=category_name}> - <{if $action.pagetheme_list.$key}> - <{if $action.act_category == $key}> - - /images/common/down_arrow.gif" alt="<{$lang.dialog_pagestyle_down_arrow}>" class="icon" /> <{$category_name}> - -
- <{else}> - - /images/common/right_arrow.gif" alt="<{$lang.dialog_pagestyle_right_arrow}>" class="icon" /> <{$category_name}> - -
- <{/if}> - <{foreach name=pagetheme_list from=$action.pagetheme_list.$key|smarty:nodefaults key=theme_name item=lang_theme_name}> - <{if $theme_name == $pagetheme_name}> - <{* 配色-カスタムのtheme_name取得用 *}> - <{assign var="current_theme_name" value=$lang_theme_name|smarty:nodefaults}> - <{/if}> -
- - <{$lang_theme_name}> - -
- <{if $smarty.foreach.pagetheme_list.iteration % 4 == 0}> - <{*4つで下の行へ*}> -
- <{/if}> - <{/foreach}> -
-
- <{/if}> - <{/foreach}> -
-
- - <{if $smarty.session._allow_layout_flag == _ON}> -
- <{* レイアウト *}> - - - - - - - - - - - - - -
highlight<{/if}>" style="display:block; padding:8px">/images/common/layout/layout_01.gif" alt="<{$lang.dialog_pagestyle_layout_none|smarty:nodefaults}>" title="<{$lang.dialog_pagestyle_layout_none|smarty:nodefaults}>" class="icon" />highlight<{/if}>" style="display:block; padding:8px">/images/common/layout/layout_02.gif" alt="<{$lang.dialog_pagestyle_layout_header|smarty:nodefaults}>" title="<{$lang.dialog_pagestyle_layout_header|smarty:nodefaults}>" class="icon" />highlight<{/if}>" style="display:block; padding:8px">/images/common/layout/layout_03.gif" alt="<{$lang.dialog_pagestyle_layout_headerleft|smarty:nodefaults}>" title="<{$lang.dialog_pagestyle_layout_headerleft|smarty:nodefaults}>" class="icon" />highlight<{/if}>" style="display:block; padding:8px">/images/common/layout/layout_04.gif" alt="<{$lang.dialog_pagestyle_layout_headerright|smarty:nodefaults}>" title="<{$lang.dialog_pagestyle_layout_headerright|smarty:nodefaults}>" class="icon" />
highlight<{/if}>" style="display:block; padding:8px">/images/common/layout/layout_05.gif" alt="<{$lang.dialog_pagestyle_layout_all|smarty:nodefaults}>" title="<{$lang.dialog_pagestyle_layout_all|smarty:nodefaults}>" class="icon" />highlight<{/if}>" style="display:block; padding:8px">/images/common/layout/layout_06.gif" alt="<{$lang.dialog_pagestyle_layout_left|smarty:nodefaults}>" title="<{$lang.dialog_pagestyle_layout_left|smarty:nodefaults}>" class="icon" />highlight<{/if}>" style="display:block; padding:8px">/images/common/layout/layout_07.gif" alt="<{$lang.dialog_pagestyle_layout_right|smarty:nodefaults}>" title="<{$lang.dialog_pagestyle_layout_right|smarty:nodefaults}>" class="icon" />highlight<{/if}>" style="display:block; padding:8px">/images/common/layout/layout_08.gif" alt="<{$lang.dialog_pagestyle_layout_leftright|smarty:nodefaults}>" title="<{$lang.dialog_pagestyle_layout_leftright|smarty:nodefaults}>" class="icon" />
-
- <{/if}> - <{if $action.background_color != "" && $smarty.session._allow_layout_flag == _ON}> -
- <{* 配色 *}> - <{$lang.dialog_coloration_desc|smarty:nodefaults}> - <{if $smarty.session._user_auth_id == _AUTH_ADMIN}> - <{$lang.pagestyle_custom_confirm|sprintf:$current_theme_name|smarty:nodefaults}> - <{/if}> -
- - - /images/common/down_arrow.gif" alt="<{$lang.dialog_pagestyle_down_arrow}>" title="<{$lang.dialog_pagestyle_down_arrow}>" class="icon" /> <{$lang.dialog_pagestyle_background}> - -
- <{foreach from=$action.background_color key=key item=color_list}> - <{if $key == "general"}> -
<{$lang.dialog_pagestyle_background}> - <{assign var="column_name" value="body"}> - <{elseif $key == "centercolumn"}> -
<{$lang.dialog_pagestyle_centercolumn}> - <{assign var="column_name" value="centercolumn"}> - <{elseif $key == "leftcolumn"}> -
<{$lang.dialog_pagestyle_leftcolumn}> - <{assign var="column_name" value="leftcolumn"}> - <{elseif $key == "rightcolumn"}> -
<{$lang.dialog_pagestyle_rightcolumn}> - <{assign var="column_name" value="rightcolumn"}> - <{elseif $key == "headercolumn"}> -
<{$lang.dialog_pagestyle_header}> - <{assign var="column_name" value="headercolumn"}> - <{elseif $key == "footercolumn"}> -
<{$lang.dialog_pagestyle_footer}> - <{assign var="column_name" value="footercolumn"}> - <{/if}> - <{foreach from=$color_list key=count item=color}> - <{if $color == "selection"}> - document.body<{else}>'<{$column_name}>'<{/if}>,'backgroundColor',this.value,this);" style="margin-top:5px; margin-left:5px;float:left; width:6em;" type="text" maxlength="7" value="" /> - <{elseif $color == "selection_image"}> - - <{elseif $color == "transparent" && $count == 0}> - document.body<{else}>'<{$column_name}>'<{/if}>,'backgroundColor','<{$color}>',this); return false;"/> -
- /images/dialog/transparence.gif" title="transparent" alt="transparent" /> -
-
- <{elseif $color == "transparent"}> - document.body<{else}>'<{$column_name}>'<{/if}>,'backgroundColor','<{$color}>',this); return false;" /> -
- /images/dialog/transparence_small.gif" title="transparent" alt="transparent" /> -
-
- <{elseif $count == 0}> - document.body<{else}>'<{$column_name}>'<{/if}>,'backgroundColor','<{$color}>',this); return false;" /> -
-
-
- <{else}> - document.body<{else}>'<{$column_name}>'<{/if}>,'backgroundColor','<{$color}>',this); return false;" /> -
-
-
- <{/if}> - <{/foreach}> -
- <{/foreach}> -
-
- - /images/common/down_arrow.gif" alt="<{$lang.dialog_pagestyle_down_arrow}>" title="<{$lang.dialog_pagestyle_down_arrow}>" class="icon" /> <{$lang.dialog_pagestyle_border}> - -
- <{section name=customer loop=5}> - <{if $action.headercolumn != ""}> - <{if $smarty.section.customer.index == 0}> -
<{$lang.dialog_pagestyle_header}> - <{assign var="column_name" value="headercolumn"}> - <{elseif $smarty.section.customer.index == 1}> -
<{$lang.dialog_pagestyle_leftcolumn}> - <{assign var="column_name" value="leftcolumn"}> - <{elseif $smarty.section.customer.index == 2}> -
<{$lang.dialog_pagestyle_centercolumn}> - <{assign var="column_name" value="centercolumn"}> - <{elseif $smarty.section.customer.index == 3}> -
<{$lang.dialog_pagestyle_rightcolumn}> - <{assign var="column_name" value="rightcolumn"}> - <{elseif $smarty.section.customer.index == 4}> -
<{$lang.dialog_pagestyle_footer}> - <{assign var="column_name" value="footercolumn"}> - <{/if}> - <{assign var="column" value=$action.$column_name}> -
- <{foreach from=$column key=key item=border_list}> - <{if $key == "border_top_color"}> -
<{$lang.dialog_pagestyle_pos_top}> - <{assign var="border_name" value="borderTop"}> - <{elseif $key == "border_right_color"}> -
<{$lang.dialog_pagestyle_pos_right}> - <{assign var="border_name" value="borderRight"}> - <{elseif $key == "border_bottom_color"}> -
<{$lang.dialog_pagestyle_pos_bottom}> - <{assign var="border_name" value="borderBottom"}> - <{elseif $key == "border_left_color"}> -
<{$lang.dialog_pagestyle_pos_left}> - <{assign var="border_name" value="borderLeft"}> - <{/if}> - <{foreach from=$border_list key=count item=color}> - <{if $color == "selection"}> - - <{elseif $color == "selection_image"}> - <{elseif $color == "transparent" && $count == 0}> - -
- /images/dialog/transparence.gif" title="transparent" alt="transparent" /> -
-
- <{elseif $color == "transparent"}> - -
- /images/dialog/transparence_small.gif" title="transparent" alt="transparent" /> -
-
- <{elseif $count == 0}> - -
-
-
- <{else}> - -
-
-
- <{/if}> - <{/foreach}> -
-
- <{/foreach}> -
- <{/if}> - <{/section}> -
-
-
- <{if $smarty.session._user_auth_id == _AUTH_ADMIN && BASE_URL == CORE_BASE_URL}> - <{* 設定中のページテーマすべてに適用 *}> - -
- <{/if}> - <{* 規定値に戻す:配色情報クリア *}> -
<{$lang.dialog_pagestyle_reset}>
-
-
- <{/if}> - -
-
- - -
- +<{strip}> +<{* TODO:style属性、後にクラス化 *}> +
+
+<{*タブコンポーネント*}> +
+
+
+ <{assign var="pagetheme_name" value=$action.theme_name}> +
+ <{foreach from=$action.category_list|smarty:nodefaults key=key item=category_name}> + <{if $action.pagetheme_list.$key}> + <{if $action.act_category == $key}> + + /images/common/down_arrow.gif" alt="<{$lang.dialog_pagestyle_down_arrow}>" class="icon" /> <{$category_name}> + +
+ <{else}> + + /images/common/right_arrow.gif" alt="<{$lang.dialog_pagestyle_right_arrow}>" class="icon" /> <{$category_name}> + +
+ <{/if}> + <{foreach name=pagetheme_list from=$action.pagetheme_list.$key|smarty:nodefaults key=theme_name item=lang_theme_name}> + <{if $theme_name == $pagetheme_name}> + <{* 配色-カスタムのtheme_name取得用 *}> + <{assign var="current_theme_name" value=$lang_theme_name|smarty:nodefaults}> + <{/if}> +
+ + <{$lang_theme_name}> + +
+ <{if $smarty.foreach.pagetheme_list.iteration % 4 == 0}> + <{*4つで下の行へ*}> +
+ <{/if}> + <{/foreach}> +
+
+ <{/if}> + <{/foreach}> +
+
+ + <{if $smarty.session._allow_layout_flag == _ON}> +
+ <{* レイアウト *}> + + + + + + + + + + + + + +
highlight<{/if}>" style="display:block; padding:8px">/images/common/layout/layout_01.gif" alt="<{$lang.dialog_pagestyle_layout_none|smarty:nodefaults}>" title="<{$lang.dialog_pagestyle_layout_none|smarty:nodefaults}>" class="icon" />highlight<{/if}>" style="display:block; padding:8px">/images/common/layout/layout_02.gif" alt="<{$lang.dialog_pagestyle_layout_header|smarty:nodefaults}>" title="<{$lang.dialog_pagestyle_layout_header|smarty:nodefaults}>" class="icon" />highlight<{/if}>" style="display:block; padding:8px">/images/common/layout/layout_03.gif" alt="<{$lang.dialog_pagestyle_layout_headerleft|smarty:nodefaults}>" title="<{$lang.dialog_pagestyle_layout_headerleft|smarty:nodefaults}>" class="icon" />highlight<{/if}>" style="display:block; padding:8px">/images/common/layout/layout_04.gif" alt="<{$lang.dialog_pagestyle_layout_headerright|smarty:nodefaults}>" title="<{$lang.dialog_pagestyle_layout_headerright|smarty:nodefaults}>" class="icon" />
highlight<{/if}>" style="display:block; padding:8px">/images/common/layout/layout_05.gif" alt="<{$lang.dialog_pagestyle_layout_all|smarty:nodefaults}>" title="<{$lang.dialog_pagestyle_layout_all|smarty:nodefaults}>" class="icon" />highlight<{/if}>" style="display:block; padding:8px">/images/common/layout/layout_06.gif" alt="<{$lang.dialog_pagestyle_layout_left|smarty:nodefaults}>" title="<{$lang.dialog_pagestyle_layout_left|smarty:nodefaults}>" class="icon" />highlight<{/if}>" style="display:block; padding:8px">/images/common/layout/layout_07.gif" alt="<{$lang.dialog_pagestyle_layout_right|smarty:nodefaults}>" title="<{$lang.dialog_pagestyle_layout_right|smarty:nodefaults}>" class="icon" />highlight<{/if}>" style="display:block; padding:8px">/images/common/layout/layout_08.gif" alt="<{$lang.dialog_pagestyle_layout_leftright|smarty:nodefaults}>" title="<{$lang.dialog_pagestyle_layout_leftright|smarty:nodefaults}>" class="icon" />
+
+ <{/if}> + <{if $action.background_color != "" && $smarty.session._allow_layout_flag == _ON}> +
+ <{* 配色 *}> + <{$lang.dialog_coloration_desc|smarty:nodefaults}> + <{if $smarty.session._user_auth_id == _AUTH_ADMIN}> + <{$lang.pagestyle_custom_confirm|sprintf:$current_theme_name|smarty:nodefaults}> + <{/if}> +
+ + + /images/common/down_arrow.gif" alt="<{$lang.dialog_pagestyle_down_arrow}>" title="<{$lang.dialog_pagestyle_down_arrow}>" class="icon" /> <{$lang.dialog_pagestyle_background}> + +
+ <{foreach from=$action.background_color key=key item=color_list}> + <{if $key == "general"}> +
<{$lang.dialog_pagestyle_background}> + <{assign var="column_name" value="body"}> + <{elseif $key == "centercolumn"}> +
<{$lang.dialog_pagestyle_centercolumn}> + <{assign var="column_name" value="centercolumn"}> + <{elseif $key == "leftcolumn"}> +
<{$lang.dialog_pagestyle_leftcolumn}> + <{assign var="column_name" value="leftcolumn"}> + <{elseif $key == "rightcolumn"}> +
<{$lang.dialog_pagestyle_rightcolumn}> + <{assign var="column_name" value="rightcolumn"}> + <{elseif $key == "headercolumn"}> +
<{$lang.dialog_pagestyle_header}> + <{assign var="column_name" value="headercolumn"}> + <{elseif $key == "footercolumn"}> +
<{$lang.dialog_pagestyle_footer}> + <{assign var="column_name" value="footercolumn"}> + <{/if}> + <{foreach from=$color_list key=count item=color}> + <{if $color == "selection"}> + document.body<{else}>'<{$column_name}>'<{/if}>,'backgroundColor',this.value,this);" style="margin-top:5px; margin-left:5px;float:left; width:6em;" type="text" maxlength="7" value="" /> + <{elseif $color == "selection_image"}> + + <{elseif $color == "transparent" && $count == 0}> + document.body<{else}>'<{$column_name}>'<{/if}>,'backgroundColor','<{$color}>',this); return false;"/> +
+ /images/dialog/transparence.gif" title="transparent" alt="transparent" /> +
+
+ <{elseif $color == "transparent"}> + document.body<{else}>'<{$column_name}>'<{/if}>,'backgroundColor','<{$color}>',this); return false;" /> +
+ /images/dialog/transparence_small.gif" title="transparent" alt="transparent" /> +
+
+ <{elseif $count == 0}> + document.body<{else}>'<{$column_name}>'<{/if}>,'backgroundColor','<{$color}>',this); return false;" /> +
+
+
+ <{else}> + document.body<{else}>'<{$column_name}>'<{/if}>,'backgroundColor','<{$color}>',this); return false;" /> +
+
+
+ <{/if}> + <{/foreach}> +
+ <{/foreach}> +
+
+ + /images/common/down_arrow.gif" alt="<{$lang.dialog_pagestyle_down_arrow}>" title="<{$lang.dialog_pagestyle_down_arrow}>" class="icon" /> <{$lang.dialog_pagestyle_border}> + +
+ <{section name=customer loop=5}> + <{if $action.headercolumn != ""}> + <{if $smarty.section.customer.index == 0}> +
<{$lang.dialog_pagestyle_header}> + <{assign var="column_name" value="headercolumn"}> + <{elseif $smarty.section.customer.index == 1}> +
<{$lang.dialog_pagestyle_leftcolumn}> + <{assign var="column_name" value="leftcolumn"}> + <{elseif $smarty.section.customer.index == 2}> +
<{$lang.dialog_pagestyle_centercolumn}> + <{assign var="column_name" value="centercolumn"}> + <{elseif $smarty.section.customer.index == 3}> +
<{$lang.dialog_pagestyle_rightcolumn}> + <{assign var="column_name" value="rightcolumn"}> + <{elseif $smarty.section.customer.index == 4}> +
<{$lang.dialog_pagestyle_footer}> + <{assign var="column_name" value="footercolumn"}> + <{/if}> + <{assign var="column" value=$action.$column_name}> +
+ <{foreach from=$column key=key item=border_list}> + <{if $key == "border_top_color"}> +
<{$lang.dialog_pagestyle_pos_top}> + <{assign var="border_name" value="borderTop"}> + <{elseif $key == "border_right_color"}> +
<{$lang.dialog_pagestyle_pos_right}> + <{assign var="border_name" value="borderRight"}> + <{elseif $key == "border_bottom_color"}> +
<{$lang.dialog_pagestyle_pos_bottom}> + <{assign var="border_name" value="borderBottom"}> + <{elseif $key == "border_left_color"}> +
<{$lang.dialog_pagestyle_pos_left}> + <{assign var="border_name" value="borderLeft"}> + <{/if}> + <{foreach from=$border_list key=count item=color}> + <{if $color == "selection"}> + + <{elseif $color == "selection_image"}> + <{elseif $color == "transparent" && $count == 0}> + +
+ /images/dialog/transparence.gif" title="transparent" alt="transparent" /> +
+
+ <{elseif $color == "transparent"}> + +
+ /images/dialog/transparence_small.gif" title="transparent" alt="transparent" /> +
+
+ <{elseif $count == 0}> + +
+
+
+ <{else}> + +
+
+
+ <{/if}> + <{/foreach}> +
+
+ <{/foreach}> +
+ <{/if}> + <{/section}> +
+
+
+ <{if $smarty.session._user_auth_id == _AUTH_ADMIN && BASE_URL == CORE_BASE_URL}> + <{* 設定中のページテーマすべてに適用 *}> + +
+ <{/if}> + <{* 規定値に戻す:配色情報クリア *}> +
<{$lang.dialog_pagestyle_reset}>
+
+
+ <{/if}> + +
+
+ + +
+ <{/strip}> \ No newline at end of file diff --git a/html/webapp/modules/holiday/sql/holiday.sql b/html/webapp/modules/holiday/sql/holiday.sql old mode 100644 new mode 100755 index 403a5c9..249b043 --- a/html/webapp/modules/holiday/sql/holiday.sql +++ b/html/webapp/modules/holiday/sql/holiday.sql @@ -992,6 +992,7 @@ INSERT INTO `holiday` (`holiday_id`, `rrule_id`, `lang_dirname`, `holiday`, `sum INSERT INTO `holiday` (`holiday_id`, `rrule_id`, `lang_dirname`, `holiday`, `summary`, `holiday_type`) VALUES (988, 172, 'japanese', '20310720150000', '海の日', 0); INSERT INTO `holiday` (`holiday_id`, `rrule_id`, `lang_dirname`, `holiday`, `summary`, `holiday_type`) VALUES (989, 172, 'japanese', '20320718150000', '海の日', 0); INSERT INTO `holiday` (`holiday_id`, `rrule_id`, `lang_dirname`, `holiday`, `summary`, `holiday_type`) VALUES (990, 172, 'japanese', '20330717150000', '海の日', 0); +INSERT INTO `holiday` (`holiday_id`, `rrule_id`, `lang_dirname`, `holiday`, `summary`, `holiday_type`) VALUES (991, 173, 'japanese', '20150921150000', '国民の休日', 0); -- -- テーブルのダンプデータ `holiday_rrule` @@ -1169,6 +1170,7 @@ INSERT INTO `holiday_rrule` (`rrule_id`, `varidable_flag`, `substitute_flag`, `s INSERT INTO `holiday_rrule` (`rrule_id`, `varidable_flag`, `substitute_flag`, `start_time`, `end_time`, `rrule`, `insert_time`, `insert_site_id`, `insert_user_id`, `insert_user_name`, `update_time`, `update_site_id`, `update_user_id`, `update_user_name`) VALUES (170, 0, 0, '20060503150000', '20060503150000', '', '', 0, 0, '', '', 0, 0, ''); INSERT INTO `holiday_rrule` (`rrule_id`, `varidable_flag`, `substitute_flag`, `start_time`, `end_time`, `rrule`, `insert_time`, `insert_site_id`, `insert_user_id`, `insert_user_name`, `update_time`, `update_site_id`, `update_user_id`, `update_user_name`) VALUES (171, 0, 1, '19960719150000', '20020719150000', 'FREQ=YEARLY;INTERVAL=1;BYMONTH=7;UNTIL=20020719T150000', '', 0, 0, '', '', 0, 0, ''); INSERT INTO `holiday_rrule` (`rrule_id`, `varidable_flag`, `substitute_flag`, `start_time`, `end_time`, `rrule`, `insert_time`, `insert_site_id`, `insert_user_id`, `insert_user_name`, `update_time`, `update_site_id`, `update_user_id`, `update_user_name`) VALUES (172, 1, 0, '20030720150000', '20330717150000', 'FREQ=YEARLY;INTERVAL=1;BYMONTH=7;BYDAY=3MO;UNTIL=20330717T150000', '', 0, 0, '', '', 0, 0, ''); +INSERT INTO `holiday_rrule` (`rrule_id`, `varidable_flag`, `substitute_flag`, `start_time`, `end_time`, `rrule`, `insert_time`, `insert_site_id`, `insert_user_id`, `insert_user_name`, `update_time`, `update_site_id`, `update_user_id`, `update_user_name`) VALUES (173, 0, 0, '20150921150000', '20150921150000', '', '', 0, 0, '', '', 0, 0, ''); -- -- テーブルのダンプデータ `holiday_seq_id` diff --git a/html/webapp/modules/install/sql/mysql/default/common_insert.data.php b/html/webapp/modules/install/sql/mysql/default/common_insert.data.php old mode 100644 new mode 100755 index 119597d..91f1d93 --- a/html/webapp/modules/install/sql/mysql/default/common_insert.data.php +++ b/html/webapp/modules/install/sql/mysql/default/common_insert.data.php @@ -558,6 +558,10 @@ INSERT INTO `textarea_video_url` (`url`, `action_name`, `insert_time`, `insert_site_id`, `insert_user_id`, `insert_user_name`, `update_time`, `update_site_id`, `update_user_id`, `update_user_name`) VALUES ('http://www.youtube.com/', '', '', '', '0', '', '', '', '0', ''); INSERT INTO `textarea_video_url` (`url`, `action_name`, `insert_time`, `insert_site_id`, `insert_user_id`, `insert_user_name`, `update_time`, `update_site_id`, `update_user_id`, `update_user_name`) VALUES ('', 'multimedia_view_main_play', '', '', '0', '', '', '', '0', ''); +INSERT INTO `textarea_video_url` (`url`, `action_name`, `insert_time`, `insert_site_id`, `insert_user_id`, `insert_user_name`, `update_time`, `update_site_id`, `update_user_id`, `update_user_name`) VALUES ('http://www.youtube-nocookie.com/', '', '', '', '0', '', '', '', '0', ''); +INSERT INTO `textarea_video_url` (`url`, `action_name`, `insert_time`, `insert_site_id`, `insert_user_id`, `insert_user_name`, `update_time`, `update_site_id`, `update_user_id`, `update_user_name`) VALUES ('//www.youtube.com/', '', '', '', '0', '', '', '', '0', ''); +INSERT INTO `textarea_video_url` (`url`, `action_name`, `insert_time`, `insert_site_id`, `insert_user_id`, `insert_user_name`, `update_time`, `update_site_id`, `update_user_id`, `update_user_name`) VALUES ('https://www.youtube.com/', '', '', '', '0', '', '', '', '0', ''); +INSERT INTO `textarea_video_url` (`url`, `action_name`, `insert_time`, `insert_site_id`, `insert_user_id`, `insert_user_name`, `update_time`, `update_site_id`, `update_user_id`, `update_user_name`) VALUES ('https://www.youtube-nocookie.com/', '', '', '', '0', '', '', '', '0', ''); "; ?> \ No newline at end of file diff --git a/html/webapp/modules/journal/action/main/comment/Comment.class.php b/html/webapp/modules/journal/action/main/comment/Comment.class.php old mode 100644 new mode 100755 index 2f18c1c..ffd3476 --- a/html/webapp/modules/journal/action/main/comment/Comment.class.php +++ b/html/webapp/modules/journal/action/main/comment/Comment.class.php @@ -47,7 +47,7 @@ function execute() }else { $agree_flag = JOURNAL_STATUS_AGREE_VALUE; } - + if(empty($this->comment_id)) { $params = array( "journal_id" => $this->journal_obj['journal_id'], @@ -75,8 +75,8 @@ function execute() if($result === false) { return 'error'; } - - if($comment_before_update[0]['agree_flag'] == JOURNAL_STATUS_WAIT_AGREE_VALUE && + + if($comment_before_update[0]['agree_flag'] == JOURNAL_STATUS_WAIT_AGREE_VALUE && $agree_flag == JOURNAL_STATUS_AGREE_VALUE && $this->journal_obj['comment_agree_mail_flag'] == _ON) { $this->session->setParameter("journal_confirm_mail_post_id", $this->comment_id); @@ -87,7 +87,7 @@ function execute() $this->session->setParameter("journal_mail_post_id", array("post_id" => $this->comment_id, "agree_flag" => JOURNAL_STATUS_WAIT_AGREE_VALUE)); } //--新着情報関連 Start-- - $result = $this->journalAction->setCommentWhatsnew($this->comment_id); + $result = $this->journalAction->setWhatsnew($this->post_id); if($result === false) { return 'error'; } diff --git a/html/webapp/modules/journal/action/main/confirm/Confirm.class.php b/html/webapp/modules/journal/action/main/confirm/Confirm.class.php old mode 100644 new mode 100755 index 560a6be..e69c586 --- a/html/webapp/modules/journal/action/main/confirm/Confirm.class.php +++ b/html/webapp/modules/journal/action/main/confirm/Confirm.class.php @@ -17,7 +17,7 @@ class Journal_Action_Main_Confirm extends Action // リクエストパラメータを受け取るため var $block_id = null; var $post_id = null; - + // バリデートによりセット var $journal_obj = null; @@ -27,19 +27,19 @@ class Journal_Action_Main_Confirm extends Action var $journalAction = null; // 値をセットするため - + /** * [[機能説明]] * * @access public */ function execute() - { + { $post_before_update = $this->db->selectExecute("journal_post", array("post_id" => $this->post_id)); if (empty($post_before_update)) { return 'error'; } - + $params = array( "agree_flag" => JOURNAL_STATUS_AGREE_VALUE ); @@ -52,28 +52,28 @@ function execute() if($this->journal_obj['mail_flag'] == _ON && empty($post_before_update[0]['parent_id'])) { $this->session->setParameter("journal_mail_post_id", array("post_id" => $this->post_id, "agree_flag" => JOURNAL_STATUS_AGREE_VALUE)); } - - if((empty($post_before_update[0]['parent_id']) && $this->journal_obj['agree_mail_flag'] == _ON) + + if((empty($post_before_update[0]['parent_id']) && $this->journal_obj['agree_mail_flag'] == _ON) || (!empty($post_before_update[0]['parent_id']) && $this->journal_obj['comment_agree_mail_flag'] == _ON && (empty($post_before_update[0]['direction_flag']) || (!empty($post_before_update[0]['direction_flag']) && strpos($post_before_update[0]['tb_url'], BASE_URL) !== false)))) { $this->session->setParameter("journal_confirm_mail_post_id", $this->post_id); } - + //トラックバックの処理 $this->journalAction->setTrackBack($this->journal_obj, $this->post_id, $post_before_update[0]); - + //--新着情報関連 Start-- if(empty($post_before_update[0]['parent_id'])) { $result = $this->journalAction->setWhatsnew($this->post_id); }else { - $result = $this->journalAction->setCommentWhatsnew($this->post_id); + $result = $this->journalAction->setWhatsnew($post_before_update[0]['parent_id']); } if($result === false) { return 'error'; } //--新着情報関連 End-- - + // --- 投稿回数更新 --- - + $before_post = isset($post_before_update[0]) ? $post_before_update[0] : null; $result = $this->journalAction->setMonthlynumber(_ON, JOURNAL_POST_STATUS_REREASED_VALUE, $before_post['status'], $before_post); if ($result === false) { diff --git a/html/webapp/modules/journal/action/main/delete/Delete.class.php b/html/webapp/modules/journal/action/main/delete/Delete.class.php old mode 100644 new mode 100755 index e5c0617..b6707ff --- a/html/webapp/modules/journal/action/main/delete/Delete.class.php +++ b/html/webapp/modules/journal/action/main/delete/Delete.class.php @@ -24,6 +24,7 @@ class Journal_Action_Main_Delete extends Action var $session = null; var $whatsnewAction = null; var $request = null; + var $journalAction = null; // 値をセットするため var $comment_flag = null; @@ -79,23 +80,10 @@ function execute() } } else { // コメント削除 - $count = $this->db->countExecute("journal_post", array("parent_id"=>$this->post_id)); - if ($count === false) { + $result = $this->journalAction->setWhatsnew($this->post_id); + if($result === false) { return 'error'; } - if($count == 0) { - $result = $this->whatsnewAction->delete($this->post_id, _ON); - } else { - $whatsnew = array( - "unique_id" => $this->post_id, - "count_num" => $count, - "child_flag" => _ON - ); - $result = $this->whatsnewAction->auto($whatsnew); - if($result === false) { - return 'error'; - } - } } //--新着情報関連 End-- diff --git a/html/webapp/modules/journal/action/main/delete/maple.ini b/html/webapp/modules/journal/action/main/delete/maple.ini old mode 100644 new mode 100755 index 667e6af..8239f4e --- a/html/webapp/modules/journal/action/main/delete/maple.ini +++ b/html/webapp/modules/journal/action/main/delete/maple.ini @@ -16,6 +16,7 @@ comment_id.journal.commentEditAuth:g = "1:lang._invalid_auth" session = "ref:Session" whatsnewAction = "ref:whatsnewAction" request = "ref:Request" +journalAction = "ref:journalAction" [View] post = "location_script:" diff --git a/html/webapp/modules/journal/action/main/deltrackback/Deltrackback.class.php b/html/webapp/modules/journal/action/main/deltrackback/Deltrackback.class.php old mode 100644 new mode 100755 index 9a0519c..f6d119d --- a/html/webapp/modules/journal/action/main/deltrackback/Deltrackback.class.php +++ b/html/webapp/modules/journal/action/main/deltrackback/Deltrackback.class.php @@ -23,7 +23,7 @@ class Journal_Action_Main_Deltrackback extends Action // 使用コンポーネントを受け取るため var $db = null; - var $whatsnewAction = null; + var $journalAction = null; // 値をセットするため @@ -44,26 +44,10 @@ function execute() } //--新着情報関連 Start-- - $count = $this->db->countExecute("journal_post", array("parent_id"=>$this->post_id, "direction_flag != " . JOURNAL_TRACKBACK_TRANSMIT => null)); - if ($count === false) { + $result = $this->journalAction->setWhatsnew($this->post_id); + if($result === false) { return 'error'; } - if($this->post['agree_flag'] != JOURNAL_STATUS_AGREE_VALUE) { - $whatsnew = array( - "unique_id" => $this->post_id, - "count_num" => $count, - "child_flag" => _ON - ); - $result = $this->whatsnewAction->auto($whatsnew); - if($result === false) { - return 'error'; - } - }else { - if($count == 0) { - $result = $this->whatsnewAction->delete($this->post_id, _ON); - } - } - //--新着情報関連 End-- return 'success'; diff --git a/html/webapp/modules/journal/action/main/deltrackback/maple.ini b/html/webapp/modules/journal/action/main/deltrackback/maple.ini old mode 100644 new mode 100755 index c88163f..6342291 --- a/html/webapp/modules/journal/action/main/deltrackback/maple.ini +++ b/html/webapp/modules/journal/action/main/deltrackback/maple.ini @@ -9,7 +9,7 @@ trackback_id.journal.existTrackback:g = "1:lang._invalid_input" key:trackback_id.journal.postEditAuth:g = "1:lang._invalid_auth" [Action] -whatsnewAction = "ref:whatsnewAction" +journalAction = "ref:journalAction" [View] success = "action:journal_view_main_detail" diff --git a/html/webapp/modules/journal/action/main/post/Post.class.php b/html/webapp/modules/journal/action/main/post/Post.class.php old mode 100644 new mode 100755 index 0720322..038d946 --- a/html/webapp/modules/journal/action/main/post/Post.class.php +++ b/html/webapp/modules/journal/action/main/post/Post.class.php @@ -41,7 +41,6 @@ class Journal_Action_Main_Post extends Action var $journalView = null; var $journalAction = null; var $db = null; - var $whatsnewAction = null; var $request = null; var $session = null; var $configView = null; diff --git a/html/webapp/modules/journal/action/main/trackback/Trackback.class.php b/html/webapp/modules/journal/action/main/trackback/Trackback.class.php index 5eb81d6..d1d0557 100644 --- a/html/webapp/modules/journal/action/main/trackback/Trackback.class.php +++ b/html/webapp/modules/journal/action/main/trackback/Trackback.class.php @@ -45,7 +45,7 @@ function execute() $params = array("post_id" => $this->post_id); $post = $this->db->selectExecute("journal_post", $params); - if($post === false || !isset($post[0])) { + if($post === false || !isset($post[0]) || intval($post[0]['root_id']) != 0) { exit(Net_TrackBack::getPingXML(false , "Invalid trackback ID")); } diff --git a/html/webapp/modules/journal/components/Action.class.php b/html/webapp/modules/journal/components/Action.class.php old mode 100644 new mode 100755 index c16b546..48ddb7d --- a/html/webapp/modules/journal/components/Action.class.php +++ b/html/webapp/modules/journal/components/Action.class.php @@ -234,41 +234,13 @@ function saveTrackback($trackback) { return false; } $block_id = isset($journal_block[0]) ? $journal_block[0]['block_id'] : 0; - $count = $this->_db->countExecute("journal_post", array("parent_id"=>$trackback['post_id'], "direction_flag != " . JOURNAL_TRACKBACK_TRANSMIT => null)); - if ($count === false) { + $commonMain =& $this->_container->getComponent("commonMain"); + $parameters = "post_id=". $trackback['post_id'] . "&trackback_flag=1&block_id=".$block_id."#".$commonMain->getTopId($block_id); + + $result = $this->setWhatsnew($trackback['post_id'], $parameters); + if ($result === false) { return false; } - if($agree_flag == JOURNAL_STATUS_AGREE_VALUE) { - $commonMain =& $this->_container->getComponent("commonMain"); - $time = timezone_date(); - if(intval($time) < intval($post[0]['journal_date'])) { - // 未来ならば、日誌の記事の時間をセット - $time = $post[0]['journal_date']; - } - $whatsnew = array( - "unique_id" => $trackback['post_id'], - "title" => $post[0]['title'], - "description" => $post[0]['content'], - "action_name" => "journal_view_main_detail", - "parameters" => "post_id=". $trackback['post_id'] . "&trackback_flag=1&block_id=".$block_id."#".$commonMain->getTopId($block_id), - "count_num" => $count, - "child_flag" => _ON, - "room_id" => $post[0]['room_id'], - "insert_time" => $time, - "insert_user_id" => $post[0]['insert_user_id'], - "insert_user_name" => $post[0]['insert_user_name'] - ); - $whatsnewAction =& $this->_container->getComponent("whatsnewAction"); - $result = $whatsnewAction->auto($whatsnew, _ON); - if($result === false) { - return false; - } - }else { - if($count == 0) { - $result = $whatsnewAction->delete($trackback['post_id'], _ON); - } - } - //--新着情報関連 End-- }else { @@ -481,7 +453,7 @@ function getWeblogMsg(){ * @return bool * @access public */ - function setWhatsnew($post_id) { + function setWhatsnew($post_id, $parameters="") { $params = array("post_id" => $post_id); $posts = $this->_db->selectExecute("journal_post", $params); @@ -492,46 +464,47 @@ function setWhatsnew($post_id) { $whatsnewAction =& $this->_container->getComponent("whatsnewAction"); if ($posts[0]["status"] == JOURNAL_POST_STATUS_REREASED_VALUE && $posts[0]["agree_flag"] == JOURNAL_STATUS_AGREE_VALUE) { + $commentParams = array( + "parent_id" => $post_id, + "direction_flag != " . JOURNAL_TRACKBACK_TRANSMIT => null, + "agree_flag" => JOURNAL_STATUS_AGREE_VALUE + ); + $count = $this->_db->countExecute("journal_post", $commentParams); + if ($count === false) { + return false; + } + + $time = timezone_date(); + if ($time < $posts[0]['journal_date'] || $count == 0) { + // 未来記事もしくは子記事が無いならば、日誌の記事の時間をセット + $child_update_time = $posts[0]['journal_date']; + } else { + //過去(現在)ならば、コメントのMAX日時と日誌の記事の日時の大きい方をセット + $child_update_time = $this->_db->maxExecute("journal_post", "insert_time", $commentParams); + if ($child_update_time < $posts[0]['journal_date']) { + $child_update_time = $posts[0]['journal_date']; + } + } + if ($parameters == "") { + $parameters = "post_id=". $post_id . "&comment_flag=1"; + } $whatsnew = array( "unique_id" => $post_id, "title" => $posts[0]["title"], "description" => $posts[0]["content"]."

".$posts[0]["more_content"], "action_name" => "journal_view_main_detail", - "parameters" => "post_id=". $post_id . "&comment_flag=1", + "parameters" => $parameters, "insert_time" => $posts[0]["journal_date"], "insert_user_id" => $posts[0]["insert_user_id"], "insert_user_name" => $posts[0]["insert_user_name"], - "update_time" => $posts[0]["journal_date"], - "child_update_time" => $posts[0]["journal_date"] + "count_num" => $count, + "child_update_time" => $child_update_time, + "room_id" => $posts[0]['room_id'], ); $result = $whatsnewAction->auto($whatsnew); if ($result === false) { return false; } - - // journal_dateが、未来かどうかを判断し、 - // 未来ならば、コメントの新着も未来に書き換え - // 未来でなければ、コメントのデータのMAXをとり、 - // その日付に更新 - $where_params = array( - "root_id" => $post_id - ); - $insert_time = $this->_db->maxExecute("journal_post", "insert_time", $where_params); - if(isset($insert_time)) { - // コメントあり - $time = timezone_date(); - $journal_date = $posts[0]["journal_date"]; - $whatsnew['child_flag'] = _ON; - if(intval($journal_date) < intval($time)) { - // 過去 - $whatsnew['insert_time'] = $journal_date; - $whatsnew['child_update_time'] = $insert_time; - } - $result = $whatsnewAction->auto($whatsnew, _OFF); - if ($result === false) { - return false; - } - } } else { $result = $whatsnewAction->delete($post_id); if($result === false) { @@ -541,61 +514,6 @@ function setWhatsnew($post_id) { return true; } - /** - * 新着情報にセットする(コメント) - * - * @return bool - * @access public - */ - function setCommentWhatsnew($comment_id) { - $params = array("post_id" => $comment_id); - $comment = $this->_db->selectExecute("journal_post", $params); - if (empty($comment)) { - return false; - } - $whatsnewAction =& $this->_container->getComponent("whatsnewAction"); - $count = $this->_db->countExecute("journal_post", array("parent_id"=>$comment[0]['parent_id'], "direction_flag != " . JOURNAL_TRACKBACK_TRANSMIT => null)); - if ($count === false) { - return false; - } - - if ($comment[0]["agree_flag"] == JOURNAL_STATUS_AGREE_VALUE) { - $journal_post = $this->_db->selectExecute("journal_post", array("post_id"=>$comment[0]['parent_id'])); - if ($journal_post === false && !isset($journal_post[0])) { - return false; - } - $time = timezone_date(); - if(intval($time) < intval($journal_post[0]['journal_date'])) { - // 未来ならば、日誌の記事の時間をセット - $time = $journal_post[0]['journal_date']; - } - - $whatsnew = array( - "unique_id" => $comment[0]['parent_id'], - "title" => $journal_post[0]['title'], - "description" => $journal_post[0]['content'], - "action_name" => "journal_view_main_detail", - "parameters" => "post_id=". $comment[0]['parent_id'] . "&comment_flag=1", - "count_num" => $count, - "child_flag" => _ON, - "child_update_time" => $time, - "insert_time" => $journal_post[0]['journal_date'], - "insert_user_id" => $journal_post[0]['insert_user_id'], - "insert_user_name" => $journal_post[0]['insert_user_name'] - ); - $result = $whatsnewAction->auto($whatsnew); - if($result === false) { - return false; - } - }else { - if($count == 0) { - $result = $whatsnewAction->delete($comment[0]['parent_id'], _ON); - } - } - - return true; - } - /** * 投稿回数をセットする * diff --git a/html/webapp/modules/journal/components/View.class.php b/html/webapp/modules/journal/components/View.class.php old mode 100644 new mode 100755 index af3afe3..67cfadd --- a/html/webapp/modules/journal/components/View.class.php +++ b/html/webapp/modules/journal/components/View.class.php @@ -98,7 +98,7 @@ function &getJournals() { $sql = "SELECT journal_id, journal_name, active_flag, insert_time, insert_user_id, insert_user_name ". "FROM {journal} ". "WHERE room_id = ? ". - $this->_db->getOrderSQL($orderParams); + $this->_db->getOrderSQL($orderParams, array('journal_name', 'active_flag', 'insert_user_name', 'insert_time')); $result = $this->_db->execute($sql, $params, $limit, $offset); if ($result === false) { $this->_db->addError(); @@ -448,7 +448,7 @@ function getPostList($journal_id, $category_id, $disp_cnt, $begin) { $params[] = ""; $request =& $this->_container->getComponent("Request"); - $module_id = $request->getParameter("module_id"); + $module_id = (int)$request->getParameter("module_id"); $sql = "SELECT P.*, C.category_name, URL.short_url ". "FROM {journal_post} P". @@ -484,7 +484,7 @@ function getPostDetail($post_id) { $params[] = $post_id; $request =& $this->_container->getComponent("Request"); - $module_id = $request->getParameter("module_id"); + $module_id = (int)$request->getParameter("module_id"); $sql = "SELECT P.*, C.category_name, URL.short_url ". "FROM {journal_post} P". @@ -564,7 +564,7 @@ function getPostDetailData($post_id) { $post_id ); - $module_id = $request->getParameter("module_id"); + $module_id = (int)$request->getParameter("module_id"); $sql = "SELECT P.*, C.category_name, URL.short_url ". "FROM {journal_post} P". diff --git a/html/webapp/modules/journal/install.ini b/html/webapp/modules/journal/install.ini old mode 100644 new mode 100755 index 5453878..52f09bd --- a/html/webapp/modules/journal/install.ini +++ b/html/webapp/modules/journal/install.ini @@ -1,4 +1,4 @@ -version = "2.4.0.1" +version = "2.4.0.2" action_name="journal_view_main_init" edit_action_name="journal_view_edit_list" block_add_action="journal_view_edit_create" diff --git a/html/webapp/modules/journal/language/english/main.ini b/html/webapp/modules/journal/language/english/main.ini index 7f284e4..3e5c836 100644 --- a/html/webapp/modules/journal/language/english/main.ini +++ b/html/webapp/modules/journal/language/english/main.ini @@ -32,11 +32,11 @@ journal_cat_add_title = "Add Category" journal_cat_name = "Category" journal_comment = "Comment" journal_cat_edit_readme = "You can edit the category by clicking it." -journal_from = "by:" +journal_from = "by " define:JOURNAL_NAME = "Journal" define:JOURNAL_NOCATEGORY = "Not specified" journal_nocategory = JOURNAL_NOCATEGORY -journal_add_user_title = "Posted by: %s" +journal_add_user_title = "Posted by %s" journal_mobile_post_category = "[Category]" journal_mobile_post_title = "[Title]" journal_mobile_post_date = "[Date]" diff --git a/html/webapp/modules/journal/language/japanese/main.ini b/html/webapp/modules/journal/language/japanese/main.ini index 615420b..bee5a56 100644 --- a/html/webapp/modules/journal/language/japanese/main.ini +++ b/html/webapp/modules/journal/language/japanese/main.ini @@ -32,7 +32,7 @@ journal_cat_add_title = "カテゴリを追加します。" journal_cat_name = "カテゴリ名" journal_comment = "コメント" journal_cat_edit_readme = "編集したいカテゴリ名は、クリックすると編集できます" -journal_from = "by:" +journal_from = "by " define:JOURNAL_NAME = "日誌" define:JOURNAL_NOCATEGORY = "カテゴリを指定しない" journal_nocategory = JOURNAL_NOCATEGORY diff --git a/html/webapp/modules/language/install.ini b/html/webapp/modules/language/install.ini old mode 100644 new mode 100755 index 6714ece..3d39b44 --- a/html/webapp/modules/language/install.ini +++ b/html/webapp/modules/language/install.ini @@ -1,4 +1,4 @@ -version = "2.4.0.0" +version = "2.4.0.1" action_name="language_view_main_init" edit_action_name="language_view_edit_init" block_add_action = "language_action_edit_create" diff --git a/html/webapp/modules/language/update/Update.class.php b/html/webapp/modules/language/update/Update.class.php old mode 100644 new mode 100755 index e05e363..a423a99 --- a/html/webapp/modules/language/update/Update.class.php +++ b/html/webapp/modules/language/update/Update.class.php @@ -42,7 +42,7 @@ function execute() } } - $sql = "SELECT {blocks}.*, {pages}.room_id FROM {blocks}, {pages} WHERE {blocks}.page_id={pages}.page_id AND {blocks}.module_id=".$this->module_id; + $sql = "SELECT {blocks}.*, {pages}.room_id FROM {blocks}, {pages} WHERE {blocks}.page_id={pages}.page_id AND {blocks}.module_id=".(int)$this->module_id; $blocks = $this->db->execute($sql); if($blocks === false) return false; if(!empty($blocks)) { diff --git a/html/webapp/modules/linklist/components/View.class.php b/html/webapp/modules/linklist/components/View.class.php index 14e4807..ec46065 100644 --- a/html/webapp/modules/linklist/components/View.class.php +++ b/html/webapp/modules/linklist/components/View.class.php @@ -151,7 +151,7 @@ function &getLinklists() $sql = "SELECT linklist_id, linklist_name, insert_time, insert_user_id, insert_user_name ". "FROM {linklist} ". "WHERE room_id = ? ". - $this->_db->getOrderSQL($orderParams); + $this->_db->getOrderSQL($orderParams, array('linklist_id', 'linklist_name', 'insert_user_name', 'insert_time')); $linklists = $this->_db->execute($sql, $params, $limit, $offset); if ($linklists === false) { $this->_db->addError(); diff --git a/html/webapp/modules/linklist/install.ini b/html/webapp/modules/linklist/install.ini old mode 100644 new mode 100755 index 11aa85e..2f08fe3 --- a/html/webapp/modules/linklist/install.ini +++ b/html/webapp/modules/linklist/install.ini @@ -1,4 +1,4 @@ -version = "2.4.0.1" +version = "2.4.0.2" action_name = "linklist_view_main_init" edit_action_name = "linklist_view_edit_list" block_add_action = "linklist_view_edit_entry" diff --git a/html/webapp/modules/login/files/js/default/login.js b/html/webapp/modules/login/files/js/default/login.js index 42f0be6..3aa4d46 100644 --- a/html/webapp/modules/login/files/js/default/login.js +++ b/html/webapp/modules/login/files/js/default/login.js @@ -92,7 +92,7 @@ clsLogin.prototype = { commonCls.alert(alert_res); commonCls.focus(focus_el); } else { - commonCls.alert(res); + commonCls.alert(alert_res); } } else { commonCls.alert(res); diff --git a/html/webapp/modules/login/install.ini b/html/webapp/modules/login/install.ini old mode 100644 new mode 100755 index 763f7ac..501901e --- a/html/webapp/modules/login/install.ini +++ b/html/webapp/modules/login/install.ini @@ -1,4 +1,4 @@ -version = "2.4.0.1" +version = "2.4.2.1" action_name="login_view_main_init" [Mobile] diff --git a/html/webapp/modules/login/view/main/init/Init.class.php b/html/webapp/modules/login/view/main/init/Init.class.php old mode 100644 new mode 100755 diff --git a/html/webapp/modules/menu/components/View.class.php b/html/webapp/modules/menu/components/View.class.php index 1817993..d93d67b 100644 --- a/html/webapp/modules/menu/components/View.class.php +++ b/html/webapp/modules/menu/components/View.class.php @@ -117,7 +117,7 @@ function &getShowPageById($id=0, $page_id = 0, $root_id = 0, $parent_id = 0, $ro " AND {pages}.display_flag != ". _PAGES_DISPLAY_FLAG_DISABLED ." "; } - if(preg_match("/(flat|header)/i", $temp_name) && $mode == "init") { + if(preg_match("/(flat|header|pldwn)/i", $temp_name) && $mode == "init") { $sql .= " AND (({pages}.space_type = "._SPACE_TYPE_GROUP." AND {pages}.thread_num < 2) OR {pages}.space_type = "._SPACE_TYPE_PUBLIC." OR {pages}.parent_id = ". $page_id . " OR {pages}.parent_id = ". $parent_id . " OR {pages}.room_id = ". $room_id . ") "; } else if($thread_num == null) { $sql .= " AND ({pages}.thread_num < 2 OR {pages}.parent_id = ". $page_id . " OR {pages}.parent_id = ". $parent_id . " OR {pages}.room_id = ". $room_id . ") "; diff --git a/html/webapp/modules/menu/files/css/jq_gnavi_pldwn_blue/style.css b/html/webapp/modules/menu/files/css/jq_gnavi_pldwn_blue/style.css new file mode 100644 index 0000000..e87d4a5 --- /dev/null +++ b/html/webapp/modules/menu/files/css/jq_gnavi_pldwn_blue/style.css @@ -0,0 +1,147 @@ +ul.menu_jq_gnavi_pldwn_blue { + list-style-image:none; + list-style-position:outside; + list-style-type:none; + background:transparent url(<{$smarty.const.CORE_BASE_URL}>/images/menu/jq_gnavi_pldwn_blue/header_btnback.gif) repeat-x scroll left bottom; + height:35px; + margin:0px; + padding:0px 20px; +/* border-bottom:1px solid #81bae2;*/ +} +ul.menu_jq_gnavi_pldwn_blue li { + list-style-image:none; + list-style-position:outside; + list-style-type:none; + background:transparent url(<{$smarty.const.CORE_BASE_URL}>/images/menu/jq_gnavi_pldwn_blue/header_btnback.gif) repeat-x scroll left bottom; + float:left; + padding:0px; + position:relative; + width:130px; + height:35px; +} +ul.menu_jq_gnavi_pldwn_blue li a { + height:100%; + line-height:35px; + overflow:hidden; + display:block; + padding:0px; +} +ul.menu_jq_gnavi_pldwn_blue li a.menu_jq_gnavi_pldwn_blue_highlight { + background:#1a99d0 url(<{$smarty.const.CORE_BASE_URL}>/images/menu/jq_gnavi_pldwn_blue/header_btnhover.gif) repeat-x scroll left bottom; + color:#ffffff !important;/*important is for IE6*/ +} +.menu_jq_gnavi_pldwn_blue_btn { + border-color:transparent #b9c8df transparent #ffffff; + border-style:solid; + border-width:0px 1px; + padding:0px; + /*font-size:12px;*/ + text-align:center; + font-weight:bold; +} +a.menu_jq_gnavi_pldwn_blue_btn:link, a.menu_jq_gnavi_pldwn_blue_btn:visited { + color: #1569a4; +} +/* +a.menu_jq_gnavi_pldwn_blue_btn:hover, a.menu_jq_gnavi_pldwn_blue_btn:active { + color:#289cde !important; +} +*/ +ul.menu_jq_gnavi_pldwn_blue_sub { + min-width:140px; + background-color:#ffffff; + padding:0px; + display:none; + z-index:1000; + position:absolute; + border-color:#ddd #aaa #aaa #ddd; + border-style:solid; + border-width:1px; + -moz-box-shadow:2px 2px 2px #aaa; + -webkit-box-shadow:2px 2px 2px #aaa; + box-shadow:2px 2px 2px #aaa; +} +ul.menu_jq_gnavi_pldwn_blue_sub li { + background:none; + height:2.2em; + width:auto; + float:none; +/* + border-color:transparent #9cc4e3 #ffffff #9cc4e3; + border-style:none solid solid solid; + border-width:1px; +*/ +} +ul.menu_jq_gnavi_pldwn_blue_sub li a { + line-height:2.2em; + padding:0px 5px; + text-align:left; + border-bottom:1px dotted #81bae2; + width:auto; +} +ul.menu_jq_gnavi_pldwn_blue_sub li a.menu_jq_gnavi_pldwn_blue_btn { + font-weight:normal; +} +ul.menu_jq_gnavi_pldwn_blue_sub li ul.menu_jq_gnavi_pldwn_blue_sub { + top:0; +} +ul.menu_jq_gnavi_pldwn_blue{ + zoom:1; +} +ul.menu_jq_gnavi_pldwn_blue:after { + height:0; + visibility:hidden; + content:"."; + display:block; + clear:both; +} + +/* for IE7 */ +*+html ul.menu_jq_gnavi_pldwn_blue { + height:auto; +} +*+html ul.menu_jq_gnavi_pldwn_blue_sub { + left:-40px; + zoom:1; + width:140px !important; +} +*+html ul.menu_jq_gnavi_pldwn_blue_sub li ul.menu_jq_gnavi_pldwn_blue_sub { + left:100px; +} +*+html ul.menu_jq_gnavi_pldwn_blue_sub li { + display:inline; +} + +/* for IE6 */ +* html ul.menu_jq_gnavi_pldwn_blue { + height:auto; +} +* html ul.menu_jq_gnavi_pldwn_blue li a { + width:100%; +} + +* html ul.menu_jq_gnavi_pldwn_blue_sub { + left:-40px; + zoom:1; + width:140px !important; +} +* html ul.menu_jq_gnavi_pldwn_blue_sub li ul.menu_jq_gnavi_pldwn_blue_sub { + left:110px; +} +* html ul.menu_jq_gnavi_pldwn_blue_sub li { + display:inline; +} +* html ul.menu_jq_gnavi_pldwn_blue_sub li a { + width:140px !important; +} + + + +.menu_jq_gnavi_pldwn_blue_actives { + background:#1a99d0 url(<{$smarty.const.CORE_BASE_URL}>/images/menu/jq_gnavi_pldwn_blue/header_btnhover.gif) repeat-x scroll left bottom !important; + color:#ffffff !important; +} +ul.menu_jq_gnavi_pldwn_blue_sub .menu_jq_gnavi_pldwn_blue_actives { + background:#1a99d0 url(<{$smarty.const.CORE_BASE_URL}>/images/menu/jq_gnavi_pldwn_blue/header_light_btnback.gif) repeat-x scroll left top !important; + color:#ffffff !important; +} diff --git a/html/webapp/modules/menu/files/css/jq_gnavi_pldwn_gray/style.css b/html/webapp/modules/menu/files/css/jq_gnavi_pldwn_gray/style.css new file mode 100644 index 0000000..14f220d --- /dev/null +++ b/html/webapp/modules/menu/files/css/jq_gnavi_pldwn_gray/style.css @@ -0,0 +1,132 @@ +ul.menu_jq_gnavi_pldwn_gray { + list-style-image:none; + list-style-position:outside; + list-style-type:none; + background:transparent url(<{$smarty.const.CORE_BASE_URL}>/images/menu/jq_gnavi_pldwn_gray/header_btnback.gif) repeat-x scroll left bottom; + height:35px; + margin:0px; + padding:0px 20px; +} +ul.menu_jq_gnavi_pldwn_gray li { + list-style-image:none; + list-style-position:outside; + list-style-type:none; + background:transparent url(<{$smarty.const.CORE_BASE_URL}>/images/menu/jq_gnavi_pldwn_gray/header_btnback.gif) repeat-x scroll left bottom; + float:left; + padding:0px; + position:relative; + width:130px; + height:35px; +} +ul.menu_jq_gnavi_pldwn_gray li a { + height:100%; + /*width:100%;*/ + line-height:35px; + overflow:hidden; + display:block; + padding:0px; +} +ul.menu_jq_gnavi_pldwn_gray li a.menu_jq_gnavi_pldwn_gray_highlight { +/* background:transparent url(<{$smarty.const.CORE_BASE_URL}>/images/menu/jq_gnavi_pldwn_gray/header_light_btnback.gif) repeat-x scroll left top;*/ + background:transparent url(<{$smarty.const.CORE_BASE_URL}>/images/menu/jq_gnavi_pldwn_gray/header_btnhover.gif) repeat-x scroll left bottom; +} +.menu_jq_gnavi_pldwn_gray_btn { + border-color:transparent #cccccc transparent #ffffff; + border-style:solid; + border-width:0px 1px; + padding:0px; + /*font-size:12px;*/ + text-align:center; + font-weight:bold; +} +ul.menu_jq_gnavi_pldwn_gray_sub { + min-width:140px; + background-color:#FFFFFF; + padding:0px; + display:none; + z-index:1000; + position:absolute; + border-color:#ddd #aaa #aaa #ddd; + border-style:solid; + border-width:1px; + -moz-box-shadow:2px 2px 2px #aaa; + -webkit-box-shadow:2px 2px 2px #aaa; + box-shadow:2px 2px 2px #aaa; +} +ul.menu_jq_gnavi_pldwn_gray_sub li { + background:none; + height:2.2em; + width:auto; + float:none; +} +ul.menu_jq_gnavi_pldwn_gray_sub li a { + line-height:2.2em; + padding:0px 5px; + text-align:left; + border-bottom:1px dotted #999; + width:auto; +} +ul.menu_jq_gnavi_pldwn_gray_sub li a.menu_jq_gnavi_pldwn_gray_btn { + font-weight:normal; +} +ul.menu_jq_gnavi_pldwn_gray_sub li ul.menu_jq_gnavi_pldwn_gray_sub { + top:0; +} +ul.menu_jq_gnavi_pldwn_gray{ + zoom:1; +} +ul.menu_jq_gnavi_pldwn_gray:after { + height:0; + visibility:hidden; + content:"."; + display:block; + clear:both; +} + +/* for IE7 */ +*+html ul.menu_jq_gnavi_pldwn_gray { + height:auto; +} +*+html ul.menu_jq_gnavi_pldwn_gray_sub { + left:-40px; + zoom:1; + width:140px !important; +} +*+html ul.menu_jq_gnavi_pldwn_gray_sub li ul.menu_jq_gnavi_pldwn_gray_sub { + left:100px; +} +*+html ul.menu_jq_gnavi_pldwn_gray_sub li { + display:inline; +} + +/* for IE6 */ +* html ul.menu_jq_gnavi_pldwn_gray { + height:auto; +} +*html ul.menu_jq_gnavi_pldwn_gray li a { + width:100%; +} +* html ul.menu_jq_gnavi_pldwn_gray_sub { + left:-40px; + zoom:1; + width:140px !important; +} +* html ul.menu_jq_gnavi_pldwn_gray_sub li ul.menu_jq_gnavi_pldwn_gray_sub { + left:110px; +} +* html ul.menu_jq_gnavi_pldwn_gray_sub li { + display:inline; +} +* html ul.menu_jq_gnavi_pldwn_gray_sub li a { + width:140px !important; +} + + + +.menu_jq_gnavi_pldwn_gray_actives { + /*background:transparent url(<{$smarty.const.CORE_BASE_URL}>/images/menu/jq_gnavi_pldwn_gray/header_light_btnback.gif) repeat-x scroll left 1px !important;*/ + background:transparent url(<{$smarty.const.CORE_BASE_URL}>/images/menu/jq_gnavi_pldwn_gray/header_btnhover.gif) repeat-x scroll left bottom !important; +} +ul.menu_jq_gnavi_pldwn_gray_sub .menu_jq_gnavi_pldwn_gray_actives { + background:transparent url(<{$smarty.const.CORE_BASE_URL}>/images/menu/jq_gnavi_pldwn_gray/header_light_btnback.gif) repeat-x scroll left top !important; +} diff --git a/html/webapp/modules/menu/files/css/jq_gnavi_pldwn_green/style.css b/html/webapp/modules/menu/files/css/jq_gnavi_pldwn_green/style.css new file mode 100644 index 0000000..dfbcbeb --- /dev/null +++ b/html/webapp/modules/menu/files/css/jq_gnavi_pldwn_green/style.css @@ -0,0 +1,146 @@ +ul.menu_jq_gnavi_pldwn_green { + list-style-image:none; + list-style-position:outside; + list-style-type:none; + background:transparent url(<{$smarty.const.CORE_BASE_URL}>/images/menu/jq_gnavi_pldwn_green/header_btnback.gif) repeat-x scroll left bottom; + height:35px; + margin:0px; + padding:0px 20px; +/* border-bottom:1px solid #b6d5af;*/ +} +ul.menu_jq_gnavi_pldwn_green li { + list-style-image:none; + list-style-position:outside; + list-style-type:none; + background:transparent url(<{$smarty.const.CORE_BASE_URL}>/images/menu/jq_gnavi_pldwn_green/header_btnback.gif) repeat-x scroll left bottom; + float:left; + padding:0px; + position:relative; + width:130px; + height:35px; +} +ul.menu_jq_gnavi_pldwn_green li a { + height:100%; + line-height:35px; + overflow:hidden; + display:block; + padding:0px; +} +/* +a.menu_jq_gnavi_pldwn_green_btn:link, a.menu_jq_gnavi_pldwn_green_btn:visited { + color: #2e7522; +} +a.menu_jq_gnavi_pldwn_green_btn:hover, a.menu_jq_gnavi_pldwn_green_btn:active { + color:#38b469 !important; +} +*/ + +ul.menu_jq_gnavi_pldwn_green li a.menu_jq_gnavi_pldwn_green_highlight { + background:#5ba44f url(<{$smarty.const.CORE_BASE_URL}>/images/menu/jq_gnavi_pldwn_green/header_btnhover.gif) repeat-x scroll left bottom; + color:#ffffff !important;/*important is for IE6*/ +} +.menu_jq_gnavi_pldwn_green_btn { + border-color:transparent #bbd1b2 transparent #ffffff; + border-style:solid; + border-width:0px 1px; + padding:0px; + /*font-size:12px;*/ + text-align:center; + font-weight:bold; +} +ul.menu_jq_gnavi_pldwn_green_sub { + min-width:140px; + background-color:#ffffff; + padding:0px; + display:none; + z-index:1000; + position:absolute; + border-color:#ddd #aaa #aaa #ddd; + border-style:solid; + border-width:1px; + -moz-box-shadow:2px 2px 2px #aaa; + -webkit-box-shadow:2px 2px 2px #aaa; + box-shadow:2px 2px 2px #aaa; +} +ul.menu_jq_gnavi_pldwn_green_sub li { + background:none; + height:2.2em; + width:auto; + float:none; +/* + border-color:transparent #b6d5af #ffffff #b6d5af; + border-style:none solid solid solid; + border-width:1px; +*/ +} +ul.menu_jq_gnavi_pldwn_green_sub li a { + line-height:2.2em; + padding:0px 5px; + text-align:left; + border-bottom:1px dotted #b6d5af; + width:auto; +} +ul.menu_jq_gnavi_pldwn_green_sub li a.menu_jq_gnavi_pldwn_green_btn { + font-weight:normal; +} +ul.menu_jq_gnavi_pldwn_green_sub li ul.menu_jq_gnavi_pldwn_green_sub { + top:0; +} +ul.menu_jq_gnavi_pldwn_green{ + zoom:1; +} +ul.menu_jq_gnavi_pldwn_green:after { + height:0; + visibility:hidden; + content:"."; + display:block; + clear:both; +} + +/* for IE7 */ +*+html ul.menu_jq_gnavi_pldwn_green { + height:auto; +} +*+html ul.menu_jq_gnavi_pldwn_green_sub { + left:-40px; + zoom:1; + width:140px !important; +} +*+html ul.menu_jq_gnavi_pldwn_green_sub li ul.menu_jq_gnavi_pldwn_green_sub { + left:100px; +} +*+html ul.menu_jq_gnavi_pldwn_green_sub li { + display:inline; +} +/* for IE6 */ +* html ul.menu_jq_gnavi_pldwn_green { + height:auto; +} +* html ul.menu_jq_gnavi_pldwn_green li a { + width:100%; +} +* html ul.menu_jq_gnavi_pldwn_green_sub { + left:-40px; + zoom:1; + width:140px !important; +} +* html ul.menu_jq_gnavi_pldwn_green_sub li ul.menu_jq_gnavi_pldwn_green_sub { + left:110px; +} +* html ul.menu_jq_gnavi_pldwn_green_sub li { + display:inline; +} +* html ul.menu_jq_gnavi_pldwn_green_sub li a { + width:140px !important; +} + + + +.menu_jq_gnavi_pldwn_green_actives { + background:#5ba44f url(<{$smarty.const.CORE_BASE_URL}>/images/menu/jq_gnavi_pldwn_green/header_btnhover.gif) repeat-x scroll left bottom !important; + color:#ffffff !important; +} +ul.menu_jq_gnavi_pldwn_green_sub .menu_jq_gnavi_pldwn_green_actives { + background:#5ba44f url(<{$smarty.const.CORE_BASE_URL}>/images/menu/jq_gnavi_pldwn_green/header_light_btnback.gif) repeat-x scroll left top !important; + color:#ffffff !important; +} diff --git a/html/webapp/modules/menu/files/css/jq_gnavi_pldwn_orange/style.css b/html/webapp/modules/menu/files/css/jq_gnavi_pldwn_orange/style.css new file mode 100644 index 0000000..d083a2e --- /dev/null +++ b/html/webapp/modules/menu/files/css/jq_gnavi_pldwn_orange/style.css @@ -0,0 +1,137 @@ +ul.menu_jq_gnavi_pldwn_orange { + list-style-image:none; + list-style-position:outside; + list-style-type:none; + background:transparent url(<{$smarty.const.CORE_BASE_URL}>/images/menu/jq_gnavi_pldwn_orange/header_btnback.gif) repeat-x scroll left bottom; + height:35px; + margin:0px; + padding:0px 20px; +} +ul.menu_jq_gnavi_pldwn_orange li { + list-style-image:none; + list-style-position:outside; + list-style-type:none; + background:transparent url(<{$smarty.const.CORE_BASE_URL}>/images/menu/jq_gnavi_pldwn_orange/header_btnback.gif) repeat-x scroll left bottom; + float:left; + padding:0px; + position:relative; + width:130px; + height:35px; +} +ul.menu_jq_gnavi_pldwn_orange li a { + height:100%; + /*width:100%;*/ + line-height:35px; + overflow:hidden; + display:block; + padding:0px; +} +ul.menu_jq_gnavi_pldwn_orange li a.menu_jq_gnavi_pldwn_orange_highlight { + background:#F18527 url(<{$smarty.const.CORE_BASE_URL}>/images/menu/jq_gnavi_pldwn_orange/header_btnhover.gif) repeat-x scroll left bottom; + color:#ffffff !important;/*important is for IE6*/ +} +.menu_jq_gnavi_pldwn_orange_btn { + border-color:transparent #dfc3ae transparent #ffffff; + border-style:solid; + border-width:0px 1px; + padding:0px; + text-align:center; + font-weight:bold; +} + +ul.menu_jq_gnavi_pldwn_orange_sub { + min-width:140px; + background-color:#ffffff; + + padding:0px; + display:none; + z-index:1000; + position:absolute; + border-color:#ddd #aaa #aaa #ddd; + border-style:solid; + border-width:1px; + -moz-box-shadow:2px 2px 2px #aaa; + -webkit-box-shadow:2px 2px 2px #aaa; + box-shadow:2px 2px 2px #aaa; +} +ul.menu_jq_gnavi_pldwn_orange_sub li { + background:none; + height:2.2em; + width:auto; + float:none; +} +ul.menu_jq_gnavi_pldwn_orange_sub li a { + line-height:2.2em; + padding:0px 5px; + text-align:left; + border-bottom:1px dotted #f3b785; + width:auto; +} +ul.menu_jq_gnavi_pldwn_orange_sub a.menu_jq_gnavi_pldwn_orange_btn { + font-weight:normal; +} +ul.menu_jq_gnavi_pldwn_orange_sub li ul.menu_jq_gnavi_pldwn_orange_sub { + background-color:#ffffff; + top:0; +} +ul.menu_jq_gnavi_pldwn_orange{ + zoom:1; +} +ul.menu_jq_gnavi_pldwn_orange:after { + height:0; + visibility:hidden; + content:"."; + display:block; + clear:both; +} + + +/* for IE7 */ +*+html ul.menu_jq_gnavi_pldwn_orange { + height:auto; +} +*+html ul.menu_jq_gnavi_pldwn_orange_sub { + left:-40px; + zoom:1; + width:140px !important; +} +*+html ul.menu_jq_gnavi_pldwn_orange_sub li ul.menu_jq_gnavi_pldwn_orange_sub { + left:100px; +} +*+html ul.menu_jq_gnavi_pldwn_orange_sub li { + display:inline; +} + +/* for IE6 */ +* html ul.menu_jq_gnavi_pldwn_orange { + height:auto; +} +* html ul.menu_jq_gnavi_pldwn_orange li a { + width:100%; +} +* html ul.menu_jq_gnavi_pldwn_orange_sub { + left:-40px; + zoom:1; + width:140px !important; +} +* html ul.menu_jq_gnavi_pldwn_orange_sub li ul.menu_jq_gnavi_pldwn_orange_sub { + left:110px; +} +* html ul.menu_jq_gnavi_pldwn_orange_sub li { + display:inline; +} +* html ul.menu_jq_gnavi_pldwn_orange_sub li a { + width:140px !important; +} + + + +.menu_jq_gnavi_pldwn_orange_actives { + background:#F18527 url(<{$smarty.const.CORE_BASE_URL}>/images/menu/jq_gnavi_pldwn_orange/header_btnhover.gif) repeat-x scroll left bottom !important; + color:#ffffff !important; +} + +ul.menu_jq_gnavi_pldwn_orange_sub .menu_jq_gnavi_pldwn_orange_actives { + background:#F18527 url(<{$smarty.const.CORE_BASE_URL}>/images/menu/jq_gnavi_pldwn_orange/header_light_btnback.gif) repeat-x scroll left top !important; + color:#ffffff !important; +} diff --git a/html/webapp/modules/menu/files/css/jq_gnavi_pldwn_red/style.css b/html/webapp/modules/menu/files/css/jq_gnavi_pldwn_red/style.css new file mode 100644 index 0000000..6600635 --- /dev/null +++ b/html/webapp/modules/menu/files/css/jq_gnavi_pldwn_red/style.css @@ -0,0 +1,145 @@ +ul.menu_jq_gnavi_pldwn_red { + list-style-image:none; + list-style-position:outside; + list-style-type:none; + background:transparent url(<{$smarty.const.CORE_BASE_URL}>/images/menu/jq_gnavi_pldwn_red/header_btnback.gif) repeat-x scroll left bottom; + height:35px; + margin:0px; + padding:0px 20px; + /*border-bottom:1px solid #ea9fc4;*/ +} +ul.menu_jq_gnavi_pldwn_red li { + list-style-image:none; + list-style-position:outside; + list-style-type:none; + background:transparent url(<{$smarty.const.CORE_BASE_URL}>/images/menu/jq_gnavi_pldwn_red/header_btnback.gif) repeat-x scroll left bottom; + float:left; + padding:0px; + position:relative; + width:130px; + height:35px; +} +ul.menu_jq_gnavi_pldwn_red li a { + height:100%; + line-height:35px; + overflow:hidden; + display:block; + padding:0px; +} +/* +a.menu_jq_gnavi_pldwn_red_btn:link, a.menu_jq_gnavi_pldwn_red_btn:visited { + color: #c93c8d; +} +a.menu_jq_gnavi_pldwn_red_btn:hover, a.menu_jq_gnavi_pldwn_red_btn:active { + background:transparent url(<{$smarty.const.CORE_BASE_URL}>/images/menu/jq_gnavi_pldwn_red/header_btnhover.png) repeat-x scroll left top; + color:#e65db0 !important; +} +*/ +ul.menu_jq_gnavi_pldwn_red li a.menu_jq_gnavi_pldwn_red_highlight { + background:#E667A7 url(<{$smarty.const.CORE_BASE_URL}>/images/menu/jq_gnavi_pldwn_red/header_btnhover.gif) repeat-x scroll left bottom; + color:#ffffff !important; /*important is for IE6*/ +} +.menu_jq_gnavi_pldwn_red_btn { + border-color:transparent #d7bace transparent #ffffff; + border-style:solid; + border-width:0px 1px; + padding:0px; + /*font-size:12px;*/ + text-align:center; + font-weight:bold; +} +ul.menu_jq_gnavi_pldwn_red_sub { + min-width:140px; + background-color:#ffffff; + padding:0px; + display:none; + z-index:1000; + position:absolute; + border-color:#ddd #aaa #aaa #ddd; + border-style:solid; + border-width:1px; + -moz-box-shadow:2px 2px 2px #aaa; + -webkit-box-shadow:2px 2px 2px #aaa; + box-shadow:2px 2px 2px #aaa; +} +ul.menu_jq_gnavi_pldwn_red_sub li { + background:none; + height:2.2em; + width:auto; + float:none; +} +ul.menu_jq_gnavi_pldwn_red_sub li a { + line-height:2.2em; + padding:0px 5px; + text-align:left; + border-bottom:1px dotted #ea9fc4; + width:auto; +} +ul.menu_jq_gnavi_pldwn_red_sub li .menu_jq_gnavi_pldwn_red_btn { + font-weight:normal; +} +ul.menu_jq_gnavi_pldwn_red_sub li ul.menu_jq_gnavi_pldwn_red_sub { + top:0; +} +ul.menu_jq_gnavi_pldwn_red{ + zoom:1; +} +ul.menu_jq_gnavi_pldwn_red:after { + height:0; + visibility:hidden; + content:"."; + display:block; + clear:both; +} + +/* for IE7 */ +*+html ul.menu_jq_gnavi_pldwn_red { + height:auto; +} +*+html ul.menu_jq_gnavi_pldwn_red_sub { + left:-40px; + zoom:1; + width:140px !important; +} +*+html ul.menu_jq_gnavi_pldwn_red_sub li ul.menu_jq_gnavi_pldwn_red_sub { + left:100px; +} +*+html ul.menu_jq_gnavi_pldwn_red_sub li { + display:inline; +} + +/* for IE6 */ +* html ul.menu_jq_gnavi_pldwn_red { + height:auto; +} +* html ul.menu_jq_gnavi_pldwn_red li a { + width:100%; +} + +* html ul.menu_jq_gnavi_pldwn_red_sub { + left:-40px; + zoom:1; + width:140px !important; +} +* html ul.menu_jq_gnavi_pldwn_red_sub li ul.menu_jq_gnavi_pldwn_red_sub { + left:110px; +} +* html ul.menu_jq_gnavi_pldwn_red_sub li { + display:inline; +} +* html ul.menu_jq_gnavi_pldwn_red_sub li a { + width:140px !important; +} + + + +.menu_jq_gnavi_pldwn_red_actives { + background:#E667A7 url(<{$smarty.const.CORE_BASE_URL}>/images/menu/jq_gnavi_pldwn_red/header_btnhover.gif) repeat-x scroll left bottom !important; + color:#ffffff !important; +} +ul.menu_jq_gnavi_pldwn_red_sub .menu_jq_gnavi_pldwn_red_actives { + background:#E667A7 url(<{$smarty.const.CORE_BASE_URL}>/images/menu/jq_gnavi_pldwn_red/header_light_btnback.gif) repeat-x scroll left top !important; + color:#ffffff !important; +} + + diff --git a/html/webapp/modules/menu/files/images/jq_gnavi_pldwn_blue/header_btnback.gif b/html/webapp/modules/menu/files/images/jq_gnavi_pldwn_blue/header_btnback.gif new file mode 100644 index 0000000..59ff597 Binary files /dev/null and b/html/webapp/modules/menu/files/images/jq_gnavi_pldwn_blue/header_btnback.gif differ diff --git a/html/webapp/modules/menu/files/images/jq_gnavi_pldwn_blue/header_btnhover.gif b/html/webapp/modules/menu/files/images/jq_gnavi_pldwn_blue/header_btnhover.gif new file mode 100644 index 0000000..591170f Binary files /dev/null and b/html/webapp/modules/menu/files/images/jq_gnavi_pldwn_blue/header_btnhover.gif differ diff --git a/html/webapp/modules/menu/files/images/jq_gnavi_pldwn_blue/header_light_btnback.gif b/html/webapp/modules/menu/files/images/jq_gnavi_pldwn_blue/header_light_btnback.gif new file mode 100644 index 0000000..d5a12e9 Binary files /dev/null and b/html/webapp/modules/menu/files/images/jq_gnavi_pldwn_blue/header_light_btnback.gif differ diff --git a/html/webapp/modules/menu/files/images/jq_gnavi_pldwn_gray/header_btnback.gif b/html/webapp/modules/menu/files/images/jq_gnavi_pldwn_gray/header_btnback.gif new file mode 100644 index 0000000..13c5508 Binary files /dev/null and b/html/webapp/modules/menu/files/images/jq_gnavi_pldwn_gray/header_btnback.gif differ diff --git a/html/webapp/modules/menu/files/images/jq_gnavi_pldwn_gray/header_btnhover.gif b/html/webapp/modules/menu/files/images/jq_gnavi_pldwn_gray/header_btnhover.gif new file mode 100644 index 0000000..b1fe18c Binary files /dev/null and b/html/webapp/modules/menu/files/images/jq_gnavi_pldwn_gray/header_btnhover.gif differ diff --git a/html/webapp/modules/menu/files/images/jq_gnavi_pldwn_gray/header_light_btnback.gif b/html/webapp/modules/menu/files/images/jq_gnavi_pldwn_gray/header_light_btnback.gif new file mode 100644 index 0000000..f10f54f Binary files /dev/null and b/html/webapp/modules/menu/files/images/jq_gnavi_pldwn_gray/header_light_btnback.gif differ diff --git a/html/webapp/modules/menu/files/images/jq_gnavi_pldwn_green/header_btnback.gif b/html/webapp/modules/menu/files/images/jq_gnavi_pldwn_green/header_btnback.gif new file mode 100644 index 0000000..412edc7 Binary files /dev/null and b/html/webapp/modules/menu/files/images/jq_gnavi_pldwn_green/header_btnback.gif differ diff --git a/html/webapp/modules/menu/files/images/jq_gnavi_pldwn_green/header_btnhover.gif b/html/webapp/modules/menu/files/images/jq_gnavi_pldwn_green/header_btnhover.gif new file mode 100644 index 0000000..ca220e9 Binary files /dev/null and b/html/webapp/modules/menu/files/images/jq_gnavi_pldwn_green/header_btnhover.gif differ diff --git a/html/webapp/modules/menu/files/images/jq_gnavi_pldwn_green/header_light_btnback.gif b/html/webapp/modules/menu/files/images/jq_gnavi_pldwn_green/header_light_btnback.gif new file mode 100644 index 0000000..b07cb18 Binary files /dev/null and b/html/webapp/modules/menu/files/images/jq_gnavi_pldwn_green/header_light_btnback.gif differ diff --git a/html/webapp/modules/menu/files/images/jq_gnavi_pldwn_orange/header_btnback.gif b/html/webapp/modules/menu/files/images/jq_gnavi_pldwn_orange/header_btnback.gif new file mode 100644 index 0000000..cc31881 Binary files /dev/null and b/html/webapp/modules/menu/files/images/jq_gnavi_pldwn_orange/header_btnback.gif differ diff --git a/html/webapp/modules/menu/files/images/jq_gnavi_pldwn_orange/header_btnhover.gif b/html/webapp/modules/menu/files/images/jq_gnavi_pldwn_orange/header_btnhover.gif new file mode 100644 index 0000000..b4bb52d Binary files /dev/null and b/html/webapp/modules/menu/files/images/jq_gnavi_pldwn_orange/header_btnhover.gif differ diff --git a/html/webapp/modules/menu/files/images/jq_gnavi_pldwn_orange/header_light_btnback.gif b/html/webapp/modules/menu/files/images/jq_gnavi_pldwn_orange/header_light_btnback.gif new file mode 100644 index 0000000..67c692f Binary files /dev/null and b/html/webapp/modules/menu/files/images/jq_gnavi_pldwn_orange/header_light_btnback.gif differ diff --git a/html/webapp/modules/menu/files/images/jq_gnavi_pldwn_red/header_btnback.gif b/html/webapp/modules/menu/files/images/jq_gnavi_pldwn_red/header_btnback.gif new file mode 100644 index 0000000..1a6f146 Binary files /dev/null and b/html/webapp/modules/menu/files/images/jq_gnavi_pldwn_red/header_btnback.gif differ diff --git a/html/webapp/modules/menu/files/images/jq_gnavi_pldwn_red/header_btnhover.gif b/html/webapp/modules/menu/files/images/jq_gnavi_pldwn_red/header_btnhover.gif new file mode 100644 index 0000000..903c7d1 Binary files /dev/null and b/html/webapp/modules/menu/files/images/jq_gnavi_pldwn_red/header_btnhover.gif differ diff --git a/html/webapp/modules/menu/files/images/jq_gnavi_pldwn_red/header_light_btnback.gif b/html/webapp/modules/menu/files/images/jq_gnavi_pldwn_red/header_light_btnback.gif new file mode 100644 index 0000000..3dd1639 Binary files /dev/null and b/html/webapp/modules/menu/files/images/jq_gnavi_pldwn_red/header_light_btnback.gif differ diff --git a/html/webapp/modules/menu/files/js/menu.js b/html/webapp/modules/menu/files/js/menu.js index c75dec5..4cfb421 100644 --- a/html/webapp/modules/menu/files/js/menu.js +++ b/html/webapp/modules/menu/files/js/menu.js @@ -860,5 +860,84 @@ clsMenu.prototype = { } }.bind(this); commonCls.send(chg_params); + }, + // 未ログインのとき + // ログインinputのフォーカス&フォーカス外しの初期処理で + // onfocus & onblurのイベントが走る + // このイベント処理とJQロードのタイミングがちょうどかち合うとJSエラーが発生する + // このため、IE & < 9 & 未ログインのときに限り、JSロードを400MS待たせ、かつロード中はページ切り替え動作をキャンセルするよう + menuJqLoad: function(block_id, color) { + var jqload_func = this._menuJqLoad; + var cancel_func = this._menuCancelForJqload; + + // IEかつ未ログインだったら + if($('login_id_0') && browser.isIE && browser.version < 9) { + var els = Element.getElementsByClassName(this.id, "menu_jq_gnavi_pldwn_" + color + "_btn"); + els.each( + function(el){ + el.observe("click", cancel_func); + } + ); + + setTimeout(function(){ + jqload_func(block_id, color); + }, 400); + } + else { + jqload_func(block_id, color); + } + }, + _menuCancelForJqload : function(e) { + jcheck = new Function('return !(typeof jQuery !== "undefined" && window.$ === jQuery)'); + commonCls.wait(jcheck); + return false; + }, + _menuJqLoad : function(block_id, color) { + + var cancel_func = this._menuCancelForJqload; + + jqcheckCls.jqload("jquery-1.6.4.min", "window.jQuery", + function() { + var zindex = 900; + if(browser.isIE && browser.version <= 7) { + jQuery("#" + block_id + " ul.menu_jq_gnavi_pldwn_" + color + " > li").each(function(index,el) { + jQuery(el).attr("style","z-index:"+zindex); + zindex--; + }); + } + if(browser.isIE && browser.version < 7) { + jQuery("#" + block_id + " ul.menu_jq_gnavi_pldwn_" + color + " li").hover( + function() { jQuery(">a", this).addClass("menu_jq_gnavi_pldwn_" + color + "_actives"); jQuery(">ul.menu_jq_gnavi_pldwn_" + color + "_sub:not(:animated)", this).show(); }, + function() { jQuery(">a", this).removeClass("menu_jq_gnavi_pldwn_" + color + "_actives"); jQuery(">ul.menu_jq_gnavi_pldwn_" + color + "_sub", this).hide(); } + ); + } + else { + jQuery("#" + block_id + " ul.menu_jq_gnavi_pldwn_" + color + " li").hover( + function() { + jQuery(">a", this).addClass("menu_jq_gnavi_pldwn_" + color + "_actives"); + if(jQuery(this).closest("ul").hasClass("menu_jq_gnavi_pldwn_" + color + "_sub")) { + /*!browser.isIE && browser.version > 7 first view */ + if(jQuery(">ul.menu_jq_gnavi_pldwn_" + color + "_sub", this).css("left")=="0px" || jQuery(">ul.menu_jq_gnavi_pldwn_" + color + "_sub", this).css("left") == "auto"){ + jQuery(">ul.menu_jq_gnavi_pldwn_" + color + "_sub", this).css("left", jQuery(this).width()); + } + } + jQuery(">ul.menu_jq_gnavi_pldwn_" + color + "_sub:not(:animated)", this).slideDown("fast"); + }, + function() { + jQuery(">a", this).removeClass("menu_jq_gnavi_pldwn_" + color + "_actives"); + jQuery(">ul.menu_jq_gnavi_pldwn_" + color + "_sub", this).slideUp("fast"); + } + ); + } + if($('login_id_0') && browser.isIE && browser.version < 9) { + Element.getElementsByClassName(this.id, "menu_jq_gnavi_pldwn_" + color + "_btn").each( + function(el){ + el.stopObserving("click", cancel_func); + } + ); + } + + } + ); } } \ No newline at end of file diff --git a/html/webapp/modules/menu/install.ini b/html/webapp/modules/menu/install.ini old mode 100644 new mode 100755 index 8b854d0..986e725 --- a/html/webapp/modules/menu/install.ini +++ b/html/webapp/modules/menu/install.ini @@ -1,4 +1,4 @@ -version = "2.4.0.1" +version = "2.4.2.1" action_name="menu_view_main_init" edit_action_name="menu_view_edit_init" block_delete_action="auto" diff --git a/html/webapp/modules/menu/templates/jq_gnavi_pldwn_blue/menu_view_main_detail.html b/html/webapp/modules/menu/templates/jq_gnavi_pldwn_blue/menu_view_main_detail.html new file mode 100644 index 0000000..f0cc0b7 --- /dev/null +++ b/html/webapp/modules/menu/templates/jq_gnavi_pldwn_blue/menu_view_main_detail.html @@ -0,0 +1,11 @@ +<{strip}> +<{assign var="now_thread_num" value=$action.thread_num}> +<{assign var="now_parent_id" value=$action.parent_id}> +<{assign var="menus" value=$action.menus.$now_thread_num.$now_parent_id}> + +<{assign var="pldwn_sub_class_name" value="menu_jq_gnavi_pldwn_blue_sub"}> +<{assign var="pldwn_btn_class_name" value="menu_jq_gnavi_pldwn_blue_btn"}> +<{assign var="pldwn_highlight_class_name" value="menu_jq_gnavi_pldwn_blue_highlight"}> + +<{include file="menu_view_main_list.html"}> +<{/strip}> diff --git a/html/webapp/modules/menu/templates/jq_gnavi_pldwn_blue/menu_view_main_init.html b/html/webapp/modules/menu/templates/jq_gnavi_pldwn_blue/menu_view_main_init.html new file mode 100644 index 0000000..f35764d --- /dev/null +++ b/html/webapp/modules/menu/templates/jq_gnavi_pldwn_blue/menu_view_main_init.html @@ -0,0 +1,16 @@ +<{strip}> +<{assign var="menus" value=$action.menus.0.0}> +<{assign var="thread_nest" value=0}> + +<{assign var="pldwn_sub_class_name" value="menu_jq_gnavi_pldwn_blue_sub"}> +<{assign var="pldwn_btn_class_name" value="menu_jq_gnavi_pldwn_blue_btn"}> +<{assign var="pldwn_highlight_class_name" value="menu_jq_gnavi_pldwn_blue_highlight"}> + + +<{include file="../menu_script.html"}> + +<{/strip}> diff --git a/html/webapp/modules/menu/templates/jq_gnavi_pldwn_blue/menu_view_main_list.html b/html/webapp/modules/menu/templates/jq_gnavi_pldwn_blue/menu_view_main_list.html new file mode 100644 index 0000000..159fd9d --- /dev/null +++ b/html/webapp/modules/menu/templates/jq_gnavi_pldwn_blue/menu_view_main_list.html @@ -0,0 +1,3 @@ +<{strip}> + <{include file="../jq_gnavi_pldwn_gray/menu_view_main_list.html"}> +<{/strip}> diff --git a/html/webapp/modules/menu/templates/jq_gnavi_pldwn_gray/menu_view_main_detail.html b/html/webapp/modules/menu/templates/jq_gnavi_pldwn_gray/menu_view_main_detail.html new file mode 100644 index 0000000..2118f31 --- /dev/null +++ b/html/webapp/modules/menu/templates/jq_gnavi_pldwn_gray/menu_view_main_detail.html @@ -0,0 +1,11 @@ +<{strip}> +<{assign var="now_thread_num" value=$action.thread_num}> +<{assign var="now_parent_id" value=$action.parent_id}> +<{assign var="menus" value=$action.menus.$now_thread_num.$now_parent_id}> + +<{assign var="pldwn_sub_class_name" value="menu_jq_gnavi_pldwn_gray_sub"}> +<{assign var="pldwn_btn_class_name" value="menu_jq_gnavi_pldwn_gray_btn"}> +<{assign var="pldwn_highlight_class_name" value="menu_jq_gnavi_pldwn_gray_highlight"}> + +<{include file="menu_view_main_list.html"}> +<{/strip}> diff --git a/html/webapp/modules/menu/templates/jq_gnavi_pldwn_gray/menu_view_main_init.html b/html/webapp/modules/menu/templates/jq_gnavi_pldwn_gray/menu_view_main_init.html new file mode 100644 index 0000000..862a988 --- /dev/null +++ b/html/webapp/modules/menu/templates/jq_gnavi_pldwn_gray/menu_view_main_init.html @@ -0,0 +1,16 @@ +<{strip}> +<{assign var="menus" value=$action.menus.0.0}> +<{assign var="thread_nest" value=0}> + +<{assign var="pldwn_sub_class_name" value="menu_jq_gnavi_pldwn_gray_sub"}> +<{assign var="pldwn_btn_class_name" value="menu_jq_gnavi_pldwn_gray_btn"}> +<{assign var="pldwn_highlight_class_name" value="menu_jq_gnavi_pldwn_gray_highlight"}> + + +<{include file="../menu_script.html"}> + +<{/strip}> diff --git a/html/webapp/modules/menu/templates/jq_gnavi_pldwn_gray/menu_view_main_list.html b/html/webapp/modules/menu/templates/jq_gnavi_pldwn_gray/menu_view_main_list.html new file mode 100644 index 0000000..1808cff --- /dev/null +++ b/html/webapp/modules/menu/templates/jq_gnavi_pldwn_gray/menu_view_main_list.html @@ -0,0 +1,108 @@ +<{strip}> + + +<{* スレッド階層が1以上のときはプルダウン対応とする(2以上は横に出る。推奨は2まで) 0のときはグローバルナビに横並び。*}> +<{if $thread_nest>=1}> +
    +<{/if}> + + + +<{foreach from=$menus item=menu}> + +<{if $menu.space_type == _SPACE_TYPE_PUBLIC}> + + <{* ノードかどうかでクラス変更 *}> + <{assign var="now_page_id" value=$menu.page_id}> + <{assign var="next_thread_num" value=$menu.thread_num+1}> + + <{if $menu.space_type == _SPACE_TYPE_PUBLIC}> + <{assign var="thread_num" value=$menu.thread_num-1}> + <{else}> + <{assign var="thread_num" value=$menu.thread_num}> + <{/if}> + + + <{if $thread_num <= 0}> + <{assign var="display_flag" value=$smarty.const._ON}> + <{/if}> + + + <{if $menu.thread_num != 0 || + ($menu.space_type != _SPACE_TYPE_PUBLIC && !($menu.space_type == _SPACE_TYPE_GROUP && $menu.default_entry_flag == _ON) && !($menu.space_type == _SPACE_TYPE_GROUP && $menu.private_flag == _OFF && $menu.thread_num == 0 && !isset($action.menus.$next_thread_num.$now_page_id|smarty:nodefaults)))}> + <{assign var="display_flag" value=$action.main_active_node_arr.$now_page_id}> + <{*アクティブかどうか*}> + <{if $action.main_page_id == $menu.page_id}> + <{assign var="class_name" value="nowrap $pldwn_highlight_class_name _menu_active"}> + <{elseif $display_flag == $smarty.const._ON }> + <{assign var="class_name" value="nowrap $pldwn_highlight_class_name "}> + <{else}> + <{assign var="class_name" value="nowrap"}> + <{/if}> + <{* スペースタイプでクラス変更 *}> + <{if $menu.space_type == _SPACE_TYPE_PUBLIC}> + <{assign var="top_class_name" value=""}> + <{assign var="space_type_class_name" value=""}> + <{elseif $menu.space_type == _SPACE_TYPE_GROUP}> + <{assign var="top_class_name" value=""}> + <{assign var="space_type_class_name" value=""}> + <{/if}> + <{*プライベートかいなか*}> + <{if $menu.private_flag}> + <{assign var="top_class_name" value=""}> + <{assign var="space_type_class_name" value=""}> + <{/if}> + <{*ノードで下にページ(ノード)がない場合、表示しない*}> + <{*if $menu.page_name != "" && ($menu.action_name!="" || $action.menus.$next_thread_num.$now_page_id)*}> + <{if $menu.action_name!="" && $menu.page_name != "" && $menu.visibility_flag == _ON && !($menu.page_id == $menu.room_id && $menu.display_flag == _OFF && $menu.authority_id < _AUTH_CHIEF)}> +
  • + "> + <{$menu.page_name}> + <{* 準備中 *}> + <{if $menu.page_id == $menu.room_id && $menu.display_flag == _OFF}><{$lang.menu_prepared|smarty:nodefaults}><{/if}> + + <{if $action.menus.$next_thread_num.$now_page_id + && + !($menu.page_id == $menu.room_id && $menu.display_flag == _OFF && $menu.authority_id < _AUTH_CHIEF)}> + + <{assign var="menus" value=$action.menus.$next_thread_num.$now_page_id}> + <{assign var="old_thread_nest" value=$thread_nest}> + <{if $menu.private_flag == $smarty.const._ON}> + <{assign var="thread_nest" value=$menu.thread_num+1}> + <{else}> + <{assign var="thread_nest" value=$menu.thread_num}> + <{/if}> + <{include file="menu_view_main_list.html"}> + <{assign var="thread_nest" value=$old_thread_nest}> + <{/if}> +
  • + <{/if}> + <{/if}> + + + + <{if ($menu.space_type==_SPACE_TYPE_PUBLIC && $menu.thread_num == 0) || + ($menu.space_type == _SPACE_TYPE_GROUP && $menu.private_flag == _ON && $menu.thread_num==0) || + ($menu.space_type == _SPACE_TYPE_GROUP && $menu.private_flag == _OFF && $menu.thread_num==0)}> + <{if $action.menus.$next_thread_num.$now_page_id && !($menu.page_id == $menu.room_id && $menu.display_flag == _OFF && $menu.authority_id < _AUTH_CHIEF)}> + <{assign var="menus" value=$action.menus.$next_thread_num.$now_page_id}> + <{assign var="old_thread_nest" value=$thread_nest}> + <{if $menu.private_flag == $smarty.const._ON}> + <{assign var="thread_nest" value=$menu.thread_num+1}> + <{else}> + <{assign var="thread_nest" value=$menu.thread_num}> + <{/if}> + <{include file="menu_view_main_list.html"}> + <{assign var="thread_nest" value=$old_thread_nest}> + <{/if}> + <{/if}> + + +<{/if}> + +<{/foreach}> + +<{if $thread_nest>=1}> +
+<{/if}> +<{/strip}> diff --git a/html/webapp/modules/menu/templates/jq_gnavi_pldwn_green/menu_view_main_detail.html b/html/webapp/modules/menu/templates/jq_gnavi_pldwn_green/menu_view_main_detail.html new file mode 100644 index 0000000..1754c73 --- /dev/null +++ b/html/webapp/modules/menu/templates/jq_gnavi_pldwn_green/menu_view_main_detail.html @@ -0,0 +1,11 @@ +<{strip}> +<{assign var="now_thread_num" value=$action.thread_num}> +<{assign var="now_parent_id" value=$action.parent_id}> +<{assign var="menus" value=$action.menus.$now_thread_num.$now_parent_id}> + +<{assign var="pldwn_sub_class_name" value="menu_jq_gnavi_pldwn_green_sub"}> +<{assign var="pldwn_btn_class_name" value="menu_jq_gnavi_pldwn_green_btn"}> +<{assign var="pldwn_highlight_class_name" value="menu_jq_gnavi_pldwn_green_highlight"}> + +<{include file="menu_view_main_list.html"}> +<{/strip}> diff --git a/html/webapp/modules/menu/templates/jq_gnavi_pldwn_green/menu_view_main_init.html b/html/webapp/modules/menu/templates/jq_gnavi_pldwn_green/menu_view_main_init.html new file mode 100644 index 0000000..33eb078 --- /dev/null +++ b/html/webapp/modules/menu/templates/jq_gnavi_pldwn_green/menu_view_main_init.html @@ -0,0 +1,16 @@ +<{strip}> +<{assign var="menus" value=$action.menus.0.0}> +<{assign var="thread_nest" value=0}> + +<{assign var="pldwn_sub_class_name" value="menu_jq_gnavi_pldwn_green_sub"}> +<{assign var="pldwn_btn_class_name" value="menu_jq_gnavi_pldwn_green_btn"}> +<{assign var="pldwn_highlight_class_name" value="menu_jq_gnavi_pldwn_green_highlight"}> + + +<{include file="../menu_script.html"}> + +<{/strip}> diff --git a/html/webapp/modules/menu/templates/jq_gnavi_pldwn_green/menu_view_main_list.html b/html/webapp/modules/menu/templates/jq_gnavi_pldwn_green/menu_view_main_list.html new file mode 100644 index 0000000..159fd9d --- /dev/null +++ b/html/webapp/modules/menu/templates/jq_gnavi_pldwn_green/menu_view_main_list.html @@ -0,0 +1,3 @@ +<{strip}> + <{include file="../jq_gnavi_pldwn_gray/menu_view_main_list.html"}> +<{/strip}> diff --git a/html/webapp/modules/menu/templates/jq_gnavi_pldwn_orange/menu_view_main_detail.html b/html/webapp/modules/menu/templates/jq_gnavi_pldwn_orange/menu_view_main_detail.html new file mode 100644 index 0000000..9d9c728 --- /dev/null +++ b/html/webapp/modules/menu/templates/jq_gnavi_pldwn_orange/menu_view_main_detail.html @@ -0,0 +1,11 @@ +<{strip}> +<{assign var="now_thread_num" value=$action.thread_num}> +<{assign var="now_parent_id" value=$action.parent_id}> +<{assign var="menus" value=$action.menus.$now_thread_num.$now_parent_id}> + +<{assign var="pldwn_sub_class_name" value="menu_jq_gnavi_pldwn_orange_sub"}> +<{assign var="pldwn_btn_class_name" value="menu_jq_gnavi_pldwn_orange_btn"}> +<{assign var="pldwn_highlight_class_name" value="menu_jq_gnavi_pldwn_orange_highlight"}> + +<{include file="menu_view_main_list.html"}> +<{/strip}> diff --git a/html/webapp/modules/menu/templates/jq_gnavi_pldwn_orange/menu_view_main_init.html b/html/webapp/modules/menu/templates/jq_gnavi_pldwn_orange/menu_view_main_init.html new file mode 100644 index 0000000..7a1bacc --- /dev/null +++ b/html/webapp/modules/menu/templates/jq_gnavi_pldwn_orange/menu_view_main_init.html @@ -0,0 +1,15 @@ +<{strip}> +<{assign var="menus" value=$action.menus.0.0}> +<{assign var="thread_nest" value=0}> + +<{assign var="pldwn_sub_class_name" value="menu_jq_gnavi_pldwn_orange_sub"}> +<{assign var="pldwn_btn_class_name" value="menu_jq_gnavi_pldwn_orange_btn"}> +<{assign var="pldwn_highlight_class_name" value="menu_jq_gnavi_pldwn_orange_highlight"}> + + +<{include file="../menu_script.html"}> +<{/strip}> diff --git a/html/webapp/modules/menu/templates/jq_gnavi_pldwn_orange/menu_view_main_list.html b/html/webapp/modules/menu/templates/jq_gnavi_pldwn_orange/menu_view_main_list.html new file mode 100644 index 0000000..159fd9d --- /dev/null +++ b/html/webapp/modules/menu/templates/jq_gnavi_pldwn_orange/menu_view_main_list.html @@ -0,0 +1,3 @@ +<{strip}> + <{include file="../jq_gnavi_pldwn_gray/menu_view_main_list.html"}> +<{/strip}> diff --git a/html/webapp/modules/menu/templates/jq_gnavi_pldwn_red/menu_view_main_detail.html b/html/webapp/modules/menu/templates/jq_gnavi_pldwn_red/menu_view_main_detail.html new file mode 100644 index 0000000..4812c68 --- /dev/null +++ b/html/webapp/modules/menu/templates/jq_gnavi_pldwn_red/menu_view_main_detail.html @@ -0,0 +1,11 @@ +<{strip}> +<{assign var="now_thread_num" value=$action.thread_num}> +<{assign var="now_parent_id" value=$action.parent_id}> +<{assign var="menus" value=$action.menus.$now_thread_num.$now_parent_id}> + +<{assign var="pldwn_sub_class_name" value="menu_jq_gnavi_pldwn_red_sub"}> +<{assign var="pldwn_btn_class_name" value="menu_jq_gnavi_pldwn_red_btn"}> +<{assign var="pldwn_highlight_class_name" value="menu_jq_gnavi_pldwn_red_highlight"}> + +<{include file="menu_view_main_list.html"}> +<{/strip}> diff --git a/html/webapp/modules/menu/templates/jq_gnavi_pldwn_red/menu_view_main_init.html b/html/webapp/modules/menu/templates/jq_gnavi_pldwn_red/menu_view_main_init.html new file mode 100644 index 0000000..c04356c --- /dev/null +++ b/html/webapp/modules/menu/templates/jq_gnavi_pldwn_red/menu_view_main_init.html @@ -0,0 +1,15 @@ +<{strip}> +<{assign var="menus" value=$action.menus.0.0}> +<{assign var="thread_nest" value=0}> + +<{assign var="pldwn_sub_class_name" value="menu_jq_gnavi_pldwn_red_sub"}> +<{assign var="pldwn_btn_class_name" value="menu_jq_gnavi_pldwn_red_btn"}> +<{assign var="pldwn_highlight_class_name" value="menu_jq_gnavi_pldwn_red_highlight"}> + + +<{include file="../menu_script.html"}> +<{/strip}> diff --git a/html/webapp/modules/menu/templates/jq_gnavi_pldwn_red/menu_view_main_list.html b/html/webapp/modules/menu/templates/jq_gnavi_pldwn_red/menu_view_main_list.html new file mode 100644 index 0000000..159fd9d --- /dev/null +++ b/html/webapp/modules/menu/templates/jq_gnavi_pldwn_red/menu_view_main_list.html @@ -0,0 +1,3 @@ +<{strip}> + <{include file="../jq_gnavi_pldwn_gray/menu_view_main_list.html"}> +<{/strip}> diff --git a/html/webapp/modules/menu/templates/menu_view_edit_detail.html b/html/webapp/modules/menu/templates/menu_view_edit_detail.html old mode 100644 new mode 100755 index b748e27..22f9e36 --- a/html/webapp/modules/menu/templates/menu_view_edit_detail.html +++ b/html/webapp/modules/menu/templates/menu_view_edit_detail.html @@ -3,5 +3,7 @@ <{assign var="now_parent_id" value=$action.parent_id}> <{assign var="visibility_flag" value=$action.visibility_flag}> <{assign var="menus" value=$action.menus.$now_thread_num.$now_parent_id}> -<{include file="menu_view_edit_list.html"}> +<{if $menus}> + <{include file="menu_view_edit_list.html"}> +<{/if}> <{/strip}> \ No newline at end of file diff --git a/html/webapp/modules/menu/templates/topic_path/menu_mobile_detail.html b/html/webapp/modules/menu/templates/topic_path/menu_mobile_detail.html new file mode 100644 index 0000000..c660c6c --- /dev/null +++ b/html/webapp/modules/menu/templates/topic_path/menu_mobile_detail.html @@ -0,0 +1,60 @@ +<{strip}> +<{* 携帯詳細表示用テンプレート *}> + +

+ <{$action.page_name|smarty:nodefaults}> +

+ +<{if ($action.count > 0) }> +
+ <{assign var="blocks" value=$action.blocks.0}> + <{include file="menu_mobile_recursive_block.html"}> +
+<{else}> +
<{$lang.menu_no_page|smarty:nodefaults}>
+<{/if}> +
+ +<{if ( $action.page_id == $action.room_id && $action.each_room_flag == _ON ) }> +
+ <{if !empty($action.pageTree|smarty:nodefaults)}> + <{ if $action.pageCount > 0 }> +

+ <{$lang.menu_in_room_select|smarty:nodefaults}> +

+ <{assign var="pages" value=$action.topPage}> + <{assign var="minusIndentFirstCheckLevel" value=1}> + <{assign var="minusIndentFirst" value=0}> + <{include file="menu_mobile_recursive_page.html"}> + <{/if}> + <{/if}> +
+<{/if}> + +
+
+ <{if $action.each_room_flag==_ON && $action.room_id != $action.page_id }> + + <{else}> + + <{/if}> + + <{$lang._btn_prev_arrow|smarty:nodefaults}> + +
+
+
+ +<{if $action.each_room_flag == $smarty.const._ON }> +

+ <{$lang.menu_room_select|smarty:nodefaults}> +

+
+ <{assign var="menu_redirect_action" value=$conf.menu_redirect_action}> + <{assign var="next_thread_num" value=0}> + <{assign var="next_parent_id" value=0}> + <{assign var="room_list" value=$action.room_arr.$next_thread_num.$next_parent_id}> + <{include file="menu_mobile_recursive_room.html"}> +
+<{/if}> +<{/strip}> \ No newline at end of file diff --git a/html/webapp/modules/menu/templates/topic_path/menu_mobile_init.html b/html/webapp/modules/menu/templates/topic_path/menu_mobile_init.html new file mode 100644 index 0000000..81d0d68 --- /dev/null +++ b/html/webapp/modules/menu/templates/topic_path/menu_mobile_init.html @@ -0,0 +1,32 @@ +<{strip}> +<{* 携帯メニュー表示用テンプレート *}> + +

+ <{$lang.menu_page_select|smarty:nodefaults}> +

+ +
+ <{if !empty($action.pageTree|smarty:nodefaults)}> + <{assign var="pages" value=$action.topPage}> + <{assign var="minusIndentFirstCheckLevel" value=1}> + <{assign var="minusIndentFirst" value=0}> + <{include file="menu_mobile_recursive_page.html" page_counter_param=$page_counter_param}> + <{else}> + <{$lang.menu_no_page|smarty:nodefaults}> + <{/if}> +
+
+ +<{if $action.each_room_flag == $smarty.const._ON }> +

+ <{$lang.menu_room_select|smarty:nodefaults}> +

+
+ <{assign var="menu_redirect_action" value=$conf.menu_redirect_action}> + <{assign var="next_thread_num" value=0}> + <{assign var="next_parent_id" value=0}> + <{assign var="room_list" value=$action.room_arr.$next_thread_num.$next_parent_id}> + <{include file="menu_mobile_recursive_room.html"}> +
+<{/if}> +<{/strip}> \ No newline at end of file diff --git a/html/webapp/modules/menu/templates/topic_path/menu_mobile_recursive_block.html b/html/webapp/modules/menu/templates/topic_path/menu_mobile_recursive_block.html new file mode 100644 index 0000000..a09a814 --- /dev/null +++ b/html/webapp/modules/menu/templates/topic_path/menu_mobile_recursive_block.html @@ -0,0 +1,51 @@ +<{strip}> +<{* ブロック一覧表示用テンプレート *}> +<{foreach name="block" key="block_id" key=blockId item="block" from=$blocks}> + <{if $block.module_id != 0 }> + <{if ($block.block_name == "" )}> + <{if ( $block.content != "" ) }> + <{if ($action.html_flag == _ON) }> +
+ + <{$lang._mobile_view_text|smarty:nodefaults}> + +
+
+ <{$block.content|smarty:nodefaults|img_style_rgb_to_hex|wysiwig_convert_url}> + <{else}> +
+ + <{$lang._mobile_view_html|smarty:nodefaults}> + +
+
+ <{$block.content|html_to_text|smarty:nodefaults|nl2br}> + <{/if}> + + <{if ( $block.more_title != "" ) }> +
+
+ + <{$block.more_title}> + +
+ <{/if}> + <{else}> + + <{$block.module_name}> + + <{/if}> + <{else}> + + <{$block.block_name}> + + <{/if}> +
+ <{/if}> + + <{if !empty($action.blocks.$blockId|smarty:nodefaults)}> + <{assign var="blocks" value=$action.blocks.$blockId}> + <{include file="menu_mobile_recursive_block.html"}> + <{/if}> +<{/foreach}> +<{/strip}> \ No newline at end of file diff --git a/html/webapp/modules/menu/templates/topic_path/menu_mobile_recursive_page.html b/html/webapp/modules/menu/templates/topic_path/menu_mobile_recursive_page.html new file mode 100644 index 0000000..6b0e9d4 --- /dev/null +++ b/html/webapp/modules/menu/templates/topic_path/menu_mobile_recursive_page.html @@ -0,0 +1,74 @@ +<{strip}> +<{* ページデータツリー表示用テンプレート *}> + +<{foreach name="pageLoop" from=$pages|smarty:nodefaults key=pageId item=page}> + <{if ( !empty($page.depth|smarty:nodefaults) ) }> + <{assign var="remake_depth" value=$page.depth-1}> + <{else}> + <{assign var="remake_depth" value=$page.depth}> + <{/if}> + + <{if ( !empty($page.depth|smarty:nodefaults) ) || ($action.each_room_flag==$smarty.const._OFF && $page.disabled==false) }> + <{if empty($remake_depth|smarty:nodefaults) }> + <{assign var="minusIndent" value=-1}> + <{/if}> + + <{if $page.mobileModule == true && $page.visible == true}> + + <{if $page.disabled==false || $action.menu_display_type==$smarty.const.MOBILE_MENU_DISPLAY_TREE }> +
+   + <{/if}> + + <{if $action.menu_display_type == $smarty.const.MOBILE_MENU_DISPLAY_TREE}> + <{if !empty($remake_depth|smarty:nodefaults)}> + <{textformat indent=$minusIndentFirst indent_char=$lang.menu_indent_space|smarty:nodefaults}> + <{textformat indent=$remake_depth-1-$minusIndent indent_char=$lang.menu_indent_mark1}> + <{if $page.lastChild == true}> + <{$lang.menu_indent_mark3|smarty:nodefaults|indent:$minusIndent-$minusIndentFirst:$lang.menu_indent_space|smarty:nodefaults}> + <{else}> + <{$lang.menu_indent_mark2|smarty:nodefaults|indent:$minusIndent-$minusIndentFirst:$lang.menu_indent_space|smarty:nodefaults}> + <{/if}> + <{/textformat}> + <{/textformat}> + <{/if}> + <{/if}> + + + <{if $page.disabled == true}> + <{if $action.menu_display_type == $smarty.const.MOBILE_MENU_DISPLAY_TREE }> + <{$page.page_name}> + <{/if}> + <{elseif $page.blockCount > 1 }> + + <{$page.page_name}> + + <{else}> + + <{$page.page_name}> + + <{/if}> + + + <{if $page.disabled==false || $action.menu_display_type==$smarty.const.MOBILE_MENU_DISPLAY_TREE }> +
+ <{/if}> + <{/if}> + <{/if}> + + <{if !empty($action.pageTree.$pageId|smarty:nodefaults)}> + <{if ($action.menu_display_type==$smarty.const.MOBILE_MENU_DISPLAY_TREE && $page.visible==true)||$action.menu_display_type==$smarty.const.MOBILE_MENU_DISPLAY_FLAT}> + <{if $remake_depth==$minusIndentFirstCheckLevel && $page.lastChild == true}> + <{assign var="minusIndentFirst" value=$minusIndentFirst+1}> + <{assign var="minusIndentFirstCheckLevel" value=$minusIndentFirstCheckLevel+1}> + <{/if}> + + <{if empty($remake_depth|smarty:nodefaults) || $page.lastChild == true}> + <{assign var="minusIndent" value=$minusIndent+1}> + <{/if}> + <{assign var="pages" value=$action.pageTree.$pageId}> + <{include file="menu_mobile_recursive_page.html"}> + <{/if}> + <{/if}> +<{/foreach}> +<{/strip}> \ No newline at end of file diff --git a/html/webapp/modules/menu/templates/topic_path/menu_mobile_recursive_room.html b/html/webapp/modules/menu/templates/topic_path/menu_mobile_recursive_room.html new file mode 100644 index 0000000..b759106 --- /dev/null +++ b/html/webapp/modules/menu/templates/topic_path/menu_mobile_recursive_room.html @@ -0,0 +1,39 @@ +<{strip}> +<{* ルームデータツリー表示用テンプレート *}> + +<{foreach name="room_`$next_parent_id`" item="room_obj" from=$room_list}> + <{assign var="indent" value=$room_obj.thread_num}> + + <{if ( $room_obj.visible_flag==_ON ) }> + <{if ($room_obj.private_flag == _OFF && $room_obj.thread_num == 0) }> + <{else}> + <{" "|str_repeat:$indent}> + <{/if}> + + <{if ($room_obj.space_type != _SPACE_TYPE_PUBLIC && $room_obj.private_flag == _OFF && $room_obj.thread_num == 0) }> + <{$lang._mobile_node|smarty:nodefaults}> + <{$room_obj.page_name}> +
+ <{else}> + <{$lang._mobile_node|smarty:nodefaults}> + <{if ($room_obj.page_id == $action.room_id) }> + <{$room_obj.page_name}> + <{elseif ($room_obj.disable_flag == _ON) }> + <{$room_obj.page_name}> + <{else}> + + <{$room_obj.page_name}> + + <{/if}> +
+ <{/if}> + <{/if}> + + <{assign var="next_thread_num" value=$room_obj.thread_num+1}> + <{assign var="next_parent_id" value=$room_obj.page_id}> + <{assign var="room_list" value=$action.room_arr.$next_thread_num.$next_parent_id}> + <{if ($room_list) }> + <{include file="menu_mobile_recursive_room.html"}> + <{/if}> +<{/foreach}> +<{/strip}> \ No newline at end of file diff --git a/html/webapp/modules/menu/templates/topic_path/menu_view_main_detail.html b/html/webapp/modules/menu/templates/topic_path/menu_view_main_detail.html new file mode 100644 index 0000000..837c8fd --- /dev/null +++ b/html/webapp/modules/menu/templates/topic_path/menu_view_main_detail.html @@ -0,0 +1,6 @@ +<{strip}> +<{assign var="now_thread_num" value=$action.thread_num}> +<{assign var="now_parent_id" value=$action.parent_id}> +<{assign var="menus" value=$action.menus.$now_thread_num.$now_parent_id}> +<{include file="menu_view_main_list.html"}> +<{/strip}> \ No newline at end of file diff --git a/html/webapp/modules/menu/templates/topic_path/menu_view_main_init.html b/html/webapp/modules/menu/templates/topic_path/menu_view_main_init.html new file mode 100644 index 0000000..be58d8e --- /dev/null +++ b/html/webapp/modules/menu/templates/topic_path/menu_view_main_init.html @@ -0,0 +1,23 @@ +<{strip}> +<{*トップページ*}> + +<{* カレントがトップページの場合はリンクしない *}> +<{if ( $action.main_page_id == $action.top_page_arr.page_id )}> + <{$action.top_page_arr.page_name}>  +<{else}> + <{* アンカーの後のスペース表現でメニューの半角・全角の高さの違いを吸収 *}> + <{if $action.top_page_arr.visibility_flag}> + + <{$action.top_page_arr.page_name}> +   + <{/if}> +<{/if}> +<{assign var="menus" value=$action.menus.0.0}> +<{* div のコメントアウト topic_path_menu_page *}> +<{*
*}> +<{include file="menu_view_main_list.html"}> +<{* div のコメントアウト topic_path_menu_page *}> +<{*
*}> +<{include file="../menu_script.html"}> + +<{/strip}> \ No newline at end of file diff --git a/html/webapp/modules/menu/templates/topic_path/menu_view_main_list.html b/html/webapp/modules/menu/templates/topic_path/menu_view_main_list.html new file mode 100644 index 0000000..1fedb31 --- /dev/null +++ b/html/webapp/modules/menu/templates/topic_path/menu_view_main_list.html @@ -0,0 +1,124 @@ +<{strip}> +<{foreach from=$menus item=menu}> + <{* ノードかどうかでクラス変更 *}> + <{assign var="now_page_id" value=$menu.page_id}> + <{assign var="next_thread_num" value=$menu.thread_num+1}> + <{if $menu.space_type == _SPACE_TYPE_PUBLIC}> + <{assign var="thread_num" value=$menu.thread_num-1}> + <{if $thread_num <= 0}> + <{assign var="display_flag" value=$smarty.const._ON}> + <{/if}> + <{else}> + <{assign var="thread_num" value=$menu.thread_num}> + <{/if}> + <{if ($menu.thread_num != 0 && !($menu.space_type == _SPACE_TYPE_PUBLIC && $menu.thread_num == 1 && $menu.display_sequence == 1)) || + ($menu.space_type != _SPACE_TYPE_PUBLIC && !($menu.space_type == _SPACE_TYPE_GROUP && $menu.default_entry_flag == _ON) && !($menu.space_type == _SPACE_TYPE_GROUP && $menu.private_flag == _OFF && $menu.thread_num == 0 && !isset($action.menus.$next_thread_num.$now_page_id|smarty:nodefaults)))}> + <{assign var="display_flag" value=$action.main_active_node_arr.$now_page_id}> + <{*アクティブかどうか*}> + +<{********** スタイルシートの設定部分は削除 by topic_path **********}> + +<{******************** 削除 by topic_path +* <{if $action.main_page_id == $menu.page_id}> +* <{assign var="class_name" value="nowrap highlight _menu_active"}> +* <{else}> +* <{assign var="class_name" value="nowrap"}> +* <{/if}> +********************}> + <{* スペースタイプでクラス変更 *}> +<{******************** 削除 by topic_path +* <{if $menu.space_type == _SPACE_TYPE_PUBLIC}> +* <{assign var="top_class_name" value="menu_top_public"}> +* <{assign var="space_type_class_name" value="menu_public"}> +* <{elseif $menu.space_type == _SPACE_TYPE_GROUP}> +* <{assign var="top_class_name" value="menu_top_group"}> +* <{assign var="space_type_class_name" value="menu_group"}> +* <{/if}> +********************}> + <{*プライベートかいなか*}> +<{******************** 削除 by topic_path +* <{if $menu.private_flag}> +* <{assign var="top_class_name" value="menu_top_private"}> +* <{assign var="space_type_class_name" value="menu_private"}> +* <{/if}> +********************}> + <{*マージン*}> +<{******************** 削除 by topic_path +* <{if $thread_num == 0}> +* <{assign var="now_margin" value=$thread_num*$conf.menu_top_left_margin}> +* <{else}> +* <{assign var="now_margin" value=$thread_num*$conf.menu_left_margin}> +* <{/if}> +********************}> + + <{*ノードで下にページ(ノード)がない場合、表示しない*}> + <{*if $menu.page_name != "" && ($menu.action_name!="" || $action.menus.$next_thread_num.$now_page_id)*}> + <{if $menu.page_name != "" && $menu.visibility_flag == _ON && !($menu.page_id == $menu.room_id && $menu.display_flag == _OFF && $menu.authority_id < _AUTH_CHIEF)}> + + <{********** + 追加 :以下の2つの条件を満たしていれば、表示対象とする。 by topic_path + 条件 1:テンプレート内のdisplay_flag が_ON の場合、カレントページの上位階層である + 条件 2:$action.main_page_id == $menu.page_id でカレントページが判定できる + **********}> + <{if $display_flag == _ON || $action.main_page_id == $menu.page_id}> + + <{if $menu.thread_num == 0 && $menu.space_type == 2 && $menu.private_flag == 0}> + <{* "グループスペース"なので、表示しない *}> + <{else}> + + <{********** ここは元のまま by topic_path **********}> + <{if $menu.node_flag == 1 && $menu.action_name==""}> + <{assign var="onclick" value=" onclick=\"menuCls['`$id`'].menuNodeClick(event,'`$menu.page_id`');return false;\""}> + <{else}> + <{assign var="onclick" value=""}> + <{/if}> + + <{********** 追加:カレントページなら、リンクしない by topic_path **********}> + <{if $action.main_page_id == $menu.page_id}> + > <{$menu.page_name}>  + <{else}> + >  + + <{********** 変更:元のリンクをコメント by topic_path **********}> + <{* "<{$onclick|smarty:nodefaults}> style="margin-left:<{$now_margin}>px;"> *}> + + <{********** 変更:CSS を取り、シンプルなリンクに変更 by topic_path **********}> + "<{$onclick|smarty:nodefaults}>> + + <{* アイコン *}> +<{********** アイコンをコメント by topic_path +* <{if $menu.node_flag == _ON}> +* <{else}><{"down_arrow.gif"|get_themes_image}><{/if}>" alt="" /> +* <{else}> +* " alt="" /> +* <{/if}> +**********}> + <{$menu.page_name}> + <{* 準備中 *}> + <{if $menu.page_id == $menu.room_id && $menu.display_flag == _OFF}><{$lang.menu_prepared|smarty:nodefaults}><{/if}> + + +<{********** 追加した判定の閉じタグ:ここから by topic_path **********}> + <{/if}> + <{/if}> + <{/if}> +<{********** 追加した判定の閉じタグ:ここまで by topic_path **********}> + + <{/if}> + <{/if}> + <{if $action.menus.$next_thread_num.$now_page_id && !($menu.page_id == $menu.room_id && $menu.display_flag == _OFF && $menu.authority_id < _AUTH_CHIEF)}> + + <{********** div のコメントアウト topic_path_menu_page +
+ **********}> + + <{assign var="menus" value=$action.menus.$next_thread_num.$now_page_id}> + <{include file="menu_view_main_list.html"}> + + <{********** div のコメントアウト topic_path_menu_page +
+ **********}> + + <{/if}> +<{/foreach}> +<{/strip}> \ No newline at end of file diff --git a/html/webapp/modules/mobile/install.ini b/html/webapp/modules/mobile/install.ini old mode 100644 new mode 100755 index affc2c7..9fbc0d4 --- a/html/webapp/modules/mobile/install.ini +++ b/html/webapp/modules/mobile/install.ini @@ -1,4 +1,4 @@ -version = "2.4.0.0" +version = "2.4.0.1" action_name = "mobile_view_admin_init" system_flag = 1 module_icon = "mobile.gif" diff --git a/html/webapp/modules/mobile/templates/default/mobile_view_admin_menu_detail.html b/html/webapp/modules/mobile/templates/default/mobile_view_admin_menu_detail.html old mode 100644 new mode 100755 index 9a9c9bc..0fdfcbf --- a/html/webapp/modules/mobile/templates/default/mobile_view_admin_menu_detail.html +++ b/html/webapp/modules/mobile/templates/default/mobile_view_admin_menu_detail.html @@ -6,5 +6,7 @@ <{assign var="alert_mess_disabled_menu" value=$lang.mobile_error_message_2|smarty:nodefaults|escape:"javascript"|escape:"html"}> <{assign var="alert_mess_disabled_node" value=$lang.mobile_error_message_3|smarty:nodefaults|escape:"javascript"|escape:"html"}> <{assign var="visibility_flag" value=$action.space_visibility_flag}> -<{include file="mobile_view_admin_menu_list.html"}> +<{if $menus}> + <{include file="mobile_view_admin_menu_list.html"}> +<{/if}> <{/strip}> diff --git a/html/webapp/modules/module/components/Compmain.class.php b/html/webapp/modules/module/components/Compmain.class.php old mode 100644 new mode 100755 index e8f71e4..026bbb8 --- a/html/webapp/modules/module/components/Compmain.class.php +++ b/html/webapp/modules/module/components/Compmain.class.php @@ -45,6 +45,9 @@ function Module_Components_Compmain() { * @access public */ function clearCacheByDirname($dirname) { + $currentErrorReporting = error_reporting(); + error_reporting($currentErrorReporting & ~E_WARNING); + // ---------------------------------------------- // --- キャッシュクリア --- // ---------------------------------------------- @@ -76,10 +79,13 @@ function clearCacheByDirname($dirname) { //キャッシュクリア $renderer->clear_cache(); $cache->setClearCache($clear_cache); //元に戻す - + + error_reporting($currentErrorReporting); return true; } } + + error_reporting($currentErrorReporting); return false; } diff --git a/html/webapp/modules/module/install.ini b/html/webapp/modules/module/install.ini old mode 100644 new mode 100755 index 645a691..3ef3931 --- a/html/webapp/modules/module/install.ini +++ b/html/webapp/modules/module/install.ini @@ -1,4 +1,4 @@ -version = "2.4.0.1" +version = "2.4.0.2" action_name = "module_view_admin_init" system_flag=1 ;disposition_flag=1 diff --git a/html/webapp/modules/module/update/Update.class.php b/html/webapp/modules/module/update/Update.class.php old mode 100644 new mode 100755 index 6fc5538..8840f90 --- a/html/webapp/modules/module/update/Update.class.php +++ b/html/webapp/modules/module/update/Update.class.php @@ -166,9 +166,14 @@ function execute() //lang_dirname項目の更新 // $config_lang =& $this->configView->getConfigByConfname(_SYS_CONF_MODID, 'language'); - $defualt_lang = empty($config_lang['conf_value'])?'japanese':$config_lang['conf_value']; - $result = $this->db->execute("UPDATE {pages} SET {pages}.lang_dirname='".$defualt_lang. - "' WHERE {pages}.space_type="._SPACE_TYPE_PUBLIC." AND {pages}.display_position="._DISPLAY_POSITION_CENTER." AND {pages}.thread_num!=0"); + $default_lang = empty($config_lang['conf_value']) ? 'japanese' : $config_lang['conf_value']; + $params = array('lang_dirname' => $default_lang); + $where_params = array( + 'space_type' => _SPACE_TYPE_PUBLIC, + 'display_position' => _DISPLAY_POSITION_CENTER, + 'thread_num!' => 0, + ); + $result = $this->db->updateExecute('pages', $params, $where_params); if($result === false) return false; } @@ -493,11 +498,23 @@ function execute() } } - // WYSIWYGの許可するVideoURLに「http://www.youtube-nocookie.com/」を追加 - $textarea_video_url = $this->db->selectExecute("textarea_video_url", array("url"=> 'http://www.youtube-nocookie.com/')); + // WYSIWYGの許可するVideoURLに「//www.youtube.com/」を追加 + $textarea_video_url = $this->db->selectExecute("textarea_video_url", array("url"=> '//www.youtube.com/')); if($textarea_video_url !== false && count($textarea_video_url) == 0) { $sql = "INSERT INTO `".$this->db->getPrefix()."textarea_video_url` (`url`, `action_name`, `insert_time`, `insert_site_id`, `insert_user_id`, `insert_user_name`, `update_time`, `update_site_id`, `update_user_id`, `update_user_name`) VALUES - ('http://www.youtube-nocookie.com/', '', '', '', '0', '', '', '', '0', '')"; + ('//www.youtube.com/', '', '', '', '0', '', '', '', '0', '')"; + $result = $this->db->execute($sql); + if ($result === false) { + return false; + } + } + + // WYSIWYGの許可するVideoURLに「https://www.youtube.com/」「https://www.youtube-nocookie.com/」を追加 + $textarea_video_url = $this->db->selectExecute("textarea_video_url", array("url"=> 'https://www.youtube.com/')); + if($textarea_video_url !== false && count($textarea_video_url) == 0) { + $sql = "INSERT INTO `".$this->db->getPrefix()."textarea_video_url` (`url`, `action_name`, `insert_time`, `insert_site_id`, `insert_user_id`, `insert_user_name`, `update_time`, `update_site_id`, `update_user_id`, `update_user_name`) VALUES + ('https://www.youtube.com/', '', '', '', '0', '', '', '', '0', ''), + ('https://www.youtube-nocookie.com/', '', '', '', '0', '', '', '', '0', '')"; $result = $this->db->execute($sql); if ($result === false) { return false; diff --git a/html/webapp/modules/module/view/admin/init/Init.class.php b/html/webapp/modules/module/view/admin/init/Init.class.php index 81ffa04..c6b10e0 100644 --- a/html/webapp/modules/module/view/admin/init/Init.class.php +++ b/html/webapp/modules/module/view/admin/init/Init.class.php @@ -19,7 +19,7 @@ class Module_View_Admin_Init extends Action // 値をセットするため var $sysmodules_obj = null; var $modules_obj = null; - var $installs_obj = null; + var $installs_obj = array(); var $maxNum = 0; var $sysMaxNum = 0; diff --git a/html/webapp/modules/multidatabase/action/main/addcontent/Addcontent.class.php b/html/webapp/modules/multidatabase/action/main/addcontent/Addcontent.class.php old mode 100644 new mode 100755 index ada91f5..348bf24 --- a/html/webapp/modules/multidatabase/action/main/addcontent/Addcontent.class.php +++ b/html/webapp/modules/multidatabase/action/main/addcontent/Addcontent.class.php @@ -213,7 +213,7 @@ function execute() if ($result === false) { return 'error'; } - }else { + } elseif (is_array($datas[$metadata_id])) { $params = array( "upload_id" => $datas[$metadata_id]['upload_id'], "file_name" => $datas[$metadata_id]['file_name'], diff --git a/html/webapp/modules/multidatabase/action/main/delcomment/Delcomment.class.php b/html/webapp/modules/multidatabase/action/main/delcomment/Delcomment.class.php index 95ac94f..5e4bac2 100644 --- a/html/webapp/modules/multidatabase/action/main/delcomment/Delcomment.class.php +++ b/html/webapp/modules/multidatabase/action/main/delcomment/Delcomment.class.php @@ -21,6 +21,7 @@ class Multidatabase_Action_Main_Delcomment extends Action // 使用コンポーネントを受け取るため var $db = null; var $whatsnewAction = null; + var $mdbAction = null; // バリデートによりセットするため @@ -45,8 +46,28 @@ function execute() if($count == 0) { $result = $this->whatsnewAction->delete($this->content_id, _ON); } else { + $params = array(); + $whereParams = array('content_id' => $this->content_id); + $sql = "SELECT M.multidatabase_id, M.title_metadata_id " + . "FROM {multidatabase_content} MC " + . "INNER JOIN {multidatabase} M " + . "ON MC.multidatabase_id = M.multidatabase_id" + . $this->db->getWhereSQL($params, $whereParams); + $multidatabase = $this->db->execute($sql, $params); + if (empty($multidatabase)) { + return 'error'; + } + + $whatsnewTitle = $this->mdbAction->getWhatsnewTitle($this->content_id, $multidatabase[0]['title_metadata_id']); + if ($whatsnewTitle === false) { + return 'error'; + } $whatsnew = array( "unique_id" => $this->content_id, + "title" => $whatsnewTitle["title"], + "description" => $whatsnewTitle["description"], + "action_name" => "multidatabase_view_main_detail", + "parameters" => "content_id=". $this->content_id . "&multidatabase_id=" . $multidatabase[0]["multidatabase_id"], "count_num" => $count, "child_flag" => _ON ); diff --git a/html/webapp/modules/multidatabase/action/main/delcomment/maple.ini b/html/webapp/modules/multidatabase/action/main/delcomment/maple.ini index 52b4ddb..442d754 100644 --- a/html/webapp/modules/multidatabase/action/main/delcomment/maple.ini +++ b/html/webapp/modules/multidatabase/action/main/delcomment/maple.ini @@ -10,6 +10,7 @@ comment_id.multidatabase.commentExists="1:lang._invalid_input" [Action] whatsnewAction = "ref:whatsnewAction" +mdbAction = "ref:mdbAction" [View] success = "action:multidatabase_view_main_detail" diff --git a/html/webapp/modules/multidatabase/components/View.class.php b/html/webapp/modules/multidatabase/components/View.class.php old mode 100644 new mode 100755 index 197ac45..382644a --- a/html/webapp/modules/multidatabase/components/View.class.php +++ b/html/webapp/modules/multidatabase/components/View.class.php @@ -351,7 +351,7 @@ function &getMdbs() { $sql = "SELECT multidatabase_id, multidatabase_name, active_flag, insert_time, insert_user_id, insert_user_name ". "FROM {multidatabase} ". "WHERE room_id = ? ". - $this->_db->getOrderSQL($orderParams); + $this->_db->getOrderSQL($orderParams, array('multidatabase_id', 'multidatabase_name', 'insert_user_name', 'insert_time')); $result = $this->_db->execute($sql, $params, $limit, $offset); if ($result === false) { $this->_db->addError(); @@ -1360,7 +1360,7 @@ function &_getSqlContentWhereStatement($multidatabaseId, $whereValues, $keywordB */ function &_getAbbreviateUrlJoinStatement() { $request =& $this->_container->getComponent('Request'); - $moduleId = $request->getParameter('module_id'); + $moduleId = (int)$request->getParameter('module_id'); $joinStatement = 'LEFT JOIN {abbreviate_url} URL ' . "ON URL.module_id = '" . $moduleId . "' " diff --git a/html/webapp/modules/multidatabase/install.ini b/html/webapp/modules/multidatabase/install.ini old mode 100644 new mode 100755 index 5ce72ac..7916fcf --- a/html/webapp/modules/multidatabase/install.ini +++ b/html/webapp/modules/multidatabase/install.ini @@ -1,4 +1,4 @@ -version = "2.4.0.1" +version = "2.4.0.2" action_name="multidatabase_view_main_init" edit_action_name="multidatabase_view_edit_list" block_add_action="multidatabase_view_edit_create" diff --git a/html/webapp/modules/multidatabase/templates/default/multidatabase_mobile_metadata_detail_feature.html b/html/webapp/modules/multidatabase/templates/default/multidatabase_mobile_metadata_detail_feature.html index 01e3c56..b13c76f 100644 --- a/html/webapp/modules/multidatabase/templates/default/multidatabase_mobile_metadata_detail_feature.html +++ b/html/webapp/modules/multidatabase/templates/default/multidatabase_mobile_metadata_detail_feature.html @@ -8,7 +8,7 @@ <{/if}> -<{if $metadata.type == $smarty.const.MULTIDATABASE_META_TYPE_TEXT || $metadata.type == MULTIDATABASE_META_TYPE_MAIL || $metadata.type == MULTIDATABASE_META_TYPE_MAIL}> +<{if $metadata.type == $smarty.const.MULTIDATABASE_META_TYPE_TEXT || $metadata.type == MULTIDATABASE_META_TYPE_MAIL}> <{* テキスト *}>
diff --git a/html/webapp/modules/multidatabase/validator/Validator_MetadataInput.class.php b/html/webapp/modules/multidatabase/validator/Validator_MetadataInput.class.php old mode 100644 new mode 100755 index aaab5fd..1c29538 --- a/html/webapp/modules/multidatabase/validator/Validator_MetadataInput.class.php +++ b/html/webapp/modules/multidatabase/validator/Validator_MetadataInput.class.php @@ -94,6 +94,8 @@ function validate($attributes, $errStr, $params) $metadata_id = $metadata['metadata_id']; $input_datas[$metadata_id] = ""; + + // ファイル・画像項目のアップロード情報 または エラー情報をセット if(isset($datas[$metadata_id])) { $input_datas[$metadata_id] = $datas[$metadata_id]; } @@ -154,9 +156,11 @@ function validate($attributes, $errStr, $params) if($pathinfo === false) { $errors['mdb_metadatas_'. $metadata_id] = _FILE_UPLOAD_ERR_IMAGETYPE; } - $size = $mdbView->getImageBlockSize($datas[$metadata_id]['physical_file_name']); - $input_datas[$metadata_id]['block_img_width'] = $size[0]; - $input_datas[$metadata_id]['block_img_height'] = $size[1]; + if (!isset($errors['mdb_metadatas_'. $metadata_id])) { + $size = $mdbView->getImageBlockSize($datas[$metadata_id]['physical_file_name']); + $input_datas[$metadata_id]['block_img_width'] = $size[0]; + $input_datas[$metadata_id]['block_img_height'] = $size[1]; + } } if($metadata['type'] == MULTIDATABASE_META_TYPE_FILE ) { @@ -205,9 +209,11 @@ function validate($attributes, $errStr, $params) $errors['mdb_metadatas_'. $metadata_id] = $metadata['name'].$datas[$metadata_id]['error_mes']; continue; - }else { - $input_datas[$metadata_id] = $session->getParameter(array("multidatabase_content", $attributes['block_id'], $metadata_id)); - if($metadata['type'] == MULTIDATABASE_META_TYPE_FILE && !empty($input_datas[$metadata_id])) { + } else { + if (!is_array($input_datas[$metadata_id]) || !isset($input_datas[$metadata_id]['upload_id'])) { + $input_datas[$metadata_id] = ''; + } + if($metadata['type'] === MULTIDATABASE_META_TYPE_FILE) { $this->_CheckDownloadPassword($metadata_id, $attributes, $objectName, $errorMsg, $errors); } } diff --git a/html/webapp/modules/multidatabase/validator/Validator_UploadCsv.class.php b/html/webapp/modules/multidatabase/validator/Validator_UploadCsv.class.php index f1c42ce..d42a174 100644 --- a/html/webapp/modules/multidatabase/validator/Validator_UploadCsv.class.php +++ b/html/webapp/modules/multidatabase/validator/Validator_UploadCsv.class.php @@ -64,7 +64,7 @@ function validate($attributes, $errStr, $params) while (($data = $mdbAction->fgetcsv_reg($handle)) !== FALSE) { $num = count($data); for ($c=0; $c < $num; $c++) { - $data[$c] = mb_convert_encoding($data[$c], "UTF-8", "SJIS"); + $data[$c] = mb_convert_encoding($data[$c], "UTF-8", _CLIENT_OS_CHARSET); } $row_data[] = $data; } diff --git a/html/webapp/modules/multidatabase/view/main/init/Init.class.php b/html/webapp/modules/multidatabase/view/main/init/Init.class.php index 17338e3..0fd92c0 100644 --- a/html/webapp/modules/multidatabase/view/main/init/Init.class.php +++ b/html/webapp/modules/multidatabase/view/main/init/Init.class.php @@ -104,6 +104,9 @@ function execute() $where_params = array(); if(!empty($this->sort_section)) { foreach($this->sort_section as $key => $val) { + if (!isset($this->section_metadatas[$key])) { + return 'error'; + } $where_params["m_content".$key.".content"] = $val; } } diff --git a/html/webapp/modules/multidatabase/view/main/search/result/Result.class.php b/html/webapp/modules/multidatabase/view/main/search/result/Result.class.php index 60d4a3e..23bee1f 100644 --- a/html/webapp/modules/multidatabase/view/main/search/result/Result.class.php +++ b/html/webapp/modules/multidatabase/view/main/search/result/Result.class.php @@ -163,7 +163,8 @@ function execute() $handles = explode(" ", trim(preg_replace("/[ \s]+/u", " ", $this->handle))); if(is_array($handles)) { foreach (array_keys($handles) as $i) { - $handlesql[] = " {multidatabase_content}.insert_user_name LIKE '%".$handles[$i]."%' "; + $handlesql[] = " {multidatabase_content}.insert_user_name LIKE ? "; + $keywordBindValues[] = '%' . $handles[$i] . '%'; } } $sqlwhere .= " AND (".join(" OR ", $handlesql).")"; @@ -171,7 +172,7 @@ function execute() if($this->status != "") { if($this->status != MULTIDATABASE_STATUS_ALL) { - $sqlwhere .= " AND {multidatabase_content}.agree_flag=".$this->status." "; + $sqlwhere .= " AND {multidatabase_content}.agree_flag=".intval($this->status)." "; } } @@ -182,16 +183,14 @@ function execute() $where_params = array(); if(!empty($this->sort_section)) { foreach($this->sort_section as $key => $val) { + if (!isset($this->section_metadatas[$key])) { + return 'error'; + } $where_params["m_content".$key.".content"]= $val; } } - if(empty($this->sort_metadata) || $this->sort_metadata == MULTIDATABASE_DEFAULT_SEQUENCE_SORT) { - $order_params = array( - "{multidatabase_content}.display_sequence" => "ASC", - "{multidatabase_content}.insert_time" => "DESC" - ); - }else if($this->sort_metadata == MULTIDATABASE_DEFAULT_DATE_SORT) { + if($this->sort_metadata == MULTIDATABASE_DEFAULT_DATE_SORT) { $order_params = array( "{multidatabase_content}.insert_time" => "DESC" ); @@ -217,11 +216,16 @@ function execute() $order_params = array( "{multidatabase_content}.update_time" => "ASC" ); - }else { + }elseif (isset($this->sort_metadatas[$this->sort_metadata])) { $order_params = array( "m_content".$this->sort_metadata.".content" => "ASC", "{multidatabase_content}.insert_time" => "DESC" ); + }else { + $order_params = array( + "{multidatabase_content}.display_sequence" => "ASC", + "{multidatabase_content}.insert_time" => "DESC" + ); } $this->result_count = $this->mdbView->getMDBListCount($this->multidatabase_id, diff --git a/html/webapp/modules/pages/components/Compmain.class.php b/html/webapp/modules/pages/components/Compmain.class.php old mode 100644 new mode 100755 index baf3bde..6773625 --- a/html/webapp/modules/pages/components/Compmain.class.php +++ b/html/webapp/modules/pages/components/Compmain.class.php @@ -127,7 +127,7 @@ function setPageFetch(&$blocks_obj,&$pages_obj,&$html, $template_dir, $display_p $this->_renderer->assign('url',$block['full_path']); $this->_renderer->assign('encode_url',rawurlencode($block['full_path'])); $this->_renderer->assign('id',"_".$block['block_id']); - $this->_renderer->assign('module_obj',""); + $this->_renderer->assign('module_obj', array()); $this->_renderer->assign('headermenu',""); //最小広さ設定 diff --git a/html/webapp/modules/photoalbum/components/View.class.php b/html/webapp/modules/photoalbum/components/View.class.php index 065b012..8dfd431 100644 --- a/html/webapp/modules/photoalbum/components/View.class.php +++ b/html/webapp/modules/photoalbum/components/View.class.php @@ -174,7 +174,7 @@ function &getPhotoalbums() $sql = "SELECT photoalbum_id, photoalbum_name, insert_time, insert_user_id, insert_user_name ". "FROM {photoalbum} ". "WHERE room_id = ? ". - $this->_db->getOrderSQL($orderParams); + $this->_db->getOrderSQL($orderParams, array('photoalbum_id', 'photoalbum_name', 'insert_user_name', 'insert_time')); $photoalbums = $this->_db->execute($sql, $params, $limit, $offset); if ($photoalbums === false) { $this->_db->addError(); diff --git a/html/webapp/modules/photoalbum/files/js/default/photoalbum.js b/html/webapp/modules/photoalbum/files/js/default/photoalbum.js index 7106dbc..a40d1e0 100644 --- a/html/webapp/modules/photoalbum/files/js/default/photoalbum.js +++ b/html/webapp/modules/photoalbum/files/js/default/photoalbum.js @@ -283,7 +283,7 @@ clsPhotoalbum.prototype = { } photo.style.filter = slideType; - photo.filters[0].Apply(); + if (browser.version < 10) photo.filters[0].Apply(); } photo.src = this.photos[index]["src"].replace("&","&"); @@ -302,7 +302,7 @@ clsPhotoalbum.prototype = { } } if (browser.isIE) { - photo.filters[0].Play(); + if (browser.version < 10) photo.filters[0].Play(); } var oldPhotoIndex = this.currentPhotoIndex; diff --git a/html/webapp/modules/photoalbum/install.ini b/html/webapp/modules/photoalbum/install.ini old mode 100644 new mode 100755 index 490c407..0df141c --- a/html/webapp/modules/photoalbum/install.ini +++ b/html/webapp/modules/photoalbum/install.ini @@ -1,4 +1,4 @@ -version = "2.4.0.1" +version = "2.4.2.1" action_name = "photoalbum_view_main_init" edit_action_name = "photoalbum_view_edit_list" block_add_action = "photoalbum_view_edit_entry" diff --git a/html/webapp/modules/pm/components/Action.class.php b/html/webapp/modules/pm/components/Action.class.php old mode 100644 new mode 100755 index acb3289..eac672b --- a/html/webapp/modules/pm/components/Action.class.php +++ b/html/webapp/modules/pm/components/Action.class.php @@ -880,9 +880,14 @@ function setFilter() $filter_id, $user_id, ); + $actionIdArr = array(); + foreach ($actions as $actionId) { + $actionIdArr[] = (int)$actionId; + } + $sql = "DELETE FROM {pm_filter_action_link} ". "WHERE filter_id = ? AND insert_user_id = ? AND ". - "action_id NOT IN (" . join(",", $actions) . ")"; + "action_id NOT IN (" . join(",", $actionIdArr) . ")"; if (!$this->_db->execute($sql, $params)) { return false; diff --git a/html/webapp/modules/pm/components/View.class.php b/html/webapp/modules/pm/components/View.class.php old mode 100644 new mode 100755 index 0968380..d8ec749 --- a/html/webapp/modules/pm/components/View.class.php +++ b/html/webapp/modules/pm/components/View.class.php @@ -102,10 +102,10 @@ function &generateMessagesQuery($action = 'common', $count = false){ $sortColumn = $this->_request->getParameter("sort_col"); $sortDirection = $this->_request->getParameter("sort_dir"); - if (empty($sortColumn)) { + if (!in_array($sortColumn, array('r.insert_user_name', 'm.receivers_list', 'm.subject', 'm.sent_time'))) { $sortColumn = "m.sent_time"; } - if (empty($sortDirection)) { + if ((empty($sortDirection) || ($sortDirection != 'ASC' && $sortDirection != 'asc'))) { $sortDirection = "DESC"; } $orderParams[$sortColumn] = $sortDirection; @@ -819,7 +819,7 @@ function &_getFilterSql($filter) if (sizeof($tagFilter) == 2) { if ($tagFilter[0] == PM_FILTER_TAG) { $tag_id = $tagFilter[1]; - $filterSql = " AND receiver_id IN (SELECT receiver_id FROM {pm_message_tag_link} WHERE tag_id = " . $tag_id . ")"; + $filterSql = " AND receiver_id IN (SELECT receiver_id FROM {pm_message_tag_link} WHERE tag_id = " . (int)$tag_id . ")"; } } } diff --git a/html/webapp/modules/pm/files/images/default/Thumbs.db b/html/webapp/modules/pm/files/images/default/Thumbs.db deleted file mode 100644 index 73ab261..0000000 Binary files a/html/webapp/modules/pm/files/images/default/Thumbs.db and /dev/null differ diff --git a/html/webapp/modules/pm/install.ini b/html/webapp/modules/pm/install.ini old mode 100644 new mode 100755 index 77b0246..8b90f23 --- a/html/webapp/modules/pm/install.ini +++ b/html/webapp/modules/pm/install.ini @@ -1,4 +1,4 @@ -version = "2.4.0.1" +version = "2.4.2.1" action_name="pm_view_main_init" delete_action = "pm_action_admin_operation" module_update_action="pm_update" diff --git a/html/webapp/modules/pm/language/chinese/main.ini b/html/webapp/modules/pm/language/chinese/main.ini index 227b6bc..26525bf 100644 --- a/html/webapp/modules/pm/language/chinese/main.ini +++ b/html/webapp/modules/pm/language/chinese/main.ini @@ -168,10 +168,6 @@ pm_body = PM_MESSAGE_BODY pm_message_address_no_exist = "这个收件人地址不存在。" pm_message_required = "必须输入" define:PM_MAIL_SUBJECT = "[{X-SITE_NAME}]短消息的通知" -; define:PM_MAIL_BODY = "Researchmapの上で、あなたへのプライベートメッセージが届きました。\n\n件名:{X-TITLE}\n差出人:{X-USER}\n差出日時;; -; :{X-INPUT_TIME}\n\n{X-BODY}\n\nこのプライベートメッセージを確認するには、下記アドレスへ\n{X-URL}" -;define:PM_MAIL_BODY = "あなたへのプライベートメッセージが届きましたので、お知らせします。\n\n件名:{X-TITLE}\n差出人:{X-USER}\n差出日時 -;:{X-INPUT_TIME}\n\n{X-BODY}\n\nこのプライベートメッセージを見るには、下記アドレスへ\n{X-URL}" define:PM_MAIL_BODY = "您有新的短消息。\n\n主题:{X-TITLE}\n发件人:{X-USER}\n发送日期:{X-INPUT_TIME}\n\n{X-BODY}\n\n浏览详细信息,请点击下面的链接\n{X-URL}" define:PM_SUBJECT_FORMAT = "Fw%s: %s" diff --git a/html/webapp/modules/pm/language/english/main.ini b/html/webapp/modules/pm/language/english/main.ini index f946e38..4d72ffc 100644 --- a/html/webapp/modules/pm/language/english/main.ini +++ b/html/webapp/modules/pm/language/english/main.ini @@ -168,10 +168,6 @@ pm_body = PM_MESSAGE_BODY pm_message_address_no_exist = "This address does not exist." pm_message_required = "is required" define:PM_MAIL_SUBJECT = "[{X-SITE_NAME}]Private message notifications" -; define:PM_MAIL_BODY = "Researchmapの上で、あなたへのプライベートメッセージが届きました。\n\n件名:{X-TITLE}\n差出人:{X-USER}\n差出日時;; -; :{X-INPUT_TIME}\n\n{X-BODY}\n\nこのプライベートメッセージを確認するには、下記アドレスへ\n{X-URL}" -;define:PM_MAIL_BODY = "あなたへのプライベートメッセージが届きましたので、お知らせします。\n\n件名:{X-TITLE}\n差出人:{X-USER}\n差出日時 -;:{X-INPUT_TIME}\n\n{X-BODY}\n\nこのプライベートメッセージを見るには、下記アドレスへ\n{X-URL}" define:PM_MAIL_BODY = "You have a new private message\n\n:Subject{X-TITLE}\nFrom:{X-USER}\nDate:{X-INPUT_TIME}\n\n{X-BODY}\n\nTo verify this private message, please click the following url\n{X-URL}" define:PM_SUBJECT_FORMAT = "Fw%s: %s" diff --git a/html/webapp/modules/pm/language/japanese/main.ini b/html/webapp/modules/pm/language/japanese/main.ini index 04a4edf..f574507 100644 --- a/html/webapp/modules/pm/language/japanese/main.ini +++ b/html/webapp/modules/pm/language/japanese/main.ini @@ -168,10 +168,6 @@ pm_body = PM_MESSAGE_BODY pm_message_address_no_exist = "この宛先は存在しません。" pm_message_required = "を入力してください" define:PM_MAIL_SUBJECT = "[{X-SITE_NAME}]プライベートメッセージの通知" -; define:PM_MAIL_BODY = "Researchmapの上で、あなたへのプライベートメッセージが届きました。\n\n件名:{X-TITLE}\n差出人:{X-USER}\n差出日時;; -; :{X-INPUT_TIME}\n\n{X-BODY}\n\nこのプライベートメッセージを確認するには、下記アドレスへ\n{X-URL}" -;define:PM_MAIL_BODY = "あなたへのプライベートメッセージが届きましたので、お知らせします。\n\n件名:{X-TITLE}\n差出人:{X-USER}\n差出日時 -;:{X-INPUT_TIME}\n\n{X-BODY}\n\nこのプライベートメッセージを見るには、下記アドレスへ\n{X-URL}" define:PM_MAIL_BODY = "あなたへのプライベートメッセージが届きましたので、お知らせします。\n\n件名:{X-TITLE}\n差出人:{X-USER}\n差出日時:{X-INPUT_TIME}\n\n{X-BODY}\n\nこのプライベートメッセージを確認するには、下記アドレスへ\n{X-URL}" define:PM_SUBJECT_FORMAT = "Fw%s: %s" diff --git a/html/webapp/modules/pm/validator/Validator_FilterActionRequired.class.php b/html/webapp/modules/pm/validator/Validator_FilterActionRequired.class.php old mode 100644 new mode 100755 index 208fa99..32f19a0 --- a/html/webapp/modules/pm/validator/Validator_FilterActionRequired.class.php +++ b/html/webapp/modules/pm/validator/Validator_FilterActionRequired.class.php @@ -14,25 +14,26 @@ */ class Pm_Validator_FilterActionRequired extends Validator { - /** - * フィルタ処理内容必須チェックバリデータ - * - * @param mixed $attributes チェックする値 - * @param string $errStr エラー文字列 - * @param array $params オプション引数 - * @return string エラー文字列(エラーの場合) - * @access public - */ - function validate($attributes, $errStr, $params) - { - - $filter_actions = $attributes["0"]; - - if ($filter_actions == null) { + /** + * フィルタ処理内容必須チェックバリデータ + * + * @param mixed $attributes チェックする値 + * @param string $errStr エラー文字列 + * @param array $params オプション引数 + * @return string エラー文字列(エラーの場合) + * @access public + */ + function validate($attributes, $errStr, $params) + { + if (empty($attributes)) { return $errStr; } - - return; - } + foreach ($attributes as $filterActionId) { + if (!is_numeric($filterActionId)) { + return _INVALID_INPUT; + } + } + return; + } } ?> \ No newline at end of file diff --git a/html/webapp/modules/questionnaire/action/edit/questionnaire/entry/maple.ini b/html/webapp/modules/questionnaire/action/edit/questionnaire/entry/maple.ini index 566e4cf..4b3793d 100644 --- a/html/webapp/modules/questionnaire/action/edit/questionnaire/entry/maple.ini +++ b/html/webapp/modules/questionnaire/action/edit/questionnaire/entry/maple.ini @@ -8,6 +8,8 @@ questionnaire_name.required = "1:lang._required,lang.questionnaire_questionnaire questionnaire_name.maxlength = "1,_VALIDATOR_TITLE_LEN:lang._maxlength_error,lang.questionnaire_questionnaire_name,_VALIDATOR_TITLE_LEN" period.date:period = "1:lang._invalid_date,lang.questionnaire_period_text" key:period_checkbox,period.questionnaire.period:period = "1:lang.questionnaire_period_invalid" +keypass_phrase.maxlength = "1,_VALIDATOR_TITLE_LEN:lang._maxlength_error,lang.questionnaire_keypass,_VALIDATOR_TITLE_LEN" +key:keypass_use_flag,keypass_phrase.questionnaire.Keypass = "1:lang.questionnaire_keypass_invalid" [View] create = "action:questionnaire_view_edit_question_list" diff --git a/html/webapp/modules/questionnaire/action/main/answer/maple.ini b/html/webapp/modules/questionnaire/action/main/answer/maple.ini index 4fde564..3091e2e 100644 --- a/html/webapp/modules/questionnaire/action/main/answer/maple.ini +++ b/html/webapp/modules/questionnaire/action/main/answer/maple.ini @@ -8,6 +8,7 @@ image_authentication,id.imageauth:g="1:lang._invalid_image_auth_input" key:questionnaire.questionnaire.answer:g = "1:lang._invalid_input" key:block_id,questionnaire,question_id,answer_value,choice_id.questionnaire.answerRequired:g = "1:lang.questionnaire_answer_required" key:block_id,questionnaire.questionnaire.summaryExists:g = "1:lang._invalid_input" +key:questionnaire,keypass_phrase,block_id.questionnaire.keypassCheck:g = "1:lang.questionnaire_keypass_invalid_input" [View] define:theme = 1 diff --git a/html/webapp/modules/questionnaire/action/main/confirm/maple.ini b/html/webapp/modules/questionnaire/action/main/confirm/maple.ini index fac00a8..a07068b 100644 --- a/html/webapp/modules/questionnaire/action/main/confirm/maple.ini +++ b/html/webapp/modules/questionnaire/action/main/confirm/maple.ini @@ -4,6 +4,7 @@ action = "questionnaire_view_main_question" [ValidateDef] key:room_id,block_id,questionnaire_id.questionnaire.questionnaireExists:g = "1:lang._invalid_input" key:block_id,questionnaire_id.questionnaire.questionnaireView:g = "1:lang._invalid_input" +key:questionnaire,keypass_phrase,block_id.questionnaire.keypassCheck:g = "1:lang.questionnaire_keypass_invalid_input" image_authentication,id.imageauth:g="1:lang._invalid_image_auth_input" key:questionnaire.questionnaire.answer:g = "1:lang._invalid_input" key:block_id,questionnaire,question_id,answer_value,choice_id.questionnaire.answerRequired:g = "1:lang.questionnaire_answer_required" diff --git a/html/webapp/modules/questionnaire/action/main/start/maple.ini b/html/webapp/modules/questionnaire/action/main/start/maple.ini index da1dafc..5084ec0 100644 --- a/html/webapp/modules/questionnaire/action/main/start/maple.ini +++ b/html/webapp/modules/questionnaire/action/main/start/maple.ini @@ -2,6 +2,7 @@ key:room_id,block_id,questionnaire_id.questionnaire.questionnaireExists:g = "1:lang._invalid_input" key:block_id,questionnaire_id.questionnaire.questionnaireView:g = "1:lang._invalid_input" image_authentication,id.imageauth:g="1:lang._invalid_image_auth_input" +key:questionnaire,keypass_phrase,block_id.questionnaire.keypassCheck:g = "1:lang.questionnaire_keypass_invalid_input" [TokenExtra] action = "questionnaire_view_main_question" diff --git a/html/webapp/modules/questionnaire/components/Action.class.php b/html/webapp/modules/questionnaire/components/Action.class.php index 2fce26a..a25e976 100644 --- a/html/webapp/modules/questionnaire/components/Action.class.php +++ b/html/webapp/modules/questionnaire/components/Action.class.php @@ -78,7 +78,10 @@ function setQuestionnaire() $params = array( "image_authentication" => intval($this->_request->getParameter("image_authentication")), + 'keypass_use_flag' => intval($this->_request->getParameter('keypass_use_flag')), + 'keypass_phrase' => $this->_request->getParameter('keypass_phrase'), "total_flag" => intval($this->_request->getParameter("total_flag")), + "answer_show_flag" => intval($this->_request->getParameter("answer_show_flag")), "mail_send" => intval($this->_request->getParameter("mail_send")), "mail_subject" => $this->_request->getParameter("mail_subject"), "mail_body" => $this->_request->getParameter("mail_body") diff --git a/html/webapp/modules/questionnaire/components/View.class.php b/html/webapp/modules/questionnaire/components/View.class.php index 9bab2b0..54eda84 100644 --- a/html/webapp/modules/questionnaire/components/View.class.php +++ b/html/webapp/modules/questionnaire/components/View.class.php @@ -176,7 +176,7 @@ function &getQuestionnaires() "WHERE Q.room_id = ? ". "GROUP BY Q.questionnaire_id, Q.questionnaire_name, Q.icon_name, Q.status, ". "Q.insert_time, Q.insert_user_id, Q.insert_user_name ". - $this->_db->getOrderSQL($orderParams); + $this->_db->getOrderSQL($orderParams, array('questionnaire_id', 'questionnaire_name', 'status', 'insert_user_name', 'insert_time')); $questionnaires = $this->_db->execute($sql, $params, $limit, $offset); if ($questionnaires === false) { $this->_db->addError(); @@ -206,8 +206,11 @@ function &getDefaultQuestionnaire() "nonmember_flag" => constant($config["nonmember_flag"]["conf_value"]), "image_authentication" => constant($config["image_authentication"]["conf_value"]), "anonymity_flag" => constant($config["anonymity_flag"]["conf_value"]), + "keypass_use_flag" => constant($config["keypass_use_flag"]["conf_value"]), + "keypass_phrase" => $config["keypass_phrase"]["conf_value"], "repeat_flag" => constant($config["repeat_flag"]["conf_value"]), - "total_flag" => constant($config["total_flag"]["conf_value"]) + "total_flag" => constant($config["total_flag"]["conf_value"]), + "answer_show_flag" => constant($config["answer_show_flag"]["conf_value"]) ); return $questionnaire; @@ -232,7 +235,8 @@ function &getQuestionnaire() $format = ""; if ($actionName == "questionnaire_view_edit_questionnaire_entry") { $sql .= ", questionnaire_type, period, ". - "nonmember_flag, image_authentication, anonymity_flag, repeat_flag, total_flag, ". + "nonmember_flag, image_authentication, anonymity_flag, keypass_use_flag, keypass_phrase, ". + "repeat_flag, total_flag, answer_show_flag, ". "answer_count, mail_send, mail_subject, mail_body "; $format = _INPUT_DATE_FORMAT; @@ -249,7 +253,7 @@ function &getQuestionnaire() } elseif ($edit) { $sql .= ", questionnaire_type, period, ". - "nonmember_flag, anonymity_flag, total_flag, ". + "nonmember_flag, anonymity_flag, total_flag, answer_show_flag, ". "answer_count "; } @@ -303,7 +307,7 @@ function &getCurrentQuestionnaire() ); $sql = "SELECT Q.questionnaire_id, Q.questionnaire_name, Q.icon_name, Q.status, Q.questionnaire_type, Q.period, ". - "Q.nonmember_flag, Q.image_authentication, Q.anonymity_flag, Q.repeat_flag, Q.total_flag, ". + "Q.nonmember_flag, Q.image_authentication, Q.anonymity_flag, Q.keypass_use_flag, Q.keypass_phrase, Q.repeat_flag, Q.total_flag, Q.answer_show_flag, ". "Q.answer_count, Q.mail_send ". "FROM {questionnaire_block} B ". "INNER JOIN {questionnaire} Q ". @@ -827,12 +831,12 @@ function &getSummaries() $offset = $this->_request->getParameter("offset"); $sortColumn = $this->_request->getParameter("sort_col"); - if (empty($sortColumn)) { + if (empty($sortColumn) || !in_array($sortColumn, array('answer_number', 'answer_time'))) { $sortColumn = "summary_id"; } $sortDirection = $this->_request->getParameter("sort_dir"); - if (empty($sortDirection)) { - $sortDirection = ($mobile_flag==_ON ? "DESC" : "ASC"); + if (empty($sortDirection) || $sortDirection != 'DESC') { + $sortDirection = "ASC"; } $orderParams[$sortColumn] = $sortDirection; diff --git a/html/webapp/modules/questionnaire/files/js/default/questionnaire.js b/html/webapp/modules/questionnaire/files/js/default/questionnaire.js index 41affc3..ac5c5b8 100644 --- a/html/webapp/modules/questionnaire/files/js/default/questionnaire.js +++ b/html/webapp/modules/questionnaire/files/js/default/questionnaire.js @@ -164,6 +164,12 @@ clsQuestionnaire.prototype = { element.disabled = false; Element.removeClassName($("questionnaire_image_authentication_label" + this.id), "disable_lbl"); } + element = $("questionnaire_keypass_use_flag" + this.id); + if (element) { + element.disabled = false; + Element.removeClassName($("questionnaire_keypass_use_flag_label" + this.id), "disable_lbl"); + this.changeKeypass(element.checked); + } } else { $("questionnaire_repeat" + this.id).disabled = false; $("questionnaire_repeat" + this.id).checked = false; @@ -176,6 +182,26 @@ clsQuestionnaire.prototype = { element.disabled = true; Element.addClassName($("questionnaire_image_authentication_label" + this.id), "disable_lbl"); } + element = $("questionnaire_keypass_use_flag" + this.id); + if (element) { + element.checked = false; + element.disabled = true; + Element.addClassName($("questionnaire_keypass_use_flag_label" + this.id), "disable_lbl"); + this.changeKeypass(element.checked); + } + } + }, + + changeKeypass: function(keypass) { + if(keypass) { + if ($("questionnaire_keypass_phrase" + this.id)) { + $("questionnaire_keypass_phrase" + this.id).disabled = false; + } + } + else { + if ($("questionnaire_keypass_phrase" + this.id)) { + $("questionnaire_keypass_phrase" + this.id).disabled = true; + } } }, diff --git a/html/webapp/modules/questionnaire/install.ini b/html/webapp/modules/questionnaire/install.ini old mode 100644 new mode 100755 index ce2452e..4d71333 --- a/html/webapp/modules/questionnaire/install.ini +++ b/html/webapp/modules/questionnaire/install.ini @@ -1,4 +1,4 @@ -version = "2.4.0.0" +version = "2.4.2.1" action_name = "questionnaire_view_main_init" edit_action_name = "questionnaire_view_edit_questionnaire_list" block_add_action = "questionnaire_view_edit_questionnaire_entry" @@ -16,8 +16,11 @@ questionnaire_type = "QUESTIONNAIRE_TYPE_LIST_VALUE" nonmember_flag = "_OFF" image_authentication = "_OFF" anonymity_flag = "_OFF" +keypass_use_flag = "_OFF" +keypass_phrase = "netcommons" repeat_flag = "_OFF" total_flag = "_ON" +answer_show_flag = "_OFF" question_type = "QUESTIONNAIRE_QUESTION_TYPE_RADIO_VALUE" require_flag = "_ON" diff --git a/html/webapp/modules/questionnaire/language/chinese/main.ini b/html/webapp/modules/questionnaire/language/chinese/main.ini index 189b387..ab7c0ad 100644 --- a/html/webapp/modules/questionnaire/language/chinese/main.ini +++ b/html/webapp/modules/questionnaire/language/chinese/main.ini @@ -43,14 +43,18 @@ questionnaire_type_random = "随机" questionnaire_period = "截止日期" questionnaire_nonmember = "允许非成员作答" questionnaire_image_authentication = "图片验证" +questionnaire_keypass = "使用关键短语" questionnaire_anonymity = "匿名回答" questionnaire_repeat = "重复回答" questionnaire_total = "公布统计结果" +questionnaire_answer_show = "不要显示答题内容" questionnaire_mail_note = "您可以使用关键字
{X-SITE_NAME},{X-ROOM},
{X-QUESTIONNAIRE_NAME}, {X-USER},
{X-TO_DATE}, {X-URL}.
每个关键字分别代表
网站名,房间名,
问卷标题,回答人,
回答日期和URL。" [Questionnaire_Action_Edit_Questionnaire_Entry] questionnaire_period_text = "截止日期" questionnaire_period_invalid = "无效输入" +questionnaire_keypass = "关键短语" +questionnaire_keypass_invalid = "进入关键短语" [Questionnaire_View_Edit_Question_List] questionnaire_question_list_text = "您可以添加和编辑要回答的问题。" @@ -103,6 +107,8 @@ questionnaire_goto_total = "统计结果" questionnaire_goto_total_title = "显示%s的统计结果" questionnaire_answer_start = "开始" questionnaire_image_authentication_label = "图片验证:" +questionnaire_keypass_label = "关键短语:" +questionnaire_has_finished = "它是已经回答。谢谢你的帮助。" [Questionnaire_View_Main_Single:Questionnaire_Action_Main_Answer] questionnaire_single_question = "问题%s/%s:" @@ -112,6 +118,9 @@ questionnaire_mobile_single_question = "[No.%s/%s问题]" questionnaire_answer_required = "请输入回答。" questionnaire_answer_textarea = "问答题回答的内容" +[Questionnaire_Action_Main_Start:Questionnaire_Action_Main_Answer:Questionnaire_Action_Main_Confirm] +questionnaire_keypass_invalid_input = "关键的一句是不正确的。" + [Questionnaire_Action_Main_Answer] questionnaire_next_question = "下一个问题>>" diff --git a/html/webapp/modules/questionnaire/language/english/main.ini b/html/webapp/modules/questionnaire/language/english/main.ini index ba3e3c0..ac7f3ab 100644 --- a/html/webapp/modules/questionnaire/language/english/main.ini +++ b/html/webapp/modules/questionnaire/language/english/main.ini @@ -43,14 +43,18 @@ questionnaire_type_random = "random" questionnaire_period = "Due date" questionnaire_nonmember = "Answer of nonmember" questionnaire_image_authentication = "Picture certification" +questionnaire_keypass = "Key phrase" questionnaire_anonymity = "It does anonymous." questionnaire_repeat = "Repeat answer" questionnaire_total = "Disclose the summary" +questionnaire_answer_show = "Do not show the answer" questionnaire_mail_note = "You may use the keywords
{X-SITE_NAME}, {X-ROOM}、
{X-QUESTIONNAIRE_NAME}, {X-USER},
{X-TO_DATE}, {X-URL}.
Each keyword stands for
the site name, the room name
the title of questionnaire, the respondent,
the date and the url." [Questionnaire_Action_Edit_Questionnaire_Entry] questionnaire_period_text = "Due date" questionnaire_period_invalid = "Invalid input" +questionnaire_keypass = "Key phrase" +questionnaire_keypass_invalid = "Please input key phrase." [Questionnaire_View_Edit_Question_List] questionnaire_question_list_text = "You can add and edit the questions to ask." @@ -103,6 +107,7 @@ questionnaire_goto_total = "Summary" questionnaire_goto_total_title = "Displaying the summary of %s" questionnaire_answer_start = "Start" questionnaire_image_authentication_label = "Picture certification:" +questionnaire_keypass_label = "Key Phrase:" [Questionnaire_View_Main_Single:Questionnaire_Action_Main_Answer] questionnaire_single_question = "Question %s/%s:" @@ -111,6 +116,10 @@ questionnaire_mobile_single_question = "[No. %s among/%s quesitons]" [Questionnaire_Action_Main_Answer:Questionnaire_Action_Main_Confirm] questionnaire_answer_required = "Please enter." questionnaire_answer_textarea = "Content of answer of description type" +questionnaire_keypass_invalid_input = "Key phrase does not match." + +[Questionnaire_Action_Main_Start:Questionnaire_Action_Main_Answer:Questionnaire_Action_Main_Confirm] +questionnaire_keypass_invalid_input = "Invalid key phrase." [Questionnaire_Action_Main_Answer] questionnaire_next_question = "Next question >>" diff --git a/html/webapp/modules/questionnaire/language/japanese/main.ini b/html/webapp/modules/questionnaire/language/japanese/main.ini index c48c6af..b411a38 100644 --- a/html/webapp/modules/questionnaire/language/japanese/main.ini +++ b/html/webapp/modules/questionnaire/language/japanese/main.ini @@ -43,14 +43,18 @@ questionnaire_type_random = "ランダムに表示する" questionnaire_period = "期限を指定する" questionnaire_nonmember = "非会員の回答を受け付ける" questionnaire_image_authentication = "画像認証を行う" +questionnaire_keypass = "キーフレーズを使う" questionnaire_anonymity = "匿名で回答させる" questionnaire_repeat = "繰返しの回答をさせる" questionnaire_total = "回答後に集計結果を表示する" +questionnaire_answer_show = "回答内容を表示しない" questionnaire_mail_note = "件名と本文には、
{X-SITE_NAME}、{X-ROOM}、
{X-QUESTIONNAIRE_NAME}、{X-USER}、
{X-TO_DATE}、{X-URL}
というキーワードを使えます。
それぞれのキーワードは、
サイト名称、ルーム名称、
アンケート名称、回答者ハンドル名称、
回答日時、回答結果のURL
に変換されて送信されます。" [Questionnaire_Action_Edit_Questionnaire_Entry] questionnaire_period_text = "期限" questionnaire_period_invalid = "期限は未来の日付を入力してください" +questionnaire_keypass = "キーフレーズ" +questionnaire_keypass_invalid = "キーフレーズを入力して下さい。" [Questionnaire_View_Edit_Question_List] questionnaire_question_list_text = "質問の追加・編集・表示順変更ができます" @@ -103,6 +107,8 @@ questionnaire_goto_total = "集計結果を見る" questionnaire_goto_total_title = "%sの集計結果を表示します。" questionnaire_answer_start = "始める" questionnaire_image_authentication_label = "画像認証:" +questionnaire_keypass_label = "キーフレーズ:" +questionnaire_has_finished = "すでに回答済みです。ご協力ありがとうございました。" [Questionnaire_View_Main_Single:Questionnaire_Action_Main_Answer] questionnaire_single_question = "%s/%s問目:" @@ -112,6 +118,9 @@ questionnaire_mobile_single_question = "[%s/%s問目]" questionnaire_answer_required = "質問%sは必須項目です。" questionnaire_answer_textarea = "記述式回答内容" +[Questionnaire_Action_Main_Start:Questionnaire_Action_Main_Answer:Questionnaire_Action_Main_Confirm] +questionnaire_keypass_invalid_input = "キーフレーズが間違っています。" + [Questionnaire_Action_Main_Answer] questionnaire_next_question = "次の質問へ" diff --git a/html/webapp/modules/questionnaire/sql/mysql/table.sql b/html/webapp/modules/questionnaire/sql/mysql/table.sql index 4adc3ac..f23fdc0 100644 --- a/html/webapp/modules/questionnaire/sql/mysql/table.sql +++ b/html/webapp/modules/questionnaire/sql/mysql/table.sql @@ -15,8 +15,11 @@ CREATE TABLE `questionnaire` ( `nonmember_flag` tinyint(1) NOT NULL default '0', `image_authentication` tinyint(1) NOT NULL default '0', `anonymity_flag` tinyint(1) NOT NULL default '0', + `keypass_use_flag` tinyint(1) NOT NULL default '0', + `keypass_phrase` varchar(128) NOT NULL default '', `repeat_flag` tinyint(1) NOT NULL default '0', `total_flag` tinyint(1) NOT NULL default '0', + `answer_show_flag` tinyint(1) NOT NULL default '0', `answer_count` int(11) NOT NULL default '0', `mail_send` tinyint(1) NOT NULL default '0', `mail_subject` varchar(255) NOT NULL default '', diff --git a/html/webapp/modules/questionnaire/templates/default/questionnaire_mobile_head.html b/html/webapp/modules/questionnaire/templates/default/questionnaire_mobile_head.html index 64ed767..1a8615b 100644 --- a/html/webapp/modules/questionnaire/templates/default/questionnaire_mobile_head.html +++ b/html/webapp/modules/questionnaire/templates/default/questionnaire_mobile_head.html @@ -17,9 +17,13 @@

<{if $action.answerLinkShow}> - + <{if $action.questionnaire.answer_show_flag == $smarty.const._OFF}> + <{$lang.questionnaire_goto_answer}> - + + <{else}> + <{$lang.questionnaire_has_finished|smarty:nodefaults}> + <{/if}>
<{/if}> diff --git a/html/webapp/modules/questionnaire/templates/default/questionnaire_mobile_keypass.html b/html/webapp/modules/questionnaire/templates/default/questionnaire_mobile_keypass.html new file mode 100644 index 0000000..8c54103 --- /dev/null +++ b/html/webapp/modules/questionnaire/templates/default/questionnaire_mobile_keypass.html @@ -0,0 +1,9 @@ +<{strip}> +<{* キーフレーズ認証項目用テンプレート *}> +<{if $action.questionnaire.keypass_use_flag == _ON}> + <{$lang.questionnaire_keypass_label}> +
+ +
+<{/if}> +<{/strip}> diff --git a/html/webapp/modules/questionnaire/templates/default/questionnaire_mobile_question_form.html b/html/webapp/modules/questionnaire/templates/default/questionnaire_mobile_question_form.html index 558f08d..42a7a95 100644 --- a/html/webapp/modules/questionnaire/templates/default/questionnaire_mobile_question_form.html +++ b/html/webapp/modules/questionnaire/templates/default/questionnaire_mobile_question_form.html @@ -14,6 +14,8 @@ <{assign var="question" value="`$action.question`"}> <{include file="questionnaire_mobile_question_answer.html"}> <{else}> + <{include file="questionnaire_mobile_keypass.html"}> + <{foreach from=$action.questions item=question name="question"}> <{include file="questionnaire_mobile_question_answer.html"}> <{/foreach}> diff --git a/html/webapp/modules/questionnaire/templates/default/questionnaire_mobile_start.html b/html/webapp/modules/questionnaire/templates/default/questionnaire_mobile_start.html index acb3a0d..1c1bc7a 100644 --- a/html/webapp/modules/questionnaire/templates/default/questionnaire_mobile_start.html +++ b/html/webapp/modules/questionnaire/templates/default/questionnaire_mobile_start.html @@ -8,8 +8,11 @@ +
+ <{include file="questionnaire_mobile_keypass.html"}>
<{include file="questionnaire_mobile_image_authentication.html"}> +
<{$token_form|smarty:nodefaults}> diff --git a/html/webapp/modules/questionnaire/templates/default/questionnaire_view_edit_questionnaire_entry.html b/html/webapp/modules/questionnaire/templates/default/questionnaire_view_edit_questionnaire_entry.html index 7f830f1..7b53993 100644 --- a/html/webapp/modules/questionnaire/templates/default/questionnaire_view_edit_questionnaire_entry.html +++ b/html/webapp/modules/questionnaire/templates/default/questionnaire_view_edit_questionnaire_entry.html @@ -103,6 +103,22 @@ <{/if}> + <{if ($smarty.session._space_type != _SPACE_TYPE_PUBLIC && ($smarty.session._main_room_page.private_flag == _OFF || $smarty.session._main_room_page.default_entry_flag == _OFF))}> + + <{else}> + + + + + + + + + <{/if}> + @@ -136,6 +152,17 @@ + + + + + + + + <{$lang.questionnaire_mail_send}> @@ -230,13 +257,20 @@ $("questionnaire_image_authentication<{$id}>").checked = true; <{/if}> + <{if $action.questionnaire.keypass_use_flag == _ON}> + $("questionnaire_keypass_use_flag<{$id}>").checked = true; + <{/if}> + $("questionnaire_keypass_phrase<{$id}>").value = "<{$action.questionnaire.keypass_phrase}>"; + questionnaireCls["<{$id}>"].changeNonmember($("questionnaire_nonmember<{$id}>").checked); + questionnaireCls["<{$id}>"].changeKeypass($("questionnaire_keypass_use_flag<{$id}>").checked); <{/if}> <{if $action.questionnaire.anonymity_flag == _ON}> $("questionnaire_anonymity<{$id}>").checked = true; <{/if}> + <{if $action.questionnaire.repeat_flag == _ON}> $("questionnaire_repeat<{$id}>").checked = true; <{/if}> @@ -245,6 +279,10 @@ $("questionnaire_total<{$id}>").checked = true; <{/if}> + <{if $action.questionnaire.answer_show_flag == _ON}> + $("questionnaire_answer_show<{$id}>").checked = true; + <{/if}> + <{if $action.questionnaire.mail_send == _ON && $action.questionnaire.anonymity_flag != _ON}> $("questionnaire_mail_send_on<{$id}>").checked = true; questionnaireCls["<{$id}>"].changeMailSend(true); diff --git a/html/webapp/modules/questionnaire/templates/default/questionnaire_view_main_head.html b/html/webapp/modules/questionnaire/templates/default/questionnaire_view_main_head.html index eb0af86..fbfec41 100644 --- a/html/webapp/modules/questionnaire/templates/default/questionnaire_view_main_head.html +++ b/html/webapp/modules/questionnaire/templates/default/questionnaire_view_main_head.html @@ -15,9 +15,15 @@ <{/if}> <{if $action.answerLinkShow}> + <{if $action.questionnaire.answer_show_flag==$smarty.const._OFF}> <{$lang.questionnaire_goto_answer}> + <{else}> +

+ <{$lang.questionnaire_has_finished|smarty:nodefaults}> +

+ <{/if}> <{/if}> <{if $action.totalLinkShow}> diff --git a/html/webapp/modules/questionnaire/templates/default/questionnaire_view_main_keypass.html b/html/webapp/modules/questionnaire/templates/default/questionnaire_view_main_keypass.html new file mode 100644 index 0000000..b44c3fc --- /dev/null +++ b/html/webapp/modules/questionnaire/templates/default/questionnaire_view_main_keypass.html @@ -0,0 +1,12 @@ +<{strip}> +<{* キーパス項目用テンプレート *}> +<{if $action.questionnaire.keypass_use_flag == _ON}> +
+ +
+<{/if}> +<{/strip}> diff --git a/html/webapp/modules/questionnaire/templates/default/questionnaire_view_main_question_form.html b/html/webapp/modules/questionnaire/templates/default/questionnaire_view_main_question_form.html index a2b7206..46cb3b4 100644 --- a/html/webapp/modules/questionnaire/templates/default/questionnaire_view_main_question_form.html +++ b/html/webapp/modules/questionnaire/templates/default/questionnaire_view_main_question_form.html @@ -17,6 +17,8 @@ <{assign var="question" value="`$action.question`"}> <{include file="questionnaire_view_main_question_answer.html"}> <{else}> + <{include file="questionnaire_view_main_keypass.html"}> + <{foreach from=$action.questions item=question name="question"}> <{include file="questionnaire_view_main_question_answer.html"}> <{/foreach}> diff --git a/html/webapp/modules/questionnaire/templates/default/questionnaire_view_main_start.html b/html/webapp/modules/questionnaire/templates/default/questionnaire_view_main_start.html index fb89bb4..b984869 100644 --- a/html/webapp/modules/questionnaire/templates/default/questionnaire_view_main_start.html +++ b/html/webapp/modules/questionnaire/templates/default/questionnaire_view_main_start.html @@ -8,6 +8,7 @@ + <{include file="questionnaire_view_main_keypass.html"}> <{include file="questionnaire_view_main_image_authentication.html"}> diff --git a/html/webapp/modules/questionnaire/update/Update.class.php b/html/webapp/modules/questionnaire/update/Update.class.php index 586ddb4..0c561bd 100644 --- a/html/webapp/modules/questionnaire/update/Update.class.php +++ b/html/webapp/modules/questionnaire/update/Update.class.php @@ -19,6 +19,27 @@ class Questionnaire_Update extends Action function execute() { + // key pass phrase 関連フィールドを追加 + $adoConnection = $this->dbObject->getAdoDbObject(); + $metaColumns = $adoConnection->MetaColumns($this->dbObject->getPrefix() . 'questionnaire'); + if (!isset($metaColumns['KEYPASS_USE_FLAG'])) { + $sql = "ALTER TABLE `" . $this->dbObject->getPrefix() . "questionnaire` " + . "ADD `keypass_use_flag` tinyint(1) NOT NULL default '0' AFTER `anonymity_flag`," + . "ADD `keypass_phrase` varchar(128) NOT NULL default '' AFTER `keypass_use_flag`;"; + if (!$this->dbObject->execute($sql)) { + return false; + } + } + // 「結果をみる」関連フィールドを追加 + if (!isset($metaColumns['ANSWER_SHOW_FLAG'])) { + $sql = "ALTER TABLE `" . $this->dbObject->getPrefix() . "questionnaire` " + . "ADD `answer_show_flag` tinyint(1) NOT NULL default '0' AFTER `total_flag`;"; + if (!$this->dbObject->execute($sql)) { + return false; + } + } + + // questionnaireにindexを追加 $sql = "SHOW INDEX FROM `".$this->dbObject->getPrefix()."questionnaire` ;"; diff --git a/html/webapp/modules/questionnaire/validator/Validator_Keypass.class.php b/html/webapp/modules/questionnaire/validator/Validator_Keypass.class.php new file mode 100644 index 0000000..4dadbad --- /dev/null +++ b/html/webapp/modules/questionnaire/validator/Validator_Keypass.class.php @@ -0,0 +1,53 @@ +getComponent('Request'); + + // 使用しない + if (empty($attributes['keypass_use_flag'])) { + // 空にしてノーチェック + $request->setParameter('keypass_phrase', ''); + return; + } + + if (!isset($attributes['keypass_phrase'])) { + return $errStr; + } + if (is_null($attributes['keypass_phrase'])) { + return $errStr; + } + if ($attributes['keypass_phrase']=='') { + return $errStr; + } + + return; + } +} +?> diff --git a/html/webapp/modules/questionnaire/validator/Validator_KeypassCheck.class.php b/html/webapp/modules/questionnaire/validator/Validator_KeypassCheck.class.php new file mode 100644 index 0000000..0570512 --- /dev/null +++ b/html/webapp/modules/questionnaire/validator/Validator_KeypassCheck.class.php @@ -0,0 +1,58 @@ +getComponent('Session'); + $chk_flg = $session->getParameter('questionnaire_keypass_check_flag'. $attributes['block_id']); + if (empty($chk_flg)) { // たってない + return; + } + + + // 使う設定ならば + // 入力されてる? + if (empty($attributes['keypass_phrase'])) { + return $errStr; + } + + // 入力されてるなら + // 一致してる? + if ($attributes['questionnaire']['keypass_phrase'] != $attributes['keypass_phrase']) { + return $errStr; + } + // チェックOKだったのでフラグ削除 + $session->removeParameter('questionnaire_keypass_check_flag'. $attributes['block_id']); + return; + } +} +?> diff --git a/html/webapp/modules/questionnaire/view/main/answer/Answer.class.php b/html/webapp/modules/questionnaire/view/main/answer/Answer.class.php index b463e3b..cdf5753 100644 --- a/html/webapp/modules/questionnaire/view/main/answer/Answer.class.php +++ b/html/webapp/modules/questionnaire/view/main/answer/Answer.class.php @@ -41,6 +41,10 @@ class Questionnaire_View_Main_Answer extends Action */ function execute() { + + if($this->questionnaire['answer_show_flag']==_ON && $this->session->getParameter('_auth_id')<_AUTH_CHIEF) { + return 'error'; + } $this->questions = $this->questionnaireView->getAnswer($this->summary_id); if (empty($this->questions)) { diff --git a/html/webapp/modules/questionnaire/view/main/init/Init.class.php b/html/webapp/modules/questionnaire/view/main/init/Init.class.php index be14356..7ac2ea4 100644 --- a/html/webapp/modules/questionnaire/view/main/init/Init.class.php +++ b/html/webapp/modules/questionnaire/view/main/init/Init.class.php @@ -79,6 +79,7 @@ function execute() if ($this->questionnaire["questionnaire_type"] != QUESTIONNAIRE_TYPE_LIST_VALUE) { $questionIDs = $this->session->getParameter("questionnaire_question_id_array". $this->block_id); if (empty($questionIDs)) { + $this->_setKeyPassFlag(); return "start"; } @@ -103,7 +104,16 @@ function execute() } } + $this->_setKeyPassFlag(); return "list"; } + function _setKeyPassFlag() { + if ($this->questionnaire['keypass_use_flag'] == _ON) { + $this->session->setParameter('questionnaire_keypass_check_flag'. $this->block_id, _ON); + } + else { + $this->session->removeParameter('questionnaire_keypass_check_flag'. $this->block_id); + } + } } ?> \ No newline at end of file diff --git a/html/webapp/modules/questionnaire/view/main/summary/Summary.class.php b/html/webapp/modules/questionnaire/view/main/summary/Summary.class.php index 960f723..455711d 100644 --- a/html/webapp/modules/questionnaire/view/main/summary/Summary.class.php +++ b/html/webapp/modules/questionnaire/view/main/summary/Summary.class.php @@ -25,6 +25,7 @@ class Questionnaire_View_Main_Summary extends Action var $configView = null; var $request = null; var $filterChain = null; + var $session = null; // validatorから受け取るため var $questionnaire = null; @@ -42,6 +43,9 @@ class Questionnaire_View_Main_Summary extends Action */ function execute() { + if($this->questionnaire['answer_show_flag']==_ON && $this->session->getParameter('_auth_id')<_AUTH_CHIEF) { + return 'error'; + } if ($this->scroll != _ON) { $config = $this->configView->getConfigByConfname($this->module_id, "questionnaire_summary_list_row_count"); if ($config === false) { diff --git a/html/webapp/modules/questionnaire/view/main/summary/maple.ini b/html/webapp/modules/questionnaire/view/main/summary/maple.ini index 75c2d7a..f18c816 100644 --- a/html/webapp/modules/questionnaire/view/main/summary/maple.ini +++ b/html/webapp/modules/questionnaire/view/main/summary/maple.ini @@ -17,4 +17,5 @@ screen = "questionnaire_mobile_summary.html" [Action] configView = "ref:configView" request = "ref:Request" -filterChain = "ref:FilterChain" \ No newline at end of file +filterChain = "ref:FilterChain" +session = "ref:Session" \ No newline at end of file diff --git a/html/webapp/modules/quiz/components/View.class.php b/html/webapp/modules/quiz/components/View.class.php index 14acf52..ae3bfcb 100644 --- a/html/webapp/modules/quiz/components/View.class.php +++ b/html/webapp/modules/quiz/components/View.class.php @@ -175,7 +175,7 @@ function &getQuizzes() "WHERE Q.room_id = ? ". "GROUP BY Q.quiz_id, Q.quiz_name, Q.icon_name, Q.status, ". "Q.insert_time, Q.insert_user_id, Q.insert_user_name ". - $this->_db->getOrderSQL($orderParams); + $this->_db->getOrderSQL($orderParams, array('quiz_id', 'quiz_name', 'status', 'insert_user_name', 'insert_time')); $quizzes = $this->_db->execute($sql, $params, $limit, $offset); if ($quizzes === false) { $this->_db->addError(); @@ -872,7 +872,7 @@ function &getSummaries($statistics = null) $offset = $this->_request->getParameter("offset"); $sortColumn = $this->_request->getParameter("sort_col"); - if (empty($sortColumn)) { + if (empty($sortColumn) || !in_array($sortColumn, array('answer_number', 'answer_time', 'summary_score'))) { $sortColumn = "summary_id"; } $sortDirection = $this->_request->getParameter("sort_dir"); diff --git a/html/webapp/modules/quiz/install.ini b/html/webapp/modules/quiz/install.ini old mode 100644 new mode 100755 index 067f34f..5642a1d --- a/html/webapp/modules/quiz/install.ini +++ b/html/webapp/modules/quiz/install.ini @@ -1,4 +1,4 @@ -version = "2.4.0.0" +version = "2.4.0.1" action_name = "quiz_view_main_init" edit_action_name = "quiz_view_edit_quiz_list" block_add_action = "quiz_view_edit_quiz_entry" diff --git a/html/webapp/modules/quiz/validator/Validator_AnswerFlag.class.php b/html/webapp/modules/quiz/validator/Validator_AnswerFlag.class.php old mode 100644 new mode 100755 index 2abc072..2f67452 --- a/html/webapp/modules/quiz/validator/Validator_AnswerFlag.class.php +++ b/html/webapp/modules/quiz/validator/Validator_AnswerFlag.class.php @@ -25,13 +25,21 @@ class Quiz_Validator_AnswerFlag extends Validator */ function validate($attributes, $errStr, $params) { - foreach (array_keys($attributes["answer_flag"]) as $index) { - if ($attributes["answer_flag"][$index] != QUIZ_ANSWER_NOT_MARK_VALUE && - $attributes["answer_flag"][$index] != QUIZ_ANSWER_CORRECT_VALUE && - $attributes["answer_flag"][$index] != QUIZ_ANSWER_WRONG_VALUE) { + $answerFlagArr = array(); + foreach ($attributes["answer_flag"] as $answerId => $answerValue) { + if (!is_numeric($answerId) || + ($answerValue !== QUIZ_ANSWER_NOT_MARK_VALUE && + $answerValue !== QUIZ_ANSWER_CORRECT_VALUE && + $answerValue !== QUIZ_ANSWER_WRONG_VALUE) + ) { return $errStr; } - } + $answerFlagArr[(int)$answerId] = $answerValue; + } + + $container =& DIContainerFactory::getContainer(); + $request =& $container->getComponent('Request'); + $request->setParameter('answer_flag', $answerFlagArr); return; } diff --git a/html/webapp/modules/registration/action/main/mail/Mail.class.php b/html/webapp/modules/registration/action/main/mail/Mail.class.php index a08ba2e..b4086be 100644 --- a/html/webapp/modules/registration/action/main/mail/Mail.class.php +++ b/html/webapp/modules/registration/action/main/mail/Mail.class.php @@ -61,7 +61,13 @@ function execute() $users = array(); if ($mail['regist_user_send'] && !empty($mail['regist_user_email'])) { - $users[]['email'] = $mail['regist_user_email']; + + // メールアドレス欄が複数ある場合の対応 by nagahara@opensource-workshop.jp + // $users[]['email'] = $mail['regist_user_email']; + foreach( $mail['regist_user_email'] as $mail_item ) { + $users[]['email'] = $mail_item; + } + $this->mailMain->setToUsers($users); $this->mailMain->send(); } diff --git a/html/webapp/modules/registration/components/View.class.php b/html/webapp/modules/registration/components/View.class.php index a87dd72..5c39cea 100644 --- a/html/webapp/modules/registration/components/View.class.php +++ b/html/webapp/modules/registration/components/View.class.php @@ -159,7 +159,7 @@ function &getRegistrations() "ON R.registration_id = D.registration_id ". "WHERE R.room_id = ? ". "GROUP BY R.registration_id, R.registration_name, R.active_flag, R.insert_time, R.insert_user_id, R.insert_user_name ". - $this->_db->getOrderSQL($orderParams); + $this->_db->getOrderSQL($orderParams, array('R.registration_id', 'R.registration_name', 'data_count', 'R.active_flag', 'R.insert_user_name', 'R.insert_time')); $registrations = $this->_db->execute($sql, $params, $limit, $offset); if ($registrations === false) { $this->_db->addError(); @@ -632,8 +632,14 @@ function &getDataList($limit = null, $offset = null) $sortColumn = "file_name". $sortItemID; $sortDirection = "ASC"; } else { - $sortColumn = "item_data_value". $sortItemID; - $sortDirection = "ASC"; + $items = $this->_request->getParameter("items"); + if (isset($items[$sortItemID])) { + $sortColumn = "item_data_value". $sortItemID; + $sortDirection = "ASC"; + } else { + $sortColumn = "D.insert_time"; + $sortDirection = "DESC"; + } } $orderParams[$sortColumn] = $sortDirection; @@ -741,7 +747,9 @@ function &_makeMail(&$recordSet) } if ($item['item_type'] == REGISTRATION_TYPE_EMAIL) { - $mail['regist_user_email'] = $row[$key]; + // メールアドレス欄が複数ある場合の対応 by nagahara@opensource-workshop.jp + // $mail['regist_user_email'] = $row[$key]; + $mail['regist_user_email'][] = $row[$key]; } $mail["data"] .= sprintf($dataFormat, htmlspecialchars($item["item_name"]), $value); diff --git a/html/webapp/modules/registration/install.ini b/html/webapp/modules/registration/install.ini old mode 100644 new mode 100755 index 8717f19..a063cd1 --- a/html/webapp/modules/registration/install.ini +++ b/html/webapp/modules/registration/install.ini @@ -1,4 +1,4 @@ -version = "2.4.0.1" +version = "2.4.0.2" action_name="registration_view_main_init" edit_action_name="registration_view_edit_registration_list" block_add_action="registration_view_edit_registration_entry" diff --git a/html/webapp/modules/registration/language/english/main.ini b/html/webapp/modules/registration/language/english/main.ini index 64a7ad6..e5f657e 100644 --- a/html/webapp/modules/registration/language/english/main.ini +++ b/html/webapp/modules/registration/language/english/main.ini @@ -140,6 +140,7 @@ registration_mobile_item_name = "[%s]" registration_not_open = "Registration is not in process." registration_entry_text = "Fill out the form on this page, and click the %s button.
The items marked by * are required to answer." registration_email_second = "to confirm" +registration_image_auth_readme = "Type the words" [Registration_View_Main_Confirm] registration_confirm_text = "Please check the information you have entered, diff --git a/html/webapp/modules/reservation/action/edit/timeframe/delete/Delete.class.php b/html/webapp/modules/reservation/action/edit/timeframe/delete/Delete.class.php new file mode 100644 index 0000000..c53f4cd --- /dev/null +++ b/html/webapp/modules/reservation/action/edit/timeframe/delete/Delete.class.php @@ -0,0 +1,34 @@ +reservationAction->deleteTimeframe(); + if (!$result) { + return 'error'; + } + return 'success'; + } +} +?> \ No newline at end of file diff --git a/html/webapp/modules/reservation/action/edit/timeframe/delete/maple.ini b/html/webapp/modules/reservation/action/edit/timeframe/delete/maple.ini new file mode 100644 index 0000000..271c6f2 --- /dev/null +++ b/html/webapp/modules/reservation/action/edit/timeframe/delete/maple.ini @@ -0,0 +1,16 @@ +[TokenExtra] +mode = "check" +action = "reservation_view_edit_timeframe" + +[SmartyAssign::reservationAssign] +global = timezone.ini + +[ValidateDef::reservationValidate] +timeframe_id.required:g = "1:lang._invalid_input" +key:timeframe_id.reservation.TimeframeView = "1:lang._invalid_input" + +[Action] +reservationAction = "ref:reservationAction" + +[View] +success = "action:reservation_view_edit_timeframe" \ No newline at end of file diff --git a/html/webapp/modules/reservation/action/edit/timeframe/entry/Entry.class.php b/html/webapp/modules/reservation/action/edit/timeframe/entry/Entry.class.php new file mode 100644 index 0000000..3bd1eb3 --- /dev/null +++ b/html/webapp/modules/reservation/action/edit/timeframe/entry/Entry.class.php @@ -0,0 +1,34 @@ +reservationAction->setTimeframe(); + if (!$result) { + return 'error'; + } + return 'success'; + } +} +?> \ No newline at end of file diff --git a/html/webapp/modules/reservation/action/edit/timeframe/entry/maple.ini b/html/webapp/modules/reservation/action/edit/timeframe/entry/maple.ini new file mode 100644 index 0000000..391d57a --- /dev/null +++ b/html/webapp/modules/reservation/action/edit/timeframe/entry/maple.ini @@ -0,0 +1,21 @@ +[TokenExtra] +mode = "check" +action = "reservation_view_edit_timeframe_entry" + +[SmartyAssign::reservationAssign] +global = timezone.ini + +[ValidateDef::reservationValidate] +key:timeframe_id.reservation.TimeframeView = "1:lang._invalid_input" +timeframe_name.required:g = "1:lang._required,lang.reservation_timeframe_name_label" +key:timezone_offset.reservation.timezoneOffset:g = "1:lang._invalid_input" +key:start_hour,start_minute,end_hour,end_minute,allday_flag,timezone_offset,rrule_byday.reservation.locationTimetable:g = "1:lang._invalid_input" +key:timeframe_id.reservation.timeframeTimetable:g = "1:lang.reservation_timeframe_timetable_duplicated" +timeframe_name.maxlength = "1,_VALIDATOR_TITLE_LEN:lang._maxlength_error,lang.reservation_timeframe_name_label,_VALIDATOR_TITLE_LEN" +timeframe_color.match = "1,(^$|^#[0-9a-fA-F]{6}$):lang.reservation_err_match_color,lang.reservation_timeframe_color_label" + +[Action] +reservationAction = "ref:reservationAction" + +[View] +success = "main:true.html" \ No newline at end of file diff --git a/html/webapp/modules/reservation/components/Action.class.php b/html/webapp/modules/reservation/components/Action.class.php index c083842..6bc145d 100644 --- a/html/webapp/modules/reservation/components/Action.class.php +++ b/html/webapp/modules/reservation/components/Action.class.php @@ -278,6 +278,7 @@ function setBlock() $params = array( "block_id" => $this->_request->getParameter("block_id"), "display_type" => $default["display_type"], + 'display_timeframe'=> $default['display_timeframe'], "display_start_time" => $default["display_start_time"], "display_interval" => $default["display_interval"], "category_id" => $default["category_id"], @@ -290,6 +291,7 @@ function setBlock() } elseif ($actionName == "reservation_action_edit_style") { $params = array( "display_type" => intval($this->_request->getParameter("display_type")), + 'display_timeframe' => intval($this->_request->getParameter('display_timeframe')), "display_start_time" => $this->_request->getParameter("display_start_time"), "display_interval" => intval($this->_request->getParameter("display_interval")), "category_id" => $this->_request->getParameter("category_id"), @@ -738,6 +740,67 @@ function setLocationSequence() return true; } + /** + * 時間枠を登録する + * + * @access public + */ + function setTimeframe() + { + $timeframe_id = $this->_request->getParameter('timeframe_id'); + $timezone_offset = $this->_request->getParameter('timezone_offset'); + $start_time = $this->_request->getParameter('start_time'); + $end_time = $this->_request->getParameter('end_time'); + + $commonMain =& $this->_container->getComponent("commonMain"); + $timezoneMain =& $commonMain->registerClass(WEBAPP_DIR.'/components/timezone/Main.class.php', "Timezone_Main", "timezoneMain"); + + //$timezone_offset_float = $timezoneMain->getFloatTimeZone($timezone_offset); + $start_time = $this->_reservationView->dateFormat($start_time, $timezone_offset, true, 'His'); + $end_time = $this->_reservationView->dateFormat($end_time, $timezone_offset, true, 'His'); + + $params = array( + 'timeframe_name' => $this->_request->getParameter('timeframe_name'), + 'start_time' => $start_time, + 'end_time' => $end_time, + 'timezone_offset' => $timezone_offset, + 'timeframe_color' => $this->_request->getParameter('timeframe_color') + ); + + // 新規登録 + if(empty($timeframe_id)) { + $timeframe_id = $this->_db->insertExecute('reservation_timeframe', $params, true, 'timeframe_id'); + if ($timeframe_id === false) { + return false; + } + } + // 再編集 + else { + $where_param = array('timeframe_id'=>$timeframe_id); + $ret = $this->_db->updateExecute('reservation_timeframe', $params, $where_param); + if ($ret === false) { + return false; + } + } + return true; + } + + /** + * 時間枠を削除する + * + * @access public + */ + function deleteTimeframe() + { + $timeframe_id = $this->_request->getParameter('timeframe_id'); + $where_param = array('timeframe_id'=>$timeframe_id); + $ret = $this->_db->deleteExecute('reservation_timeframe', $where_param); + if ($ret === false) { + return false; + } + return true; + } + /** * 予約を登録する * diff --git a/html/webapp/modules/reservation/components/View.class.php b/html/webapp/modules/reservation/components/View.class.php old mode 100644 new mode 100755 index 4488790..0ce0385 --- a/html/webapp/modules/reservation/components/View.class.php +++ b/html/webapp/modules/reservation/components/View.class.php @@ -167,6 +167,7 @@ function dateFormat($time=null, $timezone_offset=null, $insert_flag=false, $time } if (isset($timezone_offset)) { $timezone_minute_offset = 0; + $timezone_offset = floatval($timezone_offset); if(round($timezone_offset) != intval($timezone_offset)) { $timezone_offset = ($timezone_offset> 0) ? floor($timezone_offset) : ceil($timezone_offset); $timezone_minute_offset = ($timezone_offset> 0) ? 30 : -30; // 0.5minute @@ -417,6 +418,7 @@ function getDefaultBlock() $default = array( "block_id" => 0, "display_type" => $display_type, + 'display_timeframe'=>_OFF, "display_start_time" => $display_start_time, "start_time_hour" => $config['start_time_hour']["conf_value"], "display_interval" => $display_interval, @@ -496,7 +498,7 @@ function getLocations($category_id = null, $limit = null, $offset = null, $func= $sql .= "WHERE 1=1 "; } if (isset($category_id)) { - $sql .= "AND location.category_id = ".$category_id." "; + $sql .= "AND location.category_id = ".(int)$category_id." "; } $sql .= "ORDER BY category.display_sequence, location.display_sequence"; @@ -784,6 +786,187 @@ function getCountLocation($location_id = null) } } + /** + * 時間枠取得 + * + * @access public + */ + function getTimeframes($divided_flag=false) + { + $func_params = array($divided_flag); + + $result = $this->_db->selectExecute('reservation_timeframe', null, null, 0, 0, array($this, '_getTimeframesCallback'), $func_params); + + if ($result === false) { + $this->_db->addError(); + return false; + } + return $result; + } + + function _getTimeframesCallback($recordSet, $params = array(false)) + { + $ret = array(); + + $divided_flag = $params[0]; + + $commonMain =& $this->_container->getComponent("commonMain"); + $timezoneMain =& $commonMain->registerClass(WEBAPP_DIR.'/components/timezone/Main.class.php', "Timezone_Main", "timezoneMain"); + + while ($row = $recordSet->fetchRow()) { + + $start_time = timezone_date($row['start_time'], false, 'His'); + $end_time = timezone_date($row['end_time'], false, 'His'); + + // 日跨ぎ 分割希望時 + if($divided_flag == true && $start_time>$end_time) { + $ret_row = $this->__getTimeframesCallback($timezoneMain, $row, $start_time, '240000'); + $ret[$start_time] = $ret_row; + $ret_row = $this->__getTimeframesCallback($timezoneMain, $row, '000000', $end_time); + $ret['000000'] = $ret_row; + } + else { + $ret_row = $this->__getTimeframesCallback($timezoneMain, $row, $start_time, $end_time); + $ret[$start_time] = $ret_row; + } + } + ksort($ret); + return $ret; + } + function __getTimeframesCallback(&$timezoneMain, $row, $start_time, $end_time) + { + $ret = $row; + + $ret['start_time_view'] = $start_time; + $ret['end_time_view'] = $end_time; + + $ret['left'] = $this->TimeDiff('000000', $start_time) * RESERVATION_DEF_V_INTERVAL; + $ret['top'] = $this->TimeDiff('000000', $start_time) * RESERVATION_DEF_H_INTERVAL; + + if($end_time == '000000') { + $ret['width'] = $this->TimeDiff($ret['start_time_view'], '240000') * RESERVATION_DEF_V_INTERVAL; + $ret['height'] = $this->TimeDiff($ret['start_time_view'], '240000') * RESERVATION_DEF_H_INTERVAL; + } + else { + $ret['width'] = $this->TimeDiff($ret['start_time_view'], $ret['end_time_view']) * RESERVATION_DEF_V_INTERVAL; + $ret['height'] = $this->TimeDiff($ret['start_time_view'], $ret['end_time_view']) * RESERVATION_DEF_H_INTERVAL; + } + + $ret['start_time_view_hour'] = substr($ret['start_time_view'], 0, 2); + $ret['start_time_view_min'] = substr($ret['start_time_view'], 2, 2); + $ret['end_time_view_hour'] = substr($ret['end_time_view'], 0, 2); + $ret['end_time_view_min'] = substr($ret['end_time_view'], 2, 2); + + + $ret["start_time_original_str"] = $this->dateFormat(date('Ymd').$ret["start_time"], $ret["timezone_offset"], false, _SHORT_TIME_FORMAT); + $ret["end_time_original_str"] = $this->dateFormat(date('Ymd').$ret["end_time"], $ret["timezone_offset"], false, _SHORT_TIME_FORMAT); + $ret["start_time_original"] = $this->dateFormat(date('Ymd').$ret["start_time"], $ret["timezone_offset"], false, "His"); + $ret["end_time_original"] = $this->dateFormat(date('Ymd').$ret["end_time"], $ret["timezone_offset"], false, "His"); + + $ret["start_time_original_hour"] = substr($ret['start_time_original'], 0, 2); + $ret["start_time_original_min"] = substr($ret['start_time_original'], 2, 2); + $ret["end_time_original_hour"] = substr($ret['end_time_original'], 0, 2); + $ret["end_time_original_min"] = substr($ret['end_time_original'], 2, 2); + + $ret['timezone_constant_string'] = $timezoneMain->getLangTimeZone($ret['timezone_offset'], false); + $ret['timezone_string'] = $timezoneMain->getLangTimeZone($ret['timezone_offset']); + + return $ret; + } + + /** + * 時間枠数取得 + * + * @access public + */ + function getTimeframesCount() + { + $result = $this->_db->countExecute('reservation_timeframe'); + if ($result === false) { + $this->_db->addError(); + return false; + } + return $result; + } + + /** + * 時間枠取得 + * + * @access public + */ + function getTimeframe($timeframe_id) + { + $result = $this->_db->selectExecute('reservation_timeframe', array('timeframe_id'=>$timeframe_id), null, 0, 0, array($this, '_getTimeframesCallback')); + if ($result === false) { + $this->_db->addError(); + return false; + } + $timeframe = array_shift($result); + return $timeframe; + } + + /** + * 開始時間による時間枠取得(GMT) + * + * @access public + */ + function getTimeframeByStartTime($start_time_str) + { + $result = $this->_db->selectExecute('reservation_timeframe', array('start_time'=>$start_time_str), null, 0, 0, array($this, '_getTimeframesCallback')); + if ($result === false) { + $this->_db->addError(); + return false; + } + $timeframe = array_shift($result); + return $timeframe; + } + + /** + * 終了時間による時間枠取得(GMT) + * + * @access public + */ + function getTimeframeByEndTime($end_time_str) + { + $result = $this->_db->selectExecute('reservation_timeframe', array('end_time'=>$end_time_str), null, 0, 0, array($this, '_getTimeframesCallback')); + if ($result === false) { + $this->_db->addError(); + return false; + } + $timeframe = array_shift($result); + return $timeframe; + } + + /** + * 時間枠重なりチェック(GMT) + * + * @access public + */ + function getTimeframeDuplicate($timeframe_id, $start_time, $end_time) + { + $sql = 'SELECT count(*) AS timeframe_count FROM {reservation_timeframe} WHERE ' + . '( ? < start_time AND ? > start_time ' + . ' OR ' + . ' ? >= start_time AND CASE WHEN start_time < end_time THEN ?+240000 < end_time+240000 ELSE ? <= end_time END )'; + if(!empty($timeframe_id)) { + $sql .= ' AND timeframe_id != ?'; + } + + $where_param = array($start_time, $end_time,$start_time, $start_time, $start_time); + if(!empty($timeframe_id)) { + $where_param[] = $timeframe_id; + } + $result = $this->_db->execute($sql, $where_param); + if($result && isset($result[0])) { + if($result[0]['timeframe_count']>0) { + return false; + } + } + + // + return true; + } + /** * 施設に紐付くルーム取得 * diff --git a/html/webapp/modules/reservation/files/css/default/style.css b/html/webapp/modules/reservation/files/css/default/style.css index 0b50aa8..862030d 100644 --- a/html/webapp/modules/reservation/files/css/default/style.css +++ b/html/webapp/modules/reservation/files/css/default/style.css @@ -363,6 +363,27 @@ div.reservation_monthly table.reservation_body th.reservation_weeknum { margin-left:5px; padding-left:5px; } +.reservation_weekly table.reservation_body td.reservation_timeframe_head img.reservation_blank { + width:50px; + height:1px; +} +.reservation_weekly div.reservation_timeframe_wrapper { + height:100%; + width:50px; +} +.reservation_weekly th.reservation_timeframe_wrapper { + border-right:1px solid #dddddd; + vertical-align:top; +} +.reservation_weekly div.reservation_timeframe_spacer { +} +.reservation_weekly div.reservation_timeframe_label { + font-size:80%; + text-align:center; + border-top:1px solid #aaaaaa; + border-bottom:1px solid #aaaaaa; + overflow:hidden; +} /* * CSS of each location reservation @@ -439,6 +460,24 @@ div.reservation_monthly table.reservation_body th.reservation_weeknum { display:block; margin-left:7px; } +.reservation_each_location div.reservation_timeframe_wrapper { + width:100%; + height:20px; + border-bottom:1px solid #dddddd; +} +.reservation_each_location div.reservation_timeframe_spacer { + float:left; + height:20px; +} +.reservation_each_location div.reservation_timeframe_label { + height:20px; + text-align:center; + border-left:1px solid #aaaaaa; + border-right:1px solid #aaaaaa; + overflow:hidden; + float:left; + font-size:80%; +} /* 予約のインポート */ .reservation_top_description { @@ -457,4 +496,37 @@ div.reservation_monthly table.reservation_body th.reservation_weeknum { } .reservation_reserve_room_id { width:185px; +} + +.reservation_timeframe { + border-width:1px; + border-style: solid; + border-color: #ccc #aaa #aaa #ccc; + margin-bottom:1px; +} +.reservation_timeframe td { + padding:3px 5px; +} +.reservation_timeframe_name { + width:100px; + text-align:left; +} +.reservation_timeframe_time { + width:250px; + text-align:left; +} +.reservation_timeframe_color { + width:20px; + height:15px; +} +table.reservation_timeframe_entry th { + padding:2px 15px; +} +table.reservation_timeframe_entry td { + padding:2px 15px 2px 0px; +} +div.reservation_timeframe_time_original { + font-size:85%; + color:#999999; + width:250px; } \ No newline at end of file diff --git a/html/webapp/modules/reservation/files/js/default/reservation.js b/html/webapp/modules/reservation/files/js/default/reservation.js index 6666f2f..919eea1 100644 --- a/html/webapp/modules/reservation/files/js/default/reservation.js +++ b/html/webapp/modules/reservation/files/js/default/reservation.js @@ -254,7 +254,7 @@ clsReservation.prototype = { /* * Function of the reservation */ - showEasyAddReserve: function(event, date, time, location_id) { + showEasyAddReserve: function(event, date, time, location_id, timeframe_id) { var params = new Object(); params["prefix_id_name"] = "popup_regist_reservation"; params["action"] = "reservation_view_main_reserve_add"; @@ -268,6 +268,9 @@ clsReservation.prototype = { if (time) { params["time"] = time; } + if (timeframe_id) { + params["timeframe_id"] = timeframe_id; + } commonCls.sendPopupView(event, params, {"top_el":$(this.id),"modal_flag":true}); }, showReserveDetails: function(event, reserve_id) { @@ -432,6 +435,9 @@ clsReservation.prototype = { }, addReserve: function(id, form_el, details_flag) { + + this._switchTimeframeDisable(form_el, false); + if (details_flag == "1") { var description = this.textarea.getTextArea(); var params_str = "action=reservation_action_main_reserve_add&details_flag=1&" + Form.serialize(form_el) + @@ -448,9 +454,16 @@ clsReservation.prototype = { reservationCls[id].changeReservation(); commonCls.removeBlock(this.id); }.bind(this); + params["callbackfunc_error"] = function(res) { + this._switchTimeframeDisable(form_el, true); + commonCls.alert(res); + }.bind(this); commonCls.sendPost(this.id, params_str, params); }, modifyReserve: function(id, form_el) { + + this._switchTimeframeDisable(form_el, false); + var description = this.textarea.getTextArea(); var params_str = "action=reservation_action_main_reserve_modify&" + Form.serialize(form_el) + "&description=" + encodeURIComponent(description); @@ -463,6 +476,10 @@ clsReservation.prototype = { reservationCls[id].changeReservation(); commonCls.removeBlock(this.id); }.bind(this); + params["callbackfunc_error"] = function(res) { + this._switchTimeframeDisable(form_el, true); + commonCls.alert(res); + }.bind(this); commonCls.sendPost(this.id, params_str, params); }, deleteReserve: function(id, reserve_id, edit_rrule, confirm_mes) { @@ -477,6 +494,18 @@ clsReservation.prototype = { commonCls.sendPost(this.id, "action=reservation_action_main_reserve_delete&reserve_id=" + reserve_id + "&edit_rrule=" + edit_rrule, params); }, + _switchTimeframeDisable: function(form_el, opeflag) { + if(form_el.start_timeframe && form_el.end_timeframe) { + if($F(form_el.start_timeframe).length != 0) { + form_el.start_hour.disabled = opeflag; + form_el.start_minute.disabled = opeflag; + } + if($F(form_el.end_timeframe).length != 0) { + form_el.end_hour.disabled = opeflag; + form_el.end_minute.disabled = opeflag; + } + } + }, sendMail: function() { commonCls.sendPost(this.id, "action=reservation_action_main_reserve_mail", {"loading_el":null}); }, @@ -639,11 +668,23 @@ clsReservation.prototype = { form_el.start_minute.disabled = true; form_el.end_hour.disabled = true; form_el.end_minute.disabled = true; + if(form_el.start_timeframe) { + form_el.start_timeframe.disabled = true; + } + if(form_el.end_timeframe) { + form_el.end_timeframe.disabled = true; + } } else { form_el.start_hour.disabled = false; form_el.start_minute.disabled = false; form_el.end_hour.disabled = false; form_el.end_minute.disabled = false; + if(form_el.start_timeframe) { + form_el.start_timeframe.disabled = false; + } + if(form_el.end_timeframe) { + form_el.end_timeframe.disabled = false; + } } this.switchTime24Reserve(form_el); }, @@ -713,6 +754,31 @@ clsReservation.prototype = { form_el.start_time_fixation.disabled = true; } }, + switchTimeframe: function(el, form_el, tgt_str) { + var times_str = $F(el); + var tgt_hour_el = $("reservation_" + tgt_str + "_hour" + this.id); + var tgt_minute_el = $("reservation_" + tgt_str + "_minute" + this.id); + + if(times_str.length == 0) { + tgt_hour_el.disabled = false; + tgt_minute_el.disabled = false; + } + else { + var times = $F(el).split('|'); + Form.Element.SetSerializers.select(tgt_hour_el, times[0]); + Form.Element.SetSerializers.select(tgt_minute_el, times[1]); + tgt_hour_el.disabled = true; + tgt_minute_el.disabled = true; +/* + if(tgt_str=="start") { + if($F("reservation_end_timeframe"+this.id).length == 0) { + $("reservation_end_timeframe"+this.id).selectedIndex = el.selectedIndex; + this.switchTimeframe($("reservation_end_timeframe"+this.id), form_el, "end"); + } + } +*/ + } + }, changeStyle: function(form_el) { this.scrollTop = null; this.scrollLeft = null; @@ -1032,6 +1098,34 @@ clsReservation.prototype = { commonCls.sendPost(this.id, params_str, params); }, + /* + * Timeframe functions + */ + switchTimeframeTime24: function(form_el) { + if (form_el.end_hour.value == "24") { + form_el.end_minute.disabled = true; + form_el.end_minute.value = "00"; + } else { + form_el.end_minute.disabled = false; + } + }, + + switchTimeframeColor: function(el, form_el) { + var color = form_el.timeframe_color.value; + Element.setStyle(el, {"backgroundColor":color}); + }, + + setTimeframe: function(form_el, block_id) { + var target_el = $("_"+block_id); + var params = new Object(); + params["callbackfunc"] = function(res){ + commonCls.sendView(target_el, "action=reservation_view_edit_timeframe" ); + commonCls.removeBlock(this.id); + }.bind(this); + commonCls.sendPost(this.id, 'action=reservation_action_edit_timeframe_entry&' + + Form.serialize(form_el) , params); + }, + /* * Function of mail registration */ diff --git a/html/webapp/modules/reservation/install.ini b/html/webapp/modules/reservation/install.ini old mode 100644 new mode 100755 index f5fec1c..bb9ed73 --- a/html/webapp/modules/reservation/install.ini +++ b/html/webapp/modules/reservation/install.ini @@ -1,4 +1,4 @@ -version = "2.4.1.0" +version = "2.4.2.1" action_name = "reservation_view_main_init" edit_action_name = "reservation_view_edit_style_init" block_add_action = "reservation_action_edit_addblock" @@ -24,6 +24,8 @@ mail_subject = "RESERVATION_MAIL_SUBJECT" mail_body = "RESERVATION_MAIL_BODY" mail_authority = "_AUTH_GUEST" +timeframe_color = "#ffc9c9|#ffeeb5|#d7fab4|#d3f4ff|#cfd7ff|#ffdffb|#ffd7b0" + [CleanUp] reservation_reserve_details = description reservation_location_details = description diff --git a/html/webapp/modules/reservation/language/chinese/main.ini b/html/webapp/modules/reservation/language/chinese/main.ini index 8f64750..d1f0531 100644 --- a/html/webapp/modules/reservation/language/chinese/main.ini +++ b/html/webapp/modules/reservation/language/chinese/main.ini @@ -21,6 +21,7 @@ reservation_error_holiday = "获取节日数据失败。" reservation_auth = "权限设置" reservation_location_manage = "显示列表" reservation_location_add = "注册新设施" +reservation_timeframe = "时间框架设置" reservation_mail = "邮件设置" reservation_csv_import = "导入" @@ -35,6 +36,9 @@ reservation_each_location = "每日" reservation_default_location = "默认设施" +reservation_timeframe = "时间框架显示" +reservation_timeframe_on = "显示的时间框架" + reservation_start_time = "预约开始时间" reservation_start_time_default = "随到随用" reservation_start_time_fixation = "预定时间" @@ -158,6 +162,7 @@ reservation_display_monthly = "正在显示月历" reservation_display_weekly = "正在显示周历" reservation_display_location = "正在显示每日时刻" +reservation_time_pause = "~" [Reservation_View_Main_Reserve:Reservation_View_Edit_Import_Init] reservation_reserve_flag = "群组" @@ -295,6 +300,9 @@ reservation_rrule_term_until = "结束日期 " reservation_rrule_count = " 次" +reservation_timeframe_start_frame = "--开始帧--" +reservation_timeframe_end_frame = "--结束帧--" + [Reservation_View_Main_Movedate] reservation_year_format = "%s" reservation_move = "跳转到..." @@ -319,11 +327,11 @@ reservation_all_delete_mess1 = "選択している施設に対して、全ての reservation_all_delete_mess2 = "選択している施設・利用するグループに対して、予約を削除してインポートします。\n本当によろしいですか。" reservation_duplication = "重複した件名と予約日時は無視する" reservation_select_upload = "请指定您要导入的CSV文件。" -researchmap_file_name = "CSV文件: " -researchmap_download_format = "下载格式" -researchmap_download_format_title = "CSVファイルからデータを取り込みます。" -researchmap_download_desc = "各項目の説明" -researchmap_download_desc_title = "各項目を説明します。" +reservation_file_name = "CSV文件: " +reservation_download_format = "下载格式" +reservation_download_format_title = "CSVファイルからデータを取り込みます。" +reservation_download_desc = "各項目の説明" +reservation_download_desc_title = "各項目を説明します。" reservation_import = "导入" reservation_help_desc = "インポートファイルへの設定項目の詳細は、下記を参照ください。

なお、各項目を無指定とする場合、空白の代わりに文字列「null」を設定してください。

また、無指定(「null」指定)または指定外の設定をした場合、未設定 とします。" reservation_help_header_item = "选项" @@ -351,3 +359,29 @@ define:RESERVATION_ERR_FILE_FORMAT = "フォーマットが正しくありませ cv_import_success = "CSVファイルからの取り込みが正常に終了しました。" define:RESERVATION_ERR_NUM = "%s行目: " define:RESERVATION_INVALID_TIME = "您不能输入%s。请输入正确的期。" + + +[Reservation_View_Edit_Timeframe_Entry:Reservation_Action_Edit_Timeframe_Entry] +reservation_timeframe_name_label = "时间框架名称" +reservation_timeframe_range_label = "时间范围" +reservation_timeframe_color_label = "时间框架的颜色" + + +[Reservation_View_Edit_Timeframe] +reservation_timeframe_add_message = "我会加一个时间框架" +reservation_timeframe_add_title = "添加定义一个时间框架" +reservation_timeframe_no_exists = "尚未注册时间框架。" +reservation_time_pause = " ~ " +reservation_timeframe_delete_confirm_message = "你要删除“%s的”吗?" + +[Reservation_View_Edit_Timeframe_Entry] +_dialog_name = "时间框架设置" +reservation_hour_format = "%s:" +reservation_minute_format = "%s" +reservation_timeframe_color_select_message = "--请选择一种颜色--" + +[Reservation_Action_Edit_Timeframe_Entry] +define:RESERVATION_ERR_FROM_TO_DATE = "在设定的时间有误差。请设置正确的时间框架。" +reservation_err_match_color = "不正确选定的颜色。请选择一个不同的颜色。" +reservation_timeframe_timetable_duplicated = "重叠的帧的开始时间的时间帧/结束时间,已经被注册。请修改" +define:RESERVATION_ERR_TIMEFRAME_MIN_TIME = "我可以指定在15分钟的时间框架。开始,请适当调整的结束时间。" \ No newline at end of file diff --git a/html/webapp/modules/reservation/language/english/main.ini b/html/webapp/modules/reservation/language/english/main.ini index 7f1acae..2b31be1 100644 --- a/html/webapp/modules/reservation/language/english/main.ini +++ b/html/webapp/modules/reservation/language/english/main.ini @@ -21,6 +21,7 @@ reservation_error_holiday = "Failed while obtaining the holiday data." reservation_auth = "Authority setting" reservation_location_manage = "Show list" reservation_location_add = "Register new" +reservation_timeframe = "Timeframe setting" reservation_mail = "Mail setting" reservation_csv_import = "Import" @@ -35,6 +36,9 @@ reservation_each_location = "Daily" reservation_default_location = "Default institution" +reservation_timeframe = "Timeframes" +reservation_timeframe_on = "Display timeframe" + reservation_start_time = "Starting time" reservation_start_time_default = "alters by time of use" reservation_start_time_fixation = "fixed" @@ -158,6 +162,7 @@ reservation_display_monthly = "Monthly calendar is shown" reservation_display_weekly = "Weekly calendar is shown" reservation_display_location = "Daily calendar is shown" +reservation_time_pause = " - " [Reservation_View_Main_Reserve:Reservation_View_Edit_Import_Init] reservation_reserve_flag = "Group" @@ -295,6 +300,10 @@ reservation_rrule_term_until = "End date " reservation_rrule_count = " times" +reservation_timeframe_start_frame = "--start timeframe--" +reservation_timeframe_end_frame = "--end timeframe--" + + [Reservation_View_Main_Movedate] reservation_year_format = "%s" reservation_move = "Goto..." @@ -319,11 +328,11 @@ reservation_all_delete_mess1 = "Delete all reservation items and import.\nAre yo reservation_all_delete_mess2 = "Delete reservation items and import.\nAre you sure?" reservation_duplication = "The duplicate subject name and reservation time are disregarded. " reservation_select_upload = "Please designate CSV file for import." -researchmap_file_name = "CSV file " -researchmap_download_format = "Download format" -researchmap_download_format_title = "Import from CSV file." -researchmap_download_desc = "Explanations of items" -researchmap_download_desc_title = "Explain items." +reservation_file_name = "CSV file " +reservation_download_format = "Download format" +reservation_download_format_title = "Import from CSV file." +reservation_download_desc = "Explanations of items" +reservation_download_desc_title = "Explain items." reservation_import = "Import" reservation_help_desc = "To see details of import file item settings, please see below.

Further, for itesm that have no settings, enter 'null' instead of blank spaces.

Also, in the case of no setting (setting of 'null') or outside range setting, it is changed to 'no setting'." reservation_help_header_item = "Item" @@ -351,3 +360,28 @@ define:RESERVATION_ERR_FILE_FORMAT = "Formats are different." cv_import_success = "Import from CSV file has completed normally." define:RESERVATION_ERR_NUM = "line number %s: " define:RESERVATION_INVALID_TIME = "Unauthorized input, %s. Please input the correct time." + +[Reservation_View_Edit_Timeframe_Entry:Reservation_Action_Edit_Timeframe_Entry] +reservation_timeframe_name_label = "Timeframe name" +reservation_timeframe_range_label = "Timeframe range" +reservation_timeframe_color_label = "Timeframe color" + + +[Reservation_View_Edit_Timeframe] +reservation_timeframe_add_message = "Adding a timeframe" +reservation_timeframe_add_title = "Add timeframe" +reservation_timeframe_no_exists = "Timeframe is not registered yet." +reservation_time_pause = " - " +reservation_timeframe_delete_confirm_message = "Do you want to delete [%s]?" + +[Reservation_View_Edit_Timeframe_Entry] +_dialog_name = "Timeframe setting" +reservation_hour_format = "%s:" +reservation_minute_format = "%s" +reservation_timeframe_color_select_message = "--Select a color--" + +[Reservation_Action_Edit_Timeframe_Entry] +define:RESERVATION_ERR_FROM_TO_DATE = "There is an error in the setting of time. Please set the correct time." +reservation_err_match_color = "There is an error in the setting of color. Please select the correct color." +reservation_timeframe_timetable_duplicated = "This time range has been already registered. Try different time." +define:RESERVATION_ERR_TIMEFRAME_MIN_TIME = "At least 15 minutes is required for timeframe." \ No newline at end of file diff --git a/html/webapp/modules/reservation/language/japanese/main.ini b/html/webapp/modules/reservation/language/japanese/main.ini index df04b08..fc8cfb3 100644 --- a/html/webapp/modules/reservation/language/japanese/main.ini +++ b/html/webapp/modules/reservation/language/japanese/main.ini @@ -21,6 +21,7 @@ reservation_error_holiday = "祝日データを取得する際にエラーが発 reservation_auth = "権限設定" reservation_location_manage = "施設管理" reservation_location_add = "施設登録" +reservation_timeframe = "時間枠管理" reservation_mail = "メール設定" reservation_csv_import = "予約のインポート" @@ -35,6 +36,9 @@ reservation_each_location = "日表示(カテゴリ別)" reservation_default_location = "最初に表示する施設" +reservation_timeframe = "時間枠表示" +reservation_timeframe_on = "時間枠を表示する" + reservation_start_time = "表示開始時" reservation_start_time_default = "閲覧時刻により変動" reservation_start_time_fixation = "固定" @@ -158,6 +162,7 @@ reservation_display_monthly = "月別予約状況を表示しています。" reservation_display_weekly = "週別予約状況を表示しています。" reservation_display_location = "施設別予約状況を表示しています。" +reservation_time_pause = "~" [Reservation_View_Main_Reserve:Reservation_View_Edit_Import_Init] reservation_reserve_flag = "利用するグループ" @@ -295,6 +300,9 @@ reservation_rrule_term_until = "終了日による指定 " reservation_rrule_count = "回" +reservation_timeframe_start_frame = "--開始枠--" +reservation_timeframe_end_frame = "--終了枠--" + [Reservation_View_Main_Movedate] reservation_year_format = "%s年" reservation_move = "移動" @@ -319,11 +327,11 @@ reservation_all_delete_mess1 = "選択している施設に対して、全予約 reservation_all_delete_mess2 = "選択している施設・利用グループに対して、全予約を削除してインポートします。\n本当によろしいですか。" reservation_duplication = "件名と予約日時が一致するデータは無視する" reservation_select_upload = "インポートファイルを指定してください。" -researchmap_file_name = "CSVファイル " -researchmap_download_format = "フォーマットのダウンロード" -researchmap_download_format_title = "CSVファイルからデータを取り込みます。" -researchmap_download_desc = "各項目の説明" -researchmap_download_desc_title = "各項目を説明します。" +reservation_file_name = "CSVファイル " +reservation_download_format = "フォーマットのダウンロード" +reservation_download_format_title = "CSVファイルからデータを取り込みます。" +reservation_download_desc = "各項目の説明" +reservation_download_desc_title = "各項目を説明します。" reservation_import = "取り込み" reservation_help_desc = "インポートファイルへの設定項目の詳細は、下記を参照ください。

なお、各項目を無指定とする場合、空白の代わりに文字列「null」を設定してください。

また、無指定(「null」指定)または指定外の設定をした場合、未設定 とします。" reservation_help_header_item = "項目" @@ -351,3 +359,28 @@ define:RESERVATION_ERR_FILE_FORMAT = "フォーマットが正しくありませ cv_import_success = "CSVファイルからの取り込みが正常に終了しました。" define:RESERVATION_ERR_NUM = "%s行目: " define:RESERVATION_INVALID_TIME = "入力された%sが不正です。正しい時間を入力して下さい" + +[Reservation_View_Edit_Timeframe_Entry:Reservation_Action_Edit_Timeframe_Entry] +reservation_timeframe_name_label = "時間枠名" +reservation_timeframe_range_label = "時間範囲" +reservation_timeframe_color_label = "時間枠色" + + +[Reservation_View_Edit_Timeframe] +reservation_timeframe_add_message = "時間枠を追加します" +reservation_timeframe_add_title = "時間枠定義の追加" +reservation_timeframe_no_exists = "時間枠はまだ登録されていません。" +reservation_time_pause = " ~ " +reservation_timeframe_delete_confirm_message = "「%s」を削除してよろしいですか?" + +[Reservation_View_Edit_Timeframe_Entry] +_dialog_name = "時間枠設定" +reservation_hour_format = "%s時" +reservation_minute_format = "%s分" +reservation_timeframe_color_select_message = "--色を選んでください--" + +[Reservation_Action_Edit_Timeframe_Entry] +define:RESERVATION_ERR_FROM_TO_DATE = "時間の設定に誤りがあります。正しい時間枠を設定してください。" +reservation_err_match_color = "選択された色は正しくありません。別の色を選択して下さい。" +reservation_timeframe_timetable_duplicated = "時間枠の開始時間/終了時間が、すでに登録されている枠と重なっています。修正して下さい。" +define:RESERVATION_ERR_TIMEFRAME_MIN_TIME = "時間枠は15分単位で指定できます。開始、終了時間を適切に調整してください。" \ No newline at end of file diff --git a/html/webapp/modules/reservation/sql/mysql/table.sql b/html/webapp/modules/reservation/sql/mysql/table.sql index 24724cd..a77293d 100644 --- a/html/webapp/modules/reservation/sql/mysql/table.sql +++ b/html/webapp/modules/reservation/sql/mysql/table.sql @@ -63,6 +63,7 @@ CREATE TABLE `reservation_reserve_details` ( CREATE TABLE `reservation_block` ( `block_id` int(11) unsigned NOT NULL, `display_type` tinyint unsigned NOT NULL default '0', + `display_timeframe` tinyint(1) NOT NULL default '0', `display_start_time` varchar(64) NOT NULL default '', `display_interval` tinyint unsigned NOT NULL default '0', `category_id` int(11) unsigned NOT NULL default '0', @@ -130,6 +131,31 @@ CREATE TABLE `reservation_location_details` ( KEY `room_id` (`room_id`) ) ENGINE=MyISAM; +-- -------------------------------------------------------- + +-- - +-- Table Structure `reservation_timeframe` +-- - + +CREATE TABLE `reservation_timeframe` ( + `timeframe_id` int(11) unsigned NOT NULL, + `timeframe_name` varchar(255) NOT NULL default '', + `start_time` varchar(14) NOT NULL default '', + `end_time` varchar(14) NOT NULL default '', + `timezone_offset` float(3,1) NOT NULL default '0.0', + `timeframe_color` varchar(16) NOT NULL default '', + `insert_time` varchar(14) NOT NULL default '', + `insert_site_id` varchar(40) NOT NULL default '', + `insert_user_id` varchar(40) NOT NULL default '', + `insert_user_name` varchar(255) NOT NULL default '', + `update_time` varchar(14) NOT NULL default '', + `update_site_id` varchar(40) NOT NULL default '', + `update_user_id` varchar(40) NOT NULL default '', + `update_user_name` varchar(255) NOT NULL default '', + PRIMARY KEY (`timeframe_id`) +) ENGINE=MyISAM; + + -- -------------------------------------------------------- -- - diff --git a/html/webapp/modules/reservation/templates/default/reservation_main_addreserve.html b/html/webapp/modules/reservation/templates/default/reservation_main_addreserve.html index b9ea1da..1b63986 100644 --- a/html/webapp/modules/reservation/templates/default/reservation_main_addreserve.html +++ b/html/webapp/modules/reservation/templates/default/reservation_main_addreserve.html @@ -2,17 +2,29 @@ <{if ($smarty.session._user_id && $smarty.session._user_id != "0") }> <{if ($location_id != 0) }> - - " class="icon" alt="<{$lang.reservation_easy_addreserve|smarty:nodefaults}>" title="<{$lang.reservation_easy_addreserve|smarty:nodefaults}>" /> - - <{elseif ($hour === "") }> - + <{if ($hour === "" && $timeframe_id === "") }> + + <{elseif $timeframe_id === ""}> + + <{else}> + + <{/if}> " class="icon" alt="<{$lang.reservation_easy_addreserve|smarty:nodefaults}>" title="<{$lang.reservation_easy_addreserve|smarty:nodefaults}>" /> <{else}> - - " class="icon" alt="<{$lang.reservation_easy_addreserve|smarty:nodefaults}>" title="<{$lang.reservation_easy_addreserve|smarty:nodefaults}>" /> - + <{if ($hour === "" && $timeframe_id === "") }> + + " class="icon" alt="<{$lang.reservation_easy_addreserve|smarty:nodefaults}>" title="<{$lang.reservation_easy_addreserve|smarty:nodefaults}>" /> + + <{elseif $timeframe_id === ""}> + + " class="icon" alt="<{$lang.reservation_easy_addreserve|smarty:nodefaults}>" title="<{$lang.reservation_easy_addreserve|smarty:nodefaults}>" /> + + <{else}> + + " class="icon" alt="<{$lang.reservation_easy_addreserve|smarty:nodefaults}>" title="<{$lang.reservation_easy_addreserve|smarty:nodefaults}>" /> + + <{/if}> <{/if}> <{else}>   diff --git a/html/webapp/modules/reservation/templates/default/reservation_reserve_details_reserve_time.html b/html/webapp/modules/reservation/templates/default/reservation_reserve_details_reserve_time.html index a73b5fc..63e61c2 100644 --- a/html/webapp/modules/reservation/templates/default/reservation_reserve_details_reserve_time.html +++ b/html/webapp/modules/reservation/templates/default/reservation_reserve_details_reserve_time.html @@ -4,6 +4,19 @@ <{$lang.reservation_reserve_time|smarty:nodefaults}> + <{if $action.reserve_block.display_timeframe == $smarty.const._ON}> + <{if !empty($action.start_timeframe|smarty:nodefaults) && !empty($action.end_timeframe|smarty:nodefaults)}> + <{if $action.start_timeframe.timeframe_id == $action.end_timeframe.timeframe_id}> + <{$action.start_timeframe.timeframe_name}> + <{else}> + <{$action.start_timeframe.timeframe_name}> + <{$lang.reservation_time_pause|smarty:nodefaults}> + <{$action.end_timeframe.timeframe_name}> + <{/if}> +
+ <{/if}> + <{/if}> + <{if ($action.reserve.start_date_view == $action.reserve.end_date_view) }> <{$action.reserve.start_date_str}> <{if ($action.reserve.start_time_view != "000000" && $action.reserve.start_time_view != "240000") }> diff --git a/html/webapp/modules/reservation/templates/default/reservation_reserve_regist_reserve_time.html b/html/webapp/modules/reservation/templates/default/reservation_reserve_regist_reserve_time.html index 182b7aa..2498fa5 100644 --- a/html/webapp/modules/reservation/templates/default/reservation_reserve_regist_reserve_time.html +++ b/html/webapp/modules/reservation/templates/default/reservation_reserve_regist_reserve_time.html @@ -7,14 +7,33 @@ - + - + + <{if $action.reserve_block.display_timeframe == $smarty.const._ON && $action.timeframe_list_count!=0}> +
+ + + <{$lang.reservation_time_pause|smarty:nodefaults}> + + + <{/if}> +
- <{if ($reserve.allday_flag == _ON) }> disabled="disabled"<{/if}>> <{section name=hour loop=24 start=0 step=1}> <{assign var=hour value=$smarty.section.hour.index}> <{assign var=reserve_hour value=$reserve.start_time_view|substr:0:2|intval}> @@ -24,7 +43,7 @@ <{/section}>   - <{if ($reserve.allday_flag == _ON) }> disabled="disabled"<{/if}>> <{section name=minute loop=60 start=0 step=5}> <{assign var=minute value=$smarty.section.minute.index}> <{assign var=reserve_minute value=$reserve.start_time_view|substr:2:2|intval}> @@ -33,10 +52,10 @@ <{/section}> - + <{$lang.reservation_time_pause|smarty:nodefaults}> - - <{if ($reserve.allday_flag == _ON) }> disabled="disabled"<{/if}> onchange='reservationCls["<{$id}>"].switchTime24Reserve(this.form);'> <{section name=hour loop=25 start=0 step=1}> <{assign var=hour value=$smarty.section.hour.index}> <{assign var=reserve_hour value=$reserve.end_time_view|substr:0:2|intval}> @@ -46,7 +65,7 @@ <{/section}>   - <{if ($reserve.allday_flag == _ON) }> disabled="disabled"<{/if}>> <{section name=minute loop=60 start=0 step=5}> <{assign var=minute value=$smarty.section.minute.index}> <{assign var=reserve_minute value=$reserve.end_time_view|substr:2:2|intval}> diff --git a/html/webapp/modules/reservation/templates/default/reservation_style_timeframe_type.html b/html/webapp/modules/reservation/templates/default/reservation_style_timeframe_type.html new file mode 100644 index 0000000..b952784 --- /dev/null +++ b/html/webapp/modules/reservation/templates/default/reservation_style_timeframe_type.html @@ -0,0 +1,15 @@ +<{strip}> + + + + + + + + +<{/strip}> \ No newline at end of file diff --git a/html/webapp/modules/reservation/templates/default/reservation_view_edit_import_init.html b/html/webapp/modules/reservation/templates/default/reservation_view_edit_import_init.html index 6c1b384..6cd6268 100644 --- a/html/webapp/modules/reservation/templates/default/reservation_view_edit_import_init.html +++ b/html/webapp/modules/reservation/templates/default/reservation_view_edit_import_init.html @@ -49,7 +49,7 @@
<{* CSVファイル *}>
@@ -57,13 +57,13 @@ @@ -78,7 +78,7 @@ <{* 各項目の説明 *}>