function execute()
 {
     $context = $this->getContext();
     $controller = $context->getController();
     $request = $context->getRequest();
     $user = $context->getUser();
     $acs_user_info_row = $user->getAttribute('acs_user_info_row');
     $target_user_info_row = $request->getAttribute('target_user_info_row');
     $login_info_row_array = $request->getAttribute('login_info_row_array');
     $top_page_url = $this->getControllerPath(DEFAULT_MODULE, DEFAULT_ACTION) . '&id=' . $target_user_info_row['community_id'];
     // 加工
     foreach ($login_info_row_array as $index => $login_info_row) {
         $login_info_row_array[$index]['login_date'] = ACSLib::convert_pg_date_to_str($login_info_row['login_date']);
         $login_info_row_array[$index]['logout_date'] = ACSLib::convert_pg_date_to_str($login_info_row['logout_date']);
     }
     // ページング設定
     $display_count = ACSSystemConfig::get_keyword_value(ACSMsg::get_mst('system_config_group', 'D02'), 'USER_SEARCH_RESULT_DISPLAY_MAX_COUNT');
     $paging_info = $this->getPagingInfo($controller, $request, $login_info_row_array, $display_count);
     // テンプレート
     $this->setScreenId("0001");
     $this->setTemplate('LoginInfo.tpl.php');
     // set
     //$this->setAttribute('form', $form);
     $this->setAttribute('target_user_info_row', $target_user_info_row);
     $this->setAttribute('login_info_row_array', $login_info_row_array);
     $this->setAttribute('top_page_url', $top_page_url);
     $this->setAttribute('paging_info', $paging_info);
     $this->setAttribute('module', 'System');
     $this->setAttribute('action', 'LoginInfo');
     return parent::execute();
 }
 function execute()
 {
     $context = $this->getContext();
     $controller = $context->getController();
     $request = $context->getRequest();
     $user = $context->getUser();
     $acs_user_info_row = $user->getAttribute('acs_user_info_row');
     // get
     $target_user_info_row = $request->getAttribute('target_user_info_row');
     $message_row = $request->getAttribute('message_row');
     // 加工
     //送信者のトップページURL
     $link_page_url['else_user_message_url'] = $this->getControllerPath(DEFAULT_MODULE, 'Index') . '&id=' . $message_row['user_id'];
     // 投稿日時
     $message_row['post_date'] = ACSLib::convert_pg_date_to_str($message_row['post_date']);
     // メニュー部URL
     $menu['receiv_box_url'] = $this->getControllerPath('User', 'MessageBox') . '&id=' . $acs_user_info_row['user_community_id'];
     $menu['send_box_url'] = $this->getControllerPath('User', 'MessageBox') . '&id=' . $acs_user_info_row['user_community_id'] . '&move_id=2';
     // 返信ボタンURL
     $message_return_url = $this->getControllerPath('User', 'Message') . '&id=' . $message_row['user_id'] . '&message_id=' . $message_row['message_id'] . '&move_id=4';
     // set
     $this->setAttribute('acs_user_info_row', $acs_user_info_row);
     $this->setAttribute('target_user_info_row', $target_user_info_row);
     $this->setAttribute('message_row', $message_row);
     $this->setAttribute('message_return_url', $message_return_url);
     $this->setAttribute('menu', $menu);
     $this->setAttribute('move_id', $request->getAttribute('move_id'));
     $this->setAttribute('link_page_url', $link_page_url);
     // テンプレート
     $this->setScreenId("0001");
     $this->setTemplate('MessageShow.tpl.php');
     return parent::execute();
 }
 function execute()
 {
     $context = $this->getContext();
     $controller = $context->getController();
     $request = $context->getRequest();
     $user = $context->getUser();
     $acs_user_info_row = $user->getAttribute('acs_user_info_row');
     $system_announce_row_array = $request->getAttribute('system_announce_row_array');
     // ページング設定
     $display_count = ACSSystemConfig::get_keyword_value(ACSMsg::get_mst('system_config_group', 'D02'), 'NEW_INFO_LIST_DISPLAY_MAX_COUNT');
     $paging_info = $this->getPagingInfo($controller, $request, $system_announce_row_array, $display_count);
     foreach ($system_announce_row_array as $index => $system_announce_row) {
         $system_announce_row_array[$index]['top_page_url'] = $this->getControllerPath(DEFAULT_MODULE, DEFAULT_ACTION) . '&id=' . $system_announce_row['community_id'];
         $system_announce_row_array[$index]['post_date'] = ACSLib::convert_pg_date_to_str($system_announce_row['post_date'], true, true);
         $system_announce_row_array[$index]['expire_date'] = ACSLib::convert_pg_date_to_str($system_announce_row['expire_date'], false, false, false);
         $system_announce_row_array[$index]['is_expire'] = ACSLib::get_boolean($system_announce_row['is_expire']);
         $system_announce_row_array[$index]['system_announce_delete_flag'] = ACSLib::get_boolean($system_announce_row['system_announce_delete_flag']);
         $system_announce_row_array[$index]['delete_system_announce_url'] = $this->getControllerPath('System', 'DeleteSystemAnnounce') . '&system_announce_id=' . $system_announce_row['system_announce_id'];
     }
     // システムアナウンス(システムからのお知らせ)作成URL
     $create_system_announce_url = $this->getControllerPath('System', 'CreateSystemAnnounce');
     // テンプレート
     $this->setScreenId("0001");
     $this->setTemplate('SystemAnnounceList.tpl.php');
     // set
     $this->setAttribute('system_announce_row_array', $system_announce_row_array);
     $this->setAttribute('paging_info', $paging_info);
     $this->setAttribute('create_system_announce_url', $create_system_announce_url);
     return parent::execute();
 }
 function execute()
 {
     $context = $this->getContext();
     $controller = $context->getController();
     $request = $context->getRequest();
     $user = $context->getUser();
     $acs_user_info_row = $user->getAttribute('acs_user_info_row');
     $footprint_info_row_array = $request->getAttribute('footprint_info_row_array');
     $user_community_id = $request->getAttribute('user_community_id');
     //top
     $top_page_url = $this->getControllerPath('User', 'Index') . '&id=' . $user_community_id;
     foreach ($footprint_info_row_array as $index => $footprint_row) {
         // 足跡日付
         $footprint_info_row_array[$index]['post_date_disp'] = ACSLib::convert_pg_date_to_str($footprint_row['post_date']);
         // 足跡をつけたユーザのトップページURL
         $footprint_info_row_array[$index]['visitor_url'] = $this->getControllerPath(DEFAULT_MODULE, 'Index') . '&id=' . $footprint_row['visitor_community_id'];
         // コンテンツ日付
         $footprint_info_row_array[$index]['contents_date_disp'] = "(" . ACSLib::convert_pg_date_to_str($footprint_row['contents_date'], 0, 0) . ")";
     }
     // ページング設定
     $display_count = ACSSystemConfig::get_keyword_value(ACSMsg::get_mst('system_config_group', 'D02'), 'FOOTPRINT_LIST_DISPLAY_MAX_COUNT');
     $paging_info = $this->getPagingInfo($controller, $request, $footprint_info_row_array, $display_count);
     // set
     $this->setAttribute('acs_user_info_row', $acs_user_info_row);
     $this->setAttribute('top_page_url', $top_page_url);
     $this->setAttribute('footprint_info_row_array', $footprint_info_row_array);
     $this->setAttribute('paging_info', $paging_info);
     // テンプレート
     $this->setScreenId("0001");
     $this->setTemplate('FootprintCheck.tpl.php');
     return parent::execute();
 }
 public function execute()
 {
     $context =& $this->getContext();
     $user = $context->getUser();
     $request = $context->getRequest();
     $acs_user_info_row = $user->getAttribute('acs_user_info_row');
     // get
     $new_open_diary_row_array = $request->getAttribute('new_open_diary_row_array');
     // 加工
     foreach ($new_open_diary_row_array as $index => $new_open_diary_row) {
         // 投稿者のトップページURL
         $new_open_diary_row_array[$index]['top_page_url'] = $this->getControllerPath(DEFAULT_MODULE, DEFAULT_ACTION) . '&id=' . $new_open_diary_row['user_community_id'];
         // 投稿者の写真
         $new_open_diary_row_array[$index]['image_url'] = ACSUser::get_image_url($new_open_diary_row['user_community_id'], 'thumb');
         // ダイアリーコメントURL
         $new_open_diary_row_array[$index]['diary_comment_url'] = $this->getControllerPath(DEFAULT_MODULE, 'DiaryComment') . '&id=' . $new_open_diary_row['user_community_id'] . '&diary_id=' . $new_open_diary_row['diary_id'];
         $new_open_diary_row_array[$index]['post_date'] = ACSLib::convert_pg_date_to_str($new_open_diary_row['post_date']);
     }
     // set
     $this->setAttribute('new_open_diary_row_array', $new_open_diary_row_array);
     // テンプレートをセットする
     $this->setTemplate('NewOpenDiary.tpl.php');
     $context->getController()->setRenderMode(View::RENDER_VAR);
     $request->setAttribute("NewOpenDiary", $this->render());
     return parent::execute();
 }
 public function execute()
 {
     $context =& $this->getContext();
     $user = $context->getUser();
     $request = $context->getRequest();
     $acs_user_info_row = $user->getAttribute('acs_user_info_row');
     // get
     $new_bbs_for_press_release_row_array = $request->getAttribute('new_bbs_for_press_release_row_array');
     // 加工
     foreach ($new_bbs_for_press_release_row_array as $index => $new_bbs_row) {
         $new_bbs_for_press_release_row_array[$index]['top_page_url'] = $this->getControllerPath('Community', DEFAULT_ACTION) . '&community_id=' . $new_bbs_row['community_id'];
         $new_bbs_for_press_release_row_array[$index]['bbs_res_url'] = $this->getControllerPath('Community', 'BBSRes') . '&community_id=' . $new_bbs_row['community_id'] . '&bbs_id=' . $new_bbs_row['bbs_id'];
         if ($new_bbs_row['file_id']) {
             $new_bbs_for_press_release_row_array[$index]['file_url'] = ACSBBSFile::get_image_url($new_bbs_row['bbs_id'], 'thumb');
             // サムネイル
             $new_bbs_for_press_release_row_array[$index]['file_url_alink'] = ACSBBSFile::get_image_url($new_bbs_row['bbs_id'], '');
             // ポップアップ用
         }
         $new_bbs_for_press_release_row_array[$index]['post_date'] = ACSLib::convert_pg_date_to_str($new_bbs_row['post_date'], 1, 0);
     }
     // set
     $this->setAttribute('new_bbs_for_press_release_row_array', $new_bbs_for_press_release_row_array);
     // テンプレートをセットする
     $this->setTemplate('NewPressRelease.tpl.php');
     $context->getController()->setRenderMode(View::RENDER_VAR);
     $request->setAttribute("NewPressRelease", $this->render());
     return parent::execute();
 }
 function execute()
 {
     $context = $this->getContext();
     $controller = $context->getController();
     $request = $context->getRequest();
     $user = $context->getUser();
     $acs_user_info_row = $user->getAttribute('acs_user_info_row');
     // get
     $waiting_type_name = $request->getAttribute('waiting_type_name');
     $waiting_row_array = $request->getAttribute('waiting_row_array');
     // 加工
     foreach ($waiting_row_array as $index => $waiting_row) {
         $waiting_row_array[$index]['entry_date'] = ACSLib::convert_pg_date_to_str($waiting_row['entry_date']);
         $waiting_row_array[$index]['complete_date'] = ACSLib::convert_pg_date_to_str($waiting_row['entry_date']);
         if ($waiting_row['waiting_type_name'] == ACSMsg::get_mst('waiting_type_master', 'D10')) {
             $waiting_row_array[$index]['image_url'] = ACSUser::get_image_url($waiting_row['waiting_community_id'], 'thumb');
             $waiting_row_array[$index]['top_page_url'] = $this->getControllerPath(DEFAULT_MODULE, DEFAULT_ACTION) . '&id=' . $waiting_row['waiting_community_id'];
         } elseif ($waiting_row['waiting_type_name'] == ACSMsg::get_mst('waiting_type_master', 'D30')) {
             $waiting_row_array[$index]['image_url'] = ACSCommunity::get_image_url($waiting_row['waiting_community_id'], 'thumb');
             $waiting_row_array[$index]['top_page_url'] = $this->getControllerPath('Community', DEFAULT_ACTION) . '&community_id=' . $waiting_row['waiting_community_id'];
             $waiting_row_array[$index]['entry_user_info_row']['top_page_url'] = $this->getControllerPath(DEFAULT_MODULE, DEFAULT_ACTION) . '&id=' . $waiting_row['entry_user_info_row']['user_community_id'];
             // コミュニティプロフィール
             $waiting_row_array[$index]['waiting_community_row'] = ACSCommunity::get_community_profile_row($waiting_row['waiting_community_id']);
         }
         $waiting_row_array[$index]['action_url'] = $this->getControllerPath('User', 'WaitingList') . '&id=' . $acs_user_info_row['user_community_id'] . '&waiting_id=' . $waiting_row['waiting_id'];
     }
     // テンプレート
     $this->setScreenId("0001");
     $this->setTemplate('WaitingList.tpl.php');
     // set
     $this->setAttribute('waiting_type_name', $waiting_type_name);
     $this->setAttribute('waiting_row_array', $waiting_row_array);
     return parent::execute();
 }
 function execute()
 {
     $context = $this->getContext();
     $controller = $context->getController();
     $request = $context->getRequest();
     $user = $context->getUser();
     // コミュニティ情報
     // RSSに表示する全コミュニティ のコミュニティID指定定数
     // 対象とならないコミュニティIDを取得
     $except_community_id = $request->getParameter('except_community_id');
     // BBS記事一覧
     $bbs_row_array = ACSBBS::get_bbs_rss_row_array($except_community_id, 0);
     // システム情報の設定
     $system_config_keyword_value['SYSTEM_NAME'] = ACSSystemConfig::get_keyword_value(ACSMsg::get_mst('system_config_group', 'D01'), 'SYSTEM_NAME');
     $system_config_keyword_value['SYSTEM_OUTLINE'] = ACSSystemConfig::get_keyword_value(ACSMsg::get_mst('system_config_group', 'D01'), 'SYSTEM_OUTLINE');
     $system_config_keyword_value['SYSTEM_BASE_URL'] = ACSSystemConfig::get_keyword_value(ACSMsg::get_mst('system_config_group', 'D01'), 'SYSTEM_BASE_URL');
     $system_config_keyword_value['SYSTEM_MAIL_ADDR'] = ACSSystemConfig::get_keyword_value(ACSMsg::get_mst('system_config_group', 'D01'), 'SYSTEM_MAIL_ADDR');
     //	$system_config_keyword_value['SYSTEM_IMAGE'] = ACSSystemConfig::get_keyword_value('システム', 'SYSTEM_IMAGE');		// 3/13現在画像は無い 次行 暫定処理
     $system_config_keyword_value['SYSTEM_IMAGE']['title'] = ACSMsg::get_msg('Community', 'PressReleaseAllRSSAction.class.php', 'M001');
     $system_config_keyword_value['SYSTEM_IMAGE']['url'] = ACSMsg::get_msg('Community', 'PressReleaseAllRSSAction.class.php', 'M002');
     $system_config_keyword_value['SYSTEM_IMAGE']['link'] = ACSMsg::get_msg('Community', 'PressReleaseAllRSSAction.class.php', 'M003');
     $system_config_keyword_value['SYSTEM_IMAGE']['description'] = ACSMsg::get_msg('Community', 'PressReleaseAllRSSAction.class.php', 'M004');
     $rss_syndicationURL .= $system_config_keyword_value['SYSTEM_BASE_URL'] . $this->getControllerPath('Community', 'PressReleaseAllRSS');
     // 掲載終了日が本日を越えていないもののみにする
     // 本日を取得
     $today = date("Y/m/d");
     $bbs_rss_array = array();
     foreach ($bbs_row_array as $index => $bbs_row) {
         //対象となる記事のみを抽出
         $bbs_date = ACSLib::convert_pg_date_to_str($bbs_row['expire_date'], false, false, false);
         if ($bbs_date >= $today || $bbs_date == null) {
             //記事配列を作り変え
             $bbs_rss_array[$index] = $bbs_row;
             //相対するCommunity名を作る
             $community_row = ACSCommunity::get_community_row($bbs_row['community_id']);
             $bbs_rss_array[$index]['community_id_name'] = $community_row['community_name'];
             //記事のリンク先を作る
             $bbs_rss_array[$index]['bbs_url'] = $this->getControllerPath('Community', 'BBSRes') . '&community_id=' . $bbs_row['community_id'] . '&bbs_id=' . $bbs_row['bbs_id'];
             //画像のリンク先を作る
             $bbs_rss_array[$index]['file_link'] = "";
             if ($bbs_row['file_id'] != "") {
                 $bbs_rss_array[$index]['file_url'] = $system_config_keyword_value['SYSTEM_BASE_URL'] . ACSBBSFile::get_image_url($bbs_row['bbs_id'], 'rss');
                 //RSS表示用
             }
         }
     }
     $user->setAttribute('bbs_rss_array', $bbs_rss_array);
     // RSS対象のBBS記事一覧
     $bbs_rss_array = $user->getAttribute('bbs_rss_array');
     // RSS対象のアドレス開始値
     $system_top_address = ACSSystemConfig::get_keyword_value(ACSMsg::get_mst('system_config_group', 'D01'), 'SYSTEM_BASE_URL');
     // set
     $request->setAttribute('system_config_keyword_value', $system_config_keyword_value);
     $request->setAttribute('rss_syndicationURL', $rss_syndicationURL);
     $request->setAttribute('bbs_rss_array', $bbs_rss_array);
     $request->setAttribute('system_top_address', $system_top_address);
     require "PressReleaseAllRSS.php";
 }
 function execute()
 {
     $context = $this->getContext();
     $controller = $context->getController();
     $request = $context->getRequest();
     $user = $context->getUser();
     $acs_user_info_row = $user->getAttribute('acs_user_info_row');
     // get
     $target_user_info_row = $request->getAttribute('target_user_info_row');
     $message_row_array = $request->getAttribute('message_row_array');
     $move_id = $request->getAttribute('move_id');
     // メニュー部URL
     $menu['receiv_box_url'] = $this->getControllerPath("User", 'MessageBox') . '&id=' . $target_user_info_row['user_community_id'];
     $menu['send_box_url'] = $this->getControllerPath("User", 'MessageBox') . '&id=' . $target_user_info_row['user_community_id'] . '&move_id=2';
     // 加工
     foreach ($message_row_array as $index => $message_row) {
         // 投稿日時
         $message_row_array[$index]['post_date'] = ACSLib::convert_pg_date_to_str($message_row['post_date']);
         // 投稿日時 (省略系: M/D)
         $message_row_array[$index]['short_post_date'] = ACSLib::convert_pg_date_to_str($message_row['post_date']);
         //$message_row_array[$index]['short_post_date'] = gmdate("n/j", strtotime($message_row['post_date']) + 9*60*60);
         if ($move_id == 2) {
             // 送信済メッセージ詳細ページURL
             $message_row_array[$index]['message_show_url'] = $this->getControllerPath("User", 'MessageShow') . '&id=' . $target_user_info_row['community_id'] . '&message_id=' . $message_row['message_id'] . '&move_id=2';
             // 削除画面URL
             $message_delete_url = $this->getControllerPath("User", 'DeleteMessage') . '&id=' . $target_user_info_row['user_community_id'] . '&action_type=confirm&move_id=2';
         } else {
             // 受信メッセージ詳細ページURL
             $message_row_array[$index]['message_show_url'] = $this->getControllerPath("User", 'MessageShow') . '&id=' . $target_user_info_row['community_id'] . '&message_id=' . $message_row['message_id'];
             // 削除画面URL
             $message_delete_url = $this->getControllerPath("User", 'DeleteMessage') . '&id=' . $target_user_info_row['user_community_id'] . '&action_type=confirm';
         }
     }
     // ページング設定
     $display_count = ACSSystemConfig::get_keyword_value(ACSMsg::get_mst('system_config_group', 'D02'), 'NEW_INFO_LIST_DISPLAY_MAX_COUNT');
     $paging_info = $this->getPagingInfo($controller, $request, $message_row_array, $display_count);
     // set
     $this->setAttribute('target_user_info_row', $target_user_info_row);
     $this->setAttribute('menu', $menu);
     $this->setAttribute('message_row_array', $message_row_array);
     $this->setAttribute('paging_info', $paging_info);
     $this->setAttribute('move_id', $move_id);
     $this->setAttribute('message_delete_url', $message_delete_url);
     // エラーメッセージ
     $this->setAttribute('error_message', $this->getErrorMessage($controller, $request, $user));
     // テンプレート
     $this->setScreenId("0001");
     $this->setTemplate('MessageBox.tpl.php');
     return parent::execute();
 }
示例#10
0
 function execute()
 {
     $context = $this->getContext();
     $controller = $context->getController();
     $request = $context->getRequest();
     $user = $context->getUser();
     // get
     // ユーザ情報一覧
     $log_row_array = $request->getAttribute('log_row_array');
     $form = $request->getAttribute('form');
     // 加工
     foreach ($log_row_array as $index => $log_row) {
         $log_row_array[$index]['log_date'] = ACSLib::convert_pg_date_to_str($log_row['log_date'], true, true, true);
         $log_row_array[$index]['top_page_url'] = $this->getControllerPath(DEFAULT_MODULE, DEFAULT_ACTION) . '&id=' . $log_row['user_community_id'];
         if (ACSLib::get_boolean($log_row_array[$index]['administrator_flag'])) {
             // システム管理者
             $log_row_array[$index]['user_level_name'] = ACSMsg::get_msg('System', 'LogInputView.class.php', 'M001');
         } else {
             // ログインユーザ
             $log_row_array[$index]['user_level_name'] = ACSMsg::get_msg('System', 'LogInputView.class.php', 'M002');
         }
         if (ACSLib::get_boolean($log_row_array[$index]['operation_result'])) {
             // 成功
             $log_row_array[$index]['operation_result_name'] = ACSMsg::get_msg('System', 'LogInputView.class.php', 'M003');
         } else {
             // 失敗
             $log_row_array[$index]['operation_result_name'] = ACSMsg::get_msg('System', 'LogInputView.class.php', 'M004');
         }
     }
     // ページング設定
     $display_count = ACSSystemConfig::get_keyword_value(ACSMsg::get_mst('system_config_group', 'D07'), 'LOG_DISPLAY_MAX_COUNT');
     $paging_info = $this->getPagingInfo($controller, $request, $log_row_array, $display_count);
     // URL
     $action_url = $this->getControllerPath();
     // テンプレート
     $this->setScreenId("0001");
     $this->setTemplate('Log.tpl.php');
     // set
     $this->setAttribute('form', $form);
     $this->setAttribute('log_row_array', $log_row_array);
     $this->setAttribute('paging_info', $paging_info);
     $this->setAttribute('action_url', $action_url);
     $this->setAttribute('module', 'System');
     $this->setAttribute('action', 'Log');
     return parent::execute();
 }
 function execute()
 {
     $context = $this->getContext();
     $controller = $context->getController();
     $request = $context->getRequest();
     $user = $context->getUser();
     $system_announce_row = $request->getAttribute('system_announce_row');
     // URL
     $action_url = $this->getControllerPath('System', 'DeleteSystemAnnounce') . '&system_announce_id=' . $system_announce_row['system_announce_id'];
     $system_announce_list_url = $this->getControllerPath('System', 'SystemAnnounceList');
     // 加工
     $system_announce_row['expire_date'] = ACSLib::convert_pg_date_to_str($system_announce_row['expire_date'], false, false, false);
     // テンプレート
     $this->setScreenId("0001");
     $this->setTemplate('DeleteSystemAnnounce.tpl.php');
     // set
     $this->setAttribute('system_announce_row', $system_announce_row);
     $this->setAttribute('action_url', $action_url);
     $this->setAttribute('system_announce_list_url', $system_announce_list_url);
     return parent::execute();
 }
 function execute()
 {
     $context = $this->getContext();
     $controller = $context->getController();
     $request = $context->getRequest();
     $user = $context->getUser();
     $this->setScreenId("0001");
     $this->setTemplate('Schedule.tpl.php');
     $current_module = 'Community';
     // ログインユーザ情報
     $this->setAttribute('acs_user_info_row', $request->getAttribute('acs_user_info_row'));
     // コミュニティ情報
     $target_community_row =& $request->getAttribute('target_community_row');
     $this->setAttribute('target_community_row', $target_community_row);
     // 共通URLパラメータ
     $url_params = "community_id=" . $target_community_row['community_id'];
     // スケジュールインスタンスの配列
     $schedules =& $request->getAttribute('schedules');
     // 表示用配列の生成
     $schedule_list = array();
     $schedule_persons =& $request->getAttribute('schedule_persons');
     foreach ($schedules as $schedule) {
         $schedule_params = $url_params . "&schedule_id=" . $schedule->schedule_id;
         $person_count_info = $schedule_persons[$schedule->schedule_id];
         if ($schedule->is_target_all()) {
             $person_count_info['participate_person_count'] = $request->getAttribute('member_count');
         }
         $schedule_list[] = array('instance' => $schedule, 'url_edit' => $this->getControllerPath($current_module, 'EditSchedule') . "&" . $schedule_params, 'url_decide' => $this->getControllerPath($current_module, 'DecideSchedule') . "&" . $schedule_params, 'url_answer' => $this->getControllerPath($current_module, 'AnswerSchedule') . "&" . $schedule_params, 'disp_detail' => mb_strlen($schedule->schedule_detail) > 15 ? mb_substr($schedule->schedule_detail, 0, 15) . "..." : $schedule->schedule_detail, 'disp_person_count' => $person_count_info['answer_person_count'] . " / " . $person_count_info['participate_person_count'] . " " . ACSMsg::get_msg('Community', 'ScheduleSuccessView.class.php', 'M004'), 'disp_closing' => ACSLib::convert_pg_date_to_str($schedule->schedule_closing_datetime), 'disp_status' => $schedule->is_fixed() ? ACSMsg::get_msg('Community', 'ScheduleSuccessView.class.php', 'M001') : ($schedule->is_close() ? ACSMsg::get_msg('Community', 'ScheduleSuccessView.class.php', 'M002') : ACSMsg::get_msg('Community', 'ScheduleSuccessView.class.php', 'M003')));
     }
     // コミュニティのURL
     $this->setAttribute('url_community_top', $this->getControllerPath($current_module, 'Index') . "&" . $url_params);
     // 新規作成のURL
     $this->setAttribute('url_schedule_new', $this->getControllerPath($current_module, 'EditSchedule') . "&" . $url_params);
     // ページング設定
     $display_count = ACSSystemConfig::get_keyword_value(ACSMsg::get_mst('system_config_group', 'D03'), 'COMMUNITY_SCHEDULE_LIST_DISPLAY_MAX_COUNT');
     $paging_info = $this->getPagingInfo($controller, $request, $schedule_list, $display_count);
     $this->setAttribute('schedule_list', $schedule_list);
     $this->setAttribute('paging_info', $paging_info);
     return parent::execute();
 }
 function execute()
 {
     $context = $this->getContext();
     $controller = $context->getController();
     $request = $context->getRequest();
     $user = $context->getUser();
     $acs_user_info_row = $user->getAttribute('acs_user_info_row');
     // get
     $community_row = $request->getAttribute('community_row');
     $bbs_row_array = $request->getAttribute('bbs_row_array');
     // コミュニティトップページのURL
     $community_top_page_url = $this->getControllerPath('Community', DEFAULT_ACTION) . '&community_id=' . $community_row['community_id'];
     // BBS URL
     $bbs_top_page_url = $this->getControllerPath('Community', 'BBS') . '&community_id=' . $community_row['community_id'];
     // 加工
     foreach ($bbs_row_array as $index => $bbs_row) {
         // 親記事の投稿者 トップページURL
         $bbs_row_array[$index]['top_page_url'] = $this->getControllerPath(DEFAULT_MODULE, DEFAULT_ACTION) . '&id=' . $bbs_row['user_community_id'];
         // 投稿日時
         $bbs_row_array[$index]['post_date'] = ACSLib::convert_pg_date_to_str($bbs_row['post_date']);
         // 返信画面URL
         $bbs_row_array[$index]['bbs_res_url'] = $this->getControllerPath('Community', 'BBSRes') . '&community_id=' . $community_row['community_id'] . '&bbs_id=' . $bbs_row['bbs_id'];
     }
     //---- アクセス制御 ----//
     $role_array = ACSAccessControl::get_community_role_array($acs_user_info_row, $community_row);
     $bbs_row_array = ACSAccessControl::get_valid_row_array_for_community($acs_user_info_row, $role_array, $bbs_row_array);
     //----------------------//
     // set
     $this->setAttribute('community_top_page_url', $community_top_page_url);
     $this->setAttribute('bbs_top_page_url', $bbs_top_page_url);
     $this->setAttribute('community_row', $request->getAttribute('community_row'));
     $this->setAttribute('bbs_row_array', $bbs_row_array);
     // テンプレート
     $this->setScreenId("0001");
     $this->setTemplate('BBSThreadList.tpl.php');
     return parent::execute();
 }
示例#14
0
 /**
  * 日記htmlコンテンツの作成
  * 
  * @param string $diary_row 日記配列
  * @param string $encoding エンコーディング
  */
 function create_diary_html($diary_row, $encoding = '')
 {
     $file_head = date("Ymd_His", ACSLib::convert_pg_date_to_timestamp($diary_row['post_date']));
     $this->diary_file_names[$file_head]++;
     if ($this->diary_file_names[$file_head] > 1) {
         $file_head .= '_' . ($this->diary_file_names[$html_file] - 1);
     }
     $html_file = $file_head . '.html';
     // 基本項目の置換
     $contents = _ACSDIARYBACKUP_DIARY_FORMAT;
     $contents = mb_ereg_replace('@SUBJECT@', htmlspecialchars($diary_row['subject']), $contents);
     $contents = mb_ereg_replace('@POST_DATE@', htmlspecialchars(ACSLib::convert_pg_date_to_str($diary_row['post_date'])), $contents);
     $contents = mb_ereg_replace('@BODY@', nl2br(htmlspecialchars($diary_row['body'])), $contents);
     $contents = mb_ereg_replace('@OPEN_LEVEL_TITLE@', htmlspecialchars(ACSMsg::get_mdmsg(__FILE__, 'M001')), $contents);
     $contents = mb_ereg_replace('@OPEN_LEVEL_NAME@', htmlspecialchars($diary_row['open_level_name']), $contents);
     // イメージファイルがある場合
     $image_file_id = $diary_row['file_id'];
     if ($image_file_id != '') {
         $file_obj = ACSFile::get_file_info_instance($image_file_id);
         // 拡張子の取得
         mb_ereg("^.*(\\.[^\\.\\/]*)", $file_obj->get_display_file_name(), $matches);
         $ext = $matches[1];
         // ファイル名の生成
         $img_from = ACS_FOLDER_DIR . $file_obj->get_server_file_name();
         $img_to = $this->img_dir . '/' . $file_head . $ext;
         $img_thumb_from = ACS_FOLDER_DIR . $file_obj->get_thumbnail_server_file_name();
         $img_thumb_to = $this->img_dir . '/thumb_' . $file_head . '.jpg';
         // URLの生成
         $img_url = $this->diary_to_img_url . '/' . $file_head . $ext;
         $img_thumb_url = $this->diary_to_img_url . '/thumb_' . $file_head . '.jpg';
         // イメージファイルの作成
         @copy($img_from, $img_to);
         @copy($img_thumb_from, $img_thumb_to);
         // リンクタグの生成
         $contents = mb_ereg_replace('@IMAGE@', '<div><a href="' . $img_url . '">' . '<img src="' . $img_thumb_url . '" border="0"></a></div><br>', $contents);
     } else {
         $contents = mb_ereg_replace('@IMAGE@', '', $contents);
     }
     // コメントの取得
     $diary_comment_row_array = ACSDiary::get_diary_comment_row_array($diary_row['diary_id']);
     // コメント部分の生成
     $comments = "";
     foreach ($diary_comment_row_array as $diary_comment_row) {
         if ($diary_comment_row['diary_comment_delete_flag'] == 'f') {
             $comment_contents = _ACSDIARYBACKUP_DIARY_COMMENT_FORMAT;
             $comment_contents = mb_ereg_replace('@POST_DATE@', htmlspecialchars(ACSLib::convert_pg_date_to_str($diary_comment_row['post_date'])), $comment_contents);
             $comment_contents = mb_ereg_replace('@COMMUNITY_NAME@', htmlspecialchars($diary_comment_row['community_name']), $comment_contents);
             $comment_contents = mb_ereg_replace('@BODY@', nl2br(htmlspecialchars($diary_comment_row['body'])), $comment_contents);
             $comments .= $comment_contents;
         }
     }
     // コメントの置換
     $contents = mb_ereg_replace('@COMMENTS@', $comments, $contents);
     // contents 自身の変換
     if ($encoding != '') {
         $contents = mb_convert_encoding($contents, $encoding);
     }
     // ファイルへの出力
     $fp = fopen($this->diary_dir . '/' . $html_file, "w");
     fputs($fp, $contents);
     fclose($fp);
     return $html_file;
 }
示例#15
0
 /**
  * 更新日ゲット (yyyymmddhmi)
  *
  * @param none
  */
 function get_update_date_yyyymmddhmi()
 {
     $date_yyyymmddhmi = ACSLib::convert_pg_date_to_str($this->update_date);
     return $date_yyyymmddhmi;
 }
 /**
  * スケジュール通知メールの送信
  *
  * 各ユーザの言語に対応してスケジュール関連の<br>
  * 通知メールを送信する
  *
  * @param object $schedule スケジュールインスタンス(ACSSchedule)
  * @param string $serial_msg_key_fmg シリアルメッセージ取得用フォーマット(例:"RMD%03d")
  * @param string $subject_msg_key 件名メッセージ取得用キー(例:"M001")
  * @param array  $additional_tags 追加する置換プレースフォルダ(未指定も可)
  * @param array  $additional_message_tags 追加する置換プレースフォルダ(メッセージid指定)
  *               (未指定も可) メール言語に対応して置換されます
  * @return boolean true/false
  */
 static function send_schedule_announce_mail(&$schedule, $serial_msg_key_fmg, $subject_msg_key, $additional_tags = "", $additional_message_tags = "")
 {
     // スケジュールURL
     $schedule_url = "{SYSTEM_SCRIPT_PATH}" . "?{SYSTEM_MODULE_ACCESSOR}=Community" . "&{SYSTEM_ACTION_ACCESSOR}=AnswerSchedule" . "&community_id={$schedule->community_id}" . "&schedule_id={$schedule->schedule_id}";
     $user_community_row =& ACSUser::get_user_profile_row($schedule->user_community_id);
     // システムのメールアドレスを取得
     $system_mail_addr = ACSSystemConfig::get_keyword_value(ACSMsg::get_mst('system_config_group', 'D01'), 'SYSTEM_MAIL_ADDR');
     // 各言語用のメッセージを準備
     $msgs = array();
     $subjects = array();
     $org_lang = ACSMsg::get_lang();
     foreach (ACSMsg::get_lang_list_array() as $lang => $lang_disp) {
         ACSMsg::set_lang($lang);
         $tags_array = array('{USER_NAME}' => $user_community_row['user_name'], '{USER_COMMUNITY_NAME}' => $user_community_row['community_name'], '{SCHEDULE_NAME}' => $schedule->schedule_name, '{SCHEDULE_DETAIL}' => $schedule->schedule_detail, '{SCHEDULE_CLOSING_DATETIME}' => ACSLib::convert_pg_date_to_str($schedule->schedule_closing_datetime), '{SCHEDULE_URL}' => $schedule_url);
         if (is_array($additional_tags)) {
             $tags_array = array_merge($tags_array, $additional_tags);
         }
         if (is_array($additional_message_tags)) {
             $msg_array = array();
             foreach ($additional_message_tags as $tag => $msg_key) {
                 $msg_array[$tag] = ACSMsg::get_mdmsg(__FILE__, $msg_key);
             }
             $tags_array = array_merge($tags_array, $msg_array);
         }
         $msgs[$lang] = ACSMsg::get_serial_msg('lib', basename(__FILE__), $serial_msg_key_fmg);
         $msgs[$lang] = ACSMsg::get_tag_replace($msgs[$lang], $tags_array);
         // subjectの編集
         $subjects[$lang] = ACSMsg::get_mdmsg(__FILE__, $subject_msg_key);
     }
     ACSMsg::set_lang($org_lang);
     // メールの送信(全コミュニティメンバ)
     return ACSCommunityMail::send_community_mail($schedule->community_id, $system_mail_addr, $subjects, $msgs);
 }
 function execute()
 {
     $context =& $this->getContext();
     $user = $context->getUser();
     $request = $context->getRequest();
     $controller = $context->getController();
     $acs_user_info_row = $user->getAttribute('acs_user_info_row');
     // get
     $community_row = $request->getAttribute('community_row');
     $sub_community_row_array = $request->getAttribute('sub_community_row_array');
     $parent_community_row_array = $request->getAttribute('parent_community_row_array');
     $community_member_user_info_row_array = $request->getAttribute('community_member_user_info_row_array');
     $community_admin_user_info_row_array = $request->getAttribute('community_admin_user_info_row_array');
     $community_id = $community_row['community_id'];
     $bbs_row_array = $request->getAttribute('bbs_row_array');
     // コミュニティメンバ数
     $community_member_display_max = ACSSystemConfig::get_keyword_value(ACSMsg::get_mst('system_config_group', 'D03'), 'COMMUNITY_MEMBER_DISPLAY_MAX_COUNT');
     $is_community_member = ACSCommunity::is_community_member($acs_user_info_row['user_community_id'], $community_id);
     $is_community_admin = ACSCommunity::is_community_admin($acs_user_info_row['user_community_id'], $community_id);
     // 掲示板新着記事数
     $bbs_display_max = 10;
     // URL
     $bbs_url = $this->getControllerPath("Community", 'BBS') . '&community_id=' . $community_id;
     $community_folder_url = $this->getControllerPath("Community", 'Folder') . '&community_id=' . $community_id;
     if (!$is_community_member && $acs_user_info_row['is_acs_user']) {
         $join_community_url = $this->getControllerPath("Community", 'JoinCommunity') . '&community_id=' . $community_id;
     }
     if ($is_community_admin) {
         //コミュニティ プロフィールの編集
         $community_change_url = $this->getControllerPath("Community", 'EditCommunity') . '&community_id=' . $community_id;
     }
     // コミュニティ退会URL
     //   コミュニティメンバで、管理者でない場合は表示
     if ($is_community_member and !$is_community_admin) {
         $leave_community_url = $this->getControllerPath("Community", 'LeaveCommunity') . '&community_id=' . $community_id;
     }
     // RSS出力ページのURL
     $PressRelease_community_url = $this->getControllerPath("Community", 'PressReleaseRSS') . '&community_id=' . $community_id;
     // 加工 //
     $community_row['register_date'] = ACSLib::convert_pg_date_to_str($community_row['register_date'], 0, 0, 0);
     // 登録日
     $community_row['community_member_num'] = count($community_member_user_info_row_array);
     // メンバー数
     // 画像ファイルのパスを設定
     $community_row['image_url'] = ACSCommunity::get_image_url($community_id);
     if ($is_community_admin) {
         $edit_profile_image_url = $this->getControllerPath("Community", 'EditProfileImage') . '&community_id=' . $community_id;
     }
     // 参加資格の自由参加可能コミュニティ
     foreach ($community_row['join_trusted_community_row_array'] as $index => $join_trusted_community_row) {
         $community_row['join_trusted_community_row_array'][$index]['top_page_url'] = $this->getControllerPath("Community", DEFAULT_ACTION) . '&community_id=' . $join_trusted_community_row['community_id'];
     }
     // 掲示板の公開コミュニティ
     foreach ($community_row['contents_row_array']['bbs']['trusted_community_row_array'] as $index => $trusted_community_row) {
         $community_row['contents_row_array']['bbs']['trusted_community_row_array'][$index]['top_page_url'] = $this->getControllerPath("Community", DEFAULT_ACTION) . '&community_id=' . $trusted_community_row['community_id'];
     }
     // コミュニティフォルダの公開コミュニティ
     foreach ($community_row['contents_row_array']['community_folder']['trusted_community_row_array'] as $index => $trusted_community_row) {
         $community_row['contents_row_array']['community_folder']['trusted_community_row_array'][$index]['top_page_url'] = $this->getControllerPath("Community", DEFAULT_ACTION) . '&community_id=' . $trusted_community_row['community_id'];
     }
     // コミュニティメンバ
     $community_member_display_user_info_row_array = array();
     $array_count = 0;
     foreach ($community_member_user_info_row_array as $index => $community_member_user_info_row) {
         $array_count++;
         $_community_member_row = array();
         $_community_member_row['community_name'] = $community_member_user_info_row['community_name'];
         $_community_member_row['top_page_url'] = $this->getControllerPath(DEFAULT_MODULE, DEFAULT_ACTION) . '&id=' . $community_member_user_info_row['user_community_id'];
         $_community_member_row['image_url'] = ACSUser::get_image_url($community_member_user_info_row['user_community_id'], 'thumb');
         $_community_member_row['friends_row_array_num'] = ACSUser::get_friends_row_array_num($community_member_user_info_row['user_community_id']);
         array_push($community_member_display_user_info_row_array, $_community_member_row);
         if ($array_count == $community_member_display_max) {
             break;
         }
     }
     // コミュニティ管理者
     foreach ($community_admin_user_info_row_array as $index => $community_admin_user_info_row) {
         $community_admin_user_info_row_array[$index]['top_page_url'] = $this->getControllerPath(DEFAULT_MODULE, DEFAULT_ACTION) . '&id=' . $community_admin_user_info_row['user_community_id'];
     }
     // 親コミュニティ
     foreach ($parent_community_row_array as $index => $parent_community_row) {
         $parent_community_row_array[$index]['top_page_url'] = $this->getControllerPath("Community", DEFAULT_ACTION) . '&community_id=' . $parent_community_row['community_id'];
     }
     // サブコミュニティ
     foreach ($sub_community_row_array as $index => $sub_community_row) {
         $sub_community_row_array[$index]['top_page_url'] = $this->getControllerPath("Community", DEFAULT_ACTION) . '&community_id=' . $sub_community_row['community_id'];
     }
     // URL
     // コミュニティ間リンク設定
     if ($is_community_admin) {
         $community_link_url = $this->getControllerPath("Community", 'CommunityLink') . '&community_id=' . $community_row['community_id'];
     }
     // コミュニティメンバ一覧
     $community_member_list_url = $this->getControllerPath("Community", 'CommunityMemberList') . '&community_id=' . $community_row['community_id'];
     // メンバ削除
     $delete_community_member_list_url = "";
     if ($is_community_admin) {
         $delete_community_member_list_url = $this->getControllerPath("Community", 'DeleteCommunityMemberList');
         $delete_community_member_list_url .= '&community_id=' . $community_row['community_id'];
     }
     // コミュニティ削除
     $delete_community_url = "";
     if ($is_community_admin) {
         $delete_community_url = $this->getControllerPath("Community", 'DeleteCommunity');
         $delete_community_url .= '&community_id=' . $community_row['community_id'];
     }
     // コミュニティ招待 URL
     if ($is_community_admin) {
         $invite_to_community_url = $this->getControllerPath("Community", 'InviteToCommunity') . '&community_id=' . $community_row['community_id'];
     }
     // コミュニティスケジュール URL
     if ($is_community_member) {
         $community_schedule_url = $this->getControllerPath("Community", 'Schedule') . '&community_id=' . $community_id;
     }
     // コミュニティ管理者設定
     if ($is_community_admin) {
         $edit_community_admin_url = $this->getControllerPath("Community", 'EditCommunityAdmin') . '&community_id=' . $community_row['community_id'];
     }
     // 外部RSS自動取り込み設定
     if ($is_community_admin) {
         $edit_external_rss_url = $this->getControllerPath("Community", 'EditExternalRSS') . '&community_id=' . $community_row['community_id'];
     }
     if ($is_community_admin) {
         // 待機: コミュニティ参加 承認待ち
         $waiting_for_join_community_row_array = $request->getAttribute('waiting_for_join_community_row_array');
         $waiting_for_join_community_row_array_num = count($waiting_for_join_community_row_array);
         if ($waiting_for_join_community_row_array_num) {
             // マイフレンズ追加 承認待ち URL
             $waiting_for_join_community_url = $this->getControllerPath("Community", 'WaitingList') . '&community_id=' . $community_id . '&waiting_type_code=' . $waiting_for_join_community_row_array[0]['waiting_type_code'] . '&waiting_status_code=' . $waiting_for_join_community_row_array[0]['waiting_status_code'];
         }
         // 待機: 親コミュニティ追加
         $waiting_for_parent_community_link_row_array = $request->getAttribute('waiting_for_parent_community_link_row_array');
         $waiting_for_parent_community_link_row_array_num = count($waiting_for_parent_community_link_row_array);
         if ($waiting_for_parent_community_link_row_array_num) {
             // 親コミュニティ追加 承認待ち URL
             $waiting_for_parent_community_link_url = $this->getControllerPath("Community", 'WaitingList') . '&community_id=' . $community_id . '&waiting_type_code=' . $waiting_for_parent_community_link_row_array[0]['waiting_type_code'] . '&waiting_status_code=' . $waiting_for_parent_community_link_row_array[0]['waiting_status_code'];
         }
         // 待機: サブコミュニティ追加
         $waiting_for_sub_community_link_row_array = $request->getAttribute('waiting_for_sub_community_link_row_array');
         $waiting_for_sub_community_link_row_array_num = count($waiting_for_sub_community_link_row_array);
         if ($waiting_for_sub_community_link_row_array_num) {
             // サブコミュニティ追加 承認待ち URL
             $waiting_for_sub_community_link_url = $this->getControllerPath("Community", 'WaitingList') . '&community_id=' . $community_id . '&waiting_type_code=' . $waiting_for_sub_community_link_row_array[0]['waiting_type_code'] . '&waiting_status_code=' . $waiting_for_sub_community_link_row_array[0]['waiting_status_code'];
         }
     }
     // 掲示板に対するアクセス権
     $bbs_contents_row = ACSCommunity::get_contents_row($community_id, ACSMsg::get_mst('contents_type_master', 'D41'));
     $bbs_contents_row['trusted_community_row_array'] = ACSCommunity::get_contents_trusted_community_row_array($community_id, $bbs_contents_row['contents_type_code'], $bbs_contents_row['open_level_code']);
     $role_array = ACSAccessControl::get_community_role_array($acs_user_info_row, $community_row);
     $ret = ACSAccessControl::is_valid_user_for_community($acs_user_info_row, $role_array, $bbs_contents_row);
     if ($ret) {
         // 掲示版最新情報
         foreach ($bbs_row_array as $index => $bbs_row) {
             // 返信画面URL
             $bbs_row_array[$index]['bbs_res_url'] = $this->getControllerPath("Community", 'BBSRes') . '&community_id=' . $community_row['community_id'] . '&bbs_id=' . $bbs_row['bbs_id'];
             $bbs_row_array[$index]['bbs_last_post_date'] = ACSLib::convert_pg_date_to_str($bbs_row['bbs_last_post_date'], true, false, false);
         }
         //---- アクセス制御 ----//
         $role_array = ACSAccessControl::get_community_role_array($acs_user_info_row, $community_row);
         $bbs_row_array = ACSAccessControl::get_valid_row_array_for_community($acs_user_info_row, $role_array, $bbs_row_array);
         //----------------------//
         $bbs_row_array = array_slice($bbs_row_array, 0, $bbs_display_max);
     } else {
         $bbs_row_array = array();
     }
     // set
     $this->setAttribute('community_row', $community_row);
     $this->setAttribute('parent_community_row_array', $parent_community_row_array);
     $this->setAttribute('sub_community_row_array', $sub_community_row_array);
     $this->setAttribute('community_member_display_user_info_row_array', $community_member_display_user_info_row_array);
     $this->setAttribute('community_admin_user_info_row_array', $community_admin_user_info_row_array);
     $this->setAttribute('bbs_row_array', $bbs_row_array);
     $this->setAttribute('is_community_member', $is_community_member);
     $this->setAttribute('is_community_admin', $is_community_admin);
     $this->setAttribute('bbs_url', $bbs_url);
     $this->setAttribute('community_folder_url', $community_folder_url);
     $this->setAttribute('create_sub_community_url', $create_sub_community_url);
     $this->setAttribute('join_community_url', $join_community_url);
     $this->setAttribute('leave_community_url', $leave_community_url);
     $this->setAttribute('community_change_url', $community_change_url);
     $this->setAttribute('community_schedule_url', $community_schedule_url);
     $this->setAttribute('community_link_url', $community_link_url);
     $this->setAttribute('delete_community_url', $delete_community_url);
     $this->setAttribute('edit_community_admin_url', $edit_community_admin_url);
     $this->setAttribute('invite_to_community_url', $invite_to_community_url);
     $this->setAttribute('edit_community_profile_url', $edit_community_profile_url);
     $this->setAttribute('edit_external_rss_url', $edit_external_rss_url);
     $this->setAttribute('community_member_list_url', $community_member_list_url);
     $this->setAttribute('delete_community_member_list_url', $delete_community_member_list_url);
     $this->setAttribute('PressRelease_community_url', $PressRelease_community_url);
     //画像
     $this->setAttribute('edit_profile_image_url', $edit_profile_image_url);
     // 待機
     $this->setAttribute('waiting_for_join_community_row_array_num', $waiting_for_join_community_row_array_num);
     $this->setAttribute('waiting_for_join_community_url', $waiting_for_join_community_url);
     $this->setAttribute('waiting_for_parent_community_link_row_array_num', $waiting_for_parent_community_link_row_array_num);
     $this->setAttribute('waiting_for_parent_community_link_url', $waiting_for_parent_community_link_url);
     $this->setAttribute('waiting_for_sub_community_link_row_array_num', $waiting_for_sub_community_link_row_array_num);
     $this->setAttribute('waiting_for_sub_community_link_url', $waiting_for_sub_community_link_url);
     // テンプレート
     $this->setScreenId("0001");
     $this->setTemplate('Index.tpl.php');
     return parent::execute();
 }
 function execute()
 {
     $context = $this->getContext();
     $controller = $context->getController();
     $request = $context->getRequest();
     $user = $context->getUser();
     $acs_user_info_row = $user->getAttribute('acs_user_info_row');
     // get
     $target_user_info_row = $request->getAttribute('target_user_info_row');
     $diary_row_array = $request->getAttribute('diary_row_array_result');
     $open_level_master_row_array = $request->getAttribute('open_level_master_row_array');
     $friends_group_row_array = $request->getAttribute('friends_group_row_array');
     $err_str = $request->getAttribute('err_str');
     $form_pre = $request->getAttribute('form_pre');
     // トップページURL
     $link_page_url['top_page_url'] = $this->getControllerPath(DEFAULT_MODULE, 'Diary') . '&id=' . $acs_user_info_row['user_community_id'];
     //他人の日記を閲覧している場合のトップページURL
     $link_page_url['else_user_top_page_url'] = $this->getControllerPath(DEFAULT_MODULE, 'Index') . '&id=' . $target_user_info_row['community_id'];
     //他人の日記を閲覧している場合の日記ページURL
     $link_page_url['else_user_diary_url'] = $this->getControllerPath(DEFAULT_MODULE, 'Diary') . '&id=' . $target_user_info_row['community_id'];
     //検索画面url
     $link_page_url['search_diary_url'] = SCRIPT_PATH;
     // get でサブミットするための、遷移先情報
     $module = 'User';
     $action = 'SearchResultDiary';
     $id = $target_user_info_row['community_id'];
     $move_id = '2';
     // 加工
     if ($diary_row_array) {
         foreach ($diary_row_array as $index => $diary_row) {
             // ユーザ画像URL
             $diary_row_array[$index]['image_url'] = ACSUser::get_image_url($diary_row['community_id'], 'thumb');
             //ユーザページ
             $user_row = ACSUser::get_user_profile_row($diary_row['community_id']);
             $diary_row_array[$index]['top_page_url'] = $this->getControllerPath(DEFAULT_MODULE, DEFAULT_ACTION) . '&id=' . $diary_row['community_id'];
             $diary_row_array[$index]['community_name'] = $user_row['community_name'];
             // 投稿日時
             $diary_row_array[$index]['post_date'] = ACSLib::convert_pg_date_to_str($diary_row['post_date']);
             // コメントページURL
             $diary_row_array[$index]['diary_comment_url'] = $this->getControllerPath('User', 'DiaryComment') . '&id=' . $diary_row['community_id'] . '&diary_id=' . $diary_row['diary_id'];
             // 信頼済みコミュニティ(マイフレンズグループ)が定義されているか
             if ($diary_row['open_level_name'] == ACSMsg::get_mst('open_level_master', 'D05')) {
                 if (count($diary_row['trusted_community_row_array']) && $diary_row['trusted_community_row_array'][0]['community_type_name'] == ACSMsg::get_mst('community_type_master', 'D20')) {
                     $diary_row_array[$index]['trusted_community_flag'] = 0;
                 } else {
                     $diary_row_array[$index]['trusted_community_flag'] = 1;
                 }
             }
         }
         //---- アクセス制御 ----//
         $role_array = ACSAccessControl::get_user_community_role_array($acs_user_info_row, $target_user_info_row);
         $diary_row_array = ACSAccessControl::get_valid_row_array_for_user_community($acs_user_info_row, $role_array, $diary_row_array);
         //特別::全件検索の場合 ターゲットが自分のままになってしまうことを回避
         $diary_row_array_result = array();
         foreach ($diary_row_array as $index => $diary_row) {
             $diary_target_user_info_row = ACSUser::get_user_info_row_by_user_community_id($diary_row['community_id']);
             $role_array = ACSAccessControl::get_user_community_role_array($acs_user_info_row, $diary_target_user_info_row);
             $is_valid_user = ACSAccessControl::is_valid_user_for_community($acs_user_info_row, $role_array, $diary_row);
             if ($is_valid_user) {
                 //アクセス権がある
                 array_push($diary_row_array_result, $diary_row);
             }
         }
         //----------------------//
     }
     // 本人のページかどうか
     if ($target_user_info_row['user_community_id'] == $acs_user_info_row['user_community_id']) {
         $is_self_page = 1;
     } else {
         $is_self_page = 0;
     }
     // set
     $this->setAttribute('target_user_info_row', $target_user_info_row);
     $this->setAttribute('diary_row_array_result', $diary_row_array_result);
     $this->setAttribute('is_self_page', $is_self_page);
     $this->setAttribute('link_page_url', $link_page_url);
     $this->setAttribute('open_level_master_row_array', $open_level_master_row_array);
     $this->setAttribute('friends_group_row_array', $friends_group_row_array);
     $this->setAttribute('err_str', $err_str);
     $this->setAttribute('form_pre', $form_pre);
     $this->setAttribute('module', $module);
     $this->setAttribute('action', $action);
     $this->setAttribute('id', $id);
     $this->setAttribute('move_id', $move_id);
     // テンプレート
     $this->setScreenId("0001");
     $this->setTemplate('SearchResultDiary.tpl.php');
     return parent::execute();
 }
 function execute()
 {
     $context =& $this->getContext();
     $user = $context->getUser();
     $request = $context->getRequest();
     $controller = $context->getController();
     // index用CSSファイル読み込み
     $this->clearCSSFile();
     $this->setSelectionCSSFile($request->getAttribute('selection_css'));
     $acs_user_info_row = $user->getAttribute('acs_user_info_row');
     $is_self_page = $request->getAttribute('is_self_page');
     $peruse_mode = 9;
     $user_community_id = $request->getAttribute('user_community_id');
     if ($acs_user_info_row['is_acs_user']) {
         $peruse_mode = 1;
         //ログインユーザです
     }
     // ラストログイン
     $last_login = $request->getAttribute('last_login');
     if ($acs_user_info_row['is_acs_user']) {
         if ($last_login == "") {
             $last_login = ACSMsg::get_msg('User', 'IndexSuccessView.class.php', 'M001');
         } else {
             $last_login = ACSLib::convert_pg_date_to_str($last_login);
         }
     } else {
         $last_login = "";
     }
     // マイフレンズ表示件数
     $my_friends_display_max = ACSSystemConfig::get_keyword_value(ACSMsg::get_mst('system_config_group', 'D02'), 'FRIENDS_DISPLAY_MAX_COUNT');
     // マイコミュニティ表示件数
     $my_community_display_max = ACSSystemConfig::get_keyword_value(ACSMsg::get_mst('system_config_group', 'D02'), 'COMMUNITY_DISPLAY_MAX_COUNT');
     $profile = $request->getAttribute('target_user_info_row');
     // 画像ファイルのパスを設定
     $profile['image_url'] = ACSUser::get_image_url($user_community_id);
     // マイフレンズの設定
     $friends_row_array = $request->getAttribute('friends_row_array');
     $friends_row_array_num = count($friends_row_array);
     $friends_row_array = array_slice($friends_row_array, 0, $my_friends_display_max);
     foreach ($friends_row_array as $index => $friends_row) {
         $friends_row_array[$index]['top_page_url'] = $this->getControllerPath(DEFAULT_MODULE, DEFAULT_ACTION) . '&id=' . $friends_row['user_community_id'];
         $friends_row_array[$index]['image_url'] = ACSUser::get_image_url($friends_row['user_community_id'], 'thumb');
         // マイフレンズ人数
         $friends_row_array[$index]['friends_row_array_num'] = ACSUser::get_friends_row_array_num($friends_row['user_community_id']);
     }
     // マイコミュニティの設定
     $community_row_array = $request->getAttribute('community_row_array');
     $community_row_array_num = count($community_row_array);
     $community_list = array();
     $array_count = 0;
     foreach ($community_row_array as $index => $community_row) {
         $community_data['community_name'] = $community_row['community_name'];
         $community_data['top_page_url'] = $this->getControllerPath('Community', DEFAULT_ACTION) . '&community_id=' . $community_row['community_id'];
         $community_data['image_url'] = ACSCommunity::get_image_url($community_row['community_id'], 'thumb');
         $community_data['community_member_num'] = ACSCommunity::get_community_member_num($community_row['community_id']);
         // メンバでない非公開コミュニティは表示対象にしない
         if ($community_row['contents_row_array']['self']['open_level_name'] == ACSMsg::get_mst('open_level_master', 'D03') && !$community_row['is_community_member']) {
             continue;
         }
         array_push($community_list, $community_data);
         $array_count++;
         if ($array_count == $my_community_display_max) {
             break;
         }
     }
     // メニュー設定
     $menu = array();
     $menu['diary_url'] = $this->getControllerPath("User", 'Diary') . '&id=' . $user_community_id;
     $menu['folder_url'] = $this->getControllerPath("User", 'Folder') . '&id=' . $user_community_id;
     if ($acs_user_info_row['user_community_id'] == $profile['user_community_id'] && !$acs_user_info_row['is_ldap_user']) {
         $menu['change_password_url'] = $this->getControllerPath("User", 'ChangePassword') . '&id=' . $user_community_id;
     }
     if ($acs_user_info_row['user_community_id'] == $profile['user_community_id']) {
         $menu['image_change_url'] = $this->getControllerPath("User", 'EditProfileImage') . '&id=' . $user_community_id;
     }
     // マイプロフィール編集 自分自身
     if ($acs_user_info_row['user_id'] == $profile['user_id']) {
         $profile_edit_url = $this->getControllerPath("User", 'EditProfile') . '&id=' . $user_community_id;
         $profile_view_url = $this->getControllerPath("User", 'ProfileCheck') . '&id=' . $user_community_id . '&view_mode=0';
         // 足跡確認URL
         $footprint_url = $this->getControllerPath("User", 'FootprintCheck') . '&id=' . $user_community_id;
         // デザイン選択URL
         $select_design_url = $this->getControllerPath("User", 'SelectDesign') . '&id=' . $user_community_id;
         // バックアップURL
         $backup_url = $this->getControllerPath("User", 'ContentsBackup') . '&id=' . $user_community_id;
         // メッセージURL追加
         $message_box_url = $this->getControllerPath("User", 'MessageBox') . '&id=' . $user_community_id;
         $peruse_mode = 1;
     } else {
         if (ACSUser::is_friends($acs_user_info_row['user_community_id'], $user_community_id)) {
             $peruse_mode = 2;
             // 友人
         }
     }
     // メッセージを送るボタン追加
     $message_btn_url = $this->getControllerPath("User", 'Message') . '&id=' . $user_community_id;
     // マイフレンズ追加
     $target_user_info_row = $request->getAttribute('target_user_info_row');
     $is_friends = ACSUser::is_friends($acs_user_info_row['user_community_id'], $target_user_info_row['user_community_id']);
     if (!$is_friends && $acs_user_info_row['is_acs_user']) {
         $add_myfriends_url = $this->getControllerPath("User", 'AddFriends') . '&id=' . $user_community_id;
     }
     // マイフレンズ一覧URL
     $friends_list_url = $this->getControllerPath("User", 'FriendsList') . '&id=' . $user_community_id;
     if ($acs_user_info_row['user_id'] == $target_user_info_row['user_id']) {
         // マイフレンズグループ一覧URL
         $friends_group_list_url = $this->getControllerPath("User", 'FriendsGroupList') . '&id=' . $target_user_info_row['user_community_id'];
     }
     // マイコミュニティURL
     $community_list_url = $this->getControllerPath("User", 'CommunityList') . '&id=' . $user_community_id;
     if ($is_self_page) {
         // 待機: マイフレンズ追加
         $waiting_for_add_friends_row_array = $request->getAttribute('waiting_for_add_friends_row_array');
         $waiting_for_add_friends_row_array_num = count($waiting_for_add_friends_row_array);
         if ($waiting_for_add_friends_row_array_num) {
             // マイフレンズ追加 承認待ち URL
             $waiting_list_for_add_friends_url = $this->getControllerPath("User", 'WaitingList') . '&id=' . $user_community_id . '&waiting_type_code=' . $waiting_for_add_friends_row_array[0]['waiting_type_code'] . '&waiting_status_code=' . $waiting_for_add_friends_row_array[0]['waiting_status_code'];
         }
         // 待機: コミュニティ参加
         $waiting_for_join_community_row_array_array = $request->getAttribute('waiting_for_join_community_row_array_array');
         foreach ($waiting_for_join_community_row_array_array as $index => $waiting_for_join_community_row_array) {
             $waiting_for_join_community_row_array_array[$index]['waiting_for_join_community_row_array_num'] = count($waiting_for_join_community_row_array['waiting_row_array']);
             $waiting_for_join_community_row_array_array[$index]['waiting_list_for_join_community_url'] = $this->getControllerPath('Community', 'WaitingList') . '&community_id=' . $waiting_for_join_community_row_array['community_row']['community_id'] . '&waiting_type_code=' . $waiting_for_join_community_row_array['waiting_row_array'][0]['waiting_type_code'] . '&waiting_status_code=' . $waiting_for_join_community_row_array['waiting_row_array'][0]['waiting_status_code'];
         }
         // 待機: 親コミュニティ追加
         $waiting_for_parent_community_link_row_array_array = $request->getAttribute('waiting_for_parent_community_link_row_array_array');
         foreach ($waiting_for_parent_community_link_row_array_array as $index => $waiting_for_parent_community_link_row_array) {
             $waiting_for_parent_community_link_row_array_array[$index]['waiting_for_parent_community_link_row_array_num'] = count($waiting_for_parent_community_link_row_array['waiting_row_array']);
             $waiting_for_parent_community_link_row_array_array[$index]['waiting_list_for_parent_community_link_url'] = $this->getControllerPath('Community', 'WaitingList') . '&community_id=' . $waiting_for_parent_community_link_row_array['community_row']['community_id'] . '&waiting_type_code=' . $waiting_for_parent_community_link_row_array['waiting_row_array'][0]['waiting_type_code'] . '&waiting_status_code=' . $waiting_for_parent_community_link_row_array['waiting_row_array'][0]['waiting_status_code'];
         }
         // 待機: サブコミュニティ追加
         $waiting_for_sub_community_link_row_array_array = $request->getAttribute('waiting_for_sub_community_link_row_array_array');
         foreach ($waiting_for_sub_community_link_row_array_array as $index => $waiting_for_sub_community_link_row_array) {
             $waiting_for_sub_community_link_row_array_array[$index]['waiting_for_sub_community_link_row_array_num'] = count($waiting_for_sub_community_link_row_array['waiting_row_array']);
             $waiting_for_sub_community_link_row_array_array[$index]['waiting_list_for_sub_community_link_url'] = $this->getControllerPath('Community', 'WaitingList') . '&community_id=' . $waiting_for_sub_community_link_row_array['community_row']['community_id'] . '&waiting_type_code=' . $waiting_for_sub_community_link_row_array['waiting_row_array'][0]['waiting_type_code'] . '&waiting_status_code=' . $waiting_for_sub_community_link_row_array['waiting_row_array'][0]['waiting_status_code'];
         }
         // 待機: コミュニティ招待
         $waiting_for_invite_to_community_row_array = $request->getAttribute('waiting_for_invite_to_community_row_array');
         $waiting_for_invite_to_community_row_array_num = count($waiting_for_invite_to_community_row_array);
         if ($waiting_for_invite_to_community_row_array_num) {
             // マイフレンズ追加 承認待ち URL
             $waiting_list_for_invite_to_community_url = $this->getControllerPath("User", 'WaitingList') . '&id=' . $user_community_id . '&waiting_type_code=' . $waiting_for_invite_to_community_row_array[0]['waiting_type_code'] . '&waiting_status_code=' . $waiting_for_invite_to_community_row_array[0]['waiting_status_code'];
         }
         // 新着コメント
         $new_comment_diary_row_array = $request->getAttribute('new_comment_diary_row_array');
         $new_comment_diary_row_array_num = count($new_comment_diary_row_array);
         if ($new_comment_diary_row_array_num) {
             // 新着コメントがあるダイアリーの中で、最もダイアリーの投稿日時が古い物([0])のdiary_idを引数に付ける
             $new_comment_diary_url = $this->getControllerPath(DEFAULT_MODULE, 'DiaryComment') . '&id=' . $new_comment_diary_row_array[0]['community_id'] . '&diary_id=' . $new_comment_diary_row_array[0]['diary_id'];
         }
         // システムからのお知らせ
         $system_announce_row_array = $request->getAttribute('system_announce_row_array');
         foreach ($system_announce_row_array as $index => $system_announce_row) {
             $system_announce_row_array[$index]['post_date'] = ACSLib::convert_pg_date_to_str($system_announce_row['post_date'], false, false, false);
         }
         // メッセージ機能
         $new_message_row_array = $request->getAttribute('new_message_row_array');
         $new_message_row_array_num = count($new_message_row_array);
         if ($new_message_row_array_num == 1) {
             // 新着メッセージが一件 メッセージ詳細URL
             $new_message_url = $this->getControllerPath("User", 'MessageShow') . '&id=' . $user_community_id . '&message_id=' . $new_message_row_array[0]['message_id'];
         } else {
             if ($new_message_row_array_num > 1) {
                 // 新着メッセージが複数件 受信箱URL
                 $new_message_url = $this->getControllerPath("User", 'MessageBox') . '&id=' . $user_community_id;
             }
         }
         // メッセージ機能
     }
     //---- アクセス制御 ----//
     $role_array = ACSAccessControl::get_user_community_role_array($acs_user_info_row, $target_user_info_row);
     $profile['contents_row_array']['user_name'] = ACSAccessControl::get_valid_row_for_user_community($acs_user_info_row, $role_array, $profile['contents_row_array']['user_name']);
     $profile['contents_row_array']['birthplace'] = ACSAccessControl::get_valid_row_for_user_community($acs_user_info_row, $role_array, $profile['contents_row_array']['birthplace']);
     $profile['contents_row_array']['birthday'] = ACSAccessControl::get_valid_row_for_user_community($acs_user_info_row, $role_array, $profile['contents_row_array']['birthday']);
     // マイフレンズ表示可否
     if (!ACSAccessControl::is_valid_user_for_user_community($acs_user_info_row, $role_array, $profile['contents_row_array']['friends_list'])) {
         $friends_row_array = array();
         $friends_list_url = '';
         //$friends_row_array_num = 0;
     }
     //----------------------//
     // set
     $this->setAttribute('profile', $profile);
     $this->setAttribute('peruse_mode', $peruse_mode);
     //プロフィール自己紹介分岐用
     $this->setAttribute('friends_row_array', $friends_row_array);
     $this->setAttribute('friends_row_array_num', $friends_row_array_num);
     $this->setAttribute('community_list', $community_list);
     $this->setAttribute('community_row_array_num', $community_row_array_num);
     $this->setAttribute('last_login', $last_login);
     // メニュー
     $this->setAttribute('is_self_page', $is_self_page);
     $this->setAttribute('menu', $menu);
     $this->setAttribute('profile_edit_url', $profile_edit_url);
     $this->setAttribute('profile_view_url', $profile_view_url);
     $this->setAttribute('footprint_url', $footprint_url);
     $this->setAttribute('backup_url', $backup_url);
     $this->setAttribute('select_design_url', $select_design_url);
     $this->setAttribute('add_myfriends_url', $add_myfriends_url);
     $this->setAttribute('friends_list_url', $friends_list_url);
     $this->setAttribute('friends_group_list_url', $friends_group_list_url);
     $this->setAttribute('manage_friends_url', $manage_friends_url);
     $this->setAttribute('community_list_url', $community_list_url);
     $this->setAttribute('message_btn_url', $message_btn_url);
     $this->setAttribute('message_box_url', $message_box_url);
     // 待機: マイフレンズ追加
     $this->setAttribute('waiting_for_add_friends_row_array_num', $waiting_for_add_friends_row_array_num);
     $this->setAttribute('waiting_list_for_add_friends_url', $waiting_list_for_add_friends_url);
     // 待機: コミュニティ参加
     $this->setAttribute('waiting_for_join_community_row_array_array', $waiting_for_join_community_row_array_array);
     // 待機: 親コミュニティ追加
     $this->setAttribute('waiting_for_parent_community_link_row_array_array', $waiting_for_parent_community_link_row_array_array);
     // 待機: サブコミュニティ追加
     $this->setAttribute('waiting_for_sub_community_link_row_array_array', $waiting_for_sub_community_link_row_array_array);
     // 待機: コミュニティ招待
     $this->setAttribute('waiting_for_invite_to_community_row_array_num', $waiting_for_invite_to_community_row_array_num);
     $this->setAttribute('waiting_list_for_invite_to_community_url', $waiting_list_for_invite_to_community_url);
     // 新着コメントのあるマイダイアリー
     $this->setAttribute('new_comment_diary_row_array_num', $new_comment_diary_row_array_num);
     $this->setAttribute('new_comment_diary_url', $new_comment_diary_url);
     // システムからのお知らせ
     $this->setAttribute('system_announce_row_array', $system_announce_row_array);
     // メッセージ機能
     $this->setAttribute('new_message_row_array_num', $new_message_row_array_num);
     $this->setAttribute('new_message_url', $new_message_url);
     // インライン表示
     /*--------------- 新着情報を取得 ---------------*/
     // 現在のレンダーモードを取得
     $renderMode = $controller->getRenderMode();
     //レンダーモードを上書き (画面出力をオフにしてる)
     $controller->setRenderMode(View::RENDER_VAR);
     $this->inlineFlg = true;
     // フォワード側で判断する
     $request->setAttribute("inline_mode", "1");
     $request->setAttribute("id", $user_community_id);
     // 新着日記
     $controller->forward("User", "NewDiary");
     $this->setAttribute("NewDiary", $request->getAttribute("NewDiary"));
     // 日記コメント履歴
     $controller->forward("User", "DiaryCommentHistory");
     $this->setAttribute("DiaryCommentHistory", $request->getAttribute("DiaryCommentHistory"));
     // マイコミュニティ掲示板新着記事
     $controller->forward("User", "NewBBS");
     $this->setAttribute("NewBBS", $request->getAttribute("NewBBS"));
     // マイフレンズ:フォルダ新着情報
     $controller->forward("User", "NewFriendsFolder");
     $this->setAttribute("NewFriendsFolder", $request->getAttribute("NewFriendsFolder"));
     // マイフレンズ:フォルダ新着情報
     $controller->forward("User", "NewCommunityFolder");
     $this->setAttribute("NewCommunityFolder", $request->getAttribute("NewCommunityFolder"));
     // CSS
     $this->setAttribute('include_css_array', $this->css_file_array);
     // レンダーモードを元に戻す
     $controller->setRenderMode($renderMode);
     $this->inlineFlg = false;
     /*----------------------------------------------*/
     // テンプレート
     $this->setScreenId("0001");
     $this->setTemplate('Index.tpl.php');
     return parent::execute();
 }
示例#20
0
echo $this->_tpl_vars['user_community_name_url'];
?>
"
  ><?php 
echo htmlspecialchars($this->_tpl_vars['user_community_name']);
?>
</a></td>
<?php 
// 回答締切日時
?>
 <th id="myttl" bgcolor="#DEEEBD" width="100"><?php 
echo ACSMsg::get_msg("Community", "AnswerSchedule.tpl.php", 'M009');
?>
</th>
 <td bgcolor="#ffffff" width="200"><?php 
echo htmlspecialchars(ACSLib::convert_pg_date_to_str($schedule->schedule_closing_datetime));
?>
</td>
</tr>
<?php 
// 詳細情報
?>
<tr>
 <th id="myttl" bgcolor="#DEEEBD" width="100"><?php 
echo ACSMsg::get_msg("Community", "AnswerSchedule.tpl.php", 'M010');
?>
</th>
 <td bgcolor="#ffffff" width="200"><?php 
echo htmlspecialchars($schedule->schedule_detail);
?>
</td>
 function execute()
 {
     $context = $this->getContext();
     $controller = $context->getController();
     $request = $context->getRequest();
     $user = $context->getUser();
     $acs_user_info_row = $user->getAttribute('acs_user_info_row');
     // get
     $target_user_info_row = $request->getAttribute('target_user_info_row');
     $diary_row = $request->getAttribute('diary_row');
     $diary_comment_row_array = $request->getAttribute('diary_comment_row_array');
     $footprint_info = $request->getAttribute('footprint_info');
     // 信頼済みコミュニティ(マイフレンズグループ)が定義されているか
     if ($diary_row['open_level_name'] == ACSMsg::get_mst('open_level_master', 'D05')) {
         if (count($diary_row['trusted_community_row_array']) && $diary_row['trusted_community_row_array'][0]['community_type_name'] == ACSMsg::get_mst('community_type_master', 'D20')) {
             $diary_row['trusted_community_flag'] = 0;
         } else {
             $diary_row['trusted_community_flag'] = 1;
         }
     }
     // 加工
     // トップページURL
     $link_page_url['top_page_url'] = $this->getControllerPath(DEFAULT_MODULE, 'Diary') . '&id=' . $diary_row['user_community_id'];
     //他人の日記を閲覧している場合のトップページURL
     $link_page_url['else_user_diary_url'] = $this->getControllerPath(DEFAULT_MODULE, 'Index') . '&id=' . $target_user_info_row['community_id'];
     // トップページURL
     $diary_row['top_page_url'] = $link_page_url['top_page_url'];
     //他人の日記を閲覧している場合のダイアリートップページURL
     $diary_row['else_user_diary_url'] = $this->getControllerPath(DEFAULT_MODULE, 'Diary') . '&id=' . $target_user_info_row['community_id'];
     // 画像URL
     $diary_row['image_url'] = ACSUser::get_image_url($diary_row['community_id'], 'thumb');
     // 投稿日時
     $diary_row['post_date'] = ACSLib::convert_pg_date_to_str($diary_row['post_date']);
     //ファイルの画像URL
     $diary_row[$index]['file_url'] = "";
     if ($diary_row['file_id'] != "") {
         $diary_row['file_url'] = ACSDiaryFile::get_image_url($diary_row['file_id'], 'thumb');
         //投稿内表示用
         $diary_row['file_url_alink'] = ACSDiaryFile::get_image_url($diary_row['file_id'], '');
         //ポップアップ用
     }
     //コメント
     foreach ($diary_comment_row_array as $comment_index => $diary_comment_row) {
         // トップページURL
         $diary_comment_row_array[$comment_index]['top_page_url'] = $this->getControllerPath(DEFAULT_MODULE, DEFAULT_ACTION) . '&id=' . $diary_comment_row['user_community_id'];
         // 画像URL
         $diary_comment_row_array[$comment_index]['image_url'] = ACSUser::get_image_url($diary_comment_row['community_id'], 'thumb');
         // 投稿日時
         $diary_comment_row_array[$comment_index]['post_date'] = ACSLib::convert_pg_date_to_str($diary_comment_row['post_date']);
         // 削除画面URL
         $diary_comment_row_array[$comment_index]['diary_delete_url'] = $this->getControllerPath('User', 'DeleteDiaryComment') . '&id=' . $target_user_info_row['user_community_id'] . '&diary_id=' . $diary_row['diary_id'] . '&diary_comment_id=' . $diary_comment_row['diary_comment_id'];
         $diary_comment_row_array[$comment_index]['self_id'] = false;
         //自分が投稿したcommentかを判定する
         if ($diary_comment_row['user_community_id'] == $acs_user_info_row['user_community_id']) {
             $diary_comment_row_array[$comment_index]['self_id'] = true;
         }
     }
     // 本人のページかどうか
     if ($target_user_info_row['user_community_id'] == $acs_user_info_row['user_community_id']) {
         $is_self_page = 1;
     } else {
         $is_self_page = 0;
     }
     // 足跡登録URL(自画面) //
     $footprint_url = "";
     if ($is_self_page == 0 && $acs_user_info_row['is_login_user']) {
         $footprint_url = $this->getControllerPath('User', 'FootprintDiaryComment') . '&diary_id=' . $diary_row['diary_id'];
     }
     // 確認画面の表示用
     $action_url = $this->getControllerPath('User', 'DiaryCommentPre') . '&id=' . $target_user_info_row['community_id'] . '&diary_id=' . $diary_row['diary_id'] . '&move_id=1';
     // ページング設定
     $display_count = ACSSystemConfig::get_keyword_value(ACSMsg::get_mst('system_config_group', 'D02'), 'NEW_INFO_LIST_DISPLAY_MAX_COUNT');
     $paging_info = $this->getPagingInfo($controller, $request, $diary_comment_row_array, $display_count);
     // set
     $this->setAttribute('acs_user_info_row', $acs_user_info_row);
     $this->setAttribute('target_user_info_row', $target_user_info_row);
     $this->setAttribute('diary_row', $diary_row);
     $this->setAttribute('diary_comment_row_array', $diary_comment_row_array);
     $this->setAttribute('paging_info', $paging_info);
     $this->setAttribute('is_self_page', $is_self_page);
     $this->setAttribute('action_url', $action_url);
     $this->setAttribute('link_page_url', $link_page_url);
     $this->setAttribute('footprint_url', $footprint_url);
     $this->setAttribute('footprint_info', $footprint_info);
     //$this->setAttribute('footprint_community_id', $footprint_community_id);
     // テンプレート
     $this->setScreenId("0001");
     $this->setTemplate('DiaryComment.tpl.php');
     // 確認画面からキャンセルボタンで戻ってきたときのみの処理
     if ($request->getParameter('move_id') == 3) {
         // 元のフォーム情報を取得する
         $form = $user->getAttribute('new_form_obj');
         //件名:subject 内容:body
         // 対象となるダイアリーIDを取得する
         $diary_id = $request->ACSgetParameter('diary_id');
         $this->setAttribute('form', $form);
         $this->setAttribute('move_id', $request->getParameter('move_id'));
     }
     return parent::execute();
 }
 function execute()
 {
     $context = $this->getContext();
     $controller = $context->getController();
     $request = $context->getRequest();
     $user = $context->getUser();
     $acs_user_info_row = $user->getAttribute('acs_user_info_row');
     // get
     $target_community_row = $request->getAttribute('target_community_row');
     $file_obj = $request->getAttribute('file_obj');
     $community_folder_obj = $request->getAttribute('community_folder_obj');
     $file_detail_info_row = $request->getAttribute('file_detail_info_row');
     $file_history_row_array = $request->getAttribute('file_history_row_array');
     $target_folder_obj = $community_folder_obj->get_folder_obj();
     $target_community_id = $target_community_row['community_id'];
     $is_community_admin = $request->getAttribute('is_community_admin');
     $file_public_access_row = $request->getAttribute('file_public_access_row');
     // URL付加情報(表示するユーザ情報)
     $target_community_info = '&community_id=' . $target_community_id;
     $target_folder_info = '&folder_id=' . $community_folder_obj->folder_obj->get_folder_id();
     // コミュニティメンバかどうか
     $is_community_member = ACSCommunity::is_community_member($acs_user_info_row['user_community_id'], $target_community_row['community_id']);
     // ルートフォルダかどうか
     $is_root_folder = $target_folder_obj->get_is_root_folder();
     // プットフォルダかどうか
     $is_put_folder = $target_folder_obj->is_put_folder($target_community_row['community_id']);
     // プットファイルかどうか
     if ($file_obj->get_owner_community_id() != $target_community_id) {
         $is_put_file = true;
     } else {
         $is_put_file = false;
     }
     // コミュニティ情報 //
     $target_community_row['top_page_url'] = $this->getControllerPath('Community', DEFAULT_ACTION) . $target_community_info;
     // ファイル情報 //
     $file_info_row = array();
     $file_info_row['file_id'] = $file_obj->get_file_id();
     $file_info_row['display_file_name'] = $file_obj->get_display_file_name();
     $file_info_row['mime_type'] = $file_obj->get_mime_type();
     $file_info_row['file_size_kb'] = $file_obj->get_file_size_kb();
     $file_info_row['file_size'] = $file_obj->get_file_size();
     $file_info_row['entry_user_community_name'] = $file_obj->get_entry_user_community_name();
     $file_info_row['entry_date'] = $file_obj->get_entry_date_yyyymmddhmi();
     $file_info_row['update_date'] = $file_obj->get_update_date_yyyymmddhmi();
     $file_info_row['update_user_community_name'] = $file_obj->get_update_user_community_name();
     $file_info_row['link_url'] = $this->getControllerPath('Community', 'DownloadFile') . $target_community_info . "&file_id=" . $file_obj->get_file_id() . $target_folder_info;
     // 登録者
     $file_info_row['entry_user_community_name'] = $file_obj->get_entry_user_community_name();
     $file_info_row['entry_user_community_link_url'] = $this->getControllerPath('User', DEFAULT_ACTION);
     $file_info_row['entry_user_community_link_url'] .= '&id=' . $file_obj->get_entry_user_community_id();
     $file_info_row['entry_date'] = $file_obj->get_entry_date_yyyymmddhmi();
     // 更新者
     $file_info_row['update_user_community_name'] = $file_obj->get_update_user_community_name();
     $file_info_row['update_user_community_link_url'] = $this->getControllerPath('User', DEFAULT_ACTION);
     $file_info_row['update_user_community_link_url'] .= '&id=' . $file_obj->get_update_user_community_id();
     $file_info_row['update_date'] = $file_obj->get_update_date_yyyymmddhmi();
     // フォルダパス情報
     $path_folder_obj_array = $community_folder_obj->get_path_folder_obj_array();
     $path_folder_row_array = array();
     foreach ($path_folder_obj_array as $path_folder_obj) {
         $path_folder_row = array();
         // フォルダ名
         if ($path_folder_obj->get_is_root_folder()) {
             $folder_name = $target_community_row['community_name'];
             //$folder_name .= "のフォルダ";
             $folder_name = ACSMsg::get_tag_replace(ACSMsg::get_msg('Community', 'FileDetailSuccessView.class.php', 'FOLDER_NM'), array("{COMMUNITY_NAME}" => $target_community_row['community_name']));
         } else {
             $folder_name = $path_folder_obj->get_folder_name();
         }
         // フォルダURL
         $link_url = $this->getControllerPath('Community', 'Folder');
         $link_url .= $target_community_info;
         $link_url .= "&folder_id=" . $path_folder_obj->get_folder_id();
         // set
         $path_folder_row['folder_name'] = $folder_name;
         $path_folder_row['link_url'] = $link_url;
         array_push($path_folder_row_array, $path_folder_row);
     }
     // フォルダ詳細情報 //
     $detail_folder_obj = $community_folder_obj->get_folder_obj();
     $detail_folder_row = array();
     $detail_folder_row['folder_name'] = $detail_folder_obj->get_folder_name();
     $detail_folder_row['comment'] = $detail_folder_obj->get_comment();
     $detail_folder_row['open_level_name'] = $detail_folder_obj->get_open_level_name();
     // 閲覧許可コミュニティ名作成
     $detail_folder_row['trusted_community_row_array'] = array();
     $trusted_community_row_array = $detail_folder_obj->get_trusted_community_row_array();
     if ($is_community_member) {
         foreach ($trusted_community_row_array as $trusted_community_row) {
             $_trusted_community_row = array();
             $_trusted_community_row['community_name'] = $trusted_community_row['community_name'];
             $_trusted_community_row['community_top_page_url'] = $this->getControllerPath('Community', DEFAULT_ACTION) . '&community_id=' . $trusted_community_row['community_id'];
             array_push($detail_folder_row['trusted_community_row_array'], $_trusted_community_row);
         }
     }
     // ルートフォルダのファイルの場合は非公開
     if ($is_root_folder) {
         $detail_folder_row['open_level_name'] = ACSMsg::get_mst('open_level_master', 'D04');
         $detail_folder_row['trusted_community_row_array'] = array();
     }
     // link url
     $detail_folder_row['link_url'] = $this->getControllerPath('Community', 'Folder') . $target_community_info . "&folder_id=" . $detail_folder_obj->get_folder_id();
     // ファイル履歴情報 //
     foreach ($file_history_row_array as $index => $file_history_row) {
         $file_history_row_array[$index]['update_date'] = ACSLib::convert_pg_date_to_str($file_history_row['update_date'], 1, 1);
         $file_history_row_array[$index]['link_url'] = $this->getControllerPath(DEFAULT_MODULE, DEFAULT_ACTION) . '&id=' . $file_history_row['community_id'];
         $file_history_row_array[$index]['download_history_file_url'] = $this->getControllerPath('Community', 'DownloadHistoryFile') . $target_community_info . "&folder_id=" . $detail_folder_obj->get_folder_id() . '&file_id=' . $file_history_row['file_id'] . '&file_history_id=' . $file_history_row['file_history_id'];
         if ($index != 0 && !$is_put_file) {
             $file_history_row_array[$index]['restore_history_file_url'] = $this->getControllerPath('Community', 'RestoreHistoryFile') . $target_community_info . "&folder_id=" . $detail_folder_obj->get_folder_id() . '&file_id=' . $file_history_row['file_id'] . '&file_history_id=' . $file_history_row['file_history_id'];
         }
         foreach ($file_history_row['file_history_comment_row_array'] as $index2 => $file_history_comment_row) {
             $file_history_row_array[$index]['file_history_comment_row_array'][$index2]['post_date'] = ACSLib::convert_pg_date_to_str($file_history_comment_row['post_date'], false, true, true);
             $file_history_row_array[$index]['file_history_comment_row_array'][$index2]['link_url'] = $this->getControllerPath(DEFAULT_MODULE, DEFAULT_ACTION) . '&id=' . $file_history_comment_row['community_id'];
         }
     }
     // ファイル履歴コメントURL
     $file_history_comment_url = $this->getControllerPath('Community', 'FileHistoryComment') . $target_community_info . $target_folder_info . '&file_id=' . $file_info_row['file_id'] . '&file_history_id=' . $file_history_row_array[0]['file_history_id'];
     // メニュー // プットフォルダのファイルまたはプットファイルは表示しない
     if ($is_community_member && (!$is_put_folder && $file_obj->get_owner_community_id() == $target_community_id)) {
         // ファイル更新URL
         $menu['update_file_url'] = $this->getControllerPath('Community', 'UpdateFile') . $target_community_info . $target_folder_info . '&file_id=' . $file_info_row['file_id'];
         // 名前変更URL
         $menu['rename_folder_list_url'] = $this->getControllerPath('Community', 'RenameFolderList') . $target_community_info . $target_folder_info . '&selected_file[]=' . $file_info_row['file_id'];
         // 移動URL
         $menu['move_folder_list_url'] = $this->getControllerPath('Community', 'MoveFolderList') . $target_community_info . $target_folder_info . '&selected_file[]=' . $file_info_row['file_id'];
         // 削除URL
         $menu['delete_folder_url'] = $this->getControllerPath('Community', 'DeleteFolder') . $target_community_info . $target_folder_info . '&action_type=confirm' . '&selected_file[]=' . $file_info_row['file_id'];
         // 詳細情報編集URL
         $menu['edit_file_detail_url'] = $this->getControllerPath('Community', 'EditFileDetail') . $target_community_info . $target_folder_info . '&file_id=' . $file_info_row['file_id'];
     }
     if (!$is_put_file) {
         // ファイル公開情報
         if ($file_public_access_row['file_id'] != "") {
             $file_public_access_row['access_start_date_disp'] = ACSLib::convert_pg_date_to_str($file_public_access_row['access_start_date'], 0, 0, 0);
             // ファイルアクセスURL設定
             $file_public_access_row['access_url'] = ACSSystemConfig::get_keyword_value(ACSMsg::get_mst('system_config_group', 'D01'), 'SYSTEM_BASE_URL') . $this->getControllerPath('Public', 'DownloadFile') . "&key=" . $file_public_access_row['access_code'];
         }
         // ファイル公開設定URL
         $file_public_access_row['submit_url'] = $this->getControllerPath('Community', 'PublicAccessFileDetail') . $target_community_info . "&file_id=" . $file_obj->get_file_id() . $target_folder_info;
     }
     // 戻り先URL(フォルダ一覧)//
     $back_url = "";
     $back_url = $this->getControllerPath('Community', 'Folder');
     $back_url .= $target_community_info;
     $back_url .= $target_folder_info;
     // ページング設定
     $display_count = ACSSystemConfig::get_keyword_value(ACSMsg::get_mst('system_config_group', 'D02'), 'NEW_INFO_LIST_DISPLAY_MAX_COUNT');
     $paging_info = $this->getPagingInfo($controller, $request, $file_history_row_array, $display_count);
     // set
     $this->setAttribute('acs_user_info_row', $acs_user_info_row);
     $this->setAttribute('target_community_row', $target_community_row);
     $this->setAttribute('is_community_member', $is_community_member);
     $this->setAttribute('is_root_folder', $is_root_folder);
     $this->setAttribute('is_put_folder', $is_put_folder);
     $this->setAttribute('is_put_file', $is_put_file);
     $this->setAttribute('path_folder_obj_row_array', $path_folder_obj_row_array);
     $this->setAttribute('file_info_row', $file_info_row);
     $this->setAttribute('path_folder_row_array', $path_folder_row_array);
     $this->setAttribute('detail_folder_row', $detail_folder_row);
     $this->setAttribute('file_detail_info_row', $file_detail_info_row);
     $this->setAttribute('file_history_row_array', $file_history_row_array);
     $this->setAttribute('paging_info', $paging_info);
     $this->setAttribute('menu', $menu);
     $this->setAttribute('back_url', $back_url);
     $this->setAttribute('file_history_comment_url', $file_history_comment_url);
     $this->setAttribute('is_community_admin', $is_community_admin);
     $this->setAttribute('file_public_access_row', $file_public_access_row);
     // エラーメッセージ
     $this->setAttribute('error_message', $this->getErrorMessage($controller, $request, $user));
     // テンプレート
     $this->setScreenId("0001");
     $this->setTemplate('FileDetail.tpl.php');
     return parent::execute();
 }
示例#23
0
 /**
  * スケジュール調整決定通知定型文取得
  *
  * @return true / false
  */
 function get_decision_mail_message($lang, $decide_adjustment_date_id)
 {
     $current_lang = ACSMsg::get_lang();
     ACSMsg::set_lang($lang);
     $msg = ACSMsg::get_serial_msg('lib', basename(__FILE__), 'DEC%03d');
     // システムURL
     $system_group = ACSMsg::get_mst('system_config_group', 'D01');
     $system_base_url = ACSSystemConfig::get_keyword_value($system_group, 'SYSTEM_BASE_URL');
     $system_base_login_url = ACSSystemConfig::get_keyword_value($system_group, 'SYSTEM_BASE_LOGIN_URL');
     // コミュニティ情報の取得
     $community_row =& ACSCommunity::get_community_row($this->community_id);
     // 決定日
     $adjustment_dates_list = $this->get_adjustment_dates();
     // 回答状況
     $person_count_array =& ACSSchedule::get_total_person_count($this->community_id, $this->schedule_id);
     $person_count = $person_count_array[$this->schedule_id];
     // 対象が全員の場合は参加人数をメンバ数に修正
     if ($this->is_target_all()) {
         $person_count['participate_person_count'] = ACSCommunity::get_community_member_count($this->community_id);
     }
     // スケジュールURL
     $schedule_url = $system_base_login_url . SCRIPT_PATH . "?" . MODULE_ACCESSOR . "=Community" . "&" . ACTION_ACCESSOR . "=AnswerSchedule" . "&community_id=" . $this->community_id . "&schedule_id=" . $this->schedule_id;
     $user_community_row =& ACSUser::get_user_profile_row($this->user_community_id);
     $msg = ACSMsg::get_tag_replace($msg, array('{SYSTEM_BASE_URL}' => $system_base_url, '{COMMUNITY_ID}' => $this->community_id, '{COMMUNITY_NAME}' => $community_row['community_name'], '{USER_NAME}' => $user_community_row['user_name'], '{USER_COMMUNITY_NAME}' => $user_community_row['community_name'], '{SCHEDULE_NAME}' => $this->schedule_name, '{SCHEDULE_DETAIL}' => $this->schedule_detail, '{SCHEDULE_CLOSING_DATETIME}' => ACSLib::convert_pg_date_to_str($this->schedule_closing_datetime), '{SCHEDULE_ANSWER_COUNT}' => $person_count['answer_person_count'], '{SCHEDULE_PARTICIPATE_COUNT}' => $person_count['participate_person_count'], '{SCHEDULE_DECISION_DATE}' => $adjustment_dates_list[$decide_adjustment_date_id]['date_string'], '{ANSWER_SCHEDULE_URL}' => $schedule_url));
     ACSMsg::set_lang($current_lang);
     return $msg;
 }
 function execute()
 {
     $context = $this->getContext();
     $controller = $context->getController();
     $request = $context->getRequest();
     $user = $context->getUser();
     // RSS対象のアドレス開始値
     $system_top_address = ACSSystemConfig::get_keyword_value(ACSMsg::get_mst('system_config_group', 'D01'), 'SYSTEM_BASE_URL');
     $rss_syndicationURL = $system_top_address;
     $rss_syndicationURL .= $this->getControllerPath('Community', 'PressReleaseRSS');
     $rss_syndicationURL .= '&community_id=' . $request->getParameter('community_id');
     // コミュニティ情報
     $community_id = $request->getParameter('community_id');
     $community_row = ACSCommunity::get_community_row($community_id);
     $community_row['community_profile'] = ACSCommunity::get_contents_row($community_id, ACSMsg::get_mst('contents_type_master', 'D07'));
     //コミュニティトップページ
     $community_top_page_url = $this->getControllerPath('Community', 'Index') . '&community_id=' . $community_id;
     $community_row['community_profile']['top_page_url'] = $community_top_page_url;
     //コミュニティ写真表示
     if ($community_row['file_id']) {
         $community_file_info_row = ACSFileInfoModel::select_file_info_row($community_row['file_id']);
         $community_row['image_title'] = $community_file_info_row['display_file_name'];
     } else {
         $community_row['image_title'] = ACSMsg::get_msg('Community', 'PressReleaseRSSAction.class.php', 'M001');
     }
     $community_row['image_url'] = ACSCommunity::get_image_url($community_id, 'rss');
     // BBS記事一覧 一つだけ出力するものを選択できる
     $bbs_row_array = ACSBBS::get_bbs_rss_row_array($community_id, 1);
     if (count($bbs_row_array) > 0) {
         // 掲載終了日が本日を越えていないもののみにする
         // 本日を取得
         $today = date("Y/m/d");
         $bbs_rss_array = array();
         foreach ($bbs_row_array as $index => $bbs_row) {
             //対象となる記事のみを抽出
             $bbs_date = ACSLib::convert_pg_date_to_str($bbs_row['expire_date'], false, false, false);
             if ($bbs_date >= $today || $bbs_date == null) {
                 //記事配列を作り変え
                 $bbs_rss_array[$index] = $bbs_row;
                 //記事のリンク先を作る
                 $bbs_rss_array[$index]['bbs_url'] = $this->getControllerPath('Community', 'BBSRes') . '&community_id=' . $community_row['community_id'] . '&bbs_id=' . $bbs_row['bbs_id'];
                 //画像のリンク先を作る
                 $bbs_rss_array[$index]['file_link'] = "";
                 if ($bbs_row['file_id'] != "") {
                     $bbs_rss_array[$index]['file_url'] = $system_top_address . ACSBBSFile::get_image_url($bbs_row['bbs_id'], 'rss');
                     //RSS表示用
                 }
             }
         }
         $detail = true;
         //存在する
     } else {
         $detail = false;
         //存在しない
     }
     // RSS対象のBBS記事一覧
     $user->setAttribute('bbs_rss_array', $bbs_rss_array);
     // RSS対象のCommunity情報
     $user->setAttribute('community_row', $community_row);
     $community_name = htmlspecialchars($community_row['community_name']);
     // set
     $request->setAttribute('rss_syndicationURL', $rss_syndicationURL);
     $request->setAttribute('bbs_rss_array', $bbs_rss_array);
     $request->setAttribute('community_row', $community_row);
     $request->setAttribute('community_name', $community_name);
     $request->setAttribute('system_top_address', $system_top_address);
     //記事の存在フラグ
     $request->setAttribute('detail', $detail);
     require "PressReleaseRSS.php";
 }
示例#25
0
 function execute()
 {
     $context =& $this->getContext();
     $user = $context->getUser();
     $request = $context->getRequest();
     $controller = $context->getController();
     $acs_user_info_row = $user->getAttribute('acs_user_info_row');
     // get
     $target_user_info_row = $request->getAttribute('target_user_info_row');
     $diary_row_array = $request->getAttribute('diary_row_array');
     $diary_comment_row_array = $request->getAttribute('diary_comment_row_array');
     $open_level_master_row_array = $request->getAttribute('open_level_master_row_array');
     $friends_group_row_array = $request->getAttribute('friends_group_row_array');
     $last_open_level_code = $request->getAttribute('last_open_level_code');
     // トップページURL
     $link_page_url['top_page_url'] = $this->getControllerPath(DEFAULT_MODULE, 'Diary') . '&id=' . $acs_user_info_row['user_community_id'];
     // 他人の日記を閲覧している場合のトップページURL
     $link_page_url['else_user_diary_url'] = $this->getControllerPath(DEFAULT_MODULE, 'Index') . '&id=' . $target_user_info_row['community_id'];
     // 検索画面URL
     $link_page_url['search_diary_url'] = $this->getControllerPath(DEFAULT_MODULE, 'SearchDiary') . '&id=' . $target_user_info_row['community_id'];
     // ダイアリーRSS URL
     $term = ACSSystemConfig::get_keyword_value(ACSMsg::get_mst('system_config_group', 'D02'), 'DIARY_RSS_TERM');
     $link_page_url['diary_rss_url'] = $this->getControllerPath(DEFAULT_MODULE, 'DiaryRSS') . '&id=' . $target_user_info_row['community_id'] . "&term={$term}";
     // 加工
     foreach ($diary_row_array as $index => $diary_row) {
         // 画像URL
         $diary_row_array[$index]['image_url'] = ACSUser::get_image_url($diary_row['community_id'], 'thumb');
         // 投稿日時
         $diary_row_array[$index]['post_date'] = ACSLib::convert_pg_date_to_str($diary_row['post_date']);
         // 投稿日時 (省略系: M/D)
         $diary_row_array[$index]['short_post_date'] = gmdate("n/j", strtotime($diary_row['post_date']) + 9 * 60 * 60);
         // コメントページURL
         $diary_row_array[$index]['diary_comment_url'] = $this->getControllerPath(DEFAULT_MODULE, 'DiaryComment') . '&id=' . $target_user_info_row['community_id'] . '&diary_id=' . $diary_row['diary_id'];
         // 信頼済みコミュニティ(マイフレンズグループ)が定義されているか
         if ($diary_row['open_level_name'] == ACSMsg::get_mst('open_level_master', 'D05')) {
             if (count($diary_row['trusted_community_row_array']) && $diary_row['trusted_community_row_array'][0]['community_type_name'] == ACSMsg::get_mst('community_type_master', 'D20')) {
                 $diary_row_array[$index]['trusted_community_flag'] = 0;
             } else {
                 $diary_row_array[$index]['trusted_community_flag'] = 1;
             }
         }
         // 削除画面URL
         $diary_row_array[$index]['diary_delete_url'] = $this->getControllerPath(DEFAULT_MODULE, 'DeleteDiary') . '&id=' . $target_user_info_row['user_community_id'] . '&diary_id=' . $diary_row['diary_id'];
         // ファイルの画像URL
         $diary_row_array[$index]['file_url'] = "";
         if ($diary_row['file_id'] != "") {
             $diary_row_array[$index]['file_url'] = ACSDiaryFile::get_image_url($diary_row['file_id'], 'thumb');
             //投稿内表示用
             $diary_row_array[$index]['file_url_alink'] = ACSDiaryFile::get_image_url($diary_row['file_id'], '');
             //ポップアップ用
         }
     }
     // 本人のページかどうか
     if ($target_user_info_row['user_community_id'] == $acs_user_info_row['user_community_id']) {
         $is_self_page = 1;
     } else {
         $is_self_page = 0;
     }
     // 書き込みボタンで確認画面を表示
     $action_url = $this->getControllerPath(DEFAULT_MODULE, 'DiaryPre') . '&id=' . $target_user_info_row['user_community_id'] . "&move_id=1";
     //---- アクセス制御 ----//
     $role_array = ACSAccessControl::get_user_community_role_array($acs_user_info_row, $target_user_info_row);
     $diary_row_array = ACSAccessControl::get_valid_row_array_for_user_community($acs_user_info_row, $role_array, $diary_row_array);
     //----------------------//
     // ページング設定
     $display_count = ACSSystemConfig::get_keyword_value(ACSMsg::get_mst('system_config_group', 'D02'), 'NEW_INFO_LIST_DISPLAY_MAX_COUNT');
     $paging_info = $this->getPagingInfo($controller, $request, $diary_row_array, $display_count);
     // set
     $this->setAttribute('target_user_info_row', $target_user_info_row);
     $this->setAttribute('diary_row_array', $diary_row_array);
     $this->setAttribute('paging_info', $paging_info);
     $this->setAttribute('is_self_page', $is_self_page);
     $this->setAttribute('action_url', $action_url);
     $this->setAttribute('link_page_url', $link_page_url);
     $this->setAttribute('open_level_master_row_array', $open_level_master_row_array);
     $this->setAttribute('friends_group_row_array', $friends_group_row_array);
     $this->setAttribute('last_open_level_code', $last_open_level_code);
     // インライン表示(カレンダー) 初期値は当月
     //		$this->setAttribute('new_calendar_action_chain', $request->getAttribute('new_calendar_action_chain_html'));
     /*----------------------------------------------*/
     // 初期表示時
     // 現在のレンダーモードを取得
     $renderMode = $controller->getRenderMode();
     //レンダーモードを上書き (画面出力をオフにしてる)
     $controller->setRenderMode(View::RENDER_VAR);
     $this->inlineFlg = true;
     // フォワード側で判断する
     $request->setAttribute("inline_mode", "1");
     // 新着コミュニティ
     $controller->forward("User", "DiaryCalendar");
     $this->setAttribute("DiaryCalendar", $request->getAttribute("DiaryCalendar"));
     // レンダーモードを元に戻す
     $controller->setRenderMode($renderMode);
     $this->inlineFlg = false;
     /*----------------------------------------------*/
     // テンプレート
     $this->setScreenId("0001");
     $this->setTemplate('Diary.tpl.php');
     // 確認画面からキャンセルボタンで戻ってきたときのみの処理
     if ($request->getParameter('move_id') == 3) {
         //ユーザ入力情報
         $form = $user->getAttribute('new_form_obj');
         $this->setAttribute('form', $form);
         $this->setAttribute('move_id', $request->getParameter('move_id'));
     }
     return parent::execute();
 }
 function execute()
 {
     $context = $this->getContext();
     $controller = $context->getController();
     $request = $context->getRequest();
     $user = $context->getUser();
     $acs_user_info_row = $user->getAttribute('acs_user_info_row');
     // get
     $community_row = $request->getAttribute('community_row');
     $bbs_row = $request->getAttribute('bbs_row');
     //ユーザ入力情報
     $form = $user->getAttribute('new_form_obj');
     // コミュニティメンバかどうか
     $is_community_member = ACSCommunity::is_community_member($acs_user_info_row['user_community_id'], $community_row['community_id']);
     //コミュニティ管理者かどうか
     $is_community_admin = ACSCommunity::is_community_admin($acs_user_info_row['user_community_id'], $community_row['community_id']);
     // 加工
     if ($bbs_row['bbs_res_delete_flag'] != 't') {
         // 親記事の投稿者 トップページURL
         $bbs_row['top_page_url'] = $this->getControllerPath(DEFAULT_MODULE, DEFAULT_ACTION) . '&id=' . $bbs_row['user_community_id'];
         // 写真URL
         $bbs_row['image_url'] = ACSUser::get_image_url($bbs_row['user_community_id'], 'thumb');
         // 投稿日時
         $bbs_row['post_date'] = ACSLib::convert_pg_date_to_str($bbs_row['post_date']);
         //ファイルの画像URL
         $bbs_row['file_url'] = "";
         if ($bbs_row['file_id'] != "") {
             $bbs_row['file_url'] = ACSBBSFile::get_image_url($bbs_row['bbs_id'], 'thumb');
             //投稿内表示用
             $bbs_row['file_url_alink'] = ACSBBSFile::get_image_url($bbs_row['bbs_id'], '');
             //ポップアップ用
         }
         // パブリックリリース 掲載終了日
         if ($bbs_row['expire_date'] != "") {
             $bbs_row['expire_date'] = ACSLib::convert_pg_date_to_str($bbs_row['expire_date'], true, false, false);
         }
         // 外部RSS情報
         $external_rss_row = ACSExternalRSS::get_external_rss_row($bbs_row['bbs_id']);
         if ($external_rss_row) {
             if ($external_rss_row['rss_item_date'] != '') {
                 // YYYY/MM/DD H:MM
                 $external_rss_row['rss_item_date'] = ACSLib::convert_pg_date_to_str($external_rss_row['rss_item_date'], 0, 1, 0);
             }
             $bbs_row['external_rss_row'] = $external_rss_row;
         }
         // 返信記事
         foreach ($bbs_row['bbs_res_row_array'] as $res_index => $bbs_res_row) {
             // 返信記事の投稿者 トップページURL
             $bbs_row['bbs_res_row_array'][$res_index]['top_page_url'] = $this->getControllerPath(DEFAULT_MODULE, DEFAULT_ACTION) . '&id=' . $bbs_res_row['user_community_id'];
             // 写真URL
             $bbs_row['bbs_res_row_array'][$res_index]['image_url'] = ACSUser::get_image_url($bbs_res_row['user_community_id'], 'thumb');
             // 投稿日時
             $bbs_row['bbs_res_row_array'][$res_index]['post_date'] = ACSLib::convert_pg_date_to_str($bbs_res_row['post_date']);
             // 返信の削除URL
             $bbs_row['bbs_res_row_array'][$res_index]['delete_bbs_res_url'] = $this->getControllerPath('Community', 'DeleteBBSRes') . '&community_id=' . $community_row['community_id'] . '&bbs_res_id=' . $bbs_row['bbs_res_row_array'][$res_index]['bbs_res_id'] . '&bbs_id=' . $bbs_row['bbs_id'];
             // 編集URL
             if (!ACSLib::get_boolean($bbs_res_row['bbs_res_delete_flag']) && ($bbs_res_row['user_community_id'] == $acs_user_info_row['user_community_id'] || $is_community_admin)) {
                 $bbs_row['bbs_res_row_array'][$res_index]['edit_bbs_res_url'] = $this->getControllerPath('Community', 'EditBBSRes') . '&community_id=' . $community_row['community_id'] . '&bbs_id=' . $bbs_res_row['bbs_id'] . '&bbs_res_id=' . $bbs_res_row['bbs_res_id'];
             }
             //削除権限フラグ (自分が投稿したもの 又は コミュニティ管理者)
             if ($bbs_res_row['user_community_id'] == $acs_user_info_row['user_community_id'] || $is_community_admin == 1) {
                 $bbs_row['bbs_res_row_array'][$res_index]['bbs_set_delete_flag'] = true;
             } else {
                 $bbs_row['bbs_res_row_array'][$res_index]['bbs_set_delete_flag'] = false;
             }
         }
     }
     // form action 確認画面への遷移
     $action_url = $this->getControllerPath('Community', 'BBSResPre') . '&community_id=' . $community_row['community_id'] . '&bbs_id=' . $bbs_row['bbs_id'] . '&move_id=1';
     // コミュニティトップページのURL
     $community_top_page_url = $this->getControllerPath('Community', DEFAULT_ACTION) . '&community_id=' . $community_row['community_id'];
     // BBS URL
     $bbs_top_page_url = $this->getControllerPath('Community', 'BBS') . '&community_id=' . $community_row['community_id'];
     // set
     $this->setAttribute('is_community_member', $is_community_member);
     $this->setAttribute('community_row', $request->getAttribute('community_row'));
     $this->setAttribute('bbs_row', $bbs_row);
     $this->setAttribute('action_url', $action_url);
     $this->setAttribute('community_top_page_url', $community_top_page_url);
     $this->setAttribute('bbs_top_page_url', $bbs_top_page_url);
     // テンプレート
     $this->setScreenId("0001");
     $this->setTemplate('BBSRes.tpl.php');
     if ($request->getParameter('move_id') == 3) {
         //ユーザ入力情報
         $form = $user->getAttribute('new_form_obj');
         $this->setAttribute('form', $form);
         $this->setAttribute('move_id', $request->getParameter('move_id'));
     }
     return parent::execute();
 }
示例#27
0
 function execute()
 {
     $context = $this->getContext();
     $controller = $context->getController();
     $request = $context->getRequest();
     $user = $context->getUser();
     $acs_user_info_row = $user->getAttribute('acs_user_info_row');
     // get
     $community_row = $request->getAttribute('community_row');
     $bbs_row_array = $request->getAttribute('bbs_row_array');
     // コミュニティメンバかどうか
     $is_community_member = ACSCommunity::is_community_member($acs_user_info_row['user_community_id'], $community_row['community_id']);
     //コミュニティ管理者かどうか
     $is_community_admin = ACSCommunity::is_community_admin($acs_user_info_row['user_community_id'], $community_row['community_id']);
     // form action 確認画面への遷移
     $action_url = $this->getControllerPath('Community', 'BBSPre') . '&community_id=' . $community_row['community_id'] . '&move_id=1';
     // コミュニティトップページのURL
     $community_top_page_url = $this->getControllerPath('Community', DEFAULT_ACTION) . '&community_id=' . $community_row['community_id'];
     // BBSスレッド一覧URL
     $bbs_thread_list_url = $this->getControllerPath('Community', 'BBSThreadList') . '&community_id=' . $community_row['community_id'];
     // 信頼済みコミュニティ選択ページのURL
     $select_trusted_community_url = $this->getControllerPath('Community', 'SelectTrustedCommunity') . '&form_name=bbs_form';
     //検索画面url
     $search_bbs_url = $this->getControllerPath('Community', 'SearchBBS') . '&community_id=' . $community_row['community_id'] . '&move_id=1';
     //外部RSS取り込み実行
     if ($community_row['contents_row_array']['external_rss_url']['contents_value'] != '') {
         $get_external_rss_url = $this->getControllerPath('Community', 'GetExternalRSS') . '&community_id=' . $community_row['community_id'];
     }
     // 掲示板RSS URL
     $term = ACSSystemConfig::get_keyword_value(ACSMsg::get_mst('system_config_group', 'D03'), 'BBS_RSS_TERM');
     $bbs_rss_url = $this->getControllerPath('Community', 'BBSRSS') . '&community_id=' . $community_row['community_id'] . '&term=' . $term;
     // 加工
     foreach ($bbs_row_array as $index => $bbs_row) {
         // 親記事の投稿者 トップページURL
         $bbs_row_array[$index]['top_page_url'] = $this->getControllerPath(DEFAULT_MODULE, DEFAULT_ACTION) . '&id=' . $bbs_row['user_community_id'];
         // 写真URL
         $bbs_row_array[$index]['image_url'] = ACSUser::get_image_url($bbs_row['user_community_id'], 'thumb');
         // 投稿日時
         $bbs_row_array[$index]['post_date'] = ACSLib::convert_pg_date_to_str($bbs_row['post_date']);
         // 返信画面URL
         $bbs_row_array[$index]['bbs_res_url'] = $this->getControllerPath('Community', 'BBSRes') . '&community_id=' . $community_row['community_id'] . '&bbs_id=' . $bbs_row['bbs_id'];
         // 編集画面URL
         if ($bbs_row['user_community_id'] == $acs_user_info_row['user_community_id'] || $is_community_admin) {
             $bbs_row_array[$index]['edit_bbs_url'] = $this->getControllerPath('Community', 'EditBBS') . '&community_id=' . $community_row['community_id'] . '&bbs_id=' . $bbs_row['bbs_id'];
         }
         // 削除画面URL
         $bbs_row_array[$index]['bbs_delete_url'] = $this->getControllerPath('Community', 'DeleteBBS') . '&community_id=' . $community_row['community_id'] . '&bbs_id=' . $bbs_row['bbs_id'];
         //削除権限フラグ (自分が投稿したもの 又は コミュニティ管理者)
         if ($bbs_row['user_community_id'] == $acs_user_info_row['user_community_id'] || $is_community_admin == 1) {
             $bbs_row_array[$index]['bbs_set_delete_flag'] = true;
         } else {
             $bbs_row_array[$index]['bbs_set_delete_flag'] = false;
         }
         //ファイルの画像URL
         $bbs_row_array[$index]['file_url'] = "";
         if ($bbs_row['file_id'] != "") {
             $bbs_row_array[$index]['file_url'] = ACSBBSFile::get_image_url($bbs_row['bbs_id'], 'thumb');
             //投稿内表示用
             $bbs_row_array[$index]['file_url_alink'] = ACSBBSFile::get_image_url($bbs_row['bbs_id'], '');
             //ポップアップ用
         }
         // パブリックリリース 掲載終了日 2/21add @akitsu
         $bbs_row_array[$index]['expire_date'] = "";
         if ($bbs_row['expire_date'] != "") {
             $bbs_row_array[$index]['expire_date'] = ACSLib::convert_pg_date_to_str($bbs_row['expire_date'], true, false, false);
         }
         if ($bbs_row['bbs_delete_flag'] != 't') {
             // 返信記事
             $bbs_res_display_max = 10;
             $bbs_row_array[$index]['bbs_res_row_array_num'] = count($bbs_row_array[$index]['bbs_res_row_array']);
             if ($bbs_row_array[$index]['bbs_res_row_array_num'] > $bbs_res_display_max) {
                 // 最新の10件のみslice
                 $bbs_row_array[$index]['bbs_res_row_array'] = array_slice($bbs_row_array[$index]['bbs_res_row_array'], -1 * $bbs_res_display_max);
                 // 省略件数を算出
                 $bbs_row_array[$index]['omission_num'] = $bbs_row_array[$index]['bbs_res_row_array_num'] - $bbs_res_display_max;
             }
             foreach ($bbs_row_array[$index]['bbs_res_row_array'] as $res_index => $bbs_res_row) {
                 // 返信記事の投稿者 トップページURL
                 $bbs_row_array[$index]['bbs_res_row_array'][$res_index]['top_page_url'] = $this->getControllerPath(DEFAULT_MODULE, DEFAULT_ACTION) . '&id=' . $bbs_res_row['user_community_id'];
                 // 写真URL
                 $bbs_row_array[$index]['bbs_res_row_array'][$res_index]['image_url'] = ACSUser::get_image_url($bbs_res_row['user_community_id'], 'thumb');
                 // 投稿日時
                 $bbs_row_array[$index]['bbs_res_row_array'][$res_index]['post_date'] = ACSLib::convert_pg_date_to_str($bbs_res_row['post_date']);
                 //削除情報
                 $bbs_row_array[$index]['bbs_res_row_array'][$res_index]['delete_flag'] = ACSLib::get_boolean($bbs_res_row['res_delete_flag']);
             }
         }
     }
     // 親コミュニティ / サブコミュニティの情報を取得する
     $parent_community_row_array = ACSCommunity::get_parent_community_row_array($community_row['community_id']);
     foreach ($parent_community_row_array as $index => $parent_community_row) {
         $parent_community_row_array[$index]['top_page_url'] = $this->getControllerPath('Community', DEFAULT_ACTION) . '&community_id=' . $parent_community_row['community_id'];
     }
     $sub_community_row_array = ACSCommunity::get_sub_community_row_array($community_row['community_id']);
     foreach ($sub_community_row_array as $index => $sub_community_row) {
         $sub_community_row_array[$index]['top_page_url'] = $this->getControllerPath('Community', DEFAULT_ACTION) . '&community_id=' . $sub_community_row['community_id'];
     }
     //---- アクセス制御 ----//
     $role_array = ACSAccessControl::get_community_role_array($acs_user_info_row, $community_row);
     $bbs_row_array = ACSAccessControl::get_valid_row_array_for_community($acs_user_info_row, $role_array, $bbs_row_array);
     //----------------------//
     // 外部RSS情報
     foreach ($bbs_row_array as $index => $bbs_row) {
         $external_rss_row = ACSExternalRSS::get_external_rss_row($bbs_row['bbs_id']);
         if ($external_rss_row) {
             if ($external_rss_row['rss_item_date'] != '') {
                 // YYYY/MM/DD H:MM
                 $external_rss_row['rss_item_date'] = ACSLib::convert_pg_date_to_str($external_rss_row['rss_item_date'], 0, 1, 0);
             }
             $bbs_row_array[$index]['external_rss_row'] = $external_rss_row;
         }
     }
     // ページング設定
     $display_count = ACSSystemConfig::get_keyword_value(ACSMsg::get_mst('system_config_group', 'D02'), 'NEW_INFO_LIST_DISPLAY_MAX_COUNT');
     $paging_info = $this->getPagingInfo($controller, $request, $bbs_row_array, $display_count);
     // set
     $this->setAttribute('is_community_member', $is_community_member);
     $this->setAttribute('is_community_admin', $is_community_admin);
     $this->setAttribute('action_url', $action_url);
     $this->setAttribute('community_top_page_url', $community_top_page_url);
     $this->setAttribute('bbs_thread_list_url', $bbs_thread_list_url);
     $this->setAttribute('select_trusted_community_url', $select_trusted_community_url);
     $this->setAttribute('search_bbs_url', $search_bbs_url);
     $this->setAttribute('get_external_rss_url', $get_external_rss_url);
     $this->setAttribute('bbs_rss_url', $bbs_rss_url);
     $this->setAttribute('community_row', $request->getAttribute('community_row'));
     $this->setAttribute('bbs_row_array', $bbs_row_array);
     $this->setAttribute('paging_info', $paging_info);
     $this->setAttribute('open_level_master_row_array', $request->getAttribute('open_level_master_row_array'));
     $this->setAttribute('parent_community_row_array', $parent_community_row_array);
     $this->setAttribute('sub_community_row_array', $sub_community_row_array);
     // ML送信チェック表示設定
     if ($community_row['contents_row_array']['ml_status']['contents_value'] == 'ACTIVE') {
         $this->setAttribute('is_ml_active', TRUE);
     }
     // テンプレート
     $this->setScreenId("0001");
     $this->setTemplate('BBS.tpl.php');
     // エラーメッセージ
     $this->setAttribute('error_message', $this->getErrorMessage($controller, $request, $user));
     if ($request->getParameter('move_id') == 3) {
         //ユーザ入力情報
         $form = $user->getAttribute('new_form_obj');
         // パブリックリリース 掲載終了日
         $form['expire_date'] = "";
         if ($form['expire_date'] != "") {
             $form['expire_date'] = ACSLib::convert_pg_date_to_str($form['expire_date'], false, false, false);
         }
         $this->setAttribute('form', $form);
         $this->setAttribute('move_id', $request->getParameter('move_id'));
     }
     return parent::execute();
 }