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'); // get $bbs_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', 'D41')); $community_folder_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', 'D31')); $self_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', 'D00')); // カテゴリグループマスタ $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']); } // set $request->setAttribute('bbs_open_level_master_row_array', $bbs_open_level_master_row_array); $request->setAttribute('community_folder_open_level_master_row_array', $community_folder_open_level_master_row_array); $request->setAttribute('category_group_master_row_array', $category_group_master_row_array); $request->setAttribute('self_open_level_master_row_array', $self_open_level_master_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を取得 $user_community_id = $acs_user_info_row['user_community_id']; if (!$this->get_execute_privilege()) { $controller->forward(SECURE_MODULE, SECURE_ACTION); return; } // デザイン情報取得 $select_design_row_array = ACSCss::get_style_selection_list_array(ACSMsg::get_lang(), ACS_SELECTION_CSS_DIR); //$style_url = ACSSystemConfig::get_keyword_value( // ACSMsg::get_mst('system_config_group','D01'), 'DESIGN_STYLE_CSS_URL'); $style_url = ACS_SELECTION_CSS_DIR; // 設定済のマイページデザインを取得する $selection_css_row = ACSCommunity::get_contents_row($user_community_id, ACSMsg::get_mst('contents_type_master', 'D53')); $selection_css = $selection_css_row['contents_value'] == '' ? ACS_DEFAULT_SELECTION_CSS_FILE : $selection_css_row['contents_value']; // set $request->setAttribute('style_url', $style_url); $request->setAttributeByRef('acs_user_info_row', $acs_user_info_row); $request->setAttributeByRef('select_design_row_array', $select_design_row_array); $request->setAttributeByRef('user_community_id', $user_community_id); $request->setAttribute('selection_css', $selection_css); return View::INPUT; }
public function execute() { $context =& $this->getContext(); $user = $context->getUser(); $request = $context->getRequest(); // get $ranking_community_row_array = $request->getAttribute('ranking_community_row_array'); // 加工 $rank = 1; foreach ($ranking_community_row_array as $index => $ranking_community_row) { // トップページURL $ranking_community_row_array[$index]['top_page_url'] = $this->getControllerPath('Community', DEFAULT_ACTION) . '&community_id=' . $ranking_community_row['community_id']; // 写真 $ranking_community_row_array[$index]['image_url'] = ACSCommunity::get_image_url($ranking_community_row['community_id'], 'thumb'); // プロフィール $ranking_community_row_array[$index]['contents_row_array']['community_profile'] = ACSCommunity::get_contents_row($ranking_community_row['community_id'], ACSMsg::get_mst('contents_type_master', 'D07')); // 順位 $ranking_community_row_array[$index]['rank'] = $rank; $rank++; } // set $this->setAttribute('ranking_community_row_array', $ranking_community_row_array); // テンプレートをセットする $this->setTemplate('CommunityRanking.tpl.php'); $context->getController()->setRenderMode(View::RENDER_VAR); $request->setAttribute("CommunityRanking", $this->render()); return parent::execute(); }
function execute() { $context = $this->getContext(); $controller = $context->getController(); $request = $context->getRequest(); $user = $context->getUser(); $acs_user_info_row = $user->getAttribute('acs_user_info_row'); $target_user_info_row = $request->getAttribute('target_user_info_row'); $login_info_row_array = $request->getAttribute('login_info_row_array'); $top_page_url = $this->getControllerPath(DEFAULT_MODULE, DEFAULT_ACTION) . '&id=' . $target_user_info_row['community_id']; // 加工 foreach ($login_info_row_array as $index => $login_info_row) { $login_info_row_array[$index]['login_date'] = ACSLib::convert_pg_date_to_str($login_info_row['login_date']); $login_info_row_array[$index]['logout_date'] = ACSLib::convert_pg_date_to_str($login_info_row['logout_date']); } // ページング設定 $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, $login_info_row_array, $display_count); // テンプレート $this->setScreenId("0001"); $this->setTemplate('LoginInfo.tpl.php'); // set //$this->setAttribute('form', $form); $this->setAttribute('target_user_info_row', $target_user_info_row); $this->setAttribute('login_info_row_array', $login_info_row_array); $this->setAttribute('top_page_url', $top_page_url); $this->setAttribute('paging_info', $paging_info); $this->setAttribute('module', 'System'); $this->setAttribute('action', 'LoginInfo'); 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'); $footprint_info_row_array = $request->getAttribute('footprint_info_row_array'); $user_community_id = $request->getAttribute('user_community_id'); //top $top_page_url = $this->getControllerPath('User', 'Index') . '&id=' . $user_community_id; foreach ($footprint_info_row_array as $index => $footprint_row) { // 足跡日付 $footprint_info_row_array[$index]['post_date_disp'] = ACSLib::convert_pg_date_to_str($footprint_row['post_date']); // 足跡をつけたユーザのトップページURL $footprint_info_row_array[$index]['visitor_url'] = $this->getControllerPath(DEFAULT_MODULE, 'Index') . '&id=' . $footprint_row['visitor_community_id']; // コンテンツ日付 $footprint_info_row_array[$index]['contents_date_disp'] = "(" . ACSLib::convert_pg_date_to_str($footprint_row['contents_date'], 0, 0) . ")"; } // ページング設定 $display_count = ACSSystemConfig::get_keyword_value(ACSMsg::get_mst('system_config_group', 'D02'), 'FOOTPRINT_LIST_DISPLAY_MAX_COUNT'); $paging_info = $this->getPagingInfo($controller, $request, $footprint_info_row_array, $display_count); // set $this->setAttribute('acs_user_info_row', $acs_user_info_row); $this->setAttribute('top_page_url', $top_page_url); $this->setAttribute('footprint_info_row_array', $footprint_info_row_array); $this->setAttribute('paging_info', $paging_info); // テンプレート $this->setScreenId("0001"); $this->setTemplate('FootprintCheck.tpl.php'); return parent::execute(); }
function execute() { $context =& $this->getContext(); $user = $context->getUser(); $request = $context->getRequest(); $acs_user_info_row = $user->getAttribute('acs_user_info_row'); // get // 入力フォーム $form = $request->ACSgetParameters(); // カテゴリグループマスタ $category_group_master_row_array = ACSCommunity::get_category_group_master_row_array(); foreach ($category_group_master_row_array as $index => $category_group_master_row) { // カテゴリグループごとのカテゴリマスタ $category_group_master_row_array[$index]['category_master_row_array'] = ACSCommunity::get_category_master_row_array_by_category_group_code($category_group_master_row['category_group_code']); } // カテゴリごとのコミュニティ数 $category_code_community_num_array = ACSCommunity::get_category_code_community_num_array(); // 検索時 if ($form['search']) { // コミュニティ一覧を取得する $community_row_array = ACSCommunity::search_community_row_array($acs_user_info_row['user_community_id'], $form); // 概要 foreach ($community_row_array as $index => $community_row) { $community_row_array[$index]['contents_row_array']['community_profile'] = ACSCommunity::get_contents_row($community_row['community_id'], ACSMsg::get_mst('contents_type_master', 'D07')); } // set $request->setAttribute('community_row_array', $community_row_array); } // set $request->setAttribute('category_group_master_row_array', $category_group_master_row_array); $request->setAttribute('category_code_community_num_array', $category_code_community_num_array); $request->setAttribute('form', $form); return View::INPUT; }
function execute() { $context = $this->getContext(); $controller = $context->getController(); $request = $context->getRequest(); $user = $context->getUser(); $acs_user_info_row = $user->getAttribute('acs_user_info_row'); $system_announce_row_array = $request->getAttribute('system_announce_row_array'); // ページング設定 $display_count = ACSSystemConfig::get_keyword_value(ACSMsg::get_mst('system_config_group', 'D02'), 'NEW_INFO_LIST_DISPLAY_MAX_COUNT'); $paging_info = $this->getPagingInfo($controller, $request, $system_announce_row_array, $display_count); foreach ($system_announce_row_array as $index => $system_announce_row) { $system_announce_row_array[$index]['top_page_url'] = $this->getControllerPath(DEFAULT_MODULE, DEFAULT_ACTION) . '&id=' . $system_announce_row['community_id']; $system_announce_row_array[$index]['post_date'] = ACSLib::convert_pg_date_to_str($system_announce_row['post_date'], true, true); $system_announce_row_array[$index]['expire_date'] = ACSLib::convert_pg_date_to_str($system_announce_row['expire_date'], false, false, false); $system_announce_row_array[$index]['is_expire'] = ACSLib::get_boolean($system_announce_row['is_expire']); $system_announce_row_array[$index]['system_announce_delete_flag'] = ACSLib::get_boolean($system_announce_row['system_announce_delete_flag']); $system_announce_row_array[$index]['delete_system_announce_url'] = $this->getControllerPath('System', 'DeleteSystemAnnounce') . '&system_announce_id=' . $system_announce_row['system_announce_id']; } // システムアナウンス(システムからのお知らせ)作成URL $create_system_announce_url = $this->getControllerPath('System', 'CreateSystemAnnounce'); // テンプレート $this->setScreenId("0001"); $this->setTemplate('SystemAnnounceList.tpl.php'); // set $this->setAttribute('system_announce_row_array', $system_announce_row_array); $this->setAttribute('paging_info', $paging_info); $this->setAttribute('create_system_announce_url', $create_system_announce_url); return parent::execute(); }
function execute() { $context =& $this->getContext(); $user = $context->getUser(); $request = $context->getRequest(); $acs_user_info_row = $user->getAttribute('acs_user_info_row'); // get $target_user_info_row = $request->getAttribute('target_user_info_row'); $commented_diary_row_array = $request->getAttribute('commented_diary_row_array'); // 加工 foreach ($commented_diary_row_array as $index => $commented_diary_row) { $commented_diary_row_array[$index]['diary_comment_url'] = $this->getControllerPath(DEFAULT_MODULE, 'DiaryComment') . '&id=' . $commented_diary_row['community_id'] . '&diary_id=' . $commented_diary_row['diary_id']; $commented_diary_row_array[$index]['is_unread'] = ACSLib::get_boolean($commented_diary_row['is_unread']); } // 新着日記一覧URL $diary_comment_history_url = $this->getControllerPath(DEFAULT_MODULE, 'DiaryCommentHistory') . '&id=' . $target_user_info_row['user_community_id']; // 表示件数制御 // $display_count = ACSSystemConfig::get_keyword_value(ACSMsg::get_mst('system_config_group', 'D02'), 'NEW_INFO_TOP_DISPLAY_MAX_COUNT'); $commented_diary_row_array = array_slice($commented_diary_row_array, 0, $display_count); // set $this->setAttribute('target_user_info_row', $target_user_info_row); $this->setAttribute('commented_diary_row_array', $commented_diary_row_array); $this->setAttribute('diary_comment_history_url', $diary_comment_history_url); $this->setAttribute('get_days', $request->getAttribute('get_days')); // テンプレート $this->setTemplate('DiaryCommentHistory.tpl.php'); $context->getController()->setRenderMode(View::RENDER_VAR); $request->setAttribute("DiaryCommentHistory", $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'); $form = $request->getAttribute('form'); // get $user_info_row_array = $request->getAttribute('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]['edit_page_url'] = $this->getControllerPath('System', 'EditUser') . '&id=' . $user_info_row['user_community_id']; $user_info_row_array[$index]['delete_page_url'] = $this->getControllerPath('System', 'DeleteUser') . '&id=' . $user_info_row['user_community_id']; $user_info_row_array[$index]['login_info_url'] = $this->getControllerPath('System', 'LoginInfo') . '&id=' . $user_info_row['user_community_id']; } $add_user_url = $this->getControllerPath('System', 'AddUser'); // ページング設定 $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); // URL $action_url = $this->getControllerPath(); // テンプレート $this->setScreenId("0001"); $this->setTemplate('UserList.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('add_user_url', $add_user_url); $this->setAttribute('action_url', $action_url); $this->setAttribute('module', 'System'); $this->setAttribute('action', 'UserList'); 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'); $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'); // 表示対象となるユーザコミュニティ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(); $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'); // 表示対象となるコミュニティ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 $target_user_info_row = $request->getAttribute('target_user_info_row'); $commented_diary_row_array = $request->getAttribute('commented_diary_row_array'); // 加工 foreach ($commented_diary_row_array as $index => $commented_diary_row) { $commented_diary_row_array[$index]['diary_comment_url'] = $this->getControllerPath(DEFAULT_MODULE, 'DiaryComment') . '&id=' . $commented_diary_row['community_id'] . '&diary_id=' . $commented_diary_row['diary_id']; $commented_diary_row_array[$index]['is_unread'] = ACSLib::get_boolean($commented_diary_row['is_unread']); } // ページング設定 $display_count = ACSSystemConfig::get_keyword_value(ACSMsg::get_mst('system_config_group', 'D02'), 'NEW_INFO_LIST_DISPLAY_MAX_COUNT'); $paging_info = $this->getPagingInfo($controller, $request, $commented_diary_row_array, $display_count); // set $this->setAttribute('target_user_info_row', $target_user_info_row); $this->setAttribute('commented_diary_row_array', $commented_diary_row_array); $this->setAttribute('diary_comment_history_url', $diary_comment_history_url); $this->setAttribute('paging_info', $paging_info); $this->setAttribute('get_days', $request->getAttribute('get_days')); // テンプレート $this->setScreenId("0001"); $this->setTemplate('DiaryCommentHistory.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 $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'); // 対象となる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(); // 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(); // コミュニティ情報 // 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(); $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'); // form $form = $request->ACSGetParameters(); /* ファイルアップロード処理 */ $ret = 0; if ($_FILES['new_file']['tmp_name'] != '') { // ファイル情報取得 $file_obj = ACSFile::get_upload_file_info_instance($_FILES['new_file'], $target_community_id, $acs_user_info_row['user_community_id']); // フォルダにファイル追加処理 $user_folder_obj = new ACSCommunityFolder($target_community_id, $acs_user_info_row, $target_community_folder_id); $folder_obj = $user_folder_obj->get_folder_obj(); $ret = $folder_obj->add_file($file_obj); } if (!$ret) { print "ERROR: Upload file failed."; } if ($ret) { // 新規登録したファイルID $file_id = $file_obj->get_file_id(); // 2007.12 追加 // ML通知チェックがあればMLにメール送信する $send_announce_mail = $request->getParameter('send_announce_mail'); if ($send_announce_mail == "t") { ACSCommunityMail::send_fileupload_mail($target_community_id, $acs_user_info_row, $folder_obj, $file_obj); } } // ファイル履歴情報登録 if ($ret) { $file_info_row = ACSFileInfoModel::select_file_info_row($file_id); $ret = ACSFileHistory::set_file_history($file_info_row, $acs_user_info_row['user_community_id'], $form['comment'], ACSMsg::get_mst('file_history_operation_master', 'D0101')); } // ファイル詳細情報登録 if ($form['file_category_code'] != '' && $ret) { $file_contents_type_list_row_array = ACSFileDetailInfo::get_file_contents_type_list_row_array($form['file_category_code']); $file_contents_form_array = array(); foreach ($file_contents_type_list_row_array as $file_contents_type_list_row) { $file_contents_form = array('file_id' => $file_id, 'file_contents_type_code' => $file_contents_type_list_row['file_contents_type_code'], 'file_contents_value' => $form['file_contents_array'][$file_contents_type_list_row['file_contents_type_code']]); array_push($file_contents_form_array, $file_contents_form); } $ret = ACSFileDetailInfo::set_file_detail_info($file_id, $form['file_category_code'], $file_contents_form_array); } // フォルダ表示アクション呼び出し $acs_user_info_row = $user->getAttribute('acs_user_info_row'); $folder_action = $this->getControllerPath('Community', 'Folder'); $folder_action .= '&community_id=' . $target_community_id; $folder_action .= '&folder_id=' . $target_community_folder_id; header("Location: {$folder_action}"); }
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(); $acs_user_info_row = $user->getAttribute('acs_user_info_row'); $user_community_id = $request->getAttribute('user_community_id'); $profile = $request->getAttribute('target_user_info_row'); //ユーザが選択した閲覧者 $view_mode = $request->getAttribute('view_mode'); // 公開レベルマスタ $open_level_master_array = ACSDB::get_master_array('open_level'); //表示対象となる情報を取捨選抜する $view_at = array(); switch ($view_mode) { case 1: array_push($view_at, array_search(ACSMsg::get_mst('open_level_master', 'D01'), $open_level_master_array)); array_push($view_at, array_search(ACSMsg::get_mst('open_level_master', 'D02'), $open_level_master_array)); break; case 2: array_push($view_at, array_search(ACSMsg::get_mst('open_level_master', 'D01'), $open_level_master_array)); array_push($view_at, array_search(ACSMsg::get_mst('open_level_master', 'D02'), $open_level_master_array)); array_push($view_at, array_search(ACSMsg::get_mst('open_level_master', 'D05'), $open_level_master_array)); break; default: array_push($view_at, array_search(ACSMsg::get_mst('open_level_master', 'D01'), $open_level_master_array)); } //一般公開 01 ログインユーザに公開 02 すべての友人に公開 05 $profile['contents_row_array']['birthplace'] = ACSAccessControl::set_not_open($profile['contents_row_array']['birthplace'], $view_at); $profile['contents_row_array']['user_name'] = ACSAccessControl::set_not_open($profile['contents_row_array']['user_name'], $view_at); $profile['contents_row_array']['birthday'] = ACSAccessControl::set_not_open($profile['contents_row_array']['birthday'], $view_at); //top $top_page_url = $this->getControllerPath('User', 'Index') . '&id=' . $user_community_id; // メニュー設定 $menu = array(); //一般公開 01 $menu['all_url'] = $this->getControllerPath('User', 'ProfileCheck') . '&id=' . $user_community_id . '&view_mode=0'; //ログインユーザに公開 02 $menu['login_url'] = $this->getControllerPath('User', 'ProfileCheck') . '&id=' . $user_community_id . '&view_mode=1'; //すべての友人に公開 05 $menu['friend_url'] = $this->getControllerPath('User', 'ProfileCheck') . '&id=' . $user_community_id . '&view_mode=2'; // set $this->setAttribute('profile', $profile); // メニュー $this->setAttribute('menu', $menu); $this->setAttribute('top_page_url', $top_page_url); $this->setAttribute('view_mode', $view_mode); // テンプレート $this->setScreenId("0001"); $this->setTemplate('ProfileCheck.tpl.php'); return parent::execute(); }
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 getCredential() { $context = $this->getContext(); $controller = $context->getController(); $request = $context->getRequest(); $user = $context->getUser(); // 非公開コミュニティはメンバのみアクセス可能 $community_self_info_row = ACSCommunity::get_contents_row($request->getParameter('community_id'), ACSMsg::get_mst('contents_type_master', 'D00')); if ($community_self_info_row['open_level_name'] == ACSMsg::get_mst('open_level_master', 'D03')) { return array('COMMUNITY_MEMBER'); } return array(); }
function get_access_control_info(&$controller, &$request, &$user) { $acs_user_info_row = $user->getAttribute('acs_user_info_row'); // 対象となるコミュニティIDを取得 $community_id = $request->getParameter('community_id'); // コミュニティ情報 $community_row = ACSCommunity::get_community_profile_row($community_id); // アクセス制御情報 // $bbs_contents_row = ACSCommunity::get_contents_row($community_id, ACSMsg::get_mst('contents_type_master', 'D41')); $bbs_contents_row['trusted_community_row_array'] = ACSCommunity::get_contents_trusted_community_row_array($community_id, $bbs_contents_row['contents_type_code'], $bbs_contents_row['open_level_code']); $access_control_info = array('role_array' => ACSAccessControl::get_community_role_array($acs_user_info_row, $community_row), 'contents_row_array' => array($bbs_contents_row)); return $access_control_info; }
function 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'); $bbs_row_array = $request->getAttribute('bbs_row_array'); $term = $request->getAttribute('term'); // ユーザ情報 $community_row['top_page_url'] = $this->getControllerPath('Community', DEFAULT_ACTION) . '&community_id=' . $community_row['community_id']; $community_row['image_url'] = ACSCommunity::get_image_url($community_row['community_id']); if ($community_row['file_id'] != '') { $community_file_info_row = ACSFileInfoModel::select_file_info_row($community_row['file_id']); $community_row['image_title'] = $community_file_info_row['display_file_name']; } else { // コミュニティ写真はありません $community_row['image_title'] = ACSMsg::get_msg('Community', ' BBSRSSSuccessView.class.php', 'M001'); } // 加工 foreach ($bbs_row_array as $index => $bbs_row) { // 親記事の投稿者 トップページURL $bbs_row_array[$index]['top_page_url'] = $this->getControllerPath('Community', DEFAULT_ACTION) . '&community_id=' . $bbs_row['community_id']; // 返信画面URL $bbs_row_array[$index]['bbs_res_url'] = $this->getControllerPath('Community', 'BBSRes') . '&community_id=' . $community_row['community_id'] . '&bbs_id=' . $bbs_row['bbs_id']; // ファイルの画像URL if ($bbs_row['file_id'] != "") { $bbs_row_array[$index]['file_url'] = ACSBBSFile::get_image_url($bbs_row['bbs_id'], 'rss'); } } //---- アクセス制御 ----// $role_array = ACSAccessControl::get_community_role_array($acs_user_info_row, $community_row); $bbs_row_array = ACSAccessControl::get_valid_row_array_for_community($acs_user_info_row, $role_array, $bbs_row_array); //----------------------// // ACSBBS::print_bbs_rss()で使用するパラメータをセットする $params = array(); // ベースURL if ($acs_user_info_row['is_acs_user']) { $params['base_url'] = ACSSystemConfig::get_keyword_value(ACSMsg::get_mst('system_config_group', 'D01'), 'SYSTEM_BASE_LOGIN_URL'); } else { $params['base_url'] = ACSSystemConfig::get_keyword_value(ACSMsg::get_mst('system_config_group', 'D01'), 'SYSTEM_BASE_URL'); } // 自身のURL $params['rss_syndication_url'] = $params['base_url'] . $this->getControllerPath('Community', 'BBSRSS') . '&id=' . $community_row['community_id'] . '&term=' . $term; // RSS出力部 ACSBBS::print_bbs_rss($community_row, $bbs_row_array, $params); // 終了 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'); // get $target_user_info_row = $request->getAttribute('target_user_info_row'); $friends_row_array = $request->getAttribute('friends_row_array'); $friends_row_array_num = count($friends_row_array); // 本人のページかどうか if ($target_user_info_row['user_community_id'] == $acs_user_info_row['user_community_id']) { $is_self_page = 1; } else { $is_self_page = 0; } // トップページURL $link_page_url['top_page_url'] = $this->getControllerPath(DEFAULT_MODULE, DEFAULT_ACTION) . '&id=' . $user_info_row['user_community_id']; //他人の日記を閲覧している場合のトップページURL $link_page_url['else_user_diary_url'] = $this->getControllerPath(DEFAULT_MODULE, 'Index') . '&id=' . $target_user_info_row['community_id']; // 加工 if ($acs_user_info_row['user_id'] == $target_user_info_row['user_id']) { $friends_group_list_url = $this->getControllerPath('User', 'FriendsGroupList') . '&id=' . $target_user_info_row['user_community_id']; } foreach ($friends_row_array as $index => $friends_row) { $friends_row_array[$index]['top_page_url'] = $this->getControllerPath(DEFAULT_MODULE, DEFAULT_ACTION) . '&id=' . $friends_row['user_community_id']; $friends_row_array[$index]['image_url'] = ACSUser::get_image_url($friends_row['user_community_id'], 'thumb'); if ($acs_user_info_row['user_id'] == $target_user_info_row['user_id']) { $friends_row_array[$index]['delete_friends_url'] = $this->getControllerPath(DEFAULT_MODULE, 'DeleteFriends') . '&id=' . $target_user_info_row['user_community_id'] . '&delete_user_community_id=' . $friends_row['user_community_id']; } // マイフレンズ人数 $friends_row_array[$index]['friends_row_array_num'] = ACSUser::get_friends_row_array_num($friends_row['user_community_id']); } // ページング設定 $display_count = ACSSystemConfig::get_keyword_value(ACSMsg::get_mst('system_config_group', 'D02'), 'NEW_INFO_LIST_DISPLAY_MAX_COUNT'); $paging_info = $this->getPagingInfo($controller, $request, $friends_row_array, $display_count); // テンプレート $this->setScreenId("0001"); $this->setTemplate('FriendsList.tpl.php'); // set $this->setAttribute('target_user_info_row', $target_user_info_row); $this->setAttribute('friends_row_array', $friends_row_array); $this->setAttribute('friends_row_array_num', $friends_row_array_num); $this->setAttribute('paging_info', $paging_info); $this->setAttribute('friends_group_list_url', $friends_group_list_url); $this->setAttribute('is_self_page', $is_self_page); $this->setAttribute('link_page_url', $link_page_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 $target_user_info_row = $request->getAttribute('target_user_info_row'); $message_row_array = $request->getAttribute('message_row_array'); $move_id = $request->getAttribute('move_id'); // メニュー部URL $menu['receiv_box_url'] = $this->getControllerPath("User", 'MessageBox') . '&id=' . $target_user_info_row['user_community_id']; $menu['send_box_url'] = $this->getControllerPath("User", 'MessageBox') . '&id=' . $target_user_info_row['user_community_id'] . '&move_id=2'; // 加工 foreach ($message_row_array as $index => $message_row) { // 投稿日時 $message_row_array[$index]['post_date'] = ACSLib::convert_pg_date_to_str($message_row['post_date']); // 投稿日時 (省略系: M/D) $message_row_array[$index]['short_post_date'] = ACSLib::convert_pg_date_to_str($message_row['post_date']); //$message_row_array[$index]['short_post_date'] = gmdate("n/j", strtotime($message_row['post_date']) + 9*60*60); if ($move_id == 2) { // 送信済メッセージ詳細ページURL $message_row_array[$index]['message_show_url'] = $this->getControllerPath("User", 'MessageShow') . '&id=' . $target_user_info_row['community_id'] . '&message_id=' . $message_row['message_id'] . '&move_id=2'; // 削除画面URL $message_delete_url = $this->getControllerPath("User", 'DeleteMessage') . '&id=' . $target_user_info_row['user_community_id'] . '&action_type=confirm&move_id=2'; } else { // 受信メッセージ詳細ページURL $message_row_array[$index]['message_show_url'] = $this->getControllerPath("User", 'MessageShow') . '&id=' . $target_user_info_row['community_id'] . '&message_id=' . $message_row['message_id']; // 削除画面URL $message_delete_url = $this->getControllerPath("User", 'DeleteMessage') . '&id=' . $target_user_info_row['user_community_id'] . '&action_type=confirm'; } } // ページング設定 $display_count = ACSSystemConfig::get_keyword_value(ACSMsg::get_mst('system_config_group', 'D02'), 'NEW_INFO_LIST_DISPLAY_MAX_COUNT'); $paging_info = $this->getPagingInfo($controller, $request, $message_row_array, $display_count); // set $this->setAttribute('target_user_info_row', $target_user_info_row); $this->setAttribute('menu', $menu); $this->setAttribute('message_row_array', $message_row_array); $this->setAttribute('paging_info', $paging_info); $this->setAttribute('move_id', $move_id); $this->setAttribute('message_delete_url', $message_delete_url); // エラーメッセージ $this->setAttribute('error_message', $this->getErrorMessage($controller, $request, $user)); // テンプレート $this->setScreenId("0001"); $this->setTemplate('MessageBox.tpl.php'); return parent::execute(); }
function execute() { $context =& $this->getContext(); $user = $context->getUser(); $request = $context->getRequest(); $acs_user_info_row = $user->getAttribute('acs_user_info_row'); // get $target_user_info_row = $request->getAttribute('target_user_info_row'); $new_diary_row_array = $request->getAttribute('new_diary_row_array'); // 加工 foreach ($new_diary_row_array as $index => $new_diary_row) { $new_diary_row_array[$index]['diary_comment_url'] = $this->getControllerPath(DEFAULT_MODULE, 'DiaryComment') . '&id=' . $new_diary_row['community_id'] . '&diary_id=' . $new_diary_row['diary_id']; $new_diary_row_array[$index]['is_unread'] = ACSLib::get_boolean($new_diary_row['is_unread']); } // 新着日記一覧URL $new_diary_url = $this->getControllerPath(DEFAULT_MODULE, 'NewDiary') . '&id=' . $target_user_info_row['user_community_id']; // 表示件数制御 $display_count = ACSSystemConfig::get_keyword_value(ACSMsg::get_mst('system_config_group', 'D02'), 'NEW_INFO_TOP_DISPLAY_MAX_COUNT'); //---- アクセス制御 ----// $_new_diary_row_array = array(); foreach ($new_diary_row_array as $index => $new_diary_row) { if (count($_new_diary_row_array) >= $display_count) { break; } // diary_trusted_community if ($new_diary_row['open_level_name'] == ACSMsg::get_mst('open_level_master', 'D05')) { $new_diary_row_array[$index]['trusted_community_row_array'] = $new_diary_row['trusted_community_row_array'] = ACSDiary::get_diary_trusted_community_row_array($new_diary_row['diary_id']); } $diary_target_user_info_row = ACSUser::get_user_info_row_by_user_community_id($new_diary_row['community_id']); $role_array = ACSAccessControl::get_user_community_role_array($acs_user_info_row, $diary_target_user_info_row); $new_diary_row = ACSAccessControl::get_valid_row_for_user_community($acs_user_info_row, $role_array, $new_diary_row); if ($new_diary_row) { array_push($_new_diary_row_array, $new_diary_row); } } $new_diary_row_array = $_new_diary_row_array; //----------------------// // set $this->setAttribute('target_user_info_row', $target_user_info_row); $this->setAttribute('new_diary_row_array', $new_diary_row_array); $this->setAttribute('new_diary_url', $new_diary_url); $this->setAttribute('get_days', $request->getAttribute('get_days')); // テンプレート $this->setTemplate('NewDiary.tpl.php'); $context->getController()->setRenderMode(View::RENDER_VAR); $request->setAttribute("NewDiary", $this->render()); return parent::execute(); }
public function execute() { $context =& $this->getContext(); $user = $context->getUser(); $request = $context->getRequest(); $acs_user_info_row = $user->getAttribute('acs_user_info_row'); // 新着公開ダイアリー一覧を取得する $new_community_row_array = ACSCommunity::get_new_community_row_array(); foreach ($new_community_row_array as $index => $new_community_row) { // 概要 $new_community_row_array[$index]['contents_row_array']['community_profile'] = ACSCommunity::get_contents_row($new_community_row['community_id'], ACSMsg::get_mst('contents_type_master', 'D07')); } // set $request->setAttribute('new_community_row_array', $new_community_row_array); return View::INPUT; }