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;
     }
     /* コミュニティ情報取得 */
     $target_community_id = $request->getParameter('community_id');
     $target_community_row = ACSCommunity::get_community_row($request->getParameter('community_id'));
     /* 削除処理 */
     $delete_user_community_id_array = $request->getParameter('delete_user_community_id_array');
     $ret = ACSCommunity::delete_community_member($target_community_id, $delete_user_community_id_array);
     if (!$ret) {
         "ERROR : delete community member failed";
         exit;
     }
     /* 完了画面表示 */
     // 引数セット
     $community_top_url = $this->getControllerPath('Community', '');
     $community_top_url .= '&community_id=' . $target_community_row['community_id'];
     $community_top_link_name = ACSMsg::get_tag_replace(ACSMsg::get_msg('Community', 'DeleteCommunityMemberAction.class.php', 'BACK_TO_CM'), array("{COMMUNITY_NAME}" => $target_community_row['community_name']));
     $done_obj = new ACSDone();
     $done_obj->set_title(ACSMsg::get_msg('Community', 'DeleteCommunityMemberAction.class.php', 'M001'));
     $done_obj->set_message(ACSMsg::get_msg('Community', 'DeleteCommunityMemberAction.class.php', 'M002'));
     $done_obj->add_link($community_top_link_name, $community_top_url);
     $request->setAttribute('done_obj', $done_obj);
     // 画面呼び出し
     $controller->forward('Common', 'Done');
 }
 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 = $request->ACSgetParameter('id');
     // 対象となるマイフレンズグループコミュニティIDを取得
     $friends_group_community_id = $request->ACSgetParameter('community_id');
     if (!$this->get_execute_privilege()) {
         $controller->forward(SECURE_MODULE, SECURE_ACTION);
         return;
     }
     // get
     // ユーザ情報
     $target_user_info_row = ACSUser::get_user_info_row_by_user_community_id($user_community_id);
     // マイフレンズ一覧
     $friends_row_array = ACSUser::get_friends_row_array($user_community_id);
     // 指定されたマイフレンズグループの情報
     $friends_group_row = ACSCommunity::get_community_row($friends_group_community_id);
     // 指定されたマイフレンズグループのメンバ一覧
     $friends_group_member_row_array = ACSCommunity::get_community_member_user_info_row_array($friends_group_community_id);
     // set
     $request->setAttribute('target_user_info_row', $target_user_info_row);
     $request->setAttribute('friends_row_array', $friends_row_array);
     $request->setAttribute('friends_group_row', $friends_group_row);
     $request->setAttribute('friends_group_member_row_array', $friends_group_member_row_array);
     return View::INPUT;
 }
 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_community_id = $request->getParameter('community_id');
     $target_community_folder_id = $request->getParameter('folder_id');
     $target_community_row = ACSCommunity::get_community_row($target_community_id);
     $target_community_row['top_page_url'] = $this->getControllerPath('Community', DEFAULT_ACTION) . '&community_id=' . $target_community_row['community_id'];
     // action
     $action_url = $this->getControllerPath('Community', 'UploadFile') . '&community_id=' . $target_community_id . '&folder_id=' . $target_community_folder_id;
     // フォルダURL 通常表示
     $folder_url = $this->getControllerPath('Community', 'Folder') . '&community_id=' . $target_community_id . '&folder_id=' . $target_community_folder_id;
     // フォルダURL グループ表示
     $folder_group_mode_url = $this->getControllerPath('Community', 'Folder') . '&community_id=' . $target_community_id . '&folder_id=' . $target_community_folder_id . '&mode=group';
     // set
     $this->setAttribute('file_contents_type_master_row_array_array', $request->getAttribute('file_contents_type_master_row_array_array'));
     $this->setAttribute('file_category_master_array', $request->getAttribute('file_category_master_array'));
     $this->setAttribute('file_contents_type_master_array', $request->getAttribute('file_contents_type_master_array'));
     $this->setAttribute('target_community_row', $target_community_row);
     $this->setAttribute('action_url', $action_url);
     $this->setAttribute('folder_url', $folder_url);
     $this->setAttribute('folder_group_mode_url', $folder_group_mode_url);
     $this->setScreenId("0001");
     $this->setTemplate('UploadFile.tpl.php');
     return parent::execute();
 }
 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;
 }
 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();
     $acs_user_info_row = $user->getAttribute('acs_user_info_row');
     // 対象となるユーザコミュニティIDを取得
     $user_community_id = $request->ACSgetParameter('id');
     if (!$this->get_execute_privilege()) {
         $controller->forward(SECURE_MODULE, SECURE_ACTION);
         return;
     }
     // ユーザ情報
     $target_user_info_row = ACSUser::get_user_info_row_by_user_community_id($user_community_id);
     // マイフレンズグループ
     $friends_group_row_array = ACSUser::get_friends_group_row_array($user_community_id);
     foreach ($friends_group_row_array as $index => $friends_group_row) {
         $friends_group_row_array[$index]['friends_row_array'] = ACSCommunity::get_community_member_user_info_row_array($friends_group_row['community_id']);
     }
     // set
     $request->setAttribute('target_user_info_row', $target_user_info_row);
     $request->setAttribute('friends_group_row_array', $friends_group_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');
     $target_community_id = $request->getParameter('community_id');
     $target_community_folder_id = $request->getParameter('folder_id');
     $file_id = $request->getParameter('file_id');
     $file_info_row = $request->getAttribute('file_info_row');
     $file_history_row = $request->getAttribute('file_history_row');
     // コミュニティ情報 //
     $target_community_row = ACSCommunity::get_community_row($target_community_id);
     $target_community_row['top_page_url'] = $this->getControllerPath('Community', DEFAULT_ACTION) . '&community_id=' . $target_community_row['community_id'];
     // 加工
     $file_history_row['display_file_name'] = $file_info_row['display_file_name'];
     $file_history_row['file_size_kb'] = number_format(ceil($file_history_row['file_size'] / 1024)) . " KB";
     $file_history_row['download_history_file_url'] = $this->getControllerPath('Community', 'DownloadHistoryFile') . '&community_id=' . $target_community_id . '&folder_id=' . $target_community_folder_id . '&file_id=' . $file_id . '&file_history_id=' . $file_history_row['file_history_id'];
     $action_url = $this->getControllerPath('Community', 'RestoreHistoryFile') . '&community_id=' . $target_community_id . '&folder_id=' . $target_community_folder_id . '&file_id=' . $file_id . '&file_history_id=' . $file_history_row['file_history_id'];
     // ファイル詳細情報URL
     $file_detail_url = $this->getControllerPath('Community', 'FileDetail') . '&community_id=' . $target_community_id . '&file_id=' . $file_id . '&folder_id=' . $target_community_folder_id;
     // set
     $this->setAttribute('target_community_row', $target_community_row);
     $this->setAttribute('action_url', $action_url);
     $this->setAttribute('file_detail_url', $file_detail_url);
     $this->setAttribute('file_history_row', $file_history_row);
     $this->setScreenId("0001");
     $this->setTemplate('RestoreHistoryFile.tpl.php');
     return parent::execute();
 }
 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;
     }
     $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);
     $form = $request->ACSGetParameters();
     $form['community_id'] = $community_row['community_id'];
     // 更新
     ACSCommunity::update_community_admin($acs_user_info_row, $form);
     $done_obj = new ACSDone();
     $done_obj->set_title(ACSMsg::get_msg('Community', 'EditCommunityAdminAction.class.php', 'M001'));
     $done_obj->set_message(ACSMsg::get_msg('Community', 'EditCommunityAdminAction.class.php', 'M002'));
     $done_obj->add_link(ACSMsg::get_tag_replace(ACSMsg::get_msg('Community', 'EditCommunityAdminAction.class.php', 'BACK_TO_CM'), array("{COMMUNITY_NAME}" => $community_row['community_name'])), $this->getControllerPath('Community', DEFAULT_ACTION) . '&community_id=' . $community_row['community_id']);
     $request->setAttribute('done_obj', $done_obj);
     $controller->forward('Common', 'Done');
 }
 function execute()
 {
     $context = $this->getContext();
     $controller = $context->getController();
     $request = $context->getRequest();
     $user = $context->getUser();
     $target_community_row = $request->getAttribute('target_community_row');
     $delete_user_info_row_array = $request->getAttribute('delete_user_info_row_array');
     // URL に付加する target_community
     $target_community_info = '&community_id=' . $target_community_row['community_id'];
     // コミュニティのURL
     $community_top_page_url = $this->getControllerPath('Community', 'Index');
     $community_top_page_url .= $target_community_info;
     // キャンセルURL
     $cancel_action_url = $community_top_page_url;
     // 削除アクションURL
     $delete_action_url = $this->getControllerPath('Community', 'DeleteCommunity');
     $delete_action_url .= $target_community_info;
     // コミュニティの概要
     $delete_community_row = array();
     $delete_community_row['community_name'] = $target_community_row['community_name'];
     $delete_community_row['top_page_url'] = $this->getControllerPath('Community', DEFAULT_ACTION) . $target_community_info;
     $delete_community_row['image_url'] = ACSCommunity::get_image_url($target_community_row['community_id']);
     $delete_community_row['community_profile'] = $target_community_row['community_profile']['contents_value'];
     $this->setAttribute('community_top_page_url', $community_top_page_url);
     $this->setAttribute('target_community_name', $target_community_row['community_name']);
     $this->setAttribute('delete_community_row', $delete_community_row);
     // form のアクション先 URL
     $this->setAttribute('cancel_action_url', $cancel_action_url);
     $this->setAttribute('delete_action_url', $delete_action_url);
     // テンプレート
     $this->setScreenId("0001");
     $this->setTemplate('DeleteCommunity_confirm.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');
     // 対象となるコミュニティIDを取得
     $community_id = $request->ACSgetParameter('community_id');
     $form = $request->ACSGetParameters();
     // コミュニティ情報
     $community_row = ACSCommunity::get_community_profile_row($community_id);
     if ($form['mode'] == 'parent') {
         $parent_community_id = $form['delete_community_id'];
         $sub_community_id = $community_id;
     } elseif ($form['mode'] == 'sub') {
         $parent_community_id = $community_id;
         $sub_community_id = $form['delete_community_id'];
     }
     // 削除
     ACSCommunity::delete_community_link($parent_community_id, $sub_community_id);
     // forward
     $done_obj = new ACSDone();
     $done_obj->set_title(ACSMsg::get_msg('Community', 'DeleteCommunityLinkAction.class.php', 'M001'));
     $done_obj->set_message(ACSMsg::get_msg('Community', 'DeleteCommunityLinkAction.class.php', 'M002'));
     $done_obj->add_link(ACSMsg::get_msg('Community', 'DeleteCommunityLinkAction.class.php', 'M003'), $this->getControllerPath('Community', 'CommunityLink') . '&community_id=' . $community_row['community_id']);
     $done_obj->add_link(ACSMsg::get_tag_replace(ACSMsg::get_msg('Community', 'DeleteCommunityLinkAction.class.php', 'BACK_TO_CM'), array("{COMMUNITY_NAME}" => $community_row['community_name'])), $this->getControllerPath('Community', DEFAULT_ACTION) . '&community_id=' . $community_row['community_id']);
     $request->setAttribute('done_obj', $done_obj);
     $controller->forward('Common', 'Done');
 }
 /**
  * メールフォーム入力画面の表示
  */
 function getMailInputView(&$controller, &$request, &$user)
 {
     $params =& $request->getParameters();
     $schedule =& $request->getAttribute('schedule');
     $target_community_id = $params['community_id'];
     $target_schedule_id = $params['schedule_id'];
     // ログインユーザ情報の設定
     $acs_user_info_row =& $user->getAttribute('acs_user_info_row');
     $request->setAttributeByRef('acs_user_info_row', $acs_user_info_row);
     // 幹事でないスケジュールや決定済の場合セキュリティエラー
     if ($schedule->is_fixed() || !$schedule->is_organizer($acs_user_info_row)) {
         // このページへアクセスすることはできません。
         $controller->forward(SECURE_MODULE, SECURE_ACTION);
         return;
     }
     // コミュニティ情報の取得
     $target_community_row = ACSCommunity::get_community_row($target_community_id);
     $request->setAttributeByRef('target_community_row', $target_community_row);
     // 決定候補日時の設定
     $request->setAttributeByRef('mailentry_adjustment_id', $params['mailentry_adjustment_id']);
     // エラー時の再表示用
     $request->setAttribute('mail_subject', $params['mail_subject']);
     $request->setAttribute('mail_message', $params['mail_message']);
     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();
 }
Ejemplo n.º 13
0
 /**
  * 初期画面
  * GETメソッドの場合、呼ばれる
  */
 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;
     }
     // ログインユーザ情報の設定
     $acs_user_info_row =& $user->getAttribute('acs_user_info_row');
     $request->setAttributeByRef('acs_user_info_row', $acs_user_info_row);
     // コミュニティ情報の取得
     $target_community_id = $request->getParameter('community_id');
     $target_community_row = ACSCommunity::get_community_row($target_community_id);
     $request->setAttributeByRef('target_community_row', $target_community_row);
     // コミュニティ人数の取得
     $request->setAttribute('member_count', ACSCommunity::get_community_member_count($target_community_id));
     // スケジュールインスタンス配列の取得
     $schedule_array =& ACSSchedule::get_community_schedule_instance_list($target_community_id);
     $request->setAttributeByRef('schedules', $schedule_array);
     // スケジュール人数情報配列の取得
     $schedule_persons_array =& ACSSchedule::get_total_person_count($target_community_id);
     $request->setAttributeByRef('schedule_persons', $schedule_persons_array);
     return View::SUCCESS;
 }
 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;
     }
     $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);
     $form = $request->ACSGetParameters();
     $ret = ACSExternalRSS::set_external_rss_contents($community_id, $form);
     // forward
     $done_obj = new ACSDone();
     if ($ret) {
         $done_obj->set_title(ACSMsg::get_msg('Community', 'EditExternalRSSAction.class.php', 'M001'));
         $done_obj->set_message(ACSMsg::get_msg('Community', 'EditExternalRSSAction.class.php', 'M002'));
         $done_obj->add_link($community_row['community_name'] . ' ' . ACSMsg::get_msg('Community', 'EditExternalRSSAction.class.php', 'M003'), $this->getControllerPath('Community', DEFAULT_ACTION) . '&community_id=' . $community_row['community_id']);
     } else {
         $done_obj->set_title(ACSMsg::get_msg('Community', 'EditExternalRSSAction.class.php', 'M004'));
     }
     $request->setAttribute('done_obj', $done_obj);
     $controller->forward('Common', 'Done');
 }
 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;
     }
     $acs_user_info_row = $user->getAttribute('acs_user_info_row');
     // 対象となるコミュニティIDを取得
     $community_id = $request->ACSGetParameter('community_id');
     // コミュニティ情報
     $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);
     // 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);
     return View::SUCCESS;
 }
Ejemplo n.º 16
0
 function getDefaultView()
 {
     $context = $this->getContext();
     $controller = $context->getController();
     $request = $context->getRequest();
     $user = $context->getUser();
     $acs_user_info_row = $user->getAttribute('acs_user_info_row');
     $community_id = $request->getParameter('community_id');
     $bbs_id = $request->getParameter('bbs_id');
     // コミュニティ情報
     $community_row = ACSCommunity::get_community_row($community_id);
     // BBS記事一覧
     $bbs_row = ACSBBS::get_bbs_row($bbs_id);
     // 信頼済みコミュニティ一覧
     $bbs_row['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', $bbs_row);
     // (投稿者本人 or コミュニティ管理者)のみがアクセスできる
     if ($acs_user_info_row['user_community_id'] != $bbs_row['user_community_id'] && !ACSCommunity::is_community_admin($acs_user_info_row['user_community_id'], $community_row['community_id'])) {
         $controller->forward(SECURE_MODULE, SECURE_ACTION);
         return;
     }
     return View::INPUT;
 }
 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();
     // カテゴリグループマスタ
     $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']);
     }
     $form_name = $request->ACSgetParameter('form_name');
     $prefix = $request->ACSgetParameter('prefix');
     // 検索時
     if ($form['search']) {
         // コミュニティ一覧を取得する
         $community_row_array = ACSCommunity::search_community_row_array($acs_user_info_row['user_community_id'], $form);
     } else {
         $community_row_array = ACSCommunity::get_community_row_array($acs_user_info_row['user_community_id']);
     }
     // set
     $request->setAttribute('community_row_array', $community_row_array);
     $request->setAttribute('category_group_master_row_array', $category_group_master_row_array);
     $request->setAttribute('form', $form);
     $request->setAttribute('form_name', $form_name);
     $request->setAttribute('prefix', $prefix);
     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');
     $form = $form = $request->ACSGetParameters();
     // 対象となるコミュニティIDを取得
     $community_id = $request->ACSgetParameter('community_id');
     // コミュニティ情報
     $community_row = ACSCommunity::get_community_profile_row($community_id);
     // 承認が必要か
     $is_admission_required = ACSCommunity::is_admission_required_for_join_community($acs_user_info_row['user_community_id'], $community_id);
     // forward
     $done_obj = new ACSDone();
     $done_obj->set_message(ACSMsg::get_msg('Community', 'JoinCommunityAction.class.php', 'M003'));
     $done_obj->add_link($community_row['community_name'] . ' ' . ACSMsg::get_msg('Community', 'JoinCommunityAction.class.php', 'M004'), $this->getControllerPath('Community', DEFAULT_ACTION) . '&community_id=' . $community_row['community_id']);
     if ($is_admission_required) {
         // コミュニティ参加承認待ち登録
         $waiting_id = ACSWaiting::set_waiting_for_join_community($community_id, $acs_user_info_row['user_community_id'], $form['message']);
         // 参加承認依頼通知メール
         ACSWaiting::send_admission_request_notify_mail($waiting_id);
         $done_obj->set_title(ACSMsg::get_msg('Community', 'JoinCommunityAction.class.php', 'M001'));
     } else {
         // コミュニティメンバ登録
         $community_member_form = array();
         $community_member_form['community_id'] = $community_id;
         $community_member_form['user_community_id'] = $acs_user_info_row['user_community_id'];
         ACSCommunity::set_community_member($community_member_form);
         $done_obj->set_title(ACSMsg::get_msg('Community', 'JoinCommunityAction.class.php', 'M002'));
     }
     $request->setAttribute('done_obj', $done_obj);
     $controller->forward('Common', 'Done');
 }
 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_community_id = $request->getParameter('community_id');
     $target_community_folder_id = $request->getParameter('folder_id');
     $target_file_id = $request->getParameter('file_id');
     $file_history_id = $request->getParameter('file_history_id');
     $view_mode = $request->getParameter('mode');
     $target_community_row = ACSCommunity::get_community_row($target_community_id);
     // ファイルダウンロード処理
     $community_folder_obj = new ACSCommunityFolder($target_community_id, $acs_user_info_row, $target_community_folder_id);
     $folder_obj = $community_folder_obj->get_folder_obj();
     // フォルダの公開範囲でアクセス制御
     if (!$community_folder_obj->has_privilege($target_community_row)) {
         $controller->forward(SECURE_MODULE, SECURE_ACTION);
         return;
     }
     // ルートフォルダ直下のファイルはコミュニティメンバ以外アクセス不可
     if ($folder_obj->get_is_root_folder() && $user->hasCredential('COMMUNITY_MEMBER')) {
         $controller->forward(SECURE_MODULE, SECURE_ACTION);
         return;
     }
     $file_obj = ACSFile::get_file_info_instance($target_file_id);
     if ($view_mode == 'thumb') {
         $ret = $file_obj->view_image($file_history_id, $view_mode);
     } else {
         $file_obj->download_history_file($file_history_id, $view_mode);
     }
 }
Ejemplo n.º 20
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;
 }
 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;
 }
Ejemplo n.º 22
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;
 }
 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_community_id = $request->getParameter('community_id');
     $target_community_folder_id = $request->getParameter('folder_id');
     $file_id = $request->getParameter('file_id');
     // コミュニティ情報 //
     $target_community_row = ACSCommunity::get_community_row($target_community_id);
     $target_community_row['top_page_url'] = $this->getControllerPath('Community', DEFAULT_ACTION) . '&community_id=' . $target_community_row['community_id'];
     $action_url = $this->getControllerPath('Community', 'UpdateFile') . '&community_id=' . $target_community_id . '&folder_id=' . $target_community_folder_id . '&file_id=' . $file_id;
     // ファイル詳細情報URL
     $file_detail_url = $this->getControllerPath('Community', 'FileDetail') . '&community_id=' . $target_community_id . '&file_id=' . $file_id . '&folder_id=' . $target_community_folder_id;
     // set
     $this->setAttribute('file_contents_type_master_row_array_array', $request->getAttribute('file_contents_type_master_row_array_array'));
     $this->setAttribute('file_category_master_array', $request->getAttribute('file_category_master_array'));
     $this->setAttribute('file_contents_type_master_array', $request->getAttribute('file_contents_type_master_array'));
     $this->setAttribute('target_community_row', $target_community_row);
     $this->setAttribute('action_url', $action_url);
     $this->setAttribute('file_detail_url', $file_detail_url);
     $this->setScreenId("0001");
     $this->setTemplate('UpdateFile.tpl.php');
     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();
     //get
     //$target_user_info_row = $request->getAttribute('target_user_info_row');
     //$diary_row = $request->getAttribute('diary_row_array');
     //$open_level_master_row_array = $request->getAttribute('open_level_master_row_array');
     //$friends_group_row_array = $request->getAttribute('friends_group_row_array');
     //$acs_user_info_row = $user->getAttribute('acs_user_info_row');
     // 対象となるUserIDを取得
     $user_id = $request->getParameter('id');
     // Diary情報
     //$diary_row_array = $request->getAttribute('diary_row_array');
     // ファイル情報
     $new_file_obj = $user->getAttribute('new_file_obj');
     $new_file_info = $user->getAttribute('new_file_info');
     //ユーザ入力情報
     $form = $user->getAttribute('new_form_obj');
     // form action
     $action_url = $this->getControllerPath('User', 'DiaryPre') . '&id=' . $user_id . '&move_id=2';
     $back_url = $this->getControllerPath('User', 'Diary') . '&id=' . $user_id . '&move_id=3';
     // DiaryトップページのURL
     $diary_top_page_url = $this->getControllerPath('User', 'Diary') . '&id=' . $user_id;
     // 加工
     //ファイルの画像URL
     $form['file_url'] = "";
     if ($form['file_name'] != "") {
         $file_name = $form['file_name'];
         $type = $new_file_obj['type'];
         $form['file_url_alink'] = $this->getControllerPath('User', 'DiaryPreImage') . '&type=' . $type . "&new_file_info=" . $new_file_info;
     }
     // set
     // 選択されたマイフレンズグループ情報取得
     if ($form['trusted_community_id_array']) {
         $form['trusted_community_row_array'] = array();
         foreach ($form['trusted_community_id_array'] as $trusted_community_id) {
             $selected_friends_group_community_row = ACSCommunity::get_community_row($trusted_community_id);
             array_push($form['trusted_community_row_array'], $selected_friends_group_community_row);
         }
     }
     $this->setAttribute('action_url', $action_url);
     $this->setAttribute('back_url', $back_url);
     $this->setAttribute('diary_top_page_url', $diary_top_page_url);
     $this->setAttribute('form', $form);
     //$this->setAttribute('new_file_obj', $new_file_obj);
     //$this->setAttribute('new_file_info', $new_file_info);
     //$this->setAttribute('diary_row', $diary_row);
     // エラーメッセージ
     $this->setAttribute('error_message', $this->getErrorMessage($controller, $request, $user));
     // テンプレート
     $this->setScreenId("0001");
     $this->setTemplate('DiaryPre.tpl.php');
     return parent::execute();
 }
 /**
  * execute メソッド
  * メッセージパッシング
  * @param object   $user			ユーザ情報
  * @param object   $request		 リクエスト情報
  * @param object   $controller	  &アドレス コントローラ
  *
  * @return parent::execute()		  BaseViewクラス実行
  */
 function execute()
 {
     $context = $this->getContext();
     $controller = $context->getController();
     $request = $context->getRequest();
     $user = $context->getUser();
     //actionクラスから通知setされたuser_community_id を取得する
     $user_community_id = $request->getAttribute('community_id');
     //actionクラスから通知setされたtarget_community_info_row を取得し$profile変数のオブジェクト配列とする
     $profile = $request->getAttribute('target_community_info_row');
     // 画像ファイルのパスを設定
     $profile['image_url'] = ACSCommunity::get_image_url($user_community_id);
     $file_id = "";
     //更新処理用 (新規追加への対応)
     // メニュー設定 新規登録以外は削除メニューを表示する
     $image_new_mode = $request->getAttribute('image_new_add');
     $menu = array();
     if ($image_new_mode) {
         $menu['delete_image_url'] = null;
     } else {
         $file_id = $profile['file_id'];
         //更新処理用 追加
         //削除の意思確認URL ver1.3
         $delete_confirm_url = $this->getControllerPath('Community', 'DeleteProfileImage');
         $delete_confirm_url .= '&community_id=' . $user_community_id;
         $delete_confirm_url .= '&file_id=' . $file_id;
         $menu['delete_image_url'] = $delete_confirm_url;
     }
     $menu['image_new_mode'] = $image_new_mode;
     //画像のアップロードURL ver1.1
     $upload_image_url = $this->getControllerPath('Community', 'UploadProfileImage');
     $upload_image_url .= '&community_id=' . $user_community_id;
     $upload_image_url .= '&image_new_mode=' . $image_new_mode;
     //ver1.1
     $upload_image_url .= '&file_id=' . $file_id;
     //更新処理用 追加
     // エラーメッセージ設定
     $error_msg_array = array();
     $error_row = $request->getAttribute('error_row');
     if ($error_row) {
         foreach ($error_row as $key => $msg) {
             array_push($error_msg_array, $msg);
         }
     }
     //set
     $back_url = $request->getAttribute('back_url');
     $this->setAttribute('back_url', $back_url);
     $this->setAttribute('profile', $profile);
     $this->setAttribute('menu', $menu);
     $this->setAttribute('error_msg_array', $error_msg_array);
     $this->setAttribute('upload_image_url', $upload_image_url);
     // テンプレート
     $this->setScreenId("0001");
     $this->setTemplate('EditProfileImage.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
     $community_row = $request->getAttribute('community_row');
     $input_form = $request->getAttribute('form');
     // エラー時の入力値を取得
     $form = array();
     if ($input_form) {
         // 選択されたコミュニティ情報取得
         $trusted_community_row_array = array();
         if ($input_form['trusted_community_id_array']) {
             foreach ($input_form['trusted_community_id_array'] as $trusted_community_id) {
                 // 初期化
                 $_community_row = array();
                 $trusted_community_row = array();
                 $_community_row = ACSCommunity::get_community_row($trusted_community_id);
                 $trusted_community_row['community_id'] = $_community_row['community_id'];
                 $trusted_community_row['community_name'] = $_community_row['community_name'];
                 $trusted_community_row['top_page_url'] = $this->getControllerPath('Community', DEFAULT_ACTION);
                 $trusted_community_row['top_page_url'] .= '&community_id=' . $_community_row['community_id'];
                 array_push($trusted_community_row_array, $trusted_community_row);
             }
         }
         $form['link_type'] = $input_form['link_type'];
         $form['trusted_community_row_array'] = $trusted_community_row_array;
         $form['message'] = $input_form['message'];
     }
     // URL
     $action_url = $this->getControllerPath('Community', 'AddCommunityLink') . '&community_id=' . $community_row['community_id'];
     $select_trusted_community_url = $this->getControllerPath('Community', 'SelectTrustedCommunity');
     // コミュニティトップページのURL
     $community_top_page_url = $this->getControllerPath('Community', DEFAULT_ACTION) . '&community_id=' . $community_row['community_id'];
     // コミュニティリンク設定URL
     $community_link_url = $this->getControllerPath('Community', 'CommunityLink') . '&community_id=' . $community_row['community_id'];
     // テンプレート
     $this->setScreenId("0001");
     $this->setTemplate('AddCommunityLink.tpl.php');
     // エラーメッセージ
     $this->setAttribute('error_message', $this->getErrorMessage($controller, $request, $user));
     // set
     $this->setAttribute('community_row', $community_row);
     $this->setAttribute('action_url', $action_url);
     $this->setAttribute('select_trusted_community_url', $select_trusted_community_url);
     $this->setAttribute('target_user_info_row', $target_user_info_row);
     $this->setAttribute('community_top_page_url', $community_top_page_url);
     $this->setAttribute('community_link_url', $community_link_url);
     $this->setAttribute('form', $form);
     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');
     // 対象となるコミュニティIDを取得
     $target_community_id = $request->getParameter('community_id');
     // 対象となるフォルダIDを取得
     $target_community_folder_id = $request->getParameter('folder_id');
     // 詳細情報を表示するファイルIDを取得
     $file_id = $request->getParameter('file_id');
     // コミュニティ管理者か
     $is_community_admin = false;
     if (ACSCommunity::is_community_admin($acs_user_info_row['user_community_id'], $target_community_id)) {
         $is_community_admin = true;
     }
     // 表示するページの所有者情報取得
     $target_community_row = ACSCommunity::get_community_row($target_community_id);
     // フォルダ情報取得
     $community_folder_obj = new ACSCommunityFolder($target_community_id, $acs_user_info_row, $target_community_folder_id);
     $folder_obj = $community_folder_obj->get_folder_obj();
     // ファイル情報取得
     $file_obj = ACSFile::get_file_info_instance($file_id);
     // ファイル公開設定
     $submit_kind = $request->getParameter('submit_kind');
     // プットファイルでない場合
     if ($file_obj->get_owner_community_id() == $target_community_id) {
         if ($submit_kind != "" && $is_community_admin) {
             // ファイル公開URL作成
             if ($submit_kind == "insert") {
                 $form['folder_id'] = $target_community_folder_id;
                 $form['community_id'] = $target_community_id;
                 ACSFileDetailInfo::insert_file_public_access($file_id, $form);
                 // ファイル公開URL削除
             } else {
                 if ($submit_kind == "delete") {
                     ACSFileDetailInfo::delete_file_public_access($file_id);
                     // ファイル公開アクセス数リセット
                 } else {
                     if ($submit_kind == "reset") {
                         $form['access_count'] = 0;
                         $form['access_start_date'] = "'now'";
                         ACSFileDetailInfo::update_file_public_access($file_id, $form);
                     }
                 }
             }
         }
     }
     $contents_link_url = $this->getControllerPath('Community', 'FileDetail') . "&community_id=" . $target_community_id . "&file_id=" . $file_obj->get_file_id() . "&folder_id=" . $community_folder_obj->folder_obj->get_folder_id();
     header("Location: {$contents_link_url}");
     return View::SUCCESS;
 }
Ejemplo n.º 29
0
 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;
 }
 /**
  * コミュニティ削除処理
  */
 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;
     }
     /* コミュニティ情報取得 */
     $target_community_id = $request->getParameter('community_id');
     $target_community_row = ACSCommunity::get_community_row($request->getParameter('community_id'));
     /* 削除処理 */
     ACSDB::_do_query("BEGIN");
     $ret = ACSCommunity::delete_community($target_community_id);
     if (!$ret) {
         ACSDB::_do_query("ROLLBACK");
         "ERROR : delete community failed";
         exit;
     }
     // フォルダのディレクトリ移動
     $from_dir = ACS_FOLDER_DIR . "/";
     $from_dir .= ACSFile::get_upload_file_save_path($target_community_id);
     if (file_exists($from_dir)) {
         $to_dir = ACS_TRASH_FOLDER_DIR . "/";
         $to_dir .= ACSFile::get_upload_file_save_path($target_community_id);
         if (!file_exists(ACS_TRASH_FOLDER_DIR)) {
             // 置き場所ディレクトリがなければ作成する
             mkdir(ACS_TRASH_FOLDER_DIR);
             chmod(ACS_TRASH_FOLDER_DIR, 0777);
         }
         $ret = rename($from_dir, $to_dir);
         if (!$ret) {
             ACSDB::_do_query("ROLLBACK");
             "ERROR : delete community failed";
             exit;
         }
     }
     ACSDB::_do_query("COMMIT");
     /* 完了画面表示 */
     // 引数セット
     $message = ACSMsg::get_tag_replace(ACSMsg::get_msg('Community', 'DeleteCommunityAction.class.php', 'DELETECM'), array('{TARGET_COMMUNITY_NAME}' => $target_community_row['community_name']));
     $top_page_url = $this->getControllerPath('User', 'Index');
     $top_page_link_name = ACSMsg::get_msg('Community', 'DeleteCommunityAction.class.php', 'M001');
     $done_obj = new ACSDone();
     $done_obj->set_title(ACSMsg::get_msg('Community', 'DeleteCommunityAction.class.php', 'M002'));
     $done_obj->set_message($message);
     $done_obj->add_link($top_page_link_name, $top_page_url);
     $request->setAttribute('done_obj', $done_obj);
     // 画面呼び出し
     $controller->forward('Common', 'Done');
 }