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を取得
     $user_community_id = $acs_user_info_row['user_community_id'];
     if (!$this->get_execute_privilege()) {
         $controller->forward(SECURE_MODULE, SECURE_ACTION);
         return;
     }
     // デザイン情報取得
     $select_design_row_array = ACSCss::get_style_selection_list_array(ACSMsg::get_lang(), ACS_SELECTION_CSS_DIR);
     //$style_url = ACSSystemConfig::get_keyword_value(
     //		ACSMsg::get_mst('system_config_group','D01'), 'DESIGN_STYLE_CSS_URL');
     $style_url = ACS_SELECTION_CSS_DIR;
     // 設定済のマイページデザインを取得する
     $selection_css_row = ACSCommunity::get_contents_row($user_community_id, ACSMsg::get_mst('contents_type_master', 'D53'));
     $selection_css = $selection_css_row['contents_value'] == '' ? ACS_DEFAULT_SELECTION_CSS_FILE : $selection_css_row['contents_value'];
     // set
     $request->setAttribute('style_url', $style_url);
     $request->setAttributeByRef('acs_user_info_row', $acs_user_info_row);
     $request->setAttributeByRef('select_design_row_array', $select_design_row_array);
     $request->setAttributeByRef('user_community_id', $user_community_id);
     $request->setAttribute('selection_css', $selection_css);
     return View::INPUT;
 }
 public function execute()
 {
     $context =& $this->getContext();
     $user = $context->getUser();
     $request = $context->getRequest();
     // get
     $ranking_community_row_array = $request->getAttribute('ranking_community_row_array');
     // 加工
     $rank = 1;
     foreach ($ranking_community_row_array as $index => $ranking_community_row) {
         // トップページURL
         $ranking_community_row_array[$index]['top_page_url'] = $this->getControllerPath('Community', DEFAULT_ACTION) . '&community_id=' . $ranking_community_row['community_id'];
         // 写真
         $ranking_community_row_array[$index]['image_url'] = ACSCommunity::get_image_url($ranking_community_row['community_id'], 'thumb');
         // プロフィール
         $ranking_community_row_array[$index]['contents_row_array']['community_profile'] = ACSCommunity::get_contents_row($ranking_community_row['community_id'], ACSMsg::get_mst('contents_type_master', 'D07'));
         // 順位
         $ranking_community_row_array[$index]['rank'] = $rank;
         $rank++;
     }
     // set
     $this->setAttribute('ranking_community_row_array', $ranking_community_row_array);
     // テンプレートをセットする
     $this->setTemplate('CommunityRanking.tpl.php');
     $context->getController()->setRenderMode(View::RENDER_VAR);
     $request->setAttribute("CommunityRanking", $this->render());
     return parent::execute();
 }
 function execute()
 {
     $context =& $this->getContext();
     $user = $context->getUser();
     $request = $context->getRequest();
     $acs_user_info_row = $user->getAttribute('acs_user_info_row');
     // get
     // 入力フォーム
     $form = $request->ACSgetParameters();
     // カテゴリグループマスタ
     $category_group_master_row_array = ACSCommunity::get_category_group_master_row_array();
     foreach ($category_group_master_row_array as $index => $category_group_master_row) {
         // カテゴリグループごとのカテゴリマスタ
         $category_group_master_row_array[$index]['category_master_row_array'] = ACSCommunity::get_category_master_row_array_by_category_group_code($category_group_master_row['category_group_code']);
     }
     // カテゴリごとのコミュニティ数
     $category_code_community_num_array = ACSCommunity::get_category_code_community_num_array();
     // 検索時
     if ($form['search']) {
         // コミュニティ一覧を取得する
         $community_row_array = ACSCommunity::search_community_row_array($acs_user_info_row['user_community_id'], $form);
         // 概要
         foreach ($community_row_array as $index => $community_row) {
             $community_row_array[$index]['contents_row_array']['community_profile'] = ACSCommunity::get_contents_row($community_row['community_id'], ACSMsg::get_mst('contents_type_master', 'D07'));
         }
         // set
         $request->setAttribute('community_row_array', $community_row_array);
     }
     // set
     $request->setAttribute('category_group_master_row_array', $category_group_master_row_array);
     $request->setAttribute('category_code_community_num_array', $category_code_community_num_array);
     $request->setAttribute('form', $form);
     return View::INPUT;
 }
Пример #4
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');
     // 表示対象となるコミュニティ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'));
     // 取得期間
     $term = intval($request->ACSgetParameter('term'));
     if (!$term) {
         // システム設定: コミュニティ: 掲示板RSS取得期間
         $term = ACSSystemConfig::get_keyword_value(ACSMsg::get_mst('system_config_group', 'D03'), 'BBS_RSS_TERM');
     }
     // 最新の掲示板RSS
     $bbs_row_array = ACSBBS::get_new_bbs_rss_row_array($community_id, $term);
     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);
     $request->setAttribute('term', $term);
     return View::SUCCESS;
 }
Пример #5
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
     $form = $request->ACSgetParameters();
     // 検索時
     if ($form['search']) {
         // ユーザ情報一覧を取得する
         if ($acs_user_info_row['is_acs_user']) {
             // ログインユーザのアクセス
             $user_info_row_array = ACSUser::search_user_info_row_array($form, array(ACSMsg::get_mst('open_level_master', 'D01'), ACSMsg::get_mst('open_level_master', 'D02')));
             // 自己紹介
             foreach ($user_info_row_array as $index => $user_info_row) {
                 $user_info_row_array[$index]['contents_row_array']['community_profile'] = ACSCommunity::get_contents_row($user_info_row['user_community_id'], ACSMsg::get_mst('contents_type_master', 'D08'));
             }
         } else {
             // 一般ユーザのアクセス
             $user_info_row_array = ACSUser::search_user_info_row_array($form, array(ACSMsg::get_mst('open_level_master', 'D01')));
             // 自己紹介
             foreach ($user_info_row_array as $index => $user_info_row) {
                 $user_info_row_array[$index]['contents_row_array']['community_profile'] = ACSCommunity::get_contents_row($user_info_row['user_community_id'], ACSMsg::get_mst('contents_type_master', 'D07'));
             }
         }
         // set
         $request->setAttribute('user_info_row_array', $user_info_row_array);
     }
     // set
     $request->setAttribute('form', $form);
     return View::INPUT;
 }
Пример #6
0
 /**
  * コミュニティ情報(プロフィール)を取得する
  *
  * @param $community_id コミュニティID
  * @return コミュニティ情報の配列
  */
 static function get_community_profile_row($community_id)
 {
     $community_row = ACSCommunity::get_community_row($community_id);
     // プロフィール (contents)
     $community_row['contents_row_array'] = array();
     $community_row['contents_row_array']['community_profile'] = ACSCommunity::get_contents_row($community_id, ACSMsg::get_mst('contents_type_master', 'D07'));
     $community_row['contents_row_array']['bbs'] = ACSCommunity::get_contents_row($community_id, ACSMsg::get_mst('contents_type_master', 'D41'));
     $community_row['contents_row_array']['community_folder'] = ACSCommunity::get_contents_row($community_id, ACSMsg::get_mst('contents_type_master', 'D31'));
     $community_row['contents_row_array']['self'] = ACSCommunity::get_contents_row($community_id, ACSMsg::get_mst('contents_type_master', 'D00'));
     $community_row['contents_row_array']['ml_addr'] = ACSCommunity::get_contents_row($community_id, ACSMsg::get_mst('contents_type_master', 'D61'));
     $community_row['contents_row_array']['ml_status'] = ACSCommunity::get_contents_row($community_id, ACSMsg::get_mst('contents_type_master', 'D62'));
     // データ無しの場合は空のarrayを入れる
     foreach ($community_row['contents_row_array'] as $contents_key => $contents_row) {
         if (!$contents_row) {
             $community_row['contents_row_array'][$contents_key] = array();
         }
     }
     // 参加資格
     $community_row['join_trusted_community_row_array'] = ACSCommunity::get_join_trusted_community_row_array($community_id);
     // 信頼済みコミュニティ
     // bbs (掲示板)
     $community_row['contents_row_array']['bbs']['trusted_community_row_array'] = ACSCommunity::get_contents_trusted_community_row_array($community_id, $community_row['contents_row_array']['bbs']['contents_type_code'], $community_row['contents_row_array']['bbs']['open_level_code']);
     // community_folder (コミュニティフォルダ)
     $community_row['contents_row_array']['community_folder']['trusted_community_row_array'] = ACSCommunity::get_contents_trusted_community_row_array($community_id, $community_row['contents_row_array']['community_folder']['contents_type_code'], $community_row['contents_row_array']['community_folder']['open_level_code']);
     return $community_row;
 }
Пример #7
0
 /**
  * コミュニティメンバへのメール送信(一括配信)
  *
  * define('ACS_COMMUNITY_ML_SERVER') のSMTPサーバで送信します。
  * 送信者はコミュニティに設定されたメールアドレスとなります。
  *
  * メッセージに対して以下のプレースフォルダを置換します。
  * {USER_COMMUNITY_NAME}
  * {SYSTEM_BASE_URL}
  * {SYSTEM_SCRIPT_PATH}
  * {SYSTEM_MODULE_ACCESSOR}
  * {SYSTEM_ACTION_ACCESSOR}
  * {COMMUNITY_ID}
  * {COMMUNITY_NAME}
  *
  * @param string $community_id コミュニティid
  * @param string $from_address 送信者アドレス
  *                          (From:のみReply-to:はコミュニティMLアドレスが自動付与される)
  * @param string $subject 件名
  * @param string $msg メッセージ本文
  * @param string $mmb_id_array 対象ユーザコミュニティid配列(未指定時は全員)
  * @return mixed true...正常/PearError オブジェクト...異常
  */
 static function send_community_mailing_list($community_id, $from_address, $subject, $msg, $mmb_id_array = '')
 {
     // コミュニティMLアドレスの取得
     $ml_address_row = ACSCommunity::get_contents_row($community_id, ACSMsg::get_mst('contents_type_master', 'D61'));
     // コミュニティMLステータスの取得
     $ml_status_row = ACSCommunity::get_contents_row($community_id, ACSMsg::get_mst('contents_type_master', 'D62'));
     $ml_address = $ml_address_row['contents_value'];
     $ml_status = $ml_status_row['contents_value'];
     if ($ml_address == '' || $ml_status != 'ACTIVE') {
         return false;
     }
     // BBSシステムメールアドレスの取得
     $bbs_system_mailaddr = ACSSystemConfig::get_keyword_value(ACSMsg::get_mst('system_config_group', 'D03'), 'COMMUNITY_ML_MAIL_ADDR');
     // コミュニティメンバ全員の情報を取得
     $mmb_info_rows =& ACSCommunity::get_community_member_mail_address_row_array($community_id);
     // $mmb_id_array のインデックス化
     $mmb_array = array();
     if (is_array($mmb_id_array)) {
         foreach ($mmb_id_array as $mmb_id) {
             $mmb_array[$mmb_id] = TRUE;
         }
     }
     // Bccの生成
     $bcc = '';
     foreach ($mmb_info_rows as $mmb_info) {
         if ($mmb_id_array == '' || $mmb_array[$mmb_info['user_community_id']]) {
             $bcc .= $bcc == '' ? '' : ',';
             $bcc .= $mmb_info['mail_address'];
         }
     }
     // システム関連プレースフォルダの置換
     $msg = ACSCommunityMail::get_community_tag_replace($community_id, $msg);
     // Bccメール送信
     return ACSLib::send_mail($from_address, $bcc, '', $subject, $msg, array('Sender' => $bbs_system_mailaddr, 'Bcc' => $bcc, 'Return-Path' => $ml_address, 'Reply-to' => $ml_address, 'To' => $ml_address));
 }
 function get_access_control_info(&$controller, &$request, &$user)
 {
     $acs_user_info_row = $user->getAttribute('acs_user_info_row');
     // 対象となるユーザコミュニティIDを取得
     $user_community_id = $request->getParameter('id');
     // コミュニティ情報
     $user_info_row = ACSUser::get_user_info_row_by_user_community_id($user_community_id);
     // アクセス制御情報 //
     $friends_list_contents_row = ACSCommunity::get_contents_row($user_community_id, ACSMsg::get_mst('contents_type_master', 'D11'));
     $access_control_info = array('role_array' => ACSAccessControl::get_user_community_role_array($acs_user_info_row, $user_info_row), 'contents_row_array' => array($friends_list_contents_row));
     return $access_control_info;
 }
Пример #9
0
 function get_access_control_info(&$controller, &$request, &$user)
 {
     $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_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']);
     $access_control_info = array('role_array' => ACSAccessControl::get_community_role_array($acs_user_info_row, $community_row), 'contents_row_array' => array($bbs_contents_row));
     return $access_control_info;
 }
 function getCredential()
 {
     $context = $this->getContext();
     $controller = $context->getController();
     $request = $context->getRequest();
     $user = $context->getUser();
     // 非公開コミュニティはメンバのみアクセス可能
     $community_self_info_row = ACSCommunity::get_contents_row($request->getParameter('community_id'), ACSMsg::get_mst('contents_type_master', 'D00'));
     if ($community_self_info_row['open_level_name'] == ACSMsg::get_mst('open_level_master', 'D03')) {
         return array('COMMUNITY_MEMBER');
     }
     return array();
 }
 public function execute()
 {
     $context =& $this->getContext();
     $user = $context->getUser();
     $request = $context->getRequest();
     $acs_user_info_row = $user->getAttribute('acs_user_info_row');
     // 新着公開ダイアリー一覧を取得する
     $new_community_row_array = ACSCommunity::get_new_community_row_array();
     foreach ($new_community_row_array as $index => $new_community_row) {
         // 概要
         $new_community_row_array[$index]['contents_row_array']['community_profile'] = ACSCommunity::get_contents_row($new_community_row['community_id'], ACSMsg::get_mst('contents_type_master', 'D07'));
     }
     // set
     $request->setAttribute('new_community_row_array', $new_community_row_array);
     return View::INPUT;
 }
 /**
  * 確認画面表示
  */
 function getDefaultView()
 {
     $context = $this->getContext();
     $controller = $context->getController();
     $request = $context->getRequest();
     $user = $context->getUser();
     if (!$this->get_execute_privilege()) {
         $controller->forward(SECURE_MODULE, SECURE_ACTION);
         return;
     }
     /* コミュニティ情報取得 */
     $target_community_id = $request->getParameter('community_id');
     $target_community_row = ACSCommunity::get_community_row($request->getParameter('community_id'));
     // コミュニティ概要取得
     $target_community_row['community_profile'] = ACSCommunity::get_contents_row($target_community_id, ACSMsg::get_mst('contents_type_master', 'D07'));
     $request->setAttribute('target_community_row', $target_community_row);
     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を取得
     $user_community_id = $request->ACSgetParameter('id');
     // ユーザ情報
     $target_user_info_row = ACSUser::get_user_info_row_by_user_community_id($user_community_id);
     // マイコミュニティ
     $community_row_array = ACSUser::get_community_row_array($user_community_id);
     // コミュニティ全体の公開範囲をセットする
     foreach ($community_row_array as $index => $community_row) {
         $community_row_array[$index]['contents_row_array']['self'] = ACSCommunity::get_contents_row($community_row['community_id'], ACSMsg::get_mst('contents_type_master', 'D00'));
         $community_row_array[$index]['is_community_member'] = ACSCommunity::is_community_member($acs_user_info_row['user_community_id'], $community_row['community_id']);
     }
     // set
     $request->setAttribute('target_user_info_row', $target_user_info_row);
     $request->setAttribute('community_row_array', $community_row_array);
     return View::SUCCESS;
 }
Пример #14
0
 /**
  * コミュニティのコンテンツにアクセス可能かどうか
  *
  * @param $acs_user_info_row アクセス者のユーザ情報
  * @param $role_array アクセス者のrole_array
  * @param $row アクセス対象となるデータ (連想配列)
  * @return アクセス可(true)/アクセス不可(false)
  */
 static function is_valid_user_for_community($acs_user_info_row, $role_array, $row)
 {
     $ret = false;
     // コミュニティメンバ、システム管理者以外の場合
     // コミュニティ全体の公開範囲をチェック
     if (!ACSCommunity::is_community_member($acs_user_info_row['user_community_id'], $row['community_id']) && !ACSAccessControl::is_system_administrator($acs_user_info_row)) {
         $community_self_info_row = ACSCommunity::get_contents_row($row['community_id'], ACSMsg::get_mst('contents_type_master', 'D00'));
         if ($community_self_info_row['open_level_name'] == ACSMsg::get_mst('open_level_master', 'D03')) {
             return false;
         }
     }
     foreach ($role_array as $role_key => $role_value) {
         if (ACSLib::get_boolean($row["open_for_{$role_key}"]) && $role_value) {
             $ret = true;
             break;
         } elseif ($role_key == 'member') {
             // 閲覧許可を与えるコミュニティが指定されている場合
             if (count($row['trusted_community_row_array']) > 0) {
                 foreach ($row['trusted_community_row_array'] as $trusted_community_row) {
                     if (ACSCommunity::is_community_member($acs_user_info_row['user_community_id'], $trusted_community_row['community_id'])) {
                         $ret = true;
                         break;
                     }
                 }
             }
             if ($ret) {
                 break;
             }
         }
     }
     return $ret;
 }
Пример #15
0
 function execute()
 {
     $context =& $this->getContext();
     $user = $context->getUser();
     $request = $context->getRequest();
     $acs_user_info_row = $user->getAttribute('acs_user_info_row');
     // 表示対象となるユーザコミュニティIDを取得
     $user_community_id = $request->ACSgetParameter('id');
     if (empty($user_community_id)) {
         $user_community_id = $acs_user_info_row['user_community_id'];
     }
     // 表示対象のユーザが存在しない場合は、エラーを表示
     if (!ACSUser::get_user_info_row_by_user_community_id($user_community_id)) {
         // 未ログインの時はPublic/Indexに遷移
         header("Location: ./index.php?module=Public&action=Index");
         //			return View::ERROR;
     }
     // 自身のページか
     if ($acs_user_info_row['user_community_id'] == $user_community_id) {
         $is_self_page = 1;
     } else {
         $is_self_page = 0;
     }
     // プロフィール
     $target_user_info_row = ACSUser::get_user_profile_row($user_community_id);
     // マイフレンズ
     $friends_row_array = ACSUser::get_simple_friends_row_array($user_community_id);
     // マイコミュニティ
     $community_row_array = ACSUser::get_community_row_array($user_community_id);
     // 最終ログイン
     // ログイン済みの場合
     if ($acs_user_info_row['is_login_user']) {
         $last_login_row = ACSCommunity::get_contents_row($user_community_id, ACSMsg::get_mst('contents_type_master', 'D52'));
     }
     // マイページデザインを取得する
     $selection_css_row = ACSCommunity::get_contents_row($user_community_id, ACSMsg::get_mst('contents_type_master', 'D53'));
     $selection_css = $selection_css_row['contents_value'] == '' ? ACS_DEFAULT_SELECTION_CSS_FILE : $selection_css_row['contents_value'];
     $waiting_for_join_community_row_array_array = array();
     $waiting_for_parent_community_link_row_array_array = array();
     $waiting_for_sub_community_link_row_array_array = array();
     foreach ($community_row_array as $index => $community_row) {
         $community_row_array[$index]['contents_row_array']['self'] = ACSCommunity::get_contents_row($community_row['community_id'], ACSMsg::get_mst('contents_type_master', 'D00'));
         $community_row_array[$index]['is_community_admin'] = ACSCommunity::is_community_admin($acs_user_info_row['user_community_id'], $community_row['community_id']);
         $community_row_array[$index]['is_community_member'] = ACSCommunity::is_community_member($acs_user_info_row['user_community_id'], $community_row['community_id']);
         if ($is_self_page) {
             // 待機: コミュニティ参加 承認待ち (自分のマイコミュニティ)
             if ($community_row['is_community_admin'] && ($waiting_row_array = ACSWaiting::get_waiting_row_array($community_row['community_id'], ACSMsg::get_mst('waiting_type_master', 'D20'), ACSMsg::get_mst('waiting_status_master', 'D10')))) {
                 $waiting_for_join_community_row_array['waiting_row_array'] = $waiting_row_array;
                 $waiting_for_join_community_row_array['community_row'] = $community_row;
                 array_push($waiting_for_join_community_row_array_array, $waiting_for_join_community_row_array);
             }
             // 待機: 親コミュニティ追加 承認待ち
             if ($community_row['is_community_admin'] && ($waiting_row_array = ACSWaiting::get_waiting_row_array($community_row['community_id'], ACSMsg::get_mst('waiting_type_master', 'D40'), ACSMsg::get_mst('waiting_status_master', 'D10')))) {
                 $waiting_for_parent_community_link_row_array['waiting_row_array'] = $waiting_row_array;
                 $waiting_for_parent_community_link_row_array['community_row'] = $community_row;
                 array_push($waiting_for_parent_community_link_row_array_array, $waiting_for_parent_community_link_row_array);
             }
             // 待機: サブコミュニティ追加 承認待ち
             if ($community_row['is_community_admin'] && ($waiting_row_array = ACSWaiting::get_waiting_row_array($community_row['community_id'], ACSMsg::get_mst('waiting_type_master', 'D50'), ACSMsg::get_mst('waiting_status_master', 'D10')))) {
                 $waiting_for_sub_community_link_row_array['waiting_row_array'] = $waiting_row_array;
                 $waiting_for_sub_community_link_row_array['community_row'] = $community_row;
                 array_push($waiting_for_sub_community_link_row_array_array, $waiting_for_sub_community_link_row_array);
             }
         }
     }
     if ($is_self_page) {
         // 待機: マイフレンズ追加 承認待ち
         $waiting_for_add_friends_row_array = ACSWaiting::get_waiting_row_array($user_community_id, ACSMsg::get_mst('waiting_type_master', 'D10'), ACSMsg::get_mst('waiting_status_master', 'D10'));
         // 待機: コミュニティ招待 承認待ち
         $waiting_for_invite_to_community_row_array = ACSWaiting::get_waiting_row_array($user_community_id, ACSMsg::get_mst('waiting_type_master', 'D30'), ACSMsg::get_mst('waiting_status_master', 'D10'));
         // マイダイアリーの新着コメント
         $new_comment_diary_row_array = ACSDiary::get_new_comment_diary_row_array($user_community_id);
         // 新着メッセージ
         $new_message_row_array = ACSMessage::get_new_message_row_array($user_community_id);
         // システムからのお知らせ
         $system_announce_row_array = ACSSystemAnnounce::get_valid_system_announce_row_array();
     }
     // set
     $request->setAttribute('user_community_id', $user_community_id);
     $request->setAttribute('target_user_info_row', $target_user_info_row);
     $request->setAttribute('is_self_page', $is_self_page);
     $request->setAttribute('friends_row_array', $friends_row_array);
     $request->setAttribute('community_row_array', $community_row_array);
     $request->setAttribute('waiting_for_add_friends_row_array', $waiting_for_add_friends_row_array);
     $request->setAttribute('waiting_for_join_community_row_array_array', $waiting_for_join_community_row_array_array);
     $request->setAttribute('waiting_for_parent_community_link_row_array_array', $waiting_for_parent_community_link_row_array_array);
     $request->setAttribute('waiting_for_sub_community_link_row_array_array', $waiting_for_sub_community_link_row_array_array);
     $request->setAttribute('waiting_for_invite_to_community_row_array', $waiting_for_invite_to_community_row_array);
     $request->setAttribute('new_comment_diary_row_array', $new_comment_diary_row_array);
     $request->setAttribute('system_announce_row_array', $system_announce_row_array);
     $request->setAttribute('last_login', $last_login_row['contents_value']);
     $request->setAttribute('selection_css', $selection_css);
     $request->setAttribute('new_message_row_array', $new_message_row_array);
     return View::SUCCESS;
 }
Пример #16
0
 function execute()
 {
     $context = $this->getContext();
     $controller = $context->getController();
     $request = $context->getRequest();
     $user = $context->getUser();
     if (!$this->get_execute_privilege()) {
         $controller->forward(SECURE_MODULE, SECURE_ACTION);
         return;
     }
     //mode 画面の遷移を取得する
     $move_id = $request->getParameter('move_id');
     // 公開範囲
     $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'));
     // ユーザー情報
     $acs_user_info_row = $user->getAttribute('acs_user_info_row');
     // 対象となるコミュニティIDを取得
     $community_id = $request->getParameter('community_id');
     //エラーの初期化
     /* 入力画面より */
     if ($move_id == 1) {
         $err = 'OK';
         //エラー値の初期化
         //☆☆ ここからほぼ同じ
         // 画面上のフォーム情報を取得する
         $form['subject'] = $request->getParameter('subject');
         //件名:subject
         $form['body'] = $request->getParameter('body');
         //内容:body
         $form['open_level_code'] = $request->getParameter('open_level_code');
         //公開範囲コード:open_level_code
         foreach ($open_level_master_row_array as $open_level_master_row) {
             if ($open_level_master_row['open_level_code'] == $form['open_level_code']) {
                 $form['open_level_name'] = htmlspecialchars($open_level_master_row['open_level_name']);
                 //公開範囲表示名:open_level_name
             }
         }
         $form['new_file'] = $request->getParameter('new_file');
         //画像:new_file
         //ファイル情報のあるなしをチェックしておく
         if (!ini_get('mbstring.encoding_translation')) {
             $form['file_name'] = mb_convert_encoding($_FILES['new_file']['name'], mb_internal_encoding(), mb_http_output());
         } else {
             $form['file_name'] = $_FILES['new_file']['name'];
         }
         if ($form['file_name'] != '') {
             /* ディレクトリ存在チェック */
             // ない場合は作成する
             $to_dir = ACS_TEMPORARY_FILE_DIR;
             if (!file_exists($to_dir)) {
                 mkdir($to_dir);
                 chmod($to_dir, 0777);
             }
             //ファイルがある場合、仮置き場所を設定する
             $_FILES['new_file']['upload_tmp_dir'] = ACS_TEMPORARY_FILE_DIR;
             //仮置きのファイル名を設定する
             $type_name = session_id();
             $upload = $_FILES['new_file']['upload_tmp_dir'];
             $upload .= $type_name;
             if (!move_uploaded_file($_FILES['new_file']['tmp_name'], $upload)) {
                 echo "ファイルの読み込みに失敗しました\n";
             }
             $_FILES['new_file']['tmp_name'] = $upload;
             $form['file_obj'] = $_FILES['new_file'];
             $user->setAttribute('new_file_info', $upload);
             $user->setAttribute('new_file_obj', $_FILES['new_file']);
         }
         $form['xdate'] = $request->getParameter('xdate');
         //掲載最終日:xdate
         //掲載最終日デフォルト値
         if ($form['xdate'] == '') {
             $form[xdate] = '';
         }
         //閲覧許可コミュニティ
         $form['trusted_community_id_array'] = $request->getParameter('trusted_community_id_array');
         $form['trusted_community_row_array'] = ACSCommunity::get_each_community_row_array($form['trusted_community_id_array']);
         $form['community_id'] = $community_id;
         //当コミュニティのID
         $form['user_community_id'] = $acs_user_info_row['user_community_id'];
         // 投稿者print "form_row:";
         // ML送信オプション
         $form['is_ml_send'] = $request->getParameter('is_ml_send');
         //画像:new_file
         //☆☆ ここまでほぼ同じ
         $user->setAttribute('new_form_obj', $form);
         return View::SUCCESS;
         /* 登録確定ボタン「はい」より */
     } else {
         if ($move_id == 2) {
             //☆☆ ここからほぼ同
             // 画面上のフォーム情報を取得する
             $form = $user->getAttribute('new_form_obj');
             $new_file_obj = $form['file_obj'];
             //☆☆ ここまでほぼ同じ
             // DBへの書き込み等
             ACSDB::_do_query("BEGIN");
             if ($form['file_name'] != "") {
                 //ファイル情報があった場合
                 //1.ファイル情報取得(新規)
                 $file_obj = ACSFile::get_upload_file_info_instance($user->getAttribute('new_file_obj'), $community_id, $form['user_community_id']);
                 //form情報へ登録
                 $form['new_file'] = $file_obj;
             }
             //2.bbsテーブル情報
             $ret = ACSBBS::set_bbs($form);
             if ($ret) {
                 ACSDB::_do_query("COMMIT");
                 // 掲示板アクセス履歴
                 ACSBBS::set_bbs_access_history($acs_user_info_row['user_community_id'], $ret);
             } else {
                 ACSDB::_do_query("ROLLBACK");
             }
             $bbs_id_seq = $ret;
             // MLオプションありの場合
             if ($form['is_ml_send'] == 't') {
                 // MLステータスの取得
                 $ml_status_row = ACSCommunity::get_contents_row($community_id, ACSMsg::get_mst('contents_type_master', 'D62'));
                 $ml_status = $ml_status_row['contents_value'];
                 // ML有りの場合メールを送信
                 if ($bbs_id_seq && $ml_status == 'ACTIVE') {
                     // 件名編集
                     $subject = str_replace('{BBSID}', $bbs_id_seq, ACS_COMMUNITY_ML_SUBJECT_FORMAT) . $form['subject'];
                     // ML送信
                     ACSCommunityMail::send_community_mailing_list($community_id, $acs_user_info_row['mail_addr'], $subject, $form['body']);
                 }
             }
             $action_url = $this->getControllerPath('Community', 'BBS') . '&community_id=' . $community_id . '&move_id=4';
             header("Location: {$action_url}");
         }
     }
 }
 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";
 }
Пример #18
0
 function get_execute_privilege()
 {
     $context = $this->getContext();
     $request = $context->getRequest();
     $user = $context->getUser();
     // コミュニティメンバはOK
     if ($user->hasCredential('COMMUNITY_MEMBER')) {
         return true;
     }
     // 非公開コミュニティはコミュニティメンバは不可能
     $community_self_info_row = ACSCommunity::get_contents_row($request->getParameter('community_id'), ACSMsg::get_mst('contents_type_master', 'D00'));
     if ($community_self_info_row['open_level_name'] == ACSMsg::get_mst('open_level_master', 'D03')) {
         return false;
     }
     return true;
 }
Пример #19
0
 /**
  * $community_rowに外部RSSに関するコンテンツ情報を付加する
  *
  * @param $community_row コミュニティ情報
  * @return なし
  */
 static function add_contents_row_array($community_row)
 {
     // contents
     if (!is_array($community_row['contents_row_array'])) {
         $community_row['contents_row_array'] = array();
     }
     // 外部RSS.URL
     $community_row['contents_row_array']['external_rss_url'] = ACSCommunity::get_contents_row($community_row['community_id'], ACSMsg::get_mst('contents_type_master', 'D63'));
     // 外部RSS.投稿者
     $community_row['contents_row_array']['external_rss_post_user'] = ACSCommunity::get_contents_row($community_row['community_id'], ACSMsg::get_mst('contents_type_master', 'D64'));
     // 外部RSS.ML通知
     $community_row['contents_row_array']['external_rss_ml_send_flag'] = ACSCommunity::get_contents_row($community_row['community_id'], ACSMsg::get_mst('contents_type_master', 'D65'));
     // 外部RSS.パブリックリリース期間
     $community_row['contents_row_array']['external_rss_public_release_expire_term'] = ACSCommunity::get_contents_row($community_row['community_id'], ACSMsg::get_mst('contents_type_master', 'D66'));
     // 外部RSS.URL contents_trusted_community
     $community_row['contents_row_array']['external_rss_url']['trusted_community_row_array'] = ACSCommunity::get_contents_trusted_community_row_array($community_row['community_id'], $community_row['contents_row_array']['external_rss_url']['contents_type_code'], $community_row['contents_row_array']['external_rss_url']['open_level_code']);
     return $community_row;
 }
Пример #20
0
 /**
  * ユーザコミュニティIDを指定して、ユーザ情報(プロフィール)を取得する
  *
  * @param ユーザコミュニティID
  * @param $include_private_flag 非公開ユーザコミュニティも含める
  * @return ユーザ情報 (連想配列)
  */
 static function get_user_profile_row($user_community_id, $include_private_flag = false)
 {
     $user_info_row = ACSUser::get_user_info_row_by_user_community_id($user_community_id, $include_private_flag);
     if (!$user_info_row) {
         return;
     }
     // プロフィール(contents)
     $user_info_row['contents_row_array'] = array();
     $user_info_row['contents_row_array']['user_name'] = ACSCommunity::get_contents_row($user_community_id, ACSMsg::get_mst('contents_type_master', 'D01'));
     $user_info_row['contents_row_array']['mail_addr'] = ACSCommunity::get_contents_row($user_community_id, ACSMsg::get_mst('contents_type_master', 'D02'));
     $user_info_row['contents_row_array']['belonging'] = ACSCommunity::get_contents_row($user_community_id, ACSMsg::get_mst('contents_type_master', 'D03'));
     $user_info_row['contents_row_array']['speciality'] = ACSCommunity::get_contents_row($user_community_id, ACSMsg::get_mst('contents_type_master', 'D04'));
     $user_info_row['contents_row_array']['birthplace'] = ACSCommunity::get_contents_row($user_community_id, ACSMsg::get_mst('contents_type_master', 'D05'));
     $user_info_row['contents_row_array']['birthday'] = ACSCommunity::get_contents_row($user_community_id, ACSMsg::get_mst('contents_type_master', 'D06'));
     $user_info_row['contents_row_array']['community_profile'] = ACSCommunity::get_contents_row($user_community_id, ACSMsg::get_mst('contents_type_master', 'D07'));
     $user_info_row['contents_row_array']['community_profile_login'] = ACSCommunity::get_contents_row($user_community_id, ACSMsg::get_mst('contents_type_master', 'D08'));
     $user_info_row['contents_row_array']['community_profile_friend'] = ACSCommunity::get_contents_row($user_community_id, ACSMsg::get_mst('contents_type_master', 'D09'));
     $user_info_row['contents_row_array']['self'] = ACSCommunity::get_contents_row($user_community_id, ACSMsg::get_mst('contents_type_master', 'D00'));
     $user_info_row['contents_row_array']['friends_list'] = ACSCommunity::get_contents_row($user_community_id, ACSMsg::get_mst('contents_type_master', 'D11'));
     $user_info_row['contents_row_array']['mail_lang'] = ACSCommunity::get_contents_row($user_community_id, ACSMsg::get_mst('contents_type_master', 'D51'));
     // データ無しの場合は空のarrayを入れる
     foreach ($user_info_row['contents_row_array'] as $contents_key => $contents_row) {
         if (!$contents_row) {
             $user_info_row['contents_row_array'][$contents_key] = array();
         }
     }
     // 信頼済みコミュニティ
     // birthplace
     if ($user_info_row['contents_row_array']['birthplace']['open_level_name'] == ACSMsg::get_mst('open_level_master', 'D05')) {
         // trusted_community_flag
         $user_info_row['contents_row_array']['birthplace']['trusted_community_row_array'] = ACSCommunity::get_contents_trusted_community_row_array($user_community_id, $user_info_row['contents_row_array']['birthplace']['contents_type_code'], $user_info_row['contents_row_array']['birthplace']['open_level_code']);
         if (count($user_info_row['contents_row_array']['birthplace']['trusted_community_row_array']) && $user_info_row['contents_row_array']['birthplace']['trusted_community_row_array'][0]['community_type_name'] == ACSMsg::get_mst('community_type_master', 'D20')) {
             $user_info_row['contents_row_array']['birthplace']['trusted_community_flag'] = 0;
         } else {
             $user_info_row['contents_row_array']['birthplace']['trusted_community_flag'] = 1;
         }
         // trusted_community_id_csv
         $trusted_community_id_array = array();
         foreach ($user_info_row['contents_row_array']['birthplace']['trusted_community_row_array'] as $trusted_community_row) {
             array_push($trusted_community_id_array, $trusted_community_row['community_id']);
         }
         $user_info_row['contents_row_array']['birthplace']['trusted_community_id_csv'] = implode(',', $trusted_community_id_array);
     }
     // birthday
     if ($user_info_row['contents_row_array']['birthday']['open_level_name'] == ACSMsg::get_mst('open_level_master', 'D05')) {
         // trusted_community_flag
         $user_info_row['contents_row_array']['birthday']['trusted_community_row_array'] = ACSCommunity::get_contents_trusted_community_row_array($user_community_id, $user_info_row['contents_row_array']['birthday']['contents_type_code'], $user_info_row['contents_row_array']['birthday']['open_level_code']);
         if (count($user_info_row['contents_row_array']['birthday']['trusted_community_row_array']) && $user_info_row['contents_row_array']['birthday']['trusted_community_row_array'][0]['community_type_name'] == ACSMsg::get_mst('community_type_master', 'D20')) {
             $user_info_row['contents_row_array']['birthday']['trusted_community_flag'] = 0;
         } else {
             $user_info_row['contents_row_array']['birthday']['trusted_community_flag'] = 1;
         }
         // trusted_community_id_csv
         $trusted_community_id_array = array();
         foreach ($user_info_row['contents_row_array']['birthday']['trusted_community_row_array'] as $trusted_community_row) {
             array_push($trusted_community_id_array, $trusted_community_row['community_id']);
         }
         $user_info_row['contents_row_array']['birthday']['trusted_community_id_csv'] = implode(',', $trusted_community_id_array);
     }
     // flat
     foreach ($user_info_row['contents_row_array'] as $contents_key => $contents_row) {
         $user_info_row[$contents_key] = $contents_row['contents_value'];
     }
     return $user_info_row;
 }
Пример #21
0
 function execute()
 {
     $context = $this->getContext();
     $controller = $context->getController();
     $request = $context->getRequest();
     $user = $context->getUser();
     if (!$this->get_execute_privilege()) {
         $controller->forward(SECURE_MODULE, SECURE_ACTION);
         return;
     }
     //mode 画面の遷移を取得する
     $move_id = $request->getParameter('move_id');
     // 公開範囲
     $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'));
     // ユーザー情報
     $acs_user_info_row = $user->getAttribute('acs_user_info_row');
     // 対象となるコミュニティIDを取得
     $community_id = $request->getParameter('community_id');
     $bbs_id = $request->getParameter('bbs_id');
     /* 入力画面より */
     if ($move_id == 1) {
         // 画面上のフォーム情報を取得する
         $form['subject'] = $request->getParameter('subject');
         //件名:subject
         // 本文
         $form['body'] = $request->getParameter('body');
         //内容:body
         $form['community_id'] = $community_id;
         //当コミュニティのID
         $form['user_community_id'] = $acs_user_info_row['user_community_id'];
         // 投稿者print "form_row:";
         $form['bbs_id'] = $bbs_id;
         // 投稿者print "form_row:";
         $user->setAttribute('new_form_obj', $form);
         return View::SUCCESS;
         /* 登録確定ボタン「はい」より */
     } else {
         if ($move_id == 2) {
             // 画面上のフォーム情報を取得する
             $form = $user->getAttribute('new_form_obj');
             // DBへの書き込み等
             $ret = ACSBBS::set_bbs_res($form);
             if ($ret) {
                 // 掲示板アクセス履歴へ記録
                 ACSBBS::set_bbs_access_history($acs_user_info_row['user_community_id'], $form['bbs_id']);
                 // bbs情報取得
                 $bbs_row = ACSBBS::get_bbs_row($request->getParameter('bbs_id'));
                 // MLオプションありの場合
                 if ($bbs_row['ml_send_flag'] == 't') {
                     // MLステータスの取得
                     $ml_status_row = ACSCommunity::get_contents_row($community_id, ACSMsg::get_mst('contents_type_master', 'D62'));
                     $ml_status = $ml_status_row['contents_value'];
                     // ML有りの場合メールを送信
                     if ($ml_status == 'ACTIVE') {
                         // "Re:"の削除
                         $subject_msg = mb_ereg_replace(ACS_COMMUNITY_ML_SUBJECT_PREFIX_CLEAR_REGEX, '', $form['subject']);
                         // 件名編集
                         $subject = "Re: " . str_replace('{BBSID}', $bbs_id, ACS_COMMUNITY_ML_SUBJECT_FORMAT) . $subject_msg;
                         // ML送信
                         ACSCommunityMail::send_community_mailing_list($community_id, $acs_user_info_row['mail_addr'], $subject, $form['body']);
                     }
                 }
             } else {
                 echo ACSMsg::get_msg('Community', 'BBSResPreAction.class.php', 'M001');
             }
             // 書き込み後、BBS Top 表示の処理へ
             $action_url = $this->getControllerPath('Community', 'BBS') . '&community_id=' . $community_id . '&move_id=4';
             header("Location: {$action_url}");
         }
     }
 }
Пример #22
0
 /**
  * フォルダ全体の公開範囲取得
  *
  * @param  $community_id
  * @return open_level_row
  */
 static function select_contents_folder_open_level_row($community_id)
 {
     $row = ACSCommunity::get_contents_row($community_id, ACSMsg::get_mst('contents_type_master', 'D31'));
     // 閲覧許可コミュニティ取得
     $row['trusted_community_row_array'] = ACSCommunity::get_contents_trusted_community_row_array($community_id, $row['contents_type_code'], $row['open_level_code']);
     return $row;
 }
Пример #23
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
     $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();
 }