diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..36b49f3
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,42 @@
+#-----------------------------------
+#- NetCommons2用 無視ファイル設定
+#-----------------------------------
+
+/html/images
+/html/js
+/html/themes
+/html/htdocs/images
+/html/htdocs/js
+/html/htdocs/themes
+
+/html/webapp/templates_c/*
+/html/webapp/uploads/*
+
+# install.inc.php はサーバにコミットされているので、
+# この無視ファイルでは無視できない。(以下のファイル)
+# html/webapp/config/install.inc.php
+# そのため、以下のGit のShell コマンドで無視設定する。
+# git update-index --assume-unchanged html\webapp\config\install.inc.php
+# Git Shell プロンプトを起動し、develop ブランチへ移動、無視ファイル指定のコマンドを実行する。
+# C:\Github\NetCommons2 > git init .
+# C:\Github\NetCommons2 > git checkout -b develop
+# C:\Github\NetCommons2 [develop +0 ~1 -0]> git update-index --assume-unchanged html\webapp\config\install.inc.php
+
+# Eclipse開発用無視ファイル設定
+/.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
index 01e9dcc..2a9eef1 100644
--- a/docs/CHANGES.txt
+++ b/docs/CHANGES.txt
@@ -1,6 +1,92 @@
NetComomns2 Changelog
===============================
+2013/08/29: Version 2.4.2.0
+- メニューでプルダウンテンプレートを追加
+- メニューでパンくずリストテンプレートを追加
+- ルーム管理で参加会員エクスポート、インポート機能を追加
+- 施設予約で時間枠機能を追加
+- アンケートでキーフレーズ機能を追加
+- アンケートで回答非表示機能を追加
+- Todoにブロックコピー機能を追加
+- PHP5.4暫定対応
+- GitHub無視ファイルの定義を追加
+- Thumbs.dbファイルを削除
+- ソースコードのインデントを一部修正
+- 会員登録で択一選択の必須入力エラーメッセージが正しく表示されるように修正
+- カレンダーでセンターカラム以外に配置した時のデフォルトルームを表示しているルームになるように修正
+- フォトアルバムがIE10で動作しない不具合を修正
+
+
+
+2013/05/20: Version 2.4.1.0
+===============================
+- 会員の新規申込みで複数選択項目があった場合、その項目を条件とした会員検索にヒットしないバグを修正
+- 会員項目で英語表記の一部を先頭大文字に修正
+- 会員検索でルームに参加していない会員が正しくヒットしないバグを修正
+- 権限管理で不要な定義を削除
+- ページデータの削除処理を共通化
+- パブリックスペースで主坦権限であるユーザーがページ追加できないバグを修正
+- バックアップでhtdocs/index.phpが存在しない場合、フルバックアップができないバグを修正
+- バックアップのルームリストアでアップロードファイルの削除処理を修正
+- システム管理でJavaScript,CSS,gzipの表記を修正
+- モバイル管理の表示メニュー設定に対象外のページが表示されてしまうバグを修正
+- モバイル管理でルーム別メニュー表示をしないに設定した場合、ルームが表示されないことがあるバグを修正
+- スマートフォンでPC用画面に切り替える際に確認メッセージを表示するように修正
+- スマートフォンで機種によって横スクロールしていたが、しないように修正
+- スマートフォンで表示する場合、ページ内リンクのフラグメント(#)以降を削除する処理を追加
+- メールアドレス検索処理の修正、および、共通化
+- カレンダーコンポーネントで月表示の英語表記を修正
+‐ WYSIWYGエディタの画像挿入時に画像サイズ「大・中・小」を選択できるように修正
+‐ WYSIWYGエディタでliタグのvalueが認識されないバグを修正
+‐ WYSIWYGエディタでリンク挿入の英語文言を一部修正
+- 共通定義の文言を一部修正
+- ファイルのダウンロード処理で1Mbyteごとにflushするように修正
+- 固定リンクの使用禁止文字を追加
+- 読み上げソフト用画面をキャンセルする処理を修正
+- インストール後のWelcome文章を修正
+- フッターにある著作権表示の内側余白を修正
+- generatorでDEPRECATEDエラーを抑制する処理を追加
+- システムカラーの定義を6桁のカラーコードに修正
+- ログインで定数を使うように修正
+- お知らせで携帯表示にあるtext/html切替リンクの表示処理を修正
+- 掲示板でフィーチャーフォンのスレッド表示が正しく表示されないバグを修正
+- カレンダーで新着からのリンク先が削除されていた場合、Noticeエラーが発生するバグを修正
+- チャットのデータがNC1からの移行データだった場合、IDが重複してしまうことがあるバグを修正
+- チャットでルームのリストア時にIDが重複してしまうバグを修正
+- 回覧板の追記をWYSIWYGエディタに変更
+- 回覧板で追記のメール件名を入力できるように修正
+- 日誌で同一日付の記事が合った場合、次の記事、前の記事のリンク先が正しくないバグを修正
+- 日誌で携帯版の新着にあるリンク先がコメント画面になってしまうバグを修正
+- 日誌で長いタイトルは改行するように修正
+- リンクリストで表示方法選択がドロップダウンの場合は説明付きチェックボックスを使用不可になるように修正
+- リンクリストでhttpsでも画像が表示するように修正
+- 汎用データベースで項目属性の変更による既存コンテンツ更新処理のバグを修正
+- 汎用データベースで表示直後に改ページが動作しないバグを修正
+- 汎用データベースで検索結果を投票順でソートするとエラーが発生するバグを修正
+- 汎用データベースでルームのリストア時にタイトルメタデータIDが変更されないバグを修正
+- 汎用データベースの表示方法変更画面で登録した表示件数、表示順が表示されるように修正
+- フォトアルバムで選択中のアルバムが削除された場合に表示されるメッセージを修正
+- フォトアルバムで写真画面の幅を大きくするように修正
+- フォトアルバムでスマートフォンの写真一覧画面にある改ページ処理を修正
+- プライベートメッセージの宛先検索でMySQLのバージョンによってエラーが発生するバグを修正
+- プライベートメッセージでグループルームがない場合、宛先の検索がヒットしないバグを修正
+- プライベートメッセージの英語文言を一部修正
+- 登録フォームで入力必須の項目に「0」が登録できないバグを修正
+- 施設予約で利用するグループを変更しても、施設詳細のルームIDが更新されないバグを修正
+- 施設予約のルーム選択リストからパブリックスペース、および、パブリックルームを選択できるように修正
+- 施設予約で登録者を正しく表示するように修正
+- 施設予約の個人的な予約で会員の権限、ルームでの権限を選択できるように修正
+- 施設予約で15分未満の予約をした際に、表示されるメッセージを修正
+- 施設予約の日表示で予約登録画面を開いた場合、選択していたカテゴリを表示するように修正
+- 施設予約で最初に表示する施設を削除すると、Noticeエラーが発生するバグを修正
+- RSSの対象がAtom形式で1件の場合表示されないバグを修正
+- RSSで概要、内容が表示されないことがあるバグを修正
+- 新着情報で古いデータの削除処理を修正
+- 新着情報で長いタイトルは改行するように修正
+
+
+
2012/03/27: Version 2.4.0.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 a21ca1a..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;
@@ -418,7 +418,7 @@ function _showpages_fetchcallback($result, $func_param) {
$row['page_name'] = _SPACE_TYPE_NAME_PUBLIC;
} else if($row['space_type'] ==_SPACE_TYPE_GROUP && $row['private_flag'] ==_ON){
if($row['default_entry_flag'] ==_ON)
- $row['page_name'] = RMAP_MYPOTAL;
+ $row['page_name'] = _SPACE_TYPE_NAME_MYPORTAL;
else
$row['page_name'] = _SPACE_TYPE_NAME_PRIVATE;
} else {
diff --git a/html/maple/filter/Filter_FileUpload.class.php b/html/maple/filter/Filter_FileUpload.class.php
index 4de8642..72d5a04 100644
--- a/html/maple/filter/Filter_FileUpload.class.php
+++ b/html/maple/filter/Filter_FileUpload.class.php
@@ -45,11 +45,11 @@
//include_once MAPLE_DIR.'/core/Token.class.php';
if (!defined('UPLOAD_ERR_OK')) {
- define('UPLOAD_ERR_OK', 0);
- define('UPLOAD_ERR_INI_SIZE', 1);
- define('UPLOAD_ERR_FORM_SIZE', 2);
- define('UPLOAD_ERR_PARTIAL', 3);
- define('UPLOAD_ERR_NO_FILE', 4);
+ define('UPLOAD_ERR_OK', 0);
+ define('UPLOAD_ERR_INI_SIZE', 1);
+ define('UPLOAD_ERR_FORM_SIZE', 2);
+ define('UPLOAD_ERR_PARTIAL', 3);
+ define('UPLOAD_ERR_NO_FILE', 4);
}
/**
@@ -66,118 +66,118 @@
class Filter_FileUpload extends Filter
{
/**
- * コンストラクター
- *
- * @access public
- * @since 3.1.0
- */
- function Filter_FileUpload()
- {
- parent::Filter();
- }
-
- /**
- * ファイルアップロード処理を行う
- *
- * @access public
- * @since 3.1.0
- */
- function execute()
- {
- $log =& LogFactory::getLog();
- $log->trace("Filter_FileUploadの前処理が実行されました", "Filter_FileUpload#execute");
-
- $container =& DIContainerFactory::getContainer();
+ * コンストラクター
+ *
+ * @access public
+ * @since 3.1.0
+ */
+ function Filter_FileUpload()
+ {
+ parent::Filter();
+ }
+
+ /**
+ * ファイルアップロード処理を行う
+ *
+ * @access public
+ * @since 3.1.0
+ */
+ function execute()
+ {
+ $log =& LogFactory::getLog();
+ $log->trace("Filter_FileUploadの前処理が実行されました", "Filter_FileUpload#execute");
+
+ $container =& DIContainerFactory::getContainer();
$fileUpload =& new FileUpload;
$container->register($fileUpload, 'FileUpload');
- $actionChain =& $container->getComponent("ActionChain");
- $errorList =& $actionChain->getCurErrorList();
- if ($errorList->isExists()) {
- $filterChain =& $container->getComponent("FilterChain");
- $filterChain->execute();
- return;
- }
-
- $session =& $container->getComponent("Session");
- $request =& $container->getComponent("Request");
- $configView =& $container->getComponent("configView");
- $commonMain =& $container->getComponent("commonMain");
- $fileView =& $commonMain->registerClass(WEBAPP_DIR.'/components/file/View.class.php', "File_View", "fileView");
-
-
- //パラメータをセット
- $upload_params = $request->getParameter("upload_params");
- $fileUpload->setPageid(intval($request->getParameter("page_id")));
- $fileUpload->setModuleid(intval($request->getParameter("module_id")));
- $unique_id = $request->getParameter("unique_id");
- if(!isset($unique_id)) {
- $unique_id = "0";
- }
- $fileUpload->setUniqueid($unique_id);
- $fileUpload->setDownLoadactionName($request->getParameter("download_action_name"));
-
- $attributes = $this->getAttributes();
-
- if (isset($attributes["name"])) {
- $fileUpload->setName($attributes["name"]);
-
- if (isset($attributes["filemode"])) {
- if (defined($attributes["filemode"])) $attributes["filemode"] = $this->constantDef($attributes["filemode"]);
- $fileUpload->setFilemode($attributes["filemode"]);
- } else {
- //default
- $fileUpload->setFilemode(_UPLOAD_FILE_MODE);
- }
-
- //maple.iniを分析
- $maxsize_ini = array();
- $maxwidth_ini = array();
- $maxheight_ini = array();
- $type_ini = array();
- $extension_ini = array();
- $sizeError_ini = array();
- $widthError_ini = array();
- $heightError_ini = array();
- $typeError_ini = array();
- $extensionError_ini = array();
- $noFileError_ini = array();
- $resize = true; // default:画像の枠が範囲を超えていればリサイズ
- if(isset($attributes["stopper"]) && ($attributes["stopper"] === 0 || $attributes["stopper"] === "0" || $attributes["stopper"] === false || $attributes["stopper"] === "false")) {
- $stopper = false;
- } else {
- //stopper default:true
- $stopper = true;
- }
- if (isset($attributes["allow_attachment"])) {
- //configの権限でアップロード可能かどうかをセット
- $allow_attachment_flag = $session->getParameter("_allow_attachment_flag");
- $attributes_allow_attachment_flag = $this->constantDef($attributes["allow_attachment"]);
- } else {
- $allow_attachment_flag = _ALLOW_ATTACHMENT_ALL;
- $attributes_allow_attachment_flag = _ALLOW_ATTACHMENT_ALL;
- }
-
- //エラーメッセージdefault値指定
- $sizeError_ini["default"] = _FILE_UPLOAD_ERR_SIZE; //vsprintf(_FILE_UPLOAD_ERR_SIZE,_UPLOAD_MAX_SIZE_IMAGE);
- $widthError_ini["default"] = _FILE_UPLOAD_ERR_UPLOAD_WIDTHLARGE; //vsprintf(_FILE_UPLOAD_ERR_UPLOAD_WIDTHLARGE,_UPLOAD_MAX_WIDTH_IMAGE);
- $heightError_ini["default"] = _FILE_UPLOAD_ERR_UPLOAD_HEIGHTLARGE; //vsprintf(_FILE_UPLOAD_ERR_UPLOAD_HEIGHTLARGE,_UPLOAD_MAX_HEIGHT_IMAGE);
- $typeError_ini["default"] = _FILE_UPLOAD_ERR_MIMETYPE;
-
- $noFileError_ini["whether"] = _FILE_UPLOAD_ERR_UPLOAD_NOFILE;
- $noFileError_whether = 0;
- $maxsize_ini["default"] = _UPLOAD_MAX_SIZE_ATTACHMENT;
-
- foreach($attributes as $key => $value) {
- //start_add code
-
- if ((!((strlen($key) == 4 && substr($key,0,4) == "type") || (substr($key,0,4) == "type" && is_numeric(substr($key,5,strlen($key)-6))))) &&
- (!((strlen($key) == 9 && substr($key,0,9) == "extension") || (substr($key,0,9) == "extension" && is_numeric(substr($key,10,strlen($key)-11)))))) {
- $valueArray = explode(",", $value);
- if (count($valueArray) > 1) {
- $printParams = array_slice($valueArray, 1);
- $count = 0;
+ $actionChain =& $container->getComponent("ActionChain");
+ $errorList =& $actionChain->getCurErrorList();
+ if ($errorList->isExists()) {
+ $filterChain =& $container->getComponent("FilterChain");
+ $filterChain->execute();
+ return;
+ }
+
+ $session =& $container->getComponent("Session");
+ $request =& $container->getComponent("Request");
+ $configView =& $container->getComponent("configView");
+ $commonMain =& $container->getComponent("commonMain");
+ $fileView =& $commonMain->registerClass(WEBAPP_DIR.'/components/file/View.class.php', "File_View", "fileView");
+
+
+ //パラメータをセット
+ $upload_params = $request->getParameter("upload_params");
+ $fileUpload->setPageid(intval($request->getParameter("page_id")));
+ $fileUpload->setModuleid(intval($request->getParameter("module_id")));
+ $unique_id = $request->getParameter("unique_id");
+ if(!isset($unique_id)) {
+ $unique_id = "0";
+ }
+ $fileUpload->setUniqueid($unique_id);
+ $fileUpload->setDownLoadactionName($request->getParameter("download_action_name"));
+
+ $attributes = $this->getAttributes();
+
+ if (isset($attributes["name"])) {
+ $fileUpload->setName($attributes["name"]);
+
+ if (isset($attributes["filemode"])) {
+ if (defined($attributes["filemode"])) $attributes["filemode"] = $this->constantDef($attributes["filemode"]);
+ $fileUpload->setFilemode($attributes["filemode"]);
+ } else {
+ //default
+ $fileUpload->setFilemode(_UPLOAD_FILE_MODE);
+ }
+
+ //maple.iniを分析
+ $maxsize_ini = array();
+ $maxwidth_ini = array();
+ $maxheight_ini = array();
+ $type_ini = array();
+ $extension_ini = array();
+ $sizeError_ini = array();
+ $widthError_ini = array();
+ $heightError_ini = array();
+ $typeError_ini = array();
+ $extensionError_ini = array();
+ $noFileError_ini = array();
+ $resize = true; // default:画像の枠が範囲を超えていればリサイズ
+ if(isset($attributes["stopper"]) && ($attributes["stopper"] === 0 || $attributes["stopper"] === "0" || $attributes["stopper"] === false || $attributes["stopper"] === "false")) {
+ $stopper = false;
+ } else {
+ //stopper default:true
+ $stopper = true;
+ }
+ if (isset($attributes["allow_attachment"])) {
+ //configの権限でアップロード可能かどうかをセット
+ $allow_attachment_flag = $session->getParameter("_allow_attachment_flag");
+ $attributes_allow_attachment_flag = $this->constantDef($attributes["allow_attachment"]);
+ } else {
+ $allow_attachment_flag = _ALLOW_ATTACHMENT_ALL;
+ $attributes_allow_attachment_flag = _ALLOW_ATTACHMENT_ALL;
+ }
+
+ //エラーメッセージdefault値指定
+ $sizeError_ini["default"] = _FILE_UPLOAD_ERR_SIZE; //vsprintf(_FILE_UPLOAD_ERR_SIZE,_UPLOAD_MAX_SIZE_IMAGE);
+ $widthError_ini["default"] = _FILE_UPLOAD_ERR_UPLOAD_WIDTHLARGE; //vsprintf(_FILE_UPLOAD_ERR_UPLOAD_WIDTHLARGE,_UPLOAD_MAX_WIDTH_IMAGE);
+ $heightError_ini["default"] = _FILE_UPLOAD_ERR_UPLOAD_HEIGHTLARGE; //vsprintf(_FILE_UPLOAD_ERR_UPLOAD_HEIGHTLARGE,_UPLOAD_MAX_HEIGHT_IMAGE);
+ $typeError_ini["default"] = _FILE_UPLOAD_ERR_MIMETYPE;
+
+ $noFileError_ini["whether"] = _FILE_UPLOAD_ERR_UPLOAD_NOFILE;
+ $noFileError_whether = 0;
+ $maxsize_ini["default"] = _UPLOAD_MAX_SIZE_ATTACHMENT;
+
+ foreach($attributes as $key => $value) {
+ //start_add code
+
+ if ((!((strlen($key) == 4 && substr($key,0,4) == "type") || (substr($key,0,4) == "type" && is_numeric(substr($key,5,strlen($key)-6))))) &&
+ (!((strlen($key) == 9 && substr($key,0,9) == "extension") || (substr($key,0,9) == "extension" && is_numeric(substr($key,10,strlen($key)-11)))))) {
+ $valueArray = explode(",", $value);
+ if (count($valueArray) > 1) {
+ $printParams = array_slice($valueArray, 1);
+ $count = 0;
foreach ($printParams as $subValue) {
if (defined($subValue)) {
$printParams[$count] = $this->constantDef($subValue);
@@ -186,526 +186,569 @@ function execute()
}
if (defined($valueArray[0])) $valueArray[0] = $this->constantDef($valueArray[0]);
$value = vsprintf($valueArray[0],$printParams);
- } else {
- if (defined($value)) $value = $this->constantDef($value);
- }
- } else {
- $valueArray = explode(",", $value);
- if (count($valueArray) == 1) {
- if (defined($value)) $value = $this->constantDef($value);
- }
- }
- if (substr($key,0,11) == "action_name") {
- $fileUpload->setDownLoadactionName($value);
- }
- if (substr($key,0,8) == "maxwidth") {
- if (strlen($key) == 8) {
- $maxwidth_ini["default"] = $value;
- } else if (is_numeric(substr($key,9,strlen($key)-10))) {
- $maxwidth_ini[substr($key,9,strlen($key)-10)] = $value;
- }
- }
- if (substr($key,0,9) == "maxheight") {
- if (strlen($key) == 9) {
- $maxheight_ini["default"] = $value;
- } else if (is_numeric(substr($key,10,strlen($key)-11))) {
- $maxheight_ini[substr($key,10,strlen($key)-11)] = $value;
- }
- }
- if ($key == "resize") {
- if(($value === 1 || $value === "1" || $value === "true" || $value === true)) {
- $resize = true;
- } else {
- $resize = false;
- }
- }
- //
- // 解凍してアップロード
- //
- if ($key == "decompression") {
- if(($value === 1 || $value === "1" || $value === "true" || $value === true)) {
- $this->_decompression($attributes["name"], $fileUpload);
- }
- }
-
- if (substr($key,0,10) == "summaxsize") {
- $summaxsize_ini = $value;
- //if (strlen($key) == 10) {
- // $summaxsize_ini["default"] = $value;
- //} else if (is_numeric(substr($key,11,strlen($key)-12))) {
- // $summaxsize_ini[substr($key,11,strlen($key)-12)] = $value;
- //}
- }
-
+ } else {
+ if (defined($value)) $value = $this->constantDef($value);
+ }
+ } else {
+ $valueArray = explode(",", $value);
+ if (count($valueArray) == 1) {
+ if (defined($value)) $value = $this->constantDef($value);
+ }
+ }
+ if (substr($key,0,11) == "action_name") {
+ $fileUpload->setDownLoadactionName($value);
+ }
+ if (substr($key,0,8) == "maxwidth") {
+ if (strlen($key) == 8) {
+ $maxwidth_ini["default"] = $value;
+ } else if (is_numeric(substr($key,9,strlen($key)-10))) {
+ $maxwidth_ini[substr($key,9,strlen($key)-10)] = $value;
+ }
+ }
+ if (substr($key,0,9) == "maxheight") {
+ if (strlen($key) == 9) {
+ $maxheight_ini["default"] = $value;
+ } else if (is_numeric(substr($key,10,strlen($key)-11))) {
+ $maxheight_ini[substr($key,10,strlen($key)-11)] = $value;
+ }
+ }
+ if ($key == "resize") {
+ if(($value === 1 || $value === "1" || $value === "true" || $value === true)) {
+ $resize = true;
+ } else {
+ $resize = false;
+ }
+ }
+ //
+ // 解凍してアップロード
+ //
+ if ($key == "decompression") {
+ if(($value === 1 || $value === "1" || $value === "true" || $value === true)) {
+ $this->_decompression($attributes["name"], $fileUpload);
+ }
+ }
+
+ if (substr($key,0,10) == "summaxsize") {
+ $summaxsize_ini = $value;
+ //if (strlen($key) == 10) {
+ // $summaxsize_ini["default"] = $value;
+ //} else if (is_numeric(substr($key,11,strlen($key)-12))) {
+ // $summaxsize_ini[substr($key,11,strlen($key)-12)] = $value;
+ //}
+ }
+
//end_add code
-
- if (substr($key,0,7) == "maxsize") {
- if (strlen($key) == 7) {
- $maxsize_ini["default"] = $value;
- } else if (is_numeric(substr($key,8,strlen($key)-9))) {
- $maxsize_ini[substr($key,8,strlen($key)-9)] = $value;
- }
- }
-
- if (substr($key,0,4) == "type") {
- $typeArray = array();
- if (strlen($key) == 4) {
- $typeArray = explode(",", $value);
- $type_ini["default"] = $typeArray;
- } else if (is_numeric(substr($key,5,strlen($key)-6))) {
- $typeArray = explode(",", $value);
- $type_ini[substr($key,5,strlen($key)-6)] = $typeArray;
- }
- }
- //start_add code
- if (substr($key,0,9) == "extension") {
- $extensionArray = array();
- if (strlen($key) == 9) {
- $extensionArray = explode(",", strtolower($value));
- $extension_ini["default"] = $extensionArray;
- } else if (is_numeric(substr($key,10,strlen($key)-11))) {
- $extensionArray = explode(",", strtolower($value));
- $extension_ini[substr($key,10,strlen($key)-11)] = $extensionArray;
- }
- }
- //if ($allow_attachment_flag==_ALLOW_ATTACHMENT_ALL && substr($key,0,14) == "allow_mimetype" && ($value === _ON || $value === "true")) {
- if (($key == "allow_extension" || $key == "allow_mimetype") && ($value === 1 || $value === "1" || $value === "true" || $value === true)) {
- if(!isset($config)) {
- $config = $configView->getConfigByConfname(_SYS_CONF_MODID, "allow_extension");
- }
- if(isset($config["conf_value"])) {
- $allow_extension = $config["conf_value"];
- if($allow_extension != "" && $allow_extension != null) {
- $typeSubArray = array();
- $extensionSubArray = explode(",", strtolower($allow_extension));
- if ($key == "allow_mimetype") {
- $count = 0;
- //$uploadsView =& $this->_container->getComponent("uploadsView");
+
+ if (substr($key,0,7) == "maxsize") {
+ if (strlen($key) == 7) {
+ $maxsize_ini["default"] = $value;
+ } else if (is_numeric(substr($key,8,strlen($key)-9))) {
+ $maxsize_ini[substr($key,8,strlen($key)-9)] = $value;
+ }
+ }
+
+ if (substr($key,0,4) == "type") {
+ $typeArray = array();
+ if (strlen($key) == 4) {
+ $typeArray = explode(",", $value);
+ $type_ini["default"] = $typeArray;
+ } else if (is_numeric(substr($key,5,strlen($key)-6))) {
+ $typeArray = explode(",", $value);
+ $type_ini[substr($key,5,strlen($key)-6)] = $typeArray;
+ }
+ }
+ //start_add code
+ if (substr($key,0,9) == "extension") {
+ $extensionArray = array();
+ if (strlen($key) == 9) {
+ $extensionArray = explode(",", strtolower($value));
+ $extension_ini["default"] = $extensionArray;
+ } else if (is_numeric(substr($key,10,strlen($key)-11))) {
+ $extensionArray = explode(",", strtolower($value));
+ $extension_ini[substr($key,10,strlen($key)-11)] = $extensionArray;
+ }
+ }
+ //if ($allow_attachment_flag==_ALLOW_ATTACHMENT_ALL && substr($key,0,14) == "allow_mimetype" && ($value === _ON || $value === "true")) {
+ if (($key == "allow_extension" || $key == "allow_mimetype") && ($value === 1 || $value === "1" || $value === "true" || $value === true)) {
+ if(!isset($config)) {
+ $config = $configView->getConfigByConfname(_SYS_CONF_MODID, "allow_extension");
+ }
+ if(isset($config["conf_value"])) {
+ $allow_extension = $config["conf_value"];
+ if($allow_extension != "" && $allow_extension != null) {
+ $typeSubArray = array();
+ $extensionSubArray = explode(",", strtolower($allow_extension));
+ if ($key == "allow_mimetype") {
+ $count = 0;
+ //$uploadsView =& $this->_container->getComponent("uploadsView");
if(!class_exists("Uploads_View")) {
include_once WEBAPP_DIR .'/components/uploads/View.class.php';
}
$uploadsView =& new Uploads_View;
- foreach($extensionSubArray as $extensionValue) {
- $typeSubArray[$count] = $uploadsView->mimeinfo("type", "." . $extensionValue);
- $count++;
- }
- //if (strlen($key) == 14) {
- if(isset($type_ini["default"]) && is_array($type_ini["default"]) && count($type_ini["default"]) > 0) {
- $type_ini["default"] = array_merge($type_ini["default"], $typeSubArray);
- } else {
- $type_ini["default"] = $typeSubArray;
- }
- //} else if (is_numeric(substr($key,15,strlen($key)-16))) {
- // if(count($typeArray) > 0) {
- // $type_ini[substr($key,15,strlen($key)-16)] = array_merge($typeArray, $typeSubArray);
- // } else {
- // $type_ini[substr($key,15,strlen($key)-16)] = $typeSubArray;
- // }
- //}
- } else {
- // 拡張子
- if(isset($extension_ini["default"]) && is_array($extension_ini["default"]) && count($extension_ini["default"]) > 0) {
- $extension_ini["default"] = array_merge($extension_ini["default"], $extensionSubArray);
- } else {
- $extension_ini["default"] = $extensionSubArray;
- }
- }
- }
- }
- }
- if(defined($value)) {
- $value = constant($value);
- }
- if (substr($key,0,10) == "widthError") {
- if (strlen($key) == 10) {
- $widthError_ini["default"] = $value;
- } else if (is_numeric(substr($key,11,strlen($key)-12))) {
- $widthError_ini[substr($key,11,strlen($key)-12)] = $value;
- }
- }
- if (substr($key,0,11) == "heightError") {
- if (strlen($key) == 11) {
- $heightError_ini["default"] = $value;
- } else if (is_numeric(substr($key,12,strlen($key)-13))) {
- $heightError_ini[substr($key,12,strlen($key)-13)] = $value;
- }
- }
- if (substr($key,0,12) == "sumsizeError") {
- $sumsizeError_ini = $value;
- //if (strlen($key) == 12) {
- // $sumsizeError_ini["default"] = $value;
- //} else if (is_numeric(substr($key,13,strlen($key)-14))) {
- // $sumsizeError_ini[substr($key,13,strlen($key)-14)] = $value;
- //}
- }
- //end_add code
- if (substr($key,0,9) == "sizeError") {
- if (strlen($key) == 9) {
- $sizeError_ini["default"] = $value;
- } else if (is_numeric(substr($key,10,strlen($key)-11))) {
- $sizeError_ini[substr($key,10,strlen($key)-11)] = $value;
- }
- }
-
- if (substr($key,0,9) == "typeError") {
- if (strlen($key) == 9) {
- $typeError_ini["default"] = $value;
- } else if (is_numeric(substr($key,10,strlen($key)-11))) {
- $typeError_ini[substr($key,10,strlen($key)-11)] = $value;
- }
- }
-
- if (substr($key,0,14) == "extensionError") {
- if (strlen($key) == 14) {
- $extensionError_ini["default"] = $value;
- } else if (is_numeric(substr($key,15,strlen($key)-16))) {
- $extensionError_ini[substr($key,15,strlen($key)-16)] = $value;
- }
- }
-
- if (substr($key,0,11) == "noFileError") {
- if (strlen($key) == 11) {
- $noFileError_ini["default"] = $value;
- } else if (is_numeric(substr($key,12,strlen($key)-13))) {
- $noFileError_ini[substr($key,12,strlen($key)-13)] = $value;
- } else if (substr($key,12,7) == "whether") {
- $noFileError_ini["whether"] = $value;
- $noFileError_whether = 0;
- }
- }
- }
-
- //関連配列
- $error = $fileUpload->getError();
- $extension_check = $fileUpload->checkExtension($extension_ini);
-
- $mime_type_check = $fileUpload->checkMimeType($type_ini);
-
- if($resize) {
- // リサイズ処理
- $fileUpload->resizeFile($maxwidth_ini, $maxheight_ini);
- }
-
- $filesize_check = $fileUpload->checkFilesize($maxsize_ini);
-
- $filewidth_check = $fileUpload->checkFilewidth($maxwidth_ini);
-
- $fileheight_check = $fileUpload->checkFileheight($maxheight_ini);
-
- $message = "";
- //以下はforeachで各ファイルでエラーチェックを行う
- $first_key = null;
- foreach ($error as $key => $val) {
- if($first_key === null) {
- $first_key = $key;
- }
- if ($val != UPLOAD_ERR_OK) {// PHP自体が感知するエラーが発生した場合
- if ($val == UPLOAD_ERR_INI_SIZE) {
- //$errorList->setType(UPLOAD_ERROR_TYPE);
- if (isset($attributes["iniSizeError"])) {
- $message = $attributes["iniSizeError"];
- } else {
- //start_change code
- $message = _FILE_UPLOAD_ERR_MAX_FILESIZE_INI;
- //end_change code
- }
- $fileUpload->setErrorMes($key, $message);
- //$errorList->add($fileUpload->getName()."[".$key."]", $message);
- break;
- } else if ($val == UPLOAD_ERR_FORM_SIZE) {
- //$errorList->setType(UPLOAD_ERROR_TYPE);
- if (isset($attributes["formSizeError"])) {
- $message = $attributes["formSizeError"];
- } else {
- $message = _FILE_UPLOAD_ERR_MAX_FILESIZE;
- }
- $fileUpload->setErrorMes($key, $message);
- //$errorList->add($fileUpload->getName()."[".$key."]", $message);
- break;
- } else if ($val == UPLOAD_ERR_PARTIAL) {
- //$errorList->setType(UPLOAD_ERROR_TYPE);
- if (isset($attributes["partialError"])) {
- $message = $attributes["partialError"];
- } else {
- $message = _FILE_UPLOAD_ERR_PART_OF_FILE;
- }
- //$errorList->add($fileUpload->getName()."[".$key."]", $message);
- $fileUpload->setErrorMes($key, $message);
- break;
- } else if ($val == UPLOAD_ERR_NO_FILE) {
- if (isset($noFileError_ini[$key])) {
- //$errorList->setType(UPLOAD_ERROR_TYPE);
- $message = $noFileError_ini[$key];
- $fileUpload->setErrorMes($key, $message);
- //$errorList->add($fileUpload->getName()."[".$key."]", $message);
- }else if (isset($noFileError_ini["default"])) {
- //$errorList->setType(UPLOAD_ERROR_TYPE);
- $message = $noFileError_ini["default"];
- $fileUpload->setErrorMes($key, $message);
- //$errorList->add($fileUpload->getName()."[".$key."]", $message);
- //break;
- } else if (isset($noFileError_ini["whether"])) {
- $noFileError_whether = $noFileError_whether +1;
- }
- }
- }else {// PHP自体が感知するエラーは発生していない場合
- //
- //アップロード不可
- //
- if($allow_attachment_flag == _ALLOW_ATTACHMENT_NO ||
- ($allow_attachment_flag == _ALLOW_ATTACHMENT_IMAGE && $attributes_allow_attachment_flag ==_ALLOW_ATTACHMENT_ALL)) {
- //var_dump($allow_attachment_flag);
- //var_dump($attributes_allow_attachment_flag);
- $message = _FILE_UPLOAD_ERR_FAILURE;
- $fileUpload->setErrorMes($key, $message);
- continue;
- }
-
- //
- // maple.iniで設定されたサイズを超えていた場合
- //
- if (count($maxsize_ini) > 0) {
- if (!$filesize_check[$key]) {
- //$errorList->setType(UPLOAD_ERROR_TYPE);
- if (isset($sizeError_ini[$key])) {
- $message = vsprintf($sizeError_ini[$key],$maxsize_ini[$key]); //$sizeError_ini[$key];
- }else if (isset($sizeError_ini["default"])) {
- $message = vsprintf($sizeError_ini["default"],$maxsize_ini["default"]);
- } else {
- $message = _FILE_UPLOAD_ERR_FAILURE;
- }
- $fileUpload->setErrorMes($key, $message);
- continue;
- //$errorList->add($fileUpload->getName()."[".$key."]", $message);
- }
- }
-
- //
- // maple.iniで設定されたMIME-Typeではなかった場合
- //
- if (count($type_ini) > 0) {
- if (!$mime_type_check[$key]) {
- //$errorList->setType(UPLOAD_ERROR_TYPE);
- if (isset($typeError_ini[$key])) {
- $message = $typeError_ini[$key];
- }else if (isset($typeError_ini["default"])) {
- $message = $typeError_ini["default"];
- } else {
- $message = _FILE_UPLOAD_ERR_FILENAME_REJECRED;
- }
- $fileUpload->setErrorMes($key, $message);
- continue;
- //$errorList->add($fileUpload->getName()."[".$key."]", $message);
- }
- }
-
-
- //
- // maple.iniで設定された拡張子ではなかった場合
- //
- if (count($extension_ini) > 0) {
- if (!$extension_check[$key]) {
- //$errorList->setType(UPLOAD_ERROR_TYPE);
- if (isset($extensionError_ini[$key])) {
- $message = $extensionError_ini[$key];
- }else if (isset($extensionError_ini["default"])) {
- $message = $extensionError_ini["default"];
- } else {
- $message = _FILE_UPLOAD_ERR_FILENAME_REJECRED;
- }
- $fileUpload->setErrorMes($key, $message);
- continue;
- //$errorList->add($fileUpload->getName()."[".$key."]", $message);
- }
- }
-
- //
- // maple.iniで設定されたWidthを超えていた場合
- //
- if (count($maxwidth_ini) > 0) {
- if (!$filewidth_check[$key]) {
- //$errorList->setType(UPLOAD_ERROR_TYPE);
- if (isset($widthError_ini[$key])) {
- $message = vsprintf($widthError_ini[$key],$maxwidth_ini[$key]);
- }else if (isset($widthError_ini["default"])) {
- $message = vsprintf($widthError_ini["default"],$maxwidth_ini["default"]);
- } else {
- $message = _FILE_UPLOAD_ERR_FAILURE;
- }
- $fileUpload->setErrorMes($key, $message);
- continue;
- //$errorList->add($fileUpload->getName()."[".$key."]", $message);
- }
- }
-
- //
- // maple.iniで設定されたHeightを超えていた場合
- //
- if (count($maxheight_ini) > 0) {
- if (!$fileheight_check[$key]) {
- //$errorList->setType(UPLOAD_ERROR_TYPE);
- if (isset($heightError_ini[$key])) {
- $message = vsprintf($heightError_ini[$key],$maxheight_ini[$key]);
- }else if (isset($heightError_ini["default"])) {
- $message = vsprintf($heightError_ini["default"],$maxheight_ini["default"]);
- } else {
- $message = _FILE_UPLOAD_ERR_FAILURE;
- }
- $fileUpload->setErrorMes($key, $message);
- continue;
- //$errorList->add($fileUpload->getName()."[".$key."]", $message);
- }
- }
- }
- }
- if (isset($noFileError_whether) && count($error) == $noFileError_whether) {
- //$errorList->setType(UPLOAD_ERROR_TYPE);
- $message = $noFileError_ini["whether"];
- //少なくとも1つファイルを指定しないとならないエラーの場合、先頭のfileのエラーリストに追加する key=0固定
- $fileUpload->setErrorMes($first_key, $message);
- //$errorList->add($fileUpload->getName(), $message);
- }
-
- //
- // start_add code
- // ルーム毎の最大容量チェック
- //
- $room_id = intval($request->getParameter("room_id"));
- if($room_id != 0) {
- $getdata =& $container->getComponent("GetData");
- $pages = $getdata->getParameter("pages");
- if(!isset($pages[$room_id])) {
+ foreach($extensionSubArray as $extensionValue) {
+ $typeSubArray[$count] = $uploadsView->mimeinfo("type", "." . $extensionValue);
+ $count++;
+ }
+ //if (strlen($key) == 14) {
+ if(isset($type_ini["default"]) && is_array($type_ini["default"]) && count($type_ini["default"]) > 0) {
+ $type_ini["default"] = array_merge($type_ini["default"], $typeSubArray);
+ } else {
+ $type_ini["default"] = $typeSubArray;
+ }
+ //} else if (is_numeric(substr($key,15,strlen($key)-16))) {
+ // if(count($typeArray) > 0) {
+ // $type_ini[substr($key,15,strlen($key)-16)] = array_merge($typeArray, $typeSubArray);
+ // } else {
+ // $type_ini[substr($key,15,strlen($key)-16)] = $typeSubArray;
+ // }
+ //}
+ } else {
+ // 拡張子
+ if(isset($extension_ini["default"]) && is_array($extension_ini["default"]) && count($extension_ini["default"]) > 0) {
+ $extension_ini["default"] = array_merge($extension_ini["default"], $extensionSubArray);
+ } else {
+ $extension_ini["default"] = $extensionSubArray;
+ }
+ }
+ }
+ }
+ }
+ if(defined($value)) {
+ $value = constant($value);
+ }
+ if (substr($key,0,10) == "widthError") {
+ if (strlen($key) == 10) {
+ $widthError_ini["default"] = $value;
+ } else if (is_numeric(substr($key,11,strlen($key)-12))) {
+ $widthError_ini[substr($key,11,strlen($key)-12)] = $value;
+ }
+ }
+ if (substr($key,0,11) == "heightError") {
+ if (strlen($key) == 11) {
+ $heightError_ini["default"] = $value;
+ } else if (is_numeric(substr($key,12,strlen($key)-13))) {
+ $heightError_ini[substr($key,12,strlen($key)-13)] = $value;
+ }
+ }
+ if (substr($key,0,12) == "sumsizeError") {
+ $sumsizeError_ini = $value;
+ //if (strlen($key) == 12) {
+ // $sumsizeError_ini["default"] = $value;
+ //} else if (is_numeric(substr($key,13,strlen($key)-14))) {
+ // $sumsizeError_ini[substr($key,13,strlen($key)-14)] = $value;
+ //}
+ }
+ //end_add code
+ if (substr($key,0,9) == "sizeError") {
+ if (strlen($key) == 9) {
+ $sizeError_ini["default"] = $value;
+ } else if (is_numeric(substr($key,10,strlen($key)-11))) {
+ $sizeError_ini[substr($key,10,strlen($key)-11)] = $value;
+ }
+ }
+
+ if (substr($key,0,9) == "typeError") {
+ if (strlen($key) == 9) {
+ $typeError_ini["default"] = $value;
+ } else if (is_numeric(substr($key,10,strlen($key)-11))) {
+ $typeError_ini[substr($key,10,strlen($key)-11)] = $value;
+ }
+ }
+
+ if (substr($key,0,14) == "extensionError") {
+ if (strlen($key) == 14) {
+ $extensionError_ini["default"] = $value;
+ } else if (is_numeric(substr($key,15,strlen($key)-16))) {
+ $extensionError_ini[substr($key,15,strlen($key)-16)] = $value;
+ }
+ }
+
+ if (substr($key,0,11) == "noFileError") {
+ if (strlen($key) == 11) {
+ $noFileError_ini["default"] = $value;
+ } else if (is_numeric(substr($key,12,strlen($key)-13))) {
+ $noFileError_ini[substr($key,12,strlen($key)-13)] = $value;
+ } else if (substr($key,12,7) == "whether") {
+ $noFileError_ini["whether"] = $value;
+ $noFileError_whether = 0;
+ }
+ }
+ }
+
+ //関連配列
+ $error = $fileUpload->getError();
+ $extension_check = $fileUpload->checkExtension($extension_ini);
+
+ $mime_type_check = $fileUpload->checkMimeType($type_ini);
+
+ if($resize) {
+ //指定された大きさ(解像度)を取得
+ $resolution = $request->getParameter('resolution');
+
+ $maxwidth = array();
+ $maxheight = array();
+
+ //解像度により maxwidthを設定(maxheightは自動設定)
+ switch ($resolution) {
+ //「実寸大」の場合はリサイズしない
+ case 'asis':
+ break;
+
+ //「大」の場合
+ case 'large':
+ // 幅、高さ設定値を取得
+ $maxwidth['default'] = _UPLOAD_RESOLUTION_IMAGE_LARGE_WIDTH;
+ $maxheight['default'] = _UPLOAD_RESOLUTION_IMAGE_LARGE_HEIGHT;
+ //リサイズ処理
+ $fileUpload->resizeFile($maxwidth, $maxheight);
+ break;
+
+ //「中」の場合
+ case 'middle':
+ // 幅、高さ設定値を取得
+ $maxwidth['default'] = _UPLOAD_RESOLUTION_IMAGE_MIDDLE_WIDTH;
+ $maxheight['default'] = _UPLOAD_RESOLUTION_IMAGE_MIDDLE_HEIGHT;
+ //リサイズ処理
+ $fileUpload->resizeFile($maxwidth, $maxheight);
+ break;
+
+ //「小」の場合
+ case 'small':
+ // 幅、高さ設定値を取得
+ $maxwidth['default'] = _UPLOAD_RESOLUTION_IMAGE_SMALL_WIDTH;
+ $maxheight['default'] = _UPLOAD_RESOLUTION_IMAGE_SMALL_HEIGHT;
+ //リサイズ処理
+ $fileUpload->resizeFile($maxwidth, $maxheight);
+ break;
+
+ //「標準」、指定なしの場合
+ default:
+ //各モジュールのmaple.iniに定義されたサイズでリサイズ処理
+ $fileUpload->resizeFile($maxwidth_ini, $maxheight_ini);
+ break;
+ }
+ }
+
+ $filesize_check = $fileUpload->checkFilesize($maxsize_ini);
+
+ $filewidth_check = $fileUpload->checkFilewidth($maxwidth_ini);
+
+ $fileheight_check = $fileUpload->checkFileheight($maxheight_ini);
+
+ $message = "";
+ //以下はforeachで各ファイルでエラーチェックを行う
+ $first_key = null;
+ foreach ($error as $key => $val) {
+ if($first_key === null) {
+ $first_key = $key;
+ }
+ if ($val != UPLOAD_ERR_OK) {// PHP自体が感知するエラーが発生した場合
+ if ($val == UPLOAD_ERR_INI_SIZE) {
+ //$errorList->setType(UPLOAD_ERROR_TYPE);
+ if (isset($attributes["iniSizeError"])) {
+ $message = $attributes["iniSizeError"];
+ } else {
+ //start_change code
+ $message = _FILE_UPLOAD_ERR_MAX_FILESIZE_INI;
+ //end_change code
+ }
+ $fileUpload->setErrorMes($key, $message);
+ //$errorList->add($fileUpload->getName()."[".$key."]", $message);
+ break;
+ } else if ($val == UPLOAD_ERR_FORM_SIZE) {
+ //$errorList->setType(UPLOAD_ERROR_TYPE);
+ if (isset($attributes["formSizeError"])) {
+ $message = $attributes["formSizeError"];
+ } else {
+ $message = _FILE_UPLOAD_ERR_MAX_FILESIZE;
+ }
+ $fileUpload->setErrorMes($key, $message);
+ //$errorList->add($fileUpload->getName()."[".$key."]", $message);
+ break;
+ } else if ($val == UPLOAD_ERR_PARTIAL) {
+ //$errorList->setType(UPLOAD_ERROR_TYPE);
+ if (isset($attributes["partialError"])) {
+ $message = $attributes["partialError"];
+ } else {
+ $message = _FILE_UPLOAD_ERR_PART_OF_FILE;
+ }
+ //$errorList->add($fileUpload->getName()."[".$key."]", $message);
+ $fileUpload->setErrorMes($key, $message);
+ break;
+ } else if ($val == UPLOAD_ERR_NO_FILE) {
+ if (isset($noFileError_ini[$key])) {
+ //$errorList->setType(UPLOAD_ERROR_TYPE);
+ $message = $noFileError_ini[$key];
+ $fileUpload->setErrorMes($key, $message);
+ //$errorList->add($fileUpload->getName()."[".$key."]", $message);
+ }else if (isset($noFileError_ini["default"])) {
+ //$errorList->setType(UPLOAD_ERROR_TYPE);
+ $message = $noFileError_ini["default"];
+ $fileUpload->setErrorMes($key, $message);
+ //$errorList->add($fileUpload->getName()."[".$key."]", $message);
+ //break;
+ } else if (isset($noFileError_ini["whether"])) {
+ $noFileError_whether = $noFileError_whether +1;
+ }
+ }
+ }else {// PHP自体が感知するエラーは発生していない場合
+ //
+ //アップロード不可
+ //
+ if($allow_attachment_flag == _ALLOW_ATTACHMENT_NO ||
+ ($allow_attachment_flag == _ALLOW_ATTACHMENT_IMAGE && $attributes_allow_attachment_flag ==_ALLOW_ATTACHMENT_ALL)) {
+ //var_dump($allow_attachment_flag);
+ //var_dump($attributes_allow_attachment_flag);
+ $message = _FILE_UPLOAD_ERR_FAILURE;
+ $fileUpload->setErrorMes($key, $message);
+ continue;
+ }
+
+ //
+ // maple.iniで設定されたサイズを超えていた場合
+ //
+ if (count($maxsize_ini) > 0) {
+ if (!$filesize_check[$key]) {
+ //$errorList->setType(UPLOAD_ERROR_TYPE);
+ if (isset($sizeError_ini[$key])) {
+ $message = vsprintf($sizeError_ini[$key],$maxsize_ini[$key]); //$sizeError_ini[$key];
+ }else if (isset($sizeError_ini["default"])) {
+ $message = vsprintf($sizeError_ini["default"],$maxsize_ini["default"]);
+ } else {
+ $message = _FILE_UPLOAD_ERR_FAILURE;
+ }
+ $fileUpload->setErrorMes($key, $message);
+ continue;
+ //$errorList->add($fileUpload->getName()."[".$key."]", $message);
+ }
+ }
+
+ //
+ // maple.iniで設定されたMIME-Typeではなかった場合
+ //
+ if (count($type_ini) > 0) {
+ if (!$mime_type_check[$key]) {
+ //$errorList->setType(UPLOAD_ERROR_TYPE);
+ if (isset($typeError_ini[$key])) {
+ $message = $typeError_ini[$key];
+ }else if (isset($typeError_ini["default"])) {
+ $message = $typeError_ini["default"];
+ } else {
+ $message = _FILE_UPLOAD_ERR_FILENAME_REJECRED;
+ }
+ $fileUpload->setErrorMes($key, $message);
+ continue;
+ //$errorList->add($fileUpload->getName()."[".$key."]", $message);
+ }
+ }
+
+
+ //
+ // maple.iniで設定された拡張子ではなかった場合
+ //
+ if (count($extension_ini) > 0) {
+ if (!$extension_check[$key]) {
+ //$errorList->setType(UPLOAD_ERROR_TYPE);
+ if (isset($extensionError_ini[$key])) {
+ $message = $extensionError_ini[$key];
+ }else if (isset($extensionError_ini["default"])) {
+ $message = $extensionError_ini["default"];
+ } else {
+ $message = _FILE_UPLOAD_ERR_FILENAME_REJECRED;
+ }
+ $fileUpload->setErrorMes($key, $message);
+ continue;
+ //$errorList->add($fileUpload->getName()."[".$key."]", $message);
+ }
+ }
+
+ //
+ // maple.iniで設定されたWidthを超えていた場合
+ //
+ if (count($maxwidth_ini) > 0) {
+ if (!$filewidth_check[$key]) {
+ //$errorList->setType(UPLOAD_ERROR_TYPE);
+ if (isset($widthError_ini[$key])) {
+ $message = vsprintf($widthError_ini[$key],$maxwidth_ini[$key]);
+ }else if (isset($widthError_ini["default"])) {
+ $message = vsprintf($widthError_ini["default"],$maxwidth_ini["default"]);
+ } else {
+ $message = _FILE_UPLOAD_ERR_FAILURE;
+ }
+ $fileUpload->setErrorMes($key, $message);
+ continue;
+ //$errorList->add($fileUpload->getName()."[".$key."]", $message);
+ }
+ }
+
+ //
+ // maple.iniで設定されたHeightを超えていた場合
+ //
+ if (count($maxheight_ini) > 0) {
+ if (!$fileheight_check[$key]) {
+ //$errorList->setType(UPLOAD_ERROR_TYPE);
+ if (isset($heightError_ini[$key])) {
+ $message = vsprintf($heightError_ini[$key],$maxheight_ini[$key]);
+ }else if (isset($heightError_ini["default"])) {
+ $message = vsprintf($heightError_ini["default"],$maxheight_ini["default"]);
+ } else {
+ $message = _FILE_UPLOAD_ERR_FAILURE;
+ }
+ $fileUpload->setErrorMes($key, $message);
+ continue;
+ //$errorList->add($fileUpload->getName()."[".$key."]", $message);
+ }
+ }
+ }
+ }
+ if (isset($noFileError_whether) && count($error) == $noFileError_whether) {
+ //$errorList->setType(UPLOAD_ERROR_TYPE);
+ $message = $noFileError_ini["whether"];
+ //少なくとも1つファイルを指定しないとならないエラーの場合、先頭のfileのエラーリストに追加する key=0固定
+ $fileUpload->setErrorMes($first_key, $message);
+ //$errorList->add($fileUpload->getName(), $message);
+ }
+
+ //
+ // start_add code
+ // ルーム毎の最大容量チェック
+ //
+ $room_id = intval($request->getParameter("room_id"));
+ if($room_id != 0) {
+ $getdata =& $container->getComponent("GetData");
+ $pages = $getdata->getParameter("pages");
+ if(!isset($pages[$room_id])) {
$pagesView =& $container->getComponent("pagesView");
$page = $pagesView->getPageById($room_id);
- } else {
- $page =& $pages[$room_id];
- }
- $max_capacity = 0;
- if($page['private_flag'] == _ON) {
- $max_capacity = $session->getParameter("_private_max_size");
- } else if($page['space_type'] == _SPACE_TYPE_GROUP) {
- $upload_max_capacity_group = $configView->getConfigByConfname(_SYS_CONF_MODID, "upload_max_capacity_group");
+ } else {
+ $page =& $pages[$room_id];
+ }
+ $max_capacity = 0;
+ if($page['private_flag'] == _ON) {
+ $max_capacity = $session->getParameter("_private_max_size");
+ } else if($page['space_type'] == _SPACE_TYPE_GROUP) {
+ $upload_max_capacity_group = $configView->getConfigByConfname(_SYS_CONF_MODID, "upload_max_capacity_group");
if(isset($upload_max_capacity_group['conf_value'])) {
$max_capacity = intval($upload_max_capacity_group['conf_value']);
} else {
$max_capacity = 0;
}
- } else {
- $upload_max_capacity_public = $configView->getConfigByConfname(_SYS_CONF_MODID, "upload_max_capacity_public");
+ } else {
+ $upload_max_capacity_public = $configView->getConfigByConfname(_SYS_CONF_MODID, "upload_max_capacity_public");
if(isset($upload_max_capacity_public['conf_value'])) {
$max_capacity = intval($upload_max_capacity_public['conf_value']);
} else {
$max_capacity = 0;
}
- }
- if($max_capacity != 0) {
- $filesize = $fileUpload->getFilesize();
- $sum_size = 0;
- foreach($filesize as $size) {
- $sum_size = $size;
- }
- $db =& $container->getComponent("DbObject");
- $db_sum_size = intval($db->sumExecute("uploads", "file_size", array("room_id"=>$room_id)));
- $sum_size += $db_sum_size;
- if ($max_capacity < $sum_size) {
- if($max_capacity-$db_sum_size < 0) {
- $rest_size = 0;
- } else {
- $rest_size = $max_capacity-$db_sum_size;
- }
- // エラー
- $message = sprintf(_FILE_UPLOAD_ERR_MAX_CAPACITY, $page['page_name'], $fileView->formatSize($max_capacity), $fileView->formatSize($rest_size));
-
- // key=0固定
- $stopper = _ON;
- $fileUpload->setErrorMes($first_key, $message);
- }
- }
-
- }
- // 合計サイズチェック
- if(isset($summaxsize_ini)) {
- $filesize = $fileUpload->getFilesize();
- $sum_size = 0;
- foreach($filesize as $size) {
- $sum_size = $size;
- }
- if ($summaxsize_ini < $sum_size) {
- // エラー
- if(isset($sumsizeError_ini)) {
- $message = $sumsizeError_ini;
- } else {
- $message = sprintf(_FILE_UPLOAD_ERR_SUMSIZE_SIZE, $fileView->formatSize($summaxsize_ini));
- }
- // key=0固定
- $stopper = _ON;
- $fileUpload->setErrorMes($first_key, $message);
- }
- }
-
- //end_add code
-
-
- if($message != "" && $stopper == _ON) {
- //stopperがONならば、エラーリストに追加し、アクションを呼ばない(エラーリスト追加)
- //最後に発生したエラーをエラーリストへ追加
- $errorList->setType(UPLOAD_ERROR_TYPE);
- $errorList->add($fileUpload->getName(), $message);
- }
- } else {
- $log->trace("フィールド名が指定されていません", "Filter_FileUpload#execute");
- }
-
- $filterChain =& $container->getComponent("FilterChain");
- $filterChain->execute();
-
- $log->trace("Filter_FileUploadの後処理が実行されました", "Filter_FileUpload#execute");
- }
-
- function constantDef($str) {
- if(defined($str)) {
- return constant($str);
- } else {
- return $str;
- }
- }
-
- function _decompression($name, &$fileUpload) {
- $container =& DIContainerFactory::getContainer();
- $actionChain =& $container->getComponent("ActionChain");
- $session =& $container->getComponent("Session");
- $file_extra =& $container->getComponent("File");
-
- $commonMain =& $container->getComponent("commonMain");
- $fileAction =& $commonMain->registerClass(WEBAPP_DIR.'/components/file/Action.class.php', "File_Action", "fileAction");
-
- $action_name = $actionChain->getCurActionName();
- $pathList = explode("_", $action_name);
-
- $cur_sess_id = $session->getID();
-
- require_once "File/Archive.php";
-
- //
- // テンポラリーディレクトリ作成
- //
- if(!file_exists(FILEUPLOADS_DIR.$pathList[0])) {
- mkdir(FILEUPLOADS_DIR.$pathList[0], octdec(_UPLOAD_FOLDER_MODE));
- }
- $file_path = $pathList[0]."/".strtolower($cur_sess_id);
+ }
+ if($max_capacity != 0) {
+ $filesize = $fileUpload->getFilesize();
+ $sum_size = 0;
+ foreach($filesize as $size) {
+ $sum_size = $size;
+ }
+ $db =& $container->getComponent("DbObject");
+ $db_sum_size = intval($db->sumExecute("uploads", "file_size", array("room_id"=>$room_id)));
+ $sum_size += $db_sum_size;
+ if ($max_capacity < $sum_size) {
+ if($max_capacity-$db_sum_size < 0) {
+ $rest_size = 0;
+ } else {
+ $rest_size = $max_capacity-$db_sum_size;
+ }
+ // エラー
+ $message = sprintf(_FILE_UPLOAD_ERR_MAX_CAPACITY, $page['page_name'], $fileView->formatSize($max_capacity), $fileView->formatSize($rest_size));
+
+ // key=0固定
+ $stopper = _ON;
+ $fileUpload->setErrorMes($first_key, $message);
+ }
+ }
+
+ }
+ // 合計サイズチェック
+ if(isset($summaxsize_ini)) {
+ $filesize = $fileUpload->getFilesize();
+ $sum_size = 0;
+ foreach($filesize as $size) {
+ $sum_size = $size;
+ }
+ if ($summaxsize_ini < $sum_size) {
+ // エラー
+ if(isset($sumsizeError_ini)) {
+ $message = $sumsizeError_ini;
+ } else {
+ $message = sprintf(_FILE_UPLOAD_ERR_SUMSIZE_SIZE, $fileView->formatSize($summaxsize_ini));
+ }
+ // key=0固定
+ $stopper = _ON;
+ $fileUpload->setErrorMes($first_key, $message);
+ }
+ }
+
+ //end_add code
+
+
+ if($message != "" && $stopper == _ON) {
+ //stopperがONならば、エラーリストに追加し、アクションを呼ばない(エラーリスト追加)
+ //最後に発生したエラーをエラーリストへ追加
+ $errorList->setType(UPLOAD_ERROR_TYPE);
+ $errorList->add($fileUpload->getName(), $message);
+ }
+ } else {
+ $log->trace("フィールド名が指定されていません", "Filter_FileUpload#execute");
+ }
+
+ $filterChain =& $container->getComponent("FilterChain");
+ $filterChain->execute();
+
+ $log->trace("Filter_FileUploadの後処理が実行されました", "Filter_FileUpload#execute");
+ }
+
+ function constantDef($str) {
+ if(defined($str)) {
+ return constant($str);
+ } else {
+ return $str;
+ }
+ }
+
+ function _decompression($name, &$fileUpload) {
+ $container =& DIContainerFactory::getContainer();
+ $actionChain =& $container->getComponent("ActionChain");
+ $session =& $container->getComponent("Session");
+ $file_extra =& $container->getComponent("File");
+
+ $commonMain =& $container->getComponent("commonMain");
+ $fileAction =& $commonMain->registerClass(WEBAPP_DIR.'/components/file/Action.class.php', "File_Action", "fileAction");
+
+ $action_name = $actionChain->getCurActionName();
+ $pathList = explode("_", $action_name);
+
+ $cur_sess_id = $session->getID();
+
+ require_once "File/Archive.php";
+
+ //
+ // テンポラリーディレクトリ作成
+ //
+ if(!file_exists(FILEUPLOADS_DIR.$pathList[0])) {
+ mkdir(FILEUPLOADS_DIR.$pathList[0], octdec(_UPLOAD_FOLDER_MODE));
+ }
+ $file_path = $pathList[0]."/".strtolower($cur_sess_id);
if (file_exists(FILEUPLOADS_DIR.$file_path)) {
- $result = $fileAction->delDir(FILEUPLOADS_DIR.$file_path);
- if ($result === false) {
- return false;
- }
- }
-
- mkdir(FILEUPLOADS_DIR.$file_path, octdec(_UPLOAD_FOLDER_MODE));
-
- //
- // 圧縮ファイル取得
- //
- $files = $file_extra->getParameterRef($name);
+ $result = $fileAction->delDir(FILEUPLOADS_DIR.$file_path);
+ if ($result === false) {
+ return false;
+ }
+ }
+
+ mkdir(FILEUPLOADS_DIR.$file_path, octdec(_UPLOAD_FOLDER_MODE));
+
+ //
+ // 圧縮ファイル取得
+ //
+ $files = $file_extra->getParameterRef($name);
$file_name = FILEUPLOADS_DIR.$file_path."/".$files['name'];
//
@@ -713,24 +756,24 @@ function _decompression($name, &$fileUpload) {
// $fileUpload->moveで移動してしまうとエラーとなる。
//
$fileUpload->move(0, $file_name);
-
- //
- // 圧縮ファイル解凍
- //
+
+ //
+ // 圧縮ファイル解凍
+ //
File_Archive::extract(File_Archive::read($file_name."/"), $dest = FILEUPLOADS_DIR.$file_path);
-
+
+ //
+ // 圧縮ファイル削除
//
- // 圧縮ファイル削除
- //
$fileAction->delDir($file_name);
-
+
+ //
+ // 解凍したファイルをアップロードファイルとしてセット
//
- // 解凍したファイルをアップロードファイルとしてセット
- //
- $commonMain =& $container->getComponent("commonMain");
+ $commonMain =& $container->getComponent("commonMain");
$uploadsAction =& $commonMain->registerClass(WEBAPP_DIR.'/components/uploads/Action.class.php', "Uploads_Action", "uploadsAction");
-
+
$uploadsAction->setFileByPath(FILEUPLOADS_DIR.$file_path, $name);
- }
+ }
}
?>
\ No newline at end of file
diff --git a/html/maple/filter/Filter_Mobile.class.php b/html/maple/filter/Filter_Mobile.class.php
index 6e32614..8912b07 100644
--- a/html/maple/filter/Filter_Mobile.class.php
+++ b/html/maple/filter/Filter_Mobile.class.php
@@ -1,418 +1,418 @@
-_container =& DIContainerFactory::getContainer();
- $this->_log =& LogFactory::getLog();
- $this->_filterChain =& $this->_container->getComponent("FilterChain");
- $this->_actionChain =& $this->_container->getComponent("ActionChain");
- $this->_db =& $this->_container->getComponent("DbObject");
- $this->_session =& $this->_container->getComponent("Session");
- $this->_request =& $this->_container->getComponent("Request");
- $this->_modulesView =& $this->_container->getComponent("modulesView");
- //$this->_mobile_obj = $this->_modulesView->getModuleByDirname("mobile");
- $this->_usersView =& $this->_container->getComponent("usersView");
-
- //mb_stringがロードされているかどうか
- if (!extension_loaded('mbstring') && !function_exists("mb_convert_encoding")) {
- include_once MAPLE_DIR . '/includes/mbstring.php';
- } else if(function_exists("mb_detect_order")){
- mb_detect_order(_MB_DETECT_ORDER_VALUE);
- }
- if (function_exists("mb_internal_encoding")) {
- mb_internal_encoding(INTERNAL_CODE);
- }
- if (function_exists("mb_language")) {
- mb_language("Japanese");
- }
-
- $this->_log->trace("{$this->_classname}の前処理が実行されました", "{$this->_classname}#execute");
- $this->_preFilter();
-
- $this->_filterChain->execute();
-
- $this->_log->trace("{$this->_classname}の後処理が実行されました", "{$this->_classname}#execute");
- $this->_postFilter();
- }
-
- /**
- * プレフィルタ
- *
- * @access private
- */
- function _preFilter()
- {
- require_once( WEBAPP_DIR . "/config/mobile.inc.php" );
-
- $this->_session->setParameter("_mobile_flag", _OFF);
- $this->_session->setParameter("_smartphone_flag", _OFF);
- //if (!$this->_mobile_obj) { return; }
-
- // 読み上げソフト対応
- $actionName = $this->_actionChain->getCurActionName();
- if ($actionName == DEFAULT_MOBILE_ACTION) {
- $reader_flag = $this->_request->getParameter("reader_flag");
- if (isset($reader_flag)) {
- $reader_flag = intval($reader_flag);
- } else {
- $reader_flag = intval($this->_session->getParameter("_reader_flag"));
- }
- } else {
- $reader_flag = intval($this->_session->getParameter("_reader_flag"));
- }
- // スマートフォンPCビューアー切り替え対応
- if($actionName == DEFAULT_ACTION) {
- $pcviewer_flag = $this->_request->getParameter('pcviewer_flag');
- if (isset($pcviewer_flag)) {
- $pcviewer_flag = intval($pcviewer_flag);
- $this->_session->setParameter('_pcviewer_flag', $pcviewer_flag);
- } else {
- $pcviewer_flag = intval($this->_session->getParameter('_pcviewer_flag'));
- }
- } else {
- $pcviewer_flag = intval($this->_session->getParameter('_pcviewer_flag'));
- }
- if($pcviewer_flag == _ON){
- return;
- }
-
- if (in_array($actionName, $this->_clear_page_id)) {
- $this->_session->removeParameter("_mobile_page_id");
- $this->_session->removeParameter("_mobile_room_id");
- $this->_session->removeParameter("_mobile_module_id");
- }
- if (in_array($actionName, $this->_clear_reader)) {
- $this->_session->removeParameter("_reader_flag");
- } else {
- $this->_session->setParameter("_reader_flag", $reader_flag);
- }
-
- $mobileCheck =& MobileCheck::getInstance();
- if ($mobileCheck->isMobile() == _OFF) { return; }
- $mobile_info = $mobileCheck->getMobileInfo();
- $mobile_obj = $this->_modulesView->getModuleByDirname("mobile");
-
- $configView =& $this->_container->getComponent("configView");
- $config = $configView->getConfig($mobile_obj["module_id"], false);
- if ($config == false) { return; }
- if ($config["allow_emulator"]["conf_value"] == _OFF && !$mobile_info["proper_route"]) { return; }
-
- // この人物が携帯をどのようなモードで見ようとしているかを取得
- $texthtml_mode = -1;
- $imgdsp_size = -1;
- $user_id = $this->_session->getParameter("_user_id");
- if( $user_id != '0' ) {
- $texthtml_mode_item_id = $this->_usersView->getItemIdByTagName( "mobile_texthtml_mode" );
- $imgdsp_size_item_id = $this->_usersView->getItemIdByTagName( "mobile_imgdsp_size" );
- $user_items = $this->_usersView->getUserItemLinkById( $user_id );
- if( isset( $user_items[ $texthtml_mode_item_id ] ) && $user_items[ $texthtml_mode_item_id ]['content'] != "" ) {
- $texthtml_mode = constant( str_replace( "USER_ITEM", "MOBILE", trim( $user_items[ $texthtml_mode_item_id ]['content'], "|" ) ) );
- }
- if( isset( $user_items[ $imgdsp_size_item_id ] ) && $user_items[ $imgdsp_size_item_id ]['content'] != "" ) {
- $imgdsp_size = constant( str_replace( "USER_ITEM", "MOBILE", trim( $user_items[ $imgdsp_size_item_id ]['content'], "|" ) ) );
- }
- }
- if( $texthtml_mode == -1 ) {
- $texthtml_mode = $config["mobile_text_html_mode"]["conf_value"];
- }
- if( $imgdsp_size == -1 ) {
- $imgdsp_size = $config["mobile_imgdsp_size"]["conf_value"];
- }
- $this->_session->setParameter("_mobile_text_html_mode", $texthtml_mode);
- $this->_session->setParameter("_mobile_imgdsp_size", $imgdsp_size);
-
- $this->_session->setParameter("_mobile_info", $mobile_info);
- $this->_session->setParameter("_mobile_flag", _ON);
- if($mobileCheck->isSmartPhone() == true) {
- $this->_session->setParameter('_smartphone_flag', _ON);
- }
-
- $action_name = $this->_request->getParameter("action");
- $page_id = intval($this->_request->getParameter("page_id"));
- $room_id = intval($this->_request->getParameter("room_id"));
- if (!isset($page_id)) {
- $page_id = intval($this->_session->getParameter("_mobile_page_id"));
- }
- $room_id = $this->_request->getParameter("room_id");
- if (!isset($room_id)) {
- $room_id = intval($this->_session->getParameter("_mobile_room_id"));
- }
- $block_id = intval($this->_request->getParameter("block_id"));
-
-
- $mobileView =& $this->_container->getComponent("mobileView");
- $getdata =& $this->_container->getComponent("GetData");
-
- $mobile_modules = $mobileView->getModules(null, array($this,"_callbackFunc"));
- $getdata->setParameter("mobile_modules", $mobile_modules);
-
- $active_action = $this->_request->getParameter("active_action");
- if ($active_action != "") {
- $params = $this->_request->getParameters();
-
- $this->_request->setParameter("action", $active_action);
- $this->_request->setParameter("active_action", null);
- $this->_request->setParameter(_ABBREVIATE_URL_REQUEST_KEY, null);
-
- $params = $this->_request->getParameters();
- $str_params = "";
- foreach($params as $key => $value) {
- if (empty($value) || is_array($value)) { continue; }
- if (substr($key, 0, 1) == "_") { continue; }
-
- $key = htmlspecialchars($key, ENT_QUOTES);
- if ($key == session_name()) {
- $value = session_id();
- } else {
- $value = rawurlencode($value);
- }
- $str_params .= "&" . $key."=".$value;
- }
-
- if ($this->_session->getParameter("_user_id") == "" && $block_id > 0) {
- $blocksView =& $this->_container->getComponent("blocksView");
- $blocks = $blocksView->getBlockById($block_id);
- if (empty($blocks)) {
- header('Location: '.BASE_URL.INDEX_FILE_NAME);
- exit;
- }
-
- $authCheck =& $this->_container->getComponent("authCheck");
- $result = $authCheck->getPageAuthId(null, $blocks["page_id"]);
- if ($result == _AUTH_OTHER) {
- if ($reader_flag == _ON) {
- $session_param = "";
- } else {
- $session_param = "&".session_name()."=".session_id();
- }
- $this->_session->setParameter("_mobile_redirect_url", $str_params);
- header('Location: '.BASE_URL.INDEX_FILE_NAME."?".ACTION_KEY."=".$mobile_modules[_DISPLAY_POSITION_HEADER]["login"]["mobile_action_name"].$session_param);
- exit;
- }
- }
-
- $this->_session->removeParameter("_mobile_redirect_url");
- header('Location: '.BASE_URL.INDEX_FILE_NAME."?".substr($str_params, 1));
- exit;
-
- } elseif ($action_name == DEFAULT_ACTION) {
- $parameters = (!empty($page_id) ? "&page_id=".$page_id."&room_id=".intval($room_id) : "").(!empty($block_id) ? "&block_id=".$block_id : "");
- if ($reader_flag == _OFF) {
- $parameters .= "&".session_name()."=".session_id();
- }
- $action_name = DEFAULT_MOBILE_ACTION;
- if (!empty($block_id)) {
- $blocksView =& $this->_container->getComponent("blocksView");
- $modulesView =& $this->_container->getComponent("modulesView");
- $blocks = $blocksView->getBlockById($block_id);
- if (!empty($blocks)) {
- $modules = $modulesView->getModulesById($blocks["module_id"]);
- if (!empty($modules)) {
- $action_name = $modules["action_name"];
- }
- }
- }
- header('Location: '.BASE_URL.INDEX_FILE_NAME."?".ACTION_KEY."=".$action_name.$parameters);
- exit;
- }
-
- $this->_session->setParameter("_mobile_default_module", $config["default_module"]["conf_value"]);
-
- /*
- * リクエストの変換
- */
- $action =& $this->_actionChain->getCurAction();
- $attributes = $this->getAttributes();
- //if (empty($attributes)) { return; }
-
- $params = $this->_request->getParameters();
- $this->_strtoconvert($params);
- $this->_request->clear();
- $this->_request->setParameters($params);
-
- foreach ($attributes as $key=>$value) {
- $keyArr = explode(":", $key);
- $parameter = null;
- if ($keyArr[0] == "date" || $keyArr[0] == "input_date" || $keyArr[0] == "time" || $keyArr[0] == "time12" || $keyArr[0] == "full_date" || $keyArr[0] == "full_time") {
- $valArr = explode(",", $keyArr[1]);
- if (($keyArr[0] == "date" || $keyArr[0] == "input_date") && count($valArr) == 3 ||
- $keyArr[0] == "time" && count($valArr) <= 3 ||
- $keyArr[0] == "time12" && count($valArr) > 0 && count($valArr) <= 4 && (strtolower($valArr[0]) == "am" || strtolower($valArr[0]) == "pm") ||
- ($keyArr[0] == "full_date" || $keyArr[0] == "full_time") && count($valArr) == 6) {
-
- foreach ($valArr as $i=>$val) {
- $valArr[$i] = $this->_request->getParameter($val);
- }
- if ($keyArr[0] == "date") {
- list($month, $day, $year) = $valArr;
- list($hour, $min, $sec) = array(0,0,0);
- } elseif ($keyArr[0] == "input_date") {
- list($month, $day, $year) = $valArr;
- list($hour, $min, $sec) = array(0,0,0);
- } elseif ($keyArr[0] == "time") {
- list($month, $day, $year) = array(date("m"), date("d"), date("Y"));
- if (count($valArr) < 1) { $valArr[0] = 0; }
- if (count($valArr) < 2) { $valArr[1] = 0; }
- if (count($valArr) < 3) { $valArr[2] = 0; }
- list($hour, $min, $sec) = $valArr;
- } elseif ($keyArr[0] == "time12") {
- list($month, $day, $year) = array(date("m"), date("d"), date("Y"));
- if (count($valArr) < 2) { $valArr[1] = 0; }
- if (count($valArr) < 3) { $valArr[2] = 0; }
- if (count($valArr) < 4) { $valArr[3] = 0; }
- list($am_pm, $hour, $min, $sec) = $valArr;
- if (strtolower($am_pm) == "pm") {
- $hour = intval($hour) + 12;
- }
- } else {
- list($hour, $min, $sec, $month, $day, $year) = $valArr;
- }
- if ($keyArr[0] == "time" || $keyArr[0] == "time12" || $keyArr[0] != "time" && $keyArr[0] != "time12" && checkdate(intval($month),intval($day),intval($year))) {
- if ($keyArr[0] == "date" && empty($keyArr[2])) { $keyArr[2] = _DATE_FORMAT; }
- if ($keyArr[0] == "input_date" && empty($keyArr[2])) { $keyArr[2] = _INPUT_DATE_FORMAT; }
- if (($keyArr[0] == "time" || $keyArr[0] == "time12") && empty($keyArr[2])) { $keyArr[2] = _TIME_FORMAT; }
- if (($keyArr[0] == "full_date" || $keyArr[0] == "full_time") && empty($keyArr[2])) { $keyArr[2] = _FULL_DATE_FORMAT; }
- $parameter = date($keyArr[2], mktime(intval($hour), intval($min), intval($sec), intval($month), intval($day), intval($year)));
- $this->_request->setParameter($value, $parameter);
- continue;
- } else {
- $paramArr = explode(",", $keyArr[1]);
- }
- } else {
- $paramArr = explode(",", $keyArr[1]);
- }
- } else {
- $paramArr = explode(",", $key);
- }
- foreach ($paramArr as $i=>$keyVal) {
- $str = $this->_request->getParameter($keyVal);
- if (!isset($str)) { continue; }
- $parameter .= $str;
- }
- if (!isset($parameter)) { continue; }
- $this->_request->setParameter($value, $parameter);
- }
-
- }
- /**
- * 携帯モジュール取得
- *
- * @access private
- */
- function _callbackFunc(&$recordSet)
- {
- $result = array();
- while ($row = $recordSet->fetchRow()) {
- $pathList = explode("_", $row["mobile_action_name"]);
- $row["dir_name"] = $pathList[0];
- $row["module_name"] = $this->_modulesView->loadModuleName($row["dir_name"]);
- $result[$row["display_position"]][$row["dir_name"]] = $row;
- }
- return $result;
- }
- /**
- * 携帯モジュール取得
- *
- * @access private
- */
- function _strtoconvert(&$params)
- {
- foreach (array_keys($params) as $key) {
- if (is_array($params[$key])) {
- $this->_strtoconvert($params[$key]);
- } else {
- $params[$key] = mb_convert_encoding($params[$key], "utf-8", "auto");
- }
- }
- }
-
- /**
- * ポストフィルタ
- *
- * @access private
- */
- function _postFilter()
- {
- //if (!$this->_mobile_obj) { return true; }
-
- $tel_id = $this->_session->getParameter("_mobile_tel_id");
- if (!empty($tel_id)) {
- $user_id = $this->_session->getParameter("_user_id");
- $result = $this->_db->updateExecute("mobile_users", array(), array("user_id"=>$user_id), true);
- if ($result === false) {
- return false;
- }
-
- if (rand(0, 10) != 0) {
- $maxlifetime = $this->_session->getParameter('_session_gc_maxlifetime');
- $time = timezone_date();
- $timestamp = mktime(intval(substr($time,8,2)),intval(substr($time,10,2))-$maxlifetime,intval(substr($time,12,2)),
- intval(substr($time,4,2)),intval(substr($time,6,2)),intval(substr($time,0,4)));
- $sql = "DELETE FROM {mobile_users} WHERE update_time < ?";
- $result = $this->_db->execute($sql, array("update_time"=>date("YmdHis", $timestamp)));
- if ($result === false) {
- $this->_db->addError();
- return false;
- }
- }
- }
-
- $page_id = intval($this->_request->getParameter("page_id"));
- if ($page_id > 0) {
- $this->_session->setParameter("_mobile_page_id", $page_id);
- }
- $room_id = intval($this->_request->getParameter("room_id"));
- if ($room_id > 0) {
- $this->_session->setParameter("_mobile_room_id", $room_id);
- }
- $module_id = intval($this->_request->getParameter("module_id"));
- if ($module_id > 0) {
- $this->_session->setParameter("_mobile_module_id", $module_id);
- }
- }
-}
-?>
+_container =& DIContainerFactory::getContainer();
+ $this->_log =& LogFactory::getLog();
+ $this->_filterChain =& $this->_container->getComponent("FilterChain");
+ $this->_actionChain =& $this->_container->getComponent("ActionChain");
+ $this->_db =& $this->_container->getComponent("DbObject");
+ $this->_session =& $this->_container->getComponent("Session");
+ $this->_request =& $this->_container->getComponent("Request");
+ $this->_modulesView =& $this->_container->getComponent("modulesView");
+ //$this->_mobile_obj = $this->_modulesView->getModuleByDirname("mobile");
+ $this->_usersView =& $this->_container->getComponent("usersView");
+
+ //mb_stringがロードされているかどうか
+ if (!extension_loaded('mbstring') && !function_exists("mb_convert_encoding")) {
+ include_once MAPLE_DIR . '/includes/mbstring.php';
+ } else if(function_exists("mb_detect_order")){
+ mb_detect_order(_MB_DETECT_ORDER_VALUE);
+ }
+ if (function_exists("mb_internal_encoding")) {
+ mb_internal_encoding(INTERNAL_CODE);
+ }
+ if (function_exists("mb_language")) {
+ mb_language("Japanese");
+ }
+
+ $this->_log->trace("{$this->_classname}の前処理が実行されました", "{$this->_classname}#execute");
+ $this->_preFilter();
+
+ $this->_filterChain->execute();
+
+ $this->_log->trace("{$this->_classname}の後処理が実行されました", "{$this->_classname}#execute");
+ $this->_postFilter();
+ }
+
+ /**
+ * プレフィルタ
+ *
+ * @access private
+ */
+ function _preFilter()
+ {
+ require_once( WEBAPP_DIR . "/config/mobile.inc.php" );
+
+ $this->_session->setParameter("_mobile_flag", _OFF);
+ $this->_session->setParameter("_smartphone_flag", _OFF);
+ //if (!$this->_mobile_obj) { return; }
+
+ // 読み上げソフト対応
+ $actionName = $this->_actionChain->getCurActionName();
+ if ($actionName == DEFAULT_MOBILE_ACTION) {
+ $reader_flag = $this->_request->getParameter("reader_flag");
+ if (isset($reader_flag)) {
+ $reader_flag = intval($reader_flag);
+ } else {
+ $reader_flag = intval($this->_session->getParameter("_reader_flag"));
+ }
+ } else {
+ $reader_flag = intval($this->_session->getParameter("_reader_flag"));
+ }
+ // スマートフォンPCビューアー切り替え対応
+ if($actionName == DEFAULT_ACTION) {
+ $pcviewer_flag = $this->_request->getParameter('pcviewer_flag');
+ if (isset($pcviewer_flag)) {
+ $pcviewer_flag = intval($pcviewer_flag);
+ $this->_session->setParameter('_pcviewer_flag', $pcviewer_flag);
+ } else {
+ $pcviewer_flag = intval($this->_session->getParameter('_pcviewer_flag'));
+ }
+ } else {
+ $pcviewer_flag = intval($this->_session->getParameter('_pcviewer_flag'));
+ }
+ if($pcviewer_flag == _ON){
+ return;
+ }
+
+ if (in_array($actionName, $this->_clear_page_id)) {
+ $this->_session->removeParameter("_mobile_page_id");
+ $this->_session->removeParameter("_mobile_room_id");
+ $this->_session->removeParameter("_mobile_module_id");
+ }
+ if (in_array($actionName, $this->_clear_reader)) {
+ $this->_session->removeParameter("_reader_flag");
+ } else {
+ $this->_session->setParameter("_reader_flag", $reader_flag);
+ }
+
+ $mobileCheck =& MobileCheck::getInstance();
+ if ($mobileCheck->isMobile() == _OFF) { return; }
+ $mobile_info = $mobileCheck->getMobileInfo();
+ $mobile_obj = $this->_modulesView->getModuleByDirname("mobile");
+
+ $configView =& $this->_container->getComponent("configView");
+ $config = $configView->getConfig($mobile_obj["module_id"], false);
+ if ($config == false) { return; }
+ if ($config["allow_emulator"]["conf_value"] == _OFF && !$mobile_info["proper_route"]) { return; }
+
+ // この人物が携帯をどのようなモードで見ようとしているかを取得
+ $texthtml_mode = -1;
+ $imgdsp_size = -1;
+ $user_id = $this->_session->getParameter("_user_id");
+ if( $user_id != '0' ) {
+ $texthtml_mode_item_id = $this->_usersView->getItemIdByTagName( "mobile_texthtml_mode" );
+ $imgdsp_size_item_id = $this->_usersView->getItemIdByTagName( "mobile_imgdsp_size" );
+ $user_items = $this->_usersView->getUserItemLinkById( $user_id );
+ if( isset( $user_items[ $texthtml_mode_item_id ] ) && $user_items[ $texthtml_mode_item_id ]['content'] != "" ) {
+ $texthtml_mode = constant( str_replace( "USER_ITEM", "MOBILE", trim( $user_items[ $texthtml_mode_item_id ]['content'], "|" ) ) );
+ }
+ if( isset( $user_items[ $imgdsp_size_item_id ] ) && $user_items[ $imgdsp_size_item_id ]['content'] != "" ) {
+ $imgdsp_size = constant( str_replace( "USER_ITEM", "MOBILE", trim( $user_items[ $imgdsp_size_item_id ]['content'], "|" ) ) );
+ }
+ }
+ if( $texthtml_mode == -1 ) {
+ $texthtml_mode = $config["mobile_text_html_mode"]["conf_value"];
+ }
+ if( $imgdsp_size == -1 ) {
+ $imgdsp_size = $config["mobile_imgdsp_size"]["conf_value"];
+ }
+ $this->_session->setParameter("_mobile_text_html_mode", $texthtml_mode);
+ $this->_session->setParameter("_mobile_imgdsp_size", $imgdsp_size);
+
+ $this->_session->setParameter("_mobile_info", $mobile_info);
+ $this->_session->setParameter("_mobile_flag", _ON);
+ if($mobileCheck->isSmartPhone() == true) {
+ $this->_session->setParameter('_smartphone_flag', _ON);
+ }
+
+ $action_name = $this->_request->getParameter("action");
+ $page_id = intval($this->_request->getParameter("page_id"));
+ $room_id = intval($this->_request->getParameter("room_id"));
+ if (!isset($page_id)) {
+ $page_id = intval($this->_session->getParameter("_mobile_page_id"));
+ }
+ $room_id = $this->_request->getParameter("room_id");
+ if (!isset($room_id)) {
+ $room_id = intval($this->_session->getParameter("_mobile_room_id"));
+ }
+ $block_id = intval($this->_request->getParameter("block_id"));
+
+
+ $mobileView =& $this->_container->getComponent("mobileView");
+ $getdata =& $this->_container->getComponent("GetData");
+
+ $mobile_modules = $mobileView->getModules(null, array($this,"_callbackFunc"));
+ $getdata->setParameter("mobile_modules", $mobile_modules);
+
+ $active_action = $this->_request->getParameter("active_action");
+ if ($active_action != "") {
+ $params = $this->_request->getParameters();
+
+ $this->_request->setParameter("action", $active_action);
+ $this->_request->setParameter("active_action", null);
+ $this->_request->setParameter(_ABBREVIATE_URL_REQUEST_KEY, null);
+
+ $params = $this->_request->getParameters();
+ $str_params = "";
+ foreach($params as $key => $value) {
+ if (empty($value) || is_array($value)) { continue; }
+ if (substr($key, 0, 1) == "_") { continue; }
+
+ $key = htmlspecialchars($key, ENT_QUOTES);
+ if ($key == session_name()) {
+ $value = session_id();
+ } else {
+ $value = rawurlencode($value);
+ }
+ $str_params .= "&" . $key."=".$value;
+ }
+
+ if ($this->_session->getParameter("_user_id") == "" && $block_id > 0) {
+ $blocksView =& $this->_container->getComponent("blocksView");
+ $blocks = $blocksView->getBlockById($block_id);
+ if (empty($blocks)) {
+ header('Location: '.BASE_URL.INDEX_FILE_NAME);
+ exit;
+ }
+
+ $authCheck =& $this->_container->getComponent("authCheck");
+ $result = $authCheck->getPageAuthId(null, $blocks["page_id"]);
+ if ($result == _AUTH_OTHER) {
+ if ($reader_flag == _ON) {
+ $session_param = "";
+ } else {
+ $session_param = "&".session_name()."=".session_id();
+ }
+ $this->_session->setParameter("_mobile_redirect_url", $str_params);
+ header('Location: '.BASE_URL.INDEX_FILE_NAME."?".ACTION_KEY."=".$mobile_modules[_DISPLAY_POSITION_HEADER]["login"]["mobile_action_name"].$session_param);
+ exit;
+ }
+ }
+
+ $this->_session->removeParameter("_mobile_redirect_url");
+ header('Location: '.BASE_URL.INDEX_FILE_NAME."?".substr($str_params, 1));
+ exit;
+
+ } elseif ($action_name == DEFAULT_ACTION) {
+ $parameters = (!empty($page_id) ? "&page_id=".$page_id."&room_id=".intval($room_id) : "").(!empty($block_id) ? "&block_id=".$block_id : "");
+ if ($reader_flag == _OFF) {
+ $parameters .= "&".session_name()."=".session_id();
+ }
+ $action_name = DEFAULT_MOBILE_ACTION;
+ if (!empty($block_id)) {
+ $blocksView =& $this->_container->getComponent("blocksView");
+ $modulesView =& $this->_container->getComponent("modulesView");
+ $blocks = $blocksView->getBlockById($block_id);
+ if (!empty($blocks)) {
+ $modules = $modulesView->getModulesById($blocks["module_id"]);
+ if (!empty($modules)) {
+ $action_name = $modules["action_name"];
+ }
+ }
+ }
+ header('Location: '.BASE_URL.INDEX_FILE_NAME."?".ACTION_KEY."=".$action_name.$parameters);
+ exit;
+ }
+
+ $this->_session->setParameter("_mobile_default_module", $config["default_module"]["conf_value"]);
+
+ /*
+ * リクエストの変換
+ */
+ $action =& $this->_actionChain->getCurAction();
+ $attributes = $this->getAttributes();
+ //if (empty($attributes)) { return; }
+
+ $params = $this->_request->getParameters();
+ $this->_strtoconvert($params);
+ $this->_request->clear();
+ $this->_request->setParameters($params);
+
+ foreach ($attributes as $key=>$value) {
+ $keyArr = explode(":", $key);
+ $parameter = null;
+ if ($keyArr[0] == "date" || $keyArr[0] == "input_date" || $keyArr[0] == "time" || $keyArr[0] == "time12" || $keyArr[0] == "full_date" || $keyArr[0] == "full_time") {
+ $valArr = explode(",", $keyArr[1]);
+ if (($keyArr[0] == "date" || $keyArr[0] == "input_date") && count($valArr) == 3 ||
+ $keyArr[0] == "time" && count($valArr) <= 3 ||
+ $keyArr[0] == "time12" && count($valArr) > 0 && count($valArr) <= 4 && (strtolower($valArr[0]) == "am" || strtolower($valArr[0]) == "pm") ||
+ ($keyArr[0] == "full_date" || $keyArr[0] == "full_time") && count($valArr) == 6) {
+
+ foreach ($valArr as $i=>$val) {
+ $valArr[$i] = $this->_request->getParameter($val);
+ }
+ if ($keyArr[0] == "date") {
+ list($month, $day, $year) = $valArr;
+ list($hour, $min, $sec) = array(0,0,0);
+ } elseif ($keyArr[0] == "input_date") {
+ list($month, $day, $year) = $valArr;
+ list($hour, $min, $sec) = array(0,0,0);
+ } elseif ($keyArr[0] == "time") {
+ list($month, $day, $year) = array(date("m"), date("d"), date("Y"));
+ if (count($valArr) < 1) { $valArr[0] = 0; }
+ if (count($valArr) < 2) { $valArr[1] = 0; }
+ if (count($valArr) < 3) { $valArr[2] = 0; }
+ list($hour, $min, $sec) = $valArr;
+ } elseif ($keyArr[0] == "time12") {
+ list($month, $day, $year) = array(date("m"), date("d"), date("Y"));
+ if (count($valArr) < 2) { $valArr[1] = 0; }
+ if (count($valArr) < 3) { $valArr[2] = 0; }
+ if (count($valArr) < 4) { $valArr[3] = 0; }
+ list($am_pm, $hour, $min, $sec) = $valArr;
+ if (strtolower($am_pm) == "pm") {
+ $hour = intval($hour) + 12;
+ }
+ } else {
+ list($hour, $min, $sec, $month, $day, $year) = $valArr;
+ }
+ if ($keyArr[0] == "time" || $keyArr[0] == "time12" || $keyArr[0] != "time" && $keyArr[0] != "time12" && checkdate(intval($month),intval($day),intval($year))) {
+ if ($keyArr[0] == "date" && empty($keyArr[2])) { $keyArr[2] = _DATE_FORMAT; }
+ if ($keyArr[0] == "input_date" && empty($keyArr[2])) { $keyArr[2] = _INPUT_DATE_FORMAT; }
+ if (($keyArr[0] == "time" || $keyArr[0] == "time12") && empty($keyArr[2])) { $keyArr[2] = _TIME_FORMAT; }
+ if (($keyArr[0] == "full_date" || $keyArr[0] == "full_time") && empty($keyArr[2])) { $keyArr[2] = _FULL_DATE_FORMAT; }
+ $parameter = date($keyArr[2], mktime(intval($hour), intval($min), intval($sec), intval($month), intval($day), intval($year)));
+ $this->_request->setParameter($value, $parameter);
+ continue;
+ } else {
+ $paramArr = explode(",", $keyArr[1]);
+ }
+ } else {
+ $paramArr = explode(",", $keyArr[1]);
+ }
+ } else {
+ $paramArr = explode(",", $key);
+ }
+ foreach ($paramArr as $i=>$keyVal) {
+ $str = $this->_request->getParameter($keyVal);
+ if (!isset($str)) { continue; }
+ $parameter .= $str;
+ }
+ if (!isset($parameter)) { continue; }
+ $this->_request->setParameter($value, $parameter);
+ }
+
+ }
+ /**
+ * 携帯モジュール取得
+ *
+ * @access private
+ */
+ function _callbackFunc(&$recordSet)
+ {
+ $result = array();
+ while ($row = $recordSet->fetchRow()) {
+ $pathList = explode("_", $row["mobile_action_name"]);
+ $row["dir_name"] = $pathList[0];
+ $row["module_name"] = $this->_modulesView->loadModuleName($row["dir_name"]);
+ $result[$row["display_position"]][$row["dir_name"]] = $row;
+ }
+ return $result;
+ }
+ /**
+ * 携帯モジュール取得
+ *
+ * @access private
+ */
+ function _strtoconvert(&$params)
+ {
+ foreach (array_keys($params) as $key) {
+ if (is_array($params[$key])) {
+ $this->_strtoconvert($params[$key]);
+ } else {
+ $params[$key] = mb_convert_encoding($params[$key], "utf-8", "auto");
+ }
+ }
+ }
+
+ /**
+ * ポストフィルタ
+ *
+ * @access private
+ */
+ function _postFilter()
+ {
+ //if (!$this->_mobile_obj) { return true; }
+
+ $tel_id = $this->_session->getParameter("_mobile_tel_id");
+ if (!empty($tel_id)) {
+ $user_id = $this->_session->getParameter("_user_id");
+ $result = $this->_db->updateExecute("mobile_users", array(), array("user_id"=>$user_id), true);
+ if ($result === false) {
+ return false;
+ }
+
+ if (rand(0, 10) != 0) {
+ $maxlifetime = $this->_session->getParameter('_session_gc_maxlifetime');
+ $time = timezone_date();
+ $timestamp = mktime(intval(substr($time,8,2)),intval(substr($time,10,2))-$maxlifetime,intval(substr($time,12,2)),
+ intval(substr($time,4,2)),intval(substr($time,6,2)),intval(substr($time,0,4)));
+ $sql = "DELETE FROM {mobile_users} WHERE update_time < ?";
+ $result = $this->_db->execute($sql, array("update_time"=>date("YmdHis", $timestamp)));
+ if ($result === false) {
+ $this->_db->addError();
+ return false;
+ }
+ }
+ }
+
+ $page_id = intval($this->_request->getParameter("page_id"));
+ if ($page_id > 0) {
+ $this->_session->setParameter("_mobile_page_id", $page_id);
+ }
+ $room_id = intval($this->_request->getParameter("room_id"));
+ if ($room_id > 0) {
+ $this->_session->setParameter("_mobile_room_id", $room_id);
+ }
+ $module_id = intval($this->_request->getParameter("module_id"));
+ if ($module_id > 0) {
+ $this->_session->setParameter("_mobile_module_id", $module_id);
+ }
+ }
+}
+?>
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..637e1bc 100644
--- a/html/maple/filter/Filter_SetConfig.class.php
+++ b/html/maple/filter/Filter_SetConfig.class.php
@@ -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 8f5d178..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);
+error_reporting(E_ALL & ~E_DEPRECATED & ~E_STRICT);
//error_reporting(0);
define('DEBUG_MODE', 0);
diff --git a/html/maple/generate/templates/maple/generate/skeleton/install.ini.txt b/html/maple/generate/templates/maple/generate/skeleton/install.ini.txt
index 264b247..644a247 100644
--- a/html/maple/generate/templates/maple/generate/skeleton/install.ini.txt
+++ b/html/maple/generate/templates/maple/generate/skeleton/install.ini.txt
@@ -1,4 +1,4 @@
-version = "2.1.0.0"
+version = "2.4.0.0"
action_name="action_name; ?>"
moduletype == "normal" || $skeleton->moduletype == "full") {
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/common_func.php b/html/maple/nccore/common_func.php
index a20d94c..884ab95 100644
--- a/html/maple/nccore/common_func.php
+++ b/html/maple/nccore/common_func.php
@@ -198,6 +198,15 @@ function wysiwig_convert_url($str) {
} else {
$str = preg_replace("/".sprintf(_WYSIWYG_CONVERT_OUTER, 'BASE_URL')."/iu", BASE_URL, $str);
}
+
+ $container =& DIContainerFactory::getContainer();
+ $session =& $container->getComponent('Session');
+ $isSmartphone = $session->getParameter('_smartphone_flag');
+ if ($isSmartphone) {
+ $str = preg_replace('/()/iU', '\\1 onclick="$.mobile.silentScroll(0);"\\3', $str);
+ $str = preg_replace('/()/iU', '\\1\\3\\4', $str);
+ }
+
return $str;
}
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/abbreviateurl/Action.class.php b/html/webapp/components/abbreviateurl/Action.class.php
index ccd7eea..7b1b314 100644
--- a/html/webapp/components/abbreviateurl/Action.class.php
+++ b/html/webapp/components/abbreviateurl/Action.class.php
@@ -263,6 +263,24 @@ function moveRoom($contents_id, $org_room_id, $move_room_id)
return true;
}
+ /**
+ * 条件に該当する短縮URLデータを削除する。
+ *
+ * @param string $whereClause where句文字列
+ * @param array $bindValues バインド値配列
+ * @return boolean true or false
+ * @access public
+ */
+ function deleteByWhereClause($whereClause, $bindValues)
+ {
+ $sql = "DELETE FROM {abbreviate_url} "
+ . "WHERE " . $whereClause;
+ if (!$this->_db->execute($sql, $bindValues)) {
+ $this->_db->addError();
+ return false;
+ }
+ return true;
+ }
}
?>
diff --git a/html/webapp/components/blocks/Action.class.php b/html/webapp/components/blocks/Action.class.php
index 6e29ddc..749a0e4 100644
--- a/html/webapp/components/blocks/Action.class.php
+++ b/html/webapp/components/blocks/Action.class.php
@@ -631,13 +631,13 @@ function delFuncExec($block_id, $block_obj = null, $delete_action = null)
// 配列でなければエラーとする
return false;
}
-
+
//自動的に削除
$where_params = array(
"block_id" => $block_id
);
$error = false;
-
+
foreach ($table_list as $table_name) {
//ブロックIDより削除処理。ブロックIDがなければ、処理しない
$result = $this->_db->execute("DESCRIBE ".$table_name." block_id");
@@ -658,28 +658,35 @@ function delFuncExec($block_id, $block_obj = null, $delete_action = null)
//削除関数呼び出し
//
$pathList = explode("_", $delete_action);
- $ucPathList = array_map('ucfirst', $pathList);
-
- $basename = ucfirst($pathList[count($pathList) - 1]);
-
- $actionPath = join("/", $pathList);
- $className = join("_", $ucPathList);
- $filename = MODULE_DIR . "/${actionPath}/${basename}.class.php";
- if (@file_exists($filename)) {
+ $ucPathList = array_map('ucfirst', $pathList);
+
+ $basename = ucfirst($pathList[count($pathList) - 1]);
+
+ $actionPath = join("/", $pathList);
+ $className = join("_", $ucPathList);
+ $filename = MODULE_DIR . "/${actionPath}/${basename}.class.php";
+ if (@file_exists($filename)) {
//$params = array("action" =>$delete_action, "block_id" =>$block_id, "page_id" =>$block_obj['page_id'], "table_name" =>$table_list);
$pagesView =& $this->_container->getComponent("pagesView");
$page = $pagesView->getPageById($block_obj['page_id']);
- if($page === false) {
- return false;
- }
-
- $params = array("action" =>$delete_action, "mode"=>"block_delete", "block_id" =>$block_id, "page_id" =>$block_obj['page_id'], "room_id" =>$page['room_id']);
+ if($page === false) {
+ return false;
+ }
+
+ $params = array(
+ 'action' => $delete_action,
+ 'mode' => 'block_delete',
+ 'block_id' => $block_id,
+ 'page_id' => $block_obj['page_id'],
+ 'room_id' => $page['room_id'],
+ 'module_id' => $block_obj['module_id']
+ );
$result = $this->preexecuteMain->preExecute($delete_action, $params);
if($result === false || $result === "false") {
//エラーが発生した場合、エラーリストに追加
$this->_db->addError("delFuncExec", sprintf(_INVALID_ACTION, $delete_action));
}
- }
+ }
}
}
}
diff --git a/html/webapp/components/database/Sqlutility.class.php b/html/webapp/components/database/Sqlutility.class.php
index 86fe653..6225b81 100644
--- a/html/webapp/components/database/Sqlutility.class.php
+++ b/html/webapp/components/database/Sqlutility.class.php
@@ -20,194 +20,193 @@ class Database_Sqlutility
* @access private
*/
var $_container = null;
-
+
/**
* コンストラクター
*
- * @access public
+ * @access public
*/
function Database_Sqlutility() {
$this->_container =& DIContainerFactory::getContainer();
$this->_db =& $this->_container->getComponent("DbObject");
}
-
+
/**
- * モジュールDirからテーブルリスト取得
+ * モジュール使用テーブル名データを取得する。
*
- * @param string $dirname モジュールのディレクリ名称
- * @return array テーブル名称の配列
- * @access public
+ * @param string $dirname モジュールのディレクリ名称
+ * @param boolean $needPrefix テーブル名のプレフィックス有無
+ * @return array テーブル名の配列
+ * @access public
*/
- function &getTableList($dirname, $prefix_flag = true)
+ function &getTableList($directory, $needPrefix = true)
{
- $table_list = false;
- $configView =& $this->_container->getComponent("configView");
- $config_obj = $configView->getConfigByConfname(_SYS_CONF_MODID, "db_kind"); //conf_name=db_kind(mysql等がvalueに入る)
- if($config_obj) {
- $db_kind = $config_obj["conf_value"];
- } else {
- $db_kind = _DEFAULT_SQL_KIND;
+ $tableNames = array();
+ $databaseDriver = _DEFAULT_SQL_KIND;
+
+ $configView =& $this->_container->getComponent('configView');
+ $config = $configView->getConfigByConfname(_SYS_CONF_MODID, 'db_kind');
+ if (!empty($config)) {
+ $databaseDriver = $config['conf_value'];
}
- $file_path = "/".$dirname."/sql/".$db_kind."/"._SYS_TABLE_INI;
- if (@file_exists(MODULE_DIR.$file_path) && filesize(MODULE_DIR.$file_path) != 0) {
- //モジュールに使用するテーブルあり
- // SQLファイルの読み込み
- $handle = fopen(MODULE_DIR.$file_path, 'r');
- $sql_query = fread($handle, filesize(MODULE_DIR.$file_path));
- fclose($handle);
- $sql_query = trim($sql_query);
- // SQLユーティリティクラスにて各クエリを配列に格納する
- $this->splitMySqlFile($pieces, $sql_query);
-
- //$created_tables = array();
- $table_list = array();
- foreach ($pieces as $piece) {
- // SQLユーティリティクラスにてテーブル名にプレフィックスをつける
- // 配列としてリターンされ、
- // [0] プレフィックスをつけたクエリ
- // [4] プレフィックスをつけないテーブル名
- // が格納されている
- $prefixed_query = $this->prefixQuery($piece, $this->_db->getPrefix());
- if ( !$prefixed_query ) {
- //エラー
- $table_list = false;
- break;
- }
-
- //既にTABLEが存在しなければ、次へ
- //if(in_array($this->_db->getPrefix().$prefixed_query[4],$created_tables)) {
- // continue;
- //}
- if($prefix_flag) {
- $table_list[] = $this->_db->getPrefix().$prefixed_query[4];
- } else {
- $table_list[] = $prefixed_query[4];
- }
+
+ $sqlFilePathName = MODULE_DIR . '/' . $directory . '/sql/' . $databaseDriver . '/' . _SYS_TABLE_INI;
+ if (!file_exists($sqlFilePathName)) {
+ return $tableNames;
+ }
+
+ $sqlFileSize = filesize($sqlFilePathName);
+ if (empty($sqlFileSize)) {
+ return $tableNames;
+ }
+
+ $handle = fopen($sqlFilePathName, 'r');
+ $sqlContent = fread($handle, $sqlFileSize);
+ fclose($handle);
+
+ $this->splitMySqlFile($sqls, $sqlContent);
+ $tablePrefix = $this->_db->getPrefix();
+ foreach ($sqls as $sql) {
+ $dividedSqls = $this->prefixQuery($sql, $tablePrefix);
+ if (!$dividedSqls) {
+ return $dividedSqls;
+ }
+
+ $tableName = $dividedSqls[4];
+ if ($needPrefix) {
+ $tableName = $tablePrefix . $tableName;
+ }
+
+ if (in_array($tableName, $tableNames)) {
+ continue;
}
+
+ $tableNames[] = $tableName;
}
- return $table_list;
+
+ return $tableNames;
}
-
+
/**
- * 各クエリを配列に格納
- * TODO:今後、自作、メソッドに入れ替え予定
- *
- * @param array the splitted sql commands
- * @param string the sql commands
- * @return boolean always true
- * @access public
- */
+ * 各クエリを配列に格納
+ * TODO:今後、自作、メソッドに入れ替え予定
+ *
+ * @param array the splitted sql commands
+ * @param string the sql commands
+ * @return boolean always true
+ * @access public
+ */
function splitMySqlFile(&$ret, $sql)
{
- $sql = trim($sql);
- $sql_len = strlen($sql);
- $char = '';
- $string_start = '';
- $in_string = false;
-
- for ($i = 0; $i < $sql_len; ++$i) {
- $char = $sql[$i];
-
- // We are in a string, check for not escaped end of
- // strings except for backquotes that can't be escaped
- if ($in_string) {
- for (;;) {
- $i = strpos($sql, $string_start, $i);
+ $sql = trim($sql);
+ $sql_len = strlen($sql);
+ $char = '';
+ $string_start = '';
+ $in_string = false;
+
+ for ($i = 0; $i < $sql_len; ++$i) {
+ $char = $sql[$i];
+
+ // We are in a string, check for not escaped end of
+ // strings except for backquotes that can't be escaped
+ if ($in_string) {
+ for (;;) {
+ $i = strpos($sql, $string_start, $i);
// No end of string found -> add the current
// substring to the returned array
- if (!$i) {
+ if (!$i) {
$ret[] = $sql;
- return true;
- }
- // Backquotes or no backslashes before
- // quotes: it's indeed the end of the
+ return true;
+ }
+ // Backquotes or no backslashes before
+ // quotes: it's indeed the end of the
// string -> exit the loop
- else if ($string_start == '`' || $sql[$i-1] != '\\') {
- $string_start = '';
- $in_string = false;
- break;
- }
- // one or more Backslashes before the presumed
+ else if ($string_start == '`' || $sql[$i-1] != '\\') {
+ $string_start = '';
+ $in_string = false;
+ break;
+ }
+ // one or more Backslashes before the presumed
// end of string...
- else {
+ else {
// first checks for escaped backslashes
- $j = 2;
- $escaped_backslash = false;
+ $j = 2;
+ $escaped_backslash = false;
while ($i-$j > 0 && $sql[$i-$j] == '\\') {
$escaped_backslash = !$escaped_backslash;
- $j++;
- }
- // ... if escaped backslashes: it's really the
+ $j++;
+ }
+ // ... if escaped backslashes: it's really the
// end of the string -> exit the loop
- if ($escaped_backslash) {
- $string_start = '';
- $in_string = false;
+ if ($escaped_backslash) {
+ $string_start = '';
+ $in_string = false;
break;
- }
- // ... else loop
- else {
+ }
+ // ... else loop
+ else {
$i++;
- }
- } // end if...elseif...else
- } // end for
- } // end if (in string)
- // We are not in a string, first check for delimiter...
- else if ($char == ';') {
+ }
+ } // end if...elseif...else
+ } // end for
+ } // end if (in string)
+ // We are not in a string, first check for delimiter...
+ else if ($char == ';') {
// if delimiter found, add the parsed part to the returned array
- $ret[] = substr($sql, 0, $i);
- $sql = ltrim(substr($sql, min($i + 1, $sql_len)));
- $sql_len = strlen($sql);
- if ($sql_len) {
- $i = -1;
- } else {
- // The submited statement(s) end(s) here
- return true;
+ $ret[] = substr($sql, 0, $i);
+ $sql = ltrim(substr($sql, min($i + 1, $sql_len)));
+ $sql_len = strlen($sql);
+ if ($sql_len) {
+ $i = -1;
+ } else {
+ // The submited statement(s) end(s) here
+ return true;
}
- } // end else if (is delimiter)
- // ... then check for start of a string,...
- else if (($char == '"') || ($char == '\'') || ($char == '`')) {
- $in_string = true;
+ } // end else if (is delimiter)
+ // ... then check for start of a string,...
+ else if (($char == '"') || ($char == '\'') || ($char == '`')) {
+ $in_string = true;
$string_start = $char;
- } // end else if (is start of string)
-
- // for start of a comment (and remove this comment if found)...
- else if ($char == '#' || ($char == ' ' && $i > 1 && $sql[$i-2] . $sql[$i-1] == '--')) {
- // starting position of the comment depends on the comment type
- $start_of_comment = (($sql[$i] == '#') ? $i : $i-2);
- // if no "\n" exits in the remaining string, checks for "\r"
- // (Mac eol style)
- $end_of_comment = (strpos(' ' . $sql, "\012", $i+2))
- ? strpos(' ' . $sql, "\012", $i+2)
- : strpos(' ' . $sql, "\015", $i+2);
- if (!$end_of_comment) {
- // no eol found after '#', add the parsed part to the returned
- // array and exit
+ } // end else if (is start of string)
+
+ // for start of a comment (and remove this comment if found)...
+ else if ($char == '#' || ($char == ' ' && $i > 1 && $sql[$i-2] . $sql[$i-1] == '--')) {
+ // starting position of the comment depends on the comment type
+ $start_of_comment = (($sql[$i] == '#') ? $i : $i-2);
+ // if no "\n" exits in the remaining string, checks for "\r"
+ // (Mac eol style)
+ $end_of_comment = (strpos(' ' . $sql, "\012", $i+2))
+ ? strpos(' ' . $sql, "\012", $i+2)
+ : strpos(' ' . $sql, "\015", $i+2);
+ if (!$end_of_comment) {
+ // no eol found after '#', add the parsed part to the returned
+ // array and exit
// RMV fix for comments at end of file
- $last = trim(substr($sql, 0, $i-1));
+ $last = trim(substr($sql, 0, $i-1));
if (!empty($last)) {
$ret[] = $last;
}
- return true;
+ return true;
} else {
- $sql = substr($sql, 0, $start_of_comment) . ltrim(substr($sql, $end_of_comment));
- $sql_len = strlen($sql);
- $i--;
- } // end if...else
- } // end else if (is comment)
- } // end for
-
- // add any rest to the returned array
- if (!empty($sql) && trim($sql) != '') {
+ $sql = substr($sql, 0, $start_of_comment) . ltrim(substr($sql, $end_of_comment));
+ $sql_len = strlen($sql);
+ $i--;
+ } // end if...else
+ } // end else if (is comment)
+ } // end for
+
+ // add any rest to the returned array
+ if (!empty($sql) && trim($sql) != '') {
$ret[] = $sql;
- }
- return true;
+ }
+ return true;
}
/**
* add a prefix.'_' to all tablenames in a query
* TODO:今後、自作、メソッドに入れ替え予定
- * @param string $query valid SQL query string
- * @param string $prefix prefix to add to all table names
+ * @param string $query valid SQL query string
+ * @param string $prefix prefix to add to all table names
* @return mixed FALSE on failure
*/
function prefixQuery($query, $prefix)
diff --git a/html/webapp/components/mobile/View.class.php b/html/webapp/components/mobile/View.class.php
index b50eaea..e0709c1 100644
--- a/html/webapp/components/mobile/View.class.php
+++ b/html/webapp/components/mobile/View.class.php
@@ -88,6 +88,8 @@ function _callbackBlockByPage(&$recordSet)
{
$result = array();
$i = 0;
+ $this->_session->setParameter('mobileDisplayTextHtml', _OFF);
+ $isSmartphone = $this->_session->getParameter('_smartphone_flag');
while ($row = $recordSet->fetchRow()) {
if( !is_null( $row['display_position'] ) && $row['display_position'] != _DISPLAY_POSITION_CENTER ) {
continue;
@@ -99,6 +101,13 @@ function _callbackBlockByPage(&$recordSet)
$row["module_name"] = $this->_modulesView->loadModuleName($row["dir_name"]);
}
+ if (!$isSmartphone
+ && !empty($row['module_id'])
+ && empty($row['block_name'])
+ && !empty($row['content'])) {
+ $this->_session->setParameter('mobileDisplayTextHtml', _ON);
+ }
+
$result[ $row['parent_id'] ][ $row['block_id'] ] = $row;
}
return $result;
@@ -493,7 +502,7 @@ function &_fetchPageTree(&$recordSet, &$params)
}
foreach ($mobileModuleChecks as $childPage) {
if ($childPage['mobileModule']
- || $childPage['visible']) {
+ && $childPage['visible']) {
$pageTree[$parentID][$mobileModuleCheckParentId]['mobileModule'] = true;
break;
}
diff --git a/html/webapp/components/pages/Action.class.php b/html/webapp/components/pages/Action.class.php
index b4d3535..b55bb0e 100644
--- a/html/webapp/components/pages/Action.class.php
+++ b/html/webapp/components/pages/Action.class.php
@@ -440,77 +440,99 @@ function updThreadNum($parent_id, $thread_num)
/**
* 削除関数呼び出し
- * @param int $room_id 削除対象room_id
- * @param array $modules 削除対象モジュール配列
- * @param string delete_action
+ * @param mix $roomId 削除対象ルームID
+ * @param array $module 削除対象モジュール配列
+ * @param string $deleteAction 削除アクション名称
* @return boolean true or false
- * @access public
+ * @access public
*/
- function delFuncExec($room_id, &$module, $delete_action = null)
+ function delFuncExec($roomId, $module, $deleteAction = null)
{
- if($delete_action == "auto") {
- $action_name = $module['action_name'];
- $pathList = explode("_", $action_name);
+ if (empty($roomId)) {
+ return true;
+ }
+
+ if (!strlen($deleteAction)) {
+ return true;
+ }
+
+ $roomIds = $roomId;
+ if (!is_array($roomId)) {
+ $roomIds = array($roomId);
+ }
+
+ if ($deleteAction == 'auto') {
+ $inValue = '';
+ foreach ($roomIds as $roomId) {
+ $inValue .= intval($roomId) . ',';
+ }
+ $inValue = substr($inValue, 0, -1);
+
+ $actionName = $module['action_name'];
+ $pathList = explode('_', $actionName);
$dirname = $pathList[0];
- //テーブルリスト取得
- $table_list = $this->databaseSqlutility->getTableList($dirname);
- if(!is_array($table_list)) {
- // 配列でなければエラーとする
+ // 使用しているテーブル名配列を取得
+ $tables = $this->databaseSqlutility->getTableList($dirname);
+ if (!is_array($tables)) {
return false;
}
- //自動的に削除
- $where_params = array(
- "room_id" => $room_id
- );
- $error = false;
-
- foreach ($table_list as $table_name) {
- //ルームIDより削除処理。ルームIDがなければ、処理しない
- $result = $this->_db->execute("DESCRIBE ".$table_name." room_id");
- if(is_array($result) && isset($result[0])) {
- $result = $this->_db->execute("DELETE FROM ".$table_name." WHERE room_id=?" .
- " ",$where_params);
- if(!$result) {
- $error = true;
- }
+ $isError = false;
+ foreach ($tables as $table) {
+ $sql = "DESCRIBE " . $table . " room_id";
+ $result = $this->_db->execute($sql);
+ if ($result === false) {
+ $isError = true;
+ }
+
+ if (count($result) == 0) {
+ continue;
+ }
+
+ $sql = "DELETE FROM " . $table . " "
+ . "WHERE room_id IN (" . $inValue . ")";
+ if (!$this->_db->execute($sql)) {
+ $this->_db->addError();
+ $isError = true;
}
}
- if($error) return false;
- } elseif($delete_action == "" || $delete_action === null) {
- //なにもしない
} else {
- //
- //削除関数呼び出し
- //
- $pathList = explode("_", $delete_action);
- $ucPathList = array_map('ucfirst', $pathList);
-
- $basename = ucfirst($pathList[count($pathList) - 1]);
-
- $actionPath = join("/", $pathList);
- $className = join("_", $ucPathList);
- $filename = MODULE_DIR . "/${actionPath}/${basename}.class.php";
- if (@file_exists($filename)) {
- $pagesView =& $this->_container->getComponent("pagesView");
- $page =& $pagesView->getPageById($room_id);
- if($page === false || !isset($page['page_id'])) {
- return false;
+ $pathList = explode('_', $deleteAction);
+ $ucPathList = array_map('ucfirst', $pathList);
+ $basename = ucfirst($pathList[count($pathList) - 1]);
+
+ $actionPath = join('/', $pathList);
+ $className = join('_', $ucPathList);
+ $filename = MODULE_DIR . "/${actionPath}/${basename}.class.php";
+ if (!file_exists($filename)) {
+ return false;
+ }
+
+ $isError = false;
+ $pagesView =& $this->_container->getComponent('pagesView');
+ foreach ($roomIds as $roomId) {
+ $page =& $pagesView->getPageById($roomId);
+ if (empty($page)) {
+ $isError = true;
}
- //ブロック削除アクション
$params = array(
- 'action' => $delete_action,
- 'mode' => "delete",
- 'page_id'=> $page['page_id'],
- 'room_id'=> $room_id
- );
- $result = $this->preexecuteMain->preExecute($delete_action, $params);
- if($result === false || $result === "false") {
- return false;
+ 'action' => $deleteAction,
+ 'mode' => 'delete',
+ 'page_id'=> $page['page_id'],
+ 'room_id'=> $roomId
+ );
+ $result = $this->preexecuteMain->preExecute($deleteAction, $params);
+ if ($result === false
+ || $result === "false") {
+ $isError = true;
}
- }
+ }
+ }
+
+ if ($isError) {
+ return false;
}
return true;
}
@@ -687,5 +709,284 @@ function &_fetchcallbackGetChildPages($result, $page) {
}
return $ret;
}
+
+ /**
+ * サブグループも含めたルームデータを削除する
+ *
+ * @param string $roomId ページID
+ * @return boolean true or false
+ * @access public
+ */
+ function deleteRoom($roomId)
+ {
+ $roomId = intval($roomId);
+
+ $sql = "SELECT page_id "
+ . "FROM {pages} "
+ . "WHERE parent_id = ? "
+ . "AND page_id = room_id";
+ $subRooms =& $this->_db->execute($sql, $roomId);
+ if ($subRooms === false) {
+ $this->_db->addError();
+ return false;
+ }
+
+ foreach ($subRooms as $subRoom) {
+ $pageId = $subRoom['page_id'];
+ if (!$this->deleteRoom($pageId)) {
+ return false;
+ }
+ }
+
+ if (!$this->deleteLowestRoom($roomId)) {
+ return false;
+ }
+
+ return true;
+ }
+
+ /**
+ * サブグループがないルームデータを削除する
+ *
+ * @param string $roomId ルームID
+ * @return boolean true or false
+ * @access public
+ */
+ function deleteLowestRoom($roomId)
+ {
+ $pagesView =& $this->_container->getComponent('pagesView');
+ $modules =& $pagesView->getUsableModulesByRoom($roomId);
+ if ($modules === false) {
+ return false;
+ }
+
+ if (!$this->deleteEachModule($roomId, $modules)) {
+ return false;
+ }
+
+ if (!$this->deleteRoomModule($roomId, null)) {
+ return false;
+ }
+
+ $columnValues = array(
+ 'room_id' => $roomId
+ );
+ if (!$this->_db->deleteExecute('pages_users_link', $columnValues)) {
+ return false;
+ }
+
+ $inValue = '';
+ $sql = "SELECT page_id, "
+ . "room_id, "
+ . "parent_id, "
+ . "display_sequence, "
+ . "lang_dirname, "
+ . "private_flag "
+ . "FROM {pages} "
+ . "WHERE room_id = ?";
+ $pages =& $this->_db->execute($sql, $roomId);
+ if ($pages === false) {
+ $this->_db->addError();
+ return false;
+ }
+ foreach ($pages as $page) {
+ $inValue .= $page['page_id'] . ',';
+
+ if ($page['page_id'] == $page['room_id']) {
+ $parentId = $page['parent_id'];
+ $sequence = $page['display_sequence'];
+ $language = $page['lang_dirname'];
+ $isPrivate = $page['private_flag'];
+ }
+ }
+
+ if (empty($inValue)) {
+ return false;
+ }
+ $inValue = substr($inValue, 0, -1);
+ if (!$this->deletePagesByInOperator($inValue)) {
+ return false;
+ }
+
+ if (!empty($parentId)
+ && !$this->decrementDisplaySeq($parentId, $sequence, $language)) {
+ return false;
+ }
+
+ return true;
+ }
+
+ /**
+ * 各モジュール削除処理を呼出す。
+ *
+ * @param mix $roomId ルームID
+ * @param array $modules モジュールデータ配列
+ * @return boolean true or false
+ * @access public
+ */
+ function deleteEachModule($roomId, $modules)
+ {
+ foreach ($modules as $module) {
+ $actionName = $module['delete_action'];
+ if (!strlen($actionName)) {
+ continue;
+ }
+
+ if (!$this->delFuncExec($roomId, $module, $actionName)) {
+ return false;
+ }
+ }
+
+ return true;
+ }
+
+ /**
+ * ルームモジュールデータを削除する。
+ *
+ * @param string $roomId ルームID
+ * @param array $moduleIds モジュールID配列
+ * @return boolean true or false
+ * @access public
+ */
+ function deleteRoomModule($roomId, $moduleIds)
+ {
+ if (isset($roomId)
+ && is_array($moduleIds)
+ && empty($moduleIds)) {
+ return true;
+ }
+
+ $whereClause = '';
+ $bindValues = array();
+ if (!empty($roomId)) {
+ $whereClause .= "room_id = ? ";
+ $bindValues = array(
+ $roomId
+ );
+ }
+ if (!empty($roomId)
+ && !empty($moduleIds)) {
+ $whereClause .= "AND ";
+ }
+ if (!empty($moduleIds)) {
+ $whereClause .= "module_id IN ('" . implode("','", $moduleIds) . "')";
+ }
+
+ $sql = "DELETE FROM {pages_modules_link} "
+ . "WHERE " . $whereClause;
+ if (!$this->_db->execute($sql, $bindValues)) {
+ $this->_db->addError();
+ return false;
+ }
+
+ $uploadsAction =& $this->_container->getComponent('uploadsAction');
+ if (!$uploadsAction->deleteByWhereClause($whereClause, $bindValues)) {
+ return false;
+ }
+
+ $whatsnewAction =& $this->_container->getComponent('whatsnewAction');
+ if (!$whatsnewAction->deleteByWhereClause($whereClause, $bindValues)) {
+ return false;
+ }
+
+ $abbreviateurlAction =& $this->_container->getComponent('abbreviateurlAction');
+ if (!$abbreviateurlAction->deleteByWhereClause($whereClause, $bindValues)) {
+ return false;
+ }
+
+ return true;
+ }
+
+ /**
+ * IN演算子でページデータ、および、ページIDに関係するデータを削除する
+ *
+ * @param string $inValue IN演算子の値(カンマ区切り)
+ * @return boolean true or false
+ * @access public
+ */
+ function deletePagesByInOperator($inValue)
+ {
+ if (empty($inValue)) {
+ return true;
+ }
+
+ $sql = "SELECT B.block_id, "
+ . "B.page_id, "
+ . "B.module_id, "
+ . "B.action_name, "
+ . "M.block_delete_action "
+ . "FROM {blocks} B "
+ . "LEFT JOIN {modules} M "
+ . "ON B.module_id = M.module_id "
+ . "WHERE B.page_id IN (" . $inValue . ")";
+ $blocks =& $this->_db->execute($sql);
+ if ($blocks === false) {
+ $this->_db->addError();
+ return false;
+ }
+
+ $blocksAction =& $this->_container->getComponent('blocksAction');
+ foreach ($blocks as $block) {
+ $blockId = $block['block_id'];
+ $actionName = $block['block_delete_action'];
+ if (!strlen($actionName)) {
+ continue;
+ }
+
+ if (!$blocksAction->delFuncExec($blockId, $block, $actionName)) {
+ return false;
+ }
+ }
+
+ if (!$this->deleteByInOperator('blocks', $inValue)) {
+ return false;
+ }
+
+ if (!$this->deleteByInOperator('menu_detail', $inValue)) {
+ return false;
+ }
+
+ if (!$this->deleteByInOperator('mobile_menu_detail', $inValue)) {
+ return false;
+ }
+
+ if (!$this->deleteByInOperator('pages_meta_inf', $inValue)) {
+ return false;
+ }
+
+ if (!$this->deleteByInOperator('pages_style', $inValue, 'set_page_id')) {
+ return false;
+ }
+
+ if (!$this->deleteByInOperator('pages', $inValue)) {
+ return false;
+ }
+
+ return true;
+ }
+
+ /**
+ * IN演算子でデータを削除する。
+ *
+ * @param string $tableName 対象テーブル名称
+ * @param string $inValue IN演算子の値(カンマ区切り文字列)
+ * @return boolean true or false
+ * @access public
+ */
+ function deleteByInOperator($tableName, $inValue, $columnName = 'page_id')
+ {
+ if (empty($inValue)) {
+ return true;
+ }
+
+ $sql = "DELETE FROM {" . $tableName . "} "
+ . "WHERE " . $columnName . " IN (" . $inValue . ")";
+ if (!$this->_db->execute($sql)) {
+ $this->_db->addError();
+ return false;
+ }
+
+ return true;
+ }
}
?>
diff --git a/html/webapp/components/pages/View.class.php b/html/webapp/components/pages/View.class.php
index 62f3b82..bab3b6c 100644
--- a/html/webapp/components/pages/View.class.php
+++ b/html/webapp/components/pages/View.class.php
@@ -598,5 +598,52 @@ function getGroupWhereStatement()
return $whereStatement;
}
+
+ /**
+ * ルームで使用可能なモジュールデータ配列を取得する
+ *
+ * @param string $roomId ルームID
+ * @return array ルームで使用可能なモジュールデータ配列
+ * @access public
+ */
+ function &getUsableModulesByRoom($roomId, $useIdAsKey = false)
+ {
+ $fetchFunction = null;
+ if ($useIdAsKey) {
+ $fetchFunction = array($this, '_fetchModule');
+ }
+
+ $sql = "SELECT M.module_id, "
+ . "M.action_name, "
+ . "M.delete_action "
+ . "FROM {modules} M "
+ . "INNER JOIN {pages_modules_link} PM "
+ . "ON M.module_id = PM.module_id "
+ . "WHERE PM.room_id = ?";
+ $modules =& $this->_db->execute($sql, $roomId, null, null, true, $fetchFunction);
+ if ($modules === false) {
+ $this->_db->addError();
+ }
+
+ return $modules;
+ }
+
+ /**
+ * モジュールIDをキーとしたモジュールデータ配列を作成する。
+ *
+ * @param object $recordSet モジュールデータADORecordSetオブジェクト
+ * @return string 指定文字区切りの文字列
+ * @access private
+ */
+ function &_fetchModule(&$recordSet)
+ {
+ $modules = array();
+ while ($module = $recordSet->fetchRow()) {
+ $moduleId = $module['module_id'];
+ $modules[$moduleId] = $module;
+ }
+
+ return $modules;
+ }
}
?>
diff --git a/html/webapp/components/uploads/Action.class.php b/html/webapp/components/uploads/Action.class.php
index 1c341c8..fce1a68 100644
--- a/html/webapp/components/uploads/Action.class.php
+++ b/html/webapp/components/uploads/Action.class.php
@@ -355,61 +355,40 @@ function _delUploadFile($upload_id, $upload = null)
}
/**
- * module_idによるUploads削除処理
- * @param int module_id
+ * 条件に該当するアップロードデータを削除する。
+ *
+ * @param string $whereClause where句文字列
+ * @param array $bindValues バインド値配列
* @return boolean true or false
* @access public
*/
- function delUploadsByModuleid($module_id)
+ function deleteByWhereClause($whereClause, $bindValues)
{
- $where_params = array(
- "module_id" => $module_id
- );
- $uploads =& $this->_db->selectExecute("uploads", $where_params);
- if($uploads === false) {
- return false;
- }
- foreach($uploads as $upload) {
- $this->_delUploadFile($upload["upload_id"], $upload);
- }
-
- $result = $this->_db->execute("DELETE FROM {uploads} WHERE module_id=?" .
- " ",$where_params);
-
- if($result === false) {
- //エラーが発生した場合、エラーリストに追加
+ $sql = "SELECT upload_id, "
+ . "physical_file_name, "
+ . "file_path, "
+ . "extension "
+ . "FROM {uploads} "
+ . "WHERE " . $whereClause;
+ $uploads = $this->_db->execute($sql, $bindValues);
+ if ($uploads === false) {
$this->_db->addError();
return false;
}
- return true;
- }
-
-
- /**
- * room_idによるUploads削除処理
- * @param int room_id
- * @return boolean true or false
- * @access public
- */
- function delUploadsByRoomid($room_id)
- {
- $where_params = array(
- "room_id" => $room_id
- );
- $uploads =& $this->_db->selectExecute("uploads", $where_params);
- if($uploads === false) {
- return false;
- }
+ $inValue = '';
foreach($uploads as $upload) {
- $this->_delUploadFile($upload["upload_id"], $upload);
+ $this->_delUploadFile($upload['upload_id'], $upload);
+ $inValue .= $upload['upload_id'] . ',';
+ }
+ if (empty($inValue)) {
+ return true;
}
- $result = $this->_db->execute("DELETE FROM {uploads} WHERE room_id=?" .
- " ",$where_params);
-
- if($result === false) {
- //エラーが発生した場合、エラーリストに追加
+ $inValue = substr($inValue, 0, -1);
+ $sql = "DELETE FROM {uploads} "
+ . "WHERE upload_id IN (" . $inValue . ")";
+ if (!$this->_db->execute($sql)) {
$this->_db->addError();
return false;
}
diff --git a/html/webapp/components/uploads/View.class.php b/html/webapp/components/uploads/View.class.php
index 6e10f42..b58970e 100644
--- a/html/webapp/components/uploads/View.class.php
+++ b/html/webapp/components/uploads/View.class.php
@@ -1,584 +1,590 @@
-_container =& DIContainerFactory::getContainer();
- $this->_db =& $this->_container->getComponent("DbObject");
- }
-
- /**
- * アップロードIDからアップロードオブジェクトを取得
- * @param int upload_id
- * @return array uploads_object
- * @access public
- */
- function getUploadById($id) {
- $params = array(
- "upload_id" => $id
- );
- $sql = "SELECT * FROM {uploads}" .
- " WHERE {uploads}.upload_id = ?" .
- " ";
- $result = $this->_db->execute($sql,$params);
- if($result === false) {
- //エラーが発生した場合、エラーリストに追加
- $db->addError();
- return false;
- }
- if(isset($result[0]))
- return $result;
- else
- return null;
- }
-
- /**
- * モジュールIDからアップロードオブジェクトを取得
- * @param int module_id
- * @return array uploads_object
- * @access public
- */
- function getUploadByModuleid($module_id) {
- $params = array(
- "module_id" => $module_id
- );
- $sql = "SELECT * FROM {uploads}" .
- " WHERE {uploads}.module_id = ?" .
- " ";
- $result = $this->_db->execute($sql,$params);
- if($result === false) {
- //エラーが発生した場合、エラーリストに追加
- $db->addError();
- return false;
- }
- if(isset($result[0]))
- return $result;
- else
- return null;
- }
-
-
- /**
- * 画像表示できるかどうかのチェック
- * @param int $upload_id
- * @param int $show_auth_id 見ることができるルーム権限(主担以上など)
- * @param int $thumbnail_flag 1 or 0 サムネイル表示するかどうか
- * @param string $action_name
- * @return array(string pathname, string file_name)
- * @access public
- */
- function downloadCheck($upload_id, $show_auth_id = null, $thumbnail_flag = 0, $action_name = null, $force_resize=null) {
- $pathname = null;
- $file_name = null;
- $session =& $this->_container->getComponent("Session");
- $pagesView =& $this->_container->getComponent("pagesView");
- $actionChain =& $this->_container->getComponent("ActionChain");
- $action_name = isset($action_name) ? $action_name : $actionChain->getCurActionName();
- $user_id = $session->getParameter("_user_id");
- $physical_file_name = null;
- $cache_flag = false;
- $space_type = _SPACE_TYPE_GROUP;
-
- // add by AllCreator 2010.10.13
- $mobile_imgdsp_size = 0;
- $needThumb = false;
- $mobile_flag = $session->getParameter( "_mobile_flag" );
- if( $mobile_flag == _ON ) {
- $mobile_imgdsp_size = $session->getParameter( "_mobile_imgdsp_size" );
- }
-
-
- if( $force_resize === null ) {
- if( $mobile_imgdsp_size != 0 ) {
- $resize_spec = array( $mobile_imgdsp_size, 0 );
- }
- else {
- $resize_spec = 0;
- }
- }
- else if( $force_resize === 0 ) {
- $resize_spec = 0;
- }
- else {
- $resize_spec = $force_resize;
- }
-
-
- if($upload_id != null) {
- //権限チェック
- $uploads_obj = $this->getUploadById($upload_id);
- if(is_array($uploads_obj)) {
- foreach($uploads_obj as $upload_obj) { // Loop, but here is only one data
-
- if( is_array($resize_spec) ) {
- $needThumb = $this->_needThumb( $upload_obj, $resize_spec );
- }
- //
- // ActionNameチェック
- //
- if($action_name != $upload_obj['action_name']) {
- break;
- }
-
- $room_id = $upload_obj['room_id'];
- $file_name = $upload_obj['file_name'];
-
- // thumbnail_flagを最優先で見ることにした AllCreator 2010.10.13
- if($thumbnail_flag) {
- $physical_file_name = $upload_obj['upload_id']."_thumbnail.".$upload_obj['extension'];
- //$normal_physical_file_name = $upload_obj['physical_file_name'];
- }
- else if( $force_resize !== null && $needThumb==true ) {
- $physical_file_name = $upload_obj['upload_id']."_resize_".$resize_spec[0]."_".$resize_spec[1].".".$upload_obj['extension'];
- }
- // mod by AllCreator 2010.10.13
- else if( $mobile_imgdsp_size!=0 && $needThumb==true ) {
- $physical_file_name = $upload_obj['upload_id']."_mobile_".$mobile_imgdsp_size.".".$upload_obj['extension'];
- }
- else {
- $physical_file_name = $upload_obj['physical_file_name'];
- }
- if($room_id == 0) {
- //room_id=0ならば、誰でも閲覧可能
- $pathname = FILEUPLOADS_DIR.$upload_obj['file_path'];
- $cache_flag = true;
- break;
- } else {
- $page =& $pagesView->getPageById($room_id);
- if(isset($page)) {
- $space_type = $page['space_type'];
- if($space_type == _SPACE_TYPE_PUBLIC) {
- //
- //パブリックスペース
- //
- $auth_id = isset($page['authority_id']) ? $page['authority_id'] : $session->getParameter("_default_entry_auth_public");
- if($show_auth_id != null && $show_auth_id > $auth_id) {
- // 見せれる権限より小さい
- break;
- }
- $pathname = FILEUPLOADS_DIR.$upload_obj['file_path'];
- $cache_flag = true;
- break;
- } else if($space_type == _SPACE_TYPE_GROUP && $page['private_flag'] == _ON) {
- //
- // プライベートスペース
- //
- $cache_flag = ($page['default_entry_flag'] == _ON) ? true : false;
-
- $err_flag = false;
- switch($session->getParameter("_open_private_space")) {
- case _OPEN_PRIVATE_SPACE_GROUP:
- $err_flag = ($user_id != "0") ? false : true;
- break;
- case _OPEN_PRIVATE_SPACE_PUBLIC:
- break;
- case _OPEN_PRIVATE_SPACE_MYPORTAL_GROUP:
- $err_flag = (($user_id != "0" && $page['default_entry_flag'] == _ON) || $user_id == $upload_obj['update_user_id']) ? false : true;
- break;
- case _OPEN_PRIVATE_SPACE_MYPORTAL_PUBLIC:
- $err_flag = (($page['default_entry_flag'] == _ON) || $user_id == $upload_obj['update_user_id']) ? false : true;
- break;
- default:
- $err_flag = ($user_id == $upload_obj['update_user_id']) ? false : true;
- }
- if($err_flag) break;
-
- $auth_id = isset($page['authority_id']) ? $page['authority_id'] : _AUTH_OTHER;
- if($show_auth_id != null && $show_auth_id > $auth_id) {
- // 見せれる権限より小さい
- break;
- }
-
- $pathname = FILEUPLOADS_DIR.$upload_obj['file_path'];
- break;
- } else if($space_type == _SPACE_TYPE_GROUP && $page['default_entry_flag'] == _ON) {
- //
- //グループスペース(すべての会員にデフォルトで参加させる)
- //
- $auth_id = isset($page['authority_id']) ? $page['authority_id'] : $session->getParameter("_default_entry_auth_group");
- if($show_auth_id != null && $show_auth_id > $auth_id) {
- // 見せれる権限より小さい
- break;
- }
- if($user_id != "0" && $auth_id != _AUTH_OTHER) {
- $pathname = FILEUPLOADS_DIR.$upload_obj['file_path'];
- break;
- }
- } else if($space_type == _SPACE_TYPE_GROUP) {
- //
- //グループスペース
- //
- $auth_id = isset($page['authority_id']) ? $page['authority_id'] : _AUTH_OTHER;
- if($show_auth_id != null && $show_auth_id > $auth_id) {
- // 見せれる権限より小さい
- break;
- }
- if($auth_id == _AUTH_OTHER) {
- break;
- }
- //if($auth_id != 0) {
- $pathname = FILEUPLOADS_DIR.$upload_obj['file_path'];
- break;
- //}
- }
- }
- }
- }
- }
- }
- // Thumbnail 最優先
- if($thumbnail_flag && !file_exists($pathname.$physical_file_name)) {
- //
- // common/avatar_thumbnail.gifを使用
- //
- $pathname = MODULE_DIR."/common/files/images/";
- $physical_file_name = "thumbnail.gif";
- }
- // add by AllCreator 2010.10.13
- if( $resize_spec!=0 && $needThumb==true && !file_exists($pathname.$physical_file_name) ) {
- include_once MAPLE_DIR . '/core/FileUpload.class.php';
- $fileUpload =& new FileUpload;
- $result = $fileUpload->resize( $pathname.$upload_obj['physical_file_name'], $resize_spec[0], $resize_spec[1], $pathname.$physical_file_name);
- if( $result == false ) {
- $physical_file_name = $upload_obj['physical_file_name'];
- }
- }
- return array($pathname, $file_name, $physical_file_name, $cache_flag);
- }
-
- /**
- * モバイル用サムネイルを取得すべきアップロード画像か
- * @param int mobile_imgdsp_size
- * @param array uploadsObj
- * @access public
- * @return false:no_need true:need
- */
- function _needThumb( $uploadsObj, $resize_spec )
- {
- // 無条件にオリジナル画像が欲しいという指示だったら
- if( $resize_spec == 0 ) {
- return false; // そのままでいいという判断を返す
- }
-
- //拡張子はgif,png,jpgのみ受け付ける
- switch( strtolower($uploadsObj['extension']) ) {
- case 'jpg':
- case 'png':
- case 'gif':
- break;
- default:
- return false;
- }
- //実サイズが希望サイズを超えているか
- $file_path = FILEUPLOADS_DIR . "/" . $uploadsObj['file_path'] . "/" . $uploadsObj['physical_file_name'];
- $dimension = @getimagesize($file_path);
- if ($dimension === false) {
- return false;
- }
- if( $dimension[0] > $resize_spec[0] || $dimension[1] > $resize_spec[1] ) {
- return true;
- }
- return false;
- }
-
- /**
- * ヘッダー出力
- * @param string pathname
- * @param string filename
- * @access public
- */
- function headerOutput($pathname, $filename, $physical_file_name = null, $cache_flag = false) {
- if($physical_file_name == null) $physical_file_name = $filename;
- $pathname = $pathname.$physical_file_name; //urlencode($filename);
- if ($pathname != null && file_exists($pathname)) {
- $mimetype = $this->mimeinfo("type", $filename);
- if($this->_headerOutput($filename, $pathname, filesize($pathname), $mimetype, $cache_flag) == "200") {
- readfile($pathname);
- }else{
- exit;
- }
- } else {
- header("HTTP/1.0 404 not found");
- }
- }
-
- function _headerOutput($filename, $pathname, $filesize, $mimetype, $cache_flag = false) {
- $status_code = "200";
- $etag = null;
-
- if (!isset($_SERVER['HTTP_USER_AGENT'])) {
- //HTTP_USER_AGENTがない場合、
- header("Content-disposition: inline; filename=\"".$filename."\"");
- } elseif (stristr($_SERVER['HTTP_USER_AGENT'], "MSIE")) {
- // IEの場合
- header("Content-disposition: inline; filename=\"".mb_convert_encoding($filename, "SJIS", _CHARSET)."\"");
- } elseif (stristr($_SERVER['HTTP_USER_AGENT'], "Opera")) {
- // Operaの場合
- header("Content-disposition: attachment; filename=\"".$filename."\"");
- } elseif (stristr($_SERVER['HTTP_USER_AGENT'], "Firefox")) {
- // FireFoxの場合
- if ($mimetype == "application/x-shockwave-flash") {
- header("Content-disposition: inline; filename=\"".$filename."\"");
- } 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)
- header("Content-disposition: inline; filename=\"".$filename."\"");
- }
- if(!empty($pathname)) {
- $stats = stat( $pathname );
- $etag = sprintf( '"%x-%x-%x"', $stats['ino'], $stats['size'], $stats['mtime'] );
- header('Etag: '.$etag);
- }
-
- //header("Content-disposition: inline; filename=\"".$filename."\"");
- // パブリックの画像ならばキャッシュを取るように修正
- if($cache_flag == true) {
- // 1Week
- header("Cache-Control: max-age=604800, public");
- header('Pragma: cache'); //no-cache以外の文字列をセット
- $offset = 60 * 60 * 24 * 7; // 1Week
- header('Expires: '.gmdate('D, d M Y H:i:s', time() + $offset).' GMT');
- if (isset( $_SERVER['HTTP_IF_NONE_MATCH'] ) &&
- stripcslashes( $_SERVER['HTTP_IF_NONE_MATCH'] ) == $etag ) {
- header( 'HTTP/1.1 304 Not Modified' );
- $status_code = "304";
- }
- //} else if (isset($_SERVER['HTTPS']) && stristr($_SERVER['HTTP_USER_AGENT'], "MSIE")) {
- // // IE + サイト全体SSLの場合、ダウンロードが正常に行われない。
- // // ダウンロードさせるためには、以下コメントをはずす必要があるが、
- // // アップロードした画像ファイル等をローカルキャッシュにとられてしまう弊害がある。
- // // 1Week
- // header("Cache-Control: max-age=604800, public");
- // header('Pragma: cache'); //no-cache以外の文字列をセット
- // $offset = 60 * 60 * 24 * 7; // 1Week
- // header('Expires: '.gmdate('D, d M Y H:i:s', time() + $offset).' GMT');
- } else {
- header("Cache-Control: no-store, no-cache, must-revalidate");
- header("Pragma: no-cache");
- }
- //header("Cache-Control: public");//キャッシュを有効にする設定(private or public)
-
- header("Content-length: ".$filesize);
- header("Content-type: ".$mimetype);
- return $status_code;
-
- //header("Content-type: application/force-download");
- //header("Content-type: ForceType application/octet-stream");
- //header("Content-type: AddType application/octet-stream");
- //header("Content-type: application/octet-stream");
- }
-
- /**
- * PHPで作られたファイルダウンロードメソッド
- * @param string $data
- * @param string $filename (hogehoge.csv等)
- * @param string $mime_type (document/unknown等)
- * @access public
- */
- function download($data, $filename, $mimetype = null) {
- if($mimetype == null) {
- $mimetype = $this->mimeinfo("type", $filename);
- }
- $this->_headerOutput($filename, null, strlen($data), $mimetype);
-
- echo $data;
- }
-
- /**
- * Mimeタイプ取得
- * @param int key(type or icon)
- * @return string mime_type
- * @access public
- */
- function mimeinfo($key, $filename) {
- $mimeinfo = array (
- "xxx" => array ("type"=>"document/unknown", "icon"=>"unknown.gif"),
- "3gp" => array ("type"=>"video/quicktime", "icon"=>"video.gif"),
- "ai" => array ("type"=>"application/postscript", "icon"=>"image.gif"),
- "aif" => array ("type"=>"audio/x-aiff", "icon"=>"audio.gif"),
- "aiff" => array ("type"=>"audio/x-aiff", "icon"=>"audio.gif"),
- "aifc" => array ("type"=>"audio/x-aiff", "icon"=>"audio.gif"),
- "applescript" => array ("type"=>"text/plain", "icon"=>"text.gif"),
- "asc" => array ("type"=>"text/plain", "icon"=>"text.gif"),
- "au" => array ("type"=>"audio/au", "icon"=>"audio.gif"),
- "avi" => array ("type"=>"video/x-ms-wm", "icon"=>"avi.gif"),
- "bmp" => array ("type"=>"image/bmp", "icon"=>"image.gif"),
- "cs" => array ("type"=>"application/x-csh", "icon"=>"text.gif"),
- "css" => array ("type"=>"text/css", "icon"=>"text.gif"),
- "csv" => array ("type"=>"text/plain", "icon"=>"csv.gif"),
- "dv" => array ("type"=>"video/x-dv", "icon"=>"video.gif"),
- "doc" => array ("type"=>"application/msword", "icon"=>"word.gif"),
- "docx" => array ("type"=>"application/vnd.openxmlformats-officedocument.wordprocessingml.document", "icon"=>"word.gif"),
- "dif" => array ("type"=>"video/x-dv", "icon"=>"video.gif"),
- "eps" => array ("type"=>"application/postscript", "icon"=>"pdf.gif"),
- "gif" => array ("type"=>"image/gif", "icon"=>"image.gif"),
- "gtar" => array ("type"=>"application/x-gtar", "icon"=>"zip.gif"),
- "gz" => array ("type"=>"application/g-zip", "icon"=>"zip.gif"),
- "gzip" => array ("type"=>"application/g-zip", "icon"=>"zip.gif"),
- "h" => array ("type"=>"text/plain", "icon"=>"text.gif"),
- "hqx" => array ("type"=>"application/mac-binhex40", "icon"=>"zip.gif"),
- "html" => array ("type"=>"text/html", "icon"=>"html.gif"),
- "htm" => array ("type"=>"text/html", "icon"=>"html.gif"),
- "jpe" => array ("type"=>"image/jpeg", "icon"=>"image.gif"),
- "jpeg" => array ("type"=>"image/jpeg", "icon"=>"image.gif"),
- "jpg" => array ("type"=>"image/jpeg", "icon"=>"image.gif"),
- "js" => array ("type"=>"application/x-javascript", "icon"=>"text.gif"),
- "latex"=> array ("type"=>"application/x-latex", "icon"=>"text.gif"),
- "m" => array ("type"=>"text/plain", "icon"=>"text.gif"),
- "flv" => array ("type"=>"video/x-flv", "icon"=>"video.gif"),
- "mov" => array ("type"=>"video/quicktime", "icon"=>"video.gif"),
- "movie"=> array ("type"=>"video/x-sgi-movie", "icon"=>"video.gif"),
- "m3u" => array ("type"=>"audio/x-mpegurl", "icon"=>"audio.gif"),
- "mp3" => array ("type"=>"audio/mp3", "icon"=>"audio.gif"),
- "mp4" => array ("type"=>"video/mp4", "icon"=>"video.gif"),
- "mpeg" => array ("type"=>"video/mpeg", "icon"=>"video.gif"),
- "mpe" => array ("type"=>"video/mpeg", "icon"=>"video.gif"),
- "mpg" => array ("type"=>"video/mpeg", "icon"=>"video.gif"),
- "pct" => array ("type"=>"image/pict", "icon"=>"image.gif"),
- "pdf" => array ("type"=>"application/pdf", "icon"=>"pdf.gif"),
- "php" => array ("type"=>"text/plain", "icon"=>"text.gif"),
- "pic" => array ("type"=>"image/pict", "icon"=>"image.gif"),
- "pict" => array ("type"=>"image/pict", "icon"=>"image.gif"),
- "png" => array ("type"=>"image/png", "icon"=>"image.gif"),
- "pps" => array ("type"=>"application/vnd.ms-powerpoint", "icon"=>"powerpoint.gif"),
- "ppt" => array ("type"=>"application/vnd.ms-powerpoint", "icon"=>"powerpoint.gif"),
- "pptx" => array ("type"=>"application/vnd.openxmlformats-officedocument.presentationml.presentation", "icon"=>"powerpoint.gif"),
- "ps" => array ("type"=>"application/postscript", "icon"=>"pdf.gif"),
- "qt" => array ("type"=>"video/quicktime", "icon"=>"video.gif"),
- "ra" => array ("type"=>"audio/x-realaudio", "icon"=>"audio.gif"),
- "ram" => array ("type"=>"audio/x-pn-realaudio", "icon"=>"audio.gif"),
- "rm" => array ("type"=>"audio/x-pn-realaudio", "icon"=>"audio.gif"),
- "rtf" => array ("type"=>"text/rtf", "icon"=>"text.gif"),
- "rtx" => array ("type"=>"text/richtext", "icon"=>"text.gif"),
- "sh" => array ("type"=>"application/x-sh", "icon"=>"text.gif"),
- "sit" => array ("type"=>"application/x-stuffit", "icon"=>"zip.gif"),
- "smi" => array ("type"=>"application/smil", "icon"=>"text.gif"),
- "smil" => array ("type"=>"application/smil", "icon"=>"text.gif"),
- "swf" => array ("type"=>"application/x-shockwave-flash", "icon"=>"flash.gif"),
- "tar" => array ("type"=>"application/x-tar", "icon"=>"zip.gif"),
- "tgz" => array ("type"=>"application/x-tar", "icon"=>"zip.gif"),
- "tif" => array ("type"=>"image/tiff", "icon"=>"image.gif"),
- "tiff" => array ("type"=>"image/tiff", "icon"=>"image.gif"),
- "tex" => array ("type"=>"application/x-tex", "icon"=>"text.gif"),
- "texi" => array ("type"=>"application/x-texinfo", "icon"=>"text.gif"),
- "texinfo" => array ("type"=>"application/x-texinfo", "icon"=>"text.gif"),
- "tsv" => array ("type"=>"text/tab-separated-values", "icon"=>"text.gif"),
- "txt" => array ("type"=>"text/plain", "icon"=>"text.gif"),
- "wav" => array ("type"=>"audio/wav", "icon"=>"audio.gif"),
- "wmv" => array ("type"=>"video/x-ms-wmv", "icon"=>"avi.gif"),
- "asf" => array ("type"=>"video/x-ms-asf", "icon"=>"avi.gif"),
- "xls" => array ("type"=>"application/vnd.ms-excel", "icon"=>"excel.gif"),
- "xlsx" => array ("type"=>"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", "icon"=>"excel.gif"),
- "xml" => array ("type"=>"text/xml", "icon"=>"xml.gif"),
- "xsl" => array ("type"=>"text/xml", "icon"=>"xml.gif"),
- "zip" => array ("type"=>"application/zip", "icon"=>"zip.gif"),
- "tex" => array ("type"=>"application/x-tex", "icon"=>"text.gif"),
- "dvi" => array ("type"=>"application/x-dvi", "icon"=>"text.gif"),
- "ps" => array ("type"=>"application/postscript", "icon"=>"text.gif"),
- "ics" => array ("type"=>"application/octet-stream", "icon"=>"outlook.gif"),
- "jtd" => array ("type"=>"application/x-js-taro", "icon"=>"unknown.gif"),
- "jbw" => array ("type"=>"application/x-js-taro", "icon"=>"unknown.gif"),
- "jtt" => array ("type"=>"application/x-js-taro", "icon"=>"unknown.gif"),
- "jfw" => array ("type"=>"application/x-js-taro", "icon"=>"unknown.gif"),
- "jvw" => array ("type"=>"application/x-js-taro", "icon"=>"unknown.gif"),
- "juw" => array ("type"=>"application/x-js-taro", "icon"=>"unknown.gif"),
- "jaw" => array ("type"=>"application/x-js-taro", "icon"=>"unknown.gif"),
- "jtw" => array ("type"=>"application/x-js-taro", "icon"=>"unknown.gif"),
- "jsw" => array ("type"=>"application/x-js-taro", "icon"=>"unknown.gif"),
- "jxw" => array ("type"=>"application/x-js-taro", "icon"=>"unknown.gif"),
- "odt" => array ("type"=>"application/vnd.oasis.opendocument.text", "icon"=>"unknown.gif"),
- "odg" => array ("type"=>"application/vnd.oasis.opendocument.graphic", "icon"=>"unknown.gif"),
- "ods" => array ("type"=>"application/vnd.oasis.opendocument.spreadsheet", "icon"=>"unknown.gif"),
- "odp" => array ("type"=>"application/vnd.oasis.opendocument.presentation", "icon"=>"unknown.gif"),
- "odb" => array ("type"=>"application/vnd.oasis.opendocument.database", "icon"=>"unknown.gif"),
- "odf" => array ("type"=>"application/vnd.oasis.opendocument.formula", "icon"=>"unknown.gif")
- );
-
- if (eregi("\.([a-z0-9]+)$", $filename, $match)) {
- if(isset($mimeinfo[strtolower($match[1])][$key])) {
- return $mimeinfo[strtolower($match[1])][$key];
- } else {
- return $mimeinfo["xxx"][$key]; // By default
- }
- } else {
- return $mimeinfo["xxx"][$key]; // By default
- }
- }
-
- /**
- * 指定された拡張子になっているか?
- *
- * @param string $file_name
- * @param string $allow_extension 拡張子文字列(「,」区切りで複数指定可)
- * 指定しない場合、configのallow_extensionの中にあるかどうかのチェック
- * @return array pathInfo or false
- * @access public
- */
- function checkExtension($file_name, $allow_extension = null)
- {
- $pathinfo = pathinfo($file_name);
- if(isset($pathinfo['extension'])) {
- $extension_str = strtolower($pathinfo['extension']);
- } else {
- $extension_str = "";
- }
-
- if($allow_extension == null) {
- $configView =& $this->_container->getComponent("configView");
- $config = $configView->getConfigByConfname(_SYS_CONF_MODID, "allow_extension");
- if(!isset($config["conf_value"])) {
- return false;
- }
- $allow_extension = $config["conf_value"];
- }
-
- if($allow_extension != "") {
- $extensionArray = explode(",", strtolower($allow_extension));
- if(!in_array($extension_str, $extensionArray)) {
- return false;
- }
- }
- //
- // tar.gzの対応
- // tar.gzのほかにも同じような拡張子があるかも
- //
- if(preg_match("/.+\.tar\.gz$/i", $file_name)) {
- $pathinfo['extension'] = "tar.gz";
- }
- return $pathinfo;
- }
-}
-?>
+_container =& DIContainerFactory::getContainer();
+ $this->_db =& $this->_container->getComponent("DbObject");
+ }
+
+ /**
+ * アップロードIDからアップロードオブジェクトを取得
+ * @param int upload_id
+ * @return array uploads_object
+ * @access public
+ */
+ function getUploadById($id) {
+ $params = array(
+ "upload_id" => $id
+ );
+ $sql = "SELECT * FROM {uploads}" .
+ " WHERE {uploads}.upload_id = ?" .
+ " ";
+ $result = $this->_db->execute($sql,$params);
+ if($result === false) {
+ //エラーが発生した場合、エラーリストに追加
+ $db->addError();
+ return false;
+ }
+ if(isset($result[0]))
+ return $result;
+ else
+ return null;
+ }
+
+ /**
+ * モジュールIDからアップロードオブジェクトを取得
+ * @param int module_id
+ * @return array uploads_object
+ * @access public
+ */
+ function getUploadByModuleid($module_id) {
+ $params = array(
+ "module_id" => $module_id
+ );
+ $sql = "SELECT * FROM {uploads}" .
+ " WHERE {uploads}.module_id = ?" .
+ " ";
+ $result = $this->_db->execute($sql,$params);
+ if($result === false) {
+ //エラーが発生した場合、エラーリストに追加
+ $db->addError();
+ return false;
+ }
+ if(isset($result[0]))
+ return $result;
+ else
+ return null;
+ }
+
+
+ /**
+ * 画像表示できるかどうかのチェック
+ * @param int $upload_id
+ * @param int $show_auth_id 見ることができるルーム権限(主担以上など)
+ * @param int $thumbnail_flag 1 or 0 サムネイル表示するかどうか
+ * @param string $action_name
+ * @return array(string pathname, string file_name)
+ * @access public
+ */
+ function downloadCheck($upload_id, $show_auth_id = null, $thumbnail_flag = 0, $action_name = null, $force_resize=null) {
+ $pathname = null;
+ $file_name = null;
+ $session =& $this->_container->getComponent("Session");
+ $pagesView =& $this->_container->getComponent("pagesView");
+ $actionChain =& $this->_container->getComponent("ActionChain");
+ $action_name = isset($action_name) ? $action_name : $actionChain->getCurActionName();
+ $user_id = $session->getParameter("_user_id");
+ $physical_file_name = null;
+ $cache_flag = false;
+ $space_type = _SPACE_TYPE_GROUP;
+
+ // add by AllCreator 2010.10.13
+ $mobile_imgdsp_size = 0;
+ $needThumb = false;
+ $mobile_flag = $session->getParameter( "_mobile_flag" );
+ if( $mobile_flag == _ON ) {
+ $mobile_imgdsp_size = $session->getParameter( "_mobile_imgdsp_size" );
+ }
+
+
+ if( $force_resize === null ) {
+ if( $mobile_imgdsp_size != 0 ) {
+ $resize_spec = array( $mobile_imgdsp_size, 0 );
+ }
+ else {
+ $resize_spec = 0;
+ }
+ }
+ else if( $force_resize === 0 ) {
+ $resize_spec = 0;
+ }
+ else {
+ $resize_spec = $force_resize;
+ }
+
+
+ if($upload_id != null) {
+ //権限チェック
+ $uploads_obj = $this->getUploadById($upload_id);
+ if(is_array($uploads_obj)) {
+ foreach($uploads_obj as $upload_obj) { // Loop, but here is only one data
+
+ if( is_array($resize_spec) ) {
+ $needThumb = $this->_needThumb( $upload_obj, $resize_spec );
+ }
+ //
+ // ActionNameチェック
+ //
+ if($action_name != $upload_obj['action_name']) {
+ break;
+ }
+
+ $room_id = $upload_obj['room_id'];
+ $file_name = $upload_obj['file_name'];
+
+ // thumbnail_flagを最優先で見ることにした AllCreator 2010.10.13
+ if($thumbnail_flag) {
+ $physical_file_name = $upload_obj['upload_id']."_thumbnail.".$upload_obj['extension'];
+ //$normal_physical_file_name = $upload_obj['physical_file_name'];
+ }
+ else if( $force_resize !== null && $needThumb==true ) {
+ $physical_file_name = $upload_obj['upload_id']."_resize_".$resize_spec[0]."_".$resize_spec[1].".".$upload_obj['extension'];
+ }
+ // mod by AllCreator 2010.10.13
+ else if( $mobile_imgdsp_size!=0 && $needThumb==true ) {
+ $physical_file_name = $upload_obj['upload_id']."_mobile_".$mobile_imgdsp_size.".".$upload_obj['extension'];
+ }
+ else {
+ $physical_file_name = $upload_obj['physical_file_name'];
+ }
+ if($room_id == 0) {
+ //room_id=0ならば、誰でも閲覧可能
+ $pathname = FILEUPLOADS_DIR.$upload_obj['file_path'];
+ $cache_flag = true;
+ break;
+ } else {
+ $page =& $pagesView->getPageById($room_id);
+ if(isset($page)) {
+ $space_type = $page['space_type'];
+ if($space_type == _SPACE_TYPE_PUBLIC) {
+ //
+ //パブリックスペース
+ //
+ $auth_id = isset($page['authority_id']) ? $page['authority_id'] : $session->getParameter("_default_entry_auth_public");
+ if($show_auth_id != null && $show_auth_id > $auth_id) {
+ // 見せれる権限より小さい
+ break;
+ }
+ $pathname = FILEUPLOADS_DIR.$upload_obj['file_path'];
+ $cache_flag = true;
+ break;
+ } else if($space_type == _SPACE_TYPE_GROUP && $page['private_flag'] == _ON) {
+ //
+ // プライベートスペース
+ //
+ $cache_flag = ($page['default_entry_flag'] == _ON) ? true : false;
+
+ $err_flag = false;
+ switch($session->getParameter("_open_private_space")) {
+ case _OPEN_PRIVATE_SPACE_GROUP:
+ $err_flag = ($user_id != "0") ? false : true;
+ break;
+ case _OPEN_PRIVATE_SPACE_PUBLIC:
+ break;
+ case _OPEN_PRIVATE_SPACE_MYPORTAL_GROUP:
+ $err_flag = (($user_id != "0" && $page['default_entry_flag'] == _ON) || $user_id == $upload_obj['update_user_id']) ? false : true;
+ break;
+ case _OPEN_PRIVATE_SPACE_MYPORTAL_PUBLIC:
+ $err_flag = (($page['default_entry_flag'] == _ON) || $user_id == $upload_obj['update_user_id']) ? false : true;
+ break;
+ default:
+ $err_flag = ($user_id == $upload_obj['update_user_id']) ? false : true;
+ }
+ if($err_flag) break;
+
+ $auth_id = isset($page['authority_id']) ? $page['authority_id'] : _AUTH_OTHER;
+ if($show_auth_id != null && $show_auth_id > $auth_id) {
+ // 見せれる権限より小さい
+ break;
+ }
+
+ $pathname = FILEUPLOADS_DIR.$upload_obj['file_path'];
+ break;
+ } else if($space_type == _SPACE_TYPE_GROUP && $page['default_entry_flag'] == _ON) {
+ //
+ //グループスペース(すべての会員にデフォルトで参加させる)
+ //
+ $auth_id = isset($page['authority_id']) ? $page['authority_id'] : $session->getParameter("_default_entry_auth_group");
+ if($show_auth_id != null && $show_auth_id > $auth_id) {
+ // 見せれる権限より小さい
+ break;
+ }
+ if($user_id != "0" && $auth_id != _AUTH_OTHER) {
+ $pathname = FILEUPLOADS_DIR.$upload_obj['file_path'];
+ break;
+ }
+ } else if($space_type == _SPACE_TYPE_GROUP) {
+ //
+ //グループスペース
+ //
+ $auth_id = isset($page['authority_id']) ? $page['authority_id'] : _AUTH_OTHER;
+ if($show_auth_id != null && $show_auth_id > $auth_id) {
+ // 見せれる権限より小さい
+ break;
+ }
+ if($auth_id == _AUTH_OTHER) {
+ break;
+ }
+ //if($auth_id != 0) {
+ $pathname = FILEUPLOADS_DIR.$upload_obj['file_path'];
+ break;
+ //}
+ }
+ }
+ }
+ }
+ }
+ }
+ // Thumbnail 最優先
+ if($thumbnail_flag && !file_exists($pathname.$physical_file_name)) {
+ //
+ // common/avatar_thumbnail.gifを使用
+ //
+ $pathname = MODULE_DIR."/common/files/images/";
+ $physical_file_name = "thumbnail.gif";
+ }
+ // add by AllCreator 2010.10.13
+ if( $resize_spec!=0 && $needThumb==true && !file_exists($pathname.$physical_file_name) ) {
+ include_once MAPLE_DIR . '/core/FileUpload.class.php';
+ $fileUpload =& new FileUpload;
+ $result = $fileUpload->resize( $pathname.$upload_obj['physical_file_name'], $resize_spec[0], $resize_spec[1], $pathname.$physical_file_name);
+ if( $result == false ) {
+ $physical_file_name = $upload_obj['physical_file_name'];
+ }
+ }
+ return array($pathname, $file_name, $physical_file_name, $cache_flag);
+ }
+
+ /**
+ * モバイル用サムネイルを取得すべきアップロード画像か
+ * @param int mobile_imgdsp_size
+ * @param array uploadsObj
+ * @access public
+ * @return false:no_need true:need
+ */
+ function _needThumb( $uploadsObj, $resize_spec )
+ {
+ // 無条件にオリジナル画像が欲しいという指示だったら
+ if( $resize_spec == 0 ) {
+ return false; // そのままでいいという判断を返す
+ }
+
+ //拡張子はgif,png,jpgのみ受け付ける
+ switch( strtolower($uploadsObj['extension']) ) {
+ case 'jpg':
+ case 'png':
+ case 'gif':
+ break;
+ default:
+ return false;
+ }
+ //実サイズが希望サイズを超えているか
+ $file_path = FILEUPLOADS_DIR . "/" . $uploadsObj['file_path'] . "/" . $uploadsObj['physical_file_name'];
+ $dimension = @getimagesize($file_path);
+ if ($dimension === false) {
+ return false;
+ }
+ if( $dimension[0] > $resize_spec[0] || $dimension[1] > $resize_spec[1] ) {
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * ヘッダー出力
+ * @param string pathname
+ * @param string filename
+ * @access public
+ */
+ function headerOutput($pathname, $filename, $physical_file_name = null, $cache_flag = false) {
+ if($physical_file_name == null) $physical_file_name = $filename;
+ $pathname = $pathname.$physical_file_name; //urlencode($filename);
+ if ($pathname != null && file_exists($pathname)) {
+ $mimetype = $this->mimeinfo("type", $filename);
+ if($this->_headerOutput($filename, $pathname, filesize($pathname), $mimetype, $cache_flag) == "200") {
+ $handle = fopen($pathname, 'rb');
+ while (!feof($handle)) {
+ echo fread($handle, 1 * (1024 * 1024));
+ ob_flush();
+ flush();
+ }
+ fclose($handle);
+ }else{
+ exit;
+ }
+ } else {
+ header("HTTP/1.0 404 not found");
+ }
+ }
+
+ function _headerOutput($filename, $pathname, $filesize, $mimetype, $cache_flag = false) {
+ $status_code = "200";
+ $etag = null;
+
+ if (!isset($_SERVER['HTTP_USER_AGENT'])) {
+ //HTTP_USER_AGENTがない場合、
+ header("Content-disposition: inline; filename=\"".$filename."\"");
+ } elseif (stristr($_SERVER['HTTP_USER_AGENT'], "MSIE")) {
+ // IEの場合
+ header("Content-disposition: inline; filename=\"".mb_convert_encoding($filename, "SJIS", _CHARSET)."\"");
+ } elseif (stristr($_SERVER['HTTP_USER_AGENT'], "Opera")) {
+ // Operaの場合
+ header("Content-disposition: attachment; filename=\"".$filename."\"");
+ } elseif (stristr($_SERVER['HTTP_USER_AGENT'], "Firefox")) {
+ // FireFoxの場合
+ if ($mimetype == "application/x-shockwave-flash") {
+ header("Content-disposition: inline; filename=\"".$filename."\"");
+ } 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)
+ header("Content-disposition: inline; filename=\"".$filename."\"");
+ }
+ if(!empty($pathname)) {
+ $stats = stat( $pathname );
+ $etag = sprintf( '"%x-%x-%x"', $stats['ino'], $stats['size'], $stats['mtime'] );
+ header('Etag: '.$etag);
+ }
+
+ //header("Content-disposition: inline; filename=\"".$filename."\"");
+ // パブリックの画像ならばキャッシュを取るように修正
+ if($cache_flag == true) {
+ // 1Week
+ header("Cache-Control: max-age=604800, public");
+ header('Pragma: cache'); //no-cache以外の文字列をセット
+ $offset = 60 * 60 * 24 * 7; // 1Week
+ header('Expires: '.gmdate('D, d M Y H:i:s', time() + $offset).' GMT');
+ if (isset( $_SERVER['HTTP_IF_NONE_MATCH'] ) &&
+ stripcslashes( $_SERVER['HTTP_IF_NONE_MATCH'] ) == $etag ) {
+ header( 'HTTP/1.1 304 Not Modified' );
+ $status_code = "304";
+ }
+ //} else if (isset($_SERVER['HTTPS']) && stristr($_SERVER['HTTP_USER_AGENT'], "MSIE")) {
+ // // IE + サイト全体SSLの場合、ダウンロードが正常に行われない。
+ // // ダウンロードさせるためには、以下コメントをはずす必要があるが、
+ // // アップロードした画像ファイル等をローカルキャッシュにとられてしまう弊害がある。
+ // // 1Week
+ // header("Cache-Control: max-age=604800, public");
+ // header('Pragma: cache'); //no-cache以外の文字列をセット
+ // $offset = 60 * 60 * 24 * 7; // 1Week
+ // header('Expires: '.gmdate('D, d M Y H:i:s', time() + $offset).' GMT');
+ } else {
+ header("Cache-Control: no-store, no-cache, must-revalidate");
+ header("Pragma: no-cache");
+ }
+ //header("Cache-Control: public");//キャッシュを有効にする設定(private or public)
+
+ header("Content-length: ".$filesize);
+ header("Content-type: ".$mimetype);
+ return $status_code;
+
+ //header("Content-type: application/force-download");
+ //header("Content-type: ForceType application/octet-stream");
+ //header("Content-type: AddType application/octet-stream");
+ //header("Content-type: application/octet-stream");
+ }
+
+ /**
+ * PHPで作られたファイルダウンロードメソッド
+ * @param string $data
+ * @param string $filename (hogehoge.csv等)
+ * @param string $mime_type (document/unknown等)
+ * @access public
+ */
+ function download($data, $filename, $mimetype = null) {
+ if($mimetype == null) {
+ $mimetype = $this->mimeinfo("type", $filename);
+ }
+ $this->_headerOutput($filename, null, strlen($data), $mimetype);
+
+ echo $data;
+ }
+
+ /**
+ * Mimeタイプ取得
+ * @param int key(type or icon)
+ * @return string mime_type
+ * @access public
+ */
+ function mimeinfo($key, $filename) {
+ $mimeinfo = array (
+ "xxx" => array ("type"=>"document/unknown", "icon"=>"unknown.gif"),
+ "3gp" => array ("type"=>"video/quicktime", "icon"=>"video.gif"),
+ "ai" => array ("type"=>"application/postscript", "icon"=>"image.gif"),
+ "aif" => array ("type"=>"audio/x-aiff", "icon"=>"audio.gif"),
+ "aiff" => array ("type"=>"audio/x-aiff", "icon"=>"audio.gif"),
+ "aifc" => array ("type"=>"audio/x-aiff", "icon"=>"audio.gif"),
+ "applescript" => array ("type"=>"text/plain", "icon"=>"text.gif"),
+ "asc" => array ("type"=>"text/plain", "icon"=>"text.gif"),
+ "au" => array ("type"=>"audio/au", "icon"=>"audio.gif"),
+ "avi" => array ("type"=>"video/x-ms-wm", "icon"=>"avi.gif"),
+ "bmp" => array ("type"=>"image/bmp", "icon"=>"image.gif"),
+ "cs" => array ("type"=>"application/x-csh", "icon"=>"text.gif"),
+ "css" => array ("type"=>"text/css", "icon"=>"text.gif"),
+ "csv" => array ("type"=>"text/plain", "icon"=>"csv.gif"),
+ "dv" => array ("type"=>"video/x-dv", "icon"=>"video.gif"),
+ "doc" => array ("type"=>"application/msword", "icon"=>"word.gif"),
+ "docx" => array ("type"=>"application/vnd.openxmlformats-officedocument.wordprocessingml.document", "icon"=>"word.gif"),
+ "dif" => array ("type"=>"video/x-dv", "icon"=>"video.gif"),
+ "eps" => array ("type"=>"application/postscript", "icon"=>"pdf.gif"),
+ "gif" => array ("type"=>"image/gif", "icon"=>"image.gif"),
+ "gtar" => array ("type"=>"application/x-gtar", "icon"=>"zip.gif"),
+ "gz" => array ("type"=>"application/g-zip", "icon"=>"zip.gif"),
+ "gzip" => array ("type"=>"application/g-zip", "icon"=>"zip.gif"),
+ "h" => array ("type"=>"text/plain", "icon"=>"text.gif"),
+ "hqx" => array ("type"=>"application/mac-binhex40", "icon"=>"zip.gif"),
+ "html" => array ("type"=>"text/html", "icon"=>"html.gif"),
+ "htm" => array ("type"=>"text/html", "icon"=>"html.gif"),
+ "jpe" => array ("type"=>"image/jpeg", "icon"=>"image.gif"),
+ "jpeg" => array ("type"=>"image/jpeg", "icon"=>"image.gif"),
+ "jpg" => array ("type"=>"image/jpeg", "icon"=>"image.gif"),
+ "js" => array ("type"=>"application/x-javascript", "icon"=>"text.gif"),
+ "latex"=> array ("type"=>"application/x-latex", "icon"=>"text.gif"),
+ "m" => array ("type"=>"text/plain", "icon"=>"text.gif"),
+ "flv" => array ("type"=>"video/x-flv", "icon"=>"video.gif"),
+ "mov" => array ("type"=>"video/quicktime", "icon"=>"video.gif"),
+ "movie"=> array ("type"=>"video/x-sgi-movie", "icon"=>"video.gif"),
+ "m3u" => array ("type"=>"audio/x-mpegurl", "icon"=>"audio.gif"),
+ "mp3" => array ("type"=>"audio/mp3", "icon"=>"audio.gif"),
+ "mp4" => array ("type"=>"video/mp4", "icon"=>"video.gif"),
+ "mpeg" => array ("type"=>"video/mpeg", "icon"=>"video.gif"),
+ "mpe" => array ("type"=>"video/mpeg", "icon"=>"video.gif"),
+ "mpg" => array ("type"=>"video/mpeg", "icon"=>"video.gif"),
+ "pct" => array ("type"=>"image/pict", "icon"=>"image.gif"),
+ "pdf" => array ("type"=>"application/pdf", "icon"=>"pdf.gif"),
+ "php" => array ("type"=>"text/plain", "icon"=>"text.gif"),
+ "pic" => array ("type"=>"image/pict", "icon"=>"image.gif"),
+ "pict" => array ("type"=>"image/pict", "icon"=>"image.gif"),
+ "png" => array ("type"=>"image/png", "icon"=>"image.gif"),
+ "pps" => array ("type"=>"application/vnd.ms-powerpoint", "icon"=>"powerpoint.gif"),
+ "ppt" => array ("type"=>"application/vnd.ms-powerpoint", "icon"=>"powerpoint.gif"),
+ "pptx" => array ("type"=>"application/vnd.openxmlformats-officedocument.presentationml.presentation", "icon"=>"powerpoint.gif"),
+ "ps" => array ("type"=>"application/postscript", "icon"=>"pdf.gif"),
+ "qt" => array ("type"=>"video/quicktime", "icon"=>"video.gif"),
+ "ra" => array ("type"=>"audio/x-realaudio", "icon"=>"audio.gif"),
+ "ram" => array ("type"=>"audio/x-pn-realaudio", "icon"=>"audio.gif"),
+ "rm" => array ("type"=>"audio/x-pn-realaudio", "icon"=>"audio.gif"),
+ "rtf" => array ("type"=>"text/rtf", "icon"=>"text.gif"),
+ "rtx" => array ("type"=>"text/richtext", "icon"=>"text.gif"),
+ "sh" => array ("type"=>"application/x-sh", "icon"=>"text.gif"),
+ "sit" => array ("type"=>"application/x-stuffit", "icon"=>"zip.gif"),
+ "smi" => array ("type"=>"application/smil", "icon"=>"text.gif"),
+ "smil" => array ("type"=>"application/smil", "icon"=>"text.gif"),
+ "swf" => array ("type"=>"application/x-shockwave-flash", "icon"=>"flash.gif"),
+ "tar" => array ("type"=>"application/x-tar", "icon"=>"zip.gif"),
+ "tgz" => array ("type"=>"application/x-tar", "icon"=>"zip.gif"),
+ "tif" => array ("type"=>"image/tiff", "icon"=>"image.gif"),
+ "tiff" => array ("type"=>"image/tiff", "icon"=>"image.gif"),
+ "tex" => array ("type"=>"application/x-tex", "icon"=>"text.gif"),
+ "texi" => array ("type"=>"application/x-texinfo", "icon"=>"text.gif"),
+ "texinfo" => array ("type"=>"application/x-texinfo", "icon"=>"text.gif"),
+ "tsv" => array ("type"=>"text/tab-separated-values", "icon"=>"text.gif"),
+ "txt" => array ("type"=>"text/plain", "icon"=>"text.gif"),
+ "wav" => array ("type"=>"audio/wav", "icon"=>"audio.gif"),
+ "wmv" => array ("type"=>"video/x-ms-wmv", "icon"=>"avi.gif"),
+ "asf" => array ("type"=>"video/x-ms-asf", "icon"=>"avi.gif"),
+ "xls" => array ("type"=>"application/vnd.ms-excel", "icon"=>"excel.gif"),
+ "xlsx" => array ("type"=>"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", "icon"=>"excel.gif"),
+ "xml" => array ("type"=>"text/xml", "icon"=>"xml.gif"),
+ "xsl" => array ("type"=>"text/xml", "icon"=>"xml.gif"),
+ "zip" => array ("type"=>"application/zip", "icon"=>"zip.gif"),
+ "tex" => array ("type"=>"application/x-tex", "icon"=>"text.gif"),
+ "dvi" => array ("type"=>"application/x-dvi", "icon"=>"text.gif"),
+ "ps" => array ("type"=>"application/postscript", "icon"=>"text.gif"),
+ "ics" => array ("type"=>"application/octet-stream", "icon"=>"outlook.gif"),
+ "jtd" => array ("type"=>"application/x-js-taro", "icon"=>"unknown.gif"),
+ "jbw" => array ("type"=>"application/x-js-taro", "icon"=>"unknown.gif"),
+ "jtt" => array ("type"=>"application/x-js-taro", "icon"=>"unknown.gif"),
+ "jfw" => array ("type"=>"application/x-js-taro", "icon"=>"unknown.gif"),
+ "jvw" => array ("type"=>"application/x-js-taro", "icon"=>"unknown.gif"),
+ "juw" => array ("type"=>"application/x-js-taro", "icon"=>"unknown.gif"),
+ "jaw" => array ("type"=>"application/x-js-taro", "icon"=>"unknown.gif"),
+ "jtw" => array ("type"=>"application/x-js-taro", "icon"=>"unknown.gif"),
+ "jsw" => array ("type"=>"application/x-js-taro", "icon"=>"unknown.gif"),
+ "jxw" => array ("type"=>"application/x-js-taro", "icon"=>"unknown.gif"),
+ "odt" => array ("type"=>"application/vnd.oasis.opendocument.text", "icon"=>"unknown.gif"),
+ "odg" => array ("type"=>"application/vnd.oasis.opendocument.graphic", "icon"=>"unknown.gif"),
+ "ods" => array ("type"=>"application/vnd.oasis.opendocument.spreadsheet", "icon"=>"unknown.gif"),
+ "odp" => array ("type"=>"application/vnd.oasis.opendocument.presentation", "icon"=>"unknown.gif"),
+ "odb" => array ("type"=>"application/vnd.oasis.opendocument.database", "icon"=>"unknown.gif"),
+ "odf" => array ("type"=>"application/vnd.oasis.opendocument.formula", "icon"=>"unknown.gif")
+ );
+
+ if (eregi("\.([a-z0-9]+)$", $filename, $match)) {
+ if(isset($mimeinfo[strtolower($match[1])][$key])) {
+ return $mimeinfo[strtolower($match[1])][$key];
+ } else {
+ return $mimeinfo["xxx"][$key]; // By default
+ }
+ } else {
+ return $mimeinfo["xxx"][$key]; // By default
+ }
+ }
+
+ /**
+ * 指定された拡張子になっているか?
+ *
+ * @param string $file_name
+ * @param string $allow_extension 拡張子文字列(「,」区切りで複数指定可)
+ * 指定しない場合、configのallow_extensionの中にあるかどうかのチェック
+ * @return array pathInfo or false
+ * @access public
+ */
+ function checkExtension($file_name, $allow_extension = null)
+ {
+ $pathinfo = pathinfo($file_name);
+ if(isset($pathinfo['extension'])) {
+ $extension_str = strtolower($pathinfo['extension']);
+ } else {
+ $extension_str = "";
+ }
+
+ if($allow_extension == null) {
+ $configView =& $this->_container->getComponent("configView");
+ $config = $configView->getConfigByConfname(_SYS_CONF_MODID, "allow_extension");
+ if(!isset($config["conf_value"])) {
+ return false;
+ }
+ $allow_extension = $config["conf_value"];
+ }
+
+ if($allow_extension != "") {
+ $extensionArray = explode(",", strtolower($allow_extension));
+ if(!in_array($extension_str, $extensionArray)) {
+ return false;
+ }
+ }
+ //
+ // tar.gzの対応
+ // tar.gzのほかにも同じような拡張子があるかも
+ //
+ if(preg_match("/.+\.tar\.gz$/i", $file_name)) {
+ $pathinfo['extension'] = "tar.gz";
+ }
+ return $pathinfo;
+ }
+}
+?>
diff --git a/html/webapp/components/users/Action.class.php b/html/webapp/components/users/Action.class.php
index c79d16c..f4c863a 100644
--- a/html/webapp/components/users/Action.class.php
+++ b/html/webapp/components/users/Action.class.php
@@ -65,7 +65,7 @@ function insUser($params=array()) {
// Hash値で同じものがないか念のためチェック
$result = $this->_db->selectExecute("users", array("user_id" => $user_id));
if ($result === false) {
- return false;
+ return false;
}
if(!isset($result[0]['user_id'])) {
break;
@@ -105,7 +105,7 @@ function insItem($params=array()) {
function insItemDesc($item_id, $params=array()) {
$db_params = array("item_id"=>0);
$db_params = array_merge($db_params, $params);
- $db_params["item_id"] = $item_id;
+ $db_params["item_id"] = $item_id;
return $this->_db->insertExecute("items_desc", $db_params);
}
@@ -120,7 +120,7 @@ function insItemDesc($item_id, $params=array()) {
function insItemOptions($item_id, $params=array()) {
$db_params = array("item_id"=>0);
$db_params = array_merge($db_params, $params);
- $db_params["item_id"] = $item_id;
+ $db_params["item_id"] = $item_id;
return $this->_db->insertExecute("items_options", $db_params);
}
@@ -308,8 +308,8 @@ function delUsersItemsLinkById($item_id, $user_id = null)
}
$result = $this->_db->deleteExecute("users_items_link", $params);
if ($result === false) {
- $this->_db->addError();
- return $result;
+ $this->_db->addError();
+ return $result;
}
return true;
}
@@ -328,8 +328,8 @@ function delItemDescById($item_id)
);
$result = $this->_db->deleteExecute("items_desc", $params);
if ($result === false) {
- $this->_db->addError();
- return $result;
+ $this->_db->addError();
+ return $result;
}
return true;
}
@@ -348,9 +348,164 @@ function delItemOptionsById($item_id)
);
$result = $this->_db->deleteExecute("items_options", $params);
if ($result === false) {
- $this->_db->addError();
- return $result;
+ $this->_db->addError();
+ return $result;
+ }
+ return true;
+ }
+
+ /**
+ * 会員データを削除する
+ *
+ * @param mix $roomId 削除対象ルームID
+ * @return boolean true or false
+ * @access public
+ */
+ function deleteUser($userId)
+ {
+ if (empty($userId)) {
+ return true;
+ }
+
+ $userIds = $userId;
+ if (!is_array($userId)) {
+ $userIds = array($userId);
+ }
+ $inValue = "'" . implode("','", $userIds) . "'";
+
+ $sql = "SELECT P.room_id, "
+ . "U.role_authority_id "
+ . "FROM {pages} P "
+ . "INNER JOIN {users} U "
+ . "ON P.insert_user_id = U.user_id "
+ . "WHERE P.thread_num = ? "
+ . "AND P.private_flag = ? "
+ . "AND P.space_type = ? "
+ . "AND P.insert_user_id IN (" . $inValue . ")";
+ $bindValues = array(
+ 0,
+ _ON,
+ _SPACE_TYPE_GROUP
+ );
+ $privateRoomsPerRole = $this->_db->execute($sql, $bindValues, null, null, true, array($this, '_fetchPrivateRoomPerRole'));
+
+ $roles = array_keys($privateRoomsPerRole);
+ $sql = "SELECT M.action_name, "
+ . "M.delete_action, "
+ . "AM.role_authority_id "
+ . "FROM {modules} M "
+ . "INNER JOIN {authorities_modules_link} AM "
+ . "ON M.module_id = AM.module_id "
+ . "WHERE M.system_flag = ? "
+ . "AND AM.role_authority_id IN ('" . implode("','", $roles) . "')";
+ $bindValues = array(
+ _OFF
+ );
+ $modulesPerRole =& $this->_db->execute($sql, $bindValues, null, null, true, array($this, '_fetchModulePerRole'));
+ if ($modulesPerRole === false) {
+ return false;
}
+
+ $pagesAction =& $this->_container->getComponent('pagesAction');
+ foreach ($privateRoomsPerRole as $roleId => $privateRooms) {
+ if (!$pagesAction->deleteEachModule($privateRooms, $modulesPerRole[$roleId])) {
+ return false;
+ }
+
+ foreach ($privateRooms as $roomId) {
+ if (!$pagesAction->deleteRoom($roomId)) {
+ return false;
+ }
+ }
+ }
+
+ if (!$this->deleteByInOperator('users', $inValue)) {
+ return false;
+ }
+
+ if (!$this->deleteByInOperator('users_items_link', $inValue)) {
+ return false;
+ }
+
+ if (!$this->deleteByInOperator('pages_users_link', $inValue)) {
+ return false;
+ }
+
+ $sql = "UPDATE {uploads} "
+ . "SET "
+ . "garbage_flag = ? "
+ . "WHERE action_name = ? "
+ . "AND unique_id IN (" . $inValue . ") "
+ . "AND garbage_flag = ?";
+ $bindValues = array(
+ _ON,
+ 'common_download_user',
+ _OFF
+ );
+ if (!$this->_db->execute($sql, $bindValues)) {
+ $this->_db->addError();
+ return false;
+ }
+
+ return true;
+ }
+
+ /**
+ * ロール毎のプライベートスペースデータ配列を作成する。
+ *
+ * @param object $recordSet プライベートスペースデータADORecordSet
+ * @return array モジュールデータ配列
+ * @access public
+ */
+ function _fetchPrivateRoomPerRole($recordSet)
+ {
+ $privateRoomsPerRole = array();
+ while ($privateRoom = $recordSet->fetchRow()) {
+ $roleId = $privateRoom['role_authority_id'];
+ $privateRoomsPerRole[$roleId][] = $privateRoom['room_id'];
+ }
+
+ return $privateRoomsPerRole;
+ }
+
+ /**
+ * ロール毎にモジュールデータ配列を作成する
+ *
+ * @param array $recordSet タスクADORecordSet
+ * @return array モジュールデータ配列
+ * @access private
+ */
+ function _fetchModulePerRole($recordSet) {
+ $modulesPerRole = array();
+ while ($module = $recordSet->fetchRow()) {
+ $roleId = $module['role_authority_id'];
+ $modulesPerRole[$roleId][] = $module;
+ }
+
+ return $modulesPerRole;
+ }
+
+ /**
+ * IN演算子でデータを削除する。
+ *
+ * @param string $tableName 対象テーブル名称
+ * @param string $inValue IN演算子の値(カンマ区切り文字列)
+ * @return boolean true or false
+ * @access public
+ */
+ function deleteByInOperator($tableName, $inValue)
+ {
+ if (empty($inValue)) {
+ return true;
+ }
+
+ $sql = "DELETE FROM {" . $tableName . "} "
+ . "WHERE user_id IN (" . $inValue . ")";
+ if (!$this->_db->execute($sql)) {
+ $this->_db->addError();
+ return false;
+ }
+
return true;
}
}
diff --git a/html/webapp/components/users/View.class.php b/html/webapp/components/users/View.class.php
index 6ececb4..76e19af 100644
--- a/html/webapp/components/users/View.class.php
+++ b/html/webapp/components/users/View.class.php
@@ -927,7 +927,7 @@ function &createSearchWhereString() {
$othersSearchAuthority = false;
$actionName = $actionChain->getCurActionName();
- if ($session->getParameter('_auth_id') == _AUTH_ADMIN
+ if ($session->getParameter('_user_auth_id') == _AUTH_ADMIN
|| $actionName == 'room_action_admin_search') {
$othersSearchAuthority = true;
}
@@ -1049,10 +1049,10 @@ function &_fetchRoomUser($result, $func_params)
$absence_users = array(); //不参加会員
$absence_rooms = array(); //不参加会員がいるルームID配列
while ($row = $result->fetchRow()) {
- if($row['role_authority_id'] == _ROLE_AUTH_OTHER) {
+ if ($row['role_authority_id'] == _ROLE_AUTH_OTHER) {
//不参加会員
$absence_users[$row['user_id']] = $row['user_id'];
- $absence_rooms[$row['room_id']] = $row['room_id'];
+ $absence_rooms[$row['room_id']][] = $row['user_id'];
} else {
$presence_users[$row['user_id']] = $row['user_id'];
}
@@ -1061,19 +1061,76 @@ function &_fetchRoomUser($result, $func_params)
return $presence_users;
}
- // 不参加会員が誰もいないデフォルト参加ルームがある場合は全ての会員から検索する
- foreach($default_entry_room_arr as $room_id) {
- if(!isset($absence_rooms[$room_id])) {
+ $noParticipationRoomUsers = array();
+ foreach ($default_entry_room_arr as $room_id) {
+ // 不参加会員が誰もいないデフォルト参加ルームがある場合は全ての会員から検索する
+ if (!isset($absence_rooms[$room_id])) {
$absence_users = array();
return $absence_users;
}
+
+ if (empty($noParticipationRoomUsers)) {
+ $noParticipationRoomUsers = $absence_rooms[$room_id];
+ }
+ $noParticipationRoomUsers = array_intersect($noParticipationRoomUsers, $absence_rooms[$room_id]);
}
// 参加会員配列にいない不参加会員を取得
- $absence_users = array_diff($absence_users, $presence_users);
+ $absence_users = array_diff($noParticipationRoomUsers, $presence_users);
// 不参加者を返す
return $absence_users;
}
+
+ /**
+ * メールアドレスからユーザーIDを取得する
+ *
+ * @param string $mail メールアドレス
+ * @param boolean $isActive 利用可能ユーザー対象フラグ
+ * @return ユーザーID
+ * @access private
+ */
+ function &getUserIdByMail($mail, $isActive = false) {
+ $userId = null;
+ if (empty($mail)) {
+ return $userId;
+ }
+
+ $sql = "SELECT UI.user_id "
+ . "FROM {items} I "
+ . "INNER JOIN {users_items_link} UI "
+ . "ON I.item_id = UI.item_id ";
+
+ if ($isActive) {
+ $sql .= "INNER JOIN {users} U "
+ . "ON UI.user_id = U.user_id ";
+ }
+
+ $sql .= "WHERE (I.type = ? "
+ . "OR I.type = ?) "
+ . "AND UI.content = ? ";
+
+ $bindValues = array(
+ USER_TYPE_EMAIL,
+ USER_TYPE_MOBILE_EMAIL,
+ $mail
+ );
+
+ if ($isActive) {
+ $sql .= "AND U.active_flag = ? ";
+ $bindValues[] = _USER_ACTIVE_FLAG_ON;
+ }
+
+ $users = $this->_db->execute($sql, $bindValues);
+ if ($users === false) {
+ $this->_db->addError();
+ }
+
+ if (!empty($users)) {
+ $userId = $users[0]['user_id'];
+ }
+
+ return $userId;
+ }
}
?>
\ No newline at end of file
diff --git a/html/webapp/components/whatsnew/Action.class.php b/html/webapp/components/whatsnew/Action.class.php
index 1e71a4e..2e80964 100644
--- a/html/webapp/components/whatsnew/Action.class.php
+++ b/html/webapp/components/whatsnew/Action.class.php
@@ -407,102 +407,175 @@ function _deleteUser(&$recordSet)
}
/**
- * 新着情報の削除
- *
+ * ルーム、モジュール毎で、指定件数以上の古いデータを削除する
+ *
+ * @param string $moduleId モジュールID
+ * @param mixed $roomIds ルームID、ルームID配列
+ * @return boolean true or false
* @access public
*/
- function _deletePeriod($module_id, $arr_room_id)
+ function _deletePeriod($moduleId, $roomIds)
{
if (rand(0, 10) != 0) { return true; }
- $modulesView =& $this->_container->getComponent("modulesView");
- $module = $modulesView->getModuleByDirname("whatsnew");
+ $modulesView =& $this->_container->getComponent('modulesView');
+ $module = $modulesView->getModuleByDirname('whatsnew');
- $configView =& $this->_container->getComponent("configView");
- $config = $configView->getConfig($module["module_id"], false);
+ $configView =& $this->_container->getComponent('configView');
+ $config = $configView->getConfig($module['module_id'], false);
if ($config === false) {
- return false;
- }
- $whatsnew_period = $config["whatsnew_period"]["conf_value"];
- $offset = $config["whatsnew_delete_number"]["conf_value"];
- $limit = 1;
- $time = timezone_date();
- $timestamp = mktime(intval(substr($time,8,2)),intval(substr($time,10,2)),intval(substr($time,12,2)),
- intval(substr($time,4,2)),intval(substr($time,6,2))-intval($whatsnew_period),intval(substr($time,0,4)));
- $timestamp = date("YmdHis", $timestamp);
-
- $array_room = array();
- if(is_array($arr_room_id)){
- $array_room = $arr_room_id;
- }else{
- $array_room[0] = $arr_room_id;
- }
- foreach($array_room as $room_id){
- $sql = "SELECT insert_time, child_update_time, room_id FROM {whatsnew}" .
- " WHERE module_id = ".$module_id.
- " AND room_id = ".$room_id.
- " ORDER BY child_update_time desc";
- $result = $this->_db->execute($sql, null, $limit, $offset);
- if ($result === false) {
- $this->_db->addError();
- return false;
- }
- //一定の件数以前の新着情報で一定の期間を過ぎている新着情報を削除する。
- if(isset($result[0]["insert_time"]) && ($result[0]["insert_time"] < $timestamp)){
- $max_time = ($result[0]["insert_time"] > $result[0]["child_update_time"]) ? $result[0]["insert_time"] : $result[0]["child_update_time"];
- $sql = "SELECT whatsnew_id FROM {whatsnew}" .
- " WHERE insert_time < ? AND child_update_time < ?".
- " AND module_id = ".$module_id.
- " AND room_id = ".$result[0]["room_id"];
- $in_str = $this->_db->execute($sql, array("insert_time"=>$max_time, "child_update_time"=>$max_time),null,null,false,array($this,"_deletePeriodCallback"));
- if ($in_str === false) {
- $this->_db->addError();
- return false;
- }
- if($in_str != "") {
- $sql = "DELETE FROM {whatsnew}" .
- " WHERE 1 = 1".
- $in_str;
- $result = $this->_db->execute($sql);
- if ($result === false) {
- $this->_db->addError();
- return false;
- }
-
- $sql = "DELETE FROM {whatsnew_user}" .
- " WHERE 1 = 1".
- $in_str;
- $result = $this->_db->execute($sql);
- if ($result === false) {
- $this->_db->addError();
- return false;
- }
+ return false;
+ }
+ $period = $config['whatsnew_period']['conf_value'];
+ $maximumNumber = $config['whatsnew_delete_number']['conf_value'];
+
+ $periodTime = timezone_date();
+ $periodTime = mktime(intval(substr($periodTime, 8, 2)),
+ intval(substr($periodTime, 10, 2)),
+ intval(substr($periodTime, 12, 2)),
+ intval(substr($periodTime, 4, 2)),
+ intval(substr($periodTime, 6, 2)) - intval($period),
+ intval(substr($periodTime,0,4)));
+ $periodTime = date('YmdHis', $periodTime);
+
+ if (!is_array($roomIds)) {
+ $roomIds = array(
+ $roomIds
+ );
+ }
+
+ $sql = "SELECT room_id, COUNT(*) count "
+ . "FROM {whatsnew} "
+ . "WHERE room_id IN ('" . implode("','", $roomIds) . "') "
+ . "AND module_id = ? "
+ . "GROUP BY room_id "
+ . "HAVING count > ?";
+ $bindValues = array(
+ $moduleId,
+ $maximumNumber
+ );
+ $whatsnews = $this->_db->execute($sql, $bindValues);
+
+ $inValue = '';
+ foreach($whatsnews as $whatsnew){
+ $sql = "SELECT whatsnew_id "
+ . "FROM {whatsnew} "
+ . "WHERE insert_time < ? "
+ . "AND child_update_time < ? "
+ . "AND module_id = ? "
+ . "AND room_id = ? "
+ . "ORDER BY child_update_time";
+ $bindValues = array(
+ $periodTime,
+ $periodTime,
+ $moduleId,
+ $whatsnew['room_id']
+ );
+ $oldWhatsnews = $this->_db->execute($sql, $bindValues);
+
+ $deleteNumber = $whatsnew['count'] - $maximumNumber;
+ foreach ($oldWhatsnews as $oldWhatsnew) {
+ $inValue .= $oldWhatsnew['whatsnew_id'] . ',';
+ $deleteNumber--;
+ if ($deleteNumber <= 0) {
+ break;
}
}
+ }
+
+ if (empty($inValue)) {
+ return true;
+ }
+ $inValue = substr($inValue, 0, -1);
+
+ if (!$this->_deleteByInOperator('whatsnew_user', $inValue)) {
+ return false;
}
+ if (!$this->_deleteByInOperator('whatsnew', $inValue)) {
+ return false;
+ }
+
return true;
}
-/**
- * 新着情報の削除
- *
+ /**
+ * 条件に該当する新着データを削除する。
+ *
+ * @param string $whereClause where句文字列
+ * @param array $bindValues バインド値配列
+ * @return boolean true or false
* @access public
*/
- function _deletePeriodCallback(&$recordSet)
+ function deleteByWhereClause($whereClause, $bindValues)
{
- $ret = "";
- $str = "";
- $first = true;
- while ($row = $recordSet->fetchRow()) {
- if($first == false) {
- $str .= ",";
- }
- $str .= $row[0];
- $first = false;
+ $module =& $this->_modulesView->getModuleByDirname('whatsnew');
+ if (!$module) {
+ return true;
}
- if($str != "")
- $ret = " AND whatsnew_id IN (".$str.")";
- return $ret;
+
+ $sql = "SELECT whatsnew_id "
+ . "FROM {whatsnew} "
+ . "WHERE " . $whereClause;
+ $inValue = $this->_db->execute($sql, $bindValues, null, null, false, array($this, '_createDelimitedString'));
+ if ($inValue === false) {
+ $this->_db->addError();
+ return false;
+ }
+
+ if (!$this->_deleteByInOperator('whatsnew_user', $inValue)) {
+ return false;
+ }
+ if (!$this->_deleteByInOperator('whatsnew', $inValue)) {
+ return false;
+ }
+
+ return true;
+ }
+
+ /**
+ * ADORecordSetの1カラム目(ID)を指定文字区切りの文字列にする
+ *
+ * @param object $recordSet ADORecordSetオブジェクト
+ * @param string $glue 区切り文字
+ * @return string 指定文字区切りの文字列
+ * @access private
+ */
+ function &_createDelimitedString(&$recordSet, $glue = ',')
+ {
+ $string = '';
+ while ($whatsnew = $recordSet->fetchRow()) {
+ $string .= $whatsnew[0]. $glue;
+ }
+ if (strlen($string)
+ && strlen($glue)) {
+ $string = substr($string, 0, strlen($glue) * -1);
+ }
+
+ return $string;
+ }
+
+ /**
+ * IN演算子でデータを削除する。
+ *
+ * @param string $tableName 対象テーブル名称
+ * @param string $inValue IN演算子の値(カンマ区切り文字列)
+ * @return boolean true or false
+ * @access public
+ */
+ function _deleteByInOperator($tableName, $inValue)
+ {
+ if (!strlen($inValue)) {
+ return true;
+ }
+
+ $sql = "DELETE FROM {" . $tableName . "} "
+ . "WHERE whatsnew_id IN (" . $inValue . ")";
+ if (!$this->_db->execute($sql)) {
+ $this->_db->addError();
+ return false;
+ }
+
+ return true;
}
}
-?>
+?>
\ No newline at end of file
diff --git a/html/webapp/config/define.inc.php b/html/webapp/config/define.inc.php
index 94ca8d5..a4e3a1e 100644
--- a/html/webapp/config/define.inc.php
+++ b/html/webapp/config/define.inc.php
@@ -219,7 +219,7 @@
define('_PERMALINK_PRIVATE_PREFIX_NAME', 'private');
define('_PERMALINK_GROUP_PREFIX_NAME', 'group');
-define('_PERMALINK_CONTENT', '(%| |#|<|>|\+|\\\\|\"|\'|&|\?|\.|=|\/|~|:|;|,|\$|@)');
+define('_PERMALINK_CONTENT', '(%| |#|<|>|\+|\\\\|\"|\'|&|\?|\.$|=|\/|~|:|;|,|\$|@|^\.|\||\]|\[|\!|\(|\)|\*)');
define('_PERMALINK_PROHIBITION', "/"._PERMALINK_CONTENT."/i");
define('_PERMALINK_PROHIBITION_REPLACE', "-");
define('_PERMALINK_DIR_CONTENT', "^(install|css|js|images|themes|htdocs|webapp|maple|".
diff --git a/html/webapp/config/global-config.ini b/html/webapp/config/global-config.ini
index 7f72f3b..7846f86 100644
--- a/html/webapp/config/global-config.ini
+++ b/html/webapp/config/global-config.ini
@@ -57,6 +57,14 @@ _UPLOAD_AVATAR_MAX_HEIGHT_IMAGE = 180
_UPLOAD_THUMBNAIL_MAX_WIDTH_IMAGE = 66
_UPLOAD_THUMBNAIL_MAX_HEIGHT_IMAGE = 66
+;-----------------画像アップロード後解像度---------------------------------
+_UPLOAD_RESOLUTION_IMAGE_LARGE_WIDTH = 800
+_UPLOAD_RESOLUTION_IMAGE_LARGE_HEIGHT = 600
+_UPLOAD_RESOLUTION_IMAGE_MIDDLE_WIDTH = 640
+_UPLOAD_RESOLUTION_IMAGE_MIDDLE_HEIGHT = 480
+_UPLOAD_RESOLUTION_IMAGE_SMALL_WIDTH = 480
+_UPLOAD_RESOLUTION_IMAGE_SMALL_HEIGHT = 360
+
;-----------------アップロードのパーミッション-----------------------------
_UPLOAD_FOLDER_MODE = 0777
_UPLOAD_FILE_MODE = 0666
diff --git a/html/webapp/config/version.php b/html/webapp/config/version.php
index 90797dc..623cf8c 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/language/chinese/global.ini b/html/webapp/language/chinese/global.ini
index cbb8195..6f199e9 100644
--- a/html/webapp/language/chinese/global.ini
+++ b/html/webapp/language/chinese/global.ini
@@ -149,6 +149,7 @@ _CANCEL="取消"
_GUEST = "访客" ;//ログインしていないハンドル名
_SPACE_TYPE_NAME_PUBLIC = "公共空间"
+_SPACE_TYPE_NAME_MYPORTAL = "我的空间"
_SPACE_TYPE_NAME_PRIVATE = "个人空间"
_SPACE_TYPE_NAME_GROUP = "群组空间"
@@ -260,6 +261,7 @@ _cancel_grouping_title="拆分选中的区块"
;_cancel_grouping_confirm="您确定要拆分%s?"
_audio_browser="语音浏览器用户"
_pc_viewer = "切换到PC浏览器"
+_confirm_pc_view="您切换到PC浏览器?"
_move_center="移动到文本输入区"
_invalid_auth=_INVALID_AUTH
_invalid_input=_INVALID_INPUT
diff --git a/html/webapp/language/chinese/lang_common.js b/html/webapp/language/chinese/lang_common.js
index 17c9f75..57bfcdf 100644
--- a/html/webapp/language/chinese/lang_common.js
+++ b/html/webapp/language/chinese/lang_common.js
@@ -33,7 +33,19 @@ compCalendarLang = {
btn_prev_year : "«",
btn_next_year : "»",
btn_prev_month : "‹",
- btn_next_month : "›"
+ btn_next_month : "›",
+ month_jan : " 1月",
+ month_feb : " 2月",
+ month_mar : " 3月",
+ month_apr : " 4月",
+ month_may : " 5月",
+ month_jun : " 6月",
+ month_jul : " 7月",
+ month_aug : " 8月",
+ month_sep : " 9月",
+ month_oct : "10月",
+ month_nov : "11月",
+ month_dec : "12月"
};
/*WYSIWYG用定義ファイル*/
compTextareaLang = {
diff --git a/html/webapp/language/english/global.ini b/html/webapp/language/english/global.ini
index dec5c4d..5e0abbe 100644
--- a/html/webapp/language/english/global.ini
+++ b/html/webapp/language/english/global.ini
@@ -149,6 +149,7 @@ _CANCEL="Cancell"
_GUEST = "Guest" ;//ログインしていないハンドル名
_SPACE_TYPE_NAME_PUBLIC = "Public Space"
+_SPACE_TYPE_NAME_MYPORTAL = "My Portal"
_SPACE_TYPE_NAME_PRIVATE = "Private Space"
_SPACE_TYPE_NAME_GROUP = "Group Space"
@@ -260,6 +261,7 @@ _cancel_grouping_title="Ungrouping the selected blocks"
;_cancel_grouping_confirm="You are ungrouping %s. Are you sure?"
_audio_browser="For the audio browser users"
_pc_viewer="Switch to PC Viewer"
+_confirm_pc_view="Switch to PC Viewer.\nAre you sure?"
_move_center="Move to the content area"
_invalid_auth=_INVALID_AUTH
_invalid_input=_INVALID_INPUT
diff --git a/html/webapp/language/english/items.ini b/html/webapp/language/english/items.ini
index 6a20737..8bd423d 100644
--- a/html/webapp/language/english/items.ini
+++ b/html/webapp/language/english/items.ini
@@ -15,7 +15,7 @@ USER_ITEM_ACTIVE_FLAG="Status"
USER_ITEM_ACTIVE_FLAG_OFF="nonactive"
USER_ITEM_ACTIVE_FLAG_ON="active"
USER_ITEM_ACTIVE_FLAG_PENDING="waiting"
-USER_ITEM_ACTIVE_FLAG_MAILED="not yet logged-in"
+USER_ITEM_ACTIVE_FLAG_MAILED="not yet logged-in"
USER_ITEM_LANG_DIRNAME="Language"
USER_ITEM_TIMEZONE_OFFSET="TimeZone"
USER_ITEM_AVATAR="Avatar"
@@ -27,8 +27,8 @@ USER_ITEM_INSERT_TIME="Registered"
USER_ITEM_INSERT_USER_NAME="Creator"
USER_ITEM_UPDATE_TIME="Last modified"
USER_ITEM_UPDATE_USER_NAME="Updater"
-USER_ITEM_EMAIL="e-mail"
-USER_ITEM_MOBILE_EMAIL="mobile mail"
+USER_ITEM_EMAIL="E-mail"
+USER_ITEM_MOBILE_EMAIL="Mobile mail"
USER_ITEM_GENDER="Sex"
USER_ITEM_COUNTRY_CODE="Nationality"
USER_ITEM_ADDRESS="Location"
@@ -38,8 +38,8 @@ USER_ITEM_TEXTHTML_MODE = "Display format on mobile"
USER_ITEM_IMGDSP_SIZE = "Image size on mobile"
;//アイテム項目-詳細
-USER_ITEM_GENDER_MAN="male"
-USER_ITEM_GENDER_WOMAN="female"
+USER_ITEM_GENDER_MAN="Male"
+USER_ITEM_GENDER_WOMAN="Female"
USER_ITEM_TEXTHTML_MODE_TEXT = "TEXT format"
USER_ITEM_TEXTHTML_MODE_HTML = "HTML format"
@@ -48,7 +48,7 @@ USER_ITEM_IMGDSP_SIZE_240 = "width 240px"
USER_ITEM_IMGDSP_SIZE_480 = "width 480px"
;//アイテム項目-説明
-USER_ITEM_MES_CHAR_DESCRIPTION="Minimum 4 characters. No space or special character."
+USER_ITEM_MES_CHAR_DESCRIPTION="Please choose at least 4 characters string. No space or special character is allowed."
USER_ITEM_MES_AUTH_DESCRIPTION="If set to the administrator, it will be set to the room manager of all rooms and join these rooms."
USER_ITEM_MES_TEXTHTML_MODE_DESCRIPTION = "Set initial display format on mobile phone. If you select HTML format, 'Display image size' set to 'reduce the width 240px' we strongly recommend that you."
diff --git a/html/webapp/language/english/lang_common.js b/html/webapp/language/english/lang_common.js
index 2ace85f..9f12ebf 100644
--- a/html/webapp/language/english/lang_common.js
+++ b/html/webapp/language/english/lang_common.js
@@ -16,7 +16,7 @@ compCalendarLang = {
summary : "Calendar",
icon_alt : "Calendar",
icon_title : "Show Calendar",
- year : "Year",
+ year : "",
month : "Month",
week_sun : "Sun",
week_mon : "Mon",
@@ -34,7 +34,19 @@ compCalendarLang = {
btn_prev_year : "«",
btn_next_year : "»",
btn_prev_month : "‹",
- btn_next_month : "›"
+ btn_next_month : "›",
+ month_jan : "Jan",
+ month_feb : "Feb",
+ month_mar : "Mar",
+ month_apr : "Apr",
+ month_may : "May",
+ month_jun : "Jun",
+ month_jul : "Jul",
+ month_aug : "Aug",
+ month_sep : "Sep",
+ month_oct : "Oct",
+ month_nov : "Nov",
+ month_dec : "Dec"
};
/*WYSIWYG用定義ファイル*/
compTextareaLang = {
@@ -128,7 +140,7 @@ compInsertLinkLang = {
url : "URL(href=)",
title : "Title(title=)",
target : "Target(target=)",
- target_none : "No specification",
+ target_none : "Not specified",
target_blank : "New window(_blank)",
target_other : "Other",
ok : "Insert Link",
@@ -210,7 +222,7 @@ compTableBorderLang = {
row : "Row",
col : "Col",
cell : "Cell",
- none : "No specification",
+ none : "Not specified",
outer : "Borders",
top : "Overline",
bottom : "Underline",
diff --git a/html/webapp/language/japanese/global.ini b/html/webapp/language/japanese/global.ini
index 30ce7ca..e08c405 100644
--- a/html/webapp/language/japanese/global.ini
+++ b/html/webapp/language/japanese/global.ini
@@ -149,6 +149,7 @@ _CANCEL="キャンセル"
_GUEST = "ゲスト" ;//ログインしていないハンドル名
_SPACE_TYPE_NAME_PUBLIC = "パブリックスペース"
+_SPACE_TYPE_NAME_MYPORTAL = "マイポータル"
_SPACE_TYPE_NAME_PRIVATE = "プライベートスペース"
_SPACE_TYPE_NAME_GROUP = "グループスペース"
@@ -260,6 +261,7 @@ _cancel_grouping_title="選択したブロックのグループ化を解除し
;_cancel_grouping_confirm="%sのグループ化を解除します よろしいですか?"
_audio_browser="音声ブラウザ対応ページへ"
_pc_viewer="PCビューアーに切り替える"
+_confirm_pc_view="PC表示に切り替えます。\nよろしいですか?"
_move_center="コンテンツエリアへ"
_invalid_auth=_INVALID_AUTH
_invalid_input=_INVALID_INPUT
diff --git a/html/webapp/language/japanese/lang_common.js b/html/webapp/language/japanese/lang_common.js
index b6c2b7d..4d2a0fb 100644
--- a/html/webapp/language/japanese/lang_common.js
+++ b/html/webapp/language/japanese/lang_common.js
@@ -33,7 +33,19 @@ compCalendarLang = {
btn_prev_year : "«",
btn_next_year : "»",
btn_prev_month : "‹",
- btn_next_month : "›"
+ btn_next_month : "›",
+ month_jan : " 1月",
+ month_feb : " 2月",
+ month_mar : " 3月",
+ month_apr : " 4月",
+ month_may : " 5月",
+ month_jun : " 6月",
+ month_jul : " 7月",
+ month_aug : " 8月",
+ month_sep : " 9月",
+ month_oct : "10月",
+ month_nov : "11月",
+ month_dec : "12月"
};
/*WYSIWYG用定義ファイル*/
compTextareaLang = {
diff --git a/html/webapp/modules/authority/install.ini b/html/webapp/modules/authority/install.ini
index f713dcb..c122020 100644
--- a/html/webapp/modules/authority/install.ini
+++ b/html/webapp/modules/authority/install.ini
@@ -1,4 +1,4 @@
-version = "2.4.0.0"
+version = "2.4.0.1"
action_name="authority_view_admin_init"
module_icon="authority.gif"
system_flag=1
diff --git a/html/webapp/modules/authority/templates/default/authority_view_admin_selectmodules.html b/html/webapp/modules/authority/templates/default/authority_view_admin_selectmodules.html
index 17ec2d3..6182c94 100644
--- a/html/webapp/modules/authority/templates/default/authority_view_admin_selectmodules.html
+++ b/html/webapp/modules/authority/templates/default/authority_view_admin_selectmodules.html
@@ -95,7 +95,7 @@
<{* 戻るボタン *}>
<{* 次へボタン *}>
-
+
<{* キャンセルボタン *}>
diff --git a/html/webapp/modules/backup/action/main/init/Init.class.php b/html/webapp/modules/backup/action/main/init/Init.class.php
index e058ba5..5eb7e92 100644
--- a/html/webapp/modules/backup/action/main/init/Init.class.php
+++ b/html/webapp/modules/backup/action/main/init/Init.class.php
@@ -249,7 +249,7 @@ function _fullBackUp()
$archiveDir = (isset($startIndexDirs[0])) ? $archiveBaseDir . implode('/', $startIndexDirs) : substr($archiveBaseDir, 0, strlen($archiveBaseDir) - 1);
$this->_readStartFile($source, START_INDEX_DIR, $archiveDir);
- if(file_exists(dirname(START_INDEX_DIR) . INDEX_FILE_NAME)) {
+ if (file_exists(dirname(START_INDEX_DIR) . INDEX_FILE_NAME)) {
$handle = fopen(dirname(START_INDEX_DIR) . INDEX_FILE_NAME, "r");
if ($handle) {
$contents = fread($handle, 94);
@@ -258,7 +258,7 @@ function _fullBackUp()
$source[] = File_Archive::read(dirname(START_INDEX_DIR) . INDEX_FILE_NAME, dirname($archiveDir) . INDEX_FILE_NAME);
}
}
- } else {
+ } elseif (file_exists(START_INDEX_DIR . '/htdocs' . INDEX_FILE_NAME)) {
$source[] = File_Archive::read(START_INDEX_DIR . '/htdocs' . INDEX_FILE_NAME, $archiveDir . '/htdocs' . INDEX_FILE_NAME);
}
@@ -879,7 +879,6 @@ function _createDumpXML($page_id, $child_flag = false)
$pathList = explode("_",$module['action_name']);
$dirname =$pathList[0];
$tableList = $this->databaseSqlutility->getTableList($dirname, false);
- if($tableList === false) continue;
foreach($tableList as $table) {
$metaColumns = $adodb->MetaColumns($this->db->getPrefix().$table);
if(isset($metaColumns["ROOM_ID"])) {
diff --git a/html/webapp/modules/backup/action/main/restoreresult/Restoreresult.class.php b/html/webapp/modules/backup/action/main/restoreresult/Restoreresult.class.php
index b5f1dde..024531d 100644
--- a/html/webapp/modules/backup/action/main/restoreresult/Restoreresult.class.php
+++ b/html/webapp/modules/backup/action/main/restoreresult/Restoreresult.class.php
@@ -17,32 +17,32 @@
class Backup_Action_Main_Restoreresult extends Action
{
//
- // リクエストパラメータを受け取るため
- //
- var $upload_id = null;
- var $backup_page_id = null;
- var $module_id = null;
-
- // 状態 (restore_type != "top")
- // バブリックのTop or プライベートのTopならば、必ず公開
- var $display_flag = null;
-
- // バックアップされた会員を参加させる(restore_type != "top" && restore_type != "subgroup")
- // サブグループならば、必ず初期化
- // パブリックスペース、プライベートスペースならば、参加者は変更しない
- // パブリックスペース内のルームについては、初期化する
- var $entry_user = null;
-
- // サブグループならばリストア位置を変更できる(restore_type == "subgroup")
- var $regist_location = null;
-
- // リストアするモジュール
- var $entry_modules = null;
-
- // 使用コンポーネントを受け取るため
- var $backupRestore = null;
- var $fileAction = null;
- var $pagesView = null;
+ // リクエストパラメータを受け取るため
+ //
+ var $upload_id = null;
+ var $backup_page_id = null;
+ var $module_id = null;
+
+ // 状態 (restore_type != "top")
+ // バブリックのTop or プライベートのTopならば、必ず公開
+ var $display_flag = null;
+
+ // バックアップされた会員を参加させる(restore_type != "top" && restore_type != "subgroup")
+ // サブグループならば、必ず初期化
+ // パブリックスペース、プライベートスペースならば、参加者は変更しない
+ // パブリックスペース内のルームについては、初期化する
+ var $entry_user = null;
+
+ // サブグループならばリストア位置を変更できる(restore_type == "subgroup")
+ var $regist_location = null;
+
+ // リストアするモジュール
+ var $entry_modules = null;
+
+ // 使用コンポーネントを受け取るため
+ var $backupRestore = null;
+ var $fileAction = null;
+ var $pagesView = null;
var $configView = null;
var $db = null;
var $usersView = null;
@@ -54,71 +54,71 @@ class Backup_Action_Main_Restoreresult extends Action
//var $room_arr_flat = null;
- // 値をセットするため
- var $transfer_id_arr = array();
- var $del_physical_file_name_arr = array();
- var $temporary_file_path = "";
-
- var $_self_flag = false;
-
- // 手動ロールバックは、メモリが大量に使う可能性があるため、別ファイルに吐き出すほうがよい
- var $deleteParams = array(); // 手動ロールバック用
- var $insertParams = array(); // 手動ロールバック用
- var $uploadParams = array(); // 手動ロールバック用
- var $uploadWhereParams = array(); // 手動ロールバック用
- var $selectParams = array(); // 手動ロールバック用
-
- /**
- * バックアップファイル-リストア処理(実行)
- *
- * @access public
- */
- function execute()
- {
- $temporary_file_path = FILEUPLOADS_DIR."backup/".BACKUP_TEMPORARY_DIR_NAME."/".BACKUP_RESTORE_DIR_NAME."/" . $this->backup_page_id. "/";
+ // 値をセットするため
+ var $transfer_id_arr = array();
+ var $del_physical_file_name_arr = array();
+ var $temporary_file_path = "";
+
+ var $_self_flag = false;
+
+ // 手動ロールバックは、メモリが大量に使う可能性があるため、別ファイルに吐き出すほうがよい
+ var $deleteParams = array(); // 手動ロールバック用
+ var $insertParams = array(); // 手動ロールバック用
+ var $uploadParams = array(); // 手動ロールバック用
+ var $uploadWhereParams = array(); // 手動ロールバック用
+ var $selectParams = array(); // 手動ロールバック用
+
+ /**
+ * バックアップファイル-リストア処理(実行)
+ *
+ * @access public
+ */
+ function execute()
+ {
+ $temporary_file_path = FILEUPLOADS_DIR."backup/".BACKUP_TEMPORARY_DIR_NAME."/".BACKUP_RESTORE_DIR_NAME."/" . $this->backup_page_id. "/";
$this->backupRestore->mkdirTemporary(BACKUP_RESTORE_DIR_NAME);
- $ret = $this->backupRestore->getRestoreArray($this->upload_id, $this->backup_page_id, $this->module_id, $temporary_file_path);
-
- if($ret === false) {
- return 'error';
- }
- $backup_uploads = $this->db->selectExecute("backup_uploads", array("upload_id" => $this->upload_id));
- if($backup_uploads === false && !isset($backup_uploads[0])) {
- return 'error';
- }
- $this->temporary_file_path = $temporary_file_path;
-
- list($room_inf, $restore_modules, $version_arr, $modules) = $ret;
-
- $restore_data = $this->backupRestore->getRoomArray();
-
- $restore_type = $restore_modules["system"]['restore_type'];
- if(!isset($restore_data['system']['room'])) {
- // 現状、未処理
- $this->fileAction->delDir($this->temporary_file_path);
- return 'error';
- }
- $this->_self_flag = $restore_modules["system"]['self_flag'];
-
-
- //--------------------------------------------------
- // システム関連テーブルリストア
- // - PKを振りなおす -
- // XMLは、改竄されていないとして処理(電子認証)
- //--------------------------------------------------
- $pages_buf = array();
- $page_id_arr = array();
- $pages_users_link_room_id = array();
- $normal_block_col_arr = array();
- $err_block_row_arr = array();
- $upload_id_arr = array();
- $physical_file_name_arr = array();
- $this->del_physical_file_name_arr = array();
- //$insert_blocks = array();
- $login_user_id = $this->session->getParameter("_user_id");
-
- // room_idで削除できる項目は、はじめに削除
- if($restore_type == "top") {
+ $ret = $this->backupRestore->getRestoreArray($this->upload_id, $this->backup_page_id, $this->module_id, $temporary_file_path);
+
+ if($ret === false) {
+ return 'error';
+ }
+ $backup_uploads = $this->db->selectExecute("backup_uploads", array("upload_id" => $this->upload_id));
+ if($backup_uploads === false && !isset($backup_uploads[0])) {
+ return 'error';
+ }
+ $this->temporary_file_path = $temporary_file_path;
+
+ list($room_inf, $restore_modules, $version_arr, $modules) = $ret;
+
+ $restore_data = $this->backupRestore->getRoomArray();
+
+ $restore_type = $restore_modules["system"]['restore_type'];
+ if(!isset($restore_data['system']['room'])) {
+ // 現状、未処理
+ $this->fileAction->delDir($this->temporary_file_path);
+ return 'error';
+ }
+ $this->_self_flag = $restore_modules["system"]['self_flag'];
+
+
+ //--------------------------------------------------
+ // システム関連テーブルリストア
+ // - PKを振りなおす -
+ // XMLは、改竄されていないとして処理(電子認証)
+ //--------------------------------------------------
+ $pages_buf = array();
+ $page_id_arr = array();
+ $pages_users_link_room_id = array();
+ $normal_block_col_arr = array();
+ $err_block_row_arr = array();
+ $upload_id_arr = array();
+ $physical_file_name_arr = array();
+ $this->del_physical_file_name_arr = array();
+ //$insert_blocks = array();
+ $login_user_id = $this->session->getParameter("_user_id");
+
+ // room_idで削除できる項目は、はじめに削除
+ if($restore_type == "top") {
// Topのものは置き換える対象なので
// 現在のものを削除する
// RollBackのため、SelectしてDelete
@@ -131,10 +131,10 @@ function execute()
$top_page = $this->pagesView->getPrivateSpaceByUserId($login_user_id, 0, 0, false);
if($top_page === false) return 'error';
if($room_inf['default_entry_flag'] == _ON && isset($top_page[1])) {
- $index_count = 1;
- } else {
- $index_count = 0;
- }
+ $index_count = 1;
+ } else {
+ $index_count = 0;
+ }
} else {
// パブリックスペース
$where_params = array(
@@ -158,21 +158,21 @@ function execute()
}
}
- //$adodb = $this->db->getAdoDbObject();
- foreach($restore_data['system']['room'] as $room_id => $restore_table_arr) {
- //
- // room_id毎にリストアしていく
- //
- foreach($restore_table_arr as $table_name => $rec_sets) {
- foreach($rec_sets as $rec_set) {
- if($restore_type == "top" && !$this->_self_flag) {
- if(isset($rec_set['page_id']) && $rec_set['page_id'] == $pre_top_page_id) {
- $rec_set['page_id'] = $room_inf['page_id'];
- }
- if(isset($rec_set['room_id']) && $rec_set['room_id'] == $pre_top_room_id) {
- $rec_set['room_id'] = $room_inf['room_id'];
- }
- }
+ //$adodb = $this->db->getAdoDbObject();
+ foreach($restore_data['system']['room'] as $room_id => $restore_table_arr) {
+ //
+ // room_id毎にリストアしていく
+ //
+ foreach($restore_table_arr as $table_name => $rec_sets) {
+ foreach($rec_sets as $rec_set) {
+ if($restore_type == "top" && !$this->_self_flag) {
+ if(isset($rec_set['page_id']) && $rec_set['page_id'] == $pre_top_page_id) {
+ $rec_set['page_id'] = $room_inf['page_id'];
+ }
+ if(isset($rec_set['room_id']) && $rec_set['room_id'] == $pre_top_room_id) {
+ $rec_set['room_id'] = $room_inf['room_id'];
+ }
+ }
if ($restore_type == "top" && $room_inf['private_flag'] == _ON) {
if (isset($rec_set['insert_site_id'])) {
$rec_set['insert_site_id'] = $this->session->getParameter("_site_id");
@@ -188,152 +188,152 @@ function execute()
}
}
- if($table_name == "pages") {
- //-------------------------------------------------------------------------
- // ページテーブル
- //-------------------------------------------------------------------------
- $prev_page_id = $rec_set['page_id'];
- $prev_thread_num = $rec_set['thread_num'];
- if($restore_type == "top" && $rec_set['thread_num'] == 0) {
- // パブリックスペース、プライベートスペースならば、ID変更なし
- // Insertも行わない
- $this->_transferId($table_name, $rec_set, "page_id", null, $rec_set['page_id']);
- } else if($rec_set['display_position'] != _DISPLAY_POSITION_CENTER){
- // 左右カラム、ヘッダー、フッターならばID変更なし
- // Insertも行わない
- $this->_transferId($table_name, $rec_set, "page_id", null, $rec_set['page_id']);
- } else {
- // サブグループならばリストア位置を変更
- if($this->regist_location != null && $restore_type == "subgroup") {
- $restore_page = $this->pagesView->getPageById(intval($this->regist_location));
- if($restore_page === false || !isset($restore_page['page_id'])) {
- $this->_rollBack();
- return 'error';
- }
- if((($this->backup_page_id == 0 && $backup_uploads[0]['thread_num'] == $prev_thread_num) || $this->backup_page_id == $prev_page_id) &&
- $restore_page['authority_id'] >= _AUTH_CHIEF && $restore_page['createroom_flag'] == _ON) {
- // リストアOKなルームID
- $rec_set['parent_id'] = intval($this->regist_location);
- }
- }
-
- // ページ名称
- if($restore_type != "top" && ($this->backup_page_id == $rec_set['page_id'] || ($this->backup_page_id == 0 && $backup_uploads[0]['thread_num'] == $prev_thread_num))) {
- $rec_set['page_name'] = $room_inf['page_name'];
- $display_sequence = $this->pagesView->getMaxChildPage($rec_set['parent_id'], $rec_set['lang_dirname']);
- $display_sequence = intval($display_sequence) + 1;
- $rec_set['display_sequence'] = $display_sequence;
- }
-
- // page_id振替
- $this->_transferId($table_name, $rec_set, "page_id");
-
- //if($restore_type != "top") {
- // room_id振替
- $this->_transferId($table_name, $rec_set, "page_id", "room_id");
- //}
- if(isset($this->transfer_id_arr['page_id'][$rec_set['root_id']])) {
- // root_id振替
- $this->_transferId($table_name, $rec_set, "page_id", "root_id");
- }
- if(isset($this->transfer_id_arr['page_id'][$rec_set['parent_id']])) {
- // parent_id振替
- //if($this->regist_location != null && $restore_type == "subgroup") {
- // $this->_transferId($table_name, $rec_set, "page_id", "parent_id", $rec_set['parent_id']);
- //} else {
- $this->_transferId($table_name, $rec_set, "page_id", "parent_id");
- //}
- }
- // display_flagを_PAGES_DISPLAY_FLAG_DISABLEDにしておく
- // TODO:準備中のルームも最終的に公開中にされてしまうが、仕様とする
- if($rec_set['page_id'] == $rec_set['room_id']) {
- $rec_set['display_flag'] = _PAGES_DISPLAY_FLAG_DISABLED;
- } else {
- $rec_set['display_flag'] = _ON;
- }
- $rec_set['site_id'] = $this->session->getParameter("_site_id");
- $result = $this->db->insertExecute($table_name, $rec_set, false);
- if ($result === false) {
- $this->_rollBack();
- return 'error';
+ if($table_name == "pages") {
+ //-------------------------------------------------------------------------
+ // ページテーブル
+ //-------------------------------------------------------------------------
+ $prev_page_id = $rec_set['page_id'];
+ $prev_thread_num = $rec_set['thread_num'];
+ if($restore_type == "top" && $rec_set['thread_num'] == 0) {
+ // パブリックスペース、プライベートスペースならば、ID変更なし
+ // Insertも行わない
+ $this->_transferId($table_name, $rec_set, "page_id", null, $rec_set['page_id']);
+ } else if($rec_set['display_position'] != _DISPLAY_POSITION_CENTER){
+ // 左右カラム、ヘッダー、フッターならばID変更なし
+ // Insertも行わない
+ $this->_transferId($table_name, $rec_set, "page_id", null, $rec_set['page_id']);
+ } else {
+ // サブグループならばリストア位置を変更
+ if($this->regist_location != null && $restore_type == "subgroup") {
+ $restore_page = $this->pagesView->getPageById(intval($this->regist_location));
+ if($restore_page === false || !isset($restore_page['page_id'])) {
+ $this->_rollBack();
+ return 'error';
+ }
+ if((($this->backup_page_id == 0 && $backup_uploads[0]['thread_num'] == $prev_thread_num) || $this->backup_page_id == $prev_page_id) &&
+ $restore_page['authority_id'] >= _AUTH_CHIEF && $restore_page['createroom_flag'] == _ON) {
+ // リストアOKなルームID
+ $rec_set['parent_id'] = intval($this->regist_location);
+ }
+ }
+
+ // ページ名称
+ if($restore_type != "top" && ($this->backup_page_id == $rec_set['page_id'] || ($this->backup_page_id == 0 && $backup_uploads[0]['thread_num'] == $prev_thread_num))) {
+ $rec_set['page_name'] = $room_inf['page_name'];
+ $display_sequence = $this->pagesView->getMaxChildPage($rec_set['parent_id'], $rec_set['lang_dirname']);
+ $display_sequence = intval($display_sequence) + 1;
+ $rec_set['display_sequence'] = $display_sequence;
+ }
+
+ // page_id振替
+ $this->_transferId($table_name, $rec_set, "page_id");
+
+ //if($restore_type != "top") {
+ // room_id振替
+ $this->_transferId($table_name, $rec_set, "page_id", "room_id");
+ //}
+ if(isset($this->transfer_id_arr['page_id'][$rec_set['root_id']])) {
+ // root_id振替
+ $this->_transferId($table_name, $rec_set, "page_id", "root_id");
+ }
+ if(isset($this->transfer_id_arr['page_id'][$rec_set['parent_id']])) {
+ // parent_id振替
+ //if($this->regist_location != null && $restore_type == "subgroup") {
+ // $this->_transferId($table_name, $rec_set, "page_id", "parent_id", $rec_set['parent_id']);
+ //} else {
+ $this->_transferId($table_name, $rec_set, "page_id", "parent_id");
+ //}
+ }
+ // display_flagを_PAGES_DISPLAY_FLAG_DISABLEDにしておく
+ // TODO:準備中のルームも最終的に公開中にされてしまうが、仕様とする
+ if($rec_set['page_id'] == $rec_set['room_id']) {
+ $rec_set['display_flag'] = _PAGES_DISPLAY_FLAG_DISABLED;
+ } else {
+ $rec_set['display_flag'] = _ON;
+ }
+ $rec_set['site_id'] = $this->session->getParameter("_site_id");
+ $result = $this->db->insertExecute($table_name, $rec_set, false);
+ if ($result === false) {
+ $this->_rollBack();
+ return 'error';
}
$this->deleteParams[$table_name][] = $rec_set;
- }
- // permalink
- if(($this->backup_page_id == 0 && $backup_uploads[0]['thread_num'] == $prev_thread_num) || $this->backup_page_id == $prev_page_id) {
- $pages_permalink = $rec_set;
- }
- // Bufferセット
- $page_id_arr[] = $rec_set['page_id'];
- $pages_buf[$rec_set['page_id']] = $rec_set;
- } else if($table_name == "pages_modules_link") {
- //-------------------------------------------------------------------------
- // ページモジュールリンクテーブル
- // module_idからリストア先のmodule_idに変換
- // エラーがあったモジュールはリストアしない
- //-------------------------------------------------------------------------
- if($restore_type == "top" && $room_inf['page_id'] == $rec_set['room_id']) {
- // パブリックスペース、プライベートスペースならば、ID変更なし
- // Insertも行わない
- $this->_transferId($table_name, $rec_set, "page_id", "room_id", $rec_set['room_id']);
- } else {
- // dirname取得
- if(isset($version_arr['__'.$rec_set['module_id']])) {
- $dirname = $version_arr['__'.$rec_set['module_id']];
- if(!isset($restore_modules[$dirname]['error_mes'])) {
- // エラーなし
- // module_id振替
- $this->_transferId($table_name, $rec_set, "module_id", null, $modules[$dirname]['module_id']);
-
- // room_id振替
- $this->_transferId($table_name, $rec_set, "page_id", "room_id");
-
- $result = $this->db->insertExecute($table_name, $rec_set, false);
- if ($result === false) {
- $this->_rollBack();
- return 'error';
+ }
+ // permalink
+ if(($this->backup_page_id == 0 && $backup_uploads[0]['thread_num'] == $prev_thread_num) || $this->backup_page_id == $prev_page_id) {
+ $pages_permalink = $rec_set;
+ }
+ // Bufferセット
+ $page_id_arr[] = $rec_set['page_id'];
+ $pages_buf[$rec_set['page_id']] = $rec_set;
+ } else if($table_name == "pages_modules_link") {
+ //-------------------------------------------------------------------------
+ // ページモジュールリンクテーブル
+ // module_idからリストア先のmodule_idに変換
+ // エラーがあったモジュールはリストアしない
+ //-------------------------------------------------------------------------
+ if($restore_type == "top" && $room_inf['page_id'] == $rec_set['room_id']) {
+ // パブリックスペース、プライベートスペースならば、ID変更なし
+ // Insertも行わない
+ $this->_transferId($table_name, $rec_set, "page_id", "room_id", $rec_set['room_id']);
+ } else {
+ // dirname取得
+ if(isset($version_arr['__'.$rec_set['module_id']])) {
+ $dirname = $version_arr['__'.$rec_set['module_id']];
+ if(!isset($restore_modules[$dirname]['error_mes'])) {
+ // エラーなし
+ // module_id振替
+ $this->_transferId($table_name, $rec_set, "module_id", null, $modules[$dirname]['module_id']);
+
+ // room_id振替
+ $this->_transferId($table_name, $rec_set, "page_id", "room_id");
+
+ $result = $this->db->insertExecute($table_name, $rec_set, false);
+ if ($result === false) {
+ $this->_rollBack();
+ return 'error';
}
$this->deleteParams[$table_name][] = $rec_set;
- }
-
- }
- }
- } else if($table_name == "pages_users_link") {
- //-------------------------------------------------------------------------
- // ページユーザーリンクテーブル
- //
- // バックアップされた会員を参加させる(restore_type != "top" && restore_type != "subgroup")
- // サブグループならば、必ず初期化
- // パブリックスペース、プライベートスペースならば、参加者は変更しない
- // パブリックスペース内のルームについては、初期化する
- //-------------------------------------------------------------------------
- if($restore_type == "top" && $room_inf['page_id'] == $rec_set['room_id']) {
- // 参加者情報はリストアしない(現状のまま)
- } else{
- // room_id振替
- $this->_transferId($table_name, $rec_set, "page_id", "room_id");
-
- if ($restore_type != "top" && $restore_type != "subgroup" && $this->entry_user == _ON &&
- (!isset($admin_users) || !isset($admin_users[$rec_set['user_id']]))) {
+ }
+
+ }
+ }
+ } else if($table_name == "pages_users_link") {
+ //-------------------------------------------------------------------------
+ // ページユーザーリンクテーブル
+ //
+ // バックアップされた会員を参加させる(restore_type != "top" && restore_type != "subgroup")
+ // サブグループならば、必ず初期化
+ // パブリックスペース、プライベートスペースならば、参加者は変更しない
+ // パブリックスペース内のルームについては、初期化する
+ //-------------------------------------------------------------------------
+ if($restore_type == "top" && $room_inf['page_id'] == $rec_set['room_id']) {
+ // 参加者情報はリストアしない(現状のまま)
+ } else{
+ // room_id振替
+ $this->_transferId($table_name, $rec_set, "page_id", "room_id");
+
+ if ($restore_type != "top" && $restore_type != "subgroup" && $this->entry_user == _ON &&
+ (!isset($admin_users) || !isset($admin_users[$rec_set['user_id']]))) {
// バックアップされた会員を参加させる
- // 登録されていない会員がいれば、INSERTしない
- $pages_users_link_user = $this->usersView->getUserById($rec_set['user_id']);
- if(isset($pages_users_link_user['user_id'])) {
-
- $result = $this->db->insertExecute($table_name, $rec_set, false);
- if ($result === false) {
- $this->_rollBack();
- return 'error';
+ // 登録されていない会員がいれば、INSERTしない
+ $pages_users_link_user = $this->usersView->getUserById($rec_set['user_id']);
+ if(isset($pages_users_link_user['user_id'])) {
+
+ $result = $this->db->insertExecute($table_name, $rec_set, false);
+ if ($result === false) {
+ $this->_rollBack();
+ return 'error';
}
$this->deleteParams[$table_name][] = $rec_set;
- }
- }
+ }
+ }
- //
- // リストアを行った会員、管理者は少なくとも参加
- //
- // 管理者一覧取得
+ //
+ // リストアを行った会員、管理者は少なくとも参加
+ //
+ // 管理者一覧取得
if(!isset($admin_users)) {
if($pages_buf[$rec_set['room_id']]['private_flag'] == _OFF) {
// プライベートルームは自分自身のみ
@@ -379,117 +379,117 @@ function execute()
}
$result = $this->db->insertExecute($table_name, $rec_set, false);
if ($result === false) {
- $this->_rollBack();
- return 'error';
+ $this->_rollBack();
+ return 'error';
}
$this->deleteParams[$table_name][] = $rec_set;
}
}
- }
- } else if($table_name == "pages_meta_inf") {
- //-------------------------------------------------------------------------
- // pages_meta_infテーブル
- //-------------------------------------------------------------------------
- // page_id振替
- $this->_transferId($table_name, $rec_set, "page_id");
+ }
+ } else if($table_name == "pages_meta_inf") {
+ //-------------------------------------------------------------------------
+ // pages_meta_infテーブル
+ //-------------------------------------------------------------------------
+ // page_id振替
+ $this->_transferId($table_name, $rec_set, "page_id");
$result = $this->db->insertExecute($table_name, $rec_set, false);
- if ($result === false) {
- $this->_rollBack();
- return 'error';
+ if ($result === false) {
+ $this->_rollBack();
+ return 'error';
}
$this->deleteParams[$table_name][] = $rec_set;
- } else if($table_name == "pages_style") {
- //-------------------------------------------------------------------------
- // ページスタイルテーブル
- // 自サイトでないならば、本テーブルは、デフォルトに強制的に戻す
- // header_flag,leftcolumn_flag等が、権限によっては変更できなくなるおそれがあるため
- // 権限毎で、レイアウトを変更できるかどうかをもっているので
- // レイアウト変更できる権限の場合のみリストアすることも可能だが、現状、しない
- //-------------------------------------------------------------------------
- if($restore_modules["system"]['self_flag']) {
- // set_page_id振替
- $this->_transferId($table_name, $rec_set, "page_id", "set_page_id");
-
- $result = $this->db->insertExecute($table_name, $rec_set, false);
- if ($result === false) {
- $this->_rollBack();
- return 'error';
+ } else if($table_name == "pages_style") {
+ //-------------------------------------------------------------------------
+ // ページスタイルテーブル
+ // 自サイトでないならば、本テーブルは、デフォルトに強制的に戻す
+ // header_flag,leftcolumn_flag等が、権限によっては変更できなくなるおそれがあるため
+ // 権限毎で、レイアウトを変更できるかどうかをもっているので
+ // レイアウト変更できる権限の場合のみリストアすることも可能だが、現状、しない
+ //-------------------------------------------------------------------------
+ if($restore_modules["system"]['self_flag']) {
+ // set_page_id振替
+ $this->_transferId($table_name, $rec_set, "page_id", "set_page_id");
+
+ $result = $this->db->insertExecute($table_name, $rec_set, false);
+ if ($result === false) {
+ $this->_rollBack();
+ return 'error';
}
$this->deleteParams[$table_name][] = $rec_set;
- }
- } else if($table_name == "monthly_number") {
- //-------------------------------------------------------------------------
- // 月別一覧テーブル
- //-------------------------------------------------------------------------
- $insert_flag = false;
-
- if($rec_set['module_id'] == 0) {
- // アクセス数等
- $insert_flag = true;
- } else if(isset($version_arr['__'.$rec_set['module_id']])) {
- $dirname = $version_arr['__'.$rec_set['module_id']];
- if(!isset($restore_modules[$dirname]['error_mes'])) {
- // エラーなし
- // module_id振替
- $this->_transferId($table_name, $rec_set, "module_id", null, $modules[$dirname]['module_id']);
- if(isset($this->entry_modules[$dirname]) &&
- $this->entry_modules[$dirname] == _ON) {
- // リストアするモジュールに含まれている
- $insert_flag = true;
- }
-
- }
- }
- /* ループ前に行うので、ここはコメント 後に削除
- if($restore_type == "top" && $room_inf['page_id'] == $rec_set['room_id']) {
- // Topのものは置き換える対象なので
- // 現在のものを削除する
- // RollBackのため、SelectしてDelete
- $sel_where_params = array(
- "room_id" => $rec_set['room_id']
- );
- //$sel_where_params = array(
- // "user_id" => $rec_set['user_id'],
- // "room_id" => $rec_set['room_id'],
- // "module_id" => $rec_set['module_id']
- //);
- if(!$this->_selectDelete($table_name, $sel_where_params)) {
- return 'error';
- }
- }
- */
- if($insert_flag == true) {
- // room_id振替
- $this->_transferId($table_name, $rec_set, "page_id", "room_id");
+ }
+ } else if($table_name == "monthly_number") {
+ //-------------------------------------------------------------------------
+ // 月別一覧テーブル
+ //-------------------------------------------------------------------------
+ $insert_flag = false;
+
+ if($rec_set['module_id'] == 0) {
+ // アクセス数等
+ $insert_flag = true;
+ } else if(isset($version_arr['__'.$rec_set['module_id']])) {
+ $dirname = $version_arr['__'.$rec_set['module_id']];
+ if(!isset($restore_modules[$dirname]['error_mes'])) {
+ // エラーなし
+ // module_id振替
+ $this->_transferId($table_name, $rec_set, "module_id", null, $modules[$dirname]['module_id']);
+ if(isset($this->entry_modules[$dirname]) &&
+ $this->entry_modules[$dirname] == _ON) {
+ // リストアするモジュールに含まれている
+ $insert_flag = true;
+ }
+
+ }
+ }
+ /* ループ前に行うので、ここはコメント 後に削除
+ if($restore_type == "top" && $room_inf['page_id'] == $rec_set['room_id']) {
+ // Topのものは置き換える対象なので
+ // 現在のものを削除する
+ // RollBackのため、SelectしてDelete
+ $sel_where_params = array(
+ "room_id" => $rec_set['room_id']
+ );
+ //$sel_where_params = array(
+ // "user_id" => $rec_set['user_id'],
+ // "room_id" => $rec_set['room_id'],
+ // "module_id" => $rec_set['module_id']
+ //);
+ if(!$this->_selectDelete($table_name, $sel_where_params)) {
+ return 'error';
+ }
+ }
+ */
+ if($insert_flag == true) {
+ // room_id振替
+ $this->_transferId($table_name, $rec_set, "page_id", "room_id");
$result = $this->db->insertExecute($table_name, $rec_set, false);
- if ($result === false) {
- $this->_rollBack();
- return 'error';
+ if ($result === false) {
+ $this->_rollBack();
+ return 'error';
}
$this->deleteParams[$table_name][] = $rec_set;
- }
- } else if($table_name == "blocks") {
- //-------------------------------------------------------------------------
- // ブロックテーブル
- //-------------------------------------------------------------------------
- if($rec_set['module_id'] == 0) {
- // グループ化されたブロック
- // 内部にモジュールがあるかどうかチェック
- // なければリストア対象としない
- if(!isset($normal_block_col_arr[$rec_set['page_id']][$rec_set['block_id']])) {
- $dirname = "";
- } else {
- $dirname = "_grouping";
- }
- } else if(isset($version_arr['__'.$rec_set['module_id']])) {
- $dirname = $version_arr['__'.$rec_set['module_id']];
- } else {
- $dirname = "";
- }
- if(($dirname != "_grouping" &&
- (!isset($this->entry_modules[$dirname]) ||
+ }
+ } else if($table_name == "blocks") {
+ //-------------------------------------------------------------------------
+ // ブロックテーブル
+ //-------------------------------------------------------------------------
+ if($rec_set['module_id'] == 0) {
+ // グループ化されたブロック
+ // 内部にモジュールがあるかどうかチェック
+ // なければリストア対象としない
+ if(!isset($normal_block_col_arr[$rec_set['page_id']][$rec_set['block_id']])) {
+ $dirname = "";
+ } else {
+ $dirname = "_grouping";
+ }
+ } else if(isset($version_arr['__'.$rec_set['module_id']])) {
+ $dirname = $version_arr['__'.$rec_set['module_id']];
+ } else {
+ $dirname = "";
+ }
+ if(($dirname != "_grouping" &&
+ (!isset($this->entry_modules[$dirname]) ||
$this->entry_modules[$dirname] == _OFF ||
$dirname == "" ||
isset($restore_modules[$dirname]['error_mes'])
@@ -500,39 +500,39 @@ function execute()
$err_block_row_arr[$rec_set['page_id']][$rec_set['parent_id']][$rec_set['col_num']][$rec_set['row_num']] = true;
} else {
- // エラーなし
- $normal_block_col_arr[$rec_set['page_id']][$rec_set['parent_id']][$rec_set['col_num']] = true;
- // 詰めるかどうかチェック
- if($rec_set['row_num'] > 1 && isset($err_block_row_arr[$rec_set['page_id']][$rec_set['parent_id']])) {
- $set_row_num = $rec_set['row_num'];
- $chk_row_num = intval($set_row_num) - 1;
- while(1) {
- if($chk_row_num == 0) break;
- if(isset($err_block_row_arr[$rec_set['page_id']][$rec_set['parent_id']][$rec_set['col_num']][$chk_row_num])) {
- $set_row_num--;
- }
- $chk_row_num--;
- }
- $rec_set['row_num'] = $set_row_num;
- }
- if($rec_set['col_num'] > 1) {
- $set_col_num = $rec_set['col_num'];
- $chk_col_num = intval($set_col_num) - 1;
- while(1) {
- if($chk_col_num == 0) break;
- if(!isset($normal_block_col_arr[$rec_set['page_id']][$rec_set['parent_id']][$chk_col_num])) {
- $set_col_num--;
- }
- $chk_col_num--;
- }
- $rec_set['col_num'] = $set_col_num;
- }
-
- // block_id振替
- $this->_transferId($table_name, $rec_set, "block_id");
-
- // page_id振替
- $this->_transferId($table_name, $rec_set, "page_id");
+ // エラーなし
+ $normal_block_col_arr[$rec_set['page_id']][$rec_set['parent_id']][$rec_set['col_num']] = true;
+ // 詰めるかどうかチェック
+ if($rec_set['row_num'] > 1 && isset($err_block_row_arr[$rec_set['page_id']][$rec_set['parent_id']])) {
+ $set_row_num = $rec_set['row_num'];
+ $chk_row_num = intval($set_row_num) - 1;
+ while(1) {
+ if($chk_row_num == 0) break;
+ if(isset($err_block_row_arr[$rec_set['page_id']][$rec_set['parent_id']][$rec_set['col_num']][$chk_row_num])) {
+ $set_row_num--;
+ }
+ $chk_row_num--;
+ }
+ $rec_set['row_num'] = $set_row_num;
+ }
+ if($rec_set['col_num'] > 1) {
+ $set_col_num = $rec_set['col_num'];
+ $chk_col_num = intval($set_col_num) - 1;
+ while(1) {
+ if($chk_col_num == 0) break;
+ if(!isset($normal_block_col_arr[$rec_set['page_id']][$rec_set['parent_id']][$chk_col_num])) {
+ $set_col_num--;
+ }
+ $chk_col_num--;
+ }
+ $rec_set['col_num'] = $set_col_num;
+ }
+
+ // block_id振替
+ $this->_transferId($table_name, $rec_set, "block_id");
+
+ // page_id振替
+ $this->_transferId($table_name, $rec_set, "page_id");
// root_id振替
if($rec_set['root_id'] != 0) {
@@ -547,53 +547,53 @@ function execute()
$this->_transferId($table_name, $rec_set, "module_id", null, $modules[$dirname]['module_id']);
}
$result = $this->db->insertExecute($table_name, $rec_set, false);
- if ($result === false) {
- $this->_rollBack();
- return 'error';
+ if ($result === false) {
+ $this->_rollBack();
+ return 'error';
}
$this->deleteParams[$table_name][] = $rec_set;
- }
- } else if($table_name == "uploads") {
- //-------------------------------------------------------------------------
- // アップロードテーブル
- // アップロードする実ファイルは、リストアが完全に終わった後
- // コピー or 削除を行う
- // 現状、アップロードできる拡張子以外のものがあってもリストアしている
- //-------------------------------------------------------------------------
- $insert_flag = false;
-
- if(isset($version_arr['__'.$rec_set['module_id']])) {
- $dirname = $version_arr['__'.$rec_set['module_id']];
- if(!isset($restore_modules[$dirname]['error_mes'])) {
- // エラーなし
- // module_id振替
- $this->_transferId($table_name, $rec_set, "module_id", null, $modules[$dirname]['module_id']);
-
- if(isset($this->entry_modules[$dirname]) &&
- $this->entry_modules[$dirname] == _ON) {
- // リストアするモジュールに含まれている
- $insert_flag = true;
- }
- }
- }
- /* ループ前に行うので、ここはコメント 後に削除
- if($restore_type == "top" && $room_inf['page_id'] == $rec_set['room_id']) {
- // Topのものは置き換える対象なので
- // 現在のものを削除する
- // RollBackのため、SelectしてDelete
- $sel_where_params = array(
- "room_id" => $rec_set['room_id']
- );
- if(!$this->_selectDelete($table_name, $sel_where_params)) {
- return 'error';
- }
- }
- */
- if($insert_flag == true) {
- //$old_upload_id = $rec_set['upload_id'];
- $old_physical_file_name = $rec_set['file_path'] . $rec_set['physical_file_name'];
- // upload_id振替
- $this->_transferId($table_name, $rec_set, "upload_id");
+ }
+ } else if($table_name == "uploads") {
+ //-------------------------------------------------------------------------
+ // アップロードテーブル
+ // アップロードする実ファイルは、リストアが完全に終わった後
+ // コピー or 削除を行う
+ // 現状、アップロードできる拡張子以外のものがあってもリストアしている
+ //-------------------------------------------------------------------------
+ $insert_flag = false;
+
+ if(isset($version_arr['__'.$rec_set['module_id']])) {
+ $dirname = $version_arr['__'.$rec_set['module_id']];
+ if(!isset($restore_modules[$dirname]['error_mes'])) {
+ // エラーなし
+ // module_id振替
+ $this->_transferId($table_name, $rec_set, "module_id", null, $modules[$dirname]['module_id']);
+
+ if(isset($this->entry_modules[$dirname]) &&
+ $this->entry_modules[$dirname] == _ON) {
+ // リストアするモジュールに含まれている
+ $insert_flag = true;
+ }
+ }
+ }
+ /* ループ前に行うので、ここはコメント 後に削除
+ if($restore_type == "top" && $room_inf['page_id'] == $rec_set['room_id']) {
+ // Topのものは置き換える対象なので
+ // 現在のものを削除する
+ // RollBackのため、SelectしてDelete
+ $sel_where_params = array(
+ "room_id" => $rec_set['room_id']
+ );
+ if(!$this->_selectDelete($table_name, $sel_where_params)) {
+ return 'error';
+ }
+ }
+ */
+ if($insert_flag == true) {
+ //$old_upload_id = $rec_set['upload_id'];
+ $old_physical_file_name = $rec_set['file_path'] . $rec_set['physical_file_name'];
+ // upload_id振替
+ $this->_transferId($table_name, $rec_set, "upload_id");
// room_id振替
$this->_transferId($table_name, $rec_set, "page_id", "room_id");
@@ -607,22 +607,23 @@ function execute()
// insert
$result = $this->db->insertExecute($table_name, $rec_set, false);
- if ($result === false) {
- $this->_rollBack();
- return 'error';
+ if ($result === false) {
+ $this->_rollBack();
+ return 'error';
}
- $this->deleteParams[$table_name][] = $rec_set;
+ $key = $rec_set['upload_id'];
+ $this->deleteParams[$table_name][$key] = $rec_set;
// upload_id保存
- $upload_id_arr[$dirname][$rec_set['upload_id']] = $rec_set['unique_id'];
+ $upload_id_arr[$dirname][$key] = $rec_set['unique_id'];
$physical_file_name_arr[$old_physical_file_name] = $rec_set['file_path'] . $rec_set['physical_file_name'];
- }
- }
- }
- }
- }
+ }
+ }
+ }
+ }
+ }
- // permalink
+ // permalink
if(isset($pages_permalink)) {
$permalink = $pages_permalink['permalink'];
$buf_permalink = $permalink;
@@ -649,19 +650,19 @@ function execute()
}
}
- //--------------------------------------------------
- // 一般系テーブルリストア
- //--------------------------------------------------
- $all_transfer_id_arr = array();
- $transfer_user_id_arr = array();
- foreach($restore_data as $dirname => $modules_restore_arr) {
- if($dirname == "system") {
- continue;
- }
- //
- // リストア対象かどうかチェック
- //
- if(isset($restore_modules[$dirname]['error_mes'])) {
+ //--------------------------------------------------
+ // 一般系テーブルリストア
+ //--------------------------------------------------
+ $all_transfer_id_arr = array();
+ $transfer_user_id_arr = array();
+ foreach($restore_data as $dirname => $modules_restore_arr) {
+ if($dirname == "system") {
+ continue;
+ }
+ //
+ // リストア対象かどうかチェック
+ //
+ if(isset($restore_modules[$dirname]['error_mes'])) {
// エラーあり
continue;
}
@@ -742,146 +743,146 @@ function execute()
}
//
- // room_id毎にリストアしていく
- //
- foreach($modules_restore_arr['room'] as $room_id => $restore_table_arr) {
- foreach($restore_table_arr as $table_name => $rec_sets) {
- if(isset($transfer_module_id_arr[$table_name]["*"]) &&
- $transfer_module_id_arr[$table_name]["*"] == "none_transfer") {
- // 本テーブルは振替対象外
- continue;
- }
- // ハンドル名が重複する可能性があるため、
- // ハンドル名称を振り替える
- $this->_transferIdHandle($transfer_user_id_arr, $rec_sets);
-
- foreach($rec_sets as $rec_set) {
- if($restore_type == "top" && !$this->_self_flag) {
- if(isset($rec_set['page_id']) && $rec_set['page_id'] == $pre_top_page_id) {
- $rec_set['page_id'] = $room_inf['page_id'];
- }
- if(isset($rec_set['room_id']) && $rec_set['room_id'] == $pre_top_room_id) {
- $rec_set['room_id'] = $room_inf['room_id'];
- }
- }
-
- if($rec_set["room_id"] && $rec_set["room_id"] == BACKUP_NULL_COLUMN) {
- //if($this->_self_flag && $rec_set["room_id"] && $rec_set["room_id"] == BACKUP_NULL_COLUMN) {
- //
- // room_idがnullのカラムがあった場合
- //
- continue;
- }
-
- foreach($rec_set as $column_name => $value) {
- // null表記
- if($value == BACKUP_NULL_COLUMN) {
- $rec_set[$column_name] = null;
- $value = null;
- }
- if($value != "0") {
- $transfer_column_name = "";
- if(isset($transfer_module_id_arr["all"][$column_name])) {
- $transfer_column_name = $transfer_module_id_arr["all"][$column_name];
- $set_key = "all";
- } else if(isset($transfer_module_id_arr[$table_name][$column_name])) {
- $transfer_column_name = $transfer_module_id_arr[$table_name][$column_name];
- $set_key = $table_name;
- }
- $mode = "";
- if(isset($set_key) && isset($transfer_core_id_arr[$set_key][$column_name])) {
- $mode = $transfer_core_id_arr[$set_key][$column_name];
- }
- $other_module = "";
- if(isset($set_key) && isset($transfer_other_module_id_arr[$set_key][$column_name])) {
- $other_module = $transfer_other_module_id_arr[$set_key][$column_name];
- }
- $separator = "";
- if(isset($set_key) && isset($transfer_separator_id_arr[$set_key][$column_name])) {
- $separator = $transfer_separator_id_arr[$set_key][$column_name];
- }
-
- if($transfer_column_name == "none_transfer") {
- // 振替ない
- } else if($transfer_column_name != "") {
- if($mode != "" && $mode != "wysiwyg" && $mode != "text" && $mode != "physical_file_name" && !isset($this->transfer_id_arr[$transfer_column_name][$rec_set[$column_name]])) {
- // Coreから振替
- continue;
- }
- if($separator == "") {
- if($mode != "") {
- // Coreから振替
- if($transfer_column_name == "module_id") {
- if(isset($version_arr['__'.$rec_set[$column_name]])) {
- // module_idに対応したモジュールあり
- $this->_transferId($table_name, $rec_set, $transfer_column_name, $column_name, $modules[$version_arr['__'.$rec_set[$column_name]]]['module_id'], $mode);
- }
- } else {
- $this->_transferId($table_name, $rec_set, $transfer_column_name, $column_name, null, $mode);
- }
- } else if($other_module != "") {
- $this->_transferIdModules($dirname, $all_transfer_id_arr[$other_module], $table_name, $rec_set, $transfer_column_name, $column_name);
- } else {
- $this->_transferIdModules($dirname, $transfer_id_arr, $table_name, $rec_set, $transfer_column_name, $column_name);
- }
- } else {
- $rec_set_column_arr = explode($separator, $rec_set[$column_name]);
- $rec_set_column_str = "";
- foreach($rec_set_column_arr as $rec_set_column) {
- if($rec_set_column_str != "") {
- $rec_set_column_str .= ",";
- }
- if($rec_set_column != "") {
- $rec_set[$column_name] = $rec_set_column;
- if($mode != "") {
- // Coreから振替
- if($transfer_column_name == "module_id") {
- if(isset($version_arr['__'.$rec_set[$column_name]])) {
- // module_idに対応したモジュールあり
- $this->_transferId($table_name, $rec_set, $transfer_column_name, $column_name, $modules[$version_arr['__'.$rec_set[$column_name]]]['module_id'], $mode);
- }
- } else {
- $this->_transferId($table_name, $rec_set, $transfer_column_name, $column_name, null, $mode);
- }
- } else if($other_module != "") {
- $this->_transferIdModules($dirname, $all_transfer_id_arr[$other_module], $table_name, $rec_set, $transfer_column_name, $column_name);
- } else {
- $this->_transferIdModules($dirname, $transfer_id_arr, $table_name, $rec_set, $transfer_column_name, $column_name);
- }
- $rec_set_column_str .= $rec_set[$column_name];
- }
- }
- $rec_set[$column_name] = $rec_set_column_str;
- }
- }
-
- }
- }
-
- $result = $this->db->insertExecute($table_name, $rec_set, false);
- if ($result === false) {
- $this->_rollBack();
- return 'error';
+ // room_id毎にリストアしていく
+ //
+ foreach($modules_restore_arr['room'] as $room_id => $restore_table_arr) {
+ foreach($restore_table_arr as $table_name => $rec_sets) {
+ if(isset($transfer_module_id_arr[$table_name]["*"]) &&
+ $transfer_module_id_arr[$table_name]["*"] == "none_transfer") {
+ // 本テーブルは振替対象外
+ continue;
+ }
+ // ハンドル名が重複する可能性があるため、
+ // ハンドル名称を振り替える
+ $this->_transferIdHandle($transfer_user_id_arr, $rec_sets);
+
+ foreach($rec_sets as $rec_set) {
+ if($restore_type == "top" && !$this->_self_flag) {
+ if(isset($rec_set['page_id']) && $rec_set['page_id'] == $pre_top_page_id) {
+ $rec_set['page_id'] = $room_inf['page_id'];
+ }
+ if(isset($rec_set['room_id']) && $rec_set['room_id'] == $pre_top_room_id) {
+ $rec_set['room_id'] = $room_inf['room_id'];
+ }
+ }
+
+ if($rec_set["room_id"] && $rec_set["room_id"] == BACKUP_NULL_COLUMN) {
+ //if($this->_self_flag && $rec_set["room_id"] && $rec_set["room_id"] == BACKUP_NULL_COLUMN) {
+ //
+ // room_idがnullのカラムがあった場合
+ //
+ continue;
+ }
+
+ foreach($rec_set as $column_name => $value) {
+ // null表記
+ if($value == BACKUP_NULL_COLUMN) {
+ $rec_set[$column_name] = null;
+ $value = null;
+ }
+ if($value != "0") {
+ $transfer_column_name = "";
+ if(isset($transfer_module_id_arr["all"][$column_name])) {
+ $transfer_column_name = $transfer_module_id_arr["all"][$column_name];
+ $set_key = "all";
+ } else if(isset($transfer_module_id_arr[$table_name][$column_name])) {
+ $transfer_column_name = $transfer_module_id_arr[$table_name][$column_name];
+ $set_key = $table_name;
+ }
+ $mode = "";
+ if(isset($set_key) && isset($transfer_core_id_arr[$set_key][$column_name])) {
+ $mode = $transfer_core_id_arr[$set_key][$column_name];
+ }
+ $other_module = "";
+ if(isset($set_key) && isset($transfer_other_module_id_arr[$set_key][$column_name])) {
+ $other_module = $transfer_other_module_id_arr[$set_key][$column_name];
+ }
+ $separator = "";
+ if(isset($set_key) && isset($transfer_separator_id_arr[$set_key][$column_name])) {
+ $separator = $transfer_separator_id_arr[$set_key][$column_name];
+ }
+
+ if($transfer_column_name == "none_transfer") {
+ // 振替ない
+ } else if($transfer_column_name != "") {
+ if($mode != "" && $mode != "wysiwyg" && $mode != "text" && $mode != "physical_file_name" && !isset($this->transfer_id_arr[$transfer_column_name][$rec_set[$column_name]])) {
+ // Coreから振替
+ continue;
+ }
+ if($separator == "") {
+ if($mode != "") {
+ // Coreから振替
+ if($transfer_column_name == "module_id") {
+ if(isset($version_arr['__'.$rec_set[$column_name]])) {
+ // module_idに対応したモジュールあり
+ $this->_transferId($table_name, $rec_set, $transfer_column_name, $column_name, $modules[$version_arr['__'.$rec_set[$column_name]]]['module_id'], $mode);
+ }
+ } else {
+ $this->_transferId($table_name, $rec_set, $transfer_column_name, $column_name, null, $mode);
+ }
+ } else if($other_module != "") {
+ $this->_transferIdModules($dirname, $all_transfer_id_arr[$other_module], $table_name, $rec_set, $transfer_column_name, $column_name);
+ } else {
+ $this->_transferIdModules($dirname, $transfer_id_arr, $table_name, $rec_set, $transfer_column_name, $column_name);
+ }
+ } else {
+ $rec_set_column_arr = explode($separator, $rec_set[$column_name]);
+ $rec_set_column_str = "";
+ foreach($rec_set_column_arr as $rec_set_column) {
+ if($rec_set_column_str != "") {
+ $rec_set_column_str .= ",";
+ }
+ if($rec_set_column != "") {
+ $rec_set[$column_name] = $rec_set_column;
+ if($mode != "") {
+ // Coreから振替
+ if($transfer_column_name == "module_id") {
+ if(isset($version_arr['__'.$rec_set[$column_name]])) {
+ // module_idに対応したモジュールあり
+ $this->_transferId($table_name, $rec_set, $transfer_column_name, $column_name, $modules[$version_arr['__'.$rec_set[$column_name]]]['module_id'], $mode);
+ }
+ } else {
+ $this->_transferId($table_name, $rec_set, $transfer_column_name, $column_name, null, $mode);
+ }
+ } else if($other_module != "") {
+ $this->_transferIdModules($dirname, $all_transfer_id_arr[$other_module], $table_name, $rec_set, $transfer_column_name, $column_name);
+ } else {
+ $this->_transferIdModules($dirname, $transfer_id_arr, $table_name, $rec_set, $transfer_column_name, $column_name);
+ }
+ $rec_set_column_str .= $rec_set[$column_name];
+ }
+ }
+ $rec_set[$column_name] = $rec_set_column_str;
+ }
+ }
+
+ }
+ }
+
+ $result = $this->db->insertExecute($table_name, $rec_set, false);
+ if ($result === false) {
+ $this->_rollBack();
+ return 'error';
}
$this->deleteParams[$table_name][] = $rec_set;
- }
- }
- }
- //
- // uploadsテーブルのunique_idの振替
- //
- if(isset($transfer_module_id_arr['uploads']['unique_id']) && isset($upload_id_arr[$dirname]) && $upload_id_arr[$dirname]) {
- $other_module = "";
+ }
+ }
+ }
+ //
+ // uploadsテーブルのunique_idの振替
+ //
+ if(isset($transfer_module_id_arr['uploads']['unique_id']) && isset($upload_id_arr[$dirname]) && $upload_id_arr[$dirname]) {
+ $other_module = "";
if(isset($transfer_other_module_id_arr['uploads']['unique_id'])) {
$other_module = $transfer_other_module_id_arr['uploads']['unique_id'];
}
$transfer_column_name = $transfer_module_id_arr['uploads']['unique_id'];
- foreach($upload_id_arr[$dirname] as $new_upload_id => $unique_id) {
- if($unique_id != "0") {
- $buf_rec_set['unique_id'] = $unique_id;
- // 振替対象
- // Coreからの振替はないものとして処理
- if($other_module != "") {
+ foreach($upload_id_arr[$dirname] as $new_upload_id => $unique_id) {
+ if($unique_id != "0") {
+ $buf_rec_set['unique_id'] = $unique_id;
+ // 振替対象
+ // Coreからの振替はないものとして処理
+ if($other_module != "") {
$this->_transferIdModules($dirname, $all_transfer_id_arr[$other_module], 'uploads', $buf_rec_set, $transfer_column_name, 'unique_id');
} else {
$this->_transferIdModules($dirname, $transfer_id_arr, 'uploads', $buf_rec_set, $transfer_column_name, 'unique_id');
@@ -889,67 +890,66 @@ function execute()
$upd_params = array("unique_id" => $buf_rec_set['unique_id']);
$upd_where_params = array("upload_id" => $new_upload_id);
$result = $this->db->updateExecute('uploads', $upd_params, $upd_where_params, false);
- if ($result === false) {
- $this->_rollBack();
- return false;
+ if ($result === false) {
+ $this->_rollBack();
+ return false;
}
- $upd_params = array("unique_id" => $unique_id);
- $this->uploadParams['uploads'][] = $upd_params;
- $this->uploadWhereParams['uploads'][] = $upd_where_params;
- }
- }
- }
-
- //
- // 振替たIDをセット
- // モジュール間の振替が必要なモジュールがあるため(施設予約、TODOのカレンダーID等)
- //
- $all_transfer_id_arr[$dirname] = $transfer_id_arr;
- }
+
+ $this->deleteParams['uploads'][$new_upload_id]['unique_id'] = $buf_rec_set['unique_id'];
+ }
+ }
+ }
+
+ //
+ // 振替たIDをセット
+ // モジュール間の振替が必要なモジュールがあるため(施設予約、TODOのカレンダーID等)
+ //
+ $all_transfer_id_arr[$dirname] = $transfer_id_arr;
+ }
// test
- //$this->_rollBack();
-
- //---------------------------------------------------------
- // 画像コピー・削除
- //---------------------------------------------------------
- //$this->del_physical_file_name_arr
- foreach($this->del_physical_file_name_arr as $del_name) {
- if(file_exists(FILEUPLOADS_DIR.$del_name)) {
- // エラー処理は行わない
- $this->fileAction->delDir(FILEUPLOADS_DIR.$del_name);
- }
- }
- //$physical_file_name_arr
- foreach($physical_file_name_arr as $old_name => $new_name) {
- if(file_exists($temporary_file_path. "uploads/".$old_name)) {
- $this->fileAction->copyFile($temporary_file_path. "uploads/".$old_name, FILEUPLOADS_DIR . $new_name);
- }
- }
- $this->fileAction->delDir($this->temporary_file_path);
- //---------------------------------------------------------
- // 正常終了
- //---------------------------------------------------------
- $this->display_flag = ($this->display_flag == _OFF && $this->display_flag != null) ? _OFF : _ON;
- // display_flag=_PAGES_DISPLAY_FLAG_DISABLEDを元に戻す
- $params = array(
- "display_flag" => $this->display_flag
- );
- $where_params = array(
- "page_id IN (". implode(",", $page_id_arr). ") " => null,
- "{pages}.page_id = {pages}.room_id" => null
- );
- //page_id IN (". implode(",", $page_id_arr). ") ";
- $result = $this->db->updateExecute("pages", $params, $where_params, false);
-
- // 正常終了
- $errorList =& $this->actionChain->getCurErrorList();
- $errorList->add("backup", BACKUP_RESTORE_SUCCESS_MES);
-
- return 'success';
- }
-
- // 手動ロールバック
- function _rollBack()
+ //$this->_rollBack();
+
+ //---------------------------------------------------------
+ // 画像コピー・削除
+ //---------------------------------------------------------
+ //$this->del_physical_file_name_arr
+ foreach($this->del_physical_file_name_arr as $del_name) {
+ if(file_exists(FILEUPLOADS_DIR.$del_name)) {
+ // エラー処理は行わない
+ $this->fileAction->delDir(FILEUPLOADS_DIR.$del_name);
+ }
+ }
+ //$physical_file_name_arr
+ foreach($physical_file_name_arr as $old_name => $new_name) {
+ if(file_exists($temporary_file_path. "uploads/".$old_name)) {
+ $this->fileAction->copyFile($temporary_file_path. "uploads/".$old_name, FILEUPLOADS_DIR . $new_name);
+ }
+ }
+ $this->fileAction->delDir($this->temporary_file_path);
+ //---------------------------------------------------------
+ // 正常終了
+ //---------------------------------------------------------
+ $this->display_flag = ($this->display_flag == _OFF && $this->display_flag != null) ? _OFF : _ON;
+ // display_flag=_PAGES_DISPLAY_FLAG_DISABLEDを元に戻す
+ $params = array(
+ "display_flag" => $this->display_flag
+ );
+ $where_params = array(
+ "page_id IN (". implode(",", $page_id_arr). ") " => null,
+ "{pages}.page_id = {pages}.room_id" => null
+ );
+ //page_id IN (". implode(",", $page_id_arr). ") ";
+ $result = $this->db->updateExecute("pages", $params, $where_params, false);
+
+ // 正常終了
+ $errorList =& $this->actionChain->getCurErrorList();
+ $errorList->add("backup", BACKUP_RESTORE_SUCCESS_MES);
+
+ return 'success';
+ }
+
+ // 手動ロールバック
+ function _rollBack()
{
foreach($this->deleteParams as $table_name => $params) {
if(is_array($params)) {
@@ -1021,16 +1021,16 @@ function _selectDelete($table_name, $sel_where_params = array())
$sel_result = $this->db->selectExecute($table_name, $sel_where_params);
if ($sel_result === false) {
- $this->_rollBack();
- return false;
+ $this->_rollBack();
+ return false;
}
$this->selectParams[$table_name][$whereStr] = $sel_where_params;
if(is_array($sel_result) && count($sel_result) > 0) {
$result = $this->db->deleteExecute($table_name, $sel_where_params);
if ($result === false) {
- $this->_rollBack();
- return false;
+ $this->_rollBack();
+ return false;
}
foreach($sel_result as $row) {
if($table_name == "uploads") {
@@ -1051,7 +1051,7 @@ function _selectDelete($table_name, $sel_where_params = array())
* @param array column_records
* @param string 変換配列保存キー
* @param string 変換カラム名称
- * @param int 変換ID 指定がなければ振りなおす(nextSeq)
+ * @param int 変換ID 指定がなければ振りなおす(nextSeq)
* @param string core or wysiwyg
* @access private
*/
@@ -1133,7 +1133,7 @@ function _transferId($table_name, &$rec_set, $transfer_column_name, $column_name
* @param array column_records
* @param string 変換配列保存キー
* @param string 変換カラム名称
- * @param int 変換ID 指定がなければ振りなおす(nextSeq)
+ * @param int 変換ID 指定がなければ振りなおす(nextSeq)
* @access private
*/
function _transferIdModules($dirname, &$transfer_id_arr, $table_name, &$rec_set, $transfer_column_name, $column_name = null, $transfer_id = null) {
@@ -1271,9 +1271,9 @@ function _delRoomDb($top_room_id) {
$upd_params = array("display_flag" => _PAGES_DISPLAY_FLAG_DISABLED);
$upd_where_params = array("page_id" => $page['page_id']);
$result = $this->db->updateExecute($table_name, $upd_params, $upd_where_params, false);
- if ($result === false) {
- $this->_rollBack();
- return false;
+ if ($result === false) {
+ $this->_rollBack();
+ return false;
}
$upd_params = array("display_flag" => _ON);
$this->uploadParams[$table_name][] = $upd_params;
diff --git a/html/webapp/modules/backup/install.ini b/html/webapp/modules/backup/install.ini
index 32a314e..90f8a1b 100644
--- a/html/webapp/modules/backup/install.ini
+++ b/html/webapp/modules/backup/install.ini
@@ -1,4 +1,4 @@
-version = "2.4.0.0"
+version = "2.4.0.1"
action_name="backup_view_main_init"
module_icon="backup.gif"
system_flag=1
diff --git a/html/webapp/modules/bbs/install.ini b/html/webapp/modules/bbs/install.ini
index 3a06a45..4f27b34 100644
--- a/html/webapp/modules/bbs/install.ini
+++ b/html/webapp/modules/bbs/install.ini
@@ -1,4 +1,4 @@
-version = "2.4.0.0"
+version = "2.4.0.1"
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/bbs/templates/default/bbs_mobile_thread.html b/html/webapp/modules/bbs/templates/default/bbs_mobile_thread.html
index 3ac2503..8e9dcdf 100644
--- a/html/webapp/modules/bbs/templates/default/bbs_mobile_thread.html
+++ b/html/webapp/modules/bbs/templates/default/bbs_mobile_thread.html
@@ -8,6 +8,9 @@
<{foreach from=$parents|smarty:nodefaults key=postID item=post}>
+ <{if $smarty.session._smartphone_flag != _ON}>
+ <{" "|str_repeat:$depth}>
+ <{/if}>
<{include file = "bbs_mobile_subject.html" display_type="list"}>
diff --git a/html/webapp/modules/calendar/components/View.class.php b/html/webapp/modules/calendar/components/View.class.php
index 4da2643..0b8aacb 100644
--- a/html/webapp/modules/calendar/components/View.class.php
+++ b/html/webapp/modules/calendar/components/View.class.php
@@ -1214,37 +1214,37 @@ function hasEditAuthority(&$plan)
*/
function &getSelectRoomList()
{
- $calendarView =& $this->_container->getComponent("calendarView");
+ $calendarView =& $this->_container->getComponent("calendarView");
- $calendar_block = $calendarView->getBlock();
- if ($calendar_block === false) {
- return $calendar_block;
- }
+ $calendar_block = $calendarView->getBlock();
+ if ($calendar_block === false) {
+ return $calendar_block;
+ }
- $sess_myroom_flag = $this->_session->getParameter(array("calendar", "myroom_flag", $calendar_block["block_id"]));
+ $sess_myroom_flag = $this->_session->getParameter(array("calendar", "myroom_flag", $calendar_block["block_id"]));
if (isset($sess_myroom_flag)) {
$calendar_block["myroom_flag"] = intval($sess_myroom_flag);
}
- $user_id = $this->_session->getParameter("_user_id");
-
- $room_arr = $this->_request->getParameter("room_arr");
- if (!empty($user_id)) {
- $room_arr[0][0][0] = array(
- "page_id" => CALENDAR_ALL_MEMBERS_ID,
- "parent_id" => 0,
- "page_name" => CALENDAR_ALL_MEMBERS_LANG,
- "thread_num" => 0,
- "space_type" => _SPACE_TYPE_UNDEFINED,
- "private_flag" => _OFF,
- "authority_id" => $this->_session->getParameter("_user_auth_id")
- );
- }
+ $user_id = $this->_session->getParameter("_user_id");
+
+ $room_arr = $this->_request->getParameter("room_arr");
+ if (!empty($user_id)) {
+ $room_arr[0][0][0] = array(
+ "page_id" => CALENDAR_ALL_MEMBERS_ID,
+ "parent_id" => 0,
+ "page_name" => CALENDAR_ALL_MEMBERS_LANG,
+ "thread_num" => 0,
+ "space_type" => _SPACE_TYPE_UNDEFINED,
+ "private_flag" => _OFF,
+ "authority_id" => $this->_session->getParameter("_user_auth_id")
+ );
+ }
$thread_num = 0;
$parent_id = 0;
- $getdata =& $this->_container->getComponent("GetData");
+ $getdata =& $this->_container->getComponent("GetData");
$pages = $getdata->getParameter("pages");
$actionChain =& $this->_container->getComponent("ActionChain");
@@ -1254,12 +1254,11 @@ function &getSelectRoomList()
"not_enroll_room_arr" => array(),
"room_arr" => $room_arr,
"calendar_block" => $calendar_block,
- "_page" => $pages[$this->_session->getParameter("_main_page_id")],
"private_room_id_arr" => array(),
"action_name" => $actionChain->getCurActionName()
);
- $sess_enroll_room = $this->_session->getParameter(array("calendar", "enroll_room", $calendar_block["block_id"]));
+ $sess_enroll_room = $this->_session->getParameter(array("calendar", "enroll_room", $calendar_block["block_id"]));
foreach ($result_params["room_arr"][$thread_num][$parent_id] as $disp => $room) {
if ($room["space_type"] == _SPACE_TYPE_GROUP && $room["private_flag"] == _ON) {
if ($result_params["calendar_block"]["myroom_flag"] == _ON) {
diff --git a/html/webapp/modules/calendar/install.ini b/html/webapp/modules/calendar/install.ini
index 6584a90..3bfe17d 100644
--- a/html/webapp/modules/calendar/install.ini
+++ b/html/webapp/modules/calendar/install.ini
@@ -1,4 +1,4 @@
-version = "2.4.0.0"
+version = "2.4.0.2"
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/install.ini b/html/webapp/modules/chat/install.ini
index 5873bcf..5ed9258 100644
--- a/html/webapp/modules/chat/install.ini
+++ b/html/webapp/modules/chat/install.ini
@@ -1,4 +1,4 @@
-version = "2.4.0.0"
+version = "2.4.0.1"
action_name="chat_view_main_init"
edit_action_name = "chat_view_edit_init"
block_add_action = "chat_action_edit_create"
@@ -15,7 +15,6 @@ display_type = "_OFF"
line_num = "30"
[Restore]
-chat_id =
block_id = core.block_id
room_id = core.page_id
diff --git a/html/webapp/modules/chat/update/Update.class.php b/html/webapp/modules/chat/update/Update.class.php
index c453f7d..a15a6c8 100644
--- a/html/webapp/modules/chat/update/Update.class.php
+++ b/html/webapp/modules/chat/update/Update.class.php
@@ -92,6 +92,35 @@ function execute()
$result = $this->db->execute($sql);
if($result === false) return false;
}
+
+ $sql = "SELECT block_id "
+ . "FROM " . $this->db->getPrefix() . "chat_contents "
+ . "GROUP BY block_id "
+ . "HAVING COUNT(chat_id) != MAX(chat_id)";
+ $chatBlocks = $this->db->execute($sql);
+ foreach ($chatBlocks as $chatBlock) {
+ $chatId = 1;
+ $sql = "SELECT chat_id "
+ . "FROM " . $this->db->getPrefix() . "chat_contents "
+ . "WHERE block_id = ? "
+ . "ORDER BY chat_id";
+ $chatContents = $this->db->execute($sql, $chatBlock['block_id']);
+ foreach ($chatContents as $chatContent) {
+ $updateColumns = array(
+ 'chat_id' => $chatId
+ );
+ $whereColumns = array(
+ 'block_id' => $chatBlock['block_id'],
+ 'chat_id' => $chatContent['chat_id']
+ );
+ $result = $this->db->updateExecute('chat_contents', $updateColumns, $whereColumns, false);
+ if ($result === false) {
+ return false;
+ }
+ $chatId++;
+ }
+ }
+
return true;
}
}
diff --git a/html/webapp/modules/circular/action/main/postscript/add/maple.ini b/html/webapp/modules/circular/action/main/postscript/add/maple.ini
index a0f3c3e..f642b59 100644
--- a/html/webapp/modules/circular/action/main/postscript/add/maple.ini
+++ b/html/webapp/modules/circular/action/main/postscript/add/maple.ini
@@ -3,7 +3,7 @@ mode="check"
action="circular_view_main_postscript_init"
[Convert]
-postscript_body.EscapeText =
+postscript_body.EscapeTextarea =
[ValidateDef]
postscript_body.required:g="1:lang._required,lang.circular_body"
diff --git a/html/webapp/modules/circular/action/main/postscript/mail/Mail.class.php b/html/webapp/modules/circular/action/main/postscript/mail/Mail.class.php
index 05b637a..d83e625 100644
--- a/html/webapp/modules/circular/action/main/postscript/mail/Mail.class.php
+++ b/html/webapp/modules/circular/action/main/postscript/mail/Mail.class.php
@@ -15,6 +15,7 @@ class Circular_Action_Main_Postscript_Mail extends Action
// リクエストパラメータを受け取るため
var $block_id = null;
var $circular_id = null;
+ var $mail_subject = null;
var $mail_body = null;
// 使用コンポーネントを受け取るため
@@ -33,7 +34,7 @@ function execute()
return "success";
}
- $this->mailMain->setSubject(CIRCULAR_MAIL_SUBJECT);
+ $this->mailMain->setSubject($this->mail_subject);
$this->mailMain->setBody($this->mail_body);
$circularInfo = $this->circularView->getCircularInfo($this->circular_id);
@@ -48,7 +49,7 @@ function execute()
$tags['X-CIRCULAR_SUBJECT'] = htmlspecialchars($circularInfo['circular_subject']);
$tags['X-CIRCULAR_BODY'] = $circularInfo['circular_body'];
- $tags['X-POSTSCRIPT_BODY'] = htmlspecialchars($sendPostscript['postscript_value']);
+ $tags['X-POSTSCRIPT_BODY'] = $sendPostscript['postscript_value'];
$tags['X-POSTSCRIPT_DATE'] = timezone_date($sendPostscript['insert_time'], false, _FULL_DATE_FORMAT);
$tags['X-CIRCULAR_URL'] = BASE_URL. INDEX_FILE_NAME .
'?action=' . DEFAULT_ACTION .
diff --git a/html/webapp/modules/circular/files/css/default/style.css b/html/webapp/modules/circular/files/css/default/style.css
index 290d959..21aae58 100644
--- a/html/webapp/modules/circular/files/css/default/style.css
+++ b/html/webapp/modules/circular/files/css/default/style.css
@@ -120,10 +120,19 @@ div.circular_detail_date {
div.circular_postscript {
margin:10px;
}
-
+
div.circular_postscript textarea {
- width:300px;
- height:100px;
+ height:150px;
+}
+
+div.circular_postscript_mail {
+ width:530px;
+}
+div.circular_postscript_mail input {
+ width:400px;
+}
+div.circular_postscript_mail textarea {
+ width:99%;
}
table.circular_create_frame {
diff --git a/html/webapp/modules/circular/files/js/default/circular.js b/html/webapp/modules/circular/files/js/default/circular.js
index a993137..0c5db31 100644
--- a/html/webapp/modules/circular/files/js/default/circular.js
+++ b/html/webapp/modules/circular/files/js/default/circular.js
@@ -323,6 +323,8 @@ clsCircular.prototype = {
addPostscript: function() {
var form_el = $("postscript_circular_form" + this.id);
+ form_el.postscript_body.value = this.textarea.getTextArea();
+
var viewParams = new Object();
viewParams["action"] = "circular_view_main_postscript_add";
viewParams["circular_id"] = form_el.circular_id.value;
@@ -342,14 +344,15 @@ clsCircular.prototype = {
parameter["callbackfunc"] = function(){
for (i=0; i {X-CIRCULAR_BODY},{X-POSTSCRIPT_BODY}, {X-POSTSCRIPT_DATE},{X-CIRCULAR_URL} at body. Each keywords are converted to [circular body],[postscript body], [postscript_date],[circular_url]." +circular_postscript_setting_note="You can use keywords {X-CIRCULAR_BODY},{X-POSTSCRIPT_BODY}, {X-POSTSCRIPT_DATE},{X-CIRCULAR_URL} at subject and body. Each keywords are converted to [circular body],[postscript body], [postscript_date],[circular_url]." [Circular_View_Main_Postscript_Init -circular_postscript_mail_body="The circular is updated at [{X-POSTSCRIPT_DATE}]. Add postscript Comment {X-POSTSCRIPT_BODY} The circular can be confirmed from the following URL links {X-CIRCULAR_URL}
+circular_postscript_mail_subject = " [{X-SITE_NAME}]【Postscript】{X-CIRCULAR_SUBJECT +circular_postscript_mail_body="The circular is updated at [{X-POSTSCRIPT_DATE}]. {X-POSTSCRIPT_BODY} The circular can be confirmed from the following URL links {X-CIRCULAR_URL}
[Circular_Action_Main_Postscript_Mail]
define:CIRCULAR_MAIL_SUBJECT = " [{X-SITE_NAME}]【Circular Postscript】{X-CIRCULAR_SUBJECT diff --git a/html/webapp/modules/circular/language/english/main.ini b/html/webapp/modules/circular/language/english/main.ini index a7baa01..9466fb5 100644 - a/html/webapp/modules/circular/language/english/main.ini + b/html/webapp/modules/circular/language/english/main.ini @ -88,10 +88,11 @ circular_delete_choice="Choices are deleted." [Circular_View_Main_Create:Circular_View_Main_Postscript_Init circular_mail_notice="yes" circular_mail_notice_no="no" -circular_postscript_setting_note="You can use keywords {X-CIRCULAR_BODY},{X-POSTSCRIPT_BODY}, {X-POSTSCRIPT_DATE},{X-CIRCULAR_URL} at body. Each keywords are converted to [circular body],[postscript body], [postscript_date],[circular_url]." +circular_postscript_setting_note="You can use keywords {X-CIRCULAR_BODY},{X-POSTSCRIPT_BODY}, {X-POSTSCRIPT_DATE},{X-CIRCULAR_URL} at subject and body. Each keywords are converted to [circular body],[postscript body], [postscript_date],[circular_url]." [Circular_View_Main_Postscript_Init -circular_postscript_mail_body="The circular is updated at [{X-POSTSCRIPT_DATE}]. Add postscript Comment {X-POSTSCRIPT_BODY} The circular can be confirmed from the following URL links {X-CIRCULAR_URL}
+circular_postscript_mail_subject = " [{X-SITE_NAME}]【Postscript】{X-CIRCULAR_SUBJECT +circular_postscript_mail_body="The circular is updated at [{X-POSTSCRIPT_DATE}]. {X-POSTSCRIPT_BODY} The circular can be confirmed from the following URL links {X-CIRCULAR_URL}
[Circular_Action_Main_Postscript_Mail]
define:CIRCULAR_MAIL_SUBJECT = " [{X-SITE_NAME}]【Circular Postscript】{X-CIRCULAR_SUBJECT diff --git a/html/webapp/modules/circular/language/japanese/main.ini b/html/webapp/modules/circular/language/japanese/main.ini index 13debf5..6a11205 100644 - a/html/webapp/modules/circular/language/japanese/main.ini + b/html/webapp/modules/circular/language/japanese/main.ini @ -88,10 +88,11 @ circular_delete_choice="選択肢を削除します" [Circular_View_Main_Create:Circular_View_Main_Postscript_Init circular_mail_notice="メールで通知する" circular_mail_notice_no="メールで通知しない" -circular_postscript_setting_note="メールの本文には、 {X-CIRCULAR_BODY}、{X-POSTSCRIPT_BODY}、 {X-POSTSCRIPT_DATE}、{X-CIRCULAR_URL} というキーワードを使用することができます。 それぞれのキーワードは、 回覧内容、追記内容、追記日時、回覧内容確認URL に変換されて送信されます。" +circular_postscript_setting_note="メールの件名と本文には、 {X-SITE_NAME}、{X-CIRCULAR_SUBJECT} {X-CIRCULAR_BODY}、{X-POSTSCRIPT_BODY}、 {X-POSTSCRIPT_DATE}、{X-CIRCULAR_URL} というキーワードを使用することができます。 それぞれのキーワードは、 回覧内容、追記内容、追記日時、回覧内容確認URL に変換されて送信されます。" [Circular_View_Main_Postscript_Init -circular_postscript_mail_body="[{X-POSTSCRIPT_DATE}]に回覧が更新されました。 追加コメント {X-POSTSCRIPT_BODY} 回覧は以下のURLリンクから確認できます。 {X-CIRCULAR_URL}" +circular_postscript_mail_subject="[{X-SITE_NAME}]【回覧追記】{X-CIRCULAR_SUBJECT}" +circular_postscript_mail_body="[{X-POSTSCRIPT_DATE}]に回覧が更新されました。 {X-POSTSCRIPT_BODY} 回覧は以下のURLリンクから確認できます。 {X-CIRCULAR_URL}" [Circular_Action_Main_Postscript_Mail define:CIRCULAR_MAIL_SUBJECT="[{X-SITE_NAME}]【回覧追記】{X-CIRCULAR_SUBJECT}" diff --git a/html/webapp/modules/circular/templates/default/circular_view_main_postscript.html b/html/webapp/modules/circular/templates/default/circular_view_main_postscript.html index 572cd21..85c9d2b 100644 - a/html/webapp/modules/circular/templates/default/circular_view_main_postscript.html + b/html/webapp/modules/circular/templates/default/circular_view_main_postscript.html @ -5,7 +5,7 @>
-
+
@@ -15,10 +15,10 @@
<{$lang.circular_mail_notice_no|smarty:nodefaults}>
-
-
-
-
+
+
+
+
<{$lang.circular_postscript_setting_note|smarty:nodefaults}>
@@ -31,6 +31,7 @@
<{include file="../circular_script.html"}>
<{/strip}>
\ No newline at end of file
diff --git a/html/webapp/modules/circular/templates/default/circular_view_main_postscript_list.html b/html/webapp/modules/circular/templates/default/circular_view_main_postscript_list.html
index f18f6e2..38293c0 100644
--- a/html/webapp/modules/circular/templates/default/circular_view_main_postscript_list.html
+++ b/html/webapp/modules/circular/templates/default/circular_view_main_postscript_list.html
@@ -9,7 +9,7 @@
<{$postscript.insert_user_name}>
-
<{$postscript.postscript_value|nl2br}>
+
<{$postscript.postscript_value|smarty:nodefaults}>
diff --git a/html/webapp/modules/circular/view/main/postscript/init/maple.ini b/html/webapp/modules/circular/view/main/postscript/init/maple.ini
index ce77367..263b757 100644
--- a/html/webapp/modules/circular/view/main/postscript/init/maple.ini
+++ b/html/webapp/modules/circular/view/main/postscript/init/maple.ini
@@ -1,6 +1,10 @@
[TokenExtra]
mode="build"
+[HeaderInc]
+textarea_css = "comp:{$theme_name}/comp_textarea.css"
+titleicon_css = "comp:{$theme_name}/comp_titleicon.css"
+
[View]
define:theme = 1
define:theme_name = "system"
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 3fc93dc..cbe70f3 100644
--- a/html/webapp/modules/common/files/js/prototype.js
+++ b/html/webapp/modules/common/files/js/prototype.js
@@ -217,7 +217,7 @@ Object.extend(String.prototype, {
escapeHTML: function() {
//IEの場合、テキストノードに含まれる\nが空白になってしまうため修正
- return this.replace(/&/g, "&").replace(/"/g, """).replace(//g, ">").replace(/"/g, """).replace(/'/g, "'").replace(/ /g, " ");
+ return String(this).replace(/&/g, "&").replace(/"/g, """).replace(//g, ">").replace(/"/g, """).replace(/'/g, "'").replace(/ /g, " ");
//var div = document.createElement('div');
//var text = document.createTextNode(this);
@@ -227,7 +227,7 @@ Object.extend(String.prototype, {
unescapeHTML: function() {
//escapeHTMLを修正したため、同様に修正
- return this.replace(/"/g,'"').replace(/</g,'<').replace(/>/g,'>').replace(/"/g, '"').replace(/'/g, "'").replace(/'/g, "'").replace(/ /g, " ").replace(/&/g,'&');
+ return String(this).replace(/"/g,'"').replace(/</g,'<').replace(/>/g,'>').replace(/"/g, '"').replace(/'/g, "'").replace(/'/g, "'").replace(/ /g, " ").replace(/&/g,'&');
//var div = document.createElement('div');
//div.innerHTML = this.stripTags();
//return div.childNodes[0] ? (div.childNodes.length > 1 ?
diff --git a/html/webapp/modules/common/templates/operation/common_operation_view_init.html b/html/webapp/modules/common/templates/operation/common_operation_view_init.html
index 058ce4b..e665b48 100644
--- a/html/webapp/modules/common/templates/operation/common_operation_view_init.html
+++ b/html/webapp/modules/common/templates/operation/common_operation_view_init.html
@@ -34,9 +34,9 @@
<{assign var="pages_list" value=$action.pages_list.0.0}>
<{include file="operation/common_operation_view_pageslist.html"}>
-
-
-
+
+
+
<{if $action.headercolumn_page_id != null}>
<{if $action.column_space_type_use == _OFF}>
@@ -53,7 +53,7 @@
<{$lang.header_column|smarty:nodefaults}>
<{if $key == 0}>
- (<{$smarty.const._SPACE_TYPE_NAME_PRIVATE}>)
+ (<{$smarty.const._SPACE_TYPE_NAME_PUBLIC}>)
<{elseif $key == 1}>
(<{$smarty.const._SPACE_TYPE_NAME_PRIVATE}>)
<{elseif $key == 2}>
@@ -65,7 +65,7 @@
<{$lang.left_column|smarty:nodefaults}>
<{if $key == 0}>
- (<{$smarty.const._SPACE_TYPE_NAME_PRIVATE}>)
+ (<{$smarty.const._SPACE_TYPE_NAME_PUBLIC}>)
<{elseif $key == 1}>
(<{$smarty.const._SPACE_TYPE_NAME_PRIVATE}>)
<{elseif $key == 2}>
@@ -77,7 +77,7 @@
<{$lang.right_column|smarty:nodefaults}>
<{if $key == 0}>
- (<{$smarty.const._SPACE_TYPE_NAME_PRIVATE}>)
+ (<{$smarty.const._SPACE_TYPE_NAME_PUBLIC}>)
<{elseif $key == 1}>
(<{$smarty.const._SPACE_TYPE_NAME_PRIVATE}>)
<{elseif $key == 2}>
diff --git a/html/webapp/modules/comp/config/insertamazon/define.inc.php b/html/webapp/modules/comp/config/insertamazon/define.inc.php
index dcde365..1eba106 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_calendar.js b/html/webapp/modules/comp/files/js/comp_calendar.js
index abe7652..6e1a4c6 100644
--- a/html/webapp/modules/comp/files/js/comp_calendar.js
+++ b/html/webapp/modules/comp/files/js/comp_calendar.js
@@ -6,17 +6,17 @@ var calendarComp = Array();
モジュール側のjavascriptクラスから
this.calendar = new compCalendar(id, text_el, options);
@param string top_id
- @param text_el or string text_el_id
+ @param text_el or string text_el_id
text_elの後ろにカレンダーアイコンを挿入する
@param object options
onClickCallback 日付選択時コールバック関数
parentFrame text_elがあるFrame(default:document)
designatedDate 日付指定(20070101のように指定)
日付指定されていれば、テキストエリアの日付に有無にかかわらず優先される
- calendarImgPath カレンダーImgPath(themes/images/icons)
- calendarColorDir カレンダーColorDir(default)
+ calendarImgPath カレンダーImgPath(themes/images/icons)
+ calendarColorDir カレンダーColorDir(default)
calendarImg テキスト横につくカレンダーアイコンimage(style/images/icons/下)
- calendarThemeDir カレンダーCSSの定義ファイルDir(htdocs/css/comp/XXX/comp_calendar.css) default: default
+ calendarThemeDir カレンダーCSSの定義ファイルDir(htdocs/css/comp/XXX/comp_calendar.css) default: default
*/
compCalendar.prototype = {
initialize: function(id, text_el, options) {
@@ -24,7 +24,7 @@ compCalendar.prototype = {
this.popup = null;
this.text_el = null;
this.calendarIcon_el = null;
-
+
this.options = {
onClickCallback: null,
parentFrame: "",
@@ -38,26 +38,26 @@ compCalendar.prototype = {
calendarThemeDir: "default"
};
Object.extend(this.options, options || {});
-
+
// private
this.date = null;
-
+
this.todayYear = null;
this.todayMonth = null;
this.todayDay = null;
-
+
this.selectedYear = null;
this.selectedMonth = null;
this.selectedDay = null;
-
+
this.currentYear = null;
this.currentMonth = null;
this.currentDay = null;
this.currentDate = null;
this.setDesignatedDateFlag = false;
-
+
this.Mdays = {"01":"31", "02":"28", "03":"31", "04":"30", "05":"31", "06":"30", "07":"31", "08":"31", "09":"30", "10":"31", "11":"30", "12":"31"};
-
+
// 1ブロック内に複数、カレンダーコンポーネントを張ってあった場合の対応
var key = id;
var count = 1;
@@ -67,9 +67,9 @@ compCalendar.prototype = {
}
calendarComp[key] = this;
this.key = key;
-
+
////calendarComp[id + this.calendar_classname] = this;
-
+
this._showCalendarImg(text_el);
},
//------------------------------
@@ -86,7 +86,7 @@ compCalendar.prototype = {
this.currentMonth = yyyymmdd.substr(4, 2);
this.currentDay = yyyymmdd.substr(6, 2);
this.currentDate = yyyymmdd;
-
+
var popup_el = this.popup.getPopupElement();
popup_el.contentWindow.document.body.innerHTML = this._render();
this.popup.resize();
@@ -127,7 +127,7 @@ compCalendar.prototype = {
//------------------------------
// カレンダーボタン表示処理
//------------------------------
- _showCalendarImg: function(text_el) {
+ _showCalendarImg: function(text_el) {
if(typeof text_el == 'string') {
if(this.options.parentFrame == "" || this.options.parentFrame == null) {
text_el = $(text_el);
@@ -136,17 +136,17 @@ compCalendar.prototype = {
}
}
if(typeof text_el != 'object') return;
-
+
if(this.options.parentFrame == "" || this.options.parentFrame == null) {
var calendarA_el = document.createElement("a");
var calendarImg_el = document.createElement("img");
} else {
var calendarA_el = this.options.parentFrame.contentWindow.document.createElement("a");
var calendarImg_el = this.options.parentFrame.contentWindow.document.createElement("img");
- }
+ }
calendarA_el.href = "#";
-
- calendarImg_el.src = this.options.calendarImgPath + "/" + this.options.calendarColorDir + "/" + this.options.calendarImg;
+
+ calendarImg_el.src = this.options.calendarImgPath + "/" + this.options.calendarColorDir + "/" + this.options.calendarImg;
Element.addClassName(calendarA_el, "comp_calendar_icon");
if(text_el.tagName.toLowerCase() == 'input' && text_el.type.toLowerCase() == 'text') {
Element.addClassName(text_el, "comp_calendar_text");
@@ -156,13 +156,13 @@ compCalendar.prototype = {
text_el.parentNode.insertBefore(calendarA_el, text_el);
text_el.parentNode.insertBefore(text_el, calendarA_el);
calendarA_el.appendChild(calendarImg_el);
-
- Event.observe(calendarA_el, "click",
+
+ Event.observe(calendarA_el, "click",
function(event){
this._showCalendar();
Event.stop(event);
}.bindAsEventListener(this), false, this.id);
-
+
this.text_el = text_el;
this.calendarIcon_el = calendarA_el;
},
@@ -175,13 +175,13 @@ compCalendar.prototype = {
this.todayYear = this._getFormat(this.date.getFullYear()); //文字列変換
this.todayMonth = this._getFormat(this.date.getMonth() + 1);
this.todayDay = this._getFormat(this.date.getDate());
-
+
if(this.setDesignatedDateFlag == true) {
// 初期化
- this.options.designatedDate = null;
+ this.options.designatedDate = null;
this.setDesignatedDateFlag = false;
}
-
+
if((this.options.designatedDate == null || this.options.designatedDate == "") &&
this.text_el.tagName.toLowerCase() == 'input' && this.text_el.type.toLowerCase() == 'text') {
var sel_date = this.text_el.value;
@@ -197,30 +197,30 @@ compCalendar.prototype = {
}
}
}
-
+
// 指定した日付
if(this.options.designatedDate == null || this.options.designatedDate == "") {
this.selectedYear = null;
this.selectedMonth = null;
this.selectedDay = null;
-
+
this.currentYear = this.todayYear;
this.currentMonth = this.todayMonth;
this.currentDay = "01";
-
+
} else {
this.selectedYear = this.options.designatedDate.substr(0, 4);
this.selectedMonth = this.options.designatedDate.substr(4, 2);
this.selectedDay = this.options.designatedDate.substr(6, 2);
-
+
this.currentYear = this.selectedYear;
this.currentMonth = this.selectedMonth;
this.currentDay = "01";
}
this.currentDate = this.currentYear + this.currentMonth + this.currentDay;
-
+
var html = this._render();
-
+
if(!this.popup) {
this.popup = new compPopup(this.id, "compCalendar");
var new_dir_name ="/comp/"+this.options.calendarThemeDir+"/comp_calendar.css";
@@ -228,7 +228,7 @@ compCalendar.prototype = {
this.popup.addCSSFiles(css_name);
this.popup.observer = function(event) {this._popupClose(); }.bind(this);
//this.popup.loadObserver = function(event) {
- // this.popup.resize();
+ // this.popup.resize();
//}.bind(this);
}
if(this.options.parentFrame) {
@@ -240,7 +240,7 @@ compCalendar.prototype = {
},
_getNextYear: function(yyyy, mm, dd) {
yyyy = valueParseInt(yyyy) + 1;
-
+
// 文字列として連結
return this._getFormat(yyyy) + this._getFormat(mm) + this._getFormat(dd);
},
@@ -248,7 +248,7 @@ compCalendar.prototype = {
yyyy = valueParseInt(yyyy) - 1;
if(yyyy < 1900) {
yyyy = 1900;
- }
+ }
// 文字列として連結
return this._getFormat(yyyy) + this._getFormat(mm) + this._getFormat(dd);
},
@@ -257,7 +257,7 @@ compCalendar.prototype = {
if(mm == 13) {
mm = 1;
yyyy = valueParseInt(yyyy) + 1;
- }
+ }
// 文字列として連結
return this._getFormat(yyyy) + this._getFormat(mm) + this._getFormat(dd);
},
@@ -266,7 +266,7 @@ compCalendar.prototype = {
if(mm <= 0) {
mm = 12;
yyyy = valueParseInt(yyyy) - 1;
- }
+ }
// 文字列として連結
return this._getFormat(yyyy) + this._getFormat(mm) + this._getFormat(dd);
},
@@ -297,10 +297,10 @@ compCalendar.prototype = {
var prev_year = this._getPrevYear(this.currentYear, this.currentMonth, this.currentDay);
var next_month = this._getNextDate(this.currentYear, this.currentMonth, this.currentDay);
var prev_month = this._getPrevDate(this.currentYear, this.currentMonth, this.currentDay);
-
+
var pre_end_date = this._getMonthDays(prev_month.substr(2, 2), prev_month.substr(4, 2));
var end_date = this._getMonthDays(this.currentYear.substr(2, 2), this.currentMonth);
-
+
var start_w = this._getWeekDays(this.currentYear, this.currentMonth, this.currentDay);
if(start_w == 0) {
if(this.options.pre_show_week != 0) {
@@ -310,12 +310,27 @@ compCalendar.prototype = {
}
} else {
var pre_start_date = pre_end_date - 7*this.options.pre_show_week - (start_w - 1);
- }
+ }
var loop_week = valueParseInt(Math.ceil((valueParseInt(end_date) + start_w + 7*this.options.pre_show_week + 7*this.options.next_show_week) / 7));
-
+
var currentMonth = valueParseInt(this.currentMonth);
- if(currentMonth < 10) currentMonth = " " + currentMonth;
- var html =
+ //if(currentMonth < 10) currentMonth = " " + currentMonth;
+ switch (currentMonth) {
+ case 1: currentMonth = compCalendarLang.month_jan; break;
+ case 2: currentMonth = compCalendarLang.month_feb; break;
+ case 3: currentMonth = compCalendarLang.month_mar; break;
+ case 4: currentMonth = compCalendarLang.month_apr; break;
+ case 5: currentMonth = compCalendarLang.month_may; break;
+ case 6: currentMonth = compCalendarLang.month_jun; break;
+ case 7: currentMonth = compCalendarLang.month_jul; break;
+ case 8: currentMonth = compCalendarLang.month_aug; break;
+ case 9: currentMonth = compCalendarLang.month_sep; break;
+ case 10: currentMonth = compCalendarLang.month_oct; break;
+ case 11: currentMonth = compCalendarLang.month_nov; break;
+ case 12: currentMonth = compCalendarLang.month_dec; break;
+ default:
+ }
+ var html =
"" +
"" +
"" +
@@ -324,7 +339,6 @@ compCalendar.prototype = {
compCalendarLang.year +
" " +
currentMonth +
- compCalendarLang.month +
"" +
" " +
"" +
@@ -389,7 +403,7 @@ compCalendar.prototype = {
compCalendarLang.week_sat +
"" +
" ";
-
+
var pre_outside_day = pre_start_date;
var current_day = 1;
var post_end_date = 1;
@@ -445,7 +459,7 @@ compCalendar.prototype = {
}
html += "
" +
"
";
-
+
return html;
},
_popupClose: 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 2d25d4f..02d9af0 100644
--- a/html/webapp/modules/comp/files/js/plugins/comp_textareamain.js
+++ b/html/webapp/modules/comp/files/js/plugins/comp_textareamain.js
@@ -2361,7 +2361,7 @@ compTextareamain.prototype = {
} catch(e){}
}
if(name=="value" || name=="alt" || name=="title") {
- value = value.escapeHTML();
+ value = String(value).escapeHTML();
}
if(name=="style" && value == "")
continue;
diff --git a/html/webapp/modules/comp/language/chinese/textarea.ini b/html/webapp/modules/comp/language/chinese/textarea.ini
index af97c9d..e44d1f3 100644
--- a/html/webapp/modules/comp/language/chinese/textarea.ini
+++ b/html/webapp/modules/comp/language/chinese/textarea.ini
@@ -27,6 +27,13 @@ insert_image_size = "大小"
insert_image_width = "宽度 " ;//Width
insert_image_height = "高度 " ;//Height
+insert_image_resolution_input = "的图片的大小" ;//Resolution of this image
+insert_image_resolution_size_normal = "标准"
+insert_image_resolution_size_asis = "实际的大小"
+insert_image_resolution_size_large = "大"
+insert_image_resolution_size_middle = "中"
+insert_image_resolution_size_small = "小"
+
insert_image_message1 = "请输入图片的URL"
insert_image_message2 = "请在开始时输入图片的URL"
insert_image_message3 = "文件没有被上传。"
diff --git a/html/webapp/modules/comp/language/english/textarea.ini b/html/webapp/modules/comp/language/english/textarea.ini
index 9bccb15..062913f 100644
--- a/html/webapp/modules/comp/language/english/textarea.ini
+++ b/html/webapp/modules/comp/language/english/textarea.ini
@@ -27,6 +27,13 @@ insert_image_size = "大きさ"
insert_image_width = "広さ " ;//Width
insert_image_height = "高さ " ;//Height
+insert_image_resolution_input = "イメージの大きさ" ;//Resolution of this image
+insert_image_resolution_size_normal = "標準"
+insert_image_resolution_size_asis = "実寸大"
+insert_image_resolution_size_large = "大"
+insert_image_resolution_size_middle = "中"
+insert_image_resolution_size_small = "小"
+
insert_image_message1 = "画像のURLを入力してください"
insert_image_message2 = "URLをはじめに入力してください"
insert_image_message3 = "ファイルはアップロードされませんでした。"
diff --git a/html/webapp/modules/comp/language/japanese/textarea.ini b/html/webapp/modules/comp/language/japanese/textarea.ini
index 5155dbb..8ce249f 100644
--- a/html/webapp/modules/comp/language/japanese/textarea.ini
+++ b/html/webapp/modules/comp/language/japanese/textarea.ini
@@ -27,6 +27,13 @@ insert_image_size = "大きさ"
insert_image_width = "広さ " ;//Width
insert_image_height = "高さ " ;//Height
+insert_image_resolution_input = "イメージの大きさ" ;//Resolution of this image
+insert_image_resolution_size_normal = "標準"
+insert_image_resolution_size_asis = "実寸大"
+insert_image_resolution_size_large = "大"
+insert_image_resolution_size_middle = "中"
+insert_image_resolution_size_small = "小"
+
insert_image_message1 = "画像のURLを入力してください"
insert_image_message2 = "URLをはじめに入力してください"
insert_image_message3 = "ファイルはアップロードされませんでした。"
diff --git a/html/webapp/modules/comp/templates/textarea/insert_image.html b/html/webapp/modules/comp/templates/textarea/insert_image.html
index 0836c4c..e58b2fb 100644
--- a/html/webapp/modules/comp/templates/textarea/insert_image.html
+++ b/html/webapp/modules/comp/templates/textarea/insert_image.html
@@ -60,7 +60,7 @@
<{$lang.insert_image_align_absbottom}>
-
+
<{$lang.insert_image_size}>
<{$lang.insert_image_width|smarty:nodefaults}>
@@ -73,6 +73,16 @@
px
+
+ <{$lang.insert_image_size}>
+
+ <{$lang.insert_image_resolution_size_normal}>
+ <{$lang.insert_image_resolution_size_asis}>
+ <{$lang.insert_image_resolution_size_large}>
+ <{$lang.insert_image_resolution_size_middle}>
+ <{$lang.insert_image_resolution_size_small}>
+
+
<{$lang.insert_image_border}>
@@ -228,6 +238,17 @@
}
function changeTabDisplay(tab_name) {
+ <{*// 「大きさ」内容の切り替え *}>
+ var resolution_obj = document.getElementById("resolution_f");
+ var size_obj = document.getElementById("size_f");
+ if(tab_name == "upload_tab") {
+ resolution_obj.style.display = "block";
+ size_obj.style.display = "none";
+ } else {
+ resolution_obj.style.display = "none";
+ size_obj.style.display = "block";
+ }
+
g_tab_name = tab_name;
<{* 詳細移動 *}>
var el = document.getElementById(tab_name+ "_detail");
diff --git a/html/webapp/modules/install/language/japanese/welcome.php b/html/webapp/modules/install/language/japanese/welcome.php
index 190ac84..184068d 100644
--- a/html/webapp/modules/install/language/japanese/welcome.php
+++ b/html/webapp/modules/install/language/japanese/welcome.php
@@ -12,17 +12,17 @@
$content .=
"はじめに
- NetCommonsは、大学共同利用機関法人情報・システム機構 国立情報学研究所が開発したPHPによるオープンソースの情報共有基盤システムです。
-本ソフトウェアの著作権は情報・システム機構およびプログラムを作成した各個人に帰属し、FreeBSDライセンス (参考:日本語訳 )によって公開されています。本ソフトウェアを利用する方は、FreeBSDライセンスの精神をご理解の上、ご利用ください。
+ NetCommonsは、大学共同利用機関法人情報・システム研究機構 国立情報学研究所が開発したPHPによるオープンソースの情報共有基盤システムです。
+本ソフトウェアの著作権は情報・システム研究機構およびプログラムを作成した各個人に帰属し、FreeBSDライセンス (参考:日本語訳 )によって公開されています。本ソフトウェアを利用する方は、FreeBSDライセンスの精神をご理解の上、ご利用ください。
本ソフトウェアはソースコード形式であれバイナリ形式であれ、変更の有無に関わらず、以下の条件を満たす限りにおいて、再配布および使用を許可します:
ソースコード形式で再配布する場合、上記著作権表示、本条件書および下記責任限定規定を必ず含めてください。
バイナリ形式で再配布する場合、上記著作権表示、本条件書および下記責任限定規定を、配布物とともに提供される文書 および/または他の資料に必ず含めてください。
- 本ソフトウェアは国立情報学研究所NetCommons PROJECT によって、”現状のまま” 提供されるものとします。本ソフトウェアについては、明示黙示を問わず、商用品として通常そなえるべき品質をそなえているとの保証も、特定の目的に適合するとの保証を含め、何の保証もなされません。 事由のいかんを問わず、損害発生の原因いかんを問わず、且つ、 責任の根拠が契約であるか厳格責任であるか (過失その他) 不法行為であるかを問わず、 情報・システム研究機構、国立情報学研究所、NetCommons PROJECTおよび寄与者も、仮にそのような損害が発生する可能性を知らされていたとしても、本ソフトウェアの使用から発生した直接損害、間接損害、偶発的な損害、特別損害、懲罰的損害または結果損害のいずれに対しても (代替品または サービスの提供; 使用機会、データまたは利益の損失の補償; または、業務の中断に対する補償を含め) 責任をいっさい負いません。
+ 本ソフトウェアは国立情報学研究所NetCommons PROJECT によって、“現状のまま” 提供されるものとします。本ソフトウェアについては、明示黙示を問わず、商用品として通常そなえるべき品質をそなえているとの保証も、特定の目的に適合するとの保証を含め、何の保証もなされません。 事由のいかんを問わず、損害発生の原因いかんを問わず、且つ、 責任の根拠が契約であるか厳格責任であるか (過失その他) 不法行為であるかを問わず、 情報・システム研究機構、国立情報学研究所、NetCommons PROJECTおよび寄与者も、仮にそのような損害が発生する可能性を知らされていたとしても、本ソフトウェアの使用から発生した直接損害、間接損害、偶発的な損害、特別損害、懲罰的損害または結果損害のいずれに対しても (代替品または サービスの提供; 使用機会、データまたは利益の損失の補償; または、業務の中断に対する補償を含め) 責任をいっさい負いません。
- 本ソフトウェアの名称である「NetCommons」およびロゴは大学共同利用機関法人情報・システム機構の知的財産として商標登録されています。商標「NetCommons」の利用を希望される場合には、大学共同利用機関法人情報・システム機構 国立情報学研究所(郵便番号101-8430 東京都千代田区一ツ橋2-1-2)までお問い合わせください。
+ 本ソフトウェアの名称である「NetCommons」およびロゴは大学共同利用機関法人情報・システム研究機構の知的財産として商標登録されています。商標「NetCommons」の利用を希望される場合には、大学共同利用機関法人情報・システム研究機構 国立情報学研究所(郵便番号101-8430 東京都千代田区一ツ橋2-1-2)までお問い合わせください。
必要なソフトウエア
diff --git a/html/webapp/modules/install/sql/mysql/table.sql b/html/webapp/modules/install/sql/mysql/table.sql
index 8c583b7..e5ad4d5 100644
--- a/html/webapp/modules/install/sql/mysql/table.sql
+++ b/html/webapp/modules/install/sql/mysql/table.sql
@@ -199,7 +199,7 @@ CREATE TABLE `users_items_link` (
`content` text,
PRIMARY KEY (`user_id`,`item_id`),
KEY `item_id` (`item_id`,`email_reception_flag`),
- FULLTEXT KEY `content` (`content`)
+ KEY `content` (`content`(255))
) ENGINE=MyISAM;
-- -
diff --git a/html/webapp/modules/journal/components/View.class.php b/html/webapp/modules/journal/components/View.class.php
index d7b8f6c..af3afe3 100644
--- a/html/webapp/modules/journal/components/View.class.php
+++ b/html/webapp/modules/journal/components/View.class.php
@@ -593,11 +593,7 @@ function getPostDetailData($post_id) {
$sql_common .= "WHERE P.root_id = 0 AND P.parent_id = 0 AND P.journal_id = ".$post[0]['journal_id']." ";
$sql_common .= $this->_getAuthorityWhereSQL($params);
- $where_params = array(
- "P.journal_date <= ".$post[0]['journal_date'] => null,
- "P.post_id < ".$post[0]['post_id'] => null
- );
- $sql_where = $this->_db->getWhereSQL($params, $where_params, false);
+ $sql_where = " AND (P.journal_date < '".$post[0]['journal_date']."' OR P.journal_date = '".$post[0]['journal_date']."' AND P.post_id < ".$post[0]['post_id'].")";
$sql_order = " ORDER BY P.journal_date DESC, P.post_id DESC";
$sql = $sql_common.$sql_where.$sql_order;
@@ -609,11 +605,7 @@ function getPostDetailData($post_id) {
$post[0]['older_post_id'] = empty($result) ? "":$result[0]['post_id'];
$post[0]['older_short_url'] = empty($result) ? "":$result[0]['short_url'];
- $where_params = array(
- "P.journal_date >= ".$post[0]['journal_date'] => null,
- "P.post_id > ".$post[0]['post_id'] => null
- );
- $sql_where = $this->_db->getWhereSQL($params, $where_params, false);
+ $sql_where = " AND (P.journal_date > '".$post[0]['journal_date']."' OR P.journal_date = '".$post[0]['journal_date']."' AND P.post_id > ".$post[0]['post_id'].")";
$sql_order = " ORDER BY P.journal_date ASC, P.post_id ASC";
$sql = $sql_common.$sql_where.$sql_order;
diff --git a/html/webapp/modules/journal/files/css/default/style.css b/html/webapp/modules/journal/files/css/default/style.css
index d9d5d5f..ede713e 100644
--- a/html/webapp/modules/journal/files/css/default/style.css
+++ b/html/webapp/modules/journal/files/css/default/style.css
@@ -40,7 +40,6 @@
vertical-align:middle;
border-right:medium none;
font-weight:bold;
- white-space:nowrap;
}
.journal_list_title_h {
padding-top: 5px;
@@ -56,7 +55,6 @@
border-left:medium none;
padding-left:30px;
text-align:right;
- white-space:nowrap;
}
.journal_list_bottom {
diff --git a/html/webapp/modules/journal/install.ini b/html/webapp/modules/journal/install.ini
index 33f46a0..5453878 100644
--- a/html/webapp/modules/journal/install.ini
+++ b/html/webapp/modules/journal/install.ini
@@ -1,4 +1,4 @@
-version = "2.4.0.0"
+version = "2.4.0.1"
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/templates/default/journal_mobile_detail_feature.html b/html/webapp/modules/journal/templates/default/journal_mobile_detail_feature.html
index e4ce9ee..4bbf579 100644
--- a/html/webapp/modules/journal/templates/default/journal_mobile_detail_feature.html
+++ b/html/webapp/modules/journal/templates/default/journal_mobile_detail_feature.html
@@ -54,7 +54,7 @@
<{/if}>
<{if ($action.journal_obj.comment_flag == $smarty.const._ON) }>
-
+
<{$lang.journal_comment|smarty:nodefaults}>(<{$action.post.comment_count}>)
<{/if}>
diff --git a/html/webapp/modules/journal/templates/default/journal_mobile_detail_smart.html b/html/webapp/modules/journal/templates/default/journal_mobile_detail_smart.html
index b1c1e7b..2c3ddf7 100644
--- a/html/webapp/modules/journal/templates/default/journal_mobile_detail_smart.html
+++ b/html/webapp/modules/journal/templates/default/journal_mobile_detail_smart.html
@@ -21,7 +21,7 @@ <{$action.post.more_title}>
<{/if}>
<{$lang.journal_mobile_er_post_empty|smarty:nodefaults}>
<{if ($action.journal_obj.comment_flag == $smarty.const._ON) }>
-
+
<{$lang.journal_comment|smarty:nodefaults}>(<{$action.post.comment_count}>)
<{/if}>
diff --git a/html/webapp/modules/journal/view/main/detail/Detail.class.php b/html/webapp/modules/journal/view/main/detail/Detail.class.php
index 79a888d..02ada56 100644
--- a/html/webapp/modules/journal/view/main/detail/Detail.class.php
+++ b/html/webapp/modules/journal/view/main/detail/Detail.class.php
@@ -1,90 +1,91 @@
-session->getParameter("_mobile_flag");
-
- $this->trackback_url = BASE_URL. INDEX_FILE_NAME.
- "?action=".JOURNAL_DEFAULT_TRACKBACK_URL.
- "&post_id=". $this->post_id;
-
- $this->category = $this->journalView->getCatByPostId($this->post_id);
-
- if ($mobile_flag == _OFF || ($this->journal_obj['comment_flag'] == _ON && $this->comment_flag == _ON)) {
- $this->comments = $this->journalView->getChildDetail($this->post_id);
- if($this->comments === false) {
- return 'error';
- }
- }
-
- if($mobile_flag == _OFF || $this->trackback_flag == _ON) {
- $this->trackbacks = $this->journalView->getChildDetail($this->post_id, JOURNAL_TRACKBACK_RECEIVE);
- if($this->trackbacks === false) {
- return 'error';
- }
- }
- // タイトル設定
- if(isset($this->active_action) || isset($this->active_center)) {
- $this->session->setParameter("_page_title", $this->post['title']);
- }
-
- if ($mobile_flag == _ON ) {
- if( $this->comment_flag == _ON) {
- return 'comment';
- }
- else {
- $this->html_flag = $this->mobileView->getTextHtmlMode( $this->html_flag );
- return 'success';
- }
- } else {
- return 'success';
- }
- }
-}
+session->getParameter("_mobile_flag");
+
+ $this->trackback_url = BASE_URL. INDEX_FILE_NAME.
+ "?action=".JOURNAL_DEFAULT_TRACKBACK_URL.
+ "&post_id=". $this->post_id;
+
+ $this->category = $this->journalView->getCatByPostId($this->post_id);
+
+ if ($mobile_flag == _OFF || ($this->journal_obj['comment_flag'] == _ON && $this->mobile_comment_flag == _ON)) {
+ $this->comments = $this->journalView->getChildDetail($this->post_id);
+ if($this->comments === false) {
+ return 'error';
+ }
+ }
+
+ if($mobile_flag == _OFF || $this->trackback_flag == _ON) {
+ $this->trackbacks = $this->journalView->getChildDetail($this->post_id, JOURNAL_TRACKBACK_RECEIVE);
+ if($this->trackbacks === false) {
+ return 'error';
+ }
+ }
+ // タイトル設定
+ if(isset($this->active_action) || isset($this->active_center)) {
+ $this->session->setParameter("_page_title", $this->post['title']);
+ }
+
+ if ($mobile_flag == _ON ) {
+ if( $this->mobile_comment_flag == _ON) {
+ return 'comment';
+ }
+ else {
+ $this->html_flag = $this->mobileView->getTextHtmlMode( $this->html_flag );
+ return 'success';
+ }
+ } else {
+ return 'success';
+ }
+ }
+}
?>
\ No newline at end of file
diff --git a/html/webapp/modules/linklist/components/View.class.php b/html/webapp/modules/linklist/components/View.class.php
index 75d5c7e..14e4807 100644
--- a/html/webapp/modules/linklist/components/View.class.php
+++ b/html/webapp/modules/linklist/components/View.class.php
@@ -170,7 +170,7 @@ function &getLinklists()
function &_getMarkStyle($mark)
{
if(preg_match("/[.gif|.jpg|.png|bmp]$/i", $mark)) {
- $style = "list-style-image:url('".CORE_BASE_URL."/images/common/mark/". $mark. "');";
+ $style = "list-style-image:url('".get_image_url()."/images/common/mark/". $mark. "');";
} else {
$style = "list-style-type:". $mark. ";";
}
diff --git a/html/webapp/modules/linklist/install.ini b/html/webapp/modules/linklist/install.ini
index 637ad0e..11aa85e 100644
--- a/html/webapp/modules/linklist/install.ini
+++ b/html/webapp/modules/linklist/install.ini
@@ -1,4 +1,4 @@
-version = "2.4.0.0"
+version = "2.4.0.1"
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/linklist/templates/default/linklist_view_edit_style.html b/html/webapp/modules/linklist/templates/default/linklist_view_edit_style.html
index 85d0b13..173ec98 100644
--- a/html/webapp/modules/linklist/templates/default/linklist_view_edit_style.html
+++ b/html/webapp/modules/linklist/templates/default/linklist_view_edit_style.html
@@ -50,10 +50,10 @@
<{$lang.linklist_target_blank_flag_on|smarty:nodefaults}>
-
+
-
-
+
+
<{$lang.linklist_view_count_flag|smarty:nodefaults}>
@@ -65,9 +65,9 @@
<{$lang.linklist_view_count_flag_on|smarty:nodefaults}>
-
+
- <{* TODO:タブで次のエレメント、PgUp,PgDnで選択できるように修正すること *}>
+ <{* TODO:タブで次のエレメント、PgUp,PgDnで選択できるように修正すること *}>
@@ -144,6 +144,7 @@
<{/strip}>
\ No newline at end of file
diff --git a/html/webapp/modules/login/action/main/autoregist/Autoregist.class.php b/html/webapp/modules/login/action/main/autoregist/Autoregist.class.php
index 1c39960..15251fb 100644
--- a/html/webapp/modules/login/action/main/autoregist/Autoregist.class.php
+++ b/html/webapp/modules/login/action/main/autoregist/Autoregist.class.php
@@ -14,8 +14,8 @@
*/
class Login_Action_Main_Autoregist extends Action
{
- // リクエストパラメータを受け取るため
- var $items = null;
+ // リクエストパラメータを受け取るため
+ var $items = null;
var $items_public = null;
var $items_reception = null;
//var $files = null;
@@ -28,37 +28,37 @@ class Login_Action_Main_Autoregist extends Action
var $filelist = null;
var $config = null;
- // 使用コンポーネントを受け取るため
- var $pagesView = null;
- var $usersView = null;
- var $pagesAction = null;
- var $usersAction = null;
- var $configView = null;
- var $db = null;
- var $uploadsAction = null;
- var $actionChain = null;
- var $monthlynumberAction = null;
- var $fileUpload = null;
- var $timezoneMain = null;
- var $mailMain = null;
- var $session = null;
- var $authoritiesView = null;
- var $blocksAction = null;
-
- // 値をセットするため
- var $error_flag = true;
- var $post_mail_body = "";
- //var $_attachment_list = null;
- var $use_ssl = 0;
-
- /**
- * 会員受付登録
- *
- * @access public
- */
- function execute()
- {
- // ----------------------------------------------------------------------
+ // 使用コンポーネントを受け取るため
+ var $pagesView = null;
+ var $usersView = null;
+ var $pagesAction = null;
+ var $usersAction = null;
+ var $configView = null;
+ var $db = null;
+ var $uploadsAction = null;
+ var $actionChain = null;
+ var $monthlynumberAction = null;
+ var $fileUpload = null;
+ var $timezoneMain = null;
+ var $mailMain = null;
+ var $session = null;
+ var $authoritiesView = null;
+ var $blocksAction = null;
+
+ // 値をセットするため
+ var $error_flag = true;
+ var $post_mail_body = "";
+ //var $_attachment_list = null;
+ var $use_ssl = 0;
+
+ /**
+ * 会員受付登録
+ *
+ * @access public
+ */
+ function execute()
+ {
+ // ----------------------------------------------------------------------
// --- 基本項目(usersテーブル) ---
// ----------------------------------------------------------------------
if($this->autoregist_approver == _AUTOREGIST_SELF) {
@@ -148,7 +148,7 @@ function execute()
if($item['type'] == "radio" || $item['type'] == "checkbox" ||
$item['type'] == "select") {
if(is_array($this->items[$item_id])) {
- $users_items_link[$item_id]['content'] = implode("|", $this->items[$item_id]);
+ $users_items_link[$item_id]['content'] = implode("|", $this->items[$item_id]) . '|';
$post_mail_body = "";
foreach ($this->items[$item_id] as $i=>$choice) {
if (defined($choice)) {
@@ -196,11 +196,11 @@ function execute()
// ----------------------------------------------------------------------
//$email = "";
$email_arr = array();
- foreach($users_items_link as $item_id => $users_item_link) {
- //$users_item_link[]
- // users_items_linkが変更ないか、users_items_linkがなく初期値であれば
- if($users_items_link_flag_arr[$item_id] == true) {
- if(($users_items_link[$item_id]['content'] == '' &&
+ foreach($users_items_link as $item_id => $users_item_link) {
+ //$users_item_link[]
+ // users_items_linkが変更ないか、users_items_linkがなく初期値であれば
+ if($users_items_link_flag_arr[$item_id] == true) {
+ if(($users_items_link[$item_id]['content'] == '' &&
$users_items_link[$item_id]['public_flag'] == _OFF &&
$users_items_link[$item_id]['email_reception_flag'] == _OFF
)) {
@@ -211,14 +211,14 @@ function execute()
// 新規追加
$users_item_link['user_id'] = $new_user_id;
- $content = $users_item_link['content'];
+ $content = $users_item_link['content'];
- $result = $this->usersAction->insUserItemLink($users_item_link);
- if($result === false) return 'error';
+ $result = $this->usersAction->insUserItemLink($users_item_link);
+ if($result === false) return 'error';
- if($this->show_items[$item_id]['type'] == "file") {
- // アバターの画像のunique_id セット
- $upload_id = $this->filelist[$item_id]['upload_id'];
+ if($this->show_items[$item_id]['type'] == "file") {
+ // アバターの画像のunique_id セット
+ $upload_id = $this->filelist[$item_id]['upload_id'];
$upload_params = array(
"unique_id" => $new_user_id
);
@@ -227,25 +227,25 @@ function execute()
);
$upload_result = $this->uploadsAction->updUploads($upload_params, $upload_where_params);
if ($upload_result === false) return 'error';
- //} else if($this->show_items[$item_id]['tag_name'] == "email") {
- } else if($this->show_items[$item_id]['type'] == "email" || $this->show_items[$item_id]['type'] == "mobile_email") {
- $email_arr[] = $content;
- }
+ //} else if($this->show_items[$item_id]['tag_name'] == "email") {
+ } else if($this->show_items[$item_id]['type'] == "email" || $this->show_items[$item_id]['type'] == "mobile_email") {
+ $email_arr[] = $content;
+ }
}
- }
- $authoritiy = $this->authoritiesView->getAuthorityById(intval($this->autoregist_author));
- if($authoritiy !== false && $authoritiy['myroom_use_flag'] == _ON) {
- $myroom_display_flag = _ON;
- } else {
- $myroom_display_flag = _PAGES_DISPLAY_FLAG_DISABLED;
- }
-
- if($this->autoregist_defroom == _OFF) {
- // ----------------------------------------------------------------------
- // ---参加ルーム(pages_users_link登録) ---
+ }
+ $authoritiy = $this->authoritiesView->getAuthorityById(intval($this->autoregist_author));
+ if($authoritiy !== false && $authoritiy['myroom_use_flag'] == _ON) {
+ $myroom_display_flag = _ON;
+ } else {
+ $myroom_display_flag = _PAGES_DISPLAY_FLAG_DISABLED;
+ }
+
+ if($this->autoregist_defroom == _OFF) {
+ // ----------------------------------------------------------------------
+ // ---参加ルーム(pages_users_link登録) ---
// ----------------------------------------------------------------------
// 自動登録時にデフォルトのルームに参加するかどうか
- // 参加させない場合、不参加で登録する
+ // 参加させない場合、不参加で登録する
$where_params = array(
"default_entry_flag" => _ON,
@@ -259,21 +259,21 @@ function execute()
foreach($pages as $page) {
// 不参加として登録
$params = array(
- "room_id" => $page['page_id'],
- "user_id" => $new_user_id,
- "role_authority_id" => _ROLE_AUTH_OTHER,
- "createroom_flag" => _OFF
- );
+ "room_id" => $page['page_id'],
+ "user_id" => $new_user_id,
+ "role_authority_id" => _ROLE_AUTH_OTHER,
+ "createroom_flag" => _OFF
+ );
$result = $this->pagesAction->insPageUsersLink($params);
- if ($result === false) return 'error';
+ if ($result === false) return 'error';
}
- } else {
- // ----------------------------------------------------------------------
- // ---参加ルーム(pages_users_link登録) ---
+ } else {
+ // ----------------------------------------------------------------------
+ // ---参加ルーム(pages_users_link登録) ---
// ----------------------------------------------------------------------
// 自動登録時にデフォルトのルームに参加し、デフォルトの参加が一般で、登録会員のベース権限がゲスト権限の場合、
// ゲストとして参加させる必要がある。
- if($authoritiy !== false && $authoritiy['user_authority_id'] == _AUTH_GUEST) {
+ if($authoritiy !== false && $authoritiy['user_authority_id'] == _AUTH_GUEST) {
// ゲストとして登録
$where_params = null;
//$this->session->getParameter("_default_entry_auth_private")
@@ -308,22 +308,22 @@ function execute()
}
foreach($pages as $page) {
$params = array(
- "room_id" => $page['page_id'],
- "user_id" => $new_user_id,
- "role_authority_id" => _ROLE_AUTH_GUEST,
- "createroom_flag" => _OFF
- );
+ "room_id" => $page['page_id'],
+ "user_id" => $new_user_id,
+ "role_authority_id" => _ROLE_AUTH_GUEST,
+ "createroom_flag" => _OFF
+ );
$result = $this->pagesAction->insPageUsersLink($params);
- if ($result === false) return 'error';
+ if ($result === false) return 'error';
}
}
}
- }
+ }
- // ----------------------------------------------------------------------
+ // ----------------------------------------------------------------------
// --- プライベートスペース作成 ---
// ----------------------------------------------------------------------
- //権限テーブルのmyroom_use_flagにかかわらずプライベートスペース作成
+ //権限テーブルのmyroom_use_flagにかかわらずプライベートスペース作成
//
// ページテーブル追加
@@ -356,31 +356,31 @@ function execute()
//}
$permalink_handle = preg_replace(_PERMALINK_PROHIBITION, _PERMALINK_PROHIBITION_REPLACE, $handle);
if(_PERMALINK_PRIVATE_PREFIX_NAME != '') {
- $permalink = _PERMALINK_PRIVATE_PREFIX_NAME.'/'.$permalink_handle;
- } else {
- $permalink = $permalink_handle;
- }
- $permalink = $this->pagesAction->getRenamePermaLink($permalink);
+ $permalink = _PERMALINK_PRIVATE_PREFIX_NAME.'/'.$permalink_handle;
+ } else {
+ $permalink = $permalink_handle;
+ }
+ $permalink = $this->pagesAction->getRenamePermaLink($permalink);
$params = array(
- "site_id" => $this->session->getParameter("_site_id"),
- "root_id" => 0,
- "parent_id" => 0,
- "thread_num" => 0,
- "display_sequence" => $display_sequence,
- "action_name" => DEFAULT_ACTION,
- "parameters" => "",
- "page_name" => $private_space_name,
- "permalink" => $permalink,
- "show_count" => 0,
- "private_flag" => _ON,
- "default_entry_flag" => $default_entry_flag,
- "space_type" => _SPACE_TYPE_GROUP,
- "node_flag" => _ON,
- "shortcut_flag" => _OFF,
- "copyprotect_flag" => _OFF,
- "display_scope" => _DISPLAY_SCOPE_NONE,
- "display_position" => _DISPLAY_POSITION_CENTER,
- "display_flag" => $myroom_display_flag,
+ "site_id" => $this->session->getParameter("_site_id"),
+ "root_id" => 0,
+ "parent_id" => 0,
+ "thread_num" => 0,
+ "display_sequence" => $display_sequence,
+ "action_name" => DEFAULT_ACTION,
+ "parameters" => "",
+ "page_name" => $private_space_name,
+ "permalink" => $permalink,
+ "show_count" => 0,
+ "private_flag" => _ON,
+ "default_entry_flag" => $default_entry_flag,
+ "space_type" => _SPACE_TYPE_GROUP,
+ "node_flag" => _ON,
+ "shortcut_flag" => _OFF,
+ "copyprotect_flag" => _OFF,
+ "display_scope" => _DISPLAY_SCOPE_NONE,
+ "display_position" => _DISPLAY_POSITION_CENTER,
+ "display_flag" => $myroom_display_flag,
"insert_time" =>$time,
"insert_site_id" => $this->session->getParameter("_site_id"),
"insert_user_id" => $new_user_id,
@@ -389,10 +389,10 @@ function execute()
"update_site_id" => $this->session->getParameter("_site_id"),
"update_user_id" => $new_user_id,
"update_user_name" => $user["handle"]
- );
- $private_page_id = $this->pagesAction->insPage($params, true, false);
- if ($private_page_id === false) return 'error';
- //
+ );
+ $private_page_id = $this->pagesAction->insPage($params, true, false);
+ if ($private_page_id === false) return 'error';
+ //
// ページユーザリンクテーブル追加
//
$params = array(
@@ -402,10 +402,10 @@ function execute()
"createroom_flag" => _OFF
);
$result = $this->pagesAction->insPageUsersLink($params);
- if ($result === false) return 'error';
+ if ($result === false) return 'error';
- // ----------------------------------------------------------------------
- // --- 月別アクセス回数初期値登録 ---
+ // ----------------------------------------------------------------------
+ // --- 月別アクセス回数初期値登録 ---
// ----------------------------------------------------------------------
$name = "_hit_number";
$time = timezone_date();
@@ -422,19 +422,19 @@ function execute()
);
$result = $this->monthlynumberAction->insMonthlynumber($params);
if($result === false) {
- return 'error';
- }
+ return 'error';
+ }
- // ----------------------------------------------------------------------
- // --- 初期ページ追加 ---
+ // ----------------------------------------------------------------------
+ // --- 初期ページ追加 ---
// ----------------------------------------------------------------------
$result = $this->blocksAction->defaultPrivateRoomInsert($private_page_id, $new_user_id, $handle);
if($result === false) {
- return 'error';
- }
+ return 'error';
+ }
- // ----------------------------------------------------------------------
- // --- マイポータル作成 ---
+ // ----------------------------------------------------------------------
+ // --- マイポータル作成 ---
// ----------------------------------------------------------------------
if($config['open_private_space']['conf_value'] == _OPEN_PRIVATE_SPACE_MYPORTAL_GROUP ||
$config['open_private_space']['conf_value'] == _OPEN_PRIVATE_SPACE_MYPORTAL_PUBLIC) {
@@ -467,38 +467,38 @@ function execute()
//
$pages_params['page_name'] = $user["handle"];
if(_PERMALINK_MYPORTAL_PREFIX_NAME != '') {
- $permalink = _PERMALINK_MYPORTAL_PREFIX_NAME.'/'.$permalink_handle;
- } else {
- $permalink = $permalink_handle;
- }
- $permalink = $this->pagesAction->getRenamePermaLink($permalink);
- $pages_params['permalink'] = $permalink;
+ $permalink = _PERMALINK_MYPORTAL_PREFIX_NAME.'/'.$permalink_handle;
+ } else {
+ $permalink = $permalink_handle;
+ }
+ $permalink = $this->pagesAction->getRenamePermaLink($permalink);
+ $pages_params['permalink'] = $permalink;
$pages_params['default_entry_flag'] = _ON;
$pages_params['display_flag'] = $display_flag;
$pages_params['display_sequence'] = $display_sequence;
$private_page_id = $this->pagesAction->insPage($pages_params, true, false);
- if ($private_page_id === false) return 'error';
+ if ($private_page_id === false) return 'error';
- //
+ //
// ページユーザリンクテーブル追加
//
$pages_users_link_params['room_id'] = $private_page_id;
$result = $this->pagesAction->insPageUsersLink($pages_users_link_params);
- if ($result === false) return 'error';
+ if ($result === false) return 'error';
//
// 月別アクセス回数初期値登録
//
$monthlynumber_params['room_id'] = $private_page_id;
$result = $this->monthlynumberAction->insMonthlynumber($monthlynumber_params);
- if($result === false) {
- return 'error';
- }
+ if($result === false) {
+ return 'error';
+ }
}
- // ----------------------------------------------------------------------
- // --- メール送信処理 ---
+ // ----------------------------------------------------------------------
+ // --- メール送信処理 ---
// ----------------------------------------------------------------------
if($mail_autoregist_subject == "" || count($email_arr) == 0) {
$this->error_flag = false;
@@ -536,13 +536,13 @@ function execute()
$this->mailMain->send();
- $this->error_flag = false;
+ $this->error_flag = false;
return 'success';
- }
+ }
- /**
+ /**
* アクティベーションキーを取得
*
* @param string $length 生成するアクティベーションキーの桁数
diff --git a/html/webapp/modules/login/action/main/forgetpass/maple.ini b/html/webapp/modules/login/action/main/forgetpass/maple.ini
index c9e8669..b4ad834 100644
--- a/html/webapp/modules/login/action/main/forgetpass/maple.ini
+++ b/html/webapp/modules/login/action/main/forgetpass/maple.ini
@@ -1,5 +1,6 @@
[SmartyAssign]
module = main.ini
+global_config = user.ini
[ValidateDef]
email.required ="1:lang._required,lang.login_email"
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
index 496ea5b..19ee237 100644
--- a/html/webapp/modules/login/install.ini
+++ b/html/webapp/modules/login/install.ini
@@ -1,4 +1,4 @@
-version = "2.4.0.0"
+version = "2.4.0.2"
action_name="login_view_main_init"
[Mobile]
diff --git a/html/webapp/modules/login/validator/Validator_Forgetpass.class.php b/html/webapp/modules/login/validator/Validator_Forgetpass.class.php
index 21c7a11..0e70db5 100644
--- a/html/webapp/modules/login/validator/Validator_Forgetpass.class.php
+++ b/html/webapp/modules/login/validator/Validator_Forgetpass.class.php
@@ -15,112 +15,72 @@
*/
class Login_Validator_Forgetpass extends Validator
{
- /**
- * validate実行
- *
- * @param mixed $attributes チェックする値(emai, code_date)
- *
- * @param string $errStr エラー文字列(未使用:エラーメッセージ固定)
- * @param array $params オプション引数
- * @return string エラー文字列(エラーの場合)
- * @access public
- */
- function validate($attributes, $errStr, $params)
- {
- // container取得
+ /**
+ * validate実行
+ *
+ * @param mixed $attributes チェックする値(emai, code_date)
+ *
+ * @param string $errStr エラー文字列(未使用:エラーメッセージ固定)
+ * @param array $params オプション引数
+ * @return string エラー文字列(エラーの場合)
+ * @access public
+ */
+ function validate($attributes, $errStr, $params)
+ {
+ // container取得
$container =& DIContainerFactory::getContainer();
- $session =& $container->getComponent("Session");
+ $session =& $container->getComponent("Session");
$usersView =& $container->getComponent("usersView");
$db =& $container->getComponent("DbObject");
- //$user_id = $session->getParameter("_user_id");
-
- $email = $attributes[0];
- $code_date = $attributes[1];
- $login_forgetpass_count = $session->getParameter("login_forgetpass_count");
- if(isset($login_forgetpass_count) && $login_forgetpass_count >= 3) {
- // 入力を受け付けない
- return LOGIN_MISS_EMAIL;
- }
+ $email = preg_replace("/[ \s]+/u", "", $attributes[0]);
+ $code_date = $attributes[1];
+ $login_forgetpass_count = $session->getParameter("login_forgetpass_count");
+ if(isset($login_forgetpass_count) && $login_forgetpass_count >= 3) {
+ // 入力を受け付けない
+ return LOGIN_MISS_EMAIL;
+ }
// 入力文字チェック
if ( $email != "" && !strpos($email, "@") ) {
return sprintf(_FORMAT_WRONG_ERROR, "e-mail");
}
// 存在チェック
- if($email != "") {
- $sql = "SELECT item_id, type FROM {items}".
- " WHERE ({items}.type='email' OR {items}.type='mobile_email')";
- $email_items = $db->execute($sql);
- if(count($email_items) > 0) {
- $sql = "SELECT {users_items_link}.user_id, {users_items_link}.item_id, {users_items_link}.content".
- " FROM {users_items_link}".
- " INNER JOIN {users} ON {users}.user_id={users_items_link}.user_id AND {users}.active_flag="._USER_ACTIVE_FLAG_ON.
- " WHERE {users_items_link}.item_id IN (";
- $first = true;
- $types = array();
- foreach($email_items as $email_item) {
- if($first == false)
- $sql .= ",";
- $sql .= $email_item['item_id'];
- $types[$email_item['item_id']] = $email_item['type'];
- $first = false;
- }
- $where_params = array();
- if (mb_strlen($email) < _MYSQL_FT_MIN_WORD_LEN) {
- $sql .= ")".
- " AND {users_items_link}.content=? ";
- $where_params = array(
- "{users_items_link}.content" => $email
- );
- } else {
- //$sql .= ")".
- // " AND MATCH({users_items_link}.content) AGAINST ('\"".$db->stringMatchAgainst($email)."\"' IN BOOLEAN MODE)";
- $sql .= ")".
- " AND MATCH({users_items_link}.content) AGAINST (? IN BOOLEAN MODE)";
- $where_params = array(
- "{users_items_link}.content" => '"'.$email.'"'
- );
- }
- $chk_items =& $db->execute($sql, $where_params);
- $count = !empty($chk_items) ? count($chk_items) : 0;
+ $userIdByMail = $usersView->getUserIdByMail($email, true);
+ if (empty($userIdByMail)) {
+ if(!isset($login_forgetpass_count) || !is_int($login_forgetpass_count)) {
+ $login_forgetpass_count = 1;
+ } else {
+ $login_forgetpass_count++;
}
+ $session->setParameter("login_forgetpass_count", $login_forgetpass_count);
+ if($login_forgetpass_count >= 3) {
+ //3回目以降
+ return LOGIN_MISS_EMAIL;
+ } else {
+ return LOGIN_INCORRECT_EMAIL;
+ }
+ }
- if(count($email_items) == 0 || !isset($chk_items[0]['user_id'])) {
- // 存在しない
- if(!isset($login_forgetpass_count) || !is_int($login_forgetpass_count)) {
- $login_forgetpass_count = 1;
- } else {
- $login_forgetpass_count++;
- }
- $session->setParameter("login_forgetpass_count", $login_forgetpass_count);
- if($login_forgetpass_count >= 3) {
- //3回目以降
- return LOGIN_MISS_EMAIL;
- } else {
- return LOGIN_INCORRECT_EMAIL;
- }
- }
- // 存在しているものでも何度も送信されるのを防ぐ必要があるかも
- // 現状、処理しない
- $user =& $usersView->getUserById($chk_items[0]['user_id']);
- if($user === false || !isset($user['user_id'])) return sprintf(_INVALID_SELECTDB, "users");
-
- if(isset($code_date)) {
- if($code_date != substr($user['password'], 0, 10)) {
- // 正しくないcode_dataがきた場合
- return LOGIN_MISS_CODEDATA;
- }
- }
+ // 存在しているものでも何度も送信されるのを防ぐ必要があるかも
+ // 現状、処理しない
+ $user =& $usersView->getUserById($userIdByMail);
+ if($user === false || !isset($user['user_id'])) return sprintf(_INVALID_SELECTDB, "users");
- // Actionにデータセット
- $actionChain =& $container->getComponent("ActionChain");
- $action =& $actionChain->getCurAction();
- BeanUtils::setAttributes($action, array("user"=>$user));
- BeanUtils::setAttributes($action, array("send_email"=>$chk_items[0]['content']));
+ if(isset($code_date)) {
+ if($code_date != substr($user['password'], 0, 10)) {
+ // 正しくないcode_dataがきた場合
+ return LOGIN_MISS_CODEDATA;
+ }
}
- return;
- }
+ // Actionにデータセット
+ $actionChain =& $container->getComponent("ActionChain");
+ $action =& $actionChain->getCurAction();
+ BeanUtils::setAttributes($action, array("user"=>$user));
+ BeanUtils::setAttributes($action, array("send_email"=>$email));
+
+ return;
+ }
}
?>
diff --git a/html/webapp/modules/login/validator/Validator_ItemsInputs.class.php b/html/webapp/modules/login/validator/Validator_ItemsInputs.class.php
index 1916853..335733c 100644
--- a/html/webapp/modules/login/validator/Validator_ItemsInputs.class.php
+++ b/html/webapp/modules/login/validator/Validator_ItemsInputs.class.php
@@ -19,21 +19,21 @@
*/
class Login_Validator_ItemsInputs extends Validator
{
- /**
- * validate実行
- *
- * @param mixed $attributes チェックする値(user_id, items, items_public, items_reception)
- *
- * @param string $errStr エラー文字列(未使用:エラーメッセージ固定)
- * @param array $params オプション引数
- * @return string エラー文字列(エラーの場合)
- * @access public
- */
- function validate($attributes, $errStr, $params)
- {
- // container取得
+ /**
+ * validate実行
+ *
+ * @param mixed $attributes チェックする値(user_id, items, items_public, items_reception)
+ *
+ * @param string $errStr エラー文字列(未使用:エラーメッセージ固定)
+ * @param array $params オプション引数
+ * @return string エラー文字列(エラーの場合)
+ * @access public
+ */
+ function validate($attributes, $errStr, $params)
+ {
+ // container取得
$container =& DIContainerFactory::getContainer();
- $session =& $container->getComponent("Session");
+ $session =& $container->getComponent("Session");
$usersView =& $container->getComponent("usersView");
$configView =& $container->getComponent("configView");
$fileUpload =& $container->getComponent("FileUpload");
@@ -44,43 +44,42 @@ function validate($attributes, $errStr, $params)
$config = $configView->getConfigByCatid(_SYS_CONF_MODID, _ENTER_EXIT_CONF_CATID);
- if($config['autoregist_use']['conf_value'] != _ON) {
- return $errStr;
- }
-
- $where_params = array(
- "user_authority_id" => _AUTH_ADMIN // 管理者固定
- );
- $show_items =& $usersView->getItems($where_params, null, null, null, array($this, "_getItemsFetchcallback"));
- if($show_items === false) {
- return $errStr;
- }
- $autoregist_use_items = explode("|", $config['autoregist_use_items']['conf_value']);
- foreach($autoregist_use_items as $autoregist_use_item) {
- $buf_arr = explode(":", $autoregist_use_item);
- if(isset($buf_arr[0]) && $buf_arr[0] != "") {
- $autoregist_use_items[$buf_arr[0]] = $buf_arr[0];
- $autoregist_use_items_req[$buf_arr[0]] = $buf_arr[1];
- }
- }
+ if($config['autoregist_use']['conf_value'] != _ON) {
+ return $errStr;
+ }
- $files = $fileUpload->getOriginalName();
- $files_key = array_keys($files);
+ $where_params = array(
+ "user_authority_id" => _AUTH_ADMIN // 管理者固定
+ );
+ $show_items =& $usersView->getItems($where_params, null, null, null, array($this, "_getItemsFetchcallback"));
+ if($show_items === false) {
+ return $errStr;
+ }
+ $configs = explode("|", $config['autoregist_use_items']['conf_value']);
+ foreach($configs as $autoregist_use_item) {
+ $buf_arr = explode(":", $autoregist_use_item);
+ if(isset($buf_arr[0]) && $buf_arr[0] != "") {
+ $autoregist_use_items[$buf_arr[0]] = $buf_arr[0];
+ $autoregist_use_items_req[$buf_arr[0]] = $buf_arr[1];
+ }
+ }
+ $files = $fileUpload->getOriginalName();
+ $files_key = array_keys($files);
- foreach($show_items as $show_items_key => $items) {
+ foreach($show_items as $show_items_key => $items) {
- if(!isset($autoregist_use_items[$items['item_id']])) {
- // 自動ログインの項目ではない
- if(isset($attributes['items']) && isset($attributes['items'][$items['item_id']])) {
- return $errStr;
- }
- continue;
- }
- $err_prefix = $items['item_id'].":";
- if($items['define_flag'] == _ON && defined($items['item_name'])) {
- $items['item_name'] = constant($items['item_name']);
- $show_items[$show_items_key]['item_name'] = $items['item_name'];
- }
+ if(!isset($autoregist_use_items[$items['item_id']])) {
+ // 自動ログインの項目ではない
+ if(isset($attributes['items']) && isset($attributes['items'][$items['item_id']])) {
+ return $errStr;
+ }
+ continue;
+ }
+ $err_prefix = $items['item_id'].":";
+ if($items['define_flag'] == _ON && defined($items['item_name'])) {
+ $items['item_name'] = constant($items['item_name']);
+ $show_items[$show_items_key]['item_name'] = $items['item_name'];
+ }
if($items['type'] == "file") {
// File
// 必須入力チェック
@@ -109,65 +108,65 @@ function validate($attributes, $errStr, $params)
continue;
}
- if(isset($attributes['items']) && isset($attributes['items'][$items['item_id']])) {
- $content = $attributes['items'][$items['item_id']];
- } else {
- $content = "";
- }
+ if(isset($attributes['items']) && isset($attributes['items'][$items['item_id']])) {
+ $content = $attributes['items'][$items['item_id']];
+ } else {
+ $content = "";
+ }
- // 必須入力チェック
- if($items['require_flag'] == _ON || (isset($autoregist_use_items_req[$items['item_id']]) && $autoregist_use_items_req[$items['item_id']] == _ON)) {
- // 必須項目
- if($content == "") {
+ // 必須入力チェック
+ if($items['require_flag'] == _ON || (isset($autoregist_use_items_req[$items['item_id']]) && $autoregist_use_items_req[$items['item_id']] == _ON)) {
+ // 必須項目
+ if($content == "") {
return $err_prefix.sprintf(_REQUIRED, $items['item_name']);
- }
- }
+ }
+ }
- if($items['tag_name'] == "login_id") {
- // 入力文字チェック
- $login_id = $content;
- $login_len = strlen($content);
- if($login_len < USER_LOGIN_ID_MINSIZE || $login_len > USER_LOGIN_ID_MAXSIZE) {
- return $err_prefix.sprintf(_MAXRANGE_ERROR, USER_ITEM_LOGIN, USER_LOGIN_ID_MINSIZE, USER_LOGIN_ID_MAXSIZE);
- }
+ if($items['tag_name'] == "login_id") {
+ // 入力文字チェック
+ $login_id = $content;
+ $login_len = strlen($content);
+ if($login_len < USER_LOGIN_ID_MINSIZE || $login_len > USER_LOGIN_ID_MAXSIZE) {
+ return $err_prefix.sprintf(_MAXRANGE_ERROR, USER_ITEM_LOGIN, USER_LOGIN_ID_MINSIZE, USER_LOGIN_ID_MAXSIZE);
+ }
- // 半角英数または、記号
- if(preg_match(_REGEXP_ALLOW_HALFSIZE_SYMBOL, $login_id)) {
- return $err_prefix.sprintf(_HALFSIZESYMBOL_ERROR, USER_ITEM_LOGIN);
- }
+ // 半角英数または、記号
+ if(preg_match(_REGEXP_ALLOW_HALFSIZE_SYMBOL, $login_id)) {
+ return $err_prefix.sprintf(_HALFSIZESYMBOL_ERROR, USER_ITEM_LOGIN);
+ }
- // 重複チェック
- $where_params = array("login_id" => $login_id);
- $users =& $usersView->getUsers($where_params);
- $count = count($users);
- if($count >= 1) {
- return $err_prefix.sprintf(LOGIN_MES_ERROR_DUPLICATE, USER_ITEM_LOGIN, USER_ITEM_LOGIN);
- }
- } else if($items['tag_name'] == "password") {
- $new_password = $content;
- // 入力文字チェック
- $pass_len = strlen($new_password);
- if($pass_len < USER_PASSWORD_MINSIZE || $pass_len > USER_PASSWORD_MAXSIZE) {
- return $err_prefix.sprintf(_MAXRANGE_ERROR, USER_ITEM_PASSWORD, USER_PASSWORD_MINSIZE, USER_PASSWORD_MAXSIZE);
- }
+ // 重複チェック
+ $where_params = array("login_id" => $login_id);
+ $users =& $usersView->getUsers($where_params);
+ $count = count($users);
+ if($count >= 1) {
+ return $err_prefix.sprintf(LOGIN_MES_ERROR_DUPLICATE, USER_ITEM_LOGIN, USER_ITEM_LOGIN);
+ }
+ } else if($items['tag_name'] == "password") {
+ $new_password = $content;
+ // 入力文字チェック
+ $pass_len = strlen($new_password);
+ if($pass_len < USER_PASSWORD_MINSIZE || $pass_len > USER_PASSWORD_MAXSIZE) {
+ return $err_prefix.sprintf(_MAXRANGE_ERROR, USER_ITEM_PASSWORD, USER_PASSWORD_MINSIZE, USER_PASSWORD_MAXSIZE);
+ }
- if(!isset($attributes['items_password_confirm'][$items['item_id']]) || $new_password != $attributes['items_password_confirm'][$items['item_id']]) {
- return $err_prefix.LOGIN_ERR_PASS_DISACCORD;
- }
- // 半角英数または、記号
- if(preg_match(_REGEXP_ALLOW_HALFSIZE_SYMBOL, $new_password)) {
- return $err_prefix.sprintf(_HALFSIZESYMBOL_ERROR, USER_ITEM_PASSWORD);
- }
- } else if($items['tag_name'] == "handle") {
- // 重複チェック
- $handle = $content;
- $where_params = array("handle" => $handle);
- $users =& $usersView->getUsers($where_params);
- $count = count($users);
- if($count >= 1) {
- return $err_prefix.sprintf(LOGIN_MES_ERROR_DUPLICATE, USER_ITEM_HANDLE, USER_ITEM_HANDLE);
- }
- }
+ if(!isset($attributes['items_password_confirm'][$items['item_id']]) || $new_password != $attributes['items_password_confirm'][$items['item_id']]) {
+ return $err_prefix.LOGIN_ERR_PASS_DISACCORD;
+ }
+ // 半角英数または、記号
+ if(preg_match(_REGEXP_ALLOW_HALFSIZE_SYMBOL, $new_password)) {
+ return $err_prefix.sprintf(_HALFSIZESYMBOL_ERROR, USER_ITEM_PASSWORD);
+ }
+ } else if($items['tag_name'] == "handle") {
+ // 重複チェック
+ $handle = $content;
+ $where_params = array("handle" => $handle);
+ $users =& $usersView->getUsers($where_params);
+ $count = count($users);
+ if($count >= 1) {
+ return $err_prefix.sprintf(LOGIN_MES_ERROR_DUPLICATE, USER_ITEM_HANDLE, USER_ITEM_HANDLE);
+ }
+ }
if($items['type'] == "email" || $items['type'] == "mobile_email") {
$email = $content;
@@ -175,53 +174,28 @@ function validate($attributes, $errStr, $params)
if ( $email != "" && !strpos($email, "@") ) {
return $err_prefix.sprintf(_FORMAT_WRONG_ERROR, $items['item_name']);
}
- if($email != "") {
- // 入力の確認
- if(!isset($attributes['items_mail_confirm'][$items['item_id']]) || $email != $attributes['items_mail_confirm'][$items['item_id']]) {
- if ($items['type'] == "email") {
- $err_msg = LOGIN_ERR_EMAIL_DISACCORD;
- } else if ($items['type'] == "mobile_email") {
- $err_msg = LOGIN_ERR_MOBILE_EMAIL_DISACCORD;
- }
- return $err_prefix.$err_msg;
- }
- // 重複チェック
- $sql = "SELECT item_id, type FROM {items}".
- " WHERE ({items}.type='email' OR {items}.type='mobile_email')";
- $email_items = $db->execute($sql);
- if(count($email_items) > 0) {
- $sql = "SELECT {users_items_link}.user_id, {users_items_link}.item_id, {users_items_link}.content".
- " FROM {users_items_link}".
- " WHERE {users_items_link}.item_id IN (";
- $first = true;
- foreach($email_items as $email_item) {
- if($first == false)
- $sql .= ",";
- $sql .= $email_item['item_id'];
- $first = false;
- }
- $where_params = array();
- if (mb_strlen($email) < _MYSQL_FT_MIN_WORD_LEN) {
- $sql .= ")".
- " AND {users_items_link}.content=? ";
- $where_params = array(
- "{users_items_link}.content" => $email
- );
- } else {
- $sql .= ")".
- " AND MATCH({users_items_link}.content) AGAINST (? IN BOOLEAN MODE)";
- $where_params = array(
- "{users_items_link}.content" => '"'.$email.'"'
- );
- }
- $chk_items =& $db->execute($sql, $where_params);
- $count = !empty($chk_items) ? count($chk_items) : 0;
- }
- if(count($email_items) == 0 || $count >= 1) {
- return $err_prefix.sprintf(LOGIN_MES_ERROR_DUPLICATE, $items['item_name'] , $items['item_name'] );
+ // 確認用アドレスチェック
+ if ($email != $attributes['items_mail_confirm'][$items['item_id']]) {
+ $errorMessage = $err_prefix;
+
+ if ($items['type'] == "email") {
+ $errorMessage .= LOGIN_ERR_EMAIL_DISACCORD;
+ } else if ($items['type'] == "mobile_email") {
+ $errorMessage .= LOGIN_ERR_MOBILE_EMAIL_DISACCORD;
}
+
+ return $errorMessage;
}
+
+ // 重複チェック
+ $userIdByMail = $usersView->getUserIdByMail($email);
+ if (!empty($userIdByMail)) {
+ $errorMessage = $err_prefix
+ . sprintf(LOGIN_MES_ERROR_DUPLICATE, $items['item_name'], $items['item_name']);
+ return $errorMessage;
+ }
+
// メール受信可否
if(isset($attributes['items_reception']) && isset($attributes['items_reception'][$items['item_id']])) {
if($items['allow_email_reception_flag'] == _OFF ||
@@ -233,27 +207,27 @@ function validate($attributes, $errStr, $params)
}
- // 公開設定
- if(isset($attributes['items_public']) && isset($attributes['items_public'][$items['item_id']])) {
- if($items['allow_public_flag'] == _OFF ||
- !($attributes['items_public'][$items['item_id']] == _ON ||
- $attributes['items_public'][$items['item_id']] == _OFF)) {
- return $err_prefix._INVALID_INPUT;
- }
- }
- }
+ // 公開設定
+ if(isset($attributes['items_public']) && isset($attributes['items_public'][$items['item_id']])) {
+ if($items['allow_public_flag'] == _OFF ||
+ !($attributes['items_public'][$items['item_id']] == _ON ||
+ $attributes['items_public'][$items['item_id']] == _OFF)) {
+ return $err_prefix._INVALID_INPUT;
+ }
+ }
+ }
- // 利用許諾
- if(!isset($attributes['autoregist_disclaimer_ok'])) {
- return LOGIN_ERR_MES_DISCLAIMER;
- }
+ // 利用許諾
+ if(!isset($attributes['autoregist_disclaimer_ok'])) {
+ return LOGIN_ERR_MES_DISCLAIMER;
+ }
- // 入力キー
- if ($config['autoregist_use_input_key']['conf_value'] == _ON &&
- $config['autoregist_input_key']['conf_value'] != $attributes['autoregist_input_key']) {
+ // 入力キー
+ if ($config['autoregist_use_input_key']['conf_value'] == _ON &&
+ $config['autoregist_input_key']['conf_value'] != $attributes['autoregist_input_key']) {
- return LOGIN_ERR_MES_INPUT_KEY;
- }
+ return LOGIN_ERR_MES_INPUT_KEY;
+ }
// File
$garbage_flag = _OFF;
@@ -263,14 +237,14 @@ function validate($attributes, $errStr, $params)
if(isset($file['error_mes']) && $file['error_mes'] != "" && $file['error_mes'] != _FILE_UPLOAD_ERR_UPLOAD_NOFILE) {
$err_prefix = $key.":";
return $err_prefix.$file['error_mes'];
- }
+ }
}
- // actionChain取得
+ // actionChain取得
$actionChain =& $container->getComponent("ActionChain");
$action =& $actionChain->getCurAction();
- if(isset($params[0])) {
- BeanUtils::setAttributes($action, array($params[0]=>$show_items));
+ if(isset($params[0])) {
+ BeanUtils::setAttributes($action, array($params[0]=>$show_items));
} else {
BeanUtils::setAttributes($action, array("show_items"=>$show_items));
}
@@ -282,7 +256,7 @@ function validate($attributes, $errStr, $params)
BeanUtils::setAttributes($action, array("filelist"=>$filelist));
return;
- }
+ }
/**
* fetch時コールバックメソッド
diff --git a/html/webapp/modules/login/view/main/init/Init.class.php b/html/webapp/modules/login/view/main/init/Init.class.php
index 1f96c92..66d37a8 100644
--- a/html/webapp/modules/login/view/main/init/Init.class.php
+++ b/html/webapp/modules/login/view/main/init/Init.class.php
@@ -3,7 +3,7 @@
/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
/**
-* ログインモジュール
+ * ログインモジュール
*
* @package NetCommons
* @author Noriko Arai,Ryuji Masukawa
@@ -15,19 +15,19 @@
class Login_View_Main_Init extends Action
{
// リクエストパラメータを受け取るため
- var $error_mes = null;
- var $block_id = null;
- var $http = null;
-
- var $prefix_id_name = null;
-
+ var $error_mes = null;
+ var $block_id = null;
+ var $http = null;
+
+ var $prefix_id_name = null;
+
// コンポーネントを使用するため
var $session = null;
var $configView = null;
var $token = null;
var $filterChain = null;
var $request = null;
-
+
// 値をセットするため
var $login_id = "";
var $autologin = _OFF;
@@ -41,87 +41,87 @@ class Login_View_Main_Init extends Action
var $iframeSsl = null;
var $dialog_name = null;
var $autocomplete = null;
-
- /**
- * ログインモジュール
- *
- * @access public
- */
- function execute()
- {
- $this->redirect_url = $this->request->getParameter('_redirect_url');
- $this->redirect_url = str_replace("#", "@@", $this->redirect_url);
- $this->redirect_url = str_replace("&", "@", $this->redirect_url);
- $this->redirect_url = str_replace("?action=", "?_sub_action=", $this->redirect_url);
-
- //if(!isset($_SERVER['HTTPS']) && $this->session->getParameter("_user_id")) {
- if($this->session->getParameter("_user_id")
- && $this->block_id != 0) {
- return 'success_login';
- } else {
- $config = $this->configView->getConfigByCatid(_SYS_CONF_MODID, _GENERAL_CONF_CATID);
- $this->use_ssl = $config['use_ssl']['conf_value'];
- if($config['autologin_use']['conf_value'] != _AUTOLOGIN_NO) {
- // ログインIDのみ取得
- $autologin_login_cookie_name = $config['autologin_login_cookie_name']['conf_value'];
- $this->login_id = isset($_COOKIE[$autologin_login_cookie_name]) ? $_COOKIE[$autologin_login_cookie_name] : "";
- }
- if($config['autologin_use']['conf_value'] == _AUTOLOGIN_OK) {
- $this->autologin = _ON;
- }
- if (empty($this->block_id)) {
- $this->formClassName = 'login_popup';
- } else {
- $this->formClassName = 'login_block';
- }
- if ($this->autologin==1) {
- $this->sslOuterClassName = 'login_ssl_outer_rememberme';
- } else {
- $this->sslOuterClassName = 'login_ssl_outer';
- }
- $this->autocomplete = 'off';
- if (!empty($config['login_autocomplete']['conf_value'])) {
- $this->autocomplete = 'on';
-
- if (!ereg('Chrome', $_SERVER['HTTP_USER_AGENT'])
- && ereg('Safari', $_SERVER['HTTP_USER_AGENT'])) {
- $this->login_id = '';
- }
- }
+ /**
+ * ログインモジュール
+ *
+ * @access public
+ */
+ function execute()
+ {
+ $this->redirect_url = $this->request->getParameter('_redirect_url');
+ $this->redirect_url = str_replace("#", "@@", $this->redirect_url);
+ $this->redirect_url = str_replace("&", "@", $this->redirect_url);
+ $this->redirect_url = str_replace("?action=", "?_sub_action=", $this->redirect_url);
- $smartyAssign =& $this->filterChain->getFilterByName('SmartyAssign');
- $this->dialog_name = $smartyAssign->getLang('login');
- $this->closesite = $config['closesite']['conf_value'];
- $this->token_value = $this->token->getValue();
+ //if(!isset($_SERVER['HTTPS']) && $this->session->getParameter("_user_id")) {
+ if($this->session->getParameter("_user_id")
+ && $this->block_id != 0) {
+ return 'success_login';
+ }
- $isBaseUrlHttps = preg_match("/^https:\/\//i", BASE_URL);
- $view =& $this->filterChain->getFilterByName("View");
+ $config = $this->configView->getConfigByCatid(_SYS_CONF_MODID, _GENERAL_CONF_CATID);
+ $this->use_ssl = $config['use_ssl']['conf_value'];
+ if($config['autologin_use']['conf_value'] != _AUTOLOGIN_NO) {
+ // ログインIDのみ取得
+ $autologin_login_cookie_name = $config['autologin_login_cookie_name']['conf_value'];
+ $this->login_id = isset($_COOKIE[$autologin_login_cookie_name]) ? $_COOKIE[$autologin_login_cookie_name] : "";
+ }
+ if($config['autologin_use']['conf_value'] == _AUTOLOGIN_OK) {
+ $this->autologin = _ON;
+ }
+ if (empty($this->block_id)) {
+ $this->formClassName = 'login_popup';
+ } else {
+ $this->formClassName = 'login_block';
+ }
+ if ($this->autologin == _ON) {
+ $this->sslOuterClassName = 'login_ssl_outer_rememberme';
+ } else {
+ $this->sslOuterClassName = 'login_ssl_outer';
+ }
- if (!empty($this->http)) {
- $this->iframeSsl = true;
- $view->setAttribute('define:theme', 0);
+ $this->autocomplete = 'off';
+ if (!empty($config['login_autocomplete']['conf_value'])) {
+ $this->autocomplete = 'on';
- return 'success';
+ if (!ereg('Chrome', $_SERVER['HTTP_USER_AGENT'])
+ && ereg('Safari', $_SERVER['HTTP_USER_AGENT'])) {
+ $this->login_id = '';
}
+ }
- if (!empty($this->error_mes)) {
- $view->setAttribute('define:close_popup_func',
- 'location.href=\'' . BASE_URL . INDEX_FILE_NAME . '\';'
- . 'return false;');
- }
+ $smartyAssign =& $this->filterChain->getFilterByName('SmartyAssign');
+ $this->dialog_name = $smartyAssign->getLang('login');
+ $this->closesite = $config['closesite']['conf_value'];
+ $this->token_value = $this->token->getValue();
- if ($config['use_ssl']['conf_value'] != 0
- && !$isBaseUrlHttps
- && empty($this->http)) {
- $this->ssl_base_url = preg_replace("/^http:\/\//i","https://", BASE_URL);
- return 'success_ssl';
- }
+ $isBaseUrlHttps = preg_match("/^https:\/\//i", BASE_URL);
+ $view =& $this->filterChain->getFilterByName("View");
- $this->sslOuterClassName = '';
+ if (!empty($this->http)) {
+ $this->iframeSsl = true;
+ $view->setAttribute('define:theme', 0);
return 'success';
}
+
+ if (!empty($this->error_mes)) {
+ $view->setAttribute('define:close_popup_func',
+ 'location.href=\'' . BASE_URL . INDEX_FILE_NAME . '\';'
+ . 'return false;');
+ }
+
+ if ($config['use_ssl']['conf_value'] != 0
+ && !$isBaseUrlHttps
+ && empty($this->http)) {
+ $this->ssl_base_url = preg_replace("/^http:\/\//i","https://", BASE_URL);
+ return 'success_ssl';
+ }
+
+ $this->sslOuterClassName = '';
+
+ return 'success';
}
}
?>
\ No newline at end of file
diff --git a/html/webapp/modules/menu/action/edit/addpage/maple.ini b/html/webapp/modules/menu/action/edit/addpage/maple.ini
index 0ef899a..b1b56f8 100644
--- a/html/webapp/modules/menu/action/edit/addpage/maple.ini
+++ b/html/webapp/modules/menu/action/edit/addpage/maple.ini
@@ -1,6 +1,6 @@
[ValidateDef]
main_page_id.required ="1:lang._required,lang._page_id"
-main_page_id.menu.regist = "1:lang._invalid_auth"
+main_page_id.menu.regist = "1,add:lang._invalid_auth"
[Action]
session = "ref:Session"
diff --git a/html/webapp/modules/menu/action/edit/deletepage/Deletepage.class.php b/html/webapp/modules/menu/action/edit/deletepage/Deletepage.class.php
index 0f09773..0ae6b7a 100644
--- a/html/webapp/modules/menu/action/edit/deletepage/Deletepage.class.php
+++ b/html/webapp/modules/menu/action/edit/deletepage/Deletepage.class.php
@@ -14,31 +14,27 @@
*/
class Menu_Action_Edit_Deletepage extends Action
{
- // リクエストパラメータを受け取るため
- var $main_page_id = null;
- var $block_id = null;
-
- // 使用コンポーネントを受け取るため
- var $session = null;
- var $pagesView = null;
- var $pagesAction = null;
- var $blocksAction = null;
- var $menuAction = null;
- var $blocksView = null;
-
- // 値をセットするため
- var $url = null;
-
- var $del_page_arr = array();
-
- /**
- * ページ追加アクション
- *
- * @access public
- */
- function execute()
- {
- $page_id = intval($this->main_page_id);
+ // リクエストパラメータを受け取るため
+ var $main_page_id = null;
+ var $block_id = null;
+
+ // 使用コンポーネントを受け取るため
+ var $session = null;
+ var $pagesView = null;
+ var $pagesAction = null;
+ var $db = null;
+
+ // 値をセットするため
+ var $url = null;
+
+ /**
+ * ページ追加アクション
+ *
+ * @access public
+ */
+ function execute()
+ {
+ $page_id = intval($this->main_page_id);
$page =& $this->pagesView->getPageById($page_id);
if($page === false || !isset($page['page_id'])) {
return 'error';
@@ -47,53 +43,39 @@ function execute()
//深さが0 または、ルーム
return 'error';
}
- //ページ削除
- if(!$this->pagesAction->delPageById($page_id)) {
- return 'error';
- }
- //ページスタイル削除
- if(!$this->pagesAction->delPageStyleById($page_id)) {
- return 'error';
- }
-
- //pages_meta_infテーブル削除
- if(!$this->pagesAction->delPageMetaInfById($page_id)) {
- return 'error';
- }
-
- //表示順decrement
- if(!$this->pagesAction->decrementDisplaySeq($page['parent_id'], $page['display_sequence'], $page['lang_dirname'])) {
- return 'error';
+
+ $pageIds = array($page_id);
+ $hasChildPageIds = array();
+ if ($page['node_flag']) {
+ $hasChildPageIds = $pageIds;
}
- //削除関数を呼び出し
- $blocks =& $this->blocksView->getBlockByPageId($page_id);
- if(isset($blocks[0])) {
- foreach($blocks as $block) {
- $this->blocksAction->delFuncExec($block['block_id']);
+
+ while (!empty($hasChildPageIds)) {
+ $sql = "SELECT page_id, "
+ . "node_flag "
+ . "FROM {pages} "
+ . "WHERE parent_id IN (" . implode(',', $hasChildPageIds) . ")";
+ $childPages = $this->db->execute($sql);
+ if ($childPages === false) {
+ $this->db->addError();
+ return 'error';
+ }
+
+ $hasChildPageIds = array();
+ foreach ($childPages as $childPage) {
+ if ($childPage['node_flag']) {
+ $hasChildPageIds[] = $childPage['page_id'];
+ }
+ $pageIds[] = $childPage['page_id'];
}
}
-
- //ブロックテーブル削除
- if(!$this->blocksAction->delBlockByPageId($page_id)) {
- return 'error';
- }
- //メニュー詳細テーブル削除
- if(!$this->menuAction->delMenuDetailByPageId($page_id)) {
- return 'error';
- }
- //携帯メニュー詳細テーブル削除
- if(!$this->menuAction->delMobileMenuDetailByPageId($page_id)) {
+
+ $inValue = implode(',', $pageIds);
+ if (!$this->pagesAction->deletePagesByInOperator($inValue)) {
return 'error';
}
- $this->del_page_arr[] = $page_id;
- if($page['node_flag']) {
- //子供を再帰的に削除
- if(!$this->_delPageChildren($page['page_id'])) {
- return 'error';
- }
- }
- if(in_array($this->session->getParameter("_main_page_id"), $this->del_page_arr)) {
+ if(in_array($this->session->getParameter("_main_page_id"), $pageIds)) {
$this->session->setParameter("_editing_block_id", intval($this->block_id));
//再表示URL
@@ -102,45 +84,6 @@ function execute()
$this->url = "true";
}
return 'success';
- }
-
- function _delPageChildren($parent_id) {
- $ret = true;
- $pages = $this->pagesView->getPages(array("parent_id"=>$parent_id));
- if(isset($pages[0])) {
- foreach($pages as $page) {
- if($page['node_flag']) {
- //子供を再帰的に削除
- $this->_delPageChildren($page['page_id']);
- }
- $this->del_page_arr[] = $page['page_id'];
- if(!$this->pagesAction->delPageById($page['page_id'])) {
- $ret = false;
- }
- //ページスタイル削除
- if(!$this->pagesAction->delPageStyleById($page['page_id'])) {
- $ret = false;
- }
- //pages_meta_infテーブル削除
- if(!$this->pagesAction->delPageMetaInfById($page['page_id'])) {
- $ret = false;
- }
- //削除関数を呼び出し
- $blocks =& $this->blocksView->getBlockByPageId($page['page_id']);
- if(isset($blocks[0])) {
- foreach($blocks as $block) {
- $this->blocksAction->delFuncExec($block['block_id']);
- }
- }
- if(!$this->blocksAction->delBlockByPageId($page['page_id'])) {
- $ret = false;
- }
- if(!$this->menuAction->delMenuDetailByPageId($page['page_id'])) {
- $ret = false;
- }
- }
- }
- return $ret;
- }
+ }
}
?>
diff --git a/html/webapp/modules/menu/action/edit/deletepage/maple.ini b/html/webapp/modules/menu/action/edit/deletepage/maple.ini
index 0996510..401fa5e 100644
--- a/html/webapp/modules/menu/action/edit/deletepage/maple.ini
+++ b/html/webapp/modules/menu/action/edit/deletepage/maple.ini
@@ -7,9 +7,7 @@ main_page_id.menu.delete = "1:lang.menu_error_last_page"
session = "ref:Session"
pagesView = "ref:pagesView"
pagesAction = "ref:pagesAction"
-blocksAction = "ref:blocksAction"
-menuAction = "ref:menuAction"
-blocksView = "ref:blocksView"
+db = "ref:DbObject"
[View]
success = "common:menu_action_edit_deletepage.html"
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/install.ini b/html/webapp/modules/menu/install.ini
index 3254baa..8a001a3 100644
--- a/html/webapp/modules/menu/install.ini
+++ b/html/webapp/modules/menu/install.ini
@@ -1,4 +1,4 @@
-version = "2.4.0.0"
+version = "2.4.0.2"
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/default/menu_mobile_detail.html b/html/webapp/modules/menu/templates/default/menu_mobile_detail.html
index db3f7b0..8a37e60 100644
--- a/html/webapp/modules/menu/templates/default/menu_mobile_detail.html
+++ b/html/webapp/modules/menu/templates/default/menu_mobile_detail.html
@@ -1,82 +1,98 @@
-<{strip}>
-<{* 携帯詳細表示用テンプレート *}>
- <{assign var="page_id" value=$action.page_id}>
-
- <{$smarty.session._page_title}>
-
-<{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}>
- <{if ($smarty.session._smartphone_flag == _ON) }>
-
- <{if $action.menu_display_type==$smarty.const.MOBILE_MENU_DISPLAY_TREE }>
- <{include file="menu_mobile_recursive_page_smart_tree.html"}>
- <{else}>
- <{include file="menu_mobile_recursive_page_smart_flat.html"}>
- <{/if}>
-
- <{else}>
- <{include file="menu_mobile_recursive_page_feature.html"}>
- <{/if}>
- <{/if}>
- <{/if}>
-
-<{/if}>
-
-
-
-
-
-
-<{if $action.each_room_flag == $smarty.const._ON }>
- <{if ($smarty.session._smartphone_flag == _ON) }>
-
-
- <{$lang.menu_room_select|smarty:nodefaults}>
-
- <{else}>
-
- <{$lang.menu_room_select|smarty:nodefaults}>
-
-
- <{/if}>
-
- <{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}>
- <{if ($smarty.session._smartphone_flag == _ON) }>
- <{include file="menu_mobile_recursive_room_smart.html"}>
-
- <{else}>
- <{include file="menu_mobile_recursive_room_feature.html"}>
-
- <{/if}>
-
-<{/if}>
+<{strip}>
+<{* 携帯詳細表示用テンプレート *}>
+ <{assign var="page_id" value=$action.page_id}>
+
+ <{$smarty.session._page_title}>
+
+<{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 $smarty.session.mobileDisplayTextHtml == _ON}>
+
+
+<{/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}>
+ <{if ($smarty.session._smartphone_flag == _ON) }>
+
+ <{if $action.menu_display_type==$smarty.const.MOBILE_MENU_DISPLAY_TREE }>
+ <{include file="menu_mobile_recursive_page_smart_tree.html"}>
+ <{else}>
+ <{include file="menu_mobile_recursive_page_smart_flat.html"}>
+ <{/if}>
+
+ <{else}>
+ <{include file="menu_mobile_recursive_page_feature.html"}>
+ <{/if}>
+ <{/if}>
+ <{/if}>
+
+<{/if}>
+
+
+
+
+
+<{if $action.each_room_flag == $smarty.const._ON }>
+ <{if ($smarty.session._smartphone_flag == _ON) }>
+
+
+ <{$lang.menu_room_select|smarty:nodefaults}>
+
+ <{else}>
+
+ <{$lang.menu_room_select|smarty:nodefaults}>
+
+
+ <{/if}>
+
+ <{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}>
+ <{if ($smarty.session._smartphone_flag == _ON) }>
+ <{include file="menu_mobile_recursive_room_smart.html"}>
+
+ <{else}>
+ <{include file="menu_mobile_recursive_room_feature.html"}>
+
+ <{/if}>
+
+<{/if}>
<{/strip}>
\ No newline at end of file
diff --git a/html/webapp/modules/menu/templates/default/menu_mobile_recursive_block.html b/html/webapp/modules/menu/templates/default/menu_mobile_recursive_block.html
index 0dd699e..cab8b2a 100644
--- a/html/webapp/modules/menu/templates/default/menu_mobile_recursive_block.html
+++ b/html/webapp/modules/menu/templates/default/menu_mobile_recursive_block.html
@@ -1,66 +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 ($smarty.session._smartphone_flag != _ON) }>
- <{if ($action.html_flag == _ON) }>
-
-
- <{$block.content|smarty:nodefaults|img_style_rgb_to_hex|wysiwig_convert_url}>
- <{else}>
-
-
- <{$block.content|html_to_text|smarty:nodefaults|nl2br}>
- <{/if}>
- <{else}>
- <{$block.content|smarty:nodefaults|img_style_rgb_to_hex|wysiwig_convert_url}>
- <{/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}>
+<{* ブロック一覧表示用テンプレート *}>
+<{assign var=displayUlTag value=$smarty.const._ON}>
+<{foreach name="block" key="block_id" key=blockId item="block" from=$blocks}>
+ <{if $block.module_id != 0}>
+ <{if $block.block_name == ""
+ && $block.content != ""}>
+ <{if $smarty.session._smartphone_flag == _ON
+ || $action.html_flag == _ON}>
+ <{$block.content|smarty:nodefaults|img_style_rgb_to_hex|wysiwig_convert_url}>
+ <{else}>
+ <{$block.content|html_to_text|smarty:nodefaults|nl2br}>
+ <{/if}>
+
+ <{if $block.more_title != ""}>
+
+
+
+ <{$block.more_title}>
+
+ <{/if}>
+
+ <{else}>
+ <{if $displayUlTag == _ON}>
+
+ <{/if}>
+<{/foreach}>
<{/strip}>
\ No newline at end of file
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..2a547e3
--- /dev/null
+++ b/html/webapp/modules/menu/templates/jq_gnavi_pldwn_blue/menu_view_main_init.html
@@ -0,0 +1,50 @@
+<{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..cde7810
--- /dev/null
+++ b/html/webapp/modules/menu/templates/jq_gnavi_pldwn_gray/menu_view_main_init.html
@@ -0,0 +1,50 @@
+<{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)}>
+
+
+ <{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..91e4476
--- /dev/null
+++ b/html/webapp/modules/menu/templates/jq_gnavi_pldwn_green/menu_view_main_init.html
@@ -0,0 +1,50 @@
+<{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..f8522ef
--- /dev/null
+++ b/html/webapp/modules/menu/templates/jq_gnavi_pldwn_orange/menu_view_main_init.html
@@ -0,0 +1,50 @@
+<{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..5659bc1
--- /dev/null
+++ b/html/webapp/modules/menu/templates/jq_gnavi_pldwn_red/menu_view_main_init.html
@@ -0,0 +1,50 @@
+<{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/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 == $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) }>
+
+
+ <{$block.content|smarty:nodefaults|img_style_rgb_to_hex|wysiwig_convert_url}>
+ <{else}>
+
+
+ <{$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}>
+
+ <{/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}>>
+
+ <{* アイコン *}>
+<{********** アイコンをコメント 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}><{/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
+
+ **********}>
+
+ <{/if}>
+<{/foreach}>
+<{/strip}>
\ No newline at end of file
diff --git a/html/webapp/modules/menu/validator/Validator_Regist.class.php b/html/webapp/modules/menu/validator/Validator_Regist.class.php
index 3da5d0a..137456b 100644
--- a/html/webapp/modules/menu/validator/Validator_Regist.class.php
+++ b/html/webapp/modules/menu/validator/Validator_Regist.class.php
@@ -3,7 +3,7 @@
/**
* 登録時、権限チェック
- *
+ *
* @package NetCommons.components
* @author Noriko Arai,Ryuji Masukawa
* @copyright 2006-2007 NetCommons Project
@@ -25,45 +25,45 @@ class Menu_Validator_Regist extends Validator
function validate($attributes, $errStr, $params)
{
$main_page_id = $attributes;
-
+
$container =& DIContainerFactory::getContainer();
$pagesView =& $container->getComponent("pagesView");
$session =& $container->getComponent("Session");
-
+
$main_page =& $pagesView->getPageById($main_page_id);
if($main_page === false || !isset($main_page['page_id'])) {
- return $errStr;
+ return $errStr;
}
if($main_page['thread_num'] == 0 && $main_page['private_flag'] == _ON) {
// プライベートスペースならば、主担以上ならばOK
if($main_page['authority_id'] < _AUTH_CHIEF) {
- return $errStr;
+ return $errStr;
}
- } else if($main_page['thread_num'] == 0) {
+ } else if($main_page['thread_num'] == 0 && (!isset($params[0]) || $params[0] != "add")) {
// 深さ0ならば、管理者のみ変更を許す
if($session->getParameter("_user_auth_id") != _AUTH_ADMIN) {
- return $errStr;
+ return $errStr;
}
} else if($main_page['page_id'] == $main_page['room_id']) {
- // その他のルーム
+ // その他のルーム
if($main_page['authority_id'] < _AUTH_CHIEF) {
- return $errStr;
+ return $errStr;
}
// 親のルームの権限が主担ならば許す
//$parent_page =& $pagesView->getPageById($main_page['parent_id']);
//if($parent_page === false || !isset($parent_page['authority_id']) || $parent_page['authority_id'] < _AUTH_CHIEF) {
- // return $errStr;
+ // return $errStr;
//}
} else {
// ページ-カテゴリ
$parent_page =& $pagesView->getPageById($main_page['room_id']);
if($parent_page === false || !isset($parent_page['authority_id']) || $parent_page['authority_id'] < _AUTH_CHIEF) {
- return $errStr;
+ return $errStr;
}
}
-
+
if($main_page['authority_id'] < _AUTH_CHIEF && $session->getParameter("_user_auth_id") != _AUTH_ADMIN) {
- return $errStr;
+ return $errStr;
}
}
}
diff --git a/html/webapp/modules/menu/view/mobile/init/Init.class.php b/html/webapp/modules/menu/view/mobile/init/Init.class.php
index 2610b2b..2c0614e 100644
--- a/html/webapp/modules/menu/view/mobile/init/Init.class.php
+++ b/html/webapp/modules/menu/view/mobile/init/Init.class.php
@@ -109,6 +109,23 @@ function execute()
$this->pageCount = count($this->pageTree[$this->page_id]);
}
$this->topPage = current($this->pageTree);
+ if ($this->each_room_flag == _OFF) {
+ $root = array();
+ $dummy = array('thread_num'=>0,'visible'=>true);
+ if (isset($this->pageTree[_SPACE_TYPE_PUBLIC])) {
+ $root[0][_SPACE_TYPE_PUBLIC] = $dummy;
+ }
+ if (isset($this->pageTree[_SPACE_TYPE_GROUP])) {
+ $root[0][_SPACE_TYPE_GROUP] = $dummy;
+ }
+ if (isset($_SESSION['_self_myroom_page']['room_id'])) {
+ $root[0][$_SESSION['_self_myroom_page']['room_id']] = $dummy;
+ }
+ if (isset($root[0])) {
+ $this->topPage = $root[0];
+ $this->pageTree += $root;
+ }
+ }
$this->mobileView->getRoomTree($this->room_arr, $this->menu_display_type, $this->each_room_flag, $roomIds);
if($this->t == _ON || $is_room_detail_display) {
diff --git a/html/webapp/modules/module/action/admin/uninstall/Uninstall.class.php b/html/webapp/modules/module/action/admin/uninstall/Uninstall.class.php
index 75d7155..df2bdb0 100644
--- a/html/webapp/modules/module/action/admin/uninstall/Uninstall.class.php
+++ b/html/webapp/modules/module/action/admin/uninstall/Uninstall.class.php
@@ -231,10 +231,10 @@ function execute()
}
}
}
- if($this->uploadsAction->delUploadsByModuleid($this->upd_module_id) && $del_flag) {
- $this->_setMes(MODULE_MES_RESULT_UPLOADS_EN,1);
- }
-
+ if ($del_flag) {
+ $this->_setMes(MODULE_MES_RESULT_UPLOADS_EN,1);
+ }
+
// ----------------------------------------------
// --- モジュールテーブルのデータ削除 ---
// ----------------------------------------------
@@ -266,8 +266,7 @@ function execute()
// --- ページモジュールリンクデータ削除 ---
// ----------------------------------------------------------------------
$this->_setMes(sprintf(MODULE_MES_RESULT_DELETE_ST,MODULE_PAGES_MODULES_LINK_TABLE_NAME),1);
- if($this->pagesAction->delPagesModulesLink(array("module_id" => $this->upd_module_id))) {
- //削除成功
+ if ($this->pagesAction->deleteRoomModule(null, array($this->upd_module_id))) {
$this->_setMes(sprintf(MODULE_MES_RESULT_DELETE_EN,MODULE_PAGES_MODULES_LINK_TABLE_NAME),1);
} else {
$this->_setMes(sprintf(MODULE_MES_RESULT_DELETE_ER,MODULE_PAGES_MODULES_LINK_TABLE_NAME),1);
diff --git a/html/webapp/modules/module/install.ini b/html/webapp/modules/module/install.ini
index 41052df..645a691 100644
--- a/html/webapp/modules/module/install.ini
+++ b/html/webapp/modules/module/install.ini
@@ -1,4 +1,4 @@
-version = "2.4.0.0"
+version = "2.4.0.1"
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
index e33a018..6fc5538 100644
--- a/html/webapp/modules/module/update/Update.class.php
+++ b/html/webapp/modules/module/update/Update.class.php
@@ -680,74 +680,6 @@ function execute()
}
}
- // users_items_linkにindexを追加
- $sql = "SHOW INDEX FROM `".$this->db->getPrefix()."users_items_link` ;";
- $results = $this->db->execute($sql);
- if($results === false) return false;
- $alter_table_flag = true;
- $alter_table_content_flag = true;
- foreach($results as $result) {
- if(isset($result['Key_name']) && $result['Key_name'] == "item_id") {
- $alter_table_flag = false;
- }
- if(isset($result['Key_name']) && $result['Key_name'] == "content") {
- $alter_table_content_flag = false;
- }
- }
- if($alter_table_flag) {
- $sql = "ALTER TABLE `".$this->db->getPrefix()."users_items_link` ADD INDEX ( `item_id`, `email_reception_flag` ) ;";
- $result = $this->db->execute($sql);
- if($result === false) return false;
- }
- if($alter_table_content_flag) {
- $sql = "ALTER TABLE `".$this->db->getPrefix()."users_items_link` ADD FULLTEXT ( `content` ) ;";
- $result = $this->db->execute($sql);
- if($result === false) return false;
- }
-
- // usersにindexを追加
- $sql = "SHOW INDEX FROM `".$this->db->getPrefix()."users` ;";
- $results = $this->db->execute($sql);
- if($results === false) return false;
- $alter_table_login_id_flag = true;
- $alter_table_handle_flag = true;
- $alter_table_active_flag = true;
- $alter_table_activate_key_flag = true;
- foreach($results as $result) {
- if(isset($result['Key_name']) && $result['Key_name'] == "active_flag") {
- $alter_table_active_flag = false;
- }
- if(isset($result['Key_name']) && $result['Key_name'] == "login_id") {
- $alter_table_login_id_flag = false;
- }
- if(isset($result['Key_name']) && $result['Key_name'] == "handle") {
- $alter_table_handle_flag = false;
- }
- if(isset($result['Key_name']) && $result['Key_name'] == "activate_key") {
- $alter_table_activate_key_flag = false;
- }
- }
- if($alter_table_login_id_flag) {
- $sql = "ALTER TABLE `".$this->db->getPrefix()."users` ADD INDEX ( `login_id` ) ;";
- $result = $this->db->execute($sql);
- if($result === false) return false;
- }
- if($alter_table_handle_flag) {
- $sql = "ALTER TABLE `".$this->db->getPrefix()."users` ADD INDEX ( `handle` ) ;";
- $result = $this->db->execute($sql);
- if($result === false) return false;
- }
- if($alter_table_active_flag) {
- $sql = "ALTER TABLE `".$this->db->getPrefix()."users` ADD INDEX ( `active_flag`, `system_flag`, `role_authority_id` ) ;";
- $result = $this->db->execute($sql);
- if($result === false) return false;
- }
- if($alter_table_activate_key_flag) {
- $sql = "ALTER TABLE `".$this->db->getPrefix()."users` ADD INDEX ( `activate_key` ) ;";
- $result = $this->db->execute($sql);
- if($result === false) return false;
- }
-
// blocksにindexを追加
$sql = "SHOW INDEX FROM `".$this->db->getPrefix()."blocks` ;";
$results = $this->db->execute($sql);
diff --git a/html/webapp/modules/multidatabase/action/edit/addmetadata/Addmetadata.class.php b/html/webapp/modules/multidatabase/action/edit/addmetadata/Addmetadata.class.php
index 1d56169..a6d04dc 100644
--- a/html/webapp/modules/multidatabase/action/edit/addmetadata/Addmetadata.class.php
+++ b/html/webapp/modules/multidatabase/action/edit/addmetadata/Addmetadata.class.php
@@ -76,29 +76,38 @@ function execute()
$this->search_flag = _OFF;
}
- if(!empty($metadata_id)) {
+ $beforeType = null;
+ $afterType = $this->type;
+ if (!empty($metadata_id)) {
// 編集
$where_params = array("metadata_id" => $metadata_id);
$metadata_before_update = $this->db->selectExecute("multidatabase_metadata", $where_params);
if($metadata_before_update === false || !isset($metadata_before_update[0])) {
return 'error';
}
- if(($metadata_before_update[0]['type'] == MULTIDATABASE_META_TYPE_TEXT || $metadata_before_update[0]['type'] == MULTIDATABASE_META_TYPE_TEXTAREA ||
- $metadata_before_update[0]['type'] == MULTIDATABASE_META_TYPE_WYSIWYG || $metadata_before_update[0]['type'] == MULTIDATABASE_META_TYPE_AUTONUM ||
- $metadata_before_update[0]['type'] == MULTIDATABASE_META_TYPE_MAIL || $metadata_before_update[0]['type'] == MULTIDATABASE_META_TYPE_DATE)
- && ($this->type == MULTIDATABASE_META_TYPE_FILE || $this->type == MULTIDATABASE_META_TYPE_IMAGE)) {
- $param = array("content" => "");
- $result = $this->db->updateExecute("multidatabase_metadata_content", $param, $where_params, true);
+ $beforeType = $metadata_before_update[0]['type'];
+
+ if ($beforeType != MULTIDATABASE_META_TYPE_WYSIWYG
+ && $afterType == MULTIDATABASE_META_TYPE_WYSIWYG) {
+ $sql = "SELECT metadata_content_id, "
+ . "content "
+ . "FROM {multidatabase_metadata_content} "
+ . "WHERE metadata_id = ?";
+ $result = $this->db->execute($sql, $where_params, null, null, true, array($this, '_escapeHtml'));
if ($result === false) {
return 'error';
}
- } elseif ($this->type == MULTIDATABASE_META_TYPE_DATE) {
+ }
+
+ if ($beforeType != MULTIDATABASE_META_TYPE_DATE
+ && $afterType == MULTIDATABASE_META_TYPE_DATE) {
$param = array("content" => "");
$result = $this->db->updateExecute('multidatabase_metadata_content', $param, $where_params, true);
if ($result === false) {
return 'error';
}
}
+
$param = array(
"name" => $this->name,
"type" => $this->type,
@@ -142,8 +151,8 @@ function execute()
}
}
- if ($this->type == MULTIDATABASE_META_TYPE_AUTONUM) {
- $sql = "";
+ if ($beforeType != MULTIDATABASE_META_TYPE_AUTONUM
+ && $afterType == MULTIDATABASE_META_TYPE_AUTONUM) {
$sql = "SELECT MC.content_id AS content_id, ".$metadata_id." AS metadata_id, MMC.metadata_content_id AS metadata_content_id, MC.temporary_flag, MC.agree_flag " .
" FROM {multidatabase_content} MC" .
" LEFT JOIN {multidatabase_metadata_content} MMC" .
@@ -219,5 +228,32 @@ function _fetchCallback(&$recordSet)
return true;
}
+ /**
+ * 既存コンテンツをHTMLエスケープする
+ *
+ * @param array $recordSet コンテンツデータADORecordSet
+ * @return boolean true or false
+ * @access public
+ */
+ function _escapeHtml(&$recordSet)
+ {
+ $sql = "UPDATE {multidatabase_metadata_content} "
+ . "SET "
+ . "content = ? "
+ . "WHERE metadata_content_id = ?";
+
+ while ($row = $recordSet->fetchRow()) {
+ $bindValues = array(
+ htmlspecialchars($row['content']),
+ $row['metadata_content_id']
+ );
+ $result = $this->db->execute($sql, $bindValues);
+ if ($result === false) {
+ return false;
+ }
+ }
+
+ return true;
+ }
}
?>
diff --git a/html/webapp/modules/multidatabase/install.ini b/html/webapp/modules/multidatabase/install.ini
index 2c6db68..5ce72ac 100644
--- a/html/webapp/modules/multidatabase/install.ini
+++ b/html/webapp/modules/multidatabase/install.ini
@@ -1,4 +1,4 @@
-version = "2.4.0.0"
+version = "2.4.0.1"
action_name="multidatabase_view_main_init"
edit_action_name="multidatabase_view_edit_list"
block_add_action="multidatabase_view_edit_create"
@@ -33,6 +33,7 @@ room_id = core.page_id
content_id =
comment_id =
metadata_id =
+title_metadata_id = metadata_id
metadata_content_id =
multidatabase_metadata_content.content=wysiwyg.upload_id
multidatabase_metadata_content.content = text.upload_id
diff --git a/html/webapp/modules/multidatabase/validator/Validator_MultidatabaseView.class.php b/html/webapp/modules/multidatabase/validator/Validator_MultidatabaseView.class.php
index 738a76c..07ece22 100644
--- a/html/webapp/modules/multidatabase/validator/Validator_MultidatabaseView.class.php
+++ b/html/webapp/modules/multidatabase/validator/Validator_MultidatabaseView.class.php
@@ -50,6 +50,9 @@ function validate($attributes, $errStr, $params)
$mdbView =& $container->getComponent("mdbView");
if (empty($attributes['multidatabase_id'])) {
$mdb_obj = $mdbView->getDefaultMdb();
+ } elseif ( $actionName == 'multidatabase_view_edit_style' ) {
+ // 表示方法変更の場合は、現在設定されている表示件数や表示順を取得したいため、getCurrentMdb()を呼ぶ。 by nagahara@opensource-workshop.jp
+ $mdb_obj = $mdbView->getCurrentMdb();
} elseif ($prefix_id_name == MULTIDATABASE_REFERENCE_PREFIX_NAME.$attributes['multidatabase_id']
|| !strncmp($actionName, 'multidatabase_view_edit', 23)) {
$mdb_obj = $mdbView->getMdb();
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 16114eb..17338e3 100644
--- a/html/webapp/modules/multidatabase/view/main/init/Init.class.php
+++ b/html/webapp/modules/multidatabase/view/main/init/Init.class.php
@@ -1,254 +1,256 @@
-session->getParameter( "_mobile_flag" ) == true ) {
- $this->block_num = $this->mobileView->getCountForBlockInPageWithBlock( $this->block_id );
- $this->html_flag = $this->mobileView->getTextHtmlMode( $this->html_flag );
- }
-
- if(empty($this->metadatas)) {
- $this->metadata_exists = false;
- return 'success';
- }
-
- $section_params = array(
- "multidatabase_id" => intval($this->multidatabase_id),
- "list_flag" => _ON,
- "type IN (".MULTIDATABASE_META_TYPE_SECTION.",".MULTIDATABASE_META_TYPE_MULTIPLE.") " => null
- );
- $this->section_metadatas = $this->mdbView->getMetadatas($section_params);
- if($this->section_metadatas === false) {
- return 'error';
- }
-
- $sort_params = array(
- "multidatabase_id" => intval($this->multidatabase_id),
- "sort_flag" => _ON,
- "list_flag" => _ON
- );
- $this->sort_metadatas = $this->mdbView->getMetadatas($sort_params);
- if($this->sort_metadatas === false) {
- return 'error';
- }
-
- $sort_section = $this->session->getParameter(array("multidatabase", $this->block_id, "sort_section"));
- if(!empty($this->sort_section)) {
- $this->session->setParameter(array("multidatabase", $this->block_id, "sort_section"), $this->sort_section);
- if($sort_section != $this->sort_section) {
- // カテゴリ変更を行った場合、1ページ目を表示する。
- $this->now_page = 1;
- }
- }else if(!empty($sort_section)) {
- $this->sort_section = $sort_section;
- }
- $where_params = array();
- if(!empty($this->sort_section)) {
- foreach($this->sort_section as $key => $val) {
- $where_params["m_content".$key.".content"] = $val;
- }
- }
-
- $visible_item = $this->session->getParameter(array("multidatabase", $this->block_id, "visible_item"));
- if($this->visible_item != "") {
- if($visible_item != "" && $this->visible_item != $visible_item) {
- $this->now_page = 1;
- }
- $this->session->setParameter(array("multidatabase", $this->block_id, "visible_item"), $this->visible_item);
- }else if($visible_item != ""){
- $this->visible_item = $visible_item;
- }else {
- $this->visible_item = $this->mdb_obj['visible_item'];
- }
-
- $sort_metadata = $this->session->getParameter(array("multidatabase", $this->block_id, "sort_metadata"));
- if(!empty($this->sort_metadata)) {
- $this->session->setParameter(array("multidatabase", $this->block_id, "sort_metadata"), $this->sort_metadata);
- if($sort_metadata != $this->sort_metadata) {
- // 並べ替えを行った場合、1ページ目を表示する。
- $this->now_page = 1;
- }
- }else if(!empty($sort_metadata)) {
- $this->sort_metadata = $sort_metadata;
- }else {
- $this->sort_metadata = $this->mdb_obj['default_sort'];
- }
- if($this->sort_metadata != MULTIDATABASE_DEFAULT_DATE_SORT
- && $this->sort_metadata != MULTIDATABASE_DEFAULT_DATE_ASC_SORT
- && $this->sort_metadata != MULTIDATABASE_DEFAULT_VOTE_SORT
- && $this->sort_metadata != MULTIDATABASE_DEFAULT_SEQUENCE_SORT
- && !array_key_exists($this->sort_metadata, $this->sort_metadatas)) {
- $this->sort_metadata = MULTIDATABASE_DEFAULT_SEQUENCE_SORT;
- }
-
- $mdbcount = $this->mdbView->getMDBListCount($this->multidatabase_id, $this->metadatas, $where_params);
- if($mdbcount === false) {
- return 'error';
- }
- if($mdbcount == 0) {
- $this->exists = false;
- return 'success';
- }
-
- $now_page = $this->session->getParameter(array("multidatabase", $this->block_id, "now_page"));
- if(!empty($this->now_page)) {
- $this->session->setParameter(array("multidatabase", $this->block_id, "now_page"), $this->now_page);
- }else if(!empty($now_page)){
- $this->now_page = $now_page;
- }
-
- if(!empty($this->visible_item)) {
- $this->setPageInfo($mdbcount, $this->visible_item, $this->now_page);
- }
-
- 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) {
- $order_params = array(
- "{multidatabase_content}.insert_time" => "DESC"
- );
- }else if($this->sort_metadata == MULTIDATABASE_DEFAULT_DATE_ASC_SORT) {
- $order_params = array(
- "{multidatabase_content}.insert_time" => "ASC"
- );
- }else if($this->sort_metadata == MULTIDATABASE_DEFAULT_VOTE_SORT) {
- $order_params = array(
- "{multidatabase_content}.vote_count" => "DESC"
- );
- }else if(isset($this->sort_metadatas[$this->sort_metadata]) && ($this->sort_metadatas[$this->sort_metadata]["type"] == MULTIDATABASE_META_TYPE_FILE || $this->sort_metadatas[$this->sort_metadata]["type"] == MULTIDATABASE_META_TYPE_IMAGE)) {
- $order_params = array(
- "F".$this->sort_metadata.".file_name" => "ASC",
- "{multidatabase_content}.insert_time" => "DESC"
- );
- }else if (isset($this->sort_metadatas[$this->sort_metadata]) && $this->sort_metadatas[$this->sort_metadata]["type"] == MULTIDATABASE_META_TYPE_INSERT_TIME){
- $order_params = array(
- "{multidatabase_content}.insert_time" => "ASC"
- );
- }else if (isset($this->sort_metadatas[$this->sort_metadata]) && $this->sort_metadatas[$this->sort_metadata]["type"] == MULTIDATABASE_META_TYPE_UPDATE_TIME){
- $order_params = array(
- "{multidatabase_content}.update_time" => "ASC"
- );
- }else{
- $order_params = array(
- "m_content".$this->sort_metadata.".content" => "ASC",
- "{multidatabase_content}.insert_time" => "DESC"
- );
- }
-
- $this->mdblist = $this->mdbView->getMDBList($this->multidatabase_id, $this->metadatas, $where_params, $order_params, $this->visible_item, $this->disp_begin);
- if($this->mdblist === false) {
- return 'error';
- }
-
- return 'success';
- }
-
- /**
- * ページに関する設定を行います
- *
- * @param int disp_cnt 1ページ当り表示件数
- * @param int now_page 現ページ
- */
- function setPageInfo($data_cnt, $disp_cnt, $now_page = NULL){
- $this->data_cnt = $data_cnt;
- // now page
- $this->now_page = (NULL == $now_page) ? 1 : $now_page;
- // total page
- $this->total_page = ceil($this->data_cnt / $disp_cnt);
- if($this->total_page < $this->now_page) {
- $this->now_page = 1;
- }
- // link array {{
- if(($this->now_page - MULTIDATABASE_FRONT_AND_BEHIND_LINK_CNT) > 0){
- $start = $this->now_page - MULTIDATABASE_FRONT_AND_BEHIND_LINK_CNT;
- }else{
- $start = 1;
- }
- if(($this->now_page + MULTIDATABASE_FRONT_AND_BEHIND_LINK_CNT) >= $this->total_page){
- $end = $this->total_page;
- }else{
- $end = $this->now_page + MULTIDATABASE_FRONT_AND_BEHIND_LINK_CNT;
- }
- $i = 0;
- for($i = $start; $i <= $end; $i++){
- $this->link_array[] = $i;
- }
- // next link
- if($disp_cnt < $this->data_cnt){
- if($this->now_page < $this->total_page){
- $this->next_link = TRUE;
- }
- }
- // prev link
- if(1 < $this->now_page){
- $this->prev_link = TRUE;
- }
- // begin disp number
- $this->disp_begin = ($this->now_page - 1) * $disp_cnt;
- // end disp number
- $tmp_cnt = $this->now_page * $disp_cnt;
- $this->disp_end = ($this->data_cnt < $tmp_cnt) ? $this->data_cnt : $tmp_cnt;
- }
-}
+session->getParameter( "_mobile_flag" ) == true ) {
+ $this->block_num = $this->mobileView->getCountForBlockInPageWithBlock( $this->block_id );
+ $this->html_flag = $this->mobileView->getTextHtmlMode( $this->html_flag );
+ }
+
+ if(empty($this->metadatas)) {
+ $this->metadata_exists = false;
+ return 'success';
+ }
+
+ $section_params = array(
+ "multidatabase_id" => intval($this->multidatabase_id),
+ "list_flag" => _ON,
+ "type IN (".MULTIDATABASE_META_TYPE_SECTION.",".MULTIDATABASE_META_TYPE_MULTIPLE.") " => null
+ );
+ $this->section_metadatas = $this->mdbView->getMetadatas($section_params);
+ if($this->section_metadatas === false) {
+ return 'error';
+ }
+
+ $sort_params = array(
+ "multidatabase_id" => intval($this->multidatabase_id),
+ "sort_flag" => _ON,
+ "list_flag" => _ON
+ );
+ $this->sort_metadatas = $this->mdbView->getMetadatas($sort_params);
+ if($this->sort_metadatas === false) {
+ return 'error';
+ }
+
+ $sort_section = $this->session->getParameter(array("multidatabase", $this->block_id, "sort_section"));
+ if(!empty($this->sort_section)) {
+ $this->session->setParameter(array("multidatabase", $this->block_id, "sort_section"), $this->sort_section);
+ // 初回、セッションの $sort_section は空なので、その判定を追加 by nagahara@opensource-workshop.jp
+ if(!empty($sort_section) && $sort_section != $this->sort_section) {
+ // カテゴリ変更を行った場合、1ページ目を表示する。
+ $this->now_page = 1;
+ }
+ }else if(!empty($sort_section)) {
+ $this->sort_section = $sort_section;
+ }
+ $where_params = array();
+ if(!empty($this->sort_section)) {
+ foreach($this->sort_section as $key => $val) {
+ $where_params["m_content".$key.".content"] = $val;
+ }
+ }
+
+ $visible_item = $this->session->getParameter(array("multidatabase", $this->block_id, "visible_item"));
+ if($this->visible_item != "") {
+ if($visible_item != "" && $this->visible_item != $visible_item) {
+ $this->now_page = 1;
+ }
+ $this->session->setParameter(array("multidatabase", $this->block_id, "visible_item"), $this->visible_item);
+ }else if($visible_item != ""){
+ $this->visible_item = $visible_item;
+ }else {
+ $this->visible_item = $this->mdb_obj['visible_item'];
+ }
+
+ $sort_metadata = $this->session->getParameter(array("multidatabase", $this->block_id, "sort_metadata"));
+ if(!empty($this->sort_metadata)) {
+ $this->session->setParameter(array("multidatabase", $this->block_id, "sort_metadata"), $this->sort_metadata);
+ // 初回、セッションの $sort_metadata は空なので、その判定を追加 by nagahara@opensource-workshop.jp
+ if(!empty($sort_metadata) && $sort_metadata != $this->sort_metadata) {
+ // 並べ替えを行った場合、1ページ目を表示する。
+ $this->now_page = 1;
+ }
+ }else if(!empty($sort_metadata)) {
+ $this->sort_metadata = $sort_metadata;
+ }else {
+ $this->sort_metadata = $this->mdb_obj['default_sort'];
+ }
+ if($this->sort_metadata != MULTIDATABASE_DEFAULT_DATE_SORT
+ && $this->sort_metadata != MULTIDATABASE_DEFAULT_DATE_ASC_SORT
+ && $this->sort_metadata != MULTIDATABASE_DEFAULT_VOTE_SORT
+ && $this->sort_metadata != MULTIDATABASE_DEFAULT_SEQUENCE_SORT
+ && !array_key_exists($this->sort_metadata, $this->sort_metadatas)) {
+ $this->sort_metadata = MULTIDATABASE_DEFAULT_SEQUENCE_SORT;
+ }
+
+ $mdbcount = $this->mdbView->getMDBListCount($this->multidatabase_id, $this->metadatas, $where_params);
+ if($mdbcount === false) {
+ return 'error';
+ }
+ if($mdbcount == 0) {
+ $this->exists = false;
+ return 'success';
+ }
+
+ $now_page = $this->session->getParameter(array("multidatabase", $this->block_id, "now_page"));
+ if(!empty($this->now_page)) {
+ $this->session->setParameter(array("multidatabase", $this->block_id, "now_page"), $this->now_page);
+ }else if(!empty($now_page)){
+ $this->now_page = $now_page;
+ }
+
+ if(!empty($this->visible_item)) {
+ $this->setPageInfo($mdbcount, $this->visible_item, $this->now_page);
+ }
+
+ 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) {
+ $order_params = array(
+ "{multidatabase_content}.insert_time" => "DESC"
+ );
+ }else if($this->sort_metadata == MULTIDATABASE_DEFAULT_DATE_ASC_SORT) {
+ $order_params = array(
+ "{multidatabase_content}.insert_time" => "ASC"
+ );
+ }else if($this->sort_metadata == MULTIDATABASE_DEFAULT_VOTE_SORT) {
+ $order_params = array(
+ "{multidatabase_content}.vote_count" => "DESC"
+ );
+ }else if(isset($this->sort_metadatas[$this->sort_metadata]) && ($this->sort_metadatas[$this->sort_metadata]["type"] == MULTIDATABASE_META_TYPE_FILE || $this->sort_metadatas[$this->sort_metadata]["type"] == MULTIDATABASE_META_TYPE_IMAGE)) {
+ $order_params = array(
+ "F".$this->sort_metadata.".file_name" => "ASC",
+ "{multidatabase_content}.insert_time" => "DESC"
+ );
+ }else if (isset($this->sort_metadatas[$this->sort_metadata]) && $this->sort_metadatas[$this->sort_metadata]["type"] == MULTIDATABASE_META_TYPE_INSERT_TIME){
+ $order_params = array(
+ "{multidatabase_content}.insert_time" => "ASC"
+ );
+ }else if (isset($this->sort_metadatas[$this->sort_metadata]) && $this->sort_metadatas[$this->sort_metadata]["type"] == MULTIDATABASE_META_TYPE_UPDATE_TIME){
+ $order_params = array(
+ "{multidatabase_content}.update_time" => "ASC"
+ );
+ }else{
+ $order_params = array(
+ "m_content".$this->sort_metadata.".content" => "ASC",
+ "{multidatabase_content}.insert_time" => "DESC"
+ );
+ }
+
+ $this->mdblist = $this->mdbView->getMDBList($this->multidatabase_id, $this->metadatas, $where_params, $order_params, $this->visible_item, $this->disp_begin);
+ if($this->mdblist === false) {
+ return 'error';
+ }
+
+ return 'success';
+ }
+
+ /**
+ * ページに関する設定を行います
+ *
+ * @param int disp_cnt 1ページ当り表示件数
+ * @param int now_page 現ページ
+ */
+ function setPageInfo($data_cnt, $disp_cnt, $now_page = NULL){
+ $this->data_cnt = $data_cnt;
+ // now page
+ $this->now_page = (NULL == $now_page) ? 1 : $now_page;
+ // total page
+ $this->total_page = ceil($this->data_cnt / $disp_cnt);
+ if($this->total_page < $this->now_page) {
+ $this->now_page = 1;
+ }
+ // link array {{
+ if(($this->now_page - MULTIDATABASE_FRONT_AND_BEHIND_LINK_CNT) > 0){
+ $start = $this->now_page - MULTIDATABASE_FRONT_AND_BEHIND_LINK_CNT;
+ }else{
+ $start = 1;
+ }
+ if(($this->now_page + MULTIDATABASE_FRONT_AND_BEHIND_LINK_CNT) >= $this->total_page){
+ $end = $this->total_page;
+ }else{
+ $end = $this->now_page + MULTIDATABASE_FRONT_AND_BEHIND_LINK_CNT;
+ }
+ $i = 0;
+ for($i = $start; $i <= $end; $i++){
+ $this->link_array[] = $i;
+ }
+ // next link
+ if($disp_cnt < $this->data_cnt){
+ if($this->now_page < $this->total_page){
+ $this->next_link = TRUE;
+ }
+ }
+ // prev link
+ if(1 < $this->now_page){
+ $this->prev_link = TRUE;
+ }
+ // begin disp number
+ $this->disp_begin = ($this->now_page - 1) * $disp_cnt;
+ // end disp number
+ $tmp_cnt = $this->now_page * $disp_cnt;
+ $this->disp_end = ($this->data_cnt < $tmp_cnt) ? $this->data_cnt : $tmp_cnt;
+ }
+}
?>
\ No newline at end of file
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 7842357..60d4a3e 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
@@ -199,6 +199,11 @@ function execute()
$order_params = array(
"{multidatabase_content}.insert_time" => "ASC"
);
+ }else if($this->sort_metadata == MULTIDATABASE_DEFAULT_VOTE_SORT) {
+ $order_params = array(
+ "{multidatabase_content}.vote_count" => "DESC",
+ "{multidatabase_content}.insert_time" => "DESC"
+ );
}else if(isset($this->sort_metadatas[$this->sort_metadata]) && ($this->sort_metadatas[$this->sort_metadata]["type"] == MULTIDATABASE_META_TYPE_FILE || $this->sort_metadatas[$this->sort_metadata]["type"] == MULTIDATABASE_META_TYPE_IMAGE)) {
$order_params = array(
"F".$this->sort_metadata.".file_name" => "ASC",
diff --git a/html/webapp/modules/photoalbum/files/css/default/style.css b/html/webapp/modules/photoalbum/files/css/default/style.css
index 7f559f4..e999c37 100644
--- a/html/webapp/modules/photoalbum/files/css/default/style.css
+++ b/html/webapp/modules/photoalbum/files/css/default/style.css
@@ -221,7 +221,7 @@ span.photoalbum_comment_time {
margin-right:5px;
}
form.photoalbum_comment_form {
- width:450px;
+ width:455px;
}
form.photoalbum_photo_form {
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
index dc46f80..05911ef 100644
--- a/html/webapp/modules/photoalbum/install.ini
+++ b/html/webapp/modules/photoalbum/install.ini
@@ -1,4 +1,4 @@
-version = "2.4.0.0"
+version = "2.4.0.2"
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/photoalbum/language/chinese/main.ini b/html/webapp/modules/photoalbum/language/chinese/main.ini
index 9dd0041..ecb12b8 100644
--- a/html/webapp/modules/photoalbum/language/chinese/main.ini
+++ b/html/webapp/modules/photoalbum/language/chinese/main.ini
@@ -1,7 +1,7 @@
[Photoalbum_View_Edit_List:Photoalbum_View_Edit_Entry:Photoalbum_Action_Edit_Entry]
photoalbum_photoalbum_name = "相册标题"
-[Photoalbum_View_Edit_List:Photoalbum_View_Edit_Style]
+[Photoalbum_View_Main_Init:Photoalbum_View_Edit_List:Photoalbum_View_Edit_Style]
photoalbum_no_photoalbum = "暂无相片专辑"
[Photoalbum_View_Edit_List]
diff --git a/html/webapp/modules/photoalbum/language/english/main.ini b/html/webapp/modules/photoalbum/language/english/main.ini
index 9533695..ec3d23b 100644
--- a/html/webapp/modules/photoalbum/language/english/main.ini
+++ b/html/webapp/modules/photoalbum/language/english/main.ini
@@ -1,7 +1,7 @@
[Photoalbum_View_Edit_List:Photoalbum_View_Edit_Entry:Photoalbum_Action_Edit_Entry]
photoalbum_photoalbum_name = "Photoalbum Title"
-[Photoalbum_View_Edit_List:Photoalbum_View_Edit_Style]
+[Photoalbum_View_Main_Init:Photoalbum_View_Edit_List:Photoalbum_View_Edit_Style]
photoalbum_no_photoalbum = "No album found"
[Photoalbum_View_Edit_List]
diff --git a/html/webapp/modules/photoalbum/language/japanese/main.ini b/html/webapp/modules/photoalbum/language/japanese/main.ini
index c62004d..c85d523 100644
--- a/html/webapp/modules/photoalbum/language/japanese/main.ini
+++ b/html/webapp/modules/photoalbum/language/japanese/main.ini
@@ -1,7 +1,7 @@
[Photoalbum_View_Edit_List:Photoalbum_View_Edit_Entry:Photoalbum_Action_Edit_Entry]
photoalbum_photoalbum_name = "フォトアルバム名称"
-[Photoalbum_View_Edit_List:Photoalbum_View_Edit_Style]
+[Photoalbum_View_Main_Init:Photoalbum_View_Edit_List:Photoalbum_View_Edit_Style]
photoalbum_no_photoalbum = "現在作成されているフォトアルバムはありません。"
[Photoalbum_View_Edit_List]
diff --git a/html/webapp/modules/photoalbum/templates/default/photoalbum_mobile_view_photo.html b/html/webapp/modules/photoalbum/templates/default/photoalbum_mobile_view_photo.html
index 577937d..7ca8b82 100644
--- a/html/webapp/modules/photoalbum/templates/default/photoalbum_mobile_view_photo.html
+++ b/html/webapp/modules/photoalbum/templates/default/photoalbum_mobile_view_photo.html
@@ -109,9 +109,9 @@
$(".photo_image_wrapper<{$action.photo.photo_id}>").bind( "swiperight" );
$(".photo_image_wrapper<{$action.photo.photo_id}>").bind( "swipeleft" );
-<{if $action.prevPhoto != null}>
+<{if $action.photo.prev_photo_id != null}>
$(".photo_image_wrapper<{$action.photo.photo_id}>").bind( "swiperight", function(e) {
- $.mobile.changePage("?action=photoalbum_view_mobile_photo&block_id=<{$block_id}>&album_id=<{$action.album_id}>&photo_id=<{$action.prevPhoto.photo_id}>&seq=<{$action.seq-1}><{$session_param}>",{ transition: "slide", reverse:"true"});
+ $.mobile.changePage("?action=photoalbum_view_mobile_photo&block_id=<{$block_id}>&album_id=<{$action.album_id}>&photo_id=<{$action.photo.prev_photo_id}>&seq=<{$action.seq-1}><{$session_param}>",{ transition: "slide", reverse:"true"});
e.preventDefault();
});
<{else}>
@@ -119,9 +119,9 @@
$(this).nc_jqm_alert("<{$lang.photoalbum_no_more_photos|smarty:nodefaults}>");
});
<{/if}>
-<{if $action.nextPhoto != null}>
+<{if $action.photo.next_photo_id != null}>
$(".photo_image_wrapper<{$action.photo.photo_id}>").bind( "swipeleft", function(e) {
- $.mobile.changePage("?action=photoalbum_view_mobile_photo&block_id=<{$block_id}>&album_id=<{$action.album_id}>&photo_id=<{$action.nextPhoto.photo_id}>&seq=<{$action.photo.photo_sequence+1}><{$session_param}>");
+ $.mobile.changePage("?action=photoalbum_view_mobile_photo&block_id=<{$block_id}>&album_id=<{$action.album_id}>&photo_id=<{$action.photo.next_photo_id}>&seq=<{$action.photo.photo_sequence+1}><{$session_param}>");
e.preventDefault();
});
<{else}>
diff --git a/html/webapp/modules/photoalbum/templates/default/photoalbum_mobile_view_photo_list.html b/html/webapp/modules/photoalbum/templates/default/photoalbum_mobile_view_photo_list.html
index 4ebdbeb..0c8e90f 100644
--- a/html/webapp/modules/photoalbum/templates/default/photoalbum_mobile_view_photo_list.html
+++ b/html/webapp/modules/photoalbum/templates/default/photoalbum_mobile_view_photo_list.html
@@ -30,7 +30,7 @@
+<{/strip}>
\ No newline at end of file
diff --git a/html/webapp/modules/reservation/templates/default/reservation_view_main_init_location.html b/html/webapp/modules/reservation/templates/default/reservation_view_main_init_location.html
index 8f24088..6eae9a2 100644
--- a/html/webapp/modules/reservation/templates/default/reservation_view_main_init_location.html
+++ b/html/webapp/modules/reservation/templates/default/reservation_view_main_init_location.html
@@ -12,11 +12,33 @@
+ <{if $action.reserve_block.display_timeframe == $smarty.const._ON}>
+
+ <{/if}>
+
+ <{if $action.reserve_block.display_timeframe == $smarty.const._ON}>
+
+
+
+ <{assign var=start_pos value=0}>
+ <{foreach from=$action.timeframe_list item=timeframe}>
+ <{assign var=spacer_width value=`$timeframe.left-$start_pos`}>
+
+
transparent<{else}><{$timeframe.timeframe_color}><{/if}>" title="<{$timeframe.start_time|timezone_date:false:$lang._short_time_format}><{$lang.reservation_time_pause}><{$timeframe.end_time|timezone_date:false:$lang._short_time_format}>">
+ <{$timeframe.timeframe_name}>
+
+ <{assign var=start_pos value=$timeframe.left+$timeframe.width}>
+ <{/foreach}>
+
+
+
+ <{/if}>
+
<{section name=hour loop=24 start=0 step=1}>
<{assign var=hour value=$smarty.section.hour.index}>
@@ -31,7 +53,7 @@
<{foreach name="location_list" key="location_id" item="location" from=$action.location_list}>
-
+
<{if ($action.reserve_data.$location_id.$view_date) }>
<{include file="reservation_view_main_list_location.html"}>
<{else}>
diff --git a/html/webapp/modules/reservation/templates/default/reservation_view_main_init_weekly.html b/html/webapp/modules/reservation/templates/default/reservation_view_main_init_weekly.html
index 68e7b92..371669b 100644
--- a/html/webapp/modules/reservation/templates/default/reservation_view_main_init_weekly.html
+++ b/html/webapp/modules/reservation/templates/default/reservation_view_main_init_weekly.html
@@ -1,7 +1,7 @@
<{strip}>
<{assign var="lang_year" value=$lang.reservation_monthly_year_format|smarty:nodefaults|date:"`$action.current_timestamp`"}>
-<{assign var="lang_month" value=$lang.reservation_monthly_month_format|smarty:nodefaults|date:"`$action.current_timestamp`"}>
+<{assign var="lang_month" value=$lang.reservation_monthly_month_format|smarty:nodefaults|date:"`$action.current_timestamp`"}>
<{include file="reservation_main_header_weekly.html"}>
@@ -12,6 +12,11 @@
+ <{if $action.reserve_block.display_timeframe == $smarty.const._ON}>
+
+ /images/common/blank.gif" alt="" title="" />
+
+ <{/if}>
/images/common/blank.gif" alt="" title="" />
@@ -24,7 +29,7 @@
<{/if}>
<{assign var="index" value=$smarty.section.timestamp.iteration-1}>
<{assign var="wday" value="w"|date:"`$timestamp`"}>
-
+
<{assign var="wday_data" value=$action.week_list.$wday}>
<{assign var="lang_wday" value=$lang.reservation_wday_format|smarty:nodefaults|sprintf:"`$wday_data.name`"}>
<{assign var="lang_day" value=$lang.reservation_weekly_format|smarty:nodefaults|date:"`$timestamp`"}>
@@ -32,7 +37,7 @@
<{include file="reservation_main_set_day_class.html" assign="day_class" view_date=$action.view_date set_date=$date wday=$wday}>
<{assign var="lang_year" value=$lang.reservation_monthly_year_format|smarty:nodefaults|date:"`$timestamp`"}>
- <{assign var="lang_month" value=$lang.reservation_monthly_month_format|smarty:nodefaults|date:"`$timestamp`"}>
+ <{assign var="lang_month" value=$lang.reservation_monthly_month_format|smarty:nodefaults|date:"`$timestamp`"}>
@@ -60,7 +65,24 @@
<{assign var=hour value=$smarty.section.hour.index}>
-
+ <{if $action.reserve_block.display_timeframe == $smarty.const._ON && ($smarty.section.hour.first)}>
+
+
+ <{assign var=start_pos value=0}>
+ <{foreach from=$action.timeframe_list item=timeframe}>
+ <{assign var=spacer_height value=`$timeframe.top-$start_pos`}>
+
+
transparent<{else}><{$timeframe.timeframe_color}><{/if}>" title="<{$timeframe.start_time|timezone_date:false:$lang._short_time_format}><{$lang.reservation_time_pause}><{$timeframe.end_time|timezone_date:false:$lang._short_time_format}>">
+
<{include file="reservation_main_addreserve.html" view_date=$first_date timeframe_id=`$timeframe.timeframe_id`}>
+ <{$timeframe.timeframe_name}>
+
+ <{assign var=start_pos value=$timeframe.top+$timeframe.height}>
+ <{/foreach}>
+
+
+ <{/if}>
+
+
<{$lang.reservation_time_format|smarty:nodefaults|sprintf:$hour}>
<{include file="reservation_main_addreserve.html" view_date=$first_date hour=$hour}>
@@ -71,8 +93,8 @@
<{section name=timestamp loop=$action.end_timestamp start=$action.start_timestamp step=86400}>
<{assign var="timestamp" value=$smarty.section.timestamp.index}>
<{assign var="date" value="Ymd"|date:$smarty.section.timestamp.index}>
-
-
+
+
<{if ($action.reserve_data.$date) }>
<{include file="./reservation_view_main_list_weekly.html"}>
@@ -81,13 +103,18 @@
<{/if}>
-
+
<{/section}>
<{/if}>
<{/section}>
+ <{if $action.reserve_block.display_timeframe == $smarty.const._ON}>
+
+
+ <{/if}>
+
/images/common/blank.gif" alt="" title="" />
diff --git a/html/webapp/modules/reservation/templates/default/reservation_view_main_list_location.html b/html/webapp/modules/reservation/templates/default/reservation_view_main_list_location.html
index 73d62ea..c3332ba 100644
--- a/html/webapp/modules/reservation/templates/default/reservation_view_main_list_location.html
+++ b/html/webapp/modules/reservation/templates/default/reservation_view_main_list_location.html
@@ -17,7 +17,7 @@
<{$reserve.short_title}>
<{else}>
-
+
<{$reserve.insert_user_name}>
<{/if}>
diff --git a/html/webapp/modules/reservation/templates/default/reservation_view_main_list_monthly.html b/html/webapp/modules/reservation/templates/default/reservation_view_main_list_monthly.html
index 426c962..fa5e12b 100644
--- a/html/webapp/modules/reservation/templates/default/reservation_view_main_list_monthly.html
+++ b/html/webapp/modules/reservation/templates/default/reservation_view_main_list_monthly.html
@@ -20,7 +20,7 @@
<{$reserve.short_title}>
<{else}>
-
+
/images/common/blank.gif" class="icon <{$reserve_class}> reservation_reserve_mark" alt="" title="" />
<{$reserve.insert_user_name}>
diff --git a/html/webapp/modules/reservation/templates/default/reservation_view_main_list_weekly.html b/html/webapp/modules/reservation/templates/default/reservation_view_main_list_weekly.html
index b57d0b9..2a32298 100644
--- a/html/webapp/modules/reservation/templates/default/reservation_view_main_list_weekly.html
+++ b/html/webapp/modules/reservation/templates/default/reservation_view_main_list_weekly.html
@@ -17,7 +17,7 @@
<{$reserve.short_title}>
<{else}>
-
+
<{$reserve.insert_user_name}>
<{/if}>
diff --git a/html/webapp/modules/reservation/templates/default/reservation_view_main_reserve_regist.html b/html/webapp/modules/reservation/templates/default/reservation_view_main_reserve_regist.html
index 342f203..dcf37ea 100644
--- a/html/webapp/modules/reservation/templates/default/reservation_view_main_reserve_regist.html
+++ b/html/webapp/modules/reservation/templates/default/reservation_view_main_reserve_regist.html
@@ -19,7 +19,7 @@
<{include file="reservation_reserve_regist_location.html" reserve=$action.reserve|smarty:nodefaults}>
-
+
<{if ($action.details_flag == _ON) }>
<{include file="reservation_reserve_regist_contact.html" reserve=$action.reserve|smarty:nodefaults}>
@@ -36,7 +36,7 @@
<{/if}>
<{/if}>
-
+
<{if ($action.mail_send == _ON) }>
<{include file="reservation_reserve_regist_mail.html" reserve=$action.reserve|smarty:nodefaults}>
@@ -82,6 +82,10 @@
reservationCls["<{$id}>"].initRepeat();
<{/if}>
reservationCls["<{$id}>"].switchTime24Reserve($("reservation_form<{$id}>"));
+ if($("reservation_start_timeframe<{$id}>")) {
+ reservationCls["<{$id}>"].switchTimeframe($("reservation_start_timeframe<{$id}>"), $("reservation_form<{$id}>"), "start" );
+ reservationCls["<{$id}>"].switchTimeframe($("reservation_end_timeframe<{$id}>"), $("reservation_form<{$id}>"), "end" );
+ }
commonCls.focus("<{$id}>");
diff --git a/html/webapp/modules/reservation/templates/default/reservation_view_recursive_room.html b/html/webapp/modules/reservation/templates/default/reservation_view_recursive_room.html
index 3c9d551..01b6a7f 100644
--- a/html/webapp/modules/reservation/templates/default/reservation_view_recursive_room.html
+++ b/html/webapp/modules/reservation/templates/default/reservation_view_recursive_room.html
@@ -22,7 +22,7 @@
<{assign var="reserve_name" value=$room.page_name}>
<{/if}>
- <{if (($reserve_flag != RESERVATION_PRIVATE || $action.private_space && $reserve_flag == RESERVATION_PRIVATE) && ($reserve_flag != RESERVATION_GROUP || $reserve_flag == RESERVATION_GROUP && $room.thread_num != 0)) }>
+ <{if (($reserve_flag != RESERVATION_PRIVATE || $action.location.hasPrivateReserveAuthority && $reserve_flag == RESERVATION_PRIVATE) && ($reserve_flag != RESERVATION_GROUP || $reserve_flag == RESERVATION_GROUP && $room.thread_num != 0)) }>
<{assign var="room_id" value=$room.page_id}>
<{if ($reserve_flag == RESERVATION_GROUP) }>
<{assign var="indent" value=$room.thread_num-1}>
@@ -30,7 +30,7 @@
<{assign var="indent" value=$room.thread_num}>
<{/if}>
- <{if ($reserve_flag != RESERVATION_PUBLIC && ($action_name == "reservation_view_edit_location_add" || $action_name == "reservation_view_edit_location_modify")) }>
+ <{if ($action_name == "reservation_view_edit_location_add" || $action_name == "reservation_view_edit_location_modify") }>
<{assign var="select_rooms" value=$action.select_rooms.$reserve_flag}>
@@ -41,7 +41,7 @@
- <{elseif ($reserve_flag != RESERVATION_PUBLIC && ($action_name == "reservation_view_main_location_details"))}>
+ <{elseif ($action_name == "reservation_view_main_location_details") }>
<{assign var="select_rooms" value=$action.select_rooms.$reserve_flag}>
<{if ($select_rooms.$room_id) }><{else}> class="disable_lbl"<{/if}>>
<{" "|str_repeat:$indent}>
diff --git a/html/webapp/modules/reservation/update/Update.class.php b/html/webapp/modules/reservation/update/Update.class.php
index 4cb9b39..4cf030a 100644
--- a/html/webapp/modules/reservation/update/Update.class.php
+++ b/html/webapp/modules/reservation/update/Update.class.php
@@ -16,6 +16,15 @@ class Reservation_Update extends Action
function execute()
{
+ $adodb = $this->db->getAdoDbObject();
+ $metaColumns = $adodb->MetaColumns($this->db->getPrefix()."reservation_location");
+ if (!isset($metaColumns["use_auth_flag"]) && !isset($metaColumns["USE_AUTH_FLAG"])) {
+ $sql = "ALTER TABLE `".$this->db->getPrefix()."reservation_location"."` ADD `use_auth_flag` TINYINT unsigned NOT NULL default '0' AFTER `use_private_flag` ;";
+ $result = $this->db->execute($sql);
+ if ($result === false) {
+ return false;
+ }
+ }
// reservation_blockにindexを追加
$sql = "SHOW INDEX FROM `".$this->db->getPrefix()."reservation_block` ;";
$results = $this->db->execute($sql);
@@ -181,6 +190,66 @@ function execute()
$result = $this->db->execute($sql);
if($result === false) return false;
}
+
+ $sql = "SELECT RD.reserve_details_id, "
+ . "R.room_id "
+ . "FROM {reservation_reserve_details} RD "
+ . "LEFT JOIN {reservation_reserve} R "
+ . "ON RD.reserve_details_id = R.reserve_details_id "
+ . "WHERE R.room_id != RD.room_id "
+ . "OR R.room_id IS NULL "
+ . "GROUP BY RD.reserve_details_id";
+ $reserves = $this->db->execute($sql);
+ foreach ($reserves as $reserve) {
+ $whereArray = array(
+ 'reserve_details_id' => $reserve['reserve_details_id']
+ );
+ if (isset($reserve['room_id'])) {
+ $updateColumns = array(
+ 'room_id' => $reserve['room_id']
+ );
+ $result = $this->db->updateExecute('reservation_reserve_details', $updateColumns, $whereArray, false);
+ } else {
+ $result = $this->db->deleteExecute('reservation_reserve_details', $whereArray);
+ }
+ if ($result === false) {
+ return false;
+ }
+ }
+
+ // reservation_blockにカラムを追加
+ $adodb = $this->db->getAdoDbObject();
+ $metaColumns = $adodb->MetaColumns($this->db->getPrefix().'reservation_block');
+ if(!isset($metaColumns['DISPLAY_TIMEFRAME'])) {
+ $sql = "ALTER TABLE `".$this->db->getPrefix()."reservation_block` ".
+ " ADD `display_timeframe` TINYINT( 1 ) NOT NULL DEFAULT '0' AFTER `display_type` ;";
+ $result = $this->db->execute($sql);
+ if($result === false) return false;
+ }
+ // reservation_timeframeテーブルを追加
+ $metaTables = $adodb->MetaTables();
+ if (!in_array($this->db->getPrefix()."reservation_timeframe", $metaTables)) {
+ $sql = "CREATE TABLE `".$this->db->getPrefix()."reservation_timeframe` (" .
+ " `timeframe_id` int(11) NOT NULL default '0'," .
+ " `timeframe_name` varchar(255) default NULL," .
+ " `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;";
+ $result = $this->db->execute($sql);
+ if($result === false) return false;
+ }
+
return true;
}
}
diff --git a/html/webapp/modules/reservation/validator/Validator_LocationView.class.php b/html/webapp/modules/reservation/validator/Validator_LocationView.class.php
index c7effb7..a253258 100644
--- a/html/webapp/modules/reservation/validator/Validator_LocationView.class.php
+++ b/html/webapp/modules/reservation/validator/Validator_LocationView.class.php
@@ -71,36 +71,25 @@ function validate($attributes, $errStr, $params)
$request->setParameter("location_list", $location_list);
$request->setParameter("location_count", count($location_list));
- } elseif ($actionName == "reservation_action_main_reserve_add" || $actionName == "reservation_action_main_reserve_modify" ||
- $actionName == "reservation_action_edit_import") {
+ } elseif ($actionName == "reservation_view_main_reserve_add" || $actionName == "reservation_view_main_reserve_modify"
+ || $actionName == "reservation_view_main_reserve_switch_category" || $actionName == "reservation_view_main_reserve_switch_location"
+ || $actionName == "reservation_action_main_reserve_add" || $actionName == "reservation_action_main_reserve_modify"
+ || $actionName == "reservation_action_edit_import"
+ ) {
$location = $reservationView->getLocation($attributes["location_id"]);
if (empty($location)) {
return $errStr;
}
- $request->setParameter("location", $location);
-
- $select_rooms = $reservationView->getAddLocationRoom();
- if (empty($select_rooms)) {
- $select_rooms = array();
- }
- $request->setParameter("allow_add_rooms", $select_rooms);
-
- } elseif ($actionName == "reservation_view_main_reserve_add" || $actionName == "reservation_view_main_reserve_modify" ||
- $actionName == "reservation_view_main_reserve_switch_category" || $actionName == "reservation_view_main_reserve_switch_location") {
-
- $location = $reservationView->getLocation($attributes["location_id"]);
- if (empty($location)) {
- return $errStr;
+ $allow_add_rooms = $reservationView->getAddLocationRoom($location);
+ if (empty($allow_add_rooms)) {
+ $allow_add_rooms = array();
}
$request->setParameter("location", $location);
+ $request->setParameter("allow_add_rooms", $allow_add_rooms);
- $select_rooms = $reservationView->getAddLocationRoom();
- if (empty($select_rooms)) {
- $select_rooms = array();
- }
- $request->setParameter("allow_add_rooms", $select_rooms);
-
- if ($actionName != "reservation_view_main_reserve_switch_location") {
+ if ($actionName == "reservation_view_main_reserve_add" || $actionName == "reservation_view_main_reserve_modify"
+ || $actionName == "reservation_view_main_reserve_switch_category"
+ ) {
if ($attributes["category_id"] > 0) {
$location_list = $reservationView->getLocations($attributes["category_id"]);
} else {
diff --git a/html/webapp/modules/reservation/validator/Validator_TimeframeAdjustment.class.php b/html/webapp/modules/reservation/validator/Validator_TimeframeAdjustment.class.php
new file mode 100644
index 0000000..0ced79b
--- /dev/null
+++ b/html/webapp/modules/reservation/validator/Validator_TimeframeAdjustment.class.php
@@ -0,0 +1,76 @@
+getComponent("Request");
+ $reservationView =& $container->getComponent("reservationView");
+
+ $actionChain =& $container->getComponent("ActionChain");
+ $actionName = $actionChain->getCurActionName();
+
+ $block = $request->getParameter('reserve_block');
+ if($block['display_timeframe'] == _OFF) {
+ return;
+ }
+
+ if ($actionName == "reservation_view_main_reserve_add") {
+ if(!isset($attributes['timeframe_id'])) {
+ return;
+ }
+ $timeframe_id = $attributes['timeframe_id'];
+ $timeframe = $reservationView->getTimeframe($timeframe_id);
+ if($timeframe && is_array($timeframe)) {
+ $request->setParameter('start_hour', $timeframe['start_time_view_hour']);
+ $request->setParameter('start_minute', $timeframe['start_time_view_min']);
+ $request->setParameter('end_hour', $timeframe['end_time_view_hour']);
+ $request->setParameter('end_minute', $timeframe['end_time_view_min']);
+ $request->setParameter('start_timeframe_id', $timeframe['timeframe_id']);
+ $request->setParameter('end_timeframe_id', $timeframe['timeframe_id']);
+ $request->setParameter('start_timeframe', $timeframe);
+ $request->setParameter('end_timeframe', $timeframe);
+ }
+ }
+ elseif($actionName == "reservation_view_main_reserve_modify" ||
+ $actionName == "reservation_view_main_reserve_details") {
+ $reserve = $request->getParameter("reserve");
+ if($reserve) {
+ $start_timeframe = $reservationView->getTimeframeByStartTime($reserve['start_time']);
+ if($start_timeframe) {
+ $request->setParameter('start_timeframe_id', $start_timeframe['timeframe_id']);
+ $request->setParameter('start_timeframe', $start_timeframe);
+ }
+ $end_timeframe = $reservationView->getTimeframeByEndTime($reserve['end_time']);
+ if($end_timeframe) {
+ $request->setParameter('end_timeframe_id', $end_timeframe['timeframe_id']);
+ $request->setParameter('end_timeframe', $end_timeframe);
+ }
+ }
+ }
+ return;
+ }
+}
+?>
\ No newline at end of file
diff --git a/html/webapp/modules/reservation/validator/Validator_TimeframeListView.class.php b/html/webapp/modules/reservation/validator/Validator_TimeframeListView.class.php
new file mode 100644
index 0000000..df6e532
--- /dev/null
+++ b/html/webapp/modules/reservation/validator/Validator_TimeframeListView.class.php
@@ -0,0 +1,51 @@
+getComponent("reservationView");
+
+ $request =& $container->getComponent("Request");
+
+ $actionChain =& $container->getComponent("ActionChain");
+ $actionName = $actionChain->getCurActionName();
+
+
+ if($actionName == 'reservation_view_main_init') {
+ $divided_flag = true;
+ }
+ else {
+ $divided_flag = false;
+ }
+ $timeframe_list = $reservationView->getTimeframes($divided_flag);
+ $request->setParameter('timeframe_list', $timeframe_list);
+
+ $request->setParameter('timeframe_list_count', count($timeframe_list));
+
+ return;
+ }
+}
+?>
diff --git a/html/webapp/modules/reservation/validator/Validator_TimeframeTimetable.class.php b/html/webapp/modules/reservation/validator/Validator_TimeframeTimetable.class.php
new file mode 100644
index 0000000..13b4057
--- /dev/null
+++ b/html/webapp/modules/reservation/validator/Validator_TimeframeTimetable.class.php
@@ -0,0 +1,57 @@
+getComponent("Request");
+ $reservationView =& $container->getComponent("reservationView");
+
+ // このValidatorの前にlocationTimetable Validatorが実行されていることが前提
+
+ // 指定された時刻をGMTに修正したうえでチェック
+ $start_time = timezone_date($request->getParameter('start_time'), true, 'His');
+ $end_time = timezone_date($request->getParameter('end_time'), true, 'His');
+
+ // 0:00-24:00 の場合だけあり得る
+ if($start_time == $end_time) {
+ $end_time = strval(intval($end_time)+240000);
+ }
+
+ $ret = $reservationView->getTimeframeDuplicate($attributes['timeframe_id'], $start_time, $end_time);
+ if($ret == false) {
+ return $errStr;
+ }
+
+ // 差分チェックは入力データで行う
+ $diff = $reservationView->TimeDiff($request->getParameter('start_time'), $request->getParameter('end_time'));
+ if ($diff < RESERVATION_SELECT_MIN_TIME) {
+ return RESERVATION_ERR_TIMEFRAME_MIN_TIME;
+ }
+
+ return;
+ }
+}
+?>
\ No newline at end of file
diff --git a/html/webapp/modules/reservation/validator/Validator_TimeframeView.class.php b/html/webapp/modules/reservation/validator/Validator_TimeframeView.class.php
new file mode 100644
index 0000000..bc313f1
--- /dev/null
+++ b/html/webapp/modules/reservation/validator/Validator_TimeframeView.class.php
@@ -0,0 +1,55 @@
+getComponent("reservationView");
+
+ $request =& $container->getComponent("Request");
+
+ $actionChain =& $container->getComponent("ActionChain");
+ $actionName = $actionChain->getCurActionName();
+
+ if(!isset($attributes['timeframe_id']) || empty($attributes['timeframe_id'])) {
+ if($actionName == 'reservation_action_edit_timeframe_delete') {
+ return $errStr;
+ }
+ else {
+ // 新規追加
+ return;
+ }
+ }
+ $timeframe = $reservationView->getTimeframe($attributes['timeframe_id']);
+ if(!$timeframe) {
+ return $errStr;
+ }
+
+ $request->setParameter('timeframe', $timeframe);
+
+ return;
+ }
+}
+?>
diff --git a/html/webapp/modules/reservation/view/edit/import/init/Init.class.php b/html/webapp/modules/reservation/view/edit/import/init/Init.class.php
index 2f3d86e..c2bb222 100644
--- a/html/webapp/modules/reservation/view/edit/import/init/Init.class.php
+++ b/html/webapp/modules/reservation/view/edit/import/init/Init.class.php
@@ -36,32 +36,32 @@ class Reservation_View_Edit_Import_Init extends Action
var $help_end_time = "";
var $location_id = 0;
- /**
- * execute処理
- *
- * @access public
- */
- function execute()
- {
- $this->help_start_time = "090000";
- $this->help_end_time = "180000";
- $this->help_reserve_time = timezone_date_format(null, "Ymd");
+ /**
+ * execute処理
+ *
+ * @access public
+ */
+ function execute()
+ {
+ $this->help_start_time = "090000";
+ $this->help_end_time = "180000";
+ $this->help_reserve_time = timezone_date_format(null, "Ymd");
$this->category_list = $this->reservationView->getCategories();
$this->location_count_list = $this->reservationView->getCountLocationByCategory();
- $this->location_list = $this->reservationView->getLocations();
- $this->location_count = count($this->location_list);
- foreach ($this->location_list as $location) {
- $this->location = $location;
- $this->location_id = $this->location["location_id"];
+ $this->location_list = $this->reservationView->getLocations();
+ $this->location_count = count($this->location_list);
+ foreach ($this->location_list as $location) {
+ $this->location = $location;
+ $this->location_id = $this->location["location_id"];
$this->request->setParameter("location", $location);
- break;
- }
+ break;
+ }
- $this->allow_add_rooms = $this->reservationView->getAddLocationRoom();
+ $this->allow_add_rooms = $this->reservationView->getAddLocationRoom($location);
return 'success';
- }
+ }
}
?>
\ No newline at end of file
diff --git a/html/webapp/modules/reservation/view/edit/maple.ini b/html/webapp/modules/reservation/view/edit/maple.ini
index da59ff0..7087e7a 100644
--- a/html/webapp/modules/reservation/view/edit/maple.ini
+++ b/html/webapp/modules/reservation/view/edit/maple.ini
@@ -5,6 +5,7 @@ css_tab = "comp:{$theme_name}/comp_tabset.css"
_change_display = "define:reservation_view_edit_style_init"
reservation_location_manage = "_user_auth_id==_AUTH_ADMIN->commonCls.sendView('<{$id}>','reservation_view_edit_location_init');"
reservation_location_add = "_user_auth_id==_AUTH_ADMIN->commonCls.sendView('<{$id}>','reservation_view_edit_location_add');"
+reservation_timeframe = "_user_auth_id==_AUTH_ADMIN->commonCls.sendView('<{$id}>','reservation_view_edit_timeframe');"
reservation_mail = "_user_auth_id==_AUTH_ADMIN->commonCls.sendView('<{$id}>','reservation_view_edit_mail');"
reservation_csv_import = "_user_auth_id==_AUTH_ADMIN->commonCls.sendView('<{$id}>','reservation_view_edit_import_init');"
_edit_design = "define:_EDIT_DESIGN_METHOD"
diff --git a/html/webapp/modules/reservation/view/edit/style/init/Init.class.php b/html/webapp/modules/reservation/view/edit/style/init/Init.class.php
index 53b0cea..c734ce5 100644
--- a/html/webapp/modules/reservation/view/edit/style/init/Init.class.php
+++ b/html/webapp/modules/reservation/view/edit/style/init/Init.class.php
@@ -20,6 +20,7 @@ class Reservation_View_Edit_Style_Init extends Action
var $location_count = null;
var $reserve_block = null;
var $location_count_list = null;
+ var $timeframe_list_count = null;
/**
* execute処理
diff --git a/html/webapp/modules/reservation/view/edit/style/init/maple.ini b/html/webapp/modules/reservation/view/edit/style/init/maple.ini
index 548a74a..88730d1 100644
--- a/html/webapp/modules/reservation/view/edit/style/init/maple.ini
+++ b/html/webapp/modules/reservation/view/edit/style/init/maple.ini
@@ -1,6 +1,9 @@
[HeaderMenu]
1,_change_display = "define:auto"
+[SmartyAssign::reservationStyleAssign]
+global = timezone.ini
+
[AllowIdList]
room_id_arr = "ALLOW_ROOM_ID"
@@ -10,6 +13,7 @@ key:block_id.reservation.block:g = "1:lang._invalid_input"
key:reserve_block,location_count.reservation.locationExists:g = "1:lang.reservation_nolocation"
key:reserve_block,category_list.reservation.categoryView:g = "1:lang._invalid_input"
key:reserve_block.reservation.locationView:g = "1:lang._invalid_input"
+.reservation.TimeframeListView = "1:lang._invalid_input"
[View]
define:theme = 1
diff --git a/html/webapp/modules/reservation/view/edit/timeframe/Timeframe.class.php b/html/webapp/modules/reservation/view/edit/timeframe/Timeframe.class.php
new file mode 100644
index 0000000..5c1cc5f
--- /dev/null
+++ b/html/webapp/modules/reservation/view/edit/timeframe/Timeframe.class.php
@@ -0,0 +1,36 @@
+configView->getConfigByConfname($this->module_id, 'timeframe_color');
+ if($config) {
+ $this->timeframe_colors = explode('|', $config['conf_value']);
+ }
+
+ $this->timezone_list = explode("|", RESERVATION_DEF_TIMEZONE);
+
+ $this->week_list = $this->reservationView->getLocationWeekArray();
+
+ return 'success';
+ }
+}
\ No newline at end of file
diff --git a/html/webapp/modules/reservation/view/edit/timeframe/entry/maple.ini b/html/webapp/modules/reservation/view/edit/timeframe/entry/maple.ini
new file mode 100644
index 0000000..a0a305e
--- /dev/null
+++ b/html/webapp/modules/reservation/view/edit/timeframe/entry/maple.ini
@@ -0,0 +1,10 @@
+[HeaderMenu]
+mode = "nobuild"
+
+[ValidateDef]
+key:timeframe_id.reservation.TimeframeView = "1:lang._invalid_input"
+
+
+[View]
+define:theme_name = "system"
+success = "reservation_view_edit_timeframe_entry.html"
\ No newline at end of file
diff --git a/html/webapp/modules/reservation/view/edit/timeframe/maple.ini b/html/webapp/modules/reservation/view/edit/timeframe/maple.ini
new file mode 100644
index 0000000..739bcba
--- /dev/null
+++ b/html/webapp/modules/reservation/view/edit/timeframe/maple.ini
@@ -0,0 +1,17 @@
+[SmartyAssign::reservationTimeframeAssign]
+global = timezone.ini
+
+[ValidateDef]
+authcheck = "1,_user_auth_id==_AUTH_ADMIN:lang._invalid_auth"
+.reservation.TimeframeListView = "1:lang._invalid_input"
+
+[HeaderMenu]
+1,reservation_timeframe = "define:auto"
+
+[Action]
+configView = "ref:configView"
+reservationView = "ref:reservationView"
+
+[View]
+define:theme = 1
+success = "reservation_view_edit_timeframe.html"
diff --git a/html/webapp/modules/reservation/view/main/init/Init.class.php b/html/webapp/modules/reservation/view/main/init/Init.class.php
index ea49c6c..f93584f 100644
--- a/html/webapp/modules/reservation/view/main/init/Init.class.php
+++ b/html/webapp/modules/reservation/view/main/init/Init.class.php
@@ -50,6 +50,9 @@ class Reservation_View_Main_Init extends Action
var $prev_day = null;
var $input_date = null;
+ var $timeframe_list = null;
+ var $timeframe_list_count = null;
+
/**
* execute実行
*
@@ -64,7 +67,7 @@ function execute()
if ($this->location_count == 0) {
return 'noLocation';
}
-
+
switch ($this->reserve_block["display_type"]) {
case RESERVATION_DEF_MONTHLY:
return 'successMonthly';
diff --git a/html/webapp/modules/reservation/view/main/init/maple.ini b/html/webapp/modules/reservation/view/main/init/maple.ini
index 12b010f..0d14393 100644
--- a/html/webapp/modules/reservation/view/main/init/maple.ini
+++ b/html/webapp/modules/reservation/view/main/init/maple.ini
@@ -1,3 +1,6 @@
+[SmartyAssign::reservationInitAssign]
+global = timezone.ini
+
[AllowIdList]
room_id_arr = "ALLOW_ROOM_ID"
@@ -13,6 +16,7 @@ key:category_list.reservation.categoryView:g = "1:lang.reservation_no_category"
key:category_id.reservation.locationView:g = "1:lang.reservation_select_nolocation"
key:start_date,end_date.reservation.holidayView:g = "1:lang.reservation_error_holiday"
key:start_date,end_date.reservation.reserveView:g = "1:lang.reservation_error_reserve"
+.reservation.TimeframeListView:g = "1:lang._invalid_input"
[Action]
session = "ref:Session"
diff --git a/html/webapp/modules/reservation/view/main/reserve/add/Add.class.php b/html/webapp/modules/reservation/view/main/reserve/add/Add.class.php
index f5fde1f..ea82db5 100644
--- a/html/webapp/modules/reservation/view/main/reserve/add/Add.class.php
+++ b/html/webapp/modules/reservation/view/main/reserve/add/Add.class.php
@@ -20,6 +20,7 @@ class Reservation_View_Main_Reserve_Add extends Action
var $module_id = null;
var $entry_calendar = null;
var $notification_mail = null;
+ var $category_id = null;
// validatorから受け取るため
var $location = null;
@@ -28,6 +29,11 @@ class Reservation_View_Main_Reserve_Add extends Action
var $location_list = null;
var $location_count = null;
var $location_count_list = null;
+ var $reserve_block = null;
+ var $timeframe_list = null;
+ var $timeframe_list_count = null;
+ var $start_timeframe_id = null;
+ var $end_timeframe_id = null;
// Filterから受け取るため
var $room_arr = null;
@@ -39,7 +45,6 @@ class Reservation_View_Main_Reserve_Add extends Action
// 値をセットするため
var $reserve = null;
var $edit_rrule = null;
- var $private_space = null;
var $reserve_room_id = null;
var $week_list = null;
var $timezone_list = null;
@@ -60,9 +65,6 @@ function execute()
if ($this->details_flag == _ON) {
$this->edit_rrule = RESERVATION_RESERVE_EDIT_ALL;
}
- if ($this->location["hasPrivateAddReserve"] == _ON) {
- $this->private_space = _ON;
- }
$this->reserve_room_id = $this->reserve["room_id"];
$this->timezone_list = explode("|", RESERVATION_DEF_TIMEZONE);
diff --git a/html/webapp/modules/reservation/view/main/reserve/add/maple.ini b/html/webapp/modules/reservation/view/main/reserve/add/maple.ini
index b59c882..08b162f 100644
--- a/html/webapp/modules/reservation/view/main/reserve/add/maple.ini
+++ b/html/webapp/modules/reservation/view/main/reserve/add/maple.ini
@@ -8,8 +8,11 @@ room_arr = "ALLOW_ROOM_ARR"
room_id_arr = "ALLOW_ROOM_ID"
[ValidateDef]
+.reservation.TimeframeListView = "1:lang._invalid_input"
reserve_date.date:g = "1:lang._invalid_date,lang.reservation_reserve_time"
key:date.reservation.date:g = "1:lang._invalid_input"
+key:block_id.reservation.block:g = "1:lang._invalid_input"
+key:timeframe_id.reservation.timeframeAdjustment:g = "1:lang._invalid_input"
key:time,start_hour,start_minute.reservation.time:g = "1:lang.reservation_reserve_time"
key:time,end_hour,end_minute.reservation.time:g = "1:lang.reservation_reserve_time"
key:location_id.reservation.locationExists = "1:lang._invalid_input"
diff --git a/html/webapp/modules/reservation/view/main/reserve/details/Details.class.php b/html/webapp/modules/reservation/view/main/reserve/details/Details.class.php
index 4ddb6a5..26adf50 100644
--- a/html/webapp/modules/reservation/view/main/reserve/details/Details.class.php
+++ b/html/webapp/modules/reservation/view/main/reserve/details/Details.class.php
@@ -17,6 +17,9 @@ class Reservation_View_Main_Reserve_Details extends Action
// validatorから受け取るため
var $reserve = null;
var $rrule_reserve_id = null;
+ var $reserve_block = null;
+ var $start_timeframe = null;
+ var $end_timeframe = null;
/**
* execute実行
diff --git a/html/webapp/modules/reservation/view/main/reserve/details/maple.ini b/html/webapp/modules/reservation/view/main/reserve/details/maple.ini
index 0ff8a8e..042a766 100644
--- a/html/webapp/modules/reservation/view/main/reserve/details/maple.ini
+++ b/html/webapp/modules/reservation/view/main/reserve/details/maple.ini
@@ -8,6 +8,8 @@ room_id_arr = "ALLOW_ROOM_ID"
key:reserve_id.reservation.reserveExists:g = "1:lang._invalid_auth"
key:reserve_id.reservation.reserveView:g = "1:lang._invalid_auth"
key:location_id.reservation.locationExists:g = "1:lang._invalid_auth"
+key:block_id.reservation.block:g = "1:lang._invalid_input"
+.reservation.timeframeAdjustment:g = "1:lang._invalid_input"
[Action]
reservationView = "ref:reservationView"
diff --git a/html/webapp/modules/reservation/view/main/reserve/modify/Modify.class.php b/html/webapp/modules/reservation/view/main/reserve/modify/Modify.class.php
index a3f3520..1dd042c 100644
--- a/html/webapp/modules/reservation/view/main/reserve/modify/Modify.class.php
+++ b/html/webapp/modules/reservation/view/main/reserve/modify/Modify.class.php
@@ -22,10 +22,15 @@ class Reservation_View_Main_Reserve_Modify extends Action
var $location = null;
var $allow_add_rooms = null;
var $category_list = null;
+ var $reserve_block = null;
var $location_id = null;
var $location_list = null;
var $location_count = null;
var $location_count_list = null;
+ var $timeframe_list = null;
+ var $timeframe_list_count = null;
+ var $start_timeframe_id = null;
+ var $end_timeframe_id = null;
// Filterから受け取るため
var $room_arr = null;
@@ -36,7 +41,6 @@ class Reservation_View_Main_Reserve_Modify extends Action
// 値をセットするため
var $edit_rrule = null;
- var $private_space = null;
var $reserve_room_id = null;
var $week_list = null;
var $timezone_list = null;
@@ -51,9 +55,6 @@ class Reservation_View_Main_Reserve_Modify extends Action
*/
function execute()
{
- if ($this->location["hasPrivateAddReserve"] == _ON) {
- $this->private_space = _ON;
- }
$this->reserve_room_id = $this->reserve["room_id"];
$this->week_list = $this->reservationView->getLocationWeekArray();
diff --git a/html/webapp/modules/reservation/view/main/reserve/modify/maple.ini b/html/webapp/modules/reservation/view/main/reserve/modify/maple.ini
index f569159..793693e 100644
--- a/html/webapp/modules/reservation/view/main/reserve/modify/maple.ini
+++ b/html/webapp/modules/reservation/view/main/reserve/modify/maple.ini
@@ -13,6 +13,9 @@ key:reserve_id.reservation.reserveView:g = "1:lang._invalid_auth"
key:location_id.reservation.locationExists:g = "1:lang._invalid_auth"
key:category_list.reservation.categoryView:g = "1:lang.reservation_no_category"
key:category_id,location_id.reservation.locationView:g = "1:lang.reservation_select_nolocation"
+key:block_id.reservation.block:g = "1:lang._invalid_input"
+.reservation.TimeframeListView = "1:lang._invalid_input"
+.reservation.timeframeAdjustment:g = "1:lang._invalid_input"
[HeaderInc]
textarea_css = "comp:{$theme_name}/comp_textarea.css"
diff --git a/html/webapp/modules/room/action/admin/delete/Delete.class.php b/html/webapp/modules/room/action/admin/delete/Delete.class.php
index eb6783e..98539a2 100644
--- a/html/webapp/modules/room/action/admin/delete/Delete.class.php
+++ b/html/webapp/modules/room/action/admin/delete/Delete.class.php
@@ -15,207 +15,23 @@
class Room_Action_Admin_Delete extends Action
{
// パラメータを受け取るため
- var $parent_page_id = null;
var $edit_current_page_id = null;
-
- // バリデートによりセット
- var $parent_page = null;
- var $page = null;
-
- // 使用コンポーネントを受け取るため
- var $pagesView = null;
- var $pagesAction = null;
- var $blocksView = null;
- var $modulesView = null;
- var $preexecuteMain = null;
- var $blocksAction = null;
- var $db = null;
- var $uploadsAction = null;
-
- /**
- * ルーム削除処理
- *
- * @access public
- */
- function execute()
- {
- $result = $this->_delRoom(intval($this->edit_current_page_id));
- if($result === false) return 'error';
- return 'success';
- }
-
- /**
- * 削除処理
- * @param int current_page_id
- * @return boolean
- * @access private
- */
- function _delRoom($current_page_id) {
- $log =& LogFactory::getLog();
-
- // ----------------------------------------------------------------------
- // --- サブグループ ---
- // ----------------------------------------------------------------------
- $sub_pages =& $this->db->selectExecute("pages", array("parent_id" => $current_page_id, "room_id = page_id" => null));
- if($sub_pages === false) {
- return false;
- }
- if(count($sub_pages) > 0) {
- //サブグループあり
- //それぞれ、ルーム削除を再帰的に行う
- foreach($sub_pages as $sub_page) {
- $result = $this->_delRoom(intval($sub_page['page_id']));
- if(!$result) return false;
- }
- }
-
- // ルームに所属しているページ一覧取得
- $result = $this->db->selectExecute("pages", array("room_id" => $current_page_id) ,null, null, null, array($this, "_fetchcallback"));
- if($result === false) {
- return false;
- }
- list($page_list, $pages) = $result;
-
- // ----------------------------------------------------------------------
- // --- ブロック削除アクション-削除アクション実行 ---
- // ----------------------------------------------------------------------
- $blocks =& $this->blocksView->getBlockByPageId($page_list);
- $modules =& $this->modulesView->getModulesByUsed($current_page_id,0,0,true);
- if(is_array($blocks) && count($blocks) > 0) {
- foreach($blocks as $block) {
- $block_delete_action = $modules[$block['module_id']]['block_delete_action'];
- if($block_delete_action != "" && $block_delete_action != null) {
- //ブロック削除アクション
- $result = $this->blocksAction->delFuncExec($block['block_id'], $block, $block_delete_action);
- //if($result === false) {
- // 削除アクションの返り値をエラーとしない
- // モジュールの作り方によってルームの削除ができなくなると問題なので。
- //$log->warn(sprintf("%sのブロック削除アクション(%s)が失敗しました。",$modules[$block['module_id_id']]['module_name'], $block_delete_action), "Room_Action_Admin_Delete_Init#execute");
- //return false;
- //}
- }
- }
- }
- if(is_array($modules) && count($modules) > 0) {
- foreach($modules as $module) {
- $delete_action = $module['delete_action'];
- // delete_action処理
- if($delete_action != "" && $delete_action != null) {
- $result = $this->pagesAction->delFuncExec($current_page_id, $module, $delete_action);
- }
- }
- }
- // ----------------------------------------------------------------------
- // --- 添付ファイル更新処理 ---
- // ----------------------------------------------------------------------
- $result = $this->uploadsAction->delUploadsByRoomid($current_page_id);
- if($result === false) return false;
-
- // ----------------------------------------------------------------------
- // --- ページモジュールリンクテーブル削除 ---
- // ----------------------------------------------------------------------
- $result = $this->pagesAction->delPagesModulesLink(array("room_id" => $current_page_id));
- if($result === false) return false;
-
- // ----------------------------------------------------------------------
- // --- ページユーザリンクテーブル削除 ---
- // ----------------------------------------------------------------------
- $result = $this->pagesAction->delPageUsersLink(array("room_id" => $current_page_id));
- if($result === false) return false;
-
- foreach($page_list as $page_id) {
- // ----------------------------------------------------------------------
- // --- ブロックテーブル削除 ---
- // ----------------------------------------------------------------------
- $result = $this->pagesAction->delPageById($page_id, "blocks");
- if(!$result) {
- return false;
- }
- // ----------------------------------------------------------------------
- // --- 非表示メニューテーブル削除 ---
- // ----------------------------------------------------------------------
- if(!$this->pagesAction->delPageById($page_id, 'menu_detail')) {
- return false;
- }
- if(!$this->pagesAction->delPageById($page_id, 'mobile_menu_detail')) {
- return false;
- }
+ // 使用コンポーネントを受け取るため
+ var $pagesAction = null;
- // ----------------------------------------------------------------------
- // --- ページテーブル削除 ---
- // ----------------------------------------------------------------------
- $result = $this->pagesAction->delPageById($page_id);
- if(!$result) {
- return false;
- }
- // ----------------------------------------------------------------------
- // --- ページスタイル削除 ---
- // ----------------------------------------------------------------------
- if(!$this->pagesAction->delPageStyleById($page_id)) {
- return false;
- }
-
- // ----------------------------------------------------------------------
- // --- pages_meta_infテーブル削除 ---
- // ----------------------------------------------------------------------
- if(!$this->pagesAction->delPageMetaInfById($page_id)) {
- return false;
- }
-
- // ----------------------------------------------------------------------
- // --- 表示順decrement ---
- // ----------------------------------------------------------------------
- if($current_page_id == $page_id) {
- if(!$this->pagesAction->decrementDisplaySeq($pages[$page_id]['parent_id'], $pages[$page_id]['display_sequence'], $pages[$page_id]['lang_dirname'])) {
- return false;
- }
- }
- }
- // ----------------------------------------------------------------------
- // --- ショートカット先削除 ---
- // ----------------------------------------------------------------------
- $shortcuts =& $this->db->selectExecute("shortcut", array("room_id" => $current_page_id));
- if(isset($shortcuts[0])) {
- $preexecute_params = array(
- "mode" => "delete",
- "shortcut_flag" => _ON
- );
- foreach($shortcuts as $shortcut) {
- //TODO shortcut_site_idにより、他サイトを考慮した場合は、他サイトの削除処理を行うこと 現状、未実装
- $preexecute_params["block_id"] = $shortcut["shortcut_block_id"];
- $preexecute_params["page_id"] = $shortcut["shortcut_page_id"];
- $preexecute_params["room_id"] = $shortcut["shortcut_room_id"];
- //delete_blockアクションを呼ぶ
- $result = $this->preexecuteMain->preExecute("pages_actionblock_deleteblock", $preexecute_params);
- if($result === false || $result === "false") {
- //$errorList->add($this->_classname, sprintf(_INVALID_ACTION,"pages_actionblock_deleteblock"));
- return false;
- }
- }
- $result = $this->db->deleteExecute("shortcut", array("room_id" => $current_page_id));
- if($result === false){
- //$errorList->add($this->_classname, sprintf(_INVALID_ACTION,"pages_actionblock_deleteblock"));
- return false;
- }
- }
- return true;
- }
-
- /**
- * fetch時コールバックメソッド
- * @param result adodb object
- * @return array
- * @access private
+ /**
+ * ルーム削除処理
+ *
+ * @access public
*/
- function _fetchcallback($result) {
- $ret = array();
- $parent_ret = array();
- while ($row = $result->fetchRow()) {
- $ret[] = $row['page_id'];
- $page_ret[$row['page_id']] = $row;
+ function execute()
+ {
+ if (!$this->pagesAction->deleteRoom($this->edit_current_page_id)) {
+ return 'error';
}
- return array($ret, $page_ret);
+
+ return 'success';
}
}
?>
\ No newline at end of file
diff --git a/html/webapp/modules/room/action/admin/delete/dicon.ini b/html/webapp/modules/room/action/admin/delete/dicon.ini
index 6cf756c..d38ced3 100644
--- a/html/webapp/modules/room/action/admin/delete/dicon.ini
+++ b/html/webapp/modules/room/action/admin/delete/dicon.ini
@@ -1,15 +1,13 @@
[DIContainer]
databaseSqlutility = "database.sqlutility"
-blocksAction = "blocks.action"
pagesAction = "pages.action"
uploadsAction = "uploads.action"
+blocksAction = "blocks.action"
[blocksAction]
databaseSqlutility = "dicon://databaseSqlutility"
preexecuteMain = "dicon://preexecuteMain"
-modulesView = "dicon://modulesView"
[pagesAction]
databaseSqlutility = "dicon://databaseSqlutility"
-preexecuteMain = "dicon://preexecuteMain"
-modulesView = "dicon://modulesView"
\ No newline at end of file
+preexecuteMain = "dicon://preexecuteMain"
\ No newline at end of file
diff --git a/html/webapp/modules/room/action/admin/delete/maple.ini b/html/webapp/modules/room/action/admin/delete/maple.ini
index 076e1d4..36cf219 100644
--- a/html/webapp/modules/room/action/admin/delete/maple.ini
+++ b/html/webapp/modules/room/action/admin/delete/maple.ini
@@ -8,18 +8,11 @@ edit_current_page_id.required ="1:lang._invalid_input"
parent_page_id,edit_current_page_id.room.RoomRegist = "1,delete:lang._invalid_input"
[DIContainer]
-filename_delete = dicon.ini
-
-[Action]
-pagesAction = "ref:pagesAction"
-blocksView = "ref:blocksView"
-modulesView = "ref:modulesView"
-preexecuteMain = "ref:preexecuteMain"
-blocksAction = "ref:blocksAction"
-pagesView = "ref:pagesView"
-db = "ref:DbObject"
-uploadsAction = "ref:uploadsAction"
+filename = dicon.ini
[View]
-success = "main:error.html"
-error = "main:error.html"
\ No newline at end of file
+success = "main:true.html"
+error = "main:error.html"
+
+[Action]
+pagesAction = "ref:pagesAction"
\ No newline at end of file
diff --git a/html/webapp/modules/room/action/admin/export/Export.class.php b/html/webapp/modules/room/action/admin/export/Export.class.php
new file mode 100644
index 0000000..37a03ab
--- /dev/null
+++ b/html/webapp/modules/room/action/admin/export/Export.class.php
@@ -0,0 +1,79 @@
+>ルーム一覧>>参加者修正>>エクスポート>>準備
+ *
+ * @package NetCommons
+ * @author Noriko Arai,Ryuji Masukawa
+ * @copyright 2006-2007 NetCommons Project
+ * @license http://www.netcommons.org/license.txt NetCommons License
+ * @project NetCommons Project, supported by National Institute of Informatics
+ * @access public
+ */
+
+class Room_Action_Admin_Export extends Action
+{
+ // リクエストパラメータをセットするため
+ var $parent_page_id = null;
+ var $edit_current_page_id = null;
+
+ // VAlidatorでセット
+ var $page = null;
+
+ // 使用コンポーネントを受け取るため
+ var $session = null;
+ var $db = null;
+ var $actionChain = null;
+
+
+ // 値をセットするため
+
+ /**
+ * execute実行
+ *
+ * @access public
+ */
+ function execute()
+ {
+ $this->session->setParameter(array('room', 'export', 'current_page_id'), $this->edit_current_page_id);
+ $this->session->setParameter(array('room', 'export', 'current_page_name'), $this->page['page_name']);
+
+ $select_str =& $this->session->getParameter(array('room', $this->edit_current_page_id, 'selected_select_str'));
+ $from_str =& $this->session->getParameter(array('room', $this->edit_current_page_id, 'selected_from_str'));
+ $add_from_str =& $this->session->getParameter(array('room', $this->edit_current_page_id, 'selected_add_from_str'));
+ $where_str =& $this->session->getParameter(array('room', $this->edit_current_page_id, 'selected_where_str'));
+ $add_where_str =& $this->session->getParameter(array('room', $this->edit_current_page_id,'selected_add_where_str'));
+ $export_add_where_str = ' AND {authorities}.user_authority_id != ?';
+ $params =& $this->session->getParameter(array('room', $this->edit_current_page_id, 'selected_params'));
+ $from_params =& $this->session->getParameter(array('room', $this->edit_current_page_id, 'selected_from_params'));
+ $where_params =& $this->session->getParameter(array('room', $this->edit_current_page_id, 'selected_where_params'));
+ if(!is_array($from_params)) $from_params = array();
+ if(!is_array($where_params)) $where_params = array();
+
+ $export_where_params = array(_AUTH_ADMIN);
+
+ $sql_params = array_merge((array)$params, (array)$from_params, (array)$where_params, (array)$export_where_params);
+
+ $sql = $select_str.$from_str.$add_from_str.$where_str.$add_where_str.$export_add_where_str;
+
+ //
+ // レコード数取得
+ //
+ $count_sql = 'SELECT COUNT(*) FROM (' . $select_str.$from_str.$add_from_str.$where_str.$add_where_str.$export_add_where_str . ') AS T';
+ $count_result =& $this->db->execute($count_sql, $sql_params, null, null, false);
+ if($count_result === false) {
+ $this->db->addError();
+ return 'error';
+ }
+
+ $data_count = intval($count_result[0][0]);
+ if($data_count == 0) {
+ $errorList =& $this->actionChain->getCurErrorList();
+ $errorList->add(get_class($this), ROOM_EXPORT_NONE);
+ return 'error';
+ }
+
+ return 'success';
+ }
+}
+?>
\ No newline at end of file
diff --git a/html/webapp/modules/room/action/admin/export/maple.ini b/html/webapp/modules/room/action/admin/export/maple.ini
new file mode 100644
index 0000000..f5ba385
--- /dev/null
+++ b/html/webapp/modules/room/action/admin/export/maple.ini
@@ -0,0 +1,21 @@
+[TokenExtra::TokenExtraExport]
+mode="check"
+action = "room_view_admin_regist_selectusers"
+
+[ValidateDef]
+parent_page_id.required ="1:lang._invalid_input"
+edit_current_page_id.required ="1:lang._invalid_input"
+parent_page_id,edit_current_page_id.room.RoomRegist = "1,export:lang._invalid_input"
+
+[Action]
+session = "ref:Session"
+db = "ref:DbObject"
+actionChain = "ref:ActionChain"
+
+
+[View]
+define:theme = 0
+success = "main:true.html"
+;success = "location:room_view_admin_export"
+;success = "location_script:"
+error = "main:error.html"
diff --git a/html/webapp/modules/room/action/admin/import/confirm/Confirm.class.php b/html/webapp/modules/room/action/admin/import/confirm/Confirm.class.php
new file mode 100644
index 0000000..d2bd4f6
--- /dev/null
+++ b/html/webapp/modules/room/action/admin/import/confirm/Confirm.class.php
@@ -0,0 +1,203 @@
+authoritiesView->getAuthorities(array('(system_flag ='. _ON . ' OR user_authority_id = '. _AUTH_MODERATE. ') AND user_authority_id != '. _AUTH_ADMIN => null));
+ $this->authorities = array();
+ foreach($tmp_authorities as $a) {
+ $a['new_total'] = 0;
+ $a['added_num'] = 0;
+ $this->authorities[$a['role_authority_id']] = $a;
+ }
+
+ $errorList =& $this->actionChain->getCurErrorList();
+ $warn_cnt = 0;
+
+ // 不要セッション情報初期化
+ $this->session->removeParameter(array('room', 'import', 'count'));
+ $this->session->removeParameter(array('room', 'import', 'warn'));
+
+ // メンバ変数初期化
+ $this->added_auth_member_num = array();
+ $this->total_auth_member_num = array();
+ $this->deleted_auth_member_num = 0;
+
+ // デフォルト参加権限定義情報を取得しておきます
+ $config = $this->configView->getConfigByCatid(_SYS_CONF_MODID, _GENERAL_CONF_CATID);
+ if($this->page['default_entry_flag'] == _OFF) {
+ $default_role_auth = _ROLE_AUTH_OTHER;
+ }
+ else {
+ if($this->page['space_type'] == _SPACE_TYPE_PUBLIC) {
+ $default_role_auth = $config['default_entry_role_auth_public']['conf_value'];
+ }
+ else {
+ $default_role_auth = $config['default_entry_role_auth_group']['conf_value'];
+ }
+ }
+
+ // 変更ユーザ情報、対象ルームユーザ情報取得
+ $change_users = $this->session->getParameter(array('room', 'import', 'data'));
+ $users = $this->roomView->getRoomUsersList($this->page, $this->parent_page, $this->authorities);
+
+ $my_handle = $this->session->getParameter('_handle');
+
+ foreach($change_users as $handle=>$new_auth) {
+ // 対象者が存在しない会員だった
+ // 管理者権限だった
+ // 自分だった
+ // 警告追加&スキップ
+ if($handle==$my_handle
+ || !isset($users[$handle])
+ || $users[$handle]['user_authority_id'] == _AUTH_ADMIN ) {
+ $this->session->setParameter(array('room', 'import', 'warn', $warn_cnt++), $handle);// 警告追加しスキップ
+ continue;
+ }
+ $where_params = array(
+ 'room_id' => $this->edit_current_page_id,
+ 'user_id' => $users[$handle]['user_id']
+ );
+ $ins_params = array(
+ 'room_id' => $this->edit_current_page_id,
+ 'user_id' => $users[$handle]['user_id'],
+ 'role_authority_id' => $new_auth,
+ 'createroom_flag' => _OFF
+ );
+ $upd_params = array(
+ 'role_authority_id' => $new_auth
+ );
+ $del_upd_params = array(
+ 'role_authority_id' => $new_auth,
+ 'createroom_flag' => _OFF
+ );
+
+ // 不参加に
+ if($new_auth == _ROLE_AUTH_OTHER) {
+ if($default_role_auth==$new_auth) {
+ $resultPageUserLink = $this->pagesAction->delPageUsersLink($where_params);
+ }
+ else {
+ if($users[$handle]['createroom_flag']==_OFF && $users[$handle]['authority_id']==$default_role_auth) {
+ $resultPageUserLink = $this->pagesAction->insPageUsersLink($ins_params);
+ }
+ else {
+ $resultPageUserLink = $this->pagesAction->updPageUsersLink($del_upd_params, $where_params);
+ }
+ }
+
+ // 対象が親ルームの場合は、全てのサブルームからも削除
+ if($this->page['space_type']!=_SPACE_TYPE_PUBLIC && $this->page['thread_num']==1) {
+ $subroom_where_params = array($this->edit_current_page_id, $users[$handle]['user_id']);
+ $sql = ' DELETE FROM {pages_users_link} WHERE room_id IN (SELECT page_id FROM {pages} WHERE parent_id=? AND page_id=room_id) AND user_id = ?';
+ $this->db->execute($sql, $subroom_where_params);
+ }
+ if($resultPageUserLink) {
+ $this->deleted_auth_member_num++;
+ }
+ }
+ // 権限変更
+ else {
+ if(!isset($users[$handle]['permitted_auth'][$new_auth])
+ || $users[$handle]['permitted_auth'][$new_auth]==_OFF) {
+ $this->session->setParameter(array('room', 'import', 'warn', $warn_cnt++), $handle);// 警告追加しスキップ
+ continue;
+ }
+ // デフォルト権限での参加に変更
+ if($new_auth==$default_role_auth) {
+ // しかし現状ルーム作成権限がON
+ if($users[$handle]['createroom_flag']==_ON) {
+ // ならばUPDATEでレコード温存
+ $resultPageUserLink = $this->pagesAction->updPageUsersLink($upd_params, $where_params);
+ }
+ // ルーム作成権限OFF
+ else {
+ // ならばレコード削除
+ $resultPageUserLink = $this->pagesAction->delPageUsersLink($where_params);
+ }
+ }
+ else {
+ if($users[$handle]['authority_id']==$default_role_auth) {
+ // しかし現状ルーム作成権限がON
+ if($users[$handle]['createroom_flag']==_ON) {
+ // ならば既にレコードあり。UPDATE
+ $resultPageUserLink = $this->pagesAction->updPageUsersLink($upd_params, $where_params);
+ }
+ else {
+ $resultPageUserLink = $this->pagesAction->insPageUsersLink($ins_params);
+ }
+ }
+ else {
+ $resultPageUserLink = $this->pagesAction->updPageUsersLink($upd_params, $where_params);
+ }
+ }
+ if($resultPageUserLink) {
+ $this->authorities[$new_auth]['added_num']++;
+ }
+ }
+ if($resultPageUserLink) {
+ $users[$handle]['authority_id'] = $new_auth;
+ }
+ else {
+ $this->session->setParameter(array('room', 'import', 'warn', $warn_cnt++), $handle);// 警告追加しスキップ
+ }
+ }
+
+ foreach($users as $handle=>$user) {
+ if(!isset($this->authorities[$user['authority_id']])) {
+ continue;
+ }
+ $this->authorities[$user['authority_id']]['new_total']++;
+ }
+
+ foreach($this->authorities as $a) {
+ $this->added_auth_member_num[$a['role_authority_name']] = $a['added_num'];
+ $this->total_auth_member_num[$a['role_authority_name']] = $a['new_total'];
+ }
+ return 'success';
+ }
+}
\ No newline at end of file
diff --git a/html/webapp/modules/room/action/admin/import/confirm/dicon.ini b/html/webapp/modules/room/action/admin/import/confirm/dicon.ini
new file mode 100644
index 0000000..fc26ae6
--- /dev/null
+++ b/html/webapp/modules/room/action/admin/import/confirm/dicon.ini
@@ -0,0 +1,3 @@
+[DIContainer]
+roomView = "modules://room.components.view"
+pagesAction = "pages.Action"
diff --git a/html/webapp/modules/room/action/admin/import/confirm/maple.ini b/html/webapp/modules/room/action/admin/import/confirm/maple.ini
new file mode 100644
index 0000000..75da971
--- /dev/null
+++ b/html/webapp/modules/room/action/admin/import/confirm/maple.ini
@@ -0,0 +1,30 @@
+[DIContainer]
+filename_import = "dicon.ini"
+
+[TokenExtra]
+mode="check"
+action="room_view_admin_import_confirm"
+
+[ValidateDef]
+authcheck = "1,_auth_id>=_AUTH_CHEIF:lang._invalid_auth"
+parent_page_id,edit_current_page_id.room.ImportRoomIdCheck = "1:lang._invalid_input"
+parent_page_id.required ="1:lang._invalid_input"
+edit_current_page_id.required ="1:lang._invalid_input"
+parent_page_id,edit_current_page_id.room.RoomRegist = "1,export:lang._invalid_input"
+
+[Action]
+session = "ref:Session"
+configView = "ref:configView"
+usersView = "ref:usersView"
+pagesView = "ref:pagesView"
+pagesAction = "ref:pagesAction"
+roomView = "ref:roomView"
+authoritiesView = "ref:authoritiesView"
+actionChain = "ref:ActionChain"
+db = "ref:DbObject"
+
+[View]
+define:theme = 1
+success = "room_action_admin_import_confirm.html"
+error = "main:error.html"
+
diff --git a/html/webapp/modules/room/action/admin/selmodules/Selmodules.class.php b/html/webapp/modules/room/action/admin/selmodules/Selmodules.class.php
index 385bc49..95f6152 100644
--- a/html/webapp/modules/room/action/admin/selmodules/Selmodules.class.php
+++ b/html/webapp/modules/room/action/admin/selmodules/Selmodules.class.php
@@ -15,109 +15,97 @@
class Room_Action_Admin_Selmodules extends Action
{
// リクエストパラメータを受け取るため
- var $edit_current_page_id = null;
- var $parent_page_id = null;
-
- var $enroll_modules = null;
-
+ var $edit_current_page_id = null;
+ var $parent_page_id = null;
+
+ var $enroll_modules = null;
+
// バリデートによりセット
var $parent_page = null;
var $page = null;
-
- // 使用コンポーネントを受け取るため
- var $pagesView = null;
- var $pagesAction = null;
- var $modulesView = null;
- var $blocksView = null;
- var $blocksAction = null;
- var $preexecuteMain = null;
- var $db = null;
- var $request = null;
-
+
+ // 使用コンポーネントを受け取るため
+ var $pagesView = null;
+ var $pagesAction = null;
+ var $modulesView = null;
+ var $blocksView = null;
+ var $blocksAction = null;
+ var $preexecuteMain = null;
+ var $db = null;
+ var $request = null;
+
//値をセットするため
- /**
- * 使用可能モジュール配置修正
- *
- * @access public
- */
- function execute()
- {
- if($this->edit_current_page_id != 0) {
- $log =& LogFactory::getLog();
- // ----------------------------------------------------------------------
- // --- ページモジュールリンクテーブル変更 ---
- // ----------------------------------------------------------------------
- //if(isset($this->enroll_modules)) {
- $where_params = array(
- "room_id" => $this->edit_current_page_id
- );
- $page_modules =& $this->pagesView->getPageModulesLink($where_params, null, array($this, "_fetchcallbackModulesLink"));
- $error_flag = false;
- if(isset($this->enroll_modules)) {
- foreach($this->enroll_modules as $module_id) {
- if(!isset($page_modules[$module_id])) {
- $params = array(
- "room_id" => $this->edit_current_page_id,
- "module_id" => $module_id
- );
- //insert
- $result = $this->pagesAction->insPagesModulesLink($params);
- if($result === false) {
- $error_flag = true;
- }
- }
- unset($page_modules[$module_id]);
- }
- }
- $page_list =& $this->db->selectExecute("pages", array("room_id" => $this->edit_current_page_id) ,null, null, null, array($this, "_fetchcallback"));
- if($page_list === false) {
- return 'error';
- }
- $blocks =& $this->blocksView->getBlockByPageId($page_list);
-
- //ページモジュールリンクテーブル削除
- foreach($page_modules as $page_module) {
- $where_params = array(
- "room_id" => $page_module['room_id'],
- "module_id" => $page_module['module_id']
- );
- $result = $this->pagesAction->delPagesModulesLink($where_params);
- if($result === false) {
- $error_flag = true;
- }
- //
- // モジュール削除関数を呼び出す
- //
- $module =& $this->modulesView->getModulesById($page_module['module_id']);
- $delete_action = $module['delete_action'];
- if($delete_action != "" && $delete_action != null) {
- $result = $this->pagesAction->delFuncExec($page_module['room_id'], $module, $delete_action);
- }
- }
- if(is_array($blocks) && count($blocks) > 0) {
- foreach($blocks as $block) {
- $module_id = $block['module_id'];
- if(isset($page_modules[$module_id])) {
- //block削除処理
- $preexecute_params = array(
- "block_id" => $block['block_id'],
- "page_id"=> $block['page_id']
- );
- $result = $this->preexecuteMain->preExecute("pages_actionblock_deleteblock", $preexecute_params);
- //if($result === false || $result === "false") {
- // $log->warn(sprintf("%sの削除アクション(%s)が失敗しました。","pages", "pages_actionblock_deleteblock"), "Room_Action_Admin_Create_Selectmodules#execute");
- //}
- }
- }
- }
- if($error_flag) {
- return 'error';
- }
- //}
- }
- // ----------------------------------------------------------------------
- // --- 終了処理 ---
+ /**
+ * 使用可能モジュール配置修正
+ *
+ * @access public
+ */
+ function execute()
+ {
+ $roomId = $this->edit_current_page_id;
+ $usableModuleIds = $this->enroll_modules;
+ if (!isset($usableModuleIds)) {
+ $usableModuleIds = array();
+ }
+ $previousUsableModules = $this->pagesView->getUsableModulesByRoom($roomId, true);
+
+ $isError = false;
+ foreach ($usableModuleIds as $moduleId) {
+ if (isset($previousUsableModules[$moduleId])) {
+ unset($previousUsableModules[$moduleId]);
+ continue;
+ }
+
+ $insertDatas = array(
+ 'room_id' => $roomId,
+ 'module_id' => $moduleId
+ );
+
+ if (!$this->pagesAction->insPagesModulesLink($insertDatas)) {
+ $isError = true;
+ }
+ }
+
+ if (!$this->pagesAction->deleteEachModule($roomId, $previousUsableModules)) {
+ $isError = true;
+ }
+
+ $unusableModuleIds = array_keys($previousUsableModules);
+ if (!$this->pagesAction->deleteRoomModule($roomId, $unusableModuleIds)) {
+ $isError = true;
+ }
+
+ $sql = "SELECT B.block_id, "
+ . "B.page_id "
+ . "FROM {blocks} B "
+ . "INNER JOIN {pages} P "
+ . "ON B.page_id = P.page_id "
+ . "WHERE P.room_id = ? "
+ . "AND B.module_id IN ('" . implode("','", $unusableModuleIds) . "')";
+ $blocks =& $this->db->execute($sql, $roomId);
+ if ($blocks === false) {
+ $this->db->addError();
+ }
+
+ foreach($blocks as $block) {
+ $request = array(
+ 'block_id' => $block['block_id'],
+ 'page_id' => $block['page_id']
+ );
+ $result = $this->preexecuteMain->preExecute('pages_actionblock_deleteblock', $request);
+ if ($result === false
+ || $result === 'false') {
+ $isError = true;
+ }
+ }
+
+ if($isError) {
+ return 'error';
+ }
+
+ // ----------------------------------------------------------------------
+ // --- 終了処理 ---
// ----------------------------------------------------------------------
// リスト表示のリクエストパラメータセット
if(!isset($this->parent_page)) {
@@ -130,37 +118,7 @@ function execute()
$this->request->setParameter("show_default_entry_flag", $this->parent_page['default_entry_flag']);
}
- return 'success';
- }
-
-
- /**
- * fetch時コールバックメソッド
- * @param result adodb object
- * @return array
- * @access private
- */
- function &_fetchcallbackModulesLink($result) {
- $ret = array();
- while ($row = $result->fetchRow()) {
- $ret[$row['module_id']] = $row;
- }
- return $ret;
- }
-
-
- /**
- * fetch時コールバックメソッド
- * @param result adodb object
- * @return array
- * @access private
- */
- function &_fetchcallback($result) {
- $ret = array();
- while ($row = $result->fetchRow()) {
- array_push ( $ret, $row['page_id']);
- }
- return $ret;
+ return 'success';
}
}
?>
diff --git a/html/webapp/modules/room/action/admin/selmodules/dicon.ini b/html/webapp/modules/room/action/admin/selmodules/dicon.ini
index 8431155..d38ced3 100644
--- a/html/webapp/modules/room/action/admin/selmodules/dicon.ini
+++ b/html/webapp/modules/room/action/admin/selmodules/dicon.ini
@@ -1,14 +1,13 @@
[DIContainer]
databaseSqlutility = "database.sqlutility"
-blocksAction = "blocks.action"
pagesAction = "pages.action"
+uploadsAction = "uploads.action"
+blocksAction = "blocks.action"
[blocksAction]
databaseSqlutility = "dicon://databaseSqlutility"
preexecuteMain = "dicon://preexecuteMain"
-modulesView = "dicon://modulesView"
[pagesAction]
databaseSqlutility = "dicon://databaseSqlutility"
-preexecuteMain = "dicon://preexecuteMain"
-modulesView = "dicon://modulesView"
\ No newline at end of file
+preexecuteMain = "dicon://preexecuteMain"
\ No newline at end of file
diff --git a/html/webapp/modules/room/components/View.class.php b/html/webapp/modules/room/components/View.class.php
new file mode 100644
index 0000000..29eec87
--- /dev/null
+++ b/html/webapp/modules/room/components/View.class.php
@@ -0,0 +1,204 @@
+_container =& DIContainerFactory::getContainer();
+ $this->_db =& $this->_container->getComponent("DbObject");
+ $this->_session =& $this->_container->getComponent("Session");
+ $this->_authoritiesView =& $this->_container->getComponent("authoritiesView");
+ $this->_configView =& $this->_container->getComponent("configView");
+ }
+ /**
+ * ルーム内参加可能者一覧、およびそれらの人物へ与えているロール権限、そして権限設定可能上限
+ *
+ * @access public
+ */
+ function &getRoomUsersList($page, $parent_page, $authorities)
+ {
+ $subroom_flag = false;
+ $edit_current_page_id = $page['page_id'];
+ $parent_page_id = $parent_page['page_id'];
+ if($edit_current_page_id != _SELF_TOPPUBLIC_ID && $parent_page['thread_num']==1) {
+ $subroom_flag = true;
+ }
+ $space_type = $page['space_type'];
+ // 親ページがない=パブリックスペースTOP
+ // このときはcreateroom_flag設定による権限以上の権限取得の抜け駆け禁止
+ if($space_type == _SPACE_TYPE_PUBLIC && $page['thread_num'] == 0) {
+ $public_top_page_flag = _ON;
+ }
+ else {
+ $public_top_page_flag = _OFF;
+ }
+
+ $default_entry_flag = $page['default_entry_flag'];
+
+ $config = $this->_configView->getConfigByCatid(_SYS_CONF_MODID, _GENERAL_CONF_CATID);
+ if($config == false) {
+ return false;
+ }
+ $default_entry_role_auth_public = $config['default_entry_role_auth_public']['conf_value'];
+ $default_entry_role_auth_group = $config['default_entry_role_auth_group']['conf_value'];
+
+
+ $params = array();
+ $select_str = 'SELECT {users}.user_id, {users}.handle, '.
+ '{authorities}.user_authority_id,'.
+ '{authorities}.role_authority_id,'.
+ '{authorities}.public_createroom_flag,'.
+ '{authorities}.group_createroom_flag,'.
+ '{authorities}.hierarchy,'.
+ '{pages_users_link}.role_authority_id AS authority_id,'.
+ '{pages_users_link}.createroom_flag';
+
+ $from_str = ' FROM {authorities}, {users}'.
+ ' LEFT JOIN {pages_users_link} ON {pages_users_link}.room_id='.$edit_current_page_id.
+ ' AND {users}.user_id={pages_users_link}.user_id ';
+
+ $where_str = ' WHERE {users}.role_authority_id={authorities}.role_authority_id';
+
+ if($parent_page['thread_num'] >= 1) {
+ //親ルームに参加している会員すべて(サブグループ作成)
+ if($parent_page['default_entry_flag']) {
+ $where_str .= ' AND {users}.user_id NOT IN (SELECT user_id FROM {pages_users_link} WHERE room_id =' . $parent_page_id . ' AND role_authority_id = ' . _ROLE_AUTH_OTHER . ')';
+ }
+ else {
+ $where_str .= ' AND {users}.user_id IN (SELECT user_id FROM {pages_users_link} WHERE room_id =' . $parent_page_id . ')';
+ }
+ }
+ $sql = $select_str . $from_str . $where_str;
+ $users =& $this->_db->execute($sql, $params, null, null, true,
+ array($this, '_usersFetchCallback'),
+ array($subroom_flag, $space_type, $default_entry_flag, $default_entry_role_auth_public, $default_entry_role_auth_group, $authorities, $public_top_page_flag));
+ return $users;
+ }
+ /**
+ * fetch時コールバックメソッド
+ * @param result adodb object
+ * @return array items
+ * @access private
+ */
+ function &_roomusersFetchcallback($result)
+ {
+ $ret = array();
+ while ($row = $result->fetchRow()) {
+ $ret[$row['user_id']] = $row;
+ }
+ return $ret;
+ }
+ /**
+ * fetch時コールバックメソッド
+ * @param result adodb object
+ * @return array items
+ * @access private
+ */
+ function &_usersFetchcallback($result, $params)
+ {
+ $subroom_flag = $params[0];
+ $space_type = $params[1];
+ $default_entry_flag = $params[2];
+ $default_entry_role_auth_public = $params[3];
+ $default_entry_role_auth_group = $params[4];
+ $authorities = $params[5];
+ $public_top_page_flag = $params[6];
+
+ $auth = array();
+ foreach($authorities as $a) {
+ $auth[$a['role_authority_id']] = $a;
+ }
+
+ $ret = array();
+
+ while ($row = $result->fetchRow()) {
+ // createroom_flag がONでも、該当のページがパブリックスペースのTOPのときは有効にならない!
+ if(($public_top_page_flag==_OFF && $row['createroom_flag']==_ON) || ($public_top_page_flag==_OFF && $space_type==_SPACE_TYPE_PUBLIC && $row['public_createroom_flag']==_ON) || ($space_type==_SPACE_TYPE_GROUP && $row['group_createroom_flag']==_ON)) {
+ $createroom_flag =_ON;
+ }
+ else {
+ $createroom_flag =_OFF;
+ }
+ // authがNULLのとき デフォルト権限を意味する
+ if(is_null($row['authority_id'])) {
+ if($default_entry_flag==_OFF) {
+ $row['authority_id'] = _ROLE_AUTH_OTHER;
+ }
+ else {
+ if($space_type==_SPACE_TYPE_PUBLIC) {
+ $row['authority_id'] = $default_entry_role_auth_public;
+ }
+ else {
+ $row['authority_id'] = $default_entry_role_auth_group;
+ }
+ }
+ }
+
+ $row_auth = array();
+ foreach($auth as $auth_id=>$a) {
+
+ $row_auth[$auth_id] = false;
+
+ if($subroom_flag == true) { // サブルームであれば誰でも何にでもなれる
+ $row_auth[$auth_id] = true;
+ }
+ else {
+ if($auth_id==_ROLE_AUTH_CHIEF) {
+ if($row['hierarchy'] >=_HIERARCHY_CHIEF || ($row['authority_id'] == _ROLE_AUTH_ADMIN || $row['authority_id'] == _ROLE_AUTH_CHIEF) || $createroom_flag==_ON) {
+ $row_auth[$auth_id] = true;
+ }
+ }
+ else if($auth_id==_ROLE_AUTH_GENERAL) {
+ if($row['hierarchy'] >=_HIERARCHY_GENERAL || ($row['authority_id'] == _ROLE_AUTH_GENERAL) || $createroom_flag==_ON) {
+ $row_auth[$auth_id] = true;
+ }
+ }
+ else if($auth_id==_ROLE_AUTH_GUEST) { // ゲストは誰でもなれる
+ $row_auth[$auth_id] = true;
+ }
+ else {
+ if($row['hierarchy']>=$a['hierarchy'] || $createroom_flag == _ON || $row['authority_id'] == $a['role_authority_id']) {
+ $row_auth[$auth_id] = true;
+ }
+ }
+ }
+ }
+ $row['permitted_auth'] = $row_auth;
+ $ret[$row['handle']] = $row;
+ }
+ return $ret;
+ }
+}
diff --git a/html/webapp/modules/room/config/main.ini b/html/webapp/modules/room/config/main.ini
index d90e3c0..3367d25 100644
--- a/html/webapp/modules/room/config/main.ini
+++ b/html/webapp/modules/room/config/main.ini
@@ -6,4 +6,11 @@ room_list_visible_rows = 18 ;//ルーム一覧表示行数
room_users_regist_once = 30000 ;//一度に登録する会員数(この数を越える会員の登録を行う場合、sendを複数回繰り返す)
[Room_View_Admin_Regist_Selectusers:Room_View_Admin_Regist_Confirm]
-room_users_list = 15 ;//会員選択一覧表示行数
\ No newline at end of file
+room_users_list = 15 ;//会員選択一覧表示行数
+
+[Room_View_Admin_Import]
+define:ROOM_IMPORT_LINE_LIMIT = 10000
+
+[Room_View_Admin_Import_Upload]
+define:ROOM_TIME_LIMIT = 12000
+define:ROOM_IMPORT_ITEM_COLUMN = 2
\ No newline at end of file
diff --git a/html/webapp/modules/room/files/css/default/style.css b/html/webapp/modules/room/files/css/default/style.css
index ca6d442..f4e3017 100644
--- a/html/webapp/modules/room/files/css/default/style.css
+++ b/html/webapp/modules/room/files/css/default/style.css
@@ -28,7 +28,7 @@ div.room_init_icon_title {
width:120px;
}
.room_admin{
- width:340px;
+ width:460px;
}
img.room_prefix_icon {
height:15px;
@@ -112,6 +112,11 @@ img.room_prefix_icon {
margin:5px;
padding:0.4em;
}
+div.room_csv_export {
+ float:right;
+ margin:-1.5em 20px 0.5em 0;
+ font-weight:bold;
+}
/* 登録内容確認 */
.room_confirm_default_entry {
font-weight:bold;
@@ -130,4 +135,51 @@ select.room_selectlist {
}
.room_inf td {
padding:6px;
+}
+/* 参加者インポート */
+.room_import_file_select {
+ width:32em;
+}
+.room_import_help_field {
+ width:42em;
+}
+div.room_import_help_description {
+ overflow: auto;
+ border: 1px solid;
+ padding: 5px;
+}
+table.room_import_help_description {
+ width:100%;
+}
+tr.room_grid_row {
+ margin : 1px;
+ border:1px solid #d5d5d5;
+ height : 22px;
+ overflow : hidden;
+ line-height: 18px;
+}
+th.room_grid_header {
+ padding : 3px 2px 2px 3px;
+ text-align:center;
+ background-color:#e0e0e0;
+ border:1px solid #d5d5d5;
+}
+td.room_grid_col {
+ padding : 3px 2px 2px 3px;
+ border:1px solid #d5d5d5;
+ padding-left:4px;
+}
+.room_indent {
+ margin-left:20px;
+}
+.room_import_form label {
+ margin:2px 8px;
+}
+.room_import_result {
+ margin: 5px 15px;
+ padding: 1em;
+ border: 1px solid #999;
+}
+.room_import_result table td {
+ padding: 2px 5px;
}
\ No newline at end of file
diff --git a/html/webapp/modules/room/files/js/room.js b/html/webapp/modules/room/files/js/room.js
index 3be6a2f..3ed2c72 100644
--- a/html/webapp/modules/room/files/js/room.js
+++ b/html/webapp/modules/room/files/js/room.js
@@ -241,5 +241,90 @@ clsRoom.prototype = {
'lang':select_lang
}
commonCls.sendView(this.id, params);
+ },
+ roomUsersExport: function(event, parent_page_id, edit_current_page_id, confirm_mes) {
+
+ var top_el = $(this.id);
+
+ var params = {
+ 'action':'room_action_admin_export',
+ 'parent_page_id':parent_page_id,
+ 'edit_current_page_id':edit_current_page_id
+ }
+ var parameter = new Object();
+ parameter["callbackfunc"] = function(res){
+ if(!commonCls.confirm(confirm_mes))
+ {
+ return false;
+ }
+ location.href= '.' + _nc_index_file_name + '?action=room_view_admin_export&_token='+ $('_token' +this.top_el_id).value;
+ }
+ parameter["callbackfunc_error"] = function(res) {
+ commonCls.alert(res);
+ }
+ commonCls.sendPost(this.id, params, parameter);
+ },
+ _isSelectFile: function(frm) {
+ if($F("room_import_file_select").length > 0) {
+ return(true);
+ }
+ return(false);
+ },
+ _alertImport: function(confirm_message, target) {
+ var keyword = $(target).textContent;
+ var newmsg = confirm_message.replace('%error_item%', keyword);
+ commonCls.alert(newmsg);
+ return;
+ },
+ doUserImport: function(frm, confirm_message) {
+ var keyword;
+ if(!this._isSelectFile(frm)) {
+ this._alertImport(confirm_message, 'room_import_label_file');
+ return false;
+ }
+
+ var this_el = $("room_import_frm");
+ var top_el = $(this.id);
+ var params = new Object();
+ params["method"] = "post";
+
+ params["top_el"] = top_el;
+ params["loading_el"] = top_el;
+ params["timeout_flag"] = 0;
+
+ params['form_prefix'] = "room_import_attachment";
+
+
+
+ params["param"] = new Object();
+ params["param"]["action"] = "room_view_admin_import_upload";
+
+ params["callbackfunc"] = function(res) {
+ this.user_checkdata(this_el);
+ }.bind(this);
+ params["callbackfunc_error"] = function(file_list, res){
+ commonCls.alert(res);
+ }.bind(this);
+ commonCls.sendAttachment(params);
+ },
+ user_checkdata: function(this_el) {
+ var top_el = $(this.id);
+ var chk_params = new Object();
+ chk_params["param"] = {"action":"room_view_admin_import_confirm"};
+ chk_params["top_el"] = top_el;
+ chk_params["loading_el"] = top_el;
+ chk_params["target_el"] = $(this.id);
+
+ commonCls.send(chk_params);
+ },
+ user_importdata: function() {
+ var top_el = $(this.id);
+ var action_params = new Object();
+ action_params['method'] = "post";
+ action_params["param"] = {"action":"room_action_admin_import_confirm"};
+ action_params["top_el"] = top_el;
+ action_params["loading_el"] = top_el;
+ action_params["target_el"] = $(this.id);
+ commonCls.send(action_params);
}
}
\ No newline at end of file
diff --git a/html/webapp/modules/room/install.ini b/html/webapp/modules/room/install.ini
index 72cd700..1d9ca3d 100644
--- a/html/webapp/modules/room/install.ini
+++ b/html/webapp/modules/room/install.ini
@@ -1,4 +1,5 @@
-version = "2.4.0.0"
+version = "2.4.0.2"
action_name="room_view_admin_init"
module_icon="room.gif"
system_flag=1
+module_update_action = "room_update"
diff --git a/html/webapp/modules/room/language/chinese/main.ini b/html/webapp/modules/room/language/chinese/main.ini
index 5eac669..9e26a0d 100644
--- a/html/webapp/modules/room/language/chinese/main.ini
+++ b/html/webapp/modules/room/language/chinese/main.ini
@@ -16,6 +16,7 @@ room_admin = "管理"
room_back_list = "返回"
room_admin_inf = "编辑"
room_admin_edit = "成员"
+room_admin_import = "进口"
room_confirm_roomdelete = "如果删除房间%s,房间内的所有模块都将消失。
您确定要删除房间吗?"
room_list_display_flag_on = "开放"
room_list_display_flag_off = "维护中"
@@ -50,7 +51,14 @@ room_name_error_mes = "该房间名已存在。"
room_top_description ="设置房间内所有成员的角色,然后按%s。按%s可一次性设置所有角色。
如果您想要继续添加成员,请按%s。"
room_top_user_auth_id = "权限"
room_selected_entry_users = "检索成员"
+room_csv_export = "(出口参与者权限列表)"
+room_export_confirm_exp = "您可以导出室成员的角色,排除%s当局。
您确定要继续吗?
*下载CSV文件,将备份文件,这个房间。
下载后,请仔细保存这个文件。"
+room_export_exp = "这个房间里的角色成员列表中显示的将是出口。(是否排除%s)"
+[Room_View_Admin_Export]
+define:ROOM_EXPORT_AUTHORITY_NAME = "角色"
+[Room_View_Admin_Export:Room_Action_Admin_Export]
+define:ROOM_EXPORT_NONE = "暂无可导出的用户。"
[Room_View_Admin_Regist_Userslist:Room_View_Admin_Regist_Confirm]
room_subgroup_create_on ="允许"
@@ -85,4 +93,59 @@ room_entry_modules="允许使用的模块"
confirm_selectmodules = "您确定要更改可用模块设置吗?"
[Room_Action_Admin_Search]
-room_user_search_condition_limit = "选项过多"
\ No newline at end of file
+room_user_search_condition_limit = "选项过多"
+
+
+[Room_View_Admin_Import]
+room_import_title_description = "你可以导入的房间(%s)成员的角色。"
+room_import_file = "导入文件"
+room_import_select_file_description = "请指定导入文件设置的角色。"
+room_import_select_file_note = "第一行被视为一个标题行。
行上限为%d。"
+room_import_help_label = "帮助"
+room_import_help_title = "导入文件设置的详细确认"
+room_import_exp = "你可以注册角色的房间成员从导入的文件。
中止,如果权力不能放弃或成员可以不参加已经描述,进口没有得到执行。
为了避免错误,请使用导出的文件。
"
+room_import_import_imp = "进出口运行"
+room_import_help_open = "显示"
+room_import_help_close = "关闭"
+room_import_item = "项目"
+room_import_contents = "内容"
+room_import_need_on = "※必填字段
+room_import_sel = "<选项>"
+room_not_entry = "不参加"
+define:ROOM_IMPORT_ITEM_HANDLE = "设置昵称。"
+room_import_check_message = "%error_item%没有被选中。"
+define:ROOM_IMPORT_HELP_AUTH_LABEL = "参与权"
+define:ROOM_IMPORT_HELP_AUTH_EXP = "在这个房间里的角色设置。"
+define:ROOM_IMPORT_UPLOAD_SYSERR = "系统发生错误。"
+define:ROOM_IMPORT_UPLOAD_OPEN_ERR = "文件打开错误。"
+define:ROOM_IMPORT_UPLOAD_NOROOM_ERR = "房间不存在的指定。"
+define:ROOM_IMPORT_UPLOAD_NO_PERMISSION = "你没有权限。"
+define:ROOM_IMPORT_UPLOAD_COLUMN_ERR = "错误:%d
CSV文件中的列数是错误的。"
+define:ROOM_IMPORT_UPLOAD_NOUSER_ERR = "错误:%d
不存在,或者是不可能的成员角色,%s 已被指定为操作对象。"
+define:ROOM_IMPORT_UPLOAD_NOAUTH_ERR = "错误:%d
%d 是错误的权威价值。"
+define:ROOM_IMPORT_UPLOAD_NOT_PERMIT_AUTH = "错误:%d
成员%s,权威[%d]不能设置。"
+define:ROOM_IMPORT_UPLOAD_NO_CHAGE = "没有变化。"
+define:ROOM_IMPORT_UPLOAD_LINE_OVER_ERR = "文件中的行数超过%d行。"
+define:ROOM_IMPORT_CONFIRM_ADMINUSER_WRAN = "会员“管理”不能改变基本权限。排除在这一进程。"
+define:ROOM_IMPORT_CONFIRM_MYSELF_WRAN = "不能改变自己管理局。排除在这一进程。"
+define:ROOM_IMPORT_CONFIRM_PUBLIC_OTHER_WRAN = "这是不可能改变在公共空间中的不参与。排除在这一进程。"
+define:ROOM_IMPORT_UPLOAD_NODATAS_ERR = "在文件中不存在的数据线。"
+
+[Room_View_Admin_Import_Confirm]
+room_import_confirm_message1 = "这个角色列表将被设置为%s的房间。"
+room_import_confirm_change_count = "%d人将被添加到%s。"
+room_import_confirm_message2 = "本次变动后中,的间客房的的角色设施将作如下安排。
"
+room_import_confirm_count = "%s %d"
+room_import_confirm_message3 = "您确定要继续吗?"
+room_import_confirm_warnMsg = "昵称「%s」"
+
+
+[Room_Action_Admin_Import_Confirm]
+room_import_confirm_message1 = "%s的房间已成立了这个角色列表"
+room_import_confirm_change_count = "%d人已被添加到的%s。"
+room_import_confirm_message2 = "角色房间的情况如下。
"
+room_import_confirm_count = "%s %d"
+
+room_import_confirm_warnMsg = "有一个问题。
而不可能改变成员下面描述的。"
+room_not_entry = "不参加"
+
diff --git a/html/webapp/modules/room/language/english/main.ini b/html/webapp/modules/room/language/english/main.ini
index ce5a3b7..90b0214 100644
--- a/html/webapp/modules/room/language/english/main.ini
+++ b/html/webapp/modules/room/language/english/main.ini
@@ -15,6 +15,7 @@ room_space_common="Open for all members"
room_admin = "Controler"
room_back_list = "Back"
room_admin_inf = "Edit"
+room_admin_import = "Import"
room_admin_edit = "Members"
room_confirm_roomdelete = "By deleting the room, %s, all the modules created in the room will vanish.
Are you sure to proceed?"
room_list_display_flag_on = "Open"
@@ -50,7 +51,14 @@ room_name_error_mes = "There exists a room of the same name."
room_top_description ="Set the roles of the room members, and press %s button. To set the roles all at once, press %s button.
If you wish to continue to add members, press %s button"
room_top_user_auth_id = "Authority"
room_selected_entry_users = "Search for the members"
+room_csv_export = "(Export participants authority list)"
+room_export_confirm_exp = "You can export the roles of the room members, exclude %s authorities.
Are you sure to proceed?
*The download csv files will be backup-file for this room.
Please preserve this file carefully after downloading."
+room_export_exp = "The roles of this room members displayed in the list will be export.(exclude %s) "
+[Room_View_Admin_Export]
+define:ROOM_EXPORT_AUTHORITY_NAME = "Roles"
+[Room_View_Admin_Export:Room_Action_Admin_Export]
+define:ROOM_EXPORT_NONE = "There is no member to export."
[Room_View_Admin_Regist_Userslist:Room_View_Admin_Regist_Confirm]
room_subgroup_create_on ="Allowed"
@@ -85,4 +93,59 @@ room_entry_modules="Modules allowed to use"
confirm_selectmodules = "You are changing the set of modules
which are allowed to be used.
Are you sure to proceed?"
[Room_Action_Admin_Search]
-room_user_search_condition_limit = "Too many conditions."
\ No newline at end of file
+room_user_search_condition_limit = "Too many conditions."
+
+
+[Room_View_Admin_Import]
+room_import_title_description = "You can import the roles of room(%s) members."
+room_import_file = "Import file"
+room_import_select_file_description = "Please specify the import file to set the roles."
+room_import_select_file_note = "The first line is treated as a header line.
Upper limit of the line is %d."
+room_import_help_label = "Help"
+room_import_help_title = "Detailed confirmation of import file settings"
+room_import_exp = "You can register the roles of room members from imported file.
It becomes aborted if the role that can not give or member can not participate has been described, the import is not enforced.
To avoid the error, please use the exported file.
"
+room_import_import_imp = "Import is run"
+room_import_help_open = "Display"
+room_import_help_close = "Close"
+room_import_item = "Item"
+room_import_contents = "description"
+room_import_need_on = "Required fields"
+room_import_sel = "<option>"
+room_not_entry = "not entry"
+define:ROOM_IMPORT_ITEM_HANDLE = "Set handle."
+room_import_check_message = "%error_item% has not been selected."
+define:ROOM_IMPORT_HELP_AUTH_LABEL = "Role"
+define:ROOM_IMPORT_HELP_AUTH_EXP = "Set the role in this room."
+define:ROOM_IMPORT_UPLOAD_SYSERR = "A system error has occurred."
+define:ROOM_IMPORT_UPLOAD_OPEN_ERR = "File open error."
+define:ROOM_IMPORT_UPLOAD_NOROOM_ERR = "Room that does not exist was specified."
+define:ROOM_IMPORT_UPLOAD_NO_PERMISSION = "You do not have authority."
+define:ROOM_IMPORT_UPLOAD_COLUMN_ERR = "Error:%d line
Number of columns in the CSV file is wrong."
+define:ROOM_IMPORT_UPLOAD_NOUSER_ERR = "Error:%d line
Not exist, or member role is not possible, %s has been specified as the operation target."
+define:ROOM_IMPORT_UPLOAD_NOAUTH_ERR = "Error:%d line
%d is wrong value for the role."
+define:ROOM_IMPORT_UPLOAD_NOT_PERMIT_AUTH = "Error:%d line
Member %s, role [%d] can not be set."
+define:ROOM_IMPORT_UPLOAD_NO_CHAGE = "No changes."
+define:ROOM_IMPORT_UPLOAD_LINE_OVER_ERR = "This file has over %d lines."
+define:ROOM_IMPORT_CONFIRM_ADMINUSER_WRAN = "`manager` can not change the role. excluded from the process."
+define:ROOM_IMPORT_CONFIRM_MYSELF_WRAN = "Own role can not be changed. excluded from the process."
+define:ROOM_IMPORT_CONFIRM_PUBLIC_OTHER_WRAN = "It is not possible to change to the non-participation in the public space. excluded from the process."
+define:ROOM_IMPORT_UPLOAD_NODATAS_ERR = "Data line does not exist in the file."
+
+[Room_View_Admin_Import_Confirm]
+room_import_confirm_message1 = "This role list will be setting to %s room."
+room_import_confirm_change_count = "%d member will be added to %s."
+room_import_confirm_message2 = "After the change, roles of the room will be as follows.
"
+room_import_confirm_count = "%s %d"
+room_import_confirm_message3 = "Are you sure to proceed?"
+room_import_confirm_warnMsg = "Handle - %s"
+
+
+[Room_Action_Admin_Import_Confirm]
+room_import_confirm_message1 = "This role list has been set to %s room."
+room_import_confirm_change_count = "%d member have been added to %s."
+room_import_confirm_message2 = "Roles of the room was as follows.
"
+room_import_confirm_count = "%s %d"
+
+room_import_confirm_warnMsg = "There was a problem.
It was not possible to change the members described below."
+room_not_entry = "not entry"
+
diff --git a/html/webapp/modules/room/language/japanese/main.ini b/html/webapp/modules/room/language/japanese/main.ini
index 9f50a0d..caf2367 100644
--- a/html/webapp/modules/room/language/japanese/main.ini
+++ b/html/webapp/modules/room/language/japanese/main.ini
@@ -16,6 +16,7 @@ room_admin = "管理"
room_back_list = "戻る"
room_admin_inf = "基本項目編集"
room_admin_edit = "参加者修正"
+room_admin_import = "参加者インポート"
room_confirm_roomdelete = "「%s」ルームに配置されたすべてのモジュールは完全に削除されます
%sを削除してよろしいですか?"
room_list_display_flag_on = "公開中にする"
room_list_display_flag_off = "準備中にする"
@@ -50,6 +51,14 @@ room_name_error_mes = "同じ階層に同名のルームが存在します"
room_top_description ="このルームでの会員の役割を設定して、[%s]ボタンを押してください。[%s]ボタンより役割を一括で選択できます。
続けて参加会員を追加する場合、[%s]を押してください。"
room_top_user_auth_id = "ベース権限"
room_selected_entry_users = "対象会員の絞込み"
+room_csv_export = "(参加者権限一覧をエクスポート)"
+room_export_confirm_exp = "参加会員修正一覧に表示されている会員のうち、
%s以外の会員のルーム参加権限情報をエクスポートします。
よろしいですか?
※ダウンロードされたCSVは現在のルーム参加者の
バックアップファイルとしても役立ちます。
ダウンロード後は必ず大切に保存しておいてください。"
+room_export_exp = "参加会員修正一覧に表示されている会員をエクスポートします。ただし、%sの会員情報はエクスポートできません。"
+
+[Room_View_Admin_Export]
+define:ROOM_EXPORT_AUTHORITY_NAME = "参加者権限"
+[Room_View_Admin_Export:Room_Action_Admin_Export]
+define:ROOM_EXPORT_NONE = "エクスポート可能な会員が見つかりませんでした。"
[Room_View_Admin_Regist_Userslist:Room_View_Admin_Regist_Confirm]
@@ -85,4 +94,58 @@ room_entry_modules="利用を許可したモジュール"
confirm_selectmodules = "内容を変更しようとしています。利用の許可を途中で取り消すと、
現在利用中のモジュールに蓄積されたデータが消滅するので注意してください。
この変更を確定しますか?"
[Room_Action_Admin_Search]
-room_user_search_condition_limit = "検索条件が多すぎます。条件を減らして再度検索してください。"
\ No newline at end of file
+room_user_search_condition_limit = "検索条件が多すぎます。条件を減らして再度検索してください。"
+
+[Room_View_Admin_Import]
+room_import_title_description = "ルーム「%s」へ参加者情報をインポートします。"
+room_import_file = "インポートファイル"
+room_import_select_file_description = "参加権限を設定したインポートファイルを指定して下さい。"
+room_import_select_file_note = "※1行目はヘッダ行として扱われます。
※処理可能な行数は%d行までです。"
+room_import_help_label = "ヘルプ"
+room_import_help_title = "インポートファイル設定項目の詳細確認"
+room_import_exp = "ルームの参加者/参加権限を指定形式のファイルからインポートし、一括登録ができます。
参加できない会員や与えることのできない権限が記載されていた場合は処理中断となり、インポートは実施されません。
エラー発生を極力避けるため、エクスポートされたファイルを利用してください。
"
+room_import_import_imp = "インポート処理を実行します"
+room_import_help_open = "表示"
+room_import_help_close = "閉じる"
+room_import_item = "項目"
+room_import_contents = "内容"
+room_import_need_on = "※必須入力項目"
+room_import_sel = "<選択肢>"
+room_not_entry = "不参加"
+define:ROOM_IMPORT_ITEM_HANDLE = "ハンドルを設定します。"
+room_import_check_message = "%error_item%が選択されていません。"
+define:ROOM_IMPORT_HELP_AUTH_LABEL = "参加権限"
+define:ROOM_IMPORT_HELP_AUTH_EXP = "ルームにどのような権限で参加させるかの値を設定します。"
+define:ROOM_IMPORT_UPLOAD_SYSERR = "システムエラーが発生しました。"
+define:ROOM_IMPORT_UPLOAD_OPEN_ERR = "ファイルのオープンに失敗しました。"
+define:ROOM_IMPORT_UPLOAD_NOROOM_ERR = "存在しないルームが指定されました。"
+define:ROOM_IMPORT_UPLOAD_NO_PERMISSION = "操作権限がありません。"
+define:ROOM_IMPORT_UPLOAD_COLUMN_ERR = "エラー:%d行目
CSVファイルのカラム数が既定のものと異なります。内容を再度確認してください。"
+define:ROOM_IMPORT_UPLOAD_NOUSER_ERR = "エラー:%d行目
存在しない、または参加が不可能な会員「%s」が、操作対象として指定されています。"
+define:ROOM_IMPORT_UPLOAD_NOAUTH_ERR = "エラー:%d行目
%dは設定できる権限種別ではありません。"
+define:ROOM_IMPORT_UPLOAD_NOT_PERMIT_AUTH = "エラー:%d行目
会員%sに、権限[%d]は設定できません。"
+define:ROOM_IMPORT_UPLOAD_NO_CHAGE = "このCSVでは変更となる会員はありませんでした。"
+define:ROOM_IMPORT_UPLOAD_LINE_OVER_ERR = "ファイルの行数が%d行を超えています。"
+define:ROOM_IMPORT_CONFIRM_ADMINUSER_WRAN = "ベース権限が「管理」の会員は変更できません。処理対象から除外しました。"
+define:ROOM_IMPORT_CONFIRM_MYSELF_WRAN = "自分自身の権限は変更できません。処理対象から除外しました。"
+define:ROOM_IMPORT_CONFIRM_PUBLIC_OTHER_WRAN = "パブリック空間で不参加への変更はできません。不参加指定は処理対象から除外しました。"
+define:ROOM_IMPORT_UPLOAD_NODATAS_ERR = "ファイルにデータ行が存在しません。"
+
+[Room_View_Admin_Import_Confirm]
+room_import_confirm_message1 = "%sルームに対して、以下の設定をします。"
+room_import_confirm_change_count = "%d名を%sに変更します。"
+room_import_confirm_message2 = "変更後、ルームの人員構成は以下のとおりとなります。
"
+room_import_confirm_count = "%s %d名"
+room_import_confirm_message3 = "よろしいですか?"
+room_import_confirm_warnMsg = "ハンドル名「%s」"
+
+
+[Room_Action_Admin_Import_Confirm]
+room_import_confirm_message1 = "%sルームに対して、以下の設定をしました。"
+room_import_confirm_change_count = "%d名を%sに変更しました。"
+room_import_confirm_message2 = "ルームの人員構成は以下のとおりとなりました。
"
+room_import_confirm_count = "%s %d名"
+
+room_import_confirm_warnMsg = "何らかの設定変更がなされたようです。
以下の会員の変更ができませんでした。"
+room_not_entry = "不参加"
+
diff --git a/html/webapp/modules/room/templates/default/room_action_admin_import_confirm.html b/html/webapp/modules/room/templates/default/room_action_admin_import_confirm.html
new file mode 100644
index 0000000..1316846
--- /dev/null
+++ b/html/webapp/modules/room/templates/default/room_action_admin_import_confirm.html
@@ -0,0 +1,55 @@
+<{strip}>
+
+
+
+ <{$lang.room_import_confirm_message1|smarty:nodefaults|sprintf:$action.page.page_name}>
+
+
+ <{foreach item=num key=auth_name from=$action.added_auth_member_num}>
+ <{if $num!=0}>
+ <{$lang.room_import_confirm_change_count|sprintf:$num:$auth_name}>
+
+ <{/if}>
+ <{/foreach}>
+ <{if $action.deleted_auth_member_num > 0}>
+ <{$lang.room_import_confirm_change_count|sprintf:$action.deleted_auth_member_num:$lang.room_not_entry}>
+ <{/if}>
+
+
+
+ <{$lang.room_import_confirm_message2|smarty:nodefaults}>
+
+
+
+ <{foreach item=num key=auth_name from=$action.total_auth_member_num}>
+ <{if $num!=0}>
+
+ <{$auth_name}>
+ <{$num}>
+
+ <{/if}>
+ <{/foreach}>
+
+
+
+ <{if count($action.warnMsg)>0 && $action.warnMsg.0!=''}>
+
+ <{$lang.room_import_confirm_warnMsg|smarty:nodefaults}>
+
+ <{foreach item=handle from=$action.warnMsg}>
+ <{$handle}>
+ <{/foreach}>
+
+ <{/if}>
+
+
+ <{* 閉じる *}>
+
+
+
+
+
+
+<{include file="room_script.html"}>
+
+<{/strip}>
\ No newline at end of file
diff --git a/html/webapp/modules/room/templates/default/room_view_admin_import.html b/html/webapp/modules/room/templates/default/room_view_admin_import.html
new file mode 100644
index 0000000..df278ba
--- /dev/null
+++ b/html/webapp/modules/room/templates/default/room_view_admin_import.html
@@ -0,0 +1,98 @@
+<{strip}>
+
+
+ <{* 各種ボタン *}>
+
+
+
+ <{* キャンセル *}>
+
+
+
+
+<{include file="room_script.html"}>
+<{/strip}>
diff --git a/html/webapp/modules/room/templates/default/room_view_admin_import_confirm.html b/html/webapp/modules/room/templates/default/room_view_admin_import_confirm.html
new file mode 100644
index 0000000..5268080
--- /dev/null
+++ b/html/webapp/modules/room/templates/default/room_view_admin_import_confirm.html
@@ -0,0 +1,68 @@
+<{strip}>
+
+<{include file="room_script.html"}>
+
+<{/strip}>
\ No newline at end of file
diff --git a/html/webapp/modules/room/templates/default/room_view_admin_regist_selectusers.html b/html/webapp/modules/room/templates/default/room_view_admin_regist_selectusers.html
index 8c25c5f..4d7f761 100644
--- a/html/webapp/modules/room/templates/default/room_view_admin_regist_selectusers.html
+++ b/html/webapp/modules/room/templates/default/room_view_admin_regist_selectusers.html
@@ -21,6 +21,14 @@
+
+ <{* CSVエクスポート *}>
+
+
<{assign var="edit_current_page_id" value=$action.edit_current_page_id}>
-<{/strip}>
\ No newline at end of file
+<{/strip}>
diff --git a/html/webapp/templates_c/.gitkeep b/html/webapp/templates_c/.gitkeep
new file mode 100644
index 0000000..e69de29
diff --git a/html/webapp/uploads/.gitkeep b/html/webapp/uploads/.gitkeep
new file mode 100644
index 0000000..e69de29