function execute($requests) { $u = $GLOBALS['AUTH']->uid(); // --- リクエスト変数 $target_c_member_id = $requests['target_c_member_id']; // ---------- if (is_null($target_c_member_id)) { $target_c_member_id = $u; } if (db_member_is_access_block($u, $target_c_member_id)) { openpne_redirect('pc', 'page_h_access_block'); } // navi 振り分け用 if ($target_c_member_id == $u) { $type = "h"; } else { $type = "f"; } $this->set('inc_navi', fetch_inc_navi($type, $target_c_member_id)); //自分情報 $this->set("member", db_member_c_member4c_member_id($u)); //ターゲット情報 $this->set("target_member", db_member_c_member4c_member_id($target_c_member_id)); if ($target_c_member_id == $u) { $raw_c_friend_comment_list = db_friend_intro_list_with_my_intro4c_member_id($target_c_member_id); } else { $raw_c_friend_comment_list = db_friend_intro_list4c_member_id($target_c_member_id); } $c_friend_comment_list = $raw_c_friend_comment_list; //紹介文達 $this->set("intro_list", $c_friend_comment_list); //---- ページ表示 ----// return 'success'; }
function execute($requests) { $u = $GLOBALS['KTAI_C_MEMBER_ID']; // --- リクエスト変数 $target_c_member_id = $requests['target_c_member_id']; $page = $requests['page']; // ---------- if (!$target_c_member_id) { $target_c_member_id = $u; } if (db_member_is_access_block($u, $target_c_member_id)) { openpne_redirect('ktai', 'page_h_access_block'); } //ターゲット情報 $this->set("target_c_member", db_member_c_member4c_member_id_LIGHT($target_c_member_id)); // 1ページ当たりに表示するフレンドの数 $page_size = 10; //ターゲットの詳細な友達リスト $list = db_friend_friend_list4c_member_id($target_c_member_id, $page_size, $page); $total_num = db_friend_count_friends($target_c_member_id); $this->set("target_friend_list", $list[0]); $this->set("page", $page); $this->set("is_prev", $list[1]); $this->set("is_next", $list[2]); $this->set('total_num', $total_num); $pager = array(); $pager['start'] = $page_size * ($page - 1) + 1; $pager['end'] = $pager['start'] + count($list[0]) - 1; $this->set('pager', $pager); $this->set("INC_NAVI_type", k_p_fh_common_get_type($target_c_member_id, $u)); return 'success'; }
function execute($requests) { $tail = $GLOBALS['KTAI_URL_TAIL']; $u = $GLOBALS['KTAI_C_MEMBER_ID']; // --- リクエスト変数 $target_c_member_id = $requests['target_c_member_id']; $body = $requests['body']; // ---------- $c_member_id_from = $u; //--- 権限チェック //フレンドでない and フレンド承認待ちでない $status = db_friend_status($u, $target_c_member_id); if ($status['is_friend']) { ktai_display_error('このメンバーは既に' . WORD_MY_FRIEND_HALF . 'に登録されています。'); } elseif ($status['is_friend_confirm']) { ktai_display_error('このメンバーは既に' . WORD_MY_FRIEND_HALF . 'リンク承認待ち中です。'); } elseif ($target_c_member_id == $u) { ktai_display_error('自分にリンク要請することはできません。'); } // アクセスブロック if (db_member_is_access_block($u, $target_c_member_id)) { openpne_redirect('ktai', 'page_h_access_block'); } // ----- if ($body == null) { $p = array('target_c_member_id' => $target_c_member_id, 'msg' => 1); openpne_redirect('ktai', 'page_f_link_request', $p); } db_friend_insert_c_friend_confirm($c_member_id_from, $target_c_member_id, $body); //メッセージ list($subject, $body_disp) = create_message_friend_link_request($c_member_id_from, $body); db_message_send_message_syoudaku($c_member_id_from, $target_c_member_id, $subject, $body_disp); $p = array('target_c_member_id' => $target_c_member_id); openpne_redirect('ktai', 'page_f_home', $p); }
function execute($requests) { $u = $GLOBALS['AUTH']->uid(); // --- リクエスト変数 $target_c_member_id = $requests['target_c_member_id']; // ---------- //is_friend $is_friend = db_friend_is_friend($u, $target_c_member_id); //--- 権限チェック //フレンド if ($target_c_member_id == $u) { handle_kengen_error(); } if (!$is_friend) { $p = array('target_c_member_id' => $target_c_member_id); openpne_redirect('pc', 'page_f_link_request_err_yet', $p); } //--- if (db_member_is_access_block($u, $target_c_member_id)) { openpne_redirect('pc', 'page_h_access_block'); } $this->set('inc_navi', fetch_inc_navi('f', $target_c_member_id)); $this->set("target_member", db_member_c_member4c_member_id($target_c_member_id)); $this->set("intro_body", db_friend_intro_body4c_member_id($u, $target_c_member_id)); $this->set("target_c_member_id", $target_c_member_id); return 'success'; }
function execute($requests) { $u = $GLOBALS['AUTH']->uid(); // --- リクエスト変数 $target_c_member_id = $requests['target_c_member_id']; $page = $requests['page']; // ---------- if (is_null($target_c_member_id)) { $target_c_member_id = $u; } if (db_member_is_access_block($u, $target_c_member_id)) { openpne_redirect('pc', 'page_h_access_block'); } // navi 振り分け用 if ($target_c_member_id == $u) { $type = "h"; } else { $type = "f"; } $this->set('inc_navi', fetch_inc_navi($type, $target_c_member_id)); $this->set("target_member", db_member_c_member4c_member_id($target_c_member_id)); $page_size = 50; $this->set("page", $page); list($c_commu_list, $pager) = db_commu_c_commu_list4c_member_id($target_c_member_id, $page, $page_size); $this->set("fh_com_list_user", $c_commu_list); $this->set("pager", $pager); for ($i = 1; $i <= $pager['total_page']; $i++) { $page_list[] = $i; } $this->set("page_list", $page_list); return 'success'; }
function execute($requests) { if (!OPENPNE_USE_ALBUM) { handle_kengen_error(); } $u = $GLOBALS['AUTH']->uid(); // --- リクエスト変数 $target_c_member_id = $requests['target_c_member_id']; $page = $requests['page']; $keyword = $requests['keyword']; // ---------- if (!$target_c_member_id || !is_null($keyword)) { $target_c_member_id = $u; } if ($target_c_member_id == $u) { $type = 'h'; $is_album_admin = true; } else { $type = 'f'; $is_album_admin = false; $target_c_member = db_member_c_member4c_member_id($target_c_member_id); // メンバーが存在しない if (!$target_c_member) { handle_kengen_error(); } // アクセスブロック if (db_member_is_access_block($u, $target_c_member_id)) { openpne_redirect('pc', 'page_h_access_block'); } //あしあとをつける db_ashiato_insert_c_ashiato($target_c_member_id, $u); } $this->set('inc_navi', fetch_inc_navi($type, $target_c_member_id)); $this->set('type', $type); $page_size = 10; $target_member = db_member_c_member4c_member_id($target_c_member_id); $this->set('target_member', $target_member); $this->set('c_member_id', $u); //年月日で一覧表示、アルバム数に制限なし //検索する場合 if ($keyword) { $list_set = p_h_album_list_all_search_c_album4c_album($keyword, $page_size, $page, $u); } else { $list_set = p_fh_album_list_fh_my_album_list4c_member_id($target_c_member_id, $page_size, $page, $u); } $this->set('target_album_list', $list_set[0]); //アルバムサブジェクト一覧取得 $album_subject_list = db_album_get_c_album_subject_list4c_member_id($target_c_member_id, 10, $u); $this->set('target_album_subject_list', $album_subject_list); $this->set('page', $page); $this->set('page_size', $page_size); $this->set('is_prev', $list_set[1]); $this->set('is_next', $list_set[2]); $this->set("total_num", $list_set[3]); $this->set('album_list_count', count($list_set[0])); //検索ワード $this->set('keyword', $keyword); $this->set("url_keyword", urlencode($keyword)); return 'success'; }
function execute($requests) { $u = $GLOBALS['KTAI_C_MEMBER_ID']; $tail = $GLOBALS['KTAI_URL_TAIL']; // --- リクエスト変数 $target_c_member_id = $requests['target_c_member_id']; // ---------- //is_friend $is_friend = db_friend_is_friend($u, $target_c_member_id); //--- 権限チェック //フレンド if ($target_c_member_id == $u) { handle_kengen_error(); } if (!$is_friend) { $p = array('target_c_member_id' => $target_c_member_id); openpne_redirect('ktai', 'page_f_home', $p); } //--- if (db_member_is_access_block($u, $target_c_member_id)) { openpne_redirect('ktai', 'page_h_access_block'); } $this->set("target_member", db_member_c_member4c_member_id($target_c_member_id)); $this->set("intro_body", db_friend_intro_body4c_member_id($u, $target_c_member_id)); $this->set("target_c_member_id", $target_c_member_id); return 'success'; }
function execute($requests) { $u = $GLOBALS['KTAI_C_MEMBER_ID']; // --- リクエスト変数 $target_c_member_id = $requests['target_c_member_id']; $page = $requests['page']; // ---------- if (!$target_c_member_id) { $target_c_member_id = $u; } if (db_member_is_access_block($u, $target_c_member_id)) { openpne_redirect('ktai', 'page_h_access_block'); } // メンバー情報 $this->set("target_c_member", db_member_c_member4c_member_id_LIGHT($target_c_member_id)); // 参加コミュニティリスト $page_size = 10; $list = db_commu_c_commu_list4c_member_id_4($target_c_member_id, $page_size, $page); $this->set("c_commu_list", $list[0]); $this->set("page", $page); $this->set("is_prev", $list[1]); $this->set("is_next", $list[2]); $pager = array(); $pager['start'] = $page_size * ($page - 1) + 1; $pager['end'] = $pager['start'] + count($list[0]) - 1; $this->set('pager', $pager); // 参加コミュニティ数 $this->set("count_commus", $list[3]); //f or h $this->set("INC_NAVI_type", k_p_fh_common_get_type($target_c_member_id, $u)); return 'success'; }
function execute($requests) { $u = $GLOBALS['AUTH']->uid(); // --- リクエスト変数 $target_c_member_id = $requests['target_c_member_id']; $body = $requests['body']; // ---------- //--- 権限チェック //フレンドでない or フレンド承認中でない $status = db_friend_status($u, $target_c_member_id); if ($status['is_friend']) { $p = array('target_c_member_id' => $target_c_member_id); openpne_redirect('pc', 'page_f_link_request_err_already', $p); } elseif ($status['is_friend_confirm']) { $p = array('target_c_member_id' => $target_c_member_id); openpne_redirect('pc', 'page_f_link_request_err_wait', $p); } //アクセスブロック設定 if (db_member_is_access_block($u, $target_c_member_id)) { openpne_redirect('pc', 'page_h_access_block'); } //--- $c_member_id_from = $u; db_friend_insert_c_friend_confirm($c_member_id_from, $target_c_member_id, $body); list($subject, $body_disp) = create_message_friend_link_request($c_member_id_from, $body); db_message_send_message_syoudaku($c_member_id_from, $target_c_member_id, $subject, $body_disp); $p = array('target_c_member_id' => $target_c_member_id); openpne_redirect('pc', 'page_f_home', $p); }
function execute($requests) { $u = $GLOBALS['AUTH']->uid(); // --- リクエスト変数 $target_c_album_image_id = $requests['target_c_album_image_id']; // ---------- if (!p_common_is_active_c_album_image_id($target_c_album_image_id)) { util_send_header_internal_server_error(); } $c_album_image = db_album_image_get_c_album_image4id($target_c_album_image_id); $c_album_id = $c_album_image['c_album_id']; if (!p_common_is_active_c_album_id($c_album_id)) { util_send_header_internal_server_error(); } $c_album = db_album_get_c_album4c_album_id($c_album_id); $target_c_member_id = $c_album['c_member_id']; if ($u != $target_c_member_id) { // メンバーが存在しない if (!db_member_is_active_c_member_id($target_c_member_id)) { util_send_header_internal_server_error(); } // check public_flag if (!pne_check_album_public_flag($c_album_id, $u)) { util_send_header_internal_server_error(); } // アクセスブロック設定 if (db_member_is_access_block($u, $target_c_member_id)) { util_send_header_internal_server_error(); } } $c_album_image['image_filename'] = util_get_img_url($c_album_image['image_filename'], 180, 180); //--- util_output_xml4array($c_album_image, 'c_album_image'); }
function execute($requests) { $u = $GLOBALS['AUTH']->uid(); // --- リクエスト変数 $target_c_album_id = $requests['target_c_album_id']; // ---------- if (!p_common_is_active_c_album_id($target_c_album_id)) { util_send_header_internal_server_error(); } //--- 権限チェック $c_album = db_album_get_c_album4c_album_id($target_c_album_id); $target_c_member_id = $c_album['c_member_id']; $c_album['c_member'] = db_member_c_member4c_member_id_LIGHT($target_c_member_id); $c_album['album_cover_image'] = util_get_img_url($c_album['album_cover_image'], 180, 180); $c_album['word_my_friend'] = WORD_MY_FRIEND; if ($u != $target_c_member_id) { // メンバーが存在しない if (!$c_album['c_member']) { util_send_header_internal_server_error(); } // check public_flag if (!pne_check_album_public_flag($target_c_album_id, $u)) { util_send_header_internal_server_error(); } // アクセスブロック設定 if (db_member_is_access_block($u, $target_c_member_id)) { util_send_header_internal_server_error(); } } //--- util_output_xml4array($c_album, 'c_album'); }
function execute($requests) { $u = $GLOBALS['AUTH']->uid(); // --- リクエスト変数 $target_c_member_id = $requests['target_c_member_id']; // ---------- if (db_member_is_access_block($u, $target_c_member_id)) { openpne_redirect('pc', 'page_h_access_block'); } if ($target_c_member_id == $u) { handle_kengen_error(); } //アクティブメンバーか if (!db_member_is_active_c_member_id($target_c_member_id)) { handle_kengen_error(); } //お気に入り登録済みメンバーか if (db_bookmark_is_bookmark($u, $target_c_member_id)) { $p = array('c_member_id_to' => $target_c_member_id); openpne_redirect('pc', 'page_f_bookmark_add_err_already', $p); } $this->set('inc_navi', fetch_inc_navi('f', $target_c_member_id)); $c_member = db_member_c_member_with_profile($target_c_member_id); $c_member['last_login'] = p_f_home_last_login4access_date($c_member['access_date']); $this->set('c_member', $c_member); return 'success'; }
function execute($requests) { $u = $GLOBALS['KTAI_C_MEMBER_ID']; // --- リクエスト変数 $target_c_member_id = $requests['target_c_member_id']; $page = $requests['page']; // ---------- if (db_member_is_access_block($u, $target_c_member_id)) { openpne_redirect('ktai', 'page_h_access_block'); } // メンバー情報 $this->set("target_c_member", db_member_c_member4c_member_id_LIGHT($target_c_member_id)); // 参加コミュニティリスト $page_size = 10; list($list, $pager) = db_common_commu_common_commu_list4c_member_id($target_c_member_id, $u, $page, $page_size); $this->set("common_commu_list", $list); $this->set("page", $page); $this->set("is_prev", $pager[prev_page]); $this->set("is_next", $pager[next_page]); $this->set('start_num', $pager['start_num']); $this->set('end_num', $pager['end_num']); // 共通コミュニティ数 $this->set("common_commu_count", $pager[total_num]); return 'success'; }
function execute($requests) { $u = $GLOBALS['AUTH']->uid(); // --- リクエスト変数 $target_c_member_id = $requests['target_c_member_id']; $page = $requests['page']; $order = $requests['order']; // ---------- if (!$target_c_member_id) { $target_c_member_id = $u; } if (db_member_is_access_block($u, $target_c_member_id)) { openpne_redirect('pc', 'page_h_access_block'); } // navi 振り分け用 if ($target_c_member_id == $u) { $type = "h"; } else { $type = "f"; } $this->set('inc_navi', fetch_inc_navi($type, $target_c_member_id)); $this->set("type", $type); //----------PC CONTENT#LEFT //メンバー情報 $this->set("member", db_member_c_member4c_member_id($u)); //ターゲット情報 $this->set("target_member", db_member_c_member4c_member_id($target_c_member_id)); //ターゲットの友達数 $friend_num = db_friend_count_friends($target_c_member_id); $this->set("target_friend_num", $friend_num); //----------PC CONTENT#CENTER // 1ページ当たりに表示するフレンドの数 $page_size = 50; //ターゲットの詳細な友達リスト $list = db_friend_friend_list4c_member_id2($target_c_member_id, $page_size, $page, $order); $this->set("order", $order); $this->set("target_friend_list_disp", $list[0]); $this->set("page", $page); $this->set("is_prev", $list[1]); $this->set("is_next", $list[2]); $this->set("start_num", ($page - 1) * $page_size + 1); if ($page * $page_size < $friend_num) { $end_num = $page * $page_size; } else { $end_num = $friend_num; } $this->set("end_num", $end_num); for ($i = 1; $i <= $list[3]; $i++) { $page_num[] = $i; } $this->set("page_num", $page_num); //あしあとをつける if ($target_c_member_id != $u) { db_ashiato_insert_c_ashiato($target_c_member_id, $u); } return 'success'; }
function execute($requests) { $u = $GLOBALS['KTAI_C_MEMBER_ID']; // --- リクエスト変数 $target_c_member_id = $requests['target_c_member_id']; // ---------- if ($target_c_member_id == $u) { openpne_redirect('ktai', 'page_h_home'); } if (!db_member_is_active_c_member_id($target_c_member_id)) { ktai_display_error('該当するメンバーが見つかりません。'); } if (db_member_is_access_block($u, $target_c_member_id)) { openpne_redirect('ktai', 'page_h_access_block'); } //管理画面HTML $this->set('c_siteadmin', p_common_c_siteadmin4target_pagename('k_f_home')); //ターゲットのc_member $is_friend = db_friend_is_friend($u, $target_c_member_id); $target_c_member = db_member_c_member_with_profile($target_c_member_id, 'private'); $target_c_member['last_login'] = p_f_home_last_login4access_date($target_c_member['access_date']); if ($target_c_member['birth_year']) { $target_c_member['age'] = getAge($target_c_member['birth_year'], $target_c_member['birth_month'], $target_c_member['birth_day']); } $this->set("target_c_member", $target_c_member); //ターゲットの最新日記5件 $this->set("c_diary_list", db_diary_get_c_diary_list4c_member_id($target_c_member_id, 5, $u)); //フレンドランダム5人 $this->set("c_friend_list", db_friend_c_friend_list_random4c_member_id($target_c_member_id, 5)); //参加コミュニティ最新書き込み5件 $this->set("c_commu_list", db_commu_c_commu_list_lastupdate4c_member_id($target_c_member_id, 5)); //共通コミュニティ $this->set('common_commu_count', count(db_common_commu_common_commu_id4c_member_id($target_c_member_id, $u))); //ターゲットと自分との関係 $this->set("relation", db_friend_relationship4two_members($u, $target_c_member_id)); $is_friend = db_friend_is_friend($u, $target_c_member_id); if ($is_friend) { $this->set('is_friend', $is_friend); } else { $this->set('friend_path', db_friend_friend_path4c_member_ids($u, $target_c_member_id)); } $this->set('profile_list', db_member_c_profile_list()); // 誕生日まであと何日? $this->set('days_birthday', db_member_count_days_birthday4c_member_id($target_c_member_id)); if (OPENPNE_USE_POINT_RANK) { // ポイント $point = db_point_get_point($target_c_member_id); $this->set("point", $point); // ランク $this->set("rank", db_point_get_rank4point($point)); } // inc_entry_point $this->set('inc_ktai_entry_point', fetch_inc_entry_point($this->getView(), 'ktai_f_home')); //あしあとをつける db_ashiato_insert_c_ashiato($target_c_member_id, $u); return 'success'; }
function execute($requests) { $u = $GLOBALS['KTAI_C_MEMBER_ID']; $c_member_id = $requests['target_c_member_id']; // アクセスブロック if (db_member_is_access_block($u, $c_member_id)) { openpne_redirect('ktai', 'page_h_access_block'); } $this->set('target_c_member', db_member_c_member4c_member_id($c_member_id)); return 'success'; }
function execute($requests) { if (!OPENPNE_USE_ALBUM) { handle_kengen_error(); } $u = $GLOBALS['KTAI_C_MEMBER_ID']; // --- リクエスト変数 $target_c_member_id = $requests['target_c_member_id']; $page = $requests['page']; // ---------- $page_size = 10; if (!$target_c_member_id) { $target_c_member_id = $u; } if ($target_c_member_id == $u) { $type = 'h'; //$is_album_admin = true; $target_c_member = db_member_c_member4c_member_id($u); } else { $type = 'f'; //$is_album_admin = false; $target_c_member = db_member_c_member4c_member_id($target_c_member_id); // メンバーが存在しない if (!$target_c_member) { $this->handleError(); } // アクセスブロック if (db_member_is_access_block($u, $target_c_member_id)) { openpne_redirect('ktai', 'page_h_access_block'); } // あしあとをつける db_ashiato_insert_c_ashiato($target_c_member_id, $u); } $this->set('type', $type); //メンバー情報 $this->set('c_member_id', $u); $this->set("target_member", $target_c_member); //アルバム一覧取得 list($album_list, $is_prev, $is_next, $total_num) = p_fh_album_list_fh_my_album_list4c_member_id($target_c_member_id, $page_size, $page, $u); $this->set('album_list', $album_list); $this->set('page', $page); $this->set('page_size', $page_size); $this->set('is_prev', $is_prev); $this->set('is_next', $is_next); $this->set("total_num", $total_num); $this->set('album_list_count', count($album_list)); $start = ($page - 1) * $page_size + 1; $end = $start + count($album_list) - 1; $this->set('start', $start); $this->set('end', $end); return 'success'; }
function execute($requests) { $u = $GLOBALS['AUTH']->uid(); // --- リクエスト変数 $target_c_member_id = $requests['target_c_member_id']; // ---------- if (db_member_is_access_block($u, $target_c_member_id)) { openpne_redirect('pc', 'page_h_access_block'); } $this->set('inc_navi', fetch_inc_navi('f', $target_c_member_id)); $this->set('target_c_member', db_member_c_member4c_member_id_LIGHT($target_c_member_id)); return 'success'; }
function execute($requests) { $u = $GLOBALS['KTAI_C_MEMBER_ID']; // --- リクエスト変数 $target_c_member_id = $requests['target_c_member_id']; // ---------- if (db_member_is_access_block($u, $target_c_member_id)) { openpne_redirect('ktai', 'page_h_access_block'); } //ターゲット情報 $this->set("target_c_member", db_member_c_member4c_member_id_LIGHT($target_c_member_id)); return 'success'; }
function execute($requests) { $u = $GLOBALS['AUTH']->uid(); // --- リクエスト変数 $c_member_id_to = $requests['c_member_id_to']; // ---------- if (db_member_is_access_block($u, $c_member_id_to)) { openpne_redirect('pc', 'page_h_access_block'); } $this->set('inc_navi', fetch_inc_navi("f", $c_member_id_to)); $this->set('bookmark_member', db_member_c_member4c_member_id_LIGHT($c_member_id_to)); return 'success'; }
function execute($requests) { if (!OPENPNE_USE_ALBUM) { handle_kengen_error(); } $u = $GLOBALS['AUTH']->uid(); // --- リクエスト変数 $target_c_album_image_id = $requests['target_c_album_image_id']; // ---------- //targetが指定されていない if (!$target_c_album_image_id) { openpne_redirect('pc', 'page_h_err_fh_album'); } //targetのアルバム写真が存在しない if (!p_common_is_active_c_album_image_id($target_c_album_image_id)) { openpne_redirect('pc', 'page_h_err_fh_album'); } $target_c_album_image = db_album_image_get_c_album_image4id($target_c_album_image_id); $target_c_album_id = $target_c_album_image['c_album_id']; //targetのアルバムが存在しない if (!p_common_is_active_c_album_id($target_c_album_id)) { openpne_redirect('pc', 'page_h_err_fh_album'); } $target_c_album = db_album_get_c_album4c_album_id($target_c_album_id); $target_c_member_id = $target_c_album['c_member_id']; if ($target_c_member_id == $u) { $type = 'h'; } else { $type = 'f'; // メンバーが存在しない if (!db_member_is_active_c_member_id($target_c_member_id)) { openpne_redirect('pc', 'page_h_err_fh_album'); } //check public flag if (!pne_check_album_public_flag($target_c_album_id, $u)) { openpne_redirect('pc', 'page_h_err_fh_album'); } // アクセスブロック if (db_member_is_access_block($u, $target_c_member_id)) { openpne_redirect('pc', 'page_h_access_block'); } // あしあとをつける db_ashiato_insert_c_ashiato($target_c_member_id, $u); } $this->set('type', $type); $this->set('inc_navi', fetch_inc_navi($type, $target_c_member_id)); $this->set('c_album_image', $target_c_album_image); $this->set('c_album_image_id_prev', db_album_image_c_album_image_id_prev4c_album_id($target_c_album_id, $target_c_album_image_id)); $this->set('c_album_image_id_next', db_album_image_c_album_image_id_next4c_album_id($target_c_album_id, $target_c_album_image_id)); return 'success'; }
function execute($requests) { $u = $GLOBALS['KTAI_C_MEMBER_ID']; // --- リクエスト変数 $target_c_member_id = $requests['target_c_member_id']; $page = $requests['page']; $keyword = $requests['keyword']; // ---------- if (!$target_c_member_id || !is_null($keyword)) { $target_c_member_id = $u; } $is_friend = db_friend_is_friend($u, $target_c_member_id); if ($target_c_member_id == $u) { $type = 'h'; $this->set("type", $type); } if (db_member_is_access_block($u, $target_c_member_id)) { openpne_redirect('ktai', 'page_h_access_block'); } $target_c_member = db_member_c_member4c_member_id($target_c_member_id); //ターゲット情報 $this->set("target_c_member", db_member_c_member4c_member_id($target_c_member_id)); // 1ページ当たりに表示する日記の数 $page_size = 10; //ターゲットの詳細な日記リスト //検索する場合(自分の日記のみ) if ($keyword) { $list = p_h_diary_list_all_search_c_diary4c_diary($keyword, $page_size, $page, $u); } else { $list = p_fh_diary_list_diary_list4c_member_id($target_c_member_id, $page_size, $page, $u); } $this->set("target_diary_list", $list[0]); $this->set("page", $page); $this->set("is_prev", $list[1]); $this->set("is_next", $list[2]); $this->set("total_num", $list[3]); $pager = array(); $pager['start'] = $page_size * ($page - 1) + 1; if (($pager['end'] = $page_size * $page) > $list[3]) { $pager['end'] = $list[3]; } $this->set('pager', $pager); //f or h $this->set("INC_NAVI_type", k_p_fh_common_get_type($target_c_member_id, $u)); //あしあとをつける db_ashiato_insert_c_ashiato($target_c_member_id, $u); //検索ワード $this->set('keyword', $keyword); return 'success'; }
function execute($requests) { $tail = $GLOBALS['KTAI_URL_TAIL']; $u = $GLOBALS['KTAI_C_MEMBER_ID']; // --- リクエスト変数 $subject = $requests['subject']; $body = $requests['body']; $target_c_member_id = $requests['target_c_member_id']; $target_c_message_id = $requests['c_message_id']; $save = $requests['save']; // ---------- if (is_null($subject) || $subject === '') { $p = array('target_c_message_id' => $target_c_message_id, 'msg' => 2); openpne_redirect('ktai', 'page_h_message', $p); } if (is_null($body) || $body === '') { $p = array('target_c_message_id' => $target_c_message_id, 'msg' => 1); openpne_redirect('ktai', 'page_h_message', $p); } //--- 権限チェック //自分以外 if ($target_c_member_id == $u) { handle_kengen_error(); } //target_c_messageが自分宛 $target_c_message = db_message_c_message4c_message_id($target_c_message_id); if ($target_c_message['c_member_id_to'] != $u) { handle_kengen_error(); } // アクセスブロック if (db_member_is_access_block($u, $target_c_member_id)) { openpne_redirect('ktai', 'page_h_access_block'); } //--- if (is_null($save)) { //返信済みにする db_message_update_is_hensin($target_c_message_id); db_message_send_message($u, $target_c_member_id, $subject, $body); } else { // 下書きメッセージ保存 db_message_insert_message_to_is_save($target_c_member_id, $u, $subject, $body, $target_c_message_id); } openpne_redirect('ktai', 'page_h_message_box'); }
function execute($requests) { $tail = $GLOBALS['KTAI_URL_TAIL']; $u = $GLOBALS['KTAI_C_MEMBER_ID']; // --- リクエスト変数 $c_member_id_to = $requests['c_member_id_to']; $subject = $requests['subject']; $body = $requests['body']; $save = $requests['save']; // ---------- //--- 権限チェック //自分以外 if ($c_member_id_to == $u) { handle_kengen_error(); } // アクセスブロック if (db_member_is_access_block($u, $c_member_id_to)) { openpne_redirect('ktai', 'page_h_access_block'); } //--- if (is_null($subject) || $subject === '') { $_REQUEST['target_c_member_id'] = $c_member_id_to; $_REQUEST['msg'] = 2; openpne_forward('ktai', 'page', 'f_message_send'); exit; } if (is_null($body) || $body === '') { $_REQUEST['target_c_member_id'] = $c_member_id_to; $_REQUEST['msg'] = 1; openpne_forward('ktai', 'page', 'f_message_send'); exit; } if (is_null($save)) { // メッセージ送信 db_message_send_message($u, $c_member_id_to, $subject, $body); $p = array('target_c_member_id' => $c_member_id_to); openpne_redirect('ktai', 'page_f_home', $p); } else { // 下書きメッセージ保存 db_message_insert_message_to_is_save($c_member_id_to, $u, $subject, $body, '0'); $p = array('box' => 'savebox'); openpne_redirect('ktai', 'page_h_message_box', $p); } }
function execute($requests) { $u = $GLOBALS['KTAI_C_MEMBER_ID']; $tail = $GLOBALS['KTAI_URL_TAIL']; // --- リクエスト変数 $target_c_member_id = $requests['target_c_member_id']; $page = $requests['page']; // ---------- $page_size = 5; if (is_null($target_c_member_id)) { $target_c_member_id = $u; } if (db_member_is_access_block($u, $target_c_member_id)) { openpne_redirect('ktai', 'page_h_access_block'); } if ($target_c_member_id == $u) { $type = 'h'; } else { $type = 'f'; } $this->set('type', $type); //自分情報 $this->set('member', db_member_c_member4c_member_id($u)); //ターゲット情報 $this->set('target_member', db_member_c_member4c_member_id($target_c_member_id)); if ($target_c_member_id == $u) { $raw_c_friend_comment_list = db_friend_intro_list_with_my_intro4c_member_id($target_c_member_id); } else { $raw_c_friend_comment_list = db_friend_intro_list4c_member_id($target_c_member_id); } $c_friend_comment_list = $raw_c_friend_comment_list; $list = db_friend_intro_list4c_friend_comment_list($c_friend_comment_list, $page, $page_size); //紹介文 $this->set('intro_list', $list[0]); $this->set('is_prev', $list[1]); $this->set('is_next', $list[2]); $this->set('c_members_num', $list[3]); $this->set('page', $page); $pager_index = array('displaying_first' => ($page - 1) * $page_size + 1, 'displaying_last' => ($page - 1) * $page_size + count($list[0])); $this->set('pager_index', $pager_index); //---- ページ表示 ----// return 'success'; }
/** * @copyright 2005-2008 OpenPNE Project * @license http://www.php.net/license/3_01.txt PHP License 3.01 */ function xmlrpc_001_get_c_member($message) { $param = $message->getParam(0); if (!XML_RPC_Value::isValue($param)) { return false; } $params = XML_RPC_decode($param); if (empty($params['target_c_member_id'])) { return false; } if (empty($params['my_c_member_id'])) { return false; } $t_id = intval($params['target_c_member_id']); $m_id = intval($params['my_c_member_id']); // my_c_member_id が不正 if (!db_member_c_member4c_member_id_LIGHT($m_id)) { return xmlrpc_get_fault_response(56); } if ($t_id == $m_id) { // 自分 $public_flag = 'private'; } elseif (db_friend_is_friend($t_id, $m_id)) { $public_flag = 'friend'; } else { $public_flag = 'public'; } // target_c_member_id が不正 if (!($c_member = db_member_c_member4c_member_id($t_id, false, true, $public_flag))) { return xmlrpc_get_fault_response(56); } // アクセスブロック判定 if (db_member_is_access_block($m_id, $t_id)) { $result = array('c_member_id' => $t_id, 'nickname' => $c_member['nickname'], 'image_url' => xmlrpc_get_image_url()); } else { $result = array('c_member_id' => $t_id, 'nickname' => $c_member['nickname'], 'image_url' => xmlrpc_get_image_url($c_member['image_filename']), 'image_url_1' => xmlrpc_get_image_url($c_member['image_filename_1'], false), 'image_url_2' => xmlrpc_get_image_url($c_member['image_filename_2'], false), 'image_url_3' => xmlrpc_get_image_url($c_member['image_filename_3'], false), 'birth_year' => intval($c_member['birth_year']), 'birth_month' => intval($c_member['birth_month']), 'birth_day' => intval($c_member['birth_day']), 'access_date' => xmlrpc_get_date($c_member['access_date']), 'r_date' => xmlrpc_get_date($c_member['r_date']), 'profile' => array()); foreach ($c_member['profile'] as $key => $profile) { $result['profile'][$key] = $profile['value']; } } return xmlrpc_get_response($result); }
function execute($requests) { if (!OPENPNE_USE_ALBUM) { handle_kengen_error(); } $u = $GLOBALS['KTAI_C_MEMBER_ID']; // --- リクエスト変数 $target_c_album_id = $requests['target_c_album_id']; // ---------- // target のアルバムが存在しない if (!p_common_is_active_c_album_id($target_c_album_id)) { $this->handleError(); } $target_c_album = db_album_get_c_album4c_album_id($target_c_album_id); $target_c_member_id = $target_c_album['c_member_id']; $target_c_member = db_member_c_member4c_member_id($target_c_member_id); // メンバーが存在しない if (!$target_c_member) { $this->handleError(); } if ($target_c_member_id == $u) { $type = 'h'; } else { $type = 'f'; // check public flag if (!pne_check_album_public_flag($target_c_album_id, $u)) { $this->handleError(); } // アクセスブロック if (db_member_is_access_block($u, $target_c_member_id)) { openpne_redirect('ktai', 'page_h_access_block'); } // あしあとをつける db_ashiato_insert_c_ashiato($target_c_member_id, $u); } $this->set('type', $type); $this->set('album_info', $target_c_album); //メンバー情報 $this->set("target_member", $target_c_member); return 'success'; }
function execute($requests) { $u = $GLOBALS['AUTH']->uid(); // --- リクエスト変数 $target_c_member_id = $requests['target_c_member_id']; $page = $requests['page']; // ---------- if (empty($target_c_member_id)) { $target_c_member_id = $u; } $target_c_member = db_member_c_member4c_member_id($target_c_member_id); $this->set("target_member", $target_c_member); if ($target_c_member_id == $u) { $type = "h"; } else { $type = "f"; $is_friend = db_friend_is_friend($u, $target_c_member_id); // アクセスブロック if (db_member_is_access_block($u, $target_c_member_id)) { openpne_redirect('pc', 'page_h_access_block'); } } $this->set('inc_navi', fetch_inc_navi($type, $target_c_member_id)); //c_member_id から自分の日記についてるコメントIDリストを取得 $target_c_diary_comment_id = $this->_p_fh_diary_c_diary_comment_id_list4c_member_id($target_c_member_id, $is_friend, $type); $page_size = 50; list($c_diary_comment_list, $is_prev, $is_next, $total_num) = db_diary_get_c_diary_comment_list4id_list($target_c_diary_comment_id, $page, $page_size, true); //最近のコメント一覧用配列(50個まで) $this->set("new_comment_list", $c_diary_comment_list); $this->set("is_prev", $is_prev); $this->set("is_next", $is_next); $pager = array(); $pager['start'] = $page_size * ($page - 1) + 1; if (($pager['end'] = $page_size * $page) > $total_num) { $pager['end'] = $total_num; } $this->set('page', $page); $this->set('pager', $pager); return 'success'; }
function execute($requests) { $u = $GLOBALS['KTAI_C_MEMBER_ID']; // --- リクエスト変数 $target_c_member_id = $requests['target_c_member_id']; $subject = $requests['subject']; $body = $requests['body']; // ---------- if (db_member_is_access_block($u, $target_c_member_id)) { openpne_redirect('ktai', 'page_h_access_block'); } if ($target_c_member_id == $u) { // 自分にメッセージは送れない handle_kengen_error(); } //ターゲットの情報 $this->set("target_c_member", db_member_c_member4c_member_id_LIGHT($target_c_member_id)); $form_val = array(); $form_val['subject'] = $subject; $form_val['body'] = $body; $this->set("form_val", $form_val); return 'success'; }
function execute($requests) { $u = $GLOBALS['AUTH']->uid(); // --- リクエスト変数 $target_c_member_id = $requests['target_c_member_id']; $body = $requests['body']; // ---------- $c_member = db_member_c_member4c_member_id($target_c_member_id); if (!$c_member) { openpne_redirect('pc', 'page_h_err_f_home'); } $frined_status = db_friend_status($u, $target_c_member_id); if ($target_c_member_id == $u) { openpne_redirect('pc', 'page_h_home'); } if ($frined_status['is_friend']) { $p = array('target_c_member_id' => $target_c_member_id); openpne_redirect('pc', 'page_f_link_request_err_already', $p); } if ($frined_status['is_friend_confirm']) { $p = array('target_c_member_id' => $target_c_member_id); openpne_redirect('pc', 'page_f_link_request_err_wait', $p); } if (db_member_is_access_block($u, $target_c_member_id)) { openpne_redirect('pc', 'page_h_access_block'); } $this->set('inc_navi', fetch_inc_navi("f", $target_c_member_id)); //ターゲット情報 $this->set("target_member", $c_member); //ターゲットのid $this->set("target_c_member_id", $target_c_member_id); $form_val = array('target_c_member_id' => $target_c_member_id, 'body' => $body); //$this->set("form_val" ,$form_val); $this->set("form", $form_val); return 'success'; }