diff --git a/html/webapp/config/install.inc.php b/html/webapp/config/install.inc.php index 33618f4..6d2cbee 100644 --- a/html/webapp/config/install.inc.php +++ b/html/webapp/config/install.inc.php @@ -18,7 +18,7 @@ // ---------------------------- // ベースのURL値 // ---------------------------- -define('BASE_URL', 'http://'); +define('BASE_URL', 'http://localhost'); // ------------------------------------------------- // ベースのURL値(ソースがあるCoreのNetCommonsのURL) // 基本:BASE_URLと同じ diff --git a/html/webapp/modules/simplemovie/action/admin/operation/Operation.class.php b/html/webapp/modules/simplemovie/action/admin/operation/Operation.class.php new file mode 100644 index 0000000..119865f --- /dev/null +++ b/html/webapp/modules/simplemovie/action/admin/operation/Operation.class.php @@ -0,0 +1,270 @@ +simplemovieView->getBlock( $this->block_id ); + + switch ($this->mode) { + case "move": + + // 動画レコード更新 + $params = array( + "block_id"=> intval($this->move_block_id), + "room_id"=> intval($this->move_room_id) + ); + $where_params = array( + "block_id"=> intval($this->block_id) + ); + $result = $this->db->updateExecute("simplemovie", $params, $where_params, false); + if($result === false) { + return "false"; + } + + // 動画ファイル更新処理(room_id を更新する) + if ( $bofore_simplemovie['room_id'] != $this->move_room_id ) { + + // 動画ファイルがある場合 + if ( !empty( $bofore_simplemovie['movie_upload_id'] ) ) { + + // uploads テーブル更新 + $movie_params = array( "room_id"=> intval($this->move_room_id) ); + $movie_where = array( "upload_id"=> intval($bofore_simplemovie['movie_upload_id']) ); + $movie_result = $this->db->updateExecute("uploads", $movie_params, $movie_where, false); + if($movie_result === false) { + return "false"; + } + } + + // サムネイル画像ファイルがある場合 + if ( !empty( $bofore_simplemovie['thumbnail_upload_id'] ) ) { + + // uploads テーブル更新 + $thumbnail_params = array( "room_id"=> intval($this->move_room_id) ); + $thumbnail_where = array( "upload_id"=> intval($bofore_simplemovie['thumbnail_upload_id']) ); + $thumbnail_result = $this->db->updateExecute("uploads", $thumbnail_params, $thumbnail_where, false); + if($thumbnail_result === false) { + return "false"; + } + } + + // リクエスト動画ファイルがある場合 + if ( !empty( $bofore_simplemovie['movie_upload_id_request'] ) ) { + + // uploads テーブル更新 + $movie_params = array( "room_id"=> intval($this->move_room_id) ); + $movie_where = array( "upload_id"=> intval($bofore_simplemovie['movie_upload_id_request']) ); + $movie_result = $this->db->updateExecute("uploads", $movie_params, $movie_where, false); + if($movie_result === false) { + return "false"; + } + } + + // リクエストサムネイル画像ファイルがある場合 + if ( !empty( $bofore_simplemovie['thumbnail_upload_id_request'] ) ) { + + // uploads テーブル更新 + $thumbnail_params = array( "room_id"=> intval($this->move_room_id) ); + $thumbnail_where = array( "upload_id"=> intval($bofore_simplemovie['thumbnail_upload_id_request']) ); + $thumbnail_result = $this->db->updateExecute("uploads", $thumbnail_params, $thumbnail_where, false); + if($thumbnail_result === false) { + return "false"; + } + } + + } + + //--新着情報関連 Start-- + //$whatsnew = array( + // "unique_id" => $this->block_id, + // "room_id" => $this->move_room_id + //); + //$result = $this->whatsnewAction->moveUpdate($whatsnew); + //if ($result === false) { + // return false; + //} + //--新着情報関連 End-- + + break; + + case "copy": + + // 添付ファイルコピー処理 + + // uploads テーブル取得 + $upload_id_arr = array(); + + // コピーした動画ファイルの upload_id + $movie_upload_id = null; + + // コピーしたサムネイル画像ファイルの upload_id + $thumbnail_upload_id = null; + + // コピーしたリクエスト動画ファイルの upload_id + $movie_upload_id_request = null; + + // コピーしたリクエストサムネイル画像ファイルの upload_id + $thumbnail_upload_id_request = null; + + // 動画ファイルがある場合 + if ( !empty( $bofore_simplemovie['movie_upload_id'] ) ) { + $movie_upload_id = $this->copyUploads( $bofore_simplemovie['movie_upload_id'], $this->move_room_id ); + } + + // サムネイル画像ファイルがある場合 + if ( !empty( $bofore_simplemovie['thumbnail_upload_id'] ) ) { + $thumbnail_upload_id = $this->copyUploads( $bofore_simplemovie['thumbnail_upload_id'], $this->move_room_id ); + } + + // リクエスト動画ファイルがある場合 + if ( !empty( $bofore_simplemovie['movie_upload_id_request'] ) ) { + $movie_upload_id_request = $this->copyUploads( $bofore_simplemovie['movie_upload_id_request'], $this->move_room_id ); + } + + // リクエストサムネイル画像ファイルがある場合 + if ( !empty( $bofore_simplemovie['thumbnail_upload_id_request'] ) ) { + $thumbnail_upload_id_request = $this->copyUploads( $bofore_simplemovie['thumbnail_upload_id_request'], $this->move_room_id ); + } + + // 動画テーブルの追加 + $params = array( + 'block_id' => $this->move_block_id, + 'movie_upload_id' => $movie_upload_id, + 'thumbnail_upload_id' => $thumbnail_upload_id, + 'movie_upload_id_request' => $movie_upload_id_request, + 'thumbnail_upload_id_request' => $thumbnail_upload_id_request, + 'width' => $bofore_simplemovie['width'], + 'height' => $bofore_simplemovie['height'], + 'room_id' => $this->move_room_id, + //コピーした場合にも + 'agree_flag' => $bofore_simplemovie['agree_flag'], + ); + $result = $this->db->insertExecute( + 'simplemovie', + $params, + true + ); + break; + default: + return "false"; + } + + return "true"; + } + + /** + * 添付ファイルのコピー + * + * @access public + */ + function copyUploads( $upload_id, $move_room_id ) + { + + // upload_id から uploads テーブルの取得 + $where_params = array( "upload_id" => $upload_id ); + + $uploads = $this->db->selectExecute( "uploads", $where_params ); + if( $uploads === false ) { + return false; + } + if( !isset( $uploads[0] ) ) { + return array(); + } + + // uploads テーブルの追加 + $params = array( + 'room_id' => $move_room_id, + 'module_id' => $uploads[0]['module_id'], + 'unique_id' => $uploads[0]['unique_id'], + 'file_name' => $uploads[0]['file_name'], + 'physical_file_name' => "", + 'file_path' => $uploads[0]['file_path'], + 'action_name' => $uploads[0]['action_name'], + 'file_size' => $uploads[0]['file_size'], + 'mimetype' => $uploads[0]['mimetype'], + 'extension' => $uploads[0]['extension'], + 'garbage_flag' => $uploads[0]['garbage_flag'] + ); + $upload_id = $this->simplemovieAction->insUploads( $params ); + if ( $upload_id === false ) { + return false; + } + + //サムネイル自動作成時には動画のupload_id+_thumbnailで作成される ex.600_thumbnail.jpg サムネイル画像自体のupload_idは601 + //コピー元が自動作成サムネイルの場合に処理を実行 + $autoCreateThumbFilename = $uploads[0]['file_name']; + if(preg_match('/^[0-9]*_thumbnail.*/', $autoCreateThumbFilename)){ + copy( FILEUPLOADS_DIR.$uploads[0]['file_path'].$autoCreateThumbFilename, + FILEUPLOADS_DIR.$uploads[0]['file_path'].$upload_id.".".$uploads[0]['extension'] ); + //コピーしたのでリターン + return $upload_id; + } + + // ファイルのコピー(サムネイルがある場合はサムネイルも) + $file_full_path = FILEUPLOADS_DIR.$uploads[0]['file_path'].$uploads[0]['upload_id']."*.*"; + foreach ( glob( $file_full_path ) as $filename ) { + + $filename = basename( $filename ); + + // メインのファイル + if ( $filename == $uploads[0]['physical_file_name'] ) { + copy( FILEUPLOADS_DIR.$uploads[0]['file_path'].$filename, + FILEUPLOADS_DIR.$uploads[0]['file_path'].$upload_id.".".$uploads[0]['extension'] ); + } + // サムネイル(240) + elseif ( $filename == $uploads[0]['upload_id'] . "_mobile_" . MOBILE_IMGDSP_SIZE_240 .".". $uploads[0]['extension'] ) { + copy( FILEUPLOADS_DIR.$uploads[0]['file_path'].$uploads[0]['upload_id'] . "_mobile_" . MOBILE_IMGDSP_SIZE_240 .".". $uploads[0]['extension'], + FILEUPLOADS_DIR.$uploads[0]['file_path'].$upload_id . "_mobile_" . MOBILE_IMGDSP_SIZE_240 .".". $uploads[0]['extension'] ); + } + // サムネイル(480) + elseif ( $filename == $uploads[0]['upload_id'] . "_mobile_" . MOBILE_IMGDSP_SIZE_480 .".". $uploads[0]['extension'] ) { + copy( FILEUPLOADS_DIR.$uploads[0]['file_path'].$uploads[0]['upload_id'] . "_mobile_" . MOBILE_IMGDSP_SIZE_480 .".". $uploads[0]['extension'], + FILEUPLOADS_DIR.$uploads[0]['file_path'].$upload_id . "_mobile_" . MOBILE_IMGDSP_SIZE_480 .".". $uploads[0]['extension'] ); + } + } + + // 新しいupload_id の返却 + return $upload_id; + } +} +?> \ No newline at end of file diff --git a/html/webapp/modules/simplemovie/action/admin/operation/dicon.ini b/html/webapp/modules/simplemovie/action/admin/operation/dicon.ini new file mode 100644 index 0000000..be88da7 --- /dev/null +++ b/html/webapp/modules/simplemovie/action/admin/operation/dicon.ini @@ -0,0 +1,2 @@ +[DIContainer] +fileAction = "file.action" diff --git a/html/webapp/modules/simplemovie/action/admin/operation/maple.ini b/html/webapp/modules/simplemovie/action/admin/operation/maple.ini new file mode 100644 index 0000000..310ed17 --- /dev/null +++ b/html/webapp/modules/simplemovie/action/admin/operation/maple.ini @@ -0,0 +1,17 @@ +[RecursiveNocall] +ValidateDef = + +[ValidateDef] +requiredfalse ="1:lang._invalid_input" + +[DIContainer] +filename_operation = "dicon.ini" + +[Action] +db = "ref:DbObject" +simplemovieView = "ref:simplemovieView" +simplemovieAction = "ref:simplemovieAction" +uploadsAction = "ref:uploadsAction" +;commonOperation = "ref:commonOperation" +;whatsnewAction = "ref:whatsnewAction" +session = "ref:Session" \ No newline at end of file diff --git a/html/webapp/modules/simplemovie/action/dicon.ini b/html/webapp/modules/simplemovie/action/dicon.ini new file mode 100644 index 0000000..a1ca4b8 --- /dev/null +++ b/html/webapp/modules/simplemovie/action/dicon.ini @@ -0,0 +1,3 @@ +[DIContainer] +simplemovieView = "modules://simplemovie.components.view" +simplemovieAction = "modules://simplemovie.components.action" diff --git a/html/webapp/modules/simplemovie/action/edit/delblock/Delblock.class.php b/html/webapp/modules/simplemovie/action/edit/delblock/Delblock.class.php new file mode 100644 index 0000000..3b10727 --- /dev/null +++ b/html/webapp/modules/simplemovie/action/edit/delblock/Delblock.class.php @@ -0,0 +1,64 @@ +simplemovieView->getBlock( $this->block_id ); + + if ( empty( $simplemovie ) || count( $simplemovie ) == 0 ) { + return 'success'; + } + + // ファイル削除処理 + $mUId = $simplemovie['movie_upload_id']; + if ( empty( $mUId ) == false ) $this->simplemovieAction->deleteUpload($mUId); + $tUId = $simplemovie['thumbnail_upload_id']; + if ( empty( $tUId ) == false ) $this->simplemovieAction->deleteUpload($tUId); + $mUIdR = $simplemovie['movie_upload_id_request']; + if ( empty( $mUIdR ) == false ) $this->simplemovieAction->deleteUpload($mUIdR); + $tUIdR = $simplemovie['thumbnail_upload_id_request']; + if ( empty( $tUIdR ) == false ) $this->simplemovieAction->deleteUpload($tUIdR); + + // ブロックデータ削除処理 + $result = $this->db->deleteExecute( "simplemovie", array( "block_id" => $this->block_id ) ); + if ($result === false) { + return 'error'; + } + + //--新着情報関連 Start-- + //$this->whatsnew = array( + // "unique_id" => $this->block_id + //); + //--新着情報関連 End-- + + return 'success'; + } +} +?> diff --git a/html/webapp/modules/simplemovie/action/edit/delblock/dicon.ini b/html/webapp/modules/simplemovie/action/edit/delblock/dicon.ini new file mode 100644 index 0000000..d593094 --- /dev/null +++ b/html/webapp/modules/simplemovie/action/edit/delblock/dicon.ini @@ -0,0 +1,2 @@ +[DIContainer] +uploadsAction = "uploads.action" \ No newline at end of file diff --git a/html/webapp/modules/simplemovie/action/edit/delblock/maple.ini b/html/webapp/modules/simplemovie/action/edit/delblock/maple.ini new file mode 100644 index 0000000..49a9bda --- /dev/null +++ b/html/webapp/modules/simplemovie/action/edit/delblock/maple.ini @@ -0,0 +1,15 @@ +[ValidateDef] +block_id.required ="1:lang._required,lang._block_id" + +[DIContainer] +filename_upload = "dicon.ini" + +[Action] +simplemovieView = "ref:simplemovieView" +simplemovieAction = "ref:simplemovieAction" +db = "ref:DbObject" +uploadsAction = "ref:uploadsAction" + +;[Whatsnew] +;mode = delete + diff --git a/html/webapp/modules/simplemovie/action/edit/init/Init.class.php b/html/webapp/modules/simplemovie/action/edit/init/Init.class.php new file mode 100644 index 0000000..25e247c --- /dev/null +++ b/html/webapp/modules/simplemovie/action/edit/init/Init.class.php @@ -0,0 +1,57 @@ +movie_delete ) || !empty( $this->thumbnail_delete ) ) { + $this->simplemovieAction->deleteUploads( $this->block_id, $this->movie_delete, $this->thumbnail_delete ); + } + + // アップロード・ファイル情報の登録 + if ( !empty( $this->upload_files ) ) { + $this->simplemovieAction->setUploads( $this->block_id, $this->upload_files ); + } + + return 'success'; + } +} +?> diff --git a/html/webapp/modules/simplemovie/action/edit/init/maple.ini b/html/webapp/modules/simplemovie/action/edit/init/maple.ini new file mode 100644 index 0000000..0dbd439 --- /dev/null +++ b/html/webapp/modules/simplemovie/action/edit/init/maple.ini @@ -0,0 +1,29 @@ +[TokenExtra] +mode="check" +action="simplemovie_view_edit_init" + +[Include] +filename_simplemovie = "/modules/simplemovie/config/define.inc.php" + +[FileUpload] +name = attachment +action_name = simplemovie_view_main_play +allow_extension = "true" +maxsize = SIMPLEMOVIE_UPLOAD_MAX_SIZE_MEDIA +;noFileError = _FILE_UPLOAD_ERR_UPLOAD_NOFILE +stopper = "false" + +[ValidateDef] +.simplemovie.movieupload = "1:" + +[Action] +simplemovieView = "ref:simplemovieView" +simplemovieAction = "ref:simplemovieAction" +mailMain = "ref:mailMain" +session = "ref:Session" + +[View] +define:attachment = 1 +success = "main:true.html" +;success = "action:simplemovie_view_edit_init.html" +error = "main:error.html" diff --git a/html/webapp/modules/simplemovie/action/edit/style/Style.class.php b/html/webapp/modules/simplemovie/action/edit/style/Style.class.php new file mode 100644 index 0000000..f1bfab3 --- /dev/null +++ b/html/webapp/modules/simplemovie/action/edit/style/Style.class.php @@ -0,0 +1,48 @@ +simplemovieAction->setStyle( array( 'block_id' => $this->block_id, + 'default_width' => $this->default_width, + 'default_height' => $this->default_height, + 'autoplay_flag' => $this->autoplay_flag, + 'embed_show_flag' => $this->embed_show_flag ) ); + return 'success'; + } +} +?> diff --git a/html/webapp/modules/simplemovie/action/edit/style/maple.ini b/html/webapp/modules/simplemovie/action/edit/style/maple.ini new file mode 100644 index 0000000..6f9139f --- /dev/null +++ b/html/webapp/modules/simplemovie/action/edit/style/maple.ini @@ -0,0 +1,16 @@ +[TokenExtra] +mode="check" +action="simplemovie_view_edit_style" + +[Action] +simplemovieView = "ref:simplemovieView" +simplemovieAction = "ref:simplemovieAction" + +[ValidateDef] +default_width.numeric="1:幅は数値で入力してください。" +default_height.numeric="1:高さは数値で入力してください。" + +[View] +;success = "main:true.html" +success = "action:simplemovie_view_edit_style" +error = "main:error.html" diff --git a/html/webapp/modules/simplemovie/action/main/agree/Agree.class.php b/html/webapp/modules/simplemovie/action/main/agree/Agree.class.php new file mode 100644 index 0000000..97abc63 --- /dev/null +++ b/html/webapp/modules/simplemovie/action/main/agree/Agree.class.php @@ -0,0 +1,92 @@ +agree_flag == 1 ) { + // 一緒にページ情報も取得する。 + $params = array( "block_id" => $this->block_id ); + + $sql = "SELECT a.*, p.page_id, p.page_name, p.permalink ". + "FROM {simplemovie} a, {blocks} b ". + "LEFT JOIN {pages} p ON b.page_id = p.page_id ". + "WHERE a.block_id = ? AND a.block_id = b.block_id"; + + $simplemovie = $this->db->execute($sql, $params); + if ($simplemovie === false) { + $this->db->addError(); + return $simplemovie; + } + + $params = array( + "agree_flag" => SIMPLEMOVIE_STATUS_AGREE, + "movie_upload_id" => $simplemovie[0]["movie_upload_id_request"], + "thumbnail_upload_id" => $simplemovie[0]["thumbnail_upload_id_request"], + "movie_upload_id_request" => null, + "thumbnail_upload_id_request" => null + ); + $result = $this->db->updateExecute("simplemovie", $params, array("block_id"=>$this->block_id), true); + if ($result === false) { + return 'error'; + } + + // メールで指定するURL の編集 + $page_url = BASE_URL; + if ( !empty( $simplemovie[0]['permalink'] ) ) { + $page_url .= "/" . $simplemovie[0]['permalink']; + } else { + $page_url .= "/?page_id=" . $simplemovie[0]['page_id']; + } + + // メール本文 + $mail_body = "以下のページ内のシンプル動画が承認されました。\n\n"; + $mail_body .= "ページタイトル:" . $simplemovie[0]['page_name'] . "\n"; + $mail_body .= "URL      :" . $page_url . "\n"; + + // メール送信ユーザ + $sql = "SELECT u.user_id, u.role_authority_id, mail.content AS email, u.login_id, u.handle ". + "FROM {users} u ". + "INNER JOIN {users_items_link} mail ON u.user_id = mail.user_id ". + "AND mail.item_id = ( SELECT item_id FROM {items} WHERE item_name = 'USER_ITEM_EMAIL' ) ". + "WHERE u.user_id = ? ". + "AND mail.content != ''"; + $params = array( "update_user_id" => $simplemovie[0]["update_user_id"] ); + + $send_user = $this->db->execute( $sql, $params ); + if ( $send_user === false ) { + $this->db->addError(); + return false; + } + + $this->mailMain->setSubject("シンプル動画が承認されました。"); + $this->mailMain->setBody($mail_body); + $this->mailMain->setToUsers($send_user); + $this->mailMain->send(); + } + + return 'success'; + } +} +?> diff --git a/html/webapp/modules/simplemovie/action/main/agree/dicon.ini b/html/webapp/modules/simplemovie/action/main/agree/dicon.ini new file mode 100644 index 0000000..f088008 --- /dev/null +++ b/html/webapp/modules/simplemovie/action/main/agree/dicon.ini @@ -0,0 +1,2 @@ +[DIContainer] +mailMain = "mail.main" diff --git a/html/webapp/modules/simplemovie/action/main/agree/maple.ini b/html/webapp/modules/simplemovie/action/main/agree/maple.ini new file mode 100644 index 0000000..69c9b72 --- /dev/null +++ b/html/webapp/modules/simplemovie/action/main/agree/maple.ini @@ -0,0 +1,17 @@ +[SmartyAssign] +module = main.ini + +[DIContainer] +filename_upload = "dicon.ini" + +[Action] +db = "ref:DbObject" +mailMain = "ref:mailMain" + +[TokenExtra] +mode="check" +action = "simplemovie_view_main_agree" + +[View] +success = "action:simplemovie_view_main_init" +error = "main:error.html" diff --git a/html/webapp/modules/simplemovie/action/main/init/Init.class.php b/html/webapp/modules/simplemovie/action/main/init/Init.class.php new file mode 100644 index 0000000..2304558 --- /dev/null +++ b/html/webapp/modules/simplemovie/action/main/init/Init.class.php @@ -0,0 +1,36 @@ + diff --git a/html/webapp/modules/simplemovie/action/main/init/maple.ini b/html/webapp/modules/simplemovie/action/main/init/maple.ini new file mode 100644 index 0000000..00bdeec --- /dev/null +++ b/html/webapp/modules/simplemovie/action/main/init/maple.ini @@ -0,0 +1,12 @@ +[TokenExtra] +mode="check" +action="simplemovie_view_main_init" + +[Action] +simplemovieView = "ref:simplemovieView" +simplemovieAction = "ref:simplemovieAction" + +[View] +success = "main:true.html" +;success = "action:simplemovie_view_main_init.html" +error = "main:error.html" diff --git a/html/webapp/modules/simplemovie/action/maple.ini b/html/webapp/modules/simplemovie/action/maple.ini new file mode 100644 index 0000000..877442a --- /dev/null +++ b/html/webapp/modules/simplemovie/action/maple.ini @@ -0,0 +1,5 @@ +[SmartyAssign] +module = main.ini + +[DIContainer] +filename = "/modules/simplemovie/action/dicon.ini" diff --git a/html/webapp/modules/simplemovie/components/Action.class.php b/html/webapp/modules/simplemovie/components/Action.class.php new file mode 100644 index 0000000..a59f7b5 --- /dev/null +++ b/html/webapp/modules/simplemovie/components/Action.class.php @@ -0,0 +1,288 @@ +_container =& DIContainerFactory::getContainer(); + $this->_db =& $this->_container->getComponent("DbObject"); + $commonMain =& $this->_container->getComponent("commonMain"); + $this->_uploadsAction =& $commonMain->registerClass(WEBAPP_DIR.'/components/uploads/Action.class.php', "Uploads_Action", "uploadsAction"); + $this->_simplemovieView =& $this->_container->getComponent("simplemovieView"); + } + + /** + * アップロードデータの削除 + * + * @access public + */ + function deleteUploads( $block_id, $movie_delete, $thumbnail_delete ) + { + // 削除フラグがチェックされていなければ処理しない。 + if ( empty( $movie_delete ) && empty( $thumbnail_delete ) ) { + return; + } + + // テーブル確認 + $params = array( $block_id ); + $sql = "SELECT * " + . "FROM {simplemovie} " + . "WHERE block_id = ? "; + $simplemovie_record = $this->_db->execute( $sql, $params ); + + if ($simplemovie_record === false) { + $this->_db->addError(); + return $simplemovie_record; + } + + // データがなければ、特に処理しない。 + if ( count( $simplemovie_record ) == 0 ) { + return; + } + + //自動承認権限の場合は表示用カラムそれ以外は_requestカラム + if($this->_simplemovieView->isAutoAgree($this->_simplemovieView->getAgreeFlag())) { + $mCol = "movie_upload_id"; + $tCol = "thumbnail_upload_id"; + } else { + $mCol = "movie_upload_id_request"; + $tCol = "thumbnail_upload_id_request"; + } + // データがあれば、ファイルの削除 + $params = array(); + + //データを承認済にする + // ※主担以上の権限者が動画未承認時の「動画ファイルがアップロードされていません。」の表示を防ぐため + $params["agree_flag"] = SIMPLEMOVIE_STATUS_AGREE; + + if ( $movie_delete == "1" ) { + $this->deleteUpload( $simplemovie_record[0][$mCol] ); + $params[$mCol] = null; + } + if ( $thumbnail_delete == "1" ) { + $this->deleteUpload( $simplemovie_record[0][$tCol] ); + $params[$tCol] = null; + } + + $result = $this->_db->updateExecute( + 'simplemovie', + $params, + array( "block_id" => $block_id ), + true + ); + if ( $result === false ) { + $this->_db->addError(); + return $result; + } + } + + /** + * アップロードされたファイルを削除する。 + * + * @return boolean true or false + * @access public + */ + function deleteUpload( $upload_id ) + { + $files = $this->_uploadsAction->delUploadsById( $upload_id ); + } + + /** + * uploads テーブル追加 + * + * @return boolean true or false + * @access public + */ + function insUploads( $params ) + { + return $this->_uploadsAction->insUploads( $params ); + } + + /** + * アップロードデータの登録 + * + * @access public + */ + function setUploads( $block_id, $files ) + { + + // アップロード・ファイルがあるかチェック、 + if ( empty( $files ) ) { + return true; + } + + // すでにブロックのデータがあるか確認 + $params = array( $block_id ); + $sql = "SELECT * " + . "FROM {simplemovie} " + . "WHERE block_id = ? "; + $simplemovie_record = $this->_db->execute( $sql, $params ); + + if ($simplemovie_record === false) { + $this->_db->addError(); + return $simplemovie_record; + } + + // SQL パラメータのクリア + $params = array(); + + //アップローダーの承認フラグをセット 1:承認済(自動承認)2:未承認 + $agreeFlg = $this->_simplemovieView->getAgreeFlag(); + $params["agree_flag"] = $agreeFlg; + // 動画ファイルのID を処理 + if ( array_key_exists( 'movie', $files ) ) { + $mUId = $files['movie']['upload_id']; + } + + // サムネイル画像ファイルのID を処理 + if ( array_key_exists( 'thumbnail', $files ) ) { + $tUId = $files['thumbnail']['upload_id']; + } + //自動承認権限の場合は表示用カラムそれ以外は_requestカラム + if($this->_simplemovieView->isAutoAgree($agreeFlg) == true){ + // 管理者での更新(承認済)→xxxxx_upload_idに紐づくデータを削除 + $mCol = "movie_upload_id"; + $tCol = "thumbnail_upload_id"; + }else{ + // 主担での更新(未承認)→xxxxx_upload_id_requestに紐づくデータを削除 + $mCol = "movie_upload_id_request"; + $tCol = "thumbnail_upload_id_request"; + } + if ($mUId) $params[$mCol] = $mUId; + if ($tUId) $params[$tCol] = $tUId; + + // データがあれば更新 + if ( count( $simplemovie_record ) > 0 ) { + $rowMUId = $simplemovie_record[0][$mCol]; + $rowTUId = $simplemovie_record[0][$tCol]; + // 既存のファイルがあり、新たにアップロードされている場合、既存のファイルを削除 + if ( !empty( $rowMUId ) && array_key_exists( 'movie', $files ) && !empty( $files['movie']['upload_id'] ) ) { + $this->deleteUpload( $rowMUId ); + } + if ( !empty( $rowTUId ) && array_key_exists( 'thumbnail', $files ) && !empty( $files['thumbnail']['upload_id'] ) ) { + $this->deleteUpload( $rowTUId ); + } + + $result = $this->_db->updateExecute( + 'simplemovie', + $params, + array( "block_id"=> $block_id ), + true + ); + } + // データがなければ追加 + else { + + $params["block_id"] = $block_id; + $result = $this->_db->insertExecute( + 'simplemovie', + $params, + true + ); + } + } + + /** + * 表示方法の登録 + * @param func_parmas array( block_id, default_width, default_height, autoplay_flag, embed_show_flag ) + * @access public + */ + function setStyle( $func_parmas ) + { + + // 引数が配列じゃなければ異常終了 + if ( !is_array( $func_parmas ) ) return false; + + // ブロックIDの取得 + $block_id = array_key_exists( 'block_id', $func_parmas ) ? $func_parmas['block_id'] : null; + + // すでにブロックのデータがあるか確認 + $params = array( $block_id ); + $sql = "SELECT * " + . "FROM {simplemovie} " + . "WHERE block_id = ? "; + $simplemovie_record = $this->_db->execute( $sql, $params ); + + if ($simplemovie_record === false) { + $this->_db->addError(); + return $simplemovie_record; + } + + // SQL パラメータのクリア + $params = array(); + + if ( array_key_exists( 'default_width' , $func_parmas ) ) $params["width"] = $func_parmas['default_width']; + if ( array_key_exists( 'default_height' , $func_parmas ) ) $params["height"] = $func_parmas['default_height']; + if ( array_key_exists( 'autoplay_flag' , $func_parmas ) ) $params["autoplay_flag"] = $func_parmas['autoplay_flag']; + if ( array_key_exists( 'embed_show_flag', $func_parmas ) ) $params["embed_show_flag"] = $func_parmas['embed_show_flag']; + + // Updateする項目がない場合には何もせず終了 + if ( count( $params ) <= 0 ) return false; + + // データがあれば更新 + if ( count( $simplemovie_record ) > 0 ) { + + $result = $this->_db->updateExecute( + 'simplemovie', + $params, + array( "block_id"=> $block_id ), + true + ); + } + // データがなければ追加 + else { + + $params["block_id"] = $block_id; + $result = $this->_db->insertExecute( + 'simplemovie', + $params, + true + ); + } + } + +} +?> diff --git a/html/webapp/modules/simplemovie/components/View.class.php b/html/webapp/modules/simplemovie/components/View.class.php new file mode 100644 index 0000000..7655559 --- /dev/null +++ b/html/webapp/modules/simplemovie/components/View.class.php @@ -0,0 +1,169 @@ +_container =& DIContainerFactory::getContainer(); + $this->_db =& $this->_container->getComponent("DbObject"); + $this->_session = $this->_container->getComponent("Session"); // ★ 2.4.2.5 ⇒ 2.4.2.6 追加 + } + + /** + * ブロックデータの取得 + * + * @access public + */ + function getBlock( $block_id ) + { + // テーブル確認 + $params = array( $block_id ); + $sql = "SELECT " + . "s.*, " + . "m.file_name AS movie_file_name, " + . "t.file_name AS thumbnail_file_name, " + . "mr.file_name AS movie_file_name_request, " + . "tr.file_name AS thumbnail_file_name_request " + . "FROM {simplemovie} s " + . "LEFT JOIN {uploads} m ON m.upload_id = s.movie_upload_id " + . "LEFT JOIN {uploads} t ON t.upload_id = s.thumbnail_upload_id " + . "LEFT JOIN {uploads} mr ON mr.upload_id = s.movie_upload_id_request " + . "LEFT JOIN {uploads} tr ON tr.upload_id = s.thumbnail_upload_id_request " + . "WHERE s.block_id = ? "; + $simplemovie_record = $this->_db->execute( $sql, $params ); + + if ($simplemovie_record === false) { + $this->_db->addError(); + return $simplemovie_record; + } + + if ( !empty( $simplemovie_record ) && count( $simplemovie_record ) > 0 ) { + return $simplemovie_record[0]; + } + return $simplemovie_record; + } + + /** + * 動画UploadIDからブロックデータを取得 + * + * @access public + */ + public function getBlockByMovieUploadID( $movie_upload_id ) + { + // 条件設定 + $params = array( $movie_upload_id ); + + // SQL文作成(uploadsテーブルにないとダメなので、inner joinを行っている) + $sql = "SELECT s.*, u.file_name AS movie_file_name " + . "FROM {simplemovie} s " + . "INNER JOIN {uploads} u ON u.upload_id = s.movie_upload_id " + . "WHERE s.movie_upload_id = ? "; + + // SQL実施 + $simplemovie_record = $this->_db->execute( $sql, $params ); + + // 結果 + if ( $simplemovie_record === false ) + { + $this->_db->addError(); + return false; + } + else if( empty( $simplemovie_record ) || count( $simplemovie_record) <= 0 ) + { + return false; + } + + return $simplemovie_record[0]; + } + +// ★ 2.4.2.5 ⇒ 2.4.2.6 追加 start + /** + * ログインユーザーの権限を取得 + * + * @return int -1:ログインしてない / 0以上:ログインユーザーの基本権限値 + * @access public + */ + public function getLoginAuth() + { + // ユーザーID取得 + $user_id = $this->_session->getParameter("_user_id"); + if( $user_id == "0" ) + { + // "0"の場合はログインしていない + return -1; + } + + // ログインユーザー権限を取得して返却 + return $this->_session->getParameter("_user_auth_id"); + + } +// ★ 2.4.2.5 ⇒ 2.4.2.6 追加 end + /** + * 自身の権限の承認フラグを返却 + * @return int 1:承認済 2:未承認 + * @access public + */ + function getAgreeFlag() + { + // ユーザ権限を取得 + if ( $this->_session->getParameter("_user_auth_id") <= _AUTH_CHIEF ) { + // 主担以下の権限の場合、承認待ちにする + $agree_flag = SIMPLEMOVIE_STATUS_RESERVE; + } else { + // 主担より上位(管理者)の場合、承認済みにする + $agree_flag = SIMPLEMOVIE_STATUS_AGREE; + } + return $agree_flag; + } + + /** + * 自動承認の可否状態を返却(管理者の場合にtrueを返却を想定) + * @access public + */ + function isAutoAgree($agree_flag) + { + if ( $agree_flag == SIMPLEMOVIE_STATUS_AGREE) { + return true; + } + return false; + } +} +?> diff --git a/html/webapp/modules/simplemovie/config/define.inc.php b/html/webapp/modules/simplemovie/config/define.inc.php new file mode 100644 index 0000000..df5e98d --- /dev/null +++ b/html/webapp/modules/simplemovie/config/define.inc.php @@ -0,0 +1,23 @@ + \ No newline at end of file diff --git a/html/webapp/modules/simplemovie/config/main.ini b/html/webapp/modules/simplemovie/config/main.ini new file mode 100644 index 0000000..6dfd7e4 --- /dev/null +++ b/html/webapp/modules/simplemovie/config/main.ini @@ -0,0 +1,18 @@ +[Simplemovie] +define:SIMPLEMOVIE_UPLOAD_MAX_SIZE_MEDIA = 314572800 + +; 動画変換ボタン表示フラグ(1:表示する / 1以外:表示しない) +define:SIMPLEMOVIE_CHANGE_EXECUTE_BUTTON_SHOW = 1 + +; ダウンロードタイムリミット +define:SIMPLEMOVIE_TIME_LIMIT = 2400 ;// ファイル作成処理最大時間 + + +;// 承認ステータス +;//承認 +define:SIMPLEMOVIE_STATUS_AGREE = 1 +;//未承認 +define:SIMPLEMOVIE_STATUS_RESERVE = 2 +;//非承認 +define:SIMPLEMOVIE_STATUS_DISAGREE = 0 + diff --git a/html/webapp/modules/simplemovie/files/css/default/style.css b/html/webapp/modules/simplemovie/files/css/default/style.css new file mode 100644 index 0000000..6378525 --- /dev/null +++ b/html/webapp/modules/simplemovie/files/css/default/style.css @@ -0,0 +1,41 @@ +/* Css定義ファイル */ + +/* 使い方画面 +-------------------------------------------------*/ +.simplemovie_copyright { + text-align: right; + color: #a3a3a3; + font-size: 90%; + font-weight: bold; + vertical-align: middle; +} +.simplemovie_caution { + color: #ff0000; +} +.simplemovie_help { + margin: 10px; +} +.simplemovie_help fieldset { + padding: 10px; +} +.simplemovie_help_block { + margin: 0px 0px 5px 30px; +} +.simplemovie_help_block_sub { + margin: 0px 0px 5px 30px; +} +.simplemovie_help_tab { + text-decoration: underline; +} + +/* 埋め込みタグ表示用テキストエリア +-------------------------------------------------*/ +textarea.simplemovie_embed_code { + background:#E8E8E8 none repeat scroll 0 0; + border-bottom:1px solid #000000; + border-top:2px solid #000000; + margin:15px 0; + overflow:scroll; + width:498px; + height:100px; +} diff --git a/html/webapp/modules/simplemovie/files/js/default/simplemovie.js b/html/webapp/modules/simplemovie/files/js/default/simplemovie.js new file mode 100644 index 0000000..601fd55 --- /dev/null +++ b/html/webapp/modules/simplemovie/files/js/default/simplemovie.js @@ -0,0 +1,114 @@ +var clsSimplemovie = Class.create(); +var simplemovieCls = Array(); + +clsSimplemovie.prototype = { + initialize: function(id) { + this.id = id; + }, + + /* 動画、サムネイルをアップロードする */ + uploadEditForm: function(eventObject, form_el) { + + // dialog + if ( form_el["attachment[movie]"].value || form_el["attachment[thumbnail]"].value ) { + + var queryString = "action=simplemovie_view_main_uploading" + + "&prefix_id_name=popup_uploading"; + + var option = new Object(); + option["top_el"] = $(this.id); + option["modal_flag"] = true; + option["center_flag"] = true; + commonCls.sendPopupView(eventObject, queryString, option); + } + + var messageBody = new Object(); + messageBody["action"] = "simplemovie_action_edit_init"; + + // POSTオプションの設定 + var option = new Object(); + option["param"] = messageBody; + option["top_el"] = $(this.id); + option["timeout_flag"] = false; + option["callbackfunc"] = function(res) { + commonCls.alert('更新しました。'); + if ( form_el["attachment[movie]"].value || form_el["attachment[thumbnail]"].value ) { + commonCls.removeBlock("_popup_uploading"+this.id); + } + commonCls.sendRefresh(this.id); + }.bind(this); + option["callbackfunc_error"] = function(file, res){ + commonCls.alert(res); + if ( form_el["attachment[movie]"].value || form_el["attachment[thumbnail]"].value ) { + commonCls.removeBlock("_popup_uploading"+this.id); + } + }.bind(this); + commonCls.sendAttachment(option); + }, + + // 表示設定 + setStyle: function() { + + var fromElement = $("simplemovieForm" + this.id); + var messageBody = Form.serialize(fromElement); + + var option = new Object(); + option["target_el"] = $(this.id); + option["callbackfunc"] = function(){ + alert("更新しました。"); + //commonCls.sendRefresh(this.id); + }.bind(this); + + commonCls.sendPost(this.id, messageBody, option); + }, + + // 動画ダウンロード + movieDownload: function( block_id, movie_upload_id ) + { + var set_id = block_id.replace("_", ""); + + // 呼び出し + var href = _nc_base_url + _nc_index_file_name + '?block_id=' + set_id + '&action=simplemovie_view_edit_download&upload_id=' + movie_upload_id; + location.href = href; + }, + + // 埋め込みタグコード(iframeタグコード)生成 + createIFrameValue: function( embed_code ) + { + // VIDEOタグエレメント取得 + var videoEl = $("simplemovie_video" + this.id); + if( videoEl == null ) + { + // サムネイルエレメント取得して、そこからサイズを取得する + var thumbnailEl = $("simplemovie_thumbnail" + this.id); + var setWidth = thumbnailEl.getWidth() +20; // 少し大きめに指定する。 + var setHeight = thumbnailEl.getHeight() +60; // 注意文言が入る事を想定して、少し大きく指定する。 + } + else + { + // VIDEOエレメントからサイズを取得する + var setWidth = videoEl.getWidth(); + var setHeight = videoEl.getHeight() ; + } + + var result = ""; + + $("simplemovie_embed_code" + this.id).value = result; + }, + + /* 承認 */ + agreeSimpleClick: function(agree_flag) { + // 確認メッセージ + var confirmMessage = "決定するとこの動画が承認されます。\nよろしいですか?"; + var callbackmessage = "承認しました。"; + if (!commonCls.confirm(confirmMessage)) { + return false; + } + var option = new Object(); + option["target_el"] = $(this.id); + option["callbackfunc"] = function(response) { + commonCls.alert(callbackmessage); + }.bind(this); + commonCls.sendPost(this.id, "action=simplemovie_action_main_agree&agree_flag=" + agree_flag, option); + }, +} \ No newline at end of file diff --git a/html/webapp/modules/simplemovie/install.ini b/html/webapp/modules/simplemovie/install.ini new file mode 100644 index 0000000..9a6bcc2 --- /dev/null +++ b/html/webapp/modules/simplemovie/install.ini @@ -0,0 +1,14 @@ +version = "2.4.2.8" +action_name="simplemovie_view_main_init" +edit_action_name="simplemovie_view_edit_init" +edit_style_action_name="simplemovie_view_edit_style" +block_delete_action = "simplemovie_action_edit_delblock" +;whatnew_flag=1 +search_action="simplemovie_view_admin_search" +move_action = "simplemovie_action_admin_operation" +copy_action = "simplemovie_action_admin_operation" +module_update_action = "simplemovie_update" + +[Restore] +room_id = core.page_id +block_id = core.block_id diff --git a/html/webapp/modules/simplemovie/language/japanese/main.ini b/html/webapp/modules/simplemovie/language/japanese/main.ini new file mode 100644 index 0000000..2f66b58 --- /dev/null +++ b/html/webapp/modules/simplemovie/language/japanese/main.ini @@ -0,0 +1,17 @@ +;Simplemovie_View_Main_Initアクションで使用する言語 +[Simplemovie_View_Main_Init] +;simplemovie_hogehoge="@Smartyにassignする言語を記述方法->呼び出し方法($lang.simplemovie_hogehoge)@" +;define:SIMPLEMOVIE_HOGEHOGE="@PHPでdefineする言語を記述方法@" +;global:_hoge= ;global.iniの[Global]で定義された言語ファイルを使用する場合、使用 + +;Simplemovie_View_Editアクションで使用する言語 +[Simplemovie_View_Edit] +simplemovie_edit_title="編集" +simplemovie_style_title="表示方法変更" +simplemovie_help_title="使い方" + +;Simplemovie_View_Edit_Initアクションで使用する言語 +[Simplemovie_View_Edit_Init] + +;Simplemovie_View_Edit_Styleアクションで使用する言語 +[Simplemovie_View_Edit_Style] diff --git a/html/webapp/modules/simplemovie/language/japanese/modinfo.ini b/html/webapp/modules/simplemovie/language/japanese/modinfo.ini new file mode 100644 index 0000000..1acd038 --- /dev/null +++ b/html/webapp/modules/simplemovie/language/japanese/modinfo.ini @@ -0,0 +1 @@ +module_name = "シンプル動画" \ No newline at end of file diff --git a/html/webapp/modules/simplemovie/maple.ini b/html/webapp/modules/simplemovie/maple.ini new file mode 100644 index 0000000..e20c613 --- /dev/null +++ b/html/webapp/modules/simplemovie/maple.ini @@ -0,0 +1,5 @@ +[SmartyAssign] +config = main.ini + +[Include] +filename_mobile = "/config/movie.inc.php" diff --git a/html/webapp/modules/simplemovie/sql/mysql/table.sql b/html/webapp/modules/simplemovie/sql/mysql/table.sql new file mode 100644 index 0000000..30953f5 --- /dev/null +++ b/html/webapp/modules/simplemovie/sql/mysql/table.sql @@ -0,0 +1,26 @@ +-- +-- テーブルの構造 `simplemovie` +-- +-- 使用するテーブルのCreate文をここに記述 +CREATE TABLE `simplemovie` ( + `block_id` int(10) unsigned NOT NULL, + `movie_upload_id` int(11) unsigned DEFAULT NULL, + `movie_upload_id_request` int(11) unsigned DEFAULT NULL, + `thumbnail_upload_id` int(11) unsigned DEFAULT NULL, + `thumbnail_upload_id_request` int(11) unsigned DEFAULT NULL, + `width` int(11) NOT NULL DEFAULT '0', + `height` int(11) NOT NULL DEFAULT '0', + `autoplay_flag` tinyint unsigned NOT NULL default 0, + `embed_show_flag` tinyint unsigned NOT NULL default 2, + `agree_flag` int(11) NOT NULL DEFAULT '2', + `room_id` int(11) NOT NULL DEFAULT '0', + `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, + `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, + PRIMARY KEY (`block_id`) +) ENGINE=MyISAM; diff --git a/html/webapp/modules/simplemovie/templates/default/simplemovie_script.html b/html/webapp/modules/simplemovie/templates/default/simplemovie_script.html new file mode 100644 index 0000000..d74a00b --- /dev/null +++ b/html/webapp/modules/simplemovie/templates/default/simplemovie_script.html @@ -0,0 +1,6 @@ + diff --git a/html/webapp/modules/simplemovie/templates/default/simplemovie_view_edit_help.html b/html/webapp/modules/simplemovie/templates/default/simplemovie_view_edit_help.html new file mode 100644 index 0000000..01a5714 --- /dev/null +++ b/html/webapp/modules/simplemovie/templates/default/simplemovie_view_edit_help.html @@ -0,0 +1,82 @@ +<{* 使い方の説明 *}> + +
+
+ +このモジュールは動画の再生用です。
+
+編集タブ
+
+【動画ファイル】 +
+ <{if $action.change_execute_button_show}> + 動画ファイルをアップロードしてください。
+ ●動画ファイルの変換処理を実施する場合
+
+ 使用可能な動画ファイルの拡張子:mp4, mpeg, avi, mov, wmv,flv, mpg
+ アップロード時に、動画ファイルをH.264 コーデックのmp4ファイルに変換します。
+ 「ffmpeg」「MP4BOX」ツールがインストールされている必要があります。 +
+ ●動画ファイルの変換処理を実施しない場合
+
+ 使用可能な動画ファイル:H.264 コーデックのmp4 +
+ <{else}> + H.264 コーデックのmp4 ファイルをアップロードしてください。
+ 動画の形式変換を行う場合は、NetCommons2 のアドオンモジュールである動画モジュールを使用してください。 + <{/if}> +
+ +【サムネイル画像】 +
+ 動画のサムネイル画像を指定してください。
+ 使用可能な画像ファイルの拡張子:jpg, png, gif
+ <{if $action.change_execute_button_show}> + ●動画ファイルの変換処理を実施する場合
+
+ 指定しなかった場合、動画の1秒目がサムネイル画像として作成されます。 +
+ ●動画ファイルの変換処理を実施しない場合
+
+ 必須指定です。 +
+ <{else}> + 必須指定です。 + <{/if}> +
+
+
+表示方法変更タブ
+
+【標準の幅】 +
+ 動画を再生する際の標準の幅を指定します。
+ スマートフォンなどのデバイスで再生する際、画面がこの幅より小さい場合は、自動的に縮小して再生されます。 +
+ +【標準の高さ】 +
+ 動画を再生する際の標準の高さを指定します。
+ スマートフォンなどのデバイスで再生する際、画面がこの高さより小さい場合は、自動的に縮小して再生されます。 +
+ +【自動再生】 +
+ チェックすると、画面を開いたとき、自動的に動画の再生が始まります。 +
+ +【埋め込みタグ表示】 +
+ チェックすると、動画の埋め込みタグが表示できるようになります。 +
+
+
【ライセンスについて】
+
+ この「スライダー」モジュールは株式会社オープンソース・ワークショップが提供するモジュールです。
+ 「スライダー」モジュールのライセンスはNetCommons2 と同じFreeBSD ライセンスです。
+
+ +
+
diff --git a/html/webapp/modules/simplemovie/templates/default/simplemovie_view_edit_init.html b/html/webapp/modules/simplemovie/templates/default/simplemovie_view_edit_init.html new file mode 100644 index 0000000..8b04244 --- /dev/null +++ b/html/webapp/modules/simplemovie/templates/default/simplemovie_view_edit_init.html @@ -0,0 +1,52 @@ +<{* 動画ファイルの指定 *}> + +
+ +
+ +
+ 動画ファイル<{if $action.movie_require_flag}>*<{/if}> + 設定されているアップロード最大サイズ:<{$action.simplemovie_upload_max_size_mb}>MB
+ <{if $action.change_execute_button_show}>style="margin:10px 0px 0px 0px;"<{/if}>> + <{if $action.block_record.movie_upload_id}> + + ( + <{$action.block_record.movie_file_name}> + ) +
+ <{/if}> + <{if $action.change_execute_button_show}> + + + + + +
※動画ファイルの変換処理 + 実施する(初期値) + 実施しない +
+ mp4以外のファイルを指定する場合は、変換処理を実施する必要があります。 + <{/if}> +
+ +
+ サムネイル画像<{if $action.thumbnail_require_flag}>*<{/if}> + + <{if $action.block_record.thumbnail_upload_id}> + (<{$action.block_record.thumbnail_file_name}>)
+ <{/if}> +
+ +
+ +
+
+ +
+ +<{include file="simplemovie_script.html"}> \ No newline at end of file diff --git a/html/webapp/modules/simplemovie/templates/default/simplemovie_view_edit_style.html b/html/webapp/modules/simplemovie/templates/default/simplemovie_view_edit_style.html new file mode 100644 index 0000000..7fa5aac --- /dev/null +++ b/html/webapp/modules/simplemovie/templates/default/simplemovie_view_edit_style.html @@ -0,0 +1,60 @@ +<{* 表示方法変更画面 *}> + +
+ + + + + + + + + + + + +<{* 2.4.2.5 ⇒ 2.4.2.6 変更 start + + + + + + + + +*}> + + + + + + + + +
標準の幅 px
標準の高さ px
自動再生 + <{if $action.block_record.autoplay_flag==1}>checked<{/if}>>する + <{if $action.block_record.autoplay_flag==0}>checked<{/if}>>しない(初期値) +
埋め込みタグ表示 + <{if $action.block_record.embed_show_flag==1}>checked<{/if}>>する + <{if $action.block_record.embed_show_flag==0}>checked<{/if}>>しない(初期値) +
自動再生 + + + +
<{if $action.block_record.autoplay_flag==1}>checked<{/if}>>する
<{if $action.block_record.autoplay_flag==0}>checked<{/if}>>しない(初期値)
+
埋め込みタグ表示 + + + + +
<{if !($action.block_record) || $action.block_record.embed_show_flag==2}>checked<{/if}>>主担以上の人に表示する(初期値)
<{if $action.block_record && $action.block_record.embed_show_flag==1}>checked<{/if}>>全ての人に表示する
<{if $action.block_record && $action.block_record.embed_show_flag==0}>checked<{/if}>>表示しない
+<{* 2.4.2.5 ⇒ 2.4.2.6 変更 end *}> + +
+
+ +
+ +
+ +<{include file="simplemovie_script.html"}> \ No newline at end of file diff --git a/html/webapp/modules/simplemovie/templates/default/simplemovie_view_main_iframe.html b/html/webapp/modules/simplemovie/templates/default/simplemovie_view_main_iframe.html new file mode 100644 index 0000000..e69de29 diff --git a/html/webapp/modules/simplemovie/templates/default/simplemovie_view_main_init.html b/html/webapp/modules/simplemovie/templates/default/simplemovie_view_main_init.html new file mode 100644 index 0000000..0fbee76 --- /dev/null +++ b/html/webapp/modules/simplemovie/templates/default/simplemovie_view_main_init.html @@ -0,0 +1,61 @@ +<{* 動画再生 *}> + + + +<{if $action.block_record.movie_upload_id}> + + + + + + <{if $action.embed_code}> + + + + <{/if}> + + <{* 承認機能 *}> + <{if ($smarty.session._user_auth_id >= _AUTH_CHIEF && $action.block_record.agree_flag == '2') }> + + + + <{/if}> +
+ <{if $smarty.server.HTTP_USER_AGENT|stristr:"Trident" && $smarty.server.HTTP_USER_AGENT|stristr:"6.1" && $smarty.server.HTTP_USER_AGENT|stristr:"Windows"}> + <{* VIDEOタグが再生できない場合 *}> + 動画を再生する場合は、下記画面をクリックすると、動画再生ウィンドウが開きます。
+ ※ 動画再生まで時間がかかる場合があります。
+ + <{if $action.block_record.width}> width="<{$action.block_record.width}>"<{/if}><{if $action.block_record.height}> height="<{$action.block_record.height}>"<{/if}>> + + <{else}> + <{* VIDEOタグで再生できる場合 *}> + + <{/if}> +
+ 埋め込みタグ + +
+ 【未承認】 + <{if $smarty.session._user_auth_id == _AUTH_ADMIN}> + [承認する] + <{/if}> +
+ +<{else}> + 動画ファイルがアップロードされていません。 +<{/if}> + +<{include file="simplemovie_script.html"}> \ No newline at end of file diff --git a/html/webapp/modules/simplemovie/templates/default/simplemovie_view_main_uploading.html b/html/webapp/modules/simplemovie/templates/default/simplemovie_view_main_uploading.html new file mode 100644 index 0000000..c161b1b --- /dev/null +++ b/html/webapp/modules/simplemovie/templates/default/simplemovie_view_main_uploading.html @@ -0,0 +1,14 @@ +<{strip}> + + + + + + +
uploading/images/common/indicator.gif" /> +   ファイルをアップロード中です。
+   サイズの大きなファイルをアップロードした場合には、時間がかかります。 +
+ +<{/strip}> +<{include file="simplemovie_script.html"}> \ No newline at end of file diff --git a/html/webapp/modules/simplemovie/templates/default_backup/simplemovie_script.html b/html/webapp/modules/simplemovie/templates/default_backup/simplemovie_script.html new file mode 100644 index 0000000..d74a00b --- /dev/null +++ b/html/webapp/modules/simplemovie/templates/default_backup/simplemovie_script.html @@ -0,0 +1,6 @@ + diff --git a/html/webapp/modules/simplemovie/templates/default_backup/simplemovie_view_edit_help.html b/html/webapp/modules/simplemovie/templates/default_backup/simplemovie_view_edit_help.html new file mode 100644 index 0000000..01a5714 --- /dev/null +++ b/html/webapp/modules/simplemovie/templates/default_backup/simplemovie_view_edit_help.html @@ -0,0 +1,82 @@ +<{* 使い方の説明 *}> + +
+
+ +このモジュールは動画の再生用です。
+
+編集タブ
+
+【動画ファイル】 +
+ <{if $action.change_execute_button_show}> + 動画ファイルをアップロードしてください。
+ ●動画ファイルの変換処理を実施する場合
+
+ 使用可能な動画ファイルの拡張子:mp4, mpeg, avi, mov, wmv,flv, mpg
+ アップロード時に、動画ファイルをH.264 コーデックのmp4ファイルに変換します。
+ 「ffmpeg」「MP4BOX」ツールがインストールされている必要があります。 +
+ ●動画ファイルの変換処理を実施しない場合
+
+ 使用可能な動画ファイル:H.264 コーデックのmp4 +
+ <{else}> + H.264 コーデックのmp4 ファイルをアップロードしてください。
+ 動画の形式変換を行う場合は、NetCommons2 のアドオンモジュールである動画モジュールを使用してください。 + <{/if}> +
+ +【サムネイル画像】 +
+ 動画のサムネイル画像を指定してください。
+ 使用可能な画像ファイルの拡張子:jpg, png, gif
+ <{if $action.change_execute_button_show}> + ●動画ファイルの変換処理を実施する場合
+
+ 指定しなかった場合、動画の1秒目がサムネイル画像として作成されます。 +
+ ●動画ファイルの変換処理を実施しない場合
+
+ 必須指定です。 +
+ <{else}> + 必須指定です。 + <{/if}> +
+
+
+表示方法変更タブ
+
+【標準の幅】 +
+ 動画を再生する際の標準の幅を指定します。
+ スマートフォンなどのデバイスで再生する際、画面がこの幅より小さい場合は、自動的に縮小して再生されます。 +
+ +【標準の高さ】 +
+ 動画を再生する際の標準の高さを指定します。
+ スマートフォンなどのデバイスで再生する際、画面がこの高さより小さい場合は、自動的に縮小して再生されます。 +
+ +【自動再生】 +
+ チェックすると、画面を開いたとき、自動的に動画の再生が始まります。 +
+ +【埋め込みタグ表示】 +
+ チェックすると、動画の埋め込みタグが表示できるようになります。 +
+
+
【ライセンスについて】
+
+ この「スライダー」モジュールは株式会社オープンソース・ワークショップが提供するモジュールです。
+ 「スライダー」モジュールのライセンスはNetCommons2 と同じFreeBSD ライセンスです。
+
+ +
+
diff --git a/html/webapp/modules/simplemovie/templates/default_backup/simplemovie_view_edit_init.html b/html/webapp/modules/simplemovie/templates/default_backup/simplemovie_view_edit_init.html new file mode 100644 index 0000000..9a715e7 --- /dev/null +++ b/html/webapp/modules/simplemovie/templates/default_backup/simplemovie_view_edit_init.html @@ -0,0 +1,42 @@ +<{* 動画ファイルの指定 *}> + +
+ +
+ +
+ 動画ファイル<{if $action.movie_require_flag}>*<{/if}> + 設定されているアップロード最大サイズ:<{$action.simplemovie_upload_max_size_mb}>MB
+ <{if $action.change_execute_button_show}>style="margin:10px 0px 0px 0px;"<{/if}>> + <{if $action.block_record.movie_upload_id}>(<{$action.block_record.movie_file_name}>)<{/if}>
+ <{if $action.change_execute_button_show}> + + + + + +
※動画ファイルの変換処理 + 実施する + 実施しない(初期値) +
+ mp4以外のファイルを指定する場合は、変換処理を実施する必要があります。 + <{/if}> +
+ +
+ サムネイル画像<{if $action.thumbnail_require_flag}>*<{/if}> + + <{if $action.block_record.thumbnail_upload_id}>(<{$action.block_record.thumbnail_file_name}>)<{/if}>
+
+ +
+ +
+
+ +
+ +<{include file="simplemovie_script.html"}> \ No newline at end of file diff --git a/html/webapp/modules/simplemovie/templates/default_backup/simplemovie_view_edit_style.html b/html/webapp/modules/simplemovie/templates/default_backup/simplemovie_view_edit_style.html new file mode 100644 index 0000000..7fa5aac --- /dev/null +++ b/html/webapp/modules/simplemovie/templates/default_backup/simplemovie_view_edit_style.html @@ -0,0 +1,60 @@ +<{* 表示方法変更画面 *}> + +
+ + + + + + + + + + + + +<{* 2.4.2.5 ⇒ 2.4.2.6 変更 start + + + + + + + + +*}> + + + + + + + + +
標準の幅 px
標準の高さ px
自動再生 + <{if $action.block_record.autoplay_flag==1}>checked<{/if}>>する + <{if $action.block_record.autoplay_flag==0}>checked<{/if}>>しない(初期値) +
埋め込みタグ表示 + <{if $action.block_record.embed_show_flag==1}>checked<{/if}>>する + <{if $action.block_record.embed_show_flag==0}>checked<{/if}>>しない(初期値) +
自動再生 + + + +
<{if $action.block_record.autoplay_flag==1}>checked<{/if}>>する
<{if $action.block_record.autoplay_flag==0}>checked<{/if}>>しない(初期値)
+
埋め込みタグ表示 + + + + +
<{if !($action.block_record) || $action.block_record.embed_show_flag==2}>checked<{/if}>>主担以上の人に表示する(初期値)
<{if $action.block_record && $action.block_record.embed_show_flag==1}>checked<{/if}>>全ての人に表示する
<{if $action.block_record && $action.block_record.embed_show_flag==0}>checked<{/if}>>表示しない
+<{* 2.4.2.5 ⇒ 2.4.2.6 変更 end *}> + +
+
+ +
+ +
+ +<{include file="simplemovie_script.html"}> \ No newline at end of file diff --git a/html/webapp/modules/simplemovie/templates/default_backup/simplemovie_view_main_iframe.html b/html/webapp/modules/simplemovie/templates/default_backup/simplemovie_view_main_iframe.html new file mode 100644 index 0000000..e69de29 diff --git a/html/webapp/modules/simplemovie/templates/default_backup/simplemovie_view_main_init.html b/html/webapp/modules/simplemovie/templates/default_backup/simplemovie_view_main_init.html new file mode 100644 index 0000000..a7b1e52 --- /dev/null +++ b/html/webapp/modules/simplemovie/templates/default_backup/simplemovie_view_main_init.html @@ -0,0 +1,54 @@ +<{* 動画再生 *}> + +<{if $action.block_record.movie_upload_id}> + + + + + + <{if $action.embed_code}> + + + + <{/if}> +
+ <{if $smarty.server.HTTP_USER_AGENT|stristr:"Trident" && $smarty.server.HTTP_USER_AGENT|stristr:"6.1" && $smarty.server.HTTP_USER_AGENT|stristr:"Windows"}> + <{* VIDEOタグが再生できない場合 *}> + 動画を再生する場合は、下記画面をクリックすると、動画再生ウィンドウが開きます。
+ ※ 動画再生まで時間がかかる場合があります。
+ + <{if $action.block_record.width}> width="<{$action.block_record.width}>"<{/if}><{if $action.block_record.height}> height="<{$action.block_record.height}>"<{/if}>> + + + + + + + <{else}> + <{* VIDEOタグで再生できる場合 *}> + + <{/if}> +
+ 埋め込みタグ + +
+ +<{else}> + +動画ファイルがアップロードされていません。 + +<{/if}> + +<{include file="simplemovie_script.html"}> \ No newline at end of file diff --git a/html/webapp/modules/simplemovie/templates/default_backup/simplemovie_view_main_uploading.html b/html/webapp/modules/simplemovie/templates/default_backup/simplemovie_view_main_uploading.html new file mode 100644 index 0000000..c161b1b --- /dev/null +++ b/html/webapp/modules/simplemovie/templates/default_backup/simplemovie_view_main_uploading.html @@ -0,0 +1,14 @@ +<{strip}> + + + + + + +
uploading/images/common/indicator.gif" /> +   ファイルをアップロード中です。
+   サイズの大きなファイルをアップロードした場合には、時間がかかります。 +
+ +<{/strip}> +<{include file="simplemovie_script.html"}> \ No newline at end of file diff --git a/html/webapp/modules/simplemovie/update/Update.class.php b/html/webapp/modules/simplemovie/update/Update.class.php new file mode 100644 index 0000000..00b24c8 --- /dev/null +++ b/html/webapp/modules/simplemovie/update/Update.class.php @@ -0,0 +1,87 @@ +db->getAdoDbObject(); + + // simplemovieテーブルに、embed_show_flag(埋め込みコード表示フラグ)がなければ追加する + $metaColumns = $adodb->MetaColumns($this->db->getPrefix()."simplemovie"); + if (!isset($metaColumns["embed_show_flag"]) && !isset($metaColumns["EMBED_SHOW_FLAG"])) + { + $sql = "ALTER TABLE `".$this->db->getPrefix()."simplemovie` ADD `embed_show_flag` TINYINT UNSIGNED NOT NULL DEFAULT 2 AFTER `autoplay_flag`;"; + $result = $this->db->execute($sql); + if ($result === false) { + return false; + } + } + else + { + // simplemovieテーブルに、embed_show_flag(埋め込みコード表示フラグ)がある場合は、デフォルト値を"2"に変更する + // ※デフォルト値が既に"2"でも ALTER TABLE を実行する + $sql = "ALTER TABLE `".$this->db->getPrefix()."simplemovie` ALTER `embed_show_flag` SET DEFAULT 2;"; + $result = $this->db->execute($sql); + if ($result === false) { + return false; + } + } + + //承認用カラムを追加する + if (!isset($metaColumns["agree_flag"]) && !isset($metaColumns["AGREE_FLAG"])) + { + $sql = "ALTER TABLE `".$this->db->getPrefix()."simplemovie` ADD `agree_flag` int(11) NOT NULL DEFAULT '2' AFTER `embed_show_flag`;"; + $result = $this->db->execute($sql); + if ($result === false) { + return false; + } + //既に登録されているデータは1:承認済とする + $result = $this->db->execute("UPDATE `".$this->db->getPrefix()."simplemovie` SET `agree_flag` = 1"); + if ($result === false) { + return false; + } + } + + //承認待ち動画カラムを追加する + if (!isset($metaColumns["movie_upload_id_request"]) && !isset($metaColumns["MOVIE_UPLOAD_ID_REQUEST"])) + { + $sql = "ALTER TABLE `".$this->db->getPrefix()."simplemovie` ADD `movie_upload_id_request` int(11) unsigned DEFAULT NULL AFTER `movie_upload_id`;"; + $result = $this->db->execute($sql); + if ($result === false) { + return false; + } + } + //承認待ちサムネイルカラムを追加する + if (!isset($metaColumns["thumbnail_upload_id_request"]) && !isset($metaColumns["THUMBNAIL_UPLOAD_ID_REQUEST"])) + { + $sql = "ALTER TABLE `".$this->db->getPrefix()."simplemovie` ADD `thumbnail_upload_id_request` int(11) unsigned DEFAULT NULL AFTER `thumbnail_upload_id`;"; + $result = $this->db->execute($sql); + if ($result === false) { + return false; + } + } + + return true; + } +} +?> diff --git a/html/webapp/modules/simplemovie/update/maple.ini b/html/webapp/modules/simplemovie/update/maple.ini new file mode 100644 index 0000000..2895b54 --- /dev/null +++ b/html/webapp/modules/simplemovie/update/maple.ini @@ -0,0 +1,8 @@ +[RecursiveNocall] +ValidateDef = + +[ValidateDef] +requiredfalse = "1:lang._invalid_input" + +[Action] +db = "ref:DbObject" \ No newline at end of file diff --git a/html/webapp/modules/simplemovie/validator/Validator_Movieupload.class.php b/html/webapp/modules/simplemovie/validator/Validator_Movieupload.class.php new file mode 100644 index 0000000..580550b --- /dev/null +++ b/html/webapp/modules/simplemovie/validator/Validator_Movieupload.class.php @@ -0,0 +1,284 @@ +getComponent("Request"); + + // データ取得コンポーネント + $this->_simplemovieView =& $container->getComponent("simplemovieView"); + + // 動画の削除チェック + $movie_delete = $request->getParameter("movie_delete"); + + // サムネイルの削除チェック + $thumbnail_delete = $request->getParameter("thumbnail_delete"); + + // 動画変換実施フラグ + $change_execute_flag = $request->getParameter("change_execute_flag"); + + $movie_required_flag = SIMPLEMOVIE_REQUIRE_MOVIE; // 動画必須フラグ取得 + $thumbnail_required_flag = SIMPLEMOVIE_REQUIRE_THUMBNAIL; // サムネイル必須フラグ取得 + + // ファイルアップロード + $fileUpload =& $container->getComponent("FileUpload"); + $commonMain =& $container->getComponent("commonMain"); + $this->_uploadsAction =& $commonMain->registerClass(WEBAPP_DIR.'/components/uploads/Action.class.php', "Uploads_Action", "uploadsAction"); + $files = $this->_uploadsAction->uploads(); + $errormes = $fileUpload->getErrorMes(); + //test_log($files); + //test_log($errormes); + + // MovieActionコンポーネント取得 + $this->_movieAction = $commonMain->registerClass(WEBAPP_DIR.'/components/movie/Action.class.php', "Movie_Action", "movieAction"); + + // 現在のブロックデータを取得 + $simplemovie = $this->_simplemovieView->getBlock( $request->getParameter( "block_id" ) ); + + // 必須チェック + + // 動画が必須の場合は必須チェックを行う + if ( SIMPLEMOVIE_REQUIRE_MOVIE == true ) + { + if ( $this->existBlockMovie( $simplemovie ) === false && $this->checkUploadMovie( $files ) === false ) + { + $this->deleteUpload( $files ); + return "動画ファイルは必須です。指定してください。"; + } + } + // サムネイルの場合、必須であり、かつ、動画変換を行わない場合に必須チェックを行う + if ( SIMPLEMOVIE_REQUIRE_THUMBNAIL == true && + ( empty( $change_execute_flag ) || intval( $change_execute_flag ) !== 1 ) ) + { + if ( $this->existBlockThumbnail( $simplemovie ) === false && $this->checkUploadThumbnail( $files ) === false ) + { + $this->deleteUpload( $files ); + return "サムネイル画像ファイルは必須です。指定してください。"; + } + } + + // ファイルの添付がない場合もあるので、エラーメッセージが「ファイルを指定してください」の場合は、エラーにしない。 + $nofile_error_key = array_search( _FILE_UPLOAD_ERR_UPLOAD_NOFILE, $errormes ); + if ( $nofile_error_key !== false ) { + unset( $errormes[$nofile_error_key] ); + } + + // NetCommons アップロード部品が返すエラー処理(設定したファイルサイズのオーバー) + if ( !empty( $errormes ) && is_array( $errormes ) && count( $errormes ) > 0 ) { + $error_str = ""; + foreach ( $errormes as $errorme ) { + $error_str = $error_str . $errorme . "
"; + } + return $error_str; + } + + // 拡張子チェック(サムネイル) + $error_message = $this->checkExtensionThumbnail( $files ); + if ( !empty( $error_message ) ) { + $this->deleteUpload( $files ); + return $error_message; + } + + // サムネイルを自動作成するかどうかのフラグを設定 + $thumbnail_create_flag = false; + if ( $this->checkUploadMovie( $files ) === true && + $this->checkUploadThumbnail( $files ) === false && + ( $this->existBlockThumbnail( $simplemovie ) === true && !empty( $thumbnail_delete ) || + $this->existBlockThumbnail( $simplemovie ) === false ) ) + { + // 動画が新規Uploadされていて、かつ + // サムネイルが新規Uploadされておらず、かつ + // ブロックにサムネイルが登録されているが削除指定がされている、または、ブロックにサムネイルがまだ登録されていない場合 + $thumbnail_create_flag = true; + } + + // 変換アリの場合、動画変換処理を実施する + if ( !empty( $change_execute_flag ) && intval( $change_execute_flag ) === 1 ) { + // 動画変換処理実施 + $error_message = $this->_movieAction->convertMovie( $files, "simplemovie", $thumbnail_create_flag ); + if ( !empty( $error_message ) ) + { + $this->deleteUpload( $files ); + return $error_message; + } + } + else + { + // 動画の拡張子チェック + $error_message = $this->checkExtensionMovie( $files ); + if ( !empty( $error_message ) ) { + $this->deleteUpload( $files ); + return $error_message; + } + } + + // リクエスト内容に値を書いて、Actionクラスに受け渡す + $request->setParameter( "upload_files", $files ); + + return; + } + + + /** + * アップロードされたファイルの拡張子チェック(動画) + *  ※動画変換しない場合のチェック + * + * @return boolean true or false + * @access public + */ + function checkExtensionMovie( $files ) + { + // ファイルがアップロードされていない場合は拡張子チェックOK + if ( $this->checkUploadMovie( $files ) === false ) return; + + // 動画 + $allow_movie_extension = explode( ',', MOVIE_ALLOW_MOVIE_EXTENSION_NOCHANGE ); + if ( array_key_exists( 'movie', $files ) ) { + // 拡張子を小文字に変換 + $extension = mb_strtolower( $files['movie']['extension'] ); + if ( !in_array( $extension, $allow_movie_extension ) ) { + return "エラー!
動画として許可された拡張子以外のファイルがアップロードされました。"; + } + } + + return; + } + + /** + * アップロードされたファイルの拡張子チェック(サムネイル) + * + * @return boolean true or false + * @access public + */ + function checkExtensionThumbnail( $files ) + { + // ファイルがアップロードされていない場合は拡張子チェックOK + if ( $this->checkUploadThumbnail( $files ) === false ) return; + + // サムネイル画像 + $allow_thumbnail_extension = explode( ',', SIMPLEMOVIE_ALLOW_THUMBNAIL_EXTENSION ); + if ( array_key_exists( 'thumbnail', $files ) ) { + // 拡張子を小文字に変換 + $extension = mb_strtolower( $files['thumbnail']['extension'] ); + if ( !in_array( $extension, $allow_thumbnail_extension ) ) { + return "エラー!
サムネイル画像として許可された拡張子以外のファイルがアップロードされました。"; + } + } + + return; + } + + /** + * アップロードされたファイルを削除する。 + * + * @return boolean true or false + * @access public + */ + function deleteUpload( $files ) + { + foreach ( $files as $file ) { + $files = $this->_uploadsAction->delUploadsById( $file['upload_id'] ); + } + } + + + /** + * 動画が新規Uploadされたかどうかチェック + * + * @return boolean true:newUpload or false:noUpload + * @access private + */ + private function checkUploadMovie( $files ) + { + // $filesの中に['movie']がない、または、'movie'のupload_idがない = 新規登録されていない + if ( !array_key_exists( 'movie', $files ) || empty( $files['movie']['upload_id'] ) ) return false; + + return true; + } + /** + * サムネイルが新規Uploadされたかどうかチェック + * + * @return boolean true:newUpload or false:noUpload + * @access private + */ + private function checkUploadThumbnail( $files ) + { + // $filesの中に['thumbnail']がない、または、'thumbnail'のupload_idがない = 新規登録されていない + if ( !array_key_exists( 'thumbnail', $files ) || empty( $files['thumbnail']['upload_id'] ) ) return false; + + return true; + } + /** + * 動画が既にブロックに登録されているかどうかチェック + * + * @return boolean true:exist or false:noExist + * @access private + */ + private function existBlockMovie( $block_data ) + { + // ブロック情報が空 or ブロック情報が0件 or ブロック情報に動画のUploadIDがない = ブロックに動画が登録されていない + if ( empty( $block_data ) || count( $block_data ) <= 0 || empty( $block_data['movie_upload_id'] ) ) return false; + + return true; + } + /** + * サムネイルが既にブロックに登録されているかどうかチェック + * + * @return boolean true:exist or false:noExist + * @access private + */ + private function existBlockThumbnail( $block_data ) + { + // ブロック情報が空 or ブロック情報が0件 or ブロック情報にサムネイルのUploadIDがない = ブロックにサムネイルが登録されていない + if ( empty( $block_data ) || count( $block_data ) <= 0 || empty( $block_data['thumbnail_upload_id'] ) ) return false; + + //コンテンツの承認が必要な会員による更新の場合にはサムネイルは必須 + if($this->_simplemovieView->isAutoAgree($this->_simplemovieView->getAgreeFlag()) == false) + { + if(empty( $block_data['thumbnail_upload_id_request'] )) return false; + } + + return true; + } + +} +?> \ No newline at end of file diff --git a/html/webapp/modules/simplemovie/view/admin/maple.ini b/html/webapp/modules/simplemovie/view/admin/maple.ini new file mode 100644 index 0000000..cd5836f --- /dev/null +++ b/html/webapp/modules/simplemovie/view/admin/maple.ini @@ -0,0 +1,2 @@ +[TokenExtra] +mode="nobuild" \ No newline at end of file diff --git a/html/webapp/modules/simplemovie/view/admin/search/Search.class.php b/html/webapp/modules/simplemovie/view/admin/search/Search.class.php new file mode 100644 index 0000000..4072f0c --- /dev/null +++ b/html/webapp/modules/simplemovie/view/admin/search/Search.class.php @@ -0,0 +1,88 @@ +block_id_arr) { + $sqlwhere = " WHERE block_id IN (".join(",", $this->block_id_arr).")"; + } else { + return 'success'; + } + $sqlwhere .= $this->sqlwhere; + + $count_res =& $this->db->execute("SELECT COUNT(*) " . + " FROM {simplemovie} " . + $sqlwhere ,$this->params, null ,null, false); + if($count_res !== false) $this->count = $count_res[0][0]; + if ($this->only_count == _ON) { + return 'count'; + } + if($this->count > 0) { + $sql = "SELECT * FROM {simplemovie} " . $sqlwhere . " ORDER BY insert_time DESC"; + $this->results =& $this->db->execute($sql ,$this->params, $this->limit, $this->offset, true, array($this, '_fetchcallback')); + } + return 'success'; + } + + + /** + * fetch時コールバックメソッド(blocks) + * @param result adodb object + * @access private + */ + function _fetchcallback($result) { + $ret = array(); + $count = 0; + while ($row = $result->fetchRow()) { + $ret[$count] = array(); + $ret[$count]['block_id'] = $row['block_id']; + $ret[$count]['pubDate'] = $row['insert_time']; + //$ret[$count]['title'] = ""; + //$ret[$count]['url'] = "#"; + $ret[$count]['action'] = "simplemovie_view_main_init"; + $ret[$count]['description'] = $row['content']; + $ret[$count]['user_id'] = $row['insert_user_id']; + $ret[$count]['user_name'] = $row['insert_user_name']; + $count++; + } + return $ret; + } +} +?> diff --git a/html/webapp/modules/simplemovie/view/admin/search/maple.ini b/html/webapp/modules/simplemovie/view/admin/search/maple.ini new file mode 100644 index 0000000..40d4bc0 --- /dev/null +++ b/html/webapp/modules/simplemovie/view/admin/search/maple.ini @@ -0,0 +1,18 @@ +[AllowIdList] +target_room = "TARGET_ROOM_ID" ;ターゲットルームID指定あり +target_module = "TARGET_MODULE_ID" ;ターゲットモジュールID指定あり +block_id_arr = "ALLOW_BLOCK_ID" +;page_id_arr = "ALLOW_PAGE_ID" + +[Action] +db = "ref:DbObject" + +[View] +success = "main:rss_feed.xml" +count = "main:whatsnew_count.html" + +[Search] +;keyword = more_name,less_name +;wysiwyg = content,more_content +;handle = insert_user_name +;target_time = insert_time diff --git a/html/webapp/modules/simplemovie/view/dicon.ini b/html/webapp/modules/simplemovie/view/dicon.ini new file mode 100644 index 0000000..843f187 --- /dev/null +++ b/html/webapp/modules/simplemovie/view/dicon.ini @@ -0,0 +1,3 @@ +[DIContainer] +simplemovieView = "modules://simplemovie.components.view" +movieView = "movie.view" diff --git a/html/webapp/modules/simplemovie/view/edit/download/Download.class.php b/html/webapp/modules/simplemovie/view/edit/download/Download.class.php new file mode 100644 index 0000000..2bfca59 --- /dev/null +++ b/html/webapp/modules/simplemovie/view/edit/download/Download.class.php @@ -0,0 +1,45 @@ +uploadsView->downloadCheck( $this->upload_id, null, 0, "simplemovie_view_main_play", null ); + + // ファイルのステータスのキャッシュをクリアする + clearstatcache(); + + // 値がnull以外の場合(ちゃんとデータが取得できている場合) + if( $pathname != null ) + { + $this->uploadsView->headerOutput( $pathname, $filename, $physical_file_name, $cache_flag ); + } + } +} +?> diff --git a/html/webapp/modules/simplemovie/view/edit/download/dicon.ini b/html/webapp/modules/simplemovie/view/edit/download/dicon.ini new file mode 100644 index 0000000..7e37ab6 --- /dev/null +++ b/html/webapp/modules/simplemovie/view/edit/download/dicon.ini @@ -0,0 +1,3 @@ +[DIContainer] +uploadsView = "uploads.view" +simplemovieView = "modules://simplemovie.components.view" \ No newline at end of file diff --git a/html/webapp/modules/simplemovie/view/edit/download/maple.ini b/html/webapp/modules/simplemovie/view/edit/download/maple.ini new file mode 100644 index 0000000..127cbc1 --- /dev/null +++ b/html/webapp/modules/simplemovie/view/edit/download/maple.ini @@ -0,0 +1,8 @@ +[DIContainer] +filename = dicon.ini + +;[ValidateDef] +;upload_id.backup.Download="1:lang._invalid_auth" + +[Action] +uploadsView = "ref:uploadsView" \ No newline at end of file diff --git a/html/webapp/modules/simplemovie/view/edit/help/Help.class.php b/html/webapp/modules/simplemovie/view/edit/help/Help.class.php new file mode 100644 index 0000000..6141d48 --- /dev/null +++ b/html/webapp/modules/simplemovie/view/edit/help/Help.class.php @@ -0,0 +1,42 @@ +change_execute_button_show = 1; + } + + return 'success'; + } +} +?> diff --git a/html/webapp/modules/simplemovie/view/edit/help/maple.ini b/html/webapp/modules/simplemovie/view/edit/help/maple.ini new file mode 100644 index 0000000..282adc0 --- /dev/null +++ b/html/webapp/modules/simplemovie/view/edit/help/maple.ini @@ -0,0 +1,12 @@ +;キャッシュを有効にする場合、使用 +;[Cache] + +[HeaderMenu] +1,simplemovie_help_title = "define:auto" + +[Action] +simplemovieView = "ref:simplemovieView" + +[View] +define:theme = 1 +success = "simplemovie_view_edit_help.html" diff --git a/html/webapp/modules/simplemovie/view/edit/init/Init.class.php b/html/webapp/modules/simplemovie/view/edit/init/Init.class.php new file mode 100644 index 0000000..8ebd8da --- /dev/null +++ b/html/webapp/modules/simplemovie/view/edit/init/Init.class.php @@ -0,0 +1,76 @@ +simplemovie_upload_max_size_mb = floor( ( $this->simplemovie_upload_max_size_mb = SIMPLEMOVIE_UPLOAD_MAX_SIZE_MEDIA / 1024 / 1024 ) * 10) / 10; + } + + // ブロックデータの取得 + $this->block_record = $this->simplemovieView->getBlock( $this->block_id ); + //自動承認不可者の場合は表示をリクエストに差し替え + if($this->simplemovieView->isAutoAgree($this->simplemovieView->getAgreeFlag()) == false) + { + $this->block_record['movie_upload_id'] = $this->block_record['movie_upload_id_request']; + $this->block_record['movie_file_name'] = $this->block_record['movie_file_name_request']; + $this->block_record['thumbnail_upload_id'] = $this->block_record['thumbnail_upload_id_request']; + $this->block_record['thumbnail_file_name'] = $this->block_record['thumbnail_file_name_request']; + } + //print_r($this->block_record); + + // 必須フラグ + $this->movie_require_flag = SIMPLEMOVIE_REQUIRE_MOVIE; + $this->thumbnail_require_flag = SIMPLEMOVIE_REQUIRE_THUMBNAIL; + + // 動画変換ボタン表示フラグを取得して設定 + if ( ctype_digit( SIMPLEMOVIE_CHANGE_EXECUTE_BUTTON_SHOW ) && intval( SIMPLEMOVIE_CHANGE_EXECUTE_BUTTON_SHOW ) === 1 ) + { + $this->change_execute_button_show = 1; + } + + return 'success'; + } +} +?> diff --git a/html/webapp/modules/simplemovie/view/edit/init/maple.ini b/html/webapp/modules/simplemovie/view/edit/init/maple.ini new file mode 100644 index 0000000..6d3e7eb --- /dev/null +++ b/html/webapp/modules/simplemovie/view/edit/init/maple.ini @@ -0,0 +1,16 @@ +;キャッシュを有効にする場合、使用 +;[Cache] + + +[HeaderMenu] +1,simplemovie_edit_title = "define:auto" + +[Include] +filename_simplemovie = "/modules/simplemovie/config/define.inc.php" + +[Action] +simplemovieView = "ref:simplemovieView" + +[View] +define:theme = 1 +success = "simplemovie_view_edit_init.html" diff --git a/html/webapp/modules/simplemovie/view/edit/maple.ini b/html/webapp/modules/simplemovie/view/edit/maple.ini new file mode 100644 index 0000000..05dc6d1 --- /dev/null +++ b/html/webapp/modules/simplemovie/view/edit/maple.ini @@ -0,0 +1,9 @@ +;上部Tab表示用 +[HeaderMenu] +simplemovie_edit_title = "define:simplemovie_view_edit_init" +simplemovie_style_title = "define:simplemovie_view_edit_style" +_edit_operation = "define:_OPERATION_METHOD" +_edit_design = "define:_EDIT_DESIGN_METHOD" +simplemovie_help_title = "define:simplemovie_view_edit_help" +[HeaderInc] +tabset_css = "comp:{$theme_name}/comp_tabset.css" \ No newline at end of file diff --git a/html/webapp/modules/simplemovie/view/edit/style/Style.class.php b/html/webapp/modules/simplemovie/view/edit/style/Style.class.php new file mode 100644 index 0000000..fdb9cc3 --- /dev/null +++ b/html/webapp/modules/simplemovie/view/edit/style/Style.class.php @@ -0,0 +1,42 @@ +block_record = $this->simplemovieView->getBlock( $this->block_id ); + + return 'success'; + } +} +?> diff --git a/html/webapp/modules/simplemovie/view/edit/style/maple.ini b/html/webapp/modules/simplemovie/view/edit/style/maple.ini new file mode 100644 index 0000000..e533d98 --- /dev/null +++ b/html/webapp/modules/simplemovie/view/edit/style/maple.ini @@ -0,0 +1,12 @@ +;キャッシュを有効にする場合、使用 +;[Cache] + +[HeaderMenu] +1,simplemovie_style_title = "define:auto" + +[Action] +simplemovieView = "ref:simplemovieView" + +[View] +define:theme = 1 +success = "simplemovie_view_edit_style.html" diff --git a/html/webapp/modules/simplemovie/view/main/_dicon.ini b/html/webapp/modules/simplemovie/view/main/_dicon.ini new file mode 100644 index 0000000..c117f1f --- /dev/null +++ b/html/webapp/modules/simplemovie/view/main/_dicon.ini @@ -0,0 +1,2 @@ +[DIContainer] +movieView = "movie.view" diff --git a/html/webapp/modules/simplemovie/view/main/agree/Agree.class.php b/html/webapp/modules/simplemovie/view/main/agree/Agree.class.php new file mode 100644 index 0000000..6019868 --- /dev/null +++ b/html/webapp/modules/simplemovie/view/main/agree/Agree.class.php @@ -0,0 +1,31 @@ + \ No newline at end of file diff --git a/html/webapp/modules/simplemovie/view/main/agree/maple.ini b/html/webapp/modules/simplemovie/view/main/agree/maple.ini new file mode 100644 index 0000000..52c1392 --- /dev/null +++ b/html/webapp/modules/simplemovie/view/main/agree/maple.ini @@ -0,0 +1,9 @@ + +[Action] +db = "ref:DbObject" +session = "ref:Session" + +[View] +define:theme = 1 +define:theme_name = "system" +success = "Simplemovie_view_main_agree.html" diff --git a/html/webapp/modules/simplemovie/view/main/iframe/Iframe.class.php b/html/webapp/modules/simplemovie/view/main/iframe/Iframe.class.php new file mode 100644 index 0000000..f267d93 --- /dev/null +++ b/html/webapp/modules/simplemovie/view/main/iframe/Iframe.class.php @@ -0,0 +1,128 @@ +movie_upload_id; + + // 動画UploadIDより、ブロックIDを取得する + $block_record = $this->simplemovieView->getBlockByMovieUploadID( $this->movie_upload_id ); + if ( !empty( $block_record ) && is_array( $block_record ) && !empty( $block_record['block_id'] ) ) + { + //***** 動画がある場合 ******************************************************* + // 再生権限があるかどうかチェックする + list( $pathname, $filename, $physical_file_name, $cache_flag ) = + $this->movieView->downloadCheck( $block_record['movie_upload_id'], null, 0, "simplemovie_view_main_play", null ); + + // キャッシュのクリア + clearstatcache(); + + if ( $pathname != null ) + { + //+++++ データが存在している場合(再生権限がある場合) +++++++++++++++++++ + $autoplay = ( intval( $block_record['autoplay_flag'] ) === 1 ) ? ' autoplay ' : ''; + $poster = ( !empty( $block_record['thumbnail_upload_id'] ) ) ? ' poster="' . BASE_URL . INDEX_FILE_NAME . '?action=simplemovie_view_main_thumbnail&upload_id=' . $block_record['thumbnail_upload_id'] . '" ' : ''; +// 2.4.2.4 ⇒ 2.4.2.5変更 start +// 元のVIDEOタグでの動画サイズは指定しないようにする。 +// ※埋め込みタグを張り付けた先で表示サイズを変更したい場合があるかもしれない為 +// $video_width = ( intval( $block_record['width'] ) !== 0 ) ? ' width="' . $block_record['width'] . '" ' : ''; +// $video_height = ( intval( $block_record['height'] ) !== 0 ) ? ' height="' . $block_record['height'] . '" ' : ''; + $video_width = ''; + $video_height = ''; +// 2.4.2.4 ⇒ 2.4.2.5変更 end + + // 2.4.2.6 ⇒ 2.4.2.7 変更 start Windows7 IEの場合には、ビデオタグではなくアンカータグを出力するように変更する + if( stristr( $_SERVER['HTTP_USER_AGENT'], "Trident" ) && stristr( $_SERVER['HTTP_USER_AGENT'], "6.1" ) && stristr( $_SERVER['HTTP_USER_AGENT'], "Windows" ) ) + { + // VIDEOタグが使用できないブラウザの場合は、タグにて対応 + $img_width = ( intval( $block_record['width'] ) !== 0 ) ? ' width="' . $block_record['width'] . 'px" ' : ''; + $img_height = ( intval( $block_record['height'] ) !== 0 ) ? ' height="' . $block_record['height'] . 'px" ' : ''; + + // Windows7 & IE は動画のソースをHTTP で指定する。 by nagahara@opensource-workshop.jp + $output_tag = '動画を再生する場合は、下記画面をクリックすると、動画再生ウィンドウが開きます。
' + . '※ 動画再生まで時間がかかる場合があります。
' + . '
' + . '' + . '
'; + } + else + { + // VIDEOタグを出力する + $output_tag = ''; + } + // 2.4.2.6 ⇒ 2.4.2.7 変更 end + + // タイトル + $page_title = $block_record['movie_file_name']; + } + else + { + //+++++ データが存在していない場合(再生権限がない場合) +++++++++++++++++ + $page_title = "指定された動画を閲覧できる権限がありません。"; + $error_message = $page_title; + } + } + else + { + //***** 動画がない場合 ******************************************************* + $page_title = "指定された動画が存在していません。"; + $error_message = $page_title; + } + + //***** ページ出力 *************************************************************** +print <<< EOF + + + + + + + +{$page_title} + + +
+ {$output_tag} + {$error_message} +
+ + +EOF; + + exit; + } +} +?> diff --git a/html/webapp/modules/simplemovie/view/main/iframe/maple.ini b/html/webapp/modules/simplemovie/view/main/iframe/maple.ini new file mode 100644 index 0000000..7118169 --- /dev/null +++ b/html/webapp/modules/simplemovie/view/main/iframe/maple.ini @@ -0,0 +1,10 @@ +;キャッシュを有効にする場合、使用 +;[Cache] + +[Action] +simplemovieView = "ref:simplemovieView" +movieView = "ref:movieView" + +[View] +define:theme = 1 +success = "simplemovie_view_main_iframe.html" diff --git a/html/webapp/modules/simplemovie/view/main/init/Init.class.php b/html/webapp/modules/simplemovie/view/main/init/Init.class.php new file mode 100644 index 0000000..c3ae3e7 --- /dev/null +++ b/html/webapp/modules/simplemovie/view/main/init/Init.class.php @@ -0,0 +1,71 @@ +block_record = $this->simplemovieView->getBlock( $this->block_id ); + + // ログインユーザーの権限を取得 + $login_user_auth = $this->simplemovieView->getLoginAuth(); + + // 埋め込みタグデータ設定 + if( isset( $this->block_record['movie_upload_id'] ) ) + { + // 動画がUploadされていて… + // 埋め込みタグ表示フラグ=1(全ての人に対して表示する) または + // 埋め込みタグ表示フラグ=2(主担以上の人に対して表示する)で、かつ、ログインユーザーの権限が主担以上の場合 + if( intval($this->block_record['embed_show_flag']) === 1 || + (intval($this->block_record['embed_show_flag']) === 2 && $login_user_auth >= _AUTH_CHIEF ) ) + { + $this->embed_code = 'src="' . BASE_URL . INDEX_FILE_NAME . '?action=simplemovie_view_main_iframe&movie_upload_id=' . $this->block_record['movie_upload_id'] . '" ' + . 'frameborder="0" allowfullscreen="true" webkitallowfullscreen="true" mozallowfullscreen="true"'; + } + } + + //未承認かつ主担以上の場合は表示をリクエストに差し替え + if($this->block_record['agree_flag'] == SIMPLEMOVIE_STATUS_RESERVE && $login_user_auth >= _AUTH_CHIEF) + { + $this->block_record['movie_upload_id'] = $this->block_record['movie_upload_id_request']; + if( isset( $this->block_record['thumbnail_upload_id_request'] ) ) + { + $this->block_record['thumbnail_upload_id'] = $this->block_record['thumbnail_upload_id_request']; + } + } + return 'success'; + } +} +?> diff --git a/html/webapp/modules/simplemovie/view/main/init/maple.ini b/html/webapp/modules/simplemovie/view/main/init/maple.ini new file mode 100644 index 0000000..3a43da6 --- /dev/null +++ b/html/webapp/modules/simplemovie/view/main/init/maple.ini @@ -0,0 +1,10 @@ +;キャッシュを有効にする場合、使用 +;[Cache] + +[Action] +simplemovieView = "ref:simplemovieView" +movieView = "ref:movieView" + +[View] +define:theme = 1 +success = "simplemovie_view_main_init.html" diff --git a/html/webapp/modules/simplemovie/view/main/play/Play.class.php b/html/webapp/modules/simplemovie/view/main/play/Play.class.php new file mode 100644 index 0000000..84e6379 --- /dev/null +++ b/html/webapp/modules/simplemovie/view/main/play/Play.class.php @@ -0,0 +1,71 @@ +simplemovieView->getBlock( $this->play_block_id ); + + //未承認かつ主担以上の場合は表示をリクエストに差し替え + $login_user_auth = $this->simplemovieView->getLoginAuth(); + if($block_record['agree_flag'] == SIMPLEMOVIE_STATUS_RESERVE && $login_user_auth >= _AUTH_CHIEF) + { + $mUId = $block_record['movie_upload_id_request']; + }else{ + $mUId = $block_record['movie_upload_id']; + } + //test_log( $this->movieView->test() ); + + list( $pathname, $filename, $physical_file_name, $cache_flag ) = + $this->movieView->downloadCheck( $mUId ); +// ★港区チェック用 +//test_log(date('y/m/d H:i:s') . "Simplemovie_View_Main_Play:execute:[downloadCheck]Result" ); +//test_log("pathname [" . $pathname . "]"); +//test_log("filename [" . $filename . "]"); +//test_log("physical_file_name[" . $physical_file_name . "]"); +//test_log("cache_flag [" . $cache_flag . "]"); + + clearstatcache(); + if ( $pathname != null ) { + $cache_flag = false; + $this->movieView->headerOutput( $pathname, $filename, $physical_file_name, $cache_flag ); + } + exit; + + //return 'success'; + } +} +?> diff --git a/html/webapp/modules/simplemovie/view/main/play/maple.ini b/html/webapp/modules/simplemovie/view/main/play/maple.ini new file mode 100644 index 0000000..1d14103 --- /dev/null +++ b/html/webapp/modules/simplemovie/view/main/play/maple.ini @@ -0,0 +1,10 @@ +;キャッシュを有効にする場合、使用 +;[Cache] + +[Action] +simplemovieView = "ref:simplemovieView" +movieView = "ref:movieView" + +[View] +define:theme = 1 +success = "main:true.html" diff --git a/html/webapp/modules/simplemovie/view/main/thumbnail/Thumbnail.class.php b/html/webapp/modules/simplemovie/view/main/thumbnail/Thumbnail.class.php new file mode 100644 index 0000000..099cfaf --- /dev/null +++ b/html/webapp/modules/simplemovie/view/main/thumbnail/Thumbnail.class.php @@ -0,0 +1,46 @@ +w != null || $this->h != null ) { + $resize = array( $this->w, $this->h ); + } + else { + $resize = null; + } + list($pathname,$filename,$physical_file_name, $cache_flag) = $this->uploadsView->downloadCheck($this->upload_id, null, $this->thumbnail_flag, 'simplemovie_view_main_play', $resize); + clearstatcache(); + if($pathname != null) { + $this->uploadsView->headerOutput($pathname, $filename, $physical_file_name, $cache_flag); + } + + //return 'success'; + } +} +?> diff --git a/html/webapp/modules/simplemovie/view/main/thumbnail/dicon.ini b/html/webapp/modules/simplemovie/view/main/thumbnail/dicon.ini new file mode 100644 index 0000000..0a937c2 --- /dev/null +++ b/html/webapp/modules/simplemovie/view/main/thumbnail/dicon.ini @@ -0,0 +1,2 @@ +[DIContainer] +uploadsView = "uploads.view" \ No newline at end of file diff --git a/html/webapp/modules/simplemovie/view/main/thumbnail/maple.ini b/html/webapp/modules/simplemovie/view/main/thumbnail/maple.ini new file mode 100644 index 0000000..ea44f3c --- /dev/null +++ b/html/webapp/modules/simplemovie/view/main/thumbnail/maple.ini @@ -0,0 +1,5 @@ +[DIContainer] +filename = dicon.ini + +[Action] +uploadsView = "ref:uploadsView" diff --git a/html/webapp/modules/simplemovie/view/main/uploading/Uploading.class.php b/html/webapp/modules/simplemovie/view/main/uploading/Uploading.class.php new file mode 100644 index 0000000..f7f61eb --- /dev/null +++ b/html/webapp/modules/simplemovie/view/main/uploading/Uploading.class.php @@ -0,0 +1,30 @@ + diff --git a/html/webapp/modules/simplemovie/view/main/uploading/maple.ini b/html/webapp/modules/simplemovie/view/main/uploading/maple.ini new file mode 100644 index 0000000..773257c --- /dev/null +++ b/html/webapp/modules/simplemovie/view/main/uploading/maple.ini @@ -0,0 +1,7 @@ +;キャッシュを有効にする場合、使用 +;[Cache] + +[View] +define:theme = 1 +define:theme_name = "system" +success = "simplemovie_view_main_uploading.html" diff --git a/html/webapp/modules/simplemovie/view/maple.ini b/html/webapp/modules/simplemovie/view/maple.ini new file mode 100644 index 0000000..9285deb --- /dev/null +++ b/html/webapp/modules/simplemovie/view/maple.ini @@ -0,0 +1,11 @@ +[SmartyAssign] +module = main.ini + +[DIContainer] +filename = "/modules/simplemovie/view/dicon.ini" + +[TokenExtra] + +[HeaderInc] +css = "simplemovie:{$temp_name}/style.css" + diff --git a/osws-docs/Sample.docx b/osws-docs/Sample.docx new file mode 100644 index 0000000..9f46d62 Binary files /dev/null and b/osws-docs/Sample.docx differ