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(); $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'); $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(); $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_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(); // 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'); $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(); $controller = $context->getController(); $request = $context->getRequest(); $user = $context->getUser(); $acs_user_info_row = $user->getAttribute('acs_user_info_row'); // 表示対象となるコミュニティIDを取得 $community_id = $request->getParameter('community_id'); // コミュニティ情報 $community_row = ACSCommunity::get_community_row($community_id); $community_row['community_profile'] = ACSCommunity::get_contents_row($community_id, ACSMsg::get_mst('contents_type_master', 'D07')); // 取得期間 $term = intval($request->ACSgetParameter('term')); if (!$term) { // システム設定: コミュニティ: 掲示板RSS取得期間 $term = ACSSystemConfig::get_keyword_value(ACSMsg::get_mst('system_config_group', 'D03'), 'BBS_RSS_TERM'); } // 最新の掲示板RSS $bbs_row_array = ACSBBS::get_new_bbs_rss_row_array($community_id, $term); foreach ($bbs_row_array as $index => $bbs_row) { // 信頼済みコミュニティ一覧 $bbs_row_array[$index]['trusted_community_row_array'] = ACSBBS::get_bbs_trusted_community_row_array($bbs_row['bbs_id']); } // set $request->setAttribute('community_row', $community_row); $request->setAttribute('bbs_row_array', $bbs_row_array); $request->setAttribute('term', $term); return View::SUCCESS; }
function execute() { $context = $this->getContext(); $controller = $context->getController(); $request = $context->getRequest(); $user = $context->getUser(); $acs_user_info_row = $user->getAttribute('acs_user_info_row'); // 表示対象となるユーザコミュニティ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(); // コミュニティ情報 // 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(); $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'); $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(); $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(); $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(); }
function execute() { $context = $this->getContext(); $controller = $context->getController(); $request = $context->getRequest(); $user = $context->getUser(); // get // ユーザ情報一覧 $log_row_array = $request->getAttribute('log_row_array'); $form = $request->getAttribute('form'); // 加工 foreach ($log_row_array as $index => $log_row) { $log_row_array[$index]['log_date'] = ACSLib::convert_pg_date_to_str($log_row['log_date'], true, true, true); $log_row_array[$index]['top_page_url'] = $this->getControllerPath(DEFAULT_MODULE, DEFAULT_ACTION) . '&id=' . $log_row['user_community_id']; if (ACSLib::get_boolean($log_row_array[$index]['administrator_flag'])) { // システム管理者 $log_row_array[$index]['user_level_name'] = ACSMsg::get_msg('System', 'LogInputView.class.php', 'M001'); } else { // ログインユーザ $log_row_array[$index]['user_level_name'] = ACSMsg::get_msg('System', 'LogInputView.class.php', 'M002'); } if (ACSLib::get_boolean($log_row_array[$index]['operation_result'])) { // 成功 $log_row_array[$index]['operation_result_name'] = ACSMsg::get_msg('System', 'LogInputView.class.php', 'M003'); } else { // 失敗 $log_row_array[$index]['operation_result_name'] = ACSMsg::get_msg('System', 'LogInputView.class.php', 'M004'); } } // ページング設定 $display_count = ACSSystemConfig::get_keyword_value(ACSMsg::get_mst('system_config_group', 'D07'), 'LOG_DISPLAY_MAX_COUNT'); $paging_info = $this->getPagingInfo($controller, $request, $log_row_array, $display_count); // URL $action_url = $this->getControllerPath(); // テンプレート $this->setScreenId("0001"); $this->setTemplate('Log.tpl.php'); // set $this->setAttribute('form', $form); $this->setAttribute('log_row_array', $log_row_array); $this->setAttribute('paging_info', $paging_info); $this->setAttribute('action_url', $action_url); $this->setAttribute('module', 'System'); $this->setAttribute('action', 'Log'); return parent::execute(); }
function execute() { $context =& $this->getContext(); $controller = $context->getController(); $user = $context->getUser(); $request = $context->getRequest(); $acs_user_info_row = $user->getAttribute('acs_user_info_row'); // 対象となるユーザコミュニティIDを取得 $user_community_id = $request->ACSgetParameter('id'); if ($user_community_id == null || $user_community_id == '') { $user_community_id = $request->getAttribute("id"); } // 他ユーザのデータが見えないようチェック if (!$this->get_execute_privilege() && $acs_user_info_row["user_community_id"] != $user_community_id) { // このページへアクセスすることはできません。 $controller->forward(SECURE_MODULE, SECURE_ACTION); return; } // インライン表示の場合: 1(true) $inline_mode = $request->ACSgetParameter('inline_mode'); if ($inline_mode == null || $inline_mode == '') { $inline_mode = $request->getAttribute("inline_mode"); } // 取得範囲の指定 $get_days = ACSSystemConfig::get_keyword_value(ACSMsg::get_mst('system_config_group', 'D02'), $inline_mode ? 'NEW_INFO_TOP_TERM' : 'NEW_INFO_LIST_TERM'); $request->setAttribute('get_days', $get_days); // ユーザ情報 $target_user_info_row = ACSUser::get_user_info_row_by_user_community_id($user_community_id); // コメントしたダイアリー一覧を取得する if ($inline_mode) { $commented_diary_row_array = ACSDiary::get_commented_diary_row_array($user_community_id, $get_days, true); } else { $commented_diary_row_array = ACSDiary::get_commented_diary_row_array($user_community_id, $get_days); } // set $request->setAttribute('target_user_info_row', $target_user_info_row); $request->setAttribute('commented_diary_row_array', $commented_diary_row_array); if ($inline_mode) { return View::INPUT; } else { return View::SUCCESS; } }
function execute() { $context = $this->getContext(); $controller = $context->getController(); $request = $context->getRequest(); $user = $context->getUser(); $acs_user_info_row = $user->getAttribute('acs_user_info_row'); // get $target_user_info_row = $request->getAttribute('target_user_info_row'); $community_row_array = $request->getAttribute('community_row_array'); $community_row_array_num = count($community_row_array); foreach ($community_row_array as $index => $community_row) { $community_row_array[$index]['top_page_url'] = $this->getControllerPath('Community', DEFAULT_ACTION) . '&community_id=' . $community_row['community_id']; $community_row_array[$index]['image_url'] = ACSCommunity::get_image_url($community_row['community_id'], 'thumb'); $community_row_array[$index]['community_member_num'] = ACSCommunity::get_community_member_num($community_row['community_id']); // メンバでない非公開コミュニティは表示対象にしない if ($community_row['contents_row_array']['self']['open_level_name'] == ACSMsg::get_mst('open_level_master', 'D03') && !$community_row['is_community_member']) { unset($community_row_array[$index]); } } // 本人のページかどうか 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['else_user_top_page_url'] = $this->getControllerPath(DEFAULT_MODULE, DEFAULT_ACTION) . '&id=' . $target_user_info_row['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, $community_row_array, $display_count); // テンプレート $this->setScreenId("0001"); $this->setTemplate('CommunityList.tpl.php'); // set $this->setAttribute('target_user_info_row', $target_user_info_row); $this->setAttribute('community_row_array', $community_row_array); $this->setAttribute('community_row_array_num', $community_row_array_num); $this->setAttribute('paging_info', $paging_info); $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 $category_group_master_row_array = $request->getAttribute('category_group_master_row_array'); $community_row_array = $request->getAttribute('community_row_array'); $form = $request->getAttribute('form'); // カテゴリマスタ一覧 $category_master_row_array = array(); array_push($category_master_row_array, array('category_code' => 0, 'category_name' => ACSMsg::get_mst('file_category_master', 'D0000'))); foreach ($category_group_master_row_array as $category_group_master_row) { foreach ($category_group_master_row['category_master_row_array'] as $category_master_row) { array_push($category_master_row_array, $category_master_row); } } // コミュニティ一覧 foreach ($community_row_array as $index => $community_row) { $community_row_array[$index]['top_page_url'] = $this->getControllerPath('Community', DEFAULT_ACTION) . '&community_id=' . $community_row['community_id']; } // ページング設定 $display_count = ACSSystemConfig::get_keyword_value(ACSMsg::get_mst('system_config_group', 'D03'), 'COMMUNITY_SEARCH_RESULT_DISPLAY_MAX_COUNT'); $paging_info = $this->getPagingInfo($controller, $request, $community_row_array, $display_count); // URL $action_url = $this->getControllerPath(); // set $this->setAttribute('category_master_row_array', $category_master_row_array); $this->setAttribute('form', $form); $this->setAttribute('community_row_array', $community_row_array); $this->setAttribute('paging_info', $paging_info); $this->setAttribute('action_url', $action_url); $this->setAttribute('module', 'Community'); $this->setAttribute('action', 'SelectTrustedCommunity'); $this->setAttribute('form_name', $request->getAttribute('form_name')); $this->setAttribute('prefix', $request->getAttribute('prefix')); // テンプレート $this->setScreenId("0001"); $this->setTemplate('SelectTrustedCommunity.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']); } //---- アクセス制御 ----// foreach ($new_diary_row_array as $index => $new_diary_row) { // 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['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) { unset($new_diary_row_array[$index]); } } //----------------------// // ページング設定 $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, $new_diary_row_array, $display_count); // set $this->setAttribute('target_user_info_row', $target_user_info_row); $this->setAttribute('new_diary_row_array', $new_diary_row_array); $this->setAttribute('paging_info', $paging_info); $this->setAttribute('get_days', $request->getAttribute('get_days')); // テンプレート $this->setScreenId("0001"); $this->setTemplate('NewDiary.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'); $user_community_id = $request->getAttribute('user_community_id'); $new_file_row_array = $request->getAttribute('new_file_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, $new_file_row_array, $display_count); // set $this->setAttribute('new_file_row_array', $new_file_row_array); $this->setAttribute('paging_info', $paging_info); $this->setAttribute('get_days', $request->getAttribute('get_days')); // テンプレート $this->setScreenId("0001"); $this->setTemplate('NewFriendsFolder.tpl.php'); return parent::execute(); }
function execute() { $context = $this->getContext(); $controller = $context->getController(); $request = $context->getRequest(); $user = $context->getUser(); $this->setScreenId("0001"); $this->setTemplate('Schedule.tpl.php'); $current_module = 'Community'; // ログインユーザ情報 $this->setAttribute('acs_user_info_row', $request->getAttribute('acs_user_info_row')); // コミュニティ情報 $target_community_row =& $request->getAttribute('target_community_row'); $this->setAttribute('target_community_row', $target_community_row); // 共通URLパラメータ $url_params = "community_id=" . $target_community_row['community_id']; // スケジュールインスタンスの配列 $schedules =& $request->getAttribute('schedules'); // 表示用配列の生成 $schedule_list = array(); $schedule_persons =& $request->getAttribute('schedule_persons'); foreach ($schedules as $schedule) { $schedule_params = $url_params . "&schedule_id=" . $schedule->schedule_id; $person_count_info = $schedule_persons[$schedule->schedule_id]; if ($schedule->is_target_all()) { $person_count_info['participate_person_count'] = $request->getAttribute('member_count'); } $schedule_list[] = array('instance' => $schedule, 'url_edit' => $this->getControllerPath($current_module, 'EditSchedule') . "&" . $schedule_params, 'url_decide' => $this->getControllerPath($current_module, 'DecideSchedule') . "&" . $schedule_params, 'url_answer' => $this->getControllerPath($current_module, 'AnswerSchedule') . "&" . $schedule_params, 'disp_detail' => mb_strlen($schedule->schedule_detail) > 15 ? mb_substr($schedule->schedule_detail, 0, 15) . "..." : $schedule->schedule_detail, 'disp_person_count' => $person_count_info['answer_person_count'] . " / " . $person_count_info['participate_person_count'] . " " . ACSMsg::get_msg('Community', 'ScheduleSuccessView.class.php', 'M004'), 'disp_closing' => ACSLib::convert_pg_date_to_str($schedule->schedule_closing_datetime), 'disp_status' => $schedule->is_fixed() ? ACSMsg::get_msg('Community', 'ScheduleSuccessView.class.php', 'M001') : ($schedule->is_close() ? ACSMsg::get_msg('Community', 'ScheduleSuccessView.class.php', 'M002') : ACSMsg::get_msg('Community', 'ScheduleSuccessView.class.php', 'M003'))); } // コミュニティのURL $this->setAttribute('url_community_top', $this->getControllerPath($current_module, 'Index') . "&" . $url_params); // 新規作成のURL $this->setAttribute('url_schedule_new', $this->getControllerPath($current_module, 'EditSchedule') . "&" . $url_params); // ページング設定 $display_count = ACSSystemConfig::get_keyword_value(ACSMsg::get_mst('system_config_group', 'D03'), 'COMMUNITY_SCHEDULE_LIST_DISPLAY_MAX_COUNT'); $paging_info = $this->getPagingInfo($controller, $request, $schedule_list, $display_count); $this->setAttribute('schedule_list', $schedule_list); $this->setAttribute('paging_info', $paging_info); return parent::execute(); }
function execute() { $context = $this->getContext(); $controller = $context->getController(); $request = $context->getRequest(); $user = $context->getUser(); $acs_user_info_row = $user->getAttribute('acs_user_info_row'); // 表示対象となるユーザコミュニティIDを取得 $user_community_id = $acs_user_info_row['user_community_id']; if (!$this->get_execute_privilege()) { $controller->forward(SECURE_MODULE, SECURE_ACTION); return; } // 足跡 $get_days = ACSSystemConfig::get_keyword_value(ACSMsg::get_mst('system_config_group', 'D02'), FOOTPRINT_LIST_TERM); $footprint_info_row_array = ACSUser::get_footprint_row($user_community_id, $get_days); // set $request->setAttribute('acs_user_info_row', $acs_user_info_row); $request->setAttribute('user_community_id', $user_community_id); $request->setAttribute('footprint_info_row_array', $footprint_info_row_array); return View::SUCCESS; }
/** * execute */ function execute() { $context =& $this->getContext(); $request =& $context->getRequest(); $moduleName = $context->getModuleName(); $actionName = $context->getActionName(); $controller = $context->getController(); $user = $context->getUser(); $acs_user_info_row = $user->getAttribute('acs_user_info_row'); // ログイン中のユーザ情報 $this->setAttribute('acs_user_info_row', $acs_user_info_row); // ログインユーザかどうか $this->setAttribute('is_login_user', $acs_user_info_row['is_login_user']); // コミュニティメニューURL $this->setAttribute('community_menu_url', $this->getControllerPath('Community', 'SearchCommunity')); // ユーザ検索URL $this->setAttribute('search_user_url', $this->getControllerPath('User', 'SearchUser')); // 新着情報URL $this->setAttribute('public_index_url', $this->getControllerPath('Public', DEFAULT_ACTION)); // FAQ URL $this->setAttribute('faq_url', ACSSystemConfig::get_keyword_value(ACSMsg::get_mst('system_config_group', 'D01'), 'SYSTEM_BASE_URL') . 'faq/'); // システム管理メニューURL if (ACSAccessControl::is_system_administrator($acs_user_info_row)) { $this->setAttribute('is_system_administrator', true); $this->setAttribute('system_manage_menu_url', $this->getControllerPath('System', DEFAULT_ACTION)); } // ログインURL $login_url = ACSSystemConfig::get_keyword_value(ACSMsg::get_mst('system_config_group', 'D01'), 'SYSTEM_BASE_LOGIN_URL'); $login_url .= $this->getControllerPath(DEFAULT_MODULE, 'Login'); $this->setAttribute('login_url', $login_url); // ログアウトURL $logout_url = ACSSystemConfig::get_keyword_value(ACSMsg::get_mst('system_config_group', 'D01'), 'SYSTEM_BASE_URL'); $logout_url .= $this->getControllerPath(DEFAULT_MODULE, 'Logout'); $this->setAttribute('logout_url', $logout_url); // 新着情報URL(非ログイン) $public_index_url_not_login = ACSSystemConfig::get_keyword_value(ACSMsg::get_mst('system_config_group', 'D01'), 'SYSTEM_BASE_URL'); $public_index_url_not_login .= $this->getControllerPath('Public', DEFAULT_ACTION); $this->setAttribute('public_index_url_not_login', $public_index_url_not_login); }
/** * 登録実行処理 * POSTメソッドの場合、呼ばれる */ function execute() { $context = $this->getContext(); $controller = $context->getController(); $request = $context->getRequest(); $user = $context->getUser(); $params =& $request->getParameters(); // ログインユーザ情報の設定 $acs_user_info_row =& $user->getAttribute('acs_user_info_row'); $request->setAttributeByRef('acs_user_info_row', $acs_user_info_row); // 幹事でないスケジュールや決定済の場合セキュリティエラー // 最新スケジュール情報を取得して可否を確認 $schedule =& ACSSchedule::get_schedule_instance($params['community_id'], $params['schedule_id']); if ($schedule->is_fixed() || !$schedule->is_organizer($acs_user_info_row)) { // このページへアクセスすることはできません。 $controller->forward(SECURE_MODULE, SECURE_ACTION); return; } // 候補日時選択画面からのPOSTの場合 if ($params['post_from_answer'] == 't') { $request->setAttributeByRef('schedule', $schedule); $return_view = $this->getMailInputView($controller, $request, $user); // メール入力画面からのPOSTの場合 } else { // DB更新 $schedule->update_decide_schedule($params['mailentry_adjustment_id']); // システムのメールアドレスを取得 $system_mail_addr = ACSSystemConfig::get_keyword_value(ACSMsg::get_mst('system_config_group', 'D01'), 'SYSTEM_MAIL_ADDR'); // メール送信相手の設定 // 自由参加の場合対象となるメンバの取得 $target_mmb = ""; if ($schedule->is_target_all() === FALSE) { $p_array =& ACSScheduleParticipant::get_schedule_participant_instance_list($schedule->schedule_id, FALSE); foreach ($p_array as $user_community_id => $schedule_participant) { $target_mmb[] = $user_community_id; } $p_array = ""; } // メールの送信 ACSCommunityMail::send_community_mail($schedule->community_id, $system_mail_addr, $params['mail_subject'], $params['mail_message'], $target_mmb); // リダイレクト(リロード対策) $controller->redirect($this->getControllerPath('Community', 'Schedule') . "&community_id=" . $schedule->community_id); } return $return_view; }
/** * execute メソッド * メッセージパッシング * @param object $user ユーザ情報 * @param object $request リクエスト情報 * @param object $controller &アドレス コントローラ * * @return parent::execute($controller, $request, $user) BaseViewクラス実行 */ function execute() { $context = $this->getContext(); $controller = $context->getController(); $request = $context->getRequest(); $user = $context->getUser(); //actionクラスから通知setされたuser_community_id を取得する $user_community_id = $request->getAttribute('user_community_id'); //actionクラスから通知setされたtarget_user_info_row を取得し$profile変数のオブジェクト配列とする $profile = $request->getAttribute('target_user_info_row'); $image_new_mode = $request->getAttribute('image_new_add'); $image_file_label = $request->getAttribute('image_file_label'); $open_level_code_row = $request->getAttribute('open_level_code_row'); $display_for_public = ACSSystemConfig::get_keyword_value(ACSMsg::get_mst('system_config_group', 'D08'), 'DISPLAY_PHOTOS_FOR_PUBLIC'); if ($display_for_public == NULL) { $display_for_public = "0"; } // 画像ファイルのパスを設定 $image_file_array = ACSUser::get_image_url_with_open_level($user_community_id, $open_level_code_row); // $profile['image_url'] = ACSUser::get_image_url($user_community_id); $file_id = ""; //更新処理用 追加 ver1.2 2006/2/13 (新規追加への対応) // メニュー設定 新規登録以外は削除メニューを表示する $menu = array(); for ($i = 0; $i < count($open_level_code_row); $i++) { $key_name = 'file_id_ol' . $open_level_code_row[$i]; if ($image_new_mode[$key_name]) { $menu['delete_image_url' . $open_level_code_row[$i]] = null; } else { $file_id = $profile[$key_name]; $delete_confirm_url = $this->getControllerPath('User', 'DeleteProfileImage'); $delete_confirm_url .= '&id=' . $user_community_id; $delete_confirm_url .= '&file_id=' . $file_id; $delete_confirm_url .= '&open_level_code=' . $open_level_code_row[$i]; $menu['delete_image_url' . $open_level_code_row[$i]] = $delete_confirm_url; } $menu['image_new_mode' . $open_level_code_row[$i]] = $image_new_mode[$key_name]; //画像のアップロードURL ver1.1 $upload_image_url[$key_name] = $this->getControllerPath('User', 'UploadProfileImage'); $upload_image_url[$key_name] .= '&id=' . $user_community_id; $upload_image_url[$key_name] .= '&image_new_mode=' . $image_new_mode[$key_name]; $upload_image_url[$key_name] .= '&file_id=' . $file_id; $upload_image_url[$key_name] .= '&open_level_code=' . $open_level_code_row[$i]; } // エラーメッセージ設定 $error_msg_array = array(); $error_row = $request->getAttribute('error_row'); if ($error_row) { foreach ($error_row as $key => $msg) { array_push($error_msg_array, $msg); } } //set $this->setAttribute('image_file_array', $image_file_array); $this->setAttribute('display_for_public', $display_for_public); $this->setAttribute('profile', $profile); $this->setAttribute('menu', $menu); $this->setAttribute('error_msg_array', $error_msg_array); $this->setAttribute('upload_image_url', $upload_image_url); // テンプレート $this->setScreenId("0001"); $this->setTemplate('EditProfileImage.tpl.php'); return parent::execute(); }
//システム情報の取得 $system_config_keyword_value = $request->getAttribute('system_config_keyword_value'); $rss->title = $system_config_keyword_value['SYSTEM_NAME']; $rss->description = $system_config_keyword_value['SYSTEM_OUTLINE']; $rss->link = $system_config_keyword_value['SYSTEM_BASE_URL']; $rss->syndicationURL = $request->getAttribute('rss_syndicationURL'); $image = new FeedImage(); $image->title = $system_config_keyword_value['SYSTEM_IMAGE']['title']; $image->url = $system_config_keyword_value['SYSTEM_IMAGE']['url']; $image->link = $system_config_keyword_value['SYSTEM_IMAGE']['link']; $image->description = $system_config_keyword_value['SYSTEM_IMAGE']['description']; $rss->image = $image; // get news items from somewhere: $bbs_rss_array = $request->getAttribute('bbs_rss_array'); $system_top_address = $request->getAttribute('system_top_address'); $rss_display_max_count = ACSSystemConfig::get_keyword_value(ACSMsg::get_mst('system_config_group', 'D06'), 'RSS_DISPLAY_MAX_COUNT'); $rss_count = 0; foreach ($bbs_rss_array as $index => $data) { // CRLF → LF $body = preg_replace('/\\r\\n/', "\n", $data['body']); $item = new FeedItem(); $item->post_date = $data['post_date']; $item->title = $data['community_id_name'] . "::" . $data['subject']; $item->link = $system_top_address . $data['bbs_url']; $item->description = $body; $item->image_link = $data['file_url']; $item->description2 = $body; //第2の本文 $rss->addItem($item); $rss_count++; if ($rss_count == $rss_display_max_count) {
/** * $user_community_idの新着フォルダ情報を取得する * ($commyunity_row_arrayに含まれるcommunity_idが所有するファイルを対象とする) * * @param $user_community_id ユーザコミュニティID (ダイアリーへのアクセス者となるユーザ) * @param $csv_string 所有者条件csv文字列 * @return 新着フォルダ一覧 (連想配列の配列) */ function get_new_folder_row_array($user_community_id, $csv_string, $days = false, $offset = false) { $user_community_id = pg_escape_string($user_community_id); // フォルダの新着記事を最新順に取得する $sql = "SELECT *, acs_is_unread_file(" . $user_community_id . ", fi.file_id) as is_unread " . " FROM folder_file AS ff, folder AS fo, " . "\t file_info AS fi, community AS cm" . " WHERE fi.file_id = ff.file_id" . " AND ff.folder_id = fo.folder_id" . " AND fi.owner_community_id = cm.community_id" . " AND fi.owner_community_id IN (" . $csv_string . ")"; //------ 2007.2 表示時間短縮対応 // 日数指定がある場合 if ($days !== false) { $sql = $sql . " AND " . ACSLib::get_sql_condition_from_today("fi.update_date", $days); } //$sql = $sql . " ORDER BY fi.update_date DESC"; if ($offset != false) { // 表示件数制御 // $display_count = ACSSystemConfig::get_keyword_value(ACSMsg::get_mst('system_config_group', 'D02'), 'NEW_INFO_TOP_DISPLAY_MAX_COUNT'); $sql = $sql . " AND open_level_code is not null"; $sql = $sql . " ORDER BY fi.update_date DESC"; $sql = $sql . " OFFSET 0 LIMIT " . $display_count; } else { $sql = $sql . " ORDER BY fi.update_date DESC"; } $row_array = ACSDB::_get_row_array($sql); return $row_array; }
function execute() { $context = $this->getContext(); $controller = $context->getController(); $request = $context->getRequest(); $user = $context->getUser(); // RSS対象のアドレス開始値 $system_top_address = ACSSystemConfig::get_keyword_value(ACSMsg::get_mst('system_config_group', 'D01'), 'SYSTEM_BASE_URL'); $rss_syndicationURL = $system_top_address; $rss_syndicationURL .= $this->getControllerPath('Community', 'PressReleaseRSS'); $rss_syndicationURL .= '&community_id=' . $request->getParameter('community_id'); // コミュニティ情報 $community_id = $request->getParameter('community_id'); $community_row = ACSCommunity::get_community_row($community_id); $community_row['community_profile'] = ACSCommunity::get_contents_row($community_id, ACSMsg::get_mst('contents_type_master', 'D07')); //コミュニティトップページ $community_top_page_url = $this->getControllerPath('Community', 'Index') . '&community_id=' . $community_id; $community_row['community_profile']['top_page_url'] = $community_top_page_url; //コミュニティ写真表示 if ($community_row['file_id']) { $community_file_info_row = ACSFileInfoModel::select_file_info_row($community_row['file_id']); $community_row['image_title'] = $community_file_info_row['display_file_name']; } else { $community_row['image_title'] = ACSMsg::get_msg('Community', 'PressReleaseRSSAction.class.php', 'M001'); } $community_row['image_url'] = ACSCommunity::get_image_url($community_id, 'rss'); // BBS記事一覧 一つだけ出力するものを選択できる $bbs_row_array = ACSBBS::get_bbs_rss_row_array($community_id, 1); if (count($bbs_row_array) > 0) { // 掲載終了日が本日を越えていないもののみにする // 本日を取得 $today = date("Y/m/d"); $bbs_rss_array = array(); foreach ($bbs_row_array as $index => $bbs_row) { //対象となる記事のみを抽出 $bbs_date = ACSLib::convert_pg_date_to_str($bbs_row['expire_date'], false, false, false); if ($bbs_date >= $today || $bbs_date == null) { //記事配列を作り変え $bbs_rss_array[$index] = $bbs_row; //記事のリンク先を作る $bbs_rss_array[$index]['bbs_url'] = $this->getControllerPath('Community', 'BBSRes') . '&community_id=' . $community_row['community_id'] . '&bbs_id=' . $bbs_row['bbs_id']; //画像のリンク先を作る $bbs_rss_array[$index]['file_link'] = ""; if ($bbs_row['file_id'] != "") { $bbs_rss_array[$index]['file_url'] = $system_top_address . ACSBBSFile::get_image_url($bbs_row['bbs_id'], 'rss'); //RSS表示用 } } } $detail = true; //存在する } else { $detail = false; //存在しない } // RSS対象のBBS記事一覧 $user->setAttribute('bbs_rss_array', $bbs_rss_array); // RSS対象のCommunity情報 $user->setAttribute('community_row', $community_row); $community_name = htmlspecialchars($community_row['community_name']); // set $request->setAttribute('rss_syndicationURL', $rss_syndicationURL); $request->setAttribute('bbs_rss_array', $bbs_rss_array); $request->setAttribute('community_row', $community_row); $request->setAttribute('community_name', $community_name); $request->setAttribute('system_top_address', $system_top_address); //記事の存在フラグ $request->setAttribute('detail', $detail); require "PressReleaseRSS.php"; }
/** * スケジュール調整決定通知定型文取得 * * @return true / false */ function get_decision_mail_message($lang, $decide_adjustment_date_id) { $current_lang = ACSMsg::get_lang(); ACSMsg::set_lang($lang); $msg = ACSMsg::get_serial_msg('lib', basename(__FILE__), 'DEC%03d'); // システムURL $system_group = ACSMsg::get_mst('system_config_group', 'D01'); $system_base_url = ACSSystemConfig::get_keyword_value($system_group, 'SYSTEM_BASE_URL'); $system_base_login_url = ACSSystemConfig::get_keyword_value($system_group, 'SYSTEM_BASE_LOGIN_URL'); // コミュニティ情報の取得 $community_row =& ACSCommunity::get_community_row($this->community_id); // 決定日 $adjustment_dates_list = $this->get_adjustment_dates(); // 回答状況 $person_count_array =& ACSSchedule::get_total_person_count($this->community_id, $this->schedule_id); $person_count = $person_count_array[$this->schedule_id]; // 対象が全員の場合は参加人数をメンバ数に修正 if ($this->is_target_all()) { $person_count['participate_person_count'] = ACSCommunity::get_community_member_count($this->community_id); } // スケジュールURL $schedule_url = $system_base_login_url . SCRIPT_PATH . "?" . MODULE_ACCESSOR . "=Community" . "&" . ACTION_ACCESSOR . "=AnswerSchedule" . "&community_id=" . $this->community_id . "&schedule_id=" . $this->schedule_id; $user_community_row =& ACSUser::get_user_profile_row($this->user_community_id); $msg = ACSMsg::get_tag_replace($msg, array('{SYSTEM_BASE_URL}' => $system_base_url, '{COMMUNITY_ID}' => $this->community_id, '{COMMUNITY_NAME}' => $community_row['community_name'], '{USER_NAME}' => $user_community_row['user_name'], '{USER_COMMUNITY_NAME}' => $user_community_row['community_name'], '{SCHEDULE_NAME}' => $this->schedule_name, '{SCHEDULE_DETAIL}' => $this->schedule_detail, '{SCHEDULE_CLOSING_DATETIME}' => ACSLib::convert_pg_date_to_str($this->schedule_closing_datetime), '{SCHEDULE_ANSWER_COUNT}' => $person_count['answer_person_count'], '{SCHEDULE_PARTICIPATE_COUNT}' => $person_count['participate_person_count'], '{SCHEDULE_DECISION_DATE}' => $adjustment_dates_list[$decide_adjustment_date_id]['date_string'], '{ANSWER_SCHEDULE_URL}' => $schedule_url)); ACSMsg::set_lang($current_lang); return $msg; }
/** * ユーザ情報を登録する * * @param $form ユーザ情報 * @return 成功(true) / 失敗(false) */ static function set_user_info($form) { // コミュニティ種別マスタ $community_type_master_array = ACSDB::get_master_array('community_type'); // コミュニティ種別コード $user_community_type_code = array_search(ACSMsg::get_mst('community_type_master', 'D10'), $community_type_master_array); $friends_community_type_code = array_search(ACSMsg::get_mst('community_type_master', 'D20'), $community_type_master_array); // コミュニティ種別マスタ $contents_type_master_array = ACSDB::get_master_array('contents_type'); // コンテンツ種別コード $self_contents_type_code = array_search(ACSMsg::get_mst('contents_type_master', 'D00'), $contents_type_master_array); $user_name_contents_type_code = array_search(ACSMsg::get_mst('contents_type_master', 'D01'), $contents_type_master_array); $mail_addr_contents_type_code = array_search(ACSMsg::get_mst('contents_type_master', 'D02'), $contents_type_master_array); $org_form = $form; ACSLib::escape_sql_array($form); ACSLib::get_sql_value_array($form); // BEGIN ACSDB::_do_query("BEGIN"); // (1) ユーザコミュニティ (community) $user_community_id_seq = ACSDB::get_next_seq('community_id_seq'); $sql = "INSERT INTO community"; $sql .= " (community_id, community_name, community_type_code)"; $sql .= " VALUES ({$user_community_id_seq}, {$form['user_name']}, '{$user_community_type_code}')"; $ret = ACSDB::_do_query($sql); if (!$ret) { ACSDB::_do_query("ROLLBACK"); return $ret; } // (2-1) ユーザ情報 (user_info) $sql = "INSERT INTO user_info"; $sql .= " (user_id, user_community_id, administrator_flag)"; $sql .= " VALUES ({$form['user_id']}, '{$user_community_id_seq}', 'f')"; $ret = ACSDB::_do_query($sql); if (!$ret) { ACSDB::_do_query("ROLLBACK"); return $ret; } // (2-2) (マイページ)全体 $contents_form = array(); $contents_form['community_id'] = $user_community_id_seq; $contents_form['contents_type_code'] = $self_contents_type_code; $contents_form['contents_value'] = ''; $contents_form['open_level_code'] = ACSAccessControl::get_default_open_level_code(ACSMsg::get_mst('community_type_master', 'D10'), ACSMsg::get_mst('contents_type_master', 'D00')); $ret = ACSCommunity::set_contents($contents_form); if (!$ret) { ACSDB::_do_query("ROLLBACK"); return $ret; } // (2-3) 氏名 $user_name_default_open_level_code = ACSSystemConfig::get_keyword_value(ACSMsg::get_mst('system_config_group', 'D08'), 'NAME_DISPLAY_LEVEL'); //$user_name_default_open_level_code = ACSAccessControl::get_default_open_level_code(ACSMsg::get_mst('community_type_master','D10'), ACSMsg::get_mst('contents_type_master','D01')); $sql = "INSERT INTO contents"; $sql .= " (community_id, contents_type_code, contents_value, open_level_code)"; $sql .= " VALUES ({$user_community_id_seq}, '{$user_name_contents_type_code}', {$form['user_name']}, '{$user_name_default_open_level_code}')"; $ret = ACSDB::_do_query($sql); if (!$ret) { ACSDB::_do_query("ROLLBACK"); return $ret; } // (2-4) メールアドレス $mail_addr_default_open_level_code = ACSAccessControl::get_default_open_level_code(ACSMsg::get_mst('community_type_master', 'D10'), ACSMsg::get_mst('contents_type_master', 'D02')); $sql = "INSERT INTO contents"; $sql .= " (community_id, contents_type_code, contents_value, open_level_code)"; $sql .= " VALUES ({$user_community_id_seq}, '{$mail_addr_contents_type_code}', {$form['mail_addr']}, '{$mail_addr_default_open_level_code}')"; $ret = ACSDB::_do_query($sql); if (!$ret) { ACSDB::_do_query("ROLLBACK"); return $ret; } // (2-5) マイフレンズ $contents_form = array(); $contents_form['community_id'] = $user_community_id_seq; $contents_form['contents_type_code'] = array_search(ACSMsg::get_mst('contents_type_master', 'D11'), $contents_type_master_array); $contents_form['contents_value'] = ''; $contents_form['open_level_code'] = ACSAccessControl::get_default_open_level_code(ACSMsg::get_mst('community_type_master', 'D10'), ACSMsg::get_mst('contents_type_master', 'D11')); $ret = ACSCommunity::set_contents($contents_form); if (!$ret) { ACSDB::_do_query("ROLLBACK"); return $ret; } // (3) マイフレンズコミュニティ (community) $friends_community_id_seq = ACSDB::get_next_seq('community_id_seq'); $sql = "INSERT INTO community"; $sql .= " (community_id, community_type_code)"; $sql .= " VALUES ('{$friends_community_id_seq}', '{$friends_community_type_code}')"; $ret = ACSDB::_do_query($sql); if (!$ret) { ACSDB::_do_query("ROLLBACK"); return $ret; } // (4) マイフレンズコミュニティをユーザコミュニティのサブコミュニティとする (sub_community) $sql = "INSERT INTO sub_community"; $sql .= " (community_id, sub_community_id)"; $sql .= " VALUES ('{$user_community_id_seq}', '{$friends_community_id_seq}')"; $ret = ACSDB::_do_query($sql); if (!$ret) { ACSDB::_do_query("ROLLBACK"); return $ret; } // COMMIT ACSDB::_do_query("COMMIT"); // (5) パスワードファイル ACSSystem::update_passwd($org_form['user_id'], $org_form['passwd']); return $ret; }