function getDefaultView() { $context = $this->getContext(); $controller = $context->getController(); $request = $context->getRequest(); $user = $context->getUser(); $acs_user_info_row = $user->getAttribute('acs_user_info_row'); // 対象となるコミュニティIDを取得 $community_id = $request->getParameter('community_id'); // コミュニティ情報 $community_row = ACSCommunity::get_community_profile_row($community_id); $community_row = ACSExternalRSS::add_contents_row_array($community_row); // BBS記事一覧 $bbs_row_array = ACSBBS::get_bbs_row_array($community_id); foreach ($bbs_row_array as $index => $bbs_row) { // 信頼済みコミュニティ一覧 $bbs_row_array[$index]['trusted_community_row_array'] = ACSBBS::get_bbs_trusted_community_row_array($bbs_row['bbs_id']); // 返信記事 $bbs_row_array[$index]['bbs_res_row_array'] = ACSBBS::get_bbs_res_row_array($bbs_row['bbs_id']); } if ($community_row['contents_row_array']['self']['open_level_name'] == ACSMsg::get_mst('open_level_master', 'D03')) { // 非公開コミュニティ $open_level_master_row_array = ACSAccessControl::get_open_level_master_row_array(ACSMsg::get_mst('community_type_master', 'D40'), ACSMsg::get_mst('contents_type_master', 'D43')); } else { // 公開範囲 $open_level_master_row_array = ACSAccessControl::get_open_level_master_row_array(ACSMsg::get_mst('community_type_master', 'D40'), ACSMsg::get_mst('contents_type_master', 'D42')); } // set $request->setAttribute('community_row', $community_row); $request->setAttribute('bbs_row_array', $bbs_row_array); $request->setAttribute('open_level_master_row_array', $open_level_master_row_array); return View::INPUT; }
function execute() { $context =& $this->getContext(); $controller = $context->getController(); $user = $context->getUser(); $request = $context->getRequest(); $acs_user_info_row = $user->getAttribute('acs_user_info_row'); // 対象となるコミュニティIDを取得 $community_id = $request->ACSGetParameter('community_id'); // コミュニティ存在チェック $community_row = ACSCommunity::get_community_row($community_id); if (!$community_row || $community_row['community_type_name'] != ACSMsg::get_mst('community_type_master', 'D40')) { return View::ERROR; } // 権限チェック if (!$this->get_execute_privilege()) { $controller->forward(SECURE_MODULE, SECURE_ACTION); return; } // コミュニティ情報 $community_row = ACSCommunity::get_community_profile_row($community_id); // サブコミュニティ情報の一覧 $sub_community_row_array = ACSCommunity::get_sub_community_row_array($community_id); // 親コミュニティ情報の一覧 $parent_community_row_array = ACSCommunity::get_parent_community_row_array($community_id); // コミュニティメンバ, コミュニティ管理者 $community_member_user_info_row_array = ACSCommunity::get_community_member_user_info_row_array($community_id); $community_admin_user_info_row_array = ACSCommunity::get_community_admin_user_info_row_array($community_id); // 待機: コミュニティ参加 承認待ち $waiting_for_join_community_row_array = ACSWaiting::get_waiting_row_array($community_id, ACSMsg::get_mst('waiting_type_master', 'D20'), ACSMsg::get_mst('waiting_status_master', 'D10')); // 待機: 親コミュニティ追加, サブコミュニティ追加 $waiting_for_parent_community_link_row_array = ACSWaiting::get_waiting_row_array($community_id, ACSMsg::get_mst('waiting_type_master', 'D40'), ACSMsg::get_mst('waiting_status_master', 'D10')); $waiting_for_sub_community_link_row_array = ACSWaiting::get_waiting_row_array($community_id, ACSMsg::get_mst('waiting_type_master', 'D50'), ACSMsg::get_mst('waiting_status_master', 'D10')); // 最新情報: BBS // BBS記事一覧 $bbs_row_array = ACSBBS::get_bbs_row_array($community_id); foreach ($bbs_row_array as $index => $bbs_row) { // 信頼済みコミュニティ一覧 $bbs_row_array[$index]['trusted_community_row_array'] = ACSBBS::get_bbs_trusted_community_row_array($bbs_row['bbs_id']); } // set $request->setAttribute('community_row', $community_row); $request->setAttribute('sub_community_row_array', $sub_community_row_array); $request->setAttribute('parent_community_row_array', $parent_community_row_array); $request->setAttribute('community_member_user_info_row_array', $community_member_user_info_row_array); $request->setAttribute('community_admin_user_info_row_array', $community_admin_user_info_row_array); $request->setAttribute('waiting_for_join_community_row_array', $waiting_for_join_community_row_array); $request->setAttribute('waiting_for_parent_community_link_row_array', $waiting_for_parent_community_link_row_array); $request->setAttribute('waiting_for_sub_community_link_row_array', $waiting_for_sub_community_link_row_array); $request->setAttribute('bbs_row_array', $bbs_row_array); return View::SUCCESS; }
function execute() { $context = $this->getContext(); $controller = $context->getController(); $request = $context->getRequest(); $user = $context->getUser(); $acs_user_info_row = $user->getAttribute('acs_user_info_row'); // 対象となるコミュニティIDを取得 $community_id = $request->getParameter('community_id'); // コミュニティ情報 $community_row = ACSCommunity::get_community_profile_row($community_id); // BBS記事一覧 $bbs_row_array = ACSBBS::get_bbs_row_array($community_id); foreach ($bbs_row_array as $index => $bbs_row) { // 信頼済みコミュニティ一覧 $bbs_row_array[$index]['trusted_community_row_array'] = ACSBBS::get_bbs_trusted_community_row_array($bbs_row['bbs_id']); } // set $request->setAttribute('community_row', $community_row); $request->setAttribute('bbs_row_array', $bbs_row_array); return View::SUCCESS; }