X-Git-Url: http://git.osdn.net/view?a=blobdiff_plain;f=webapp%2Fmodules%2FCommunity%2Fviews%2FEditCommunityAdminInputView.class.php;fp=webapp%2Fmodules%2FCommunity%2Fviews%2FEditCommunityAdminInputView.class.php;h=7030bf6e3eeb74ae72b5d773a9357233ba5b6532;hb=5b9f238c81808ea11bff12536ee867e3c3b7fc07;hp=0000000000000000000000000000000000000000;hpb=8f9121013e0e238a039705ba092ca08b5234d632;p=acs%2Facs.git diff --git a/webapp/modules/Community/views/EditCommunityAdminInputView.class.php b/webapp/modules/Community/views/EditCommunityAdminInputView.class.php new file mode 100644 index 0000000..7030bf6 --- /dev/null +++ b/webapp/modules/Community/views/EditCommunityAdminInputView.class.php @@ -0,0 +1,55 @@ +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'); + $community_member_user_info_row_array = $request->getAttribute('community_member_user_info_row_array'); + + foreach ($community_member_user_info_row_array as $index => $user_info_row) { + // ¼«Ê¬¤Î¥æ¡¼¥¶¾ðÊó¤ÏÀßÄêÂоݳ° + if ($user_info_row['user_community_id'] == $acs_user_info_row['user_community_id']) { + unset($community_member_user_info_row_array[$index]); + continue; + } + $community_member_user_info_row_array[$index]['top_page_url'] = $this->getControllerPath(DEFAULT_MODULE, DEFAULT_ACTION) . '&id=' . $user_info_row['user_community_id']; + $community_member_user_info_row_array[$index]['image_url'] = ACSUser::get_image_url($user_info_row['user_community_id'], 'thumb'); + $community_member_user_info_row_array[$index]['is_community_admin'] = ACSCommunity::is_community_admin($user_info_row['user_community_id'], $community_row['community_id']); + } + + // ¥¢¥¯¥»¥¹¼Ô ¥³¥ß¥å¥Ë¥Æ¥£´ÉÍý¼Ô + $acs_user_info_row['is_community_admin'] = ACSCommunity::is_community_admin($acs_user_info_row['user_community_id'], $community_row['community_id']); + $acs_user_community_row = ACSCommunity::get_community_row($acs_user_info_row['user_community_id']); + $acs_user_info_row['community_name'] = $acs_user_community_row['community_name']; + + // ¥³¥ß¥å¥Ë¥Æ¥£¥È¥Ã¥×¥Ú¡¼¥¸¤ÎURL + $community_top_page_url = $this->getControllerPath('Community', DEFAULT_ACTION) . '&community_id=' . $community_row['community_id']; + + // action URL + $action_url = $this->getControllerPath('Community', 'EditCommunityAdmin') . '&community_id=' . $community_row['community_id']; + + // ¥Æ¥ó¥×¥ì¡¼¥È + $this->setScreenId("0001"); + $this->setTemplate('EditCommunityAdmin.tpl.php'); + + // set + $this->setAttribute('acs_user_info_row', $acs_user_info_row); + $this->setAttribute('community_row', $community_row); + $this->setAttribute('community_member_user_info_row_array', $community_member_user_info_row_array); + $this->setAttribute('community_top_page_url', $community_top_page_url); + $this->setAttribute('action_url', $action_url); + + return parent::execute(); + } +} + +?>