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');
     // get
     $target_user_info_row = $request->getAttribute('target_user_info_row');
     $message_row = $request->getAttribute('message_row');
     // 加工
     //送信者のトップページURL
     $link_page_url['else_user_message_url'] = $this->getControllerPath(DEFAULT_MODULE, 'Index') . '&id=' . $message_row['user_id'];
     // 投稿日時
     $message_row['post_date'] = ACSLib::convert_pg_date_to_str($message_row['post_date']);
     // メニュー部URL
     $menu['receiv_box_url'] = $this->getControllerPath('User', 'MessageBox') . '&id=' . $acs_user_info_row['user_community_id'];
     $menu['send_box_url'] = $this->getControllerPath('User', 'MessageBox') . '&id=' . $acs_user_info_row['user_community_id'] . '&move_id=2';
     // 返信ボタンURL
     $message_return_url = $this->getControllerPath('User', 'Message') . '&id=' . $message_row['user_id'] . '&message_id=' . $message_row['message_id'] . '&move_id=4';
     // set
     $this->setAttribute('acs_user_info_row', $acs_user_info_row);
     $this->setAttribute('target_user_info_row', $target_user_info_row);
     $this->setAttribute('message_row', $message_row);
     $this->setAttribute('message_return_url', $message_return_url);
     $this->setAttribute('menu', $menu);
     $this->setAttribute('move_id', $request->getAttribute('move_id'));
     $this->setAttribute('link_page_url', $link_page_url);
     // テンプレート
     $this->setScreenId("0001");
     $this->setTemplate('MessageShow.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');
     $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();
 }
 public function execute()
 {
     $context =& $this->getContext();
     $user = $context->getUser();
     $request = $context->getRequest();
     $acs_user_info_row = $user->getAttribute('acs_user_info_row');
     // get
     $new_open_diary_row_array = $request->getAttribute('new_open_diary_row_array');
     // 加工
     foreach ($new_open_diary_row_array as $index => $new_open_diary_row) {
         // 投稿者のトップページURL
         $new_open_diary_row_array[$index]['top_page_url'] = $this->getControllerPath(DEFAULT_MODULE, DEFAULT_ACTION) . '&id=' . $new_open_diary_row['user_community_id'];
         // 投稿者の写真
         $new_open_diary_row_array[$index]['image_url'] = ACSUser::get_image_url($new_open_diary_row['user_community_id'], 'thumb');
         // ダイアリーコメントURL
         $new_open_diary_row_array[$index]['diary_comment_url'] = $this->getControllerPath(DEFAULT_MODULE, 'DiaryComment') . '&id=' . $new_open_diary_row['user_community_id'] . '&diary_id=' . $new_open_diary_row['diary_id'];
         $new_open_diary_row_array[$index]['post_date'] = ACSLib::convert_pg_date_to_str($new_open_diary_row['post_date']);
     }
     // set
     $this->setAttribute('new_open_diary_row_array', $new_open_diary_row_array);
     // テンプレートをセットする
     $this->setTemplate('NewOpenDiary.tpl.php');
     $context->getController()->setRenderMode(View::RENDER_VAR);
     $request->setAttribute("NewOpenDiary", $this->render());
     return parent::execute();
 }
예제 #5
0
 /**
  * ファイル履歴情報を登録する
  *
  * @param $file_info_row ファイル情報
  * @param $update_user_community_id 登録/更新者のユーザコミュニティID
  * @param $comment コメント
  * @param $file_history_operation_name ファイル履歴操作名
  * @return 成功(file_history_id) / 失敗(false)
  */
 static function set_file_history($file_info_row, $update_user_community_id, $comment, $file_history_operation_name)
 {
     $file_history_operation_master_array = ACSDB::get_master_array('file_history_operation');
     $file_history_id_seq = ACSDB::get_next_seq('file_history_id_seq');
     $file_history_operation_code = array_search($file_history_operation_name, $file_history_operation_master_array);
     ACSLib::escape_sql_array($file_info_row);
     ACSLib::get_sql_value_array($file_info_row);
     // ファイル履歴を登録
     $sql = "INSERT INTO file_history";
     $sql .= " (file_history_id, file_id, display_file_name, server_file_name, thumbnail_server_file_name, mime_type, file_size, update_date, update_user_community_id, file_history_operation_code)";
     $sql .= " VALUES ({$file_history_id_seq}, {$file_info_row['file_id']}, {$file_info_row['display_file_name']}, {$file_info_row['server_file_name']}, {$file_info_row['thumbnail_server_file_name']}, {$file_info_row['mime_type']}, {$file_info_row['file_size']}, {$file_info_row['update_date']}, '{$update_user_community_id}', '{$file_history_operation_code}')";
     $ret = ACSDB::_do_query($sql);
     if (!$ret) {
         ACSDB::_do_query("ROLLBACK");
         return $ret;
     }
     // ファイル履歴コメントを登録
     $ret = ACSFileHistoryComment::set_file_history_comment($file_history_id_seq, $update_user_community_id, $comment);
     if (!$ret) {
         ACSDB::_do_query("ROLLBACK");
         return $ret;
     }
     // trueの場合はファイル履歴IDをセット
     if ($ret) {
         $ret = $file_history_id_seq;
     }
     return $ret;
 }
 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();
 }
 public function execute()
 {
     $context =& $this->getContext();
     $user = $context->getUser();
     $request = $context->getRequest();
     $acs_user_info_row = $user->getAttribute('acs_user_info_row');
     // get
     $new_bbs_for_press_release_row_array = $request->getAttribute('new_bbs_for_press_release_row_array');
     // 加工
     foreach ($new_bbs_for_press_release_row_array as $index => $new_bbs_row) {
         $new_bbs_for_press_release_row_array[$index]['top_page_url'] = $this->getControllerPath('Community', DEFAULT_ACTION) . '&community_id=' . $new_bbs_row['community_id'];
         $new_bbs_for_press_release_row_array[$index]['bbs_res_url'] = $this->getControllerPath('Community', 'BBSRes') . '&community_id=' . $new_bbs_row['community_id'] . '&bbs_id=' . $new_bbs_row['bbs_id'];
         if ($new_bbs_row['file_id']) {
             $new_bbs_for_press_release_row_array[$index]['file_url'] = ACSBBSFile::get_image_url($new_bbs_row['bbs_id'], 'thumb');
             // サムネイル
             $new_bbs_for_press_release_row_array[$index]['file_url_alink'] = ACSBBSFile::get_image_url($new_bbs_row['bbs_id'], '');
             // ポップアップ用
         }
         $new_bbs_for_press_release_row_array[$index]['post_date'] = ACSLib::convert_pg_date_to_str($new_bbs_row['post_date'], 1, 0);
     }
     // set
     $this->setAttribute('new_bbs_for_press_release_row_array', $new_bbs_for_press_release_row_array);
     // テンプレートをセットする
     $this->setTemplate('NewPressRelease.tpl.php');
     $context->getController()->setRenderMode(View::RENDER_VAR);
     $request->setAttribute("NewPressRelease", $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');
     $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');
     // 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();
 }
 /**
  * file_access_history UPDATE
  *
  * @param $form ファイルアクセス履歴情報
  * @return 成功(true) / 失敗(false)
  */
 static function update_file_access_history($form)
 {
     ACSLib::escape_sql_array($form);
     ACSLib::get_sql_value_array($form);
     $sql = "UPDATE file_access_history" . " SET" . "  access_date = " . $form['access_date'] . " WHERE user_community_id = " . $form['user_community_id'] . "  AND file_id = " . $form['file_id'];
     $ret = ACSDB::_do_query($sql);
     return $ret;
 }
 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";
 }
예제 #13
0
 /**
  * waiting INSERT
  *
  * @param $form 待機コミュニティメンバ情報
  * @return 成功(true) / 失敗(false)
  */
 static function insert_waiting($form)
 {
     ACSLib::escape_sql_array($form);
     ACSLib::get_sql_value_array($form);
     $sql = "INSERT INTO waiting";
     $sql .= " (waiting_id, community_id, waiting_community_id, waiting_type_code, waiting_status_code, message, entry_user_community_id)";
     $sql .= " VALUES ({$form['waiting_id']}, {$form['community_id']}, {$form['waiting_community_id']}, {$form['waiting_type_code']}, {$form['waiting_status_code']}, {$form['message']}, {$form['entry_user_community_id']})";
     $ret = ACSDB::_do_query($sql);
     return $ret;
 }
 static function insert_community_member($form)
 {
     ACSLib::escape_sql_array($form);
     ACSLib::get_sql_value_array($form);
     $sql = "INSERT INTO community_member";
     $sql .= " (community_id, user_community_id, community_member_type_code)";
     $sql .= " VALUES ({$form['community_id']}, {$form['user_community_id']}, {$form['community_member_type_code']})";
     $ret = ACSDB::_do_query($sql);
     return $ret;
 }
 /**
  * ファイル履歴コメントを登録する
  *
  * @param $file_history_id ファイル履歴ID
  * @param $entry_user_community_id 登録者のユーザコミュニティID
  * @param $comment コメント
  * @return 
  */
 static function set_file_history_comment($file_history_id, $entry_user_community_id, $comment)
 {
     $file_history_comment_id_seq = ACSDB::get_next_seq('file_history_comment_id_seq');
     $comment = ACSLib::get_sql_value(pg_escape_string($comment));
     $sql = "INSERT INTO file_history_comment";
     $sql .= " (file_history_comment_id, file_history_id, user_community_id, comment)";
     $sql .= " VALUES ({$file_history_comment_id_seq}, {$file_history_id}, '{$entry_user_community_id}', {$comment})";
     $ret = ACSDB::_do_query($sql);
     return $ret;
 }
예제 #16
0
 /**
  * システムアナウンスを登録する
  *
  * @param システムアナウンス情報
  * @return 成功(true) / 失敗(false)
  */
 static function set_system_announce($form)
 {
     ACSLib::escape_sql_array($form);
     ACSLib::get_sql_value_array($form);
     $system_announce_id_seq = ACSDB::get_next_seq('system_announce_id_seq');
     $sql = "INSERT INTO system_announce";
     $sql .= " (system_announce_id, user_community_id, subject, body, expire_date)";
     $sql .= " VALUES ({$system_announce_id_seq}, {$form['user_community_id']}, {$form['subject']}, {$form['body']}, {$form['expire_date']})";
     ACSDB::_do_query($sql);
     return $ret;
 }
 /**
  * bbs_access_history UPDATE
  *
  * @param $form 掲示板アクセス履歴情報
  * @return 成功(true) / 失敗(false)
  */
 static function update_bbs_access_history($form)
 {
     ACSLib::escape_sql_array($form);
     ACSLib::get_sql_value_array($form);
     $sql = "UPDATE bbs_access_history";
     $sql .= " SET";
     $sql .= "  access_date = {$form['access_date']}";
     $sql .= " WHERE user_community_id = {$form['user_community_id']}";
     $sql .= "  AND bbs_id = {$form['bbs_id']}";
     $ret = ACSDB::_do_query($sql);
     return $ret;
 }
예제 #18
0
 /**
  * ディレクトリの作成(途中のディレクトリも自動生成)
  *
  * @param string $dir ディレクトリ
  * @param string $name_encoding 日本語ファイル・フォルダ名のエンコーディング
  * @return mixed 正常時...ファイル内容/エラー時...FALSE
  */
 function make_dir($dir, $name_encoding = '')
 {
     // フォルダが存在しない場合、ディレクトリの作成
     $dir_array = explode("/", $dir);
     $dest_dir = $this->zip_work_dir;
     foreach ($dir_array as $dir) {
         if ($dir != '') {
             $dir = $name_encoding != '' ? mb_convert_encoding($dir, $name_encoding) : $dir;
             $dest_dir .= '/' . $dir;
             ACSLib::make_dir($dest_dir);
         }
     }
 }
 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();
 }
예제 #20
0
 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();
 }
예제 #21
0
 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();
     $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();
     $controller = $context->getController();
     $request = $context->getRequest();
     $user = $context->getUser();
     $system_announce_row = $request->getAttribute('system_announce_row');
     // URL
     $action_url = $this->getControllerPath('System', 'DeleteSystemAnnounce') . '&system_announce_id=' . $system_announce_row['system_announce_id'];
     $system_announce_list_url = $this->getControllerPath('System', 'SystemAnnounceList');
     // 加工
     $system_announce_row['expire_date'] = ACSLib::convert_pg_date_to_str($system_announce_row['expire_date'], false, false, false);
     // テンプレート
     $this->setScreenId("0001");
     $this->setTemplate('DeleteSystemAnnounce.tpl.php');
     // set
     $this->setAttribute('system_announce_row', $system_announce_row);
     $this->setAttribute('action_url', $action_url);
     $this->setAttribute('system_announce_list_url', $system_announce_list_url);
     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');
     // get
     $community_row = $request->getAttribute('community_row');
     $bbs_row_array = $request->getAttribute('bbs_row_array');
     // コミュニティトップページのURL
     $community_top_page_url = $this->getControllerPath('Community', DEFAULT_ACTION) . '&community_id=' . $community_row['community_id'];
     // BBS URL
     $bbs_top_page_url = $this->getControllerPath('Community', 'BBS') . '&community_id=' . $community_row['community_id'];
     // 加工
     foreach ($bbs_row_array as $index => $bbs_row) {
         // 親記事の投稿者 トップページURL
         $bbs_row_array[$index]['top_page_url'] = $this->getControllerPath(DEFAULT_MODULE, DEFAULT_ACTION) . '&id=' . $bbs_row['user_community_id'];
         // 投稿日時
         $bbs_row_array[$index]['post_date'] = ACSLib::convert_pg_date_to_str($bbs_row['post_date']);
         // 返信画面URL
         $bbs_row_array[$index]['bbs_res_url'] = $this->getControllerPath('Community', 'BBSRes') . '&community_id=' . $community_row['community_id'] . '&bbs_id=' . $bbs_row['bbs_id'];
     }
     //---- アクセス制御 ----//
     $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);
     //----------------------//
     // set
     $this->setAttribute('community_top_page_url', $community_top_page_url);
     $this->setAttribute('bbs_top_page_url', $bbs_top_page_url);
     $this->setAttribute('community_row', $request->getAttribute('community_row'));
     $this->setAttribute('bbs_row_array', $bbs_row_array);
     // テンプレート
     $this->setScreenId("0001");
     $this->setTemplate('BBSThreadList.tpl.php');
     return parent::execute();
 }
예제 #26
0
 /**
  * ファイル公開情報を登録する
  *
  * @param file_id ファイルID
  *        form 設定値
  * @return true(正常)/false(失敗)
  */
 static function insert_file_public_access($file_id, $form = false)
 {
     ACSLib::escape_sql_array($form);
     if ($form === false) {
         $form = array();
     }
     ACSDB::_do_query("BEGIN");
     $ret = ACSDB::_do_query("DELETE FROM file_public_access\n\t\t\t\t\t WHERE file_id = " . $file_id);
     if (!$ret) {
         ACSDB::_do_query("ROLLBACK");
         return $ret;
     }
     // ハッシュ文字列作成
     $form['access_code'] = md5(uniqid(rand()) . $file_id);
     $form['update_date'] = 'now';
     if (!$form['all_access_count']) {
         $form['all_access_count'] = 0;
     }
     if (!$form['access_count']) {
         $form['access_count'] = 0;
     }
     if (!$form['access_start_date']) {
         $form['access_start_date'] = 'now';
     }
     $sql = "INSERT INTO file_public_access \n\t\t\t\t\t(file_id, folder_id, community_id, access_code, \n\t\t\t\t\t all_access_count, access_count, access_start_date, \n\t\t\t\t\t update_date)\n\t\t\t\tVALUES\n\t\t\t\t\t(" . $file_id . ", " . $form['folder_id'] . ", " . $form['community_id'] . ", '" . $form['access_code'] . "'," . $form['all_access_count'] . "," . $form['access_count'] . ", '" . $form['access_start_date'] . "', '" . $form['update_date'] . "')";
     $ret = ACSDB::_do_query($sql);
     if (!$ret) {
         ACSDB::_do_query("ROLLBACK");
         return $ret;
     }
     ACSDB::_do_query("COMMIT");
     return $ret;
 }
예제 #27
0
 function execute()
 {
     $context = $this->getContext();
     $controller = $context->getController();
     $request = $context->getRequest();
     $user = $context->getUser();
     $acs_user_info_row = $user->getAttribute('acs_user_info_row');
     // get
     $community_row = $request->getAttribute('community_row');
     $bbs_row = $request->getAttribute('bbs_row');
     //ユーザ入力情報
     $form = $user->getAttribute('new_form_obj');
     // コミュニティメンバかどうか
     $is_community_member = ACSCommunity::is_community_member($acs_user_info_row['user_community_id'], $community_row['community_id']);
     //コミュニティ管理者かどうか
     $is_community_admin = ACSCommunity::is_community_admin($acs_user_info_row['user_community_id'], $community_row['community_id']);
     // 加工
     if ($bbs_row['bbs_res_delete_flag'] != 't') {
         // 親記事の投稿者 トップページURL
         $bbs_row['top_page_url'] = $this->getControllerPath(DEFAULT_MODULE, DEFAULT_ACTION) . '&id=' . $bbs_row['user_community_id'];
         // 写真URL
         $bbs_row['image_url'] = ACSUser::get_image_url($bbs_row['user_community_id'], 'thumb');
         // 投稿日時
         $bbs_row['post_date'] = ACSLib::convert_pg_date_to_str($bbs_row['post_date']);
         //ファイルの画像URL
         $bbs_row['file_url'] = "";
         if ($bbs_row['file_id'] != "") {
             $bbs_row['file_url'] = ACSBBSFile::get_image_url($bbs_row['bbs_id'], 'thumb');
             //投稿内表示用
             $bbs_row['file_url_alink'] = ACSBBSFile::get_image_url($bbs_row['bbs_id'], '');
             //ポップアップ用
         }
         // パブリックリリース 掲載終了日
         if ($bbs_row['expire_date'] != "") {
             $bbs_row['expire_date'] = ACSLib::convert_pg_date_to_str($bbs_row['expire_date'], true, false, false);
         }
         // 外部RSS情報
         $external_rss_row = ACSExternalRSS::get_external_rss_row($bbs_row['bbs_id']);
         if ($external_rss_row) {
             if ($external_rss_row['rss_item_date'] != '') {
                 // YYYY/MM/DD H:MM
                 $external_rss_row['rss_item_date'] = ACSLib::convert_pg_date_to_str($external_rss_row['rss_item_date'], 0, 1, 0);
             }
             $bbs_row['external_rss_row'] = $external_rss_row;
         }
         // 返信記事
         foreach ($bbs_row['bbs_res_row_array'] as $res_index => $bbs_res_row) {
             // 返信記事の投稿者 トップページURL
             $bbs_row['bbs_res_row_array'][$res_index]['top_page_url'] = $this->getControllerPath(DEFAULT_MODULE, DEFAULT_ACTION) . '&id=' . $bbs_res_row['user_community_id'];
             // 写真URL
             $bbs_row['bbs_res_row_array'][$res_index]['image_url'] = ACSUser::get_image_url($bbs_res_row['user_community_id'], 'thumb');
             // 投稿日時
             $bbs_row['bbs_res_row_array'][$res_index]['post_date'] = ACSLib::convert_pg_date_to_str($bbs_res_row['post_date']);
             // 返信の削除URL
             $bbs_row['bbs_res_row_array'][$res_index]['delete_bbs_res_url'] = $this->getControllerPath('Community', 'DeleteBBSRes') . '&community_id=' . $community_row['community_id'] . '&bbs_res_id=' . $bbs_row['bbs_res_row_array'][$res_index]['bbs_res_id'] . '&bbs_id=' . $bbs_row['bbs_id'];
             // 編集URL
             if (!ACSLib::get_boolean($bbs_res_row['bbs_res_delete_flag']) && ($bbs_res_row['user_community_id'] == $acs_user_info_row['user_community_id'] || $is_community_admin)) {
                 $bbs_row['bbs_res_row_array'][$res_index]['edit_bbs_res_url'] = $this->getControllerPath('Community', 'EditBBSRes') . '&community_id=' . $community_row['community_id'] . '&bbs_id=' . $bbs_res_row['bbs_id'] . '&bbs_res_id=' . $bbs_res_row['bbs_res_id'];
             }
             //削除権限フラグ (自分が投稿したもの 又は コミュニティ管理者)
             if ($bbs_res_row['user_community_id'] == $acs_user_info_row['user_community_id'] || $is_community_admin == 1) {
                 $bbs_row['bbs_res_row_array'][$res_index]['bbs_set_delete_flag'] = true;
             } else {
                 $bbs_row['bbs_res_row_array'][$res_index]['bbs_set_delete_flag'] = false;
             }
         }
     }
     // form action 確認画面への遷移
     $action_url = $this->getControllerPath('Community', 'BBSResPre') . '&community_id=' . $community_row['community_id'] . '&bbs_id=' . $bbs_row['bbs_id'] . '&move_id=1';
     // コミュニティトップページのURL
     $community_top_page_url = $this->getControllerPath('Community', DEFAULT_ACTION) . '&community_id=' . $community_row['community_id'];
     // BBS URL
     $bbs_top_page_url = $this->getControllerPath('Community', 'BBS') . '&community_id=' . $community_row['community_id'];
     // set
     $this->setAttribute('is_community_member', $is_community_member);
     $this->setAttribute('community_row', $request->getAttribute('community_row'));
     $this->setAttribute('bbs_row', $bbs_row);
     $this->setAttribute('action_url', $action_url);
     $this->setAttribute('community_top_page_url', $community_top_page_url);
     $this->setAttribute('bbs_top_page_url', $bbs_top_page_url);
     // テンプレート
     $this->setScreenId("0001");
     $this->setTemplate('BBSRes.tpl.php');
     if ($request->getParameter('move_id') == 3) {
         //ユーザ入力情報
         $form = $user->getAttribute('new_form_obj');
         $this->setAttribute('form', $form);
         $this->setAttribute('move_id', $request->getParameter('move_id'));
     }
     return parent::execute();
 }
예제 #28
0
 /**
  * 日記htmlコンテンツの作成
  * 
  * @param string $diary_row 日記配列
  * @param string $encoding エンコーディング
  */
 function create_diary_html($diary_row, $encoding = '')
 {
     $file_head = date("Ymd_His", ACSLib::convert_pg_date_to_timestamp($diary_row['post_date']));
     $this->diary_file_names[$file_head]++;
     if ($this->diary_file_names[$file_head] > 1) {
         $file_head .= '_' . ($this->diary_file_names[$html_file] - 1);
     }
     $html_file = $file_head . '.html';
     // 基本項目の置換
     $contents = _ACSDIARYBACKUP_DIARY_FORMAT;
     $contents = mb_ereg_replace('@SUBJECT@', htmlspecialchars($diary_row['subject']), $contents);
     $contents = mb_ereg_replace('@POST_DATE@', htmlspecialchars(ACSLib::convert_pg_date_to_str($diary_row['post_date'])), $contents);
     $contents = mb_ereg_replace('@BODY@', nl2br(htmlspecialchars($diary_row['body'])), $contents);
     $contents = mb_ereg_replace('@OPEN_LEVEL_TITLE@', htmlspecialchars(ACSMsg::get_mdmsg(__FILE__, 'M001')), $contents);
     $contents = mb_ereg_replace('@OPEN_LEVEL_NAME@', htmlspecialchars($diary_row['open_level_name']), $contents);
     // イメージファイルがある場合
     $image_file_id = $diary_row['file_id'];
     if ($image_file_id != '') {
         $file_obj = ACSFile::get_file_info_instance($image_file_id);
         // 拡張子の取得
         mb_ereg("^.*(\\.[^\\.\\/]*)", $file_obj->get_display_file_name(), $matches);
         $ext = $matches[1];
         // ファイル名の生成
         $img_from = ACS_FOLDER_DIR . $file_obj->get_server_file_name();
         $img_to = $this->img_dir . '/' . $file_head . $ext;
         $img_thumb_from = ACS_FOLDER_DIR . $file_obj->get_thumbnail_server_file_name();
         $img_thumb_to = $this->img_dir . '/thumb_' . $file_head . '.jpg';
         // URLの生成
         $img_url = $this->diary_to_img_url . '/' . $file_head . $ext;
         $img_thumb_url = $this->diary_to_img_url . '/thumb_' . $file_head . '.jpg';
         // イメージファイルの作成
         @copy($img_from, $img_to);
         @copy($img_thumb_from, $img_thumb_to);
         // リンクタグの生成
         $contents = mb_ereg_replace('@IMAGE@', '<div><a href="' . $img_url . '">' . '<img src="' . $img_thumb_url . '" border="0"></a></div><br>', $contents);
     } else {
         $contents = mb_ereg_replace('@IMAGE@', '', $contents);
     }
     // コメントの取得
     $diary_comment_row_array = ACSDiary::get_diary_comment_row_array($diary_row['diary_id']);
     // コメント部分の生成
     $comments = "";
     foreach ($diary_comment_row_array as $diary_comment_row) {
         if ($diary_comment_row['diary_comment_delete_flag'] == 'f') {
             $comment_contents = _ACSDIARYBACKUP_DIARY_COMMENT_FORMAT;
             $comment_contents = mb_ereg_replace('@POST_DATE@', htmlspecialchars(ACSLib::convert_pg_date_to_str($diary_comment_row['post_date'])), $comment_contents);
             $comment_contents = mb_ereg_replace('@COMMUNITY_NAME@', htmlspecialchars($diary_comment_row['community_name']), $comment_contents);
             $comment_contents = mb_ereg_replace('@BODY@', nl2br(htmlspecialchars($diary_comment_row['body'])), $comment_contents);
             $comments .= $comment_contents;
         }
     }
     // コメントの置換
     $contents = mb_ereg_replace('@COMMENTS@', $comments, $contents);
     // contents 自身の変換
     if ($encoding != '') {
         $contents = mb_convert_encoding($contents, $encoding);
     }
     // ファイルへの出力
     $fp = fopen($this->diary_dir . '/' . $html_file, "w");
     fputs($fp, $contents);
     fclose($fp);
     return $html_file;
 }
예제 #29
0
?>
</td>
		<td>
		<?php 
echo nl2br(ACSLib::sp2nbsp(htmlspecialchars($this->_tpl_vars['form']['subject'])));
?>
		</td>
</tr>
<tr>
	<td height=150px><?php 
echo ACSMsg::get_msg("User", "MessagePre.tpl.php", 'M006');
?>
</td>
		<td valign=top>
		<?php 
echo nl2br(ACSLib::sp2nbsp(htmlspecialchars($this->_tpl_vars['form']['body'])));
?>
		</td>
</tr>

</table>

<br><br>
<?php 
if (!$this->_tpl_vars['error_message']) {
    if ($this->_tpl_vars['form']['info_mail'] == "on") {
        echo ACSMsg::get_msg("User", "MessagePre.tpl.php", 'M007');
        echo "<br><br>";
    }
    echo "<input type=\"submit\" value=\"" . ACSMsg::get_msg("User", "MessagePre.tpl.php", 'M008') . "\">&nbsp;";
}
예제 #30
0
 /**
  * $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;
 }