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; }
public function execute() { $context =& $this->getContext(); $user = $context->getUser(); $request = $context->getRequest(); $acs_user_info_row = $user->getAttribute('acs_user_info_row'); // get $new_open_diary_row_array = $request->getAttribute('new_open_diary_row_array'); // 加工 foreach ($new_open_diary_row_array as $index => $new_open_diary_row) { // 投稿者のトップページURL $new_open_diary_row_array[$index]['top_page_url'] = $this->getControllerPath(DEFAULT_MODULE, DEFAULT_ACTION) . '&id=' . $new_open_diary_row['user_community_id']; // 投稿者の写真 $new_open_diary_row_array[$index]['image_url'] = ACSUser::get_image_url($new_open_diary_row['user_community_id'], 'thumb'); // ダイアリーコメントURL $new_open_diary_row_array[$index]['diary_comment_url'] = $this->getControllerPath(DEFAULT_MODULE, 'DiaryComment') . '&id=' . $new_open_diary_row['user_community_id'] . '&diary_id=' . $new_open_diary_row['diary_id']; $new_open_diary_row_array[$index]['post_date'] = ACSLib::convert_pg_date_to_str($new_open_diary_row['post_date']); } // set $this->setAttribute('new_open_diary_row_array', $new_open_diary_row_array); // テンプレートをセットする $this->setTemplate('NewOpenDiary.tpl.php'); $context->getController()->setRenderMode(View::RENDER_VAR); $request->setAttribute("NewOpenDiary", $this->render()); 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 = $request->ACSgetParameter('id'); // 他ユーザのデータが見えないようチェック if (!$this->get_execute_privilege() && $acs_user_info_row["user_community_id"] != $user_community_id) { // このページへアクセスすることはできません。 $controller->forward(SECURE_MODULE, SECURE_ACTION); return; } // ユーザ情報 $target_user_info_row = ACSUser::get_user_info_row_by_user_community_id($user_community_id); //送信済画面の処理 $move_id = $request->getParameter('move_id'); if ($move_id == 2) { // 全ての送信済メッセージ $message_row_array = ACSMessage::get_send_message_row_array($user_community_id); } else { // 全ての受信メッセージ $message_row_array = ACSMessage::get_receive_message_row_array($user_community_id); } // set $request->setAttribute('target_user_info_row', $target_user_info_row); $request->setAttribute('message_row_array', $message_row_array); $request->setAttribute('move_id', $move_id); return View::INPUT; }
public function execute() { $context =& $this->getContext(); $user = $context->getUser(); $request = $context->getRequest(); // get $ranking_user_info_row_array = $request->getAttribute('ranking_user_info_row_array'); // 加工 $rank = 1; foreach ($ranking_user_info_row_array as $index => $ranking_user_info_row) { // トップページURL $ranking_user_info_row_array[$index]['top_page_url'] = $this->getControllerPath(DEFAULT_MODULE, DEFAULT_ACTION) . '&id=' . $ranking_user_info_row['user_community_id']; // 写真 $ranking_user_info_row_array[$index]['image_url'] = ACSUser::get_image_url($ranking_user_info_row['user_community_id'], 'thumb'); // プロフィール $ranking_user_info_row_array[$index]['contents_row_array']['profile'] = ACSCommunity::get_contents_row($ranking_user_info_row['user_community_id'], ACSMsg::get_mst('contents_type_master', 'D07')); // 順位 $ranking_user_info_row_array[$index]['rank'] = $rank; $rank++; } // set $this->setAttribute('ranking_user_info_row_array', $ranking_user_info_row_array); // テンプレートをセットする $this->setTemplate('UserRanking.tpl.php'); $context->getController()->setRenderMode(View::RENDER_VAR); $request->setAttribute("UserRanking", $this->render()); 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 $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'); // 対象のdiary_idを取得 $diary_id = $request->ACSgetParameter('diary_id'); $diary_row = ACSDiary::get_diary_row($diary_id); if ($diary_row['open_level_name'] == ACSMsg::get_mst('open_level_master', 'D05')) { $diary_row['trusted_community_row_array'] = ACSDiary::get_diary_trusted_community_row_array($diary_row['diary_id']); } // ユーザ情報 $user_community_id = $diary_row['user_community_id']; $contents_link_url = $this->getControllerPath('User', 'DiaryComment') . "&diary_id=" . $diary_row['diary_id']; // 足跡登録 $contents_type_name = ACSMsg::get_mst('contents_type_master', 'D21'); $contents_type_arr = ACSDB::get_master_array("contents_type", "contents_type_name='" . $contents_type_name . "'"); $form['community_id'] = $user_community_id; $form['visitor_community_id'] = $acs_user_info_row['user_community_id']; $form['contents_type_code'] = array_search($contents_type_name, $contents_type_arr); $form['contents_title'] = $diary_row['subject']; $form['contents_link_url'] = $contents_link_url; $form['contents_date'] = $diary_row['post_date']; $form['post_date'] = 'now'; $ret = ACSUser::set_footprint($form); header("Location: {$contents_link_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'); $target_user_community_id = $request->ACSgetParameter('id'); $folder_id = $request->ACSgetParameter('folder_id'); $file_id = $request->ACSgetParameter('file_id'); $file_obj = ACSFile::get_file_info_instance($file_id); $contents_link_url = $this->getControllerPath('User', 'FileDetail') . "&id=" . $target_user_community_id . "&file_id=" . $file_id . "&folder_id=" . $folder_id; // 足跡登録 $contents_type_name = ACSMsg::get_mst('contents_type_master', 'D33'); $contents_type_arr = ACSDB::get_master_array("contents_type", "contents_type_name='" . $contents_type_name . "'"); $form['community_id'] = $target_user_community_id; $form['visitor_community_id'] = $acs_user_info_row['user_community_id']; $form['contents_type_code'] = array_search($contents_type_name, $contents_type_arr); $form['contents_title'] = $file_obj->get_display_file_name(); $form['contents_link_url'] = $contents_link_url; $form['contents_date'] = $file_obj->get_update_date(); $form['post_date'] = 'now'; $ret = ACSUser::set_footprint($form); header("Location: {$contents_link_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'); // get $community_row = $request->getAttribute('community_row'); $community_member_user_info_row_array = $request->getAttribute('community_member_user_info_row_array'); $community_member_user_info_row_array_num = count($community_member_user_info_row_array); foreach ($community_member_user_info_row_array as $index => $user_info_row) { $community_member_user_info_row_array[$index]['top_page_url'] = $this->getControllerPath(DEFAULT_MODULE, DEFAULT_ACTION) . '&id=' . $user_info_row['user_community_id']; $community_member_user_info_row_array[$index]['image_url'] = ACSUser::get_image_url($user_info_row['user_community_id'], 'thumb'); $community_member_user_info_row_array[$index]['friends_row_array_num'] = ACSUser::get_friends_row_array_num($user_info_row['user_community_id']); } // コミュニティトップページのURL $community_top_page_url = $this->getControllerPath('Community', DEFAULT_ACTION) . '&community_id=' . $community_row['community_id']; // テンプレート $this->setScreenId("0001"); $this->setTemplate('CommunityMemberList.tpl.php'); // set $this->setAttribute('community_row', $community_row); $this->setAttribute('community_member_user_info_row_array', $community_member_user_info_row_array); $this->setAttribute('community_member_user_info_row_array_num', $community_member_user_info_row_array_num); $this->setAttribute('community_top_page_url', $community_top_page_url); return parent::execute(); }
function execute() { $context = $this->getContext(); $controller = $context->getController(); $request = $context->getRequest(); $user = $context->getUser(); $target_user_info_row = ACSUser::get_user_info_row_by_user_community_id($request->getParameter('id')); $target_user_community_id = $request->getParameter('id'); $acs_user_info_row = $user->getAttribute('acs_user_info_row'); $target_user_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'); // ファイルダウンロード処理 $user_folder_obj = new ACSUserFolder($target_user_community_id, $acs_user_info_row, $target_user_community_folder_id); $folder_obj = $user_folder_obj->get_folder_obj(); // フォルダの公開範囲でアクセス制御 if (!$user_folder_obj->has_privilege($target_user_info_row)) { $controller->forward(SECURE_MODULE, SECURE_ACTION); return; } // ルートフォルダ直下のファイルは本人以外アクセス不可 $privilege_array = $this->getCredential(); if ($folder_obj->get_is_root_folder() && !in_array('USER_PAGE_OWNER', $privilege_array)) { $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; } $acs_user_info_row = $user->getAttribute('acs_user_info_row'); // get $form = $request->ACSGetParameters(); $user_id = $form['user_id']; if (ACSUser::get_user_info_row_by_user_id($user_id)) { echo ACSMsg::get_msg('System', 'AddUserAction.class.php', 'M001'); return; } // ユーザ情報を新規登録する $ret = ACSUser::set_user_info($form); // ログ登録: ユーザ新規登録 ACSLog::set_log($acs_user_info_row, 'New User Registration', $ret, "[UserID:{$form['user_id']}]"); $user_list_url = $this->getControllerPath('System', 'UserList'); header("Location: {$user_list_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'); $user_id = $user->getAttribute('login_user_id'); if ($user_id == null || $user_id == "") { if (ACSSystem::check_connect_outside() != "0") { // LDAP接続エラーの場合、処理終了 $this->setError($controller, $request, $user, 'login_input', ACSMsg::get_msg('Common', 'GlobalSecureAction.class.php', 'M002')); } else { if ($_POST['userid'] != NULL && $_POST['userid'] != "") { // エラーの場合、処理終了 $this->setError($controller, $request, $user, 'login_input', ACSMsg::get_msg('Common', 'GlobalSecureAction.class.php', 'M001')); } } return View::INPUT; } if ($acs_user_info_row['is_acs_user']) { // ログ登録: ログイン ACSLog::set_log($acs_user_info_row, 'Login', true, "[UserID:" . $acs_user_info_row['user_id'] . "]"); // ラストログイン登録 ACSUser::set_last_login($acs_user_info_row); header("Location: ./" . $_SERVER['REQUEST_URI']); } }
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'); // get $user_community_id = $user->getAttribute('user_id'); $target_user_info_row = ACSUser::get_user_profile_row($user_community_id, 'include_private_flag'); // ユーザ情報の削除フラグを変更する $ret = ACSUser::delete_user_community($user_community_id); if (!$ret) { echo "Warning : DB ERROR : Delete user failed."; return; } // ログ登録: ユーザ削除 ACSLog::set_log($acs_user_info_row, 'Remove User', $ret, "[UserID:{$target_user_info_row['user_id']}]"); // ユーザ一覧を表示 $user_list_url = $this->getControllerPath('System', 'UserList'); header("Location: {$user_list_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を取得 $user_community_id = $request->ACSgetParameter('id'); // 対象となるcontents_keyを取得 $contents_key = $request->ACSgetParameter('contents_key'); // 対象となるコンテンツ種別コードを取得 $contents_type_code = $request->ACSgetParameter('contents_type_code'); // コンテンツ種別マスタ $contents_type_master_array = ACSDB::get_master_array('contents_type'); // 公開範囲 $open_level_master_row_array = ACSAccessControl::get_open_level_master_row_array(ACSMsg::get_mst('community_type_master', 'D10'), $contents_type_master_array[$contents_type_code]); if ($acs_user_info_row['is_acs_user']) { // マイフレンズグループ $friends_group_row_array = ACSUser::get_friends_group_row_array($user_community_id); } else { $friends_group_row_array = array(); } // set $request->setAttribute('contents_key', $contents_key); $request->setAttribute('contents_type_code', $contents_type_code); $request->setAttribute('open_level_master_row_array', $open_level_master_row_array); $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'); // 表示対象となるユーザコミュニティIDを取得 $user_community_id = $request->ACSgetParameter('id'); // ユーザ情報 $target_user_info_row = ACSUser::get_user_profile_row($user_community_id); // 取得期間 $term = intval($request->ACSgetParameter('term')); if (!$term) { // システム設定: マイページ: ダイアリーRSS取得期間 $term = ACSSystemConfig::get_keyword_value(ACSMsg::get_mst('system_config_group', 'D02'), 'DIARY_RSS_TERM'); } // 最新のダイアリーRSS $diary_row_array = ACSDiary::get_new_diary_rss_row_array($user_community_id, $term); // set $request->setAttribute('target_user_info_row', $target_user_info_row); $request->setAttribute('diary_row_array', $diary_row_array); $request->setAttribute('term', $term); return View::SUCCESS; }
function execute() { $context = $this->getContext(); $controller = $context->getController(); $request = $context->getRequest(); $user = $context->getUser(); // get // ユーザ情報一覧 $user_info_row_array = $request->getAttribute('user_info_row_array'); $form = $request->getAttribute('form'); // ページング設定 $display_count = ACSSystemConfig::get_keyword_value(ACSMsg::get_mst('system_config_group', 'D02'), 'USER_SEARCH_RESULT_DISPLAY_MAX_COUNT'); $paging_info = $this->getPagingInfo($controller, $request, $user_info_row_array, $display_count); // 加工 if (is_array($user_info_row_array)) { foreach ($user_info_row_array as $index => $user_info_row) { $user_info_row_array[$index]['top_page_url'] = $this->getControllerPath(DEFAULT_MODULE, DEFAULT_ACTION) . '&id=' . $user_info_row['user_community_id']; $user_info_row_array[$index]['image_url'] = ACSUser::get_image_url($user_info_row['user_community_id'], 'thumb'); $user_info_row_array[$index]['friends_row_array_num'] = ACSUser::get_friends_row_array_num($user_info_row['user_community_id']); } } // URL $action_url = $this->getControllerPath(); // テンプレート $this->setScreenId("0001"); $this->setTemplate('SearchUser.tpl.php'); // set $this->setAttribute('form', $form); $this->setAttribute('user_info_row_array', $user_info_row_array); $this->setAttribute('paging_info', $paging_info); $this->setAttribute('action_url', $action_url); $this->setAttribute('module', 'User'); $this->setAttribute('action', 'SearchUser'); 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 $target_user_info_row = $request->getAttribute('target_user_info_row'); $friends_group_row_array = $request->getAttribute('friends_group_row_array'); // マイフレンズグループ数 $friends_group_row_array_num = count($friends_group_row_array); // マイフレンズグループ foreach ($friends_group_row_array as $index => $friends_group_row) { $friends_group_row_array[$index]['edit_friends_group_member_url'] = $this->getControllerPath('User', 'EditFriendsGroupMember') . '&id=' . $target_user_info_row['user_community_id'] . '&community_id=' . $friends_group_row['community_id']; $friends_group_row_array[$index]['delete_friends_group_url'] = $this->getControllerPath('User', 'DeleteFriendsGroup') . '&id=' . $target_user_info_row['user_community_id'] . '&community_id=' . $friends_group_row['community_id']; // 各マイフレンズグループのメンバ foreach ($friends_group_row_array[$index]['friends_row_array'] as $user_info_row_index => $user_info_row) { $friends_group_row_array[$index]['friends_row_array'][$user_info_row_index]['top_page_url'] = $this->getControllerPath(DEFAULT_MODULE, DEFAULT_ACTION) . '&id=' . $user_info_row['user_community_id']; $friends_group_row_array[$index]['friends_row_array'][$user_info_row_index]['image_url'] = ACSUser::get_image_url($user_info_row['user_community_id'], 'thumb'); } $friends_group_row_array[$index]['friends_row_array_num'] = count($friends_group_row_array[$index]['friends_row_array']); } // マイフレンズグループ作成URL $create_friends_group_url = $this->getControllerPath('User', 'CreateFriendsGroup') . '&id=' . $target_user_info_row['user_community_id']; // テンプレート $this->setScreenId("0001"); $this->setTemplate('FriendsGroupList.tpl.php'); // set $this->setAttribute('target_user_info_row', $target_user_info_row); $this->setAttribute('friends_group_row_array', $friends_group_row_array); $this->setAttribute('friends_group_row_array_num', $friends_group_row_array_num); $this->setAttribute('create_friends_group_url', $create_friends_group_url); 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 $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'); // 表示対象となるユーザコミュニティIDを取得 $user_community_id = $request->ACSgetParameter('id'); if (empty($user_community_id)) { $user_community_id = $acs_user_info_row['user_community_id']; } if (!$this->get_execute_privilege()) { $controller->forward(SECURE_MODULE, SECURE_ACTION); return; } // プロフィール $target_user_info_row = ACSUser::get_user_profile_row($user_community_id); //ユーザが閲覧者を選択した場合 $view_mode = $request->getParameter('view_mode'); // set $request->setAttribute('user_community_id', $user_community_id); $request->setAttribute('target_user_info_row', $target_user_info_row); $request->setAttribute('view_mode', $view_mode); return View::SUCCESS; }
function execute() { $context = $this->getContext(); $controller = $context->getController(); $request = $context->getRequest(); $user = $context->getUser(); $acs_user_info_row = $user->getAttribute('acs_user_info_row'); // 対象となるユーザコミュニティIDを取得 $user_community_id = $request->ACSgetParameter('id'); 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'); // 対象となるユーザコミュニティIDを取得 $user_community_id = $request->ACSgetParameter('id'); $form = $request->ACSGetParameters(); if ($acs_user_info_row['is_acs_user']) { // 氏名は変更しない $form['user_name'] = $acs_user_info_row['user_name']; } else { $form['user_id'] = $acs_user_info_row['user_id']; // LDAPから氏名取得 $ldap_user_info_row = ACSLDAP::get_ldap_user_info_row($acs_user_info_row['user_id']); $form['user_name'] = $ldap_user_info_row['user_name']; } // INSERT $ret = ACSUser::set_user_profile($acs_user_info_row, $form); // 言語の切替 ACSMsg::set_lang($form['mail_lang']); ACSMsg::set_lang_cookie($form['mail_lang']); if ($ret) { // 書き込み後、GETの処理へ header("Location: ./"); } else { exit; } }
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_user_community_id = $request->getParameter('id'); // 対象となるフォルダIDを取得 $target_user_community_folder_id = $request->getParameter('folder_id'); // 詳細情報を表示するフォルダIDを取得 $detail_user_community_folder_id = $request->getParameter('detail_folder_id'); // 表示するページの所有者情報取得 $target_user_info_row = ACSUser::get_user_info_row_by_user_community_id($target_user_community_id); // フォルダ情報取得 $user_folder_obj = new ACSUserFolder($target_user_community_id, $acs_user_info_row, $target_user_community_folder_id); $detail_user_folder_obj = new ACSUserFolder($target_user_community_id, $acs_user_info_row, $detail_user_community_folder_id); // フォルダの公開範囲でアクセス制御 if (!$detail_user_folder_obj->has_privilege($target_user_info_row)) { $controller->forward(SECURE_MODULE, SECURE_ACTION); return; } // set $request->setAttribute('target_user_info_row', $target_user_info_row); $request->setAttribute('user_folder_obj', $user_folder_obj); $request->setAttribute('detail_user_folder_obj', $detail_user_folder_obj); return View::SUCCESS; }
function execute() { $context = $this->getContext(); $controller = $context->getController(); $request = $context->getRequest(); $user = $context->getUser(); //mode 画面の遷移を取得する $move_id = $request->getParameter('move_id'); // ユーザー情報 $acs_user_info_row = $user->getAttribute('acs_user_info_row'); // 対象となるUserIDを取得 $user_community_id = $request->getParameter('id'); // ユーザ情報 $target_user_info_row = ACSUser::get_user_info_row_by_user_community_id($user_community_id); /* 入力画面より */ if ($move_id == 1) { //☆☆ ここからほぼ同じ // 画面上のフォーム情報を取得する $form['subject'] = $request->getParameter('subject'); //件名:subject $form['body'] = $request->getParameter('body'); //内容:body $form['info_mail'] = $request->getParameter('info_mail'); //メール通知:info_mail $user->setAttribute('new_form_obj', $form); $request->setAttribute('target_user_info_row', $target_user_info_row); //☆☆ ここまでほぼ同じ return View::SUCCESS; /* 登録確定ボタン「はい」より */ } else { if ($move_id == 2) { $acs_user_info_row = $user->getAttribute('acs_user_info_row'); $user_community_id = $request->getParameter('id'); //☆☆ ここからほぼ同じ // 画面上のフォーム情報を取得する $form = $user->getAttribute('new_form_obj'); $new_file_obj = $form['file_obj']; $form['user_community_id'] = $user_community_id; $form['acs_user_info_id'] = $acs_user_info_row['user_community_id']; //☆☆ ここまでほぼ同じ // DBへの書き込み等 ACSDB::_do_query("BEGIN"); // Messageテーブル情報 $ret = ACSMessage::set_message($form); if ($ret) { ACSDB::_do_query("COMMIT"); } else { ACSDB::_do_query("ROLLBACK"); } // 通知メール送信処理 if ($form['info_mail'] == "on") { ACSMessage::send_info_mail($ret, $form['user_community_id'], $form['acs_user_info_id']); } // 書き込み後、GETの処理へ $action_url = $this->getControllerPath('User', 'MessageBox') . '&id=' . $acs_user_info_row['user_community_id'] . '&move_id=2'; header("Location: {$action_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_user_community_id = $request->getParameter('id'); // 対象となるフォルダIDを取得 $target_user_community_folder_id = $request->getParameter('folder_id'); // 詳細情報を表示するファイルIDを取得 $file_id = $request->getParameter('file_id'); // 表示するページの所有者情報取得 $target_user_info_row = ACSUser::get_user_info_row_by_user_community_id($target_user_community_id); // フォルダ情報取得 $user_folder_obj = new ACSUserFolder($target_user_community_id, $acs_user_info_row, $target_user_community_folder_id); $folder_obj = $user_folder_obj->get_folder_obj(); // フォルダの公開範囲でアクセス制御 if (!$user_folder_obj->has_privilege($target_user_info_row)) { $controller->forward(SECURE_MODULE, SECURE_ACTION); return; } // ルートフォルダ直下のファイルは本人以外アクセス不可 $privilege_array = $this->getCredential(); //if ($folder_obj->get_is_root_folder() && !in_array('USER_PAGE_OWNER', $privilege_array)) { if ($folder_obj->get_is_root_folder() && !$this->get_execute_privilege()) { $controller->forward(SECURE_MODULE, SECURE_ACTION); return; } // ファイル情報取得 $file_obj = ACSFile::get_file_info_instance($file_id); // ファイルの詳細情報 $file_detail_info_row = ACSFileDetailInfo::get_file_detail_info_row($file_id); // ファイルの履歴情報 $file_history_row_array = ACSFileHistory::get_file_history_row_array($file_id); // ファイル履歴ごとのコメント foreach ($file_history_row_array as $index => $file_history_row) { $file_history_row_array[$index]['file_history_comment_row_array'] = ACSFileHistoryComment::get_file_history_comment_row_array($file_history_row['file_history_id']); } // ファイルアクセス履歴登録 if ($acs_user_info_row['is_acs_user']) { ACSFile::set_file_access_history($acs_user_info_row['user_community_id'], $file_id); } // 足跡情報取得 $footprint_url = $this->getControllerPath('User', 'FileDetail') . "&id=" . $target_user_community_id . "&file_id=" . $file_obj->get_file_id() . "&folder_id=" . $user_folder_obj->folder_obj->get_folder_id(); $where = "foot.contents_link_url = '" . $footprint_url . "'"; $where .= " AND foot.visitor_community_id = '" . $acs_user_info_row['user_community_id'] . "'"; $footprint_info = ACSUser::get_footprint_list($target_user_community_id, $where); // set $request->setAttribute('target_user_info_row', $target_user_info_row); $request->setAttribute('file_obj', $file_obj); $request->setAttribute('user_folder_obj', $user_folder_obj); $request->setAttribute('file_detail_info_row', $file_detail_info_row); $request->setAttribute('file_history_row_array', $file_history_row_array); $request->setAttribute('footprint_info', $footprint_info); return View::SUCCESS; }
function execute() { $context = $this->getContext(); $controller = $context->getController(); $request = $context->getRequest(); $user = $context->getUser(); // 必須チェック // Validator でできないチェックはここで行う if (!$request->getParameter('selected_folder') && !$request->getParameter('selected_file')) { // エラーの場合、処理終了 return $this->setError($controller, $request, $user, 'selected_folder', ACSMsg::get_msg('User', 'RenameFolderListAction.class.php', 'M001')); } $acs_user_info_row = $user->getAttribute('acs_user_info_row'); if (!$this->get_execute_privilege()) { $controller->forward(SECURE_MODULE, SECURE_ACTION); return; } // 対象となるユーザコミュニティIDを取得 $target_user_community_id = $request->getParameter('id'); // 対象となるフォルダIDを取得 $target_user_community_folder_id = $request->getParameter('folder_id'); // 表示するページの所有者情報取得 $target_user_info_row = ACSUser::get_user_info_row_by_user_community_id($target_user_community_id); // フォルダ情報取得 $user_folder_obj = new ACSUserFolder($target_user_community_id, $acs_user_info_row, $target_user_community_folder_id); // set $request->setAttribute('target_user_info_row', $target_user_info_row); $request->setAttribute('user_folder_obj', $user_folder_obj); // 名前変更対象を取得 // フォルダ $selected_folder_obj_array = array(); // View にわたす変更対象のフォルダ $selected_folder_row_array = array(); $selected_folder_array = $request->getParameter('selected_folder'); if ($selected_folder_array) { foreach ($selected_folder_array as $selected_folder_id) { $_selected_folder_obj = $user_folder_obj->folder_obj->get_folder_obj($selected_folder_id); array_push($selected_folder_obj_array, $_selected_folder_obj); } } // ファイル $selected_file_obj_array = array(); // View にわたす変更対象のファイル $selected_file_row_array = array(); $selected_file_array = $request->getParameter('selected_file'); if ($selected_file_array) { foreach ($selected_file_array as $selected_file_id) { $_selected_file_obj = $user_folder_obj->folder_obj->get_file_obj($selected_file_id); array_push($selected_file_obj_array, $_selected_file_obj); } } // set $request->setAttribute('selected_folder_obj_array', $selected_folder_obj_array); $request->setAttribute('selected_file_obj_array', $selected_file_obj_array); return View::INPUT; }
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; }
public function execute() { $context =& $this->getContext(); $user = $context->getUser(); $request = $context->getRequest(); $acs_user_info_row = $user->getAttribute('acs_user_info_row'); // ユーザランキング情報一覧を取得する $ranking_user_info_row_array = ACSUser::get_ranking_user_info_row_array(); // set $request->setAttribute('ranking_user_info_row_array', $ranking_user_info_row_array); return View::INPUT; }
function getDefaultView() { $context =& $this->getContext(); $user = $context->getUser(); $request = $context->getRequest(); $acs_user_info_row = $user->getAttribute('acs_user_info_row'); // 表示対象となるユーザコミュニティIDを取得 $user_community_id = $request->ACSgetParameter('id'); // ユーザ情報 $target_user_info_row = ACSUser::get_user_info_row_by_user_community_id($user_community_id); $year = $request->ACSgetParameter('year'); // 年 $month = $request->ACSgetParameter('month'); // 月 $day = $request->ACSgetParameter('day'); // 日 if (checkdate($month, $day, $year)) { // 年月日指定 $diary_row_array = ACSDiary::get_diary_row_array_by_year_month_day($user_community_id, $year, $month, $day); } elseif (checkdate($month, 1, $year)) { // 年月指定 $diary_row_array = ACSDiary::get_diary_row_array_by_year_month($user_community_id, $year, $month); unset($day); } else { // 全てのダイアリー $diary_row_array = ACSDiary::get_diary_row_array($user_community_id); unset($year); unset($month); unset($day); } // 公開範囲を最終登録と同じもので表示しておく if ($diary_row_array) { $last_open_level_code = $diary_row_array[0]['open_level_code']; } // 信頼済みコミュニティ情報 foreach ($diary_row_array as $index => $diary_row) { if ($diary_row['open_level_name'] == ACSMsg::get_mst('open_level_master', 'D05')) { $diary_row_array[$index]['trusted_community_row_array'] = ACSDiary::get_diary_trusted_community_row_array($diary_row['diary_id']); } } // 公開範囲 $open_level_master_row_array = ACSAccessControl::get_open_level_master_row_array(ACSMsg::get_mst('community_type_master', 'D10'), ACSMsg::get_mst('contents_type_master', 'D21')); // マイフレンズグループ $friends_group_row_array = ACSUser::get_friends_group_row_array($user_community_id); // set $request->setAttribute('target_user_info_row', $target_user_info_row); $request->setAttribute('diary_row_array', $diary_row_array); $request->setAttribute('open_level_master_row_array', $open_level_master_row_array); $request->setAttribute('friends_group_row_array', $friends_group_row_array); $request->setAttribute('last_open_level_code', $last_open_level_code); 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 $target_user_info_row = $request->getAttribute('target_user_info_row'); $friends_row_array = $request->getAttribute('friends_row_array'); $friends_group_row = $request->getAttribute('friends_group_row'); $friends_group_member_row_array = $request->getAttribute('friends_group_member_row_array'); $form = $request->getAttribute('form'); // 加工 foreach ($friends_row_array as $index => $user_info_row) { $friends_row_array[$index]['top_page_url'] = $this->getControllerPath(DEFAULT_MODULE, DEFAULT_ACTION) . '&id=' . $user_info_row['user_community_id']; $friends_row_array[$index]['image_url'] = ACSUser::get_image_url($user_info_row['user_community_id']); } // 入力エラー時の復元処理 if (is_array($form)) { // 選択したマイフレンズ $friends_group_member_row_array = array(); if (is_array($form['trusted_community_id_array'])) { foreach ($form['trusted_community_id_array'] as $trusted_community_id) { $friends_group_member_row = array(); $friends_group_member_row['user_community_id'] = $trusted_community_id; array_push($friends_group_member_row_array, $friends_group_member_row); } } } else { $form['community_name'] = $friends_group_row['community_name']; } foreach ($friends_group_member_row_array as $index => $user_info_row) { $friends_group_member_row_array[$index]['top_page_url'] = $this->getControllerPath(DEFAULT_MODULE, DEFAULT_ACTION) . '&id=' . $user_info_row['user_community_id']; $friends_group_member_row_array[$index]['image_url'] = ACSUser::get_image_url($user_info_row['user_community_id']); } // URL $action_url = $this->getControllerPath('User', 'EditFriendsGroupMember') . '&id=' . $target_user_info_row['user_community_id'] . '&community_id=' . $friends_group_row['community_id']; // テンプレート $this->setScreenId("0001"); $this->setTemplate('EditFriendsGroupMember.tpl.php'); // set $this->setAttribute('error_message', $this->getErrorMessage($controller, $request, $user)); $this->setAttribute('form', $form); $this->setAttribute('user_community_id', $user_community_id); $this->setAttribute('target_user_info_row', $target_user_info_row); $this->setAttribute('friends_row_array', $friends_row_array); $this->setAttribute('friends_group_row', $friends_group_row); $this->setAttribute('friends_group_member_row_array', $friends_group_member_row_array); $this->setAttribute('action_url', $action_url); 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'); // 対象のmessage_idを取得 $message_id = $request->ACSgetParameter('message_id'); // ユーザ情報 $user_community_id = $request->ACSgetParameter('id'); $target_user_info_row = ACSUser::get_user_info_row_by_user_community_id($user_community_id); // 他ユーザのデータが見えないようチェック if ($this->get_execute_privilege() == 2 && $acs_user_info_row["user_community_id"] != $user_community_id) { // ログイン画面に遷移 $controller->forward("User", "Login"); return; } if ($this->get_execute_privilege() == 1 && $acs_user_info_row["user_community_id"] != $user_community_id) { // このページへアクセスすることはできません。 $controller->forward(SECURE_MODULE, SECURE_ACTION); return; } //送信済画面の処理 $move_id = $request->getParameter('move_id'); if ($move_id == 2) { // 送信済メッセージ詳細 $message_row = ACSMessage::get_send_message_row($message_id); } else { // 受信メッセージ詳細 $message_row = ACSMessage::get_receive_message_row($message_id); // 未読・既読判定 if ($message_row['read_flag'] == "f") { // 未読時、DBのフラグ変更 $message_receiver_id = $message_row['message_receiver_id']; ACSDB::_do_query("BEGIN"); // message_receiverテーブル情報変更 $ret = ACSMessage::read_message($message_receiver_id); if ($ret) { ACSDB::_do_query("COMMIT"); } else { ACSDB::_do_query("ROLLBACK"); } } } // set $request->setAttribute('target_user_info_row', $target_user_info_row); $request->setAttribute('message_row', $message_row); $request->setAttribute('move_id', $move_id); return View::INPUT; }
/** * 初期画面 * GETメソッドの場合、呼ばれる */ function getDefaultView() { $context = $this->getContext(); $controller = $context->getController(); $request = $context->getRequest(); $user = $context->getUser(); /* エラーを取得 */ //$error_row = $user->getAttribute('error_row'); //$user->removeAttribute('error_row'); $target_user_community_id = $request->getParameter('id'); $acs_user_info_row = $user->getAttribute('acs_user_info_row'); $target_user_community_folder_id = $request->getParameter('folder_id'); $mode = $request->getParameter('mode'); // 表示モード $user_folder_obj = new ACSUserFolder($target_user_community_id, $acs_user_info_row, $target_user_community_folder_id); $target_user_info_row = ACSUser::get_user_info_row_by_user_community_id($request->getParameter('id')); // グループ表示 $file_detail_info_row_array = array(); if ($mode == 'group') { // ファイルオブジェクトの配列 $target_folder_obj = $user_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(); 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 (!$user_folder_obj->has_privilege($target_user_info_row)) { $controller->forward(SECURE_MODULE, SECURE_ACTION); return; } $request->setAttribute('target_user_info_row', $target_user_info_row); $request->setAttribute('user_folder_obj', $user_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; }