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'); // 対象となるコミュニティIDを取得 $community_id = $request->ACSgetParameter('community_id'); // コミュニティ情報 $community_row = ACSCommunity::get_community_row($community_id); // コミュニティメンバ一覧 $community_member_user_info_row_array = ACSCommunity::get_community_member_user_info_row_array($community_id); // マイフレンズ一覧 $friends_row_array = ACSUser::get_friends_row_array($acs_user_info_row['user_community_id']); // set $request->setAttribute('community_row', $community_row); $request->setAttribute('community_member_user_info_row_array', $community_member_user_info_row_array); $request->setAttribute('friends_row_array', $friends_row_array); return View::INPUT; }
function getDefaultView() { $context = $this->getContext(); $controller = $context->getController(); $request = $context->getRequest(); $user = $context->getUser(); $acs_user_info_row = $user->getAttribute('acs_user_info_row'); // 対象となるコミュニティIDを取得 $community_id = $request->getParameter('community_id'); // 対象となるbbs_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']); // 返信記事 $bbs_row['bbs_res_row_array'] = ACSBBS::get_bbs_res_row_array($bbs_row['bbs_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')); // 掲示板アクセス履歴 if ($acs_user_info_row['is_acs_user']) { ACSBBS::set_bbs_access_history($acs_user_info_row['user_community_id'], $bbs_row['bbs_id']); } // set $request->setAttribute('community_row', $community_row); $request->setAttribute('bbs_row', $bbs_row); $request->setAttribute('open_level_master_row_array', $open_level_master_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(); 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'); // 削除するコミュニティリンクのコミュニティID $delete_community_id = $request->ACSgetParameter('delete_community_id'); // mode $mode = $request->ACSgetParameter('mode'); // コミュニティ情報 $community_row = ACSCommunity::get_community_row($community_id); // 削除するコミュニティ情報 if ($mode == 'parent') { $delete_community_row = ACSCommunity::get_parent_community_row($delete_community_id, $community_id); } elseif ($mode == 'sub') { $delete_community_row = ACSCommunity::get_sub_community_row($community_id, $delete_community_id); } // set $request->setAttribute('community_row', $community_row); $request->setAttribute('delete_community_row', $delete_community_row); $request->setAttribute('mode', $mode); 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_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); } }
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 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'); }
/** * 初期画面 * 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 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'); $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 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; }
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(); $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(); $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 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(); // コミュニティ情報 // 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(); }
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; }
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(); 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'); }
function execute() { $context =& $this->getContext(); $controller = $context->getController(); $user = $context->getUser(); $request = $context->getRequest(); $acs_user_info_row = $user->getAttribute('acs_user_info_row'); // 対象となるコミュニティIDを取得 $community_id = $request->ACSGetParameter('community_id'); // コミュニティ存在チェック $community_row = ACSCommunity::get_community_row($community_id); if (!$community_row || $community_row['community_type_name'] != ACSMsg::get_mst('community_type_master', 'D40')) { return View::ERROR; } // 権限チェック if (!$this->get_execute_privilege()) { $controller->forward(SECURE_MODULE, SECURE_ACTION); return; } // コミュニティ情報 $community_row = ACSCommunity::get_community_profile_row($community_id); // サブコミュニティ情報の一覧 $sub_community_row_array = ACSCommunity::get_sub_community_row_array($community_id); // 親コミュニティ情報の一覧 $parent_community_row_array = ACSCommunity::get_parent_community_row_array($community_id); // コミュニティメンバ, コミュニティ管理者 $community_member_user_info_row_array = ACSCommunity::get_community_member_user_info_row_array($community_id); $community_admin_user_info_row_array = ACSCommunity::get_community_admin_user_info_row_array($community_id); // 待機: コミュニティ参加 承認待ち $waiting_for_join_community_row_array = ACSWaiting::get_waiting_row_array($community_id, ACSMsg::get_mst('waiting_type_master', 'D20'), ACSMsg::get_mst('waiting_status_master', 'D10')); // 待機: 親コミュニティ追加, サブコミュニティ追加 $waiting_for_parent_community_link_row_array = ACSWaiting::get_waiting_row_array($community_id, ACSMsg::get_mst('waiting_type_master', 'D40'), ACSMsg::get_mst('waiting_status_master', 'D10')); $waiting_for_sub_community_link_row_array = ACSWaiting::get_waiting_row_array($community_id, ACSMsg::get_mst('waiting_type_master', 'D50'), ACSMsg::get_mst('waiting_status_master', 'D10')); // 最新情報: BBS // BBS記事一覧 $bbs_row_array = ACSBBS::get_bbs_row_array($community_id); foreach ($bbs_row_array as $index => $bbs_row) { // 信頼済みコミュニティ一覧 $bbs_row_array[$index]['trusted_community_row_array'] = ACSBBS::get_bbs_trusted_community_row_array($bbs_row['bbs_id']); } // set $request->setAttribute('community_row', $community_row); $request->setAttribute('sub_community_row_array', $sub_community_row_array); $request->setAttribute('parent_community_row_array', $parent_community_row_array); $request->setAttribute('community_member_user_info_row_array', $community_member_user_info_row_array); $request->setAttribute('community_admin_user_info_row_array', $community_admin_user_info_row_array); $request->setAttribute('waiting_for_join_community_row_array', $waiting_for_join_community_row_array); $request->setAttribute('waiting_for_parent_community_link_row_array', $waiting_for_parent_community_link_row_array); $request->setAttribute('waiting_for_sub_community_link_row_array', $waiting_for_sub_community_link_row_array); $request->setAttribute('bbs_row_array', $bbs_row_array); return View::SUCCESS; }
/** * 初期画面 * GETメソッドの場合、呼ばれる */ function getDefaultView() { $context = $this->getContext(); $controller = $context->getController(); $request = $context->getRequest(); $user = $context->getUser(); $target_community_id = $request->getParameter('community_id'); $acs_user_info_row = $user->getAttribute('acs_user_info_row'); $target_community_folder_id = $request->getParameter('folder_id'); $mode = $request->getParameter('mode'); // 表示モード $community_folder_obj = new ACSCommunityFolder($target_community_id, $acs_user_info_row, $target_community_folder_id); $target_community_row = ACSCommunity::get_community_row($request->getParameter('community_id')); // グループ表示 $file_detail_info_row_array = array(); if ($mode == 'group') { // ファイルオブジェクトの配列 $target_folder_obj = $community_folder_obj->get_folder_obj(); $file_obj_array = $target_folder_obj->get_file_obj_array(); foreach ($file_obj_array as $file_obj) { $file_detail_info_row = ACSFileDetailInfo::get_file_detail_info_row($file_obj->get_file_id()); if (!$file_detail_info_row['file_id']) { // ファイル詳細情報が設定されてない場合 $file_detail_info_row['file_id'] = $file_obj->get_file_id(); } $file_detail_info_row['display_file_name'] = $file_obj->get_display_file_name(); $file_detail_info_row['thumbnail_server_file_name'] = $file_obj->get_thumbnail_server_file_name(); if ($file_obj->get_owner_community_id() == $target_community_row['community_id']) { $file_detail_info_row['is_put'] = false; } else { $file_detail_info_row['is_put'] = true; } array_push($file_detail_info_row_array, $file_detail_info_row); } // ファイルカテゴリコードごとのファイルコンテンツ種別の連想配列を取得する $file_contents_type_master_row_array_array = ACSFileDetailInfo::get_file_contents_type_master_row_array_array(); } // フォルダの公開範囲でアクセス制御 if (!$community_folder_obj->has_privilege($target_community_row)) { $controller->forward(SECURE_MODULE, SECURE_ACTION); return; } $request->setAttribute('target_community_row', $target_community_row); $request->setAttribute('community_folder_obj', $community_folder_obj); $request->setAttribute('error_row', $error_row); $request->setAttribute('mode', $mode); if ($mode == 'group') { $request->setAttribute('file_detail_info_row_array', $file_detail_info_row_array); $request->setAttribute('file_contents_type_master_row_array_array', $file_contents_type_master_row_array_array); } return View::SUCCESS; }
function execute() { $context = $this->getContext(); $controller = $context->getController(); $request = $context->getRequest(); $user = $context->getUser(); $acs_user_info_row = $user->getAttribute('acs_user_info_row'); // 対象となるコミュニティIDを取得 $community_id = $request->ACSgetParameter('community_id'); $community_row = ACSCommunity::get_community_row($community_id); // 実行 ACSExternalRSS::do_process($community_row); $bbs_url = $this->getControllerPath('Community', 'BBS') . '&community_id=' . $community_id; header("Location: {$bbs_url}"); }
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'); // ファイル履歴ID $file_history_id = $request->getParameter('file_history_id'); // form $form = $request->ACSGetParameters(); // 表示するページの所有者情報取得 $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); // フォルダの公開範囲でアクセス制御 if (!$community_folder_obj->has_privilege($target_community_row)) { $controller->forward(SECURE_MODULE, SECURE_ACTION); return; } // ファイル履歴コメントを登録する if ($form['comment'] != '') { // ファイル履歴が1件も登録されていない場合は"作成"を登録する $file_history_row_array = ACSFileHistory::get_file_history_row_array($file_id); if (count($file_history_row_array) == 0) { $file_info_row = ACSFileInfoModel::select_file_info_row($file_id); $file_history_id = ACSFileHistory::set_file_history($file_info_row, $file_info_row['entry_user_community_id'], '', ACSMsg::get_mst('file_history_operation_master', 'D0101')); } $ret = ACSFileHistoryComment::set_file_history_comment($file_history_id, $acs_user_info_row['user_community_id'], $form['comment']); } // ファイル詳細情報へ遷移 $file_detail_url = $this->getControllerPath('Community', 'FileDetail'); $file_detail_url .= '&community_id=' . $target_community_id; $file_detail_url .= '&file_id=' . $file_id; $file_detail_url .= '&folder_id=' . $target_community_folder_id; header("Location: {$file_detail_url}"); }
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'); // 対象となるコミュニティIDを取得 $target_community_id = $request->getParameter('community_id'); // 対象となるフォルダIDを取得 $target_community_folder_id = $request->getParameter('folder_id'); // 詳細情報を表示するファイルIDを取得 $file_id = $request->getParameter('file_id'); // 表示するページの所有者情報取得 $target_community_row = ACSCommunity::get_community_row($target_community_id); // フォルダ情報取得 $community_folder_obj = new ACSUserFolder($target_community_id, $acs_user_info_row, $target_community_folder_id); // ファイル情報取得 $file_obj = ACSFile::get_file_info_instance($file_id); // ファイルの詳細情報 $file_detail_info_row = ACSFileDetailInfo::get_file_detail_info_row($file_id); // マスタ $file_category_master_array = ACSDB::get_master_array('file_category'); $file_contents_type_master_array = ACSDB::get_master_array('file_contents_type'); // ファイルカテゴリコードごとのファイルコンテンツ種別の連想配列を取得する $file_contents_type_master_row_array_array = ACSFileDetailInfo::get_file_contents_type_master_row_array_array(); // アクセス制御 // プットフォルダ、ファイルはNG if ($file_obj->get_owner_community_id() != $target_community_id) { $controller->forward(SECURE_MODULE, SECURE_ACTION); return; } // set $request->setAttribute('target_community_row', $target_community_row); $request->setAttribute('file_obj', $file_obj); $request->setAttribute('community_folder_obj', $community_folder_obj); $request->setAttribute('file_detail_info_row', $file_detail_info_row); $request->setAttribute('file_contents_type_master_row_array_array', $file_contents_type_master_row_array_array); $request->setAttribute('file_category_master_array', $file_category_master_array); $request->setAttribute('file_contents_type_master_array', $file_contents_type_master_array); return View::SUCCESS; }
function execute() { $context = $this->getContext(); $controller = $context->getController(); $request = $context->getRequest(); $user = $context->getUser(); //get $acs_user_info_row = $user->getAttribute('acs_user_info_row'); // 対象となるコミュニティIDを取得 $community_id = $request->getParameter('id'); // 本人のページかどうか if ($community_id == $acs_user_info_row['user_community_id']) { $is_self_page = 1; } else { $is_self_page = 0; } // コミュニティ情報 $community_row = ACSCommunity::get_community_row($community_id); //ユーザ入力情報 $form = $user->getAttribute('new_form_obj'); $diary_id = $request->getParameter('diary_id'); // form action $action_url = $this->getControllerPath('User', 'DiaryCommentPre') . '&id=' . $community_id . '&diary_id=' . $diary_id . '&move_id=2'; // action URL 確認画面のキャンセルボタン $back_url = $this->getControllerPath('User', 'DiaryComment') . '&id=' . $community_id . '&diary_id=' . $diary_id . '&move_id=3'; // ダイアリートップページのURL $link_page_url['diary_top_page_url'] = $this->getControllerPath('User', 'Diary') . '&id=' . $community_id; //他人の日記を閲覧している場合のトップページURL $link_page_url['else_user_diary_url'] = $this->getControllerPath(DEFAULT_MODULE, 'Index') . '&id=' . $community_id; $diary_comment_page_url = $this->getControllerPath('User', 'DiaryComment') . '&community_id=' . $community_id . '&diary_id=' . $diary_id; // set $this->setAttribute('action_url', $action_url); $this->setAttribute('back_url', $back_url); $this->setAttribute('link_page_url', $link_page_url); $this->setAttribute('diary_comment_page_url', $diary_comment_page_url); $this->setAttribute('form', $form); $this->setAttribute('community_row', $community_row); $this->setAttribute('is_self_page', $is_self_page); // エラーメッセージ $this->setAttribute('error_message', $this->getErrorMessage($controller, $request, $user)); // テンプレート $this->setScreenId("0001"); $this->setTemplate('DiaryCommentPre.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'); // コミュニティ情報 $community_row = ACSCommunity::get_community_row($community_id); // コミュニティメンバ一覧を取得する $community_member_user_info_row_array = ACSCommunity::get_community_member_user_info_row_array($community_id); // set $request->setAttribute('community_row', $community_row); $request->setAttribute('community_member_user_info_row_array', $community_member_user_info_row_array); return View::SUCCESS; }
/** * 初期画面 * GETメソッドの場合、呼ばれる */ function getDefaultView() { $context = $this->getContext(); $controller = $context->getController(); $request = $context->getRequest(); $user = $context->getUser(); $target_community_id = $request->getParameter('community_id'); $target_schedule_id = $request->getParameter('schedule_id'); if (!$this->get_execute_privilege()) { // 2010.03.24 未ログイン時の誘導 // ログインユーザでない場合はログイン画面へ if ($user->hasCredential('PUBLIC_USER')) { $controller->forward("User", "Login"); return; } $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_row = ACSCommunity::get_community_row($target_community_id); $request->setAttributeByRef('target_community_row', $target_community_row); // スケジュール情報の取得 $schedule =& ACSSchedule::get_schedule_instance($target_community_id, $target_schedule_id); $request->setAttributeByRef('schedule', $schedule); // スケジュール情報をセッションにキャッシュ $user->setAttribute('schedule', serialize($schedule)); // ログインユーザの参加情報の取得 if ($request->getAttribute('schedule_participant')) { $schedule_participant =& $request->getAttribute('schedule_participant'); } else { $schedule_participant =& ACSScheduleParticipant::get_schedule_participant_instance($schedule->schedule_id, $acs_user_info_row['user_community_id']); $request->setAttributeByRef('schedule_participant', $schedule_participant); } // ログインユーザの参加情報をセッションにキャッシュ $user->setAttribute('org_participant', serialize($schedule_participant)); // スケジュール参加者全員の情報を取得 $schedule_participant_list =& ACSScheduleParticipant::get_schedule_participant_instance_list($schedule->schedule_id, $schedule->is_target_all()); $request->setAttributeByRef('schedule_participant_list', $schedule_participant_list); return View::SUCCESS; }
function execute() { $context = $this->getContext(); $controller = $context->getController(); $request = $context->getRequest(); $user = $context->getUser(); //get $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); //ユーザ入力情報 $form = $user->getAttribute('new_form_obj'); $bbs_id = $request->getParameter('bbs_id'); // コミュニティメンバかどうか $is_community_member = ACSCommunity::is_community_member($acs_user_info_row['user_community_id'], $community_row['community_id']); // form action $action_url = $this->getControllerPath('Community', 'BBSResPre') . '&community_id=' . $community_row['community_id'] . '&bbs_id=' . $bbs_id . '&move_id=2'; // action URL 確認画面のキャンセルボタン $back_url = $this->getControllerPath('Community', 'BBSRes') . '&community_id=' . $community_row['community_id'] . '&bbs_id=' . $bbs_id . '&move_id=3'; // コミュニティトップページのURL $community_top_page_url = $this->getControllerPath('Community', 'Index') . '&community_id=' . $community_row['community_id']; //bbs_top_page_url 掲示板TOP画面 $back_bbs_url = $this->getControllerPath('Community', 'BBS') . '&community_id=' . $community_row['community_id']; // set $this->setAttribute('is_community_member', $is_community_member); $this->setAttribute('action_url', $action_url); $this->setAttribute('community_top_page_url', $community_top_page_url); $this->setAttribute('back_url', $back_url); $this->setAttribute('back_bbs_url', $back_bbs_url); $this->setAttribute('select_trusted_community_url', $select_trusted_community_url); $this->setAttribute('form', $form); $this->setAttribute('community_row', $community_row); // エラーメッセージ $this->setAttribute('error_message', $this->getErrorMessage($controller, $request, $user)); // テンプレート $this->setScreenId("0001"); $this->setTemplate('BBSResPre.tpl.php'); return parent::execute(); }
/** * 初期画面 * GETメソッドの場合、呼ばれる */ function execute() { $context = $this->getContext(); $controller = $context->getController(); $request = $context->getRequest(); $user = $context->getUser(); /* エラーを取得 */ //$error_row = $user->getAttribute('error_row'); //$user->removeAttribute('error_row'); // 対象となるユーザコミュニティIDを取得 $user_community_id = $request->ACSgetParameter('community_id'); // プロフィール情報を取得 $target_community_info_row = ACSCommunity::get_community_row($user_community_id); // 戻るリンク先情報を取得 $back_url = $this->getControllerPath('Community', 'Index'); $back_url .= '&community_id=' . $user_community_id; if (!$this->get_execute_privilege()) { $controller->forward(SECURE_MODULE, SECURE_ACTION); return; } // 画像が新規登録か更新かを判定する true:新規 false:更新 // ファイル情報の存在確認 $image_file_id = $target_community_info_row['file_id']; // ファイル情報取得 if ($image_file_id) { $image_new_add = false; } else { $image_new_add = true; } // set //user_community_id をviewクラスへ通知する $request->setAttribute('community_id', $user_community_id); //target_user_info_rowをviewクラスへ通知する $request->setAttribute('target_community_info_row', $target_community_info_row); //画像が新規登録か更新かのimage_new_addをviewクラスへ通知する $request->setAttribute('image_new_add', $image_new_add); //戻るリンク先をviewクラスへ通知する $request->setAttribute('back_url', $back_url); return View::INPUT; }