1 | <?php |
---|
2 | /** |
---|
3 | * @copyright 2005-2008 OpenPNE Project |
---|
4 | * @license http://www.php.net/license/3_01.txt PHP License 3.01 |
---|
5 | */ |
---|
6 | |
---|
7 | class ktai_page_h_home extends OpenPNE_Action |
---|
8 | { |
---|
9 | function execute($requests) |
---|
10 | { |
---|
11 | $u = $GLOBALS['KTAI_C_MEMBER_ID']; |
---|
12 | $OPTION = $this->get('C_MEMBER_CONFIG'); |
---|
13 | |
---|
14 | $c_member_secure = db_member_c_member_secure4c_member_id($u); |
---|
15 | |
---|
16 | //管理画面HTML |
---|
17 | $this->set('c_siteadmin', p_common_c_siteadmin4target_pagename('k_h_home')); |
---|
18 | |
---|
19 | $c_member = db_member_c_member_with_profile($u, 'private'); |
---|
20 | //メンバー情報 |
---|
21 | $this->set('c_member', $c_member); |
---|
22 | //新着メッセージ数 |
---|
23 | $this->set('c_message_unread_count', db_message_c_message_received_unread_all_count4c_member_id($u)); |
---|
24 | //フレンドの最新日記 |
---|
25 | $this->set('c_diary_friend_list', p_h_home_c_diary_friend_list4c_member_id($u, 5)); |
---|
26 | //参加コミュニティリスト |
---|
27 | $this->set('c_commu_list', db_commu_c_commu_list_lastupdate4c_member_id($u, 5)); |
---|
28 | //参加コミュニティの数 |
---|
29 | $this->set('fh_com_count_user',db_commu_count_c_commu4c_member_id($u)); |
---|
30 | //フレンドリスト |
---|
31 | $this->set('c_friend_list', db_friend_c_friend_list_random4c_member_id($u, 5)); |
---|
32 | //フレンドの数 |
---|
33 | $this->set('c_friend_count', db_friend_count_friends($u)); |
---|
34 | //参加コミュニティの新着書き込み |
---|
35 | $this->set('c_commu_topic_list', db_commu_c_commu_topic_comment_list4c_member_id($u, 5)); |
---|
36 | $this->set('SNS_NAME', SNS_NAME); |
---|
37 | |
---|
38 | if (DISPLAY_NEWDIARYTOPIC_HOME) { |
---|
39 | if ($OPTION['IS_DISPLAY_NEWDIARY_HOME_KTAI']) { |
---|
40 | $this->set('c_diary_list_all', p_h_home_c_diary_all_list(5)); |
---|
41 | } |
---|
42 | |
---|
43 | if ($OPTION['IS_DISPLAY_NEWTOPIC_HOME_KTAI']) { |
---|
44 | $this->set('c_topic_list_all', p_h_home_c_topic_all_list(5)); |
---|
45 | } |
---|
46 | } |
---|
47 | |
---|
48 | //アクセス日時を記録 |
---|
49 | db_member_do_access($u); |
---|
50 | |
---|
51 | //未読メッセージの数をお知らせ |
---|
52 | $this->set("num_message_not_is_read", db_message_count_c_message_not_is_read4c_member_to_id($u)); |
---|
53 | //日記コメントの未読の数をお知らせ |
---|
54 | $this->set("num_diary_not_is_read", p_h_diary_count_c_diary_not_is_read4c_member_id($u)); |
---|
55 | //日記コメントの未読の中で、読ませるものを送る |
---|
56 | $this->set("first_diary_read", p_h_diary_c_diary_first_diary_read4c_member_id($u)); |
---|
57 | |
---|
58 | //コミュニティ承認を求めているメンバーリスト |
---|
59 | $h_confirm_list = db_commu_anatani_c_commu_member_confirm_list4c_member_id($u); |
---|
60 | $this->set("h_confirm_list", $h_confirm_list); |
---|
61 | //そのメンバーの人数 |
---|
62 | $this->set("num_h_confirm_list", count($h_confirm_list)); |
---|
63 | |
---|
64 | //あなたにフレンド認証を求めているメンバーリスト |
---|
65 | $f_confirm_list = db_friend_anatani_c_friend_confirm_list4c_member_id($u); |
---|
66 | $this->set("f_confirm_list", $f_confirm_list); |
---|
67 | //そのメンバーの人数 |
---|
68 | $this->set("num_f_confirm_list", count($f_confirm_list)); |
---|
69 | |
---|
70 | // あなたにコミュニティ管理者交代を希望しているメンバー |
---|
71 | $anatani_c_commu_admin_confirm_list = db_commu_anatani_c_commu_admin_confirm_list4c_member_id($u); |
---|
72 | $this->set("anatani_c_commu_admin_confirm_list", $anatani_c_commu_admin_confirm_list); |
---|
73 | //そのメンバーの人数 |
---|
74 | $this->set("num_anatani_c_commu_admin_confirm_list", count($anatani_c_commu_admin_confirm_list)); |
---|
75 | |
---|
76 | // あなたにコミュニティ副管理者を希望しているメンバー |
---|
77 | $anatani_c_commu_sub_admin_confirm_list = db_commu_anatani_c_commu_sub_admin_confirm_list4c_member_id($u); |
---|
78 | $this->set("anatani_c_commu_sub_admin_confirm_list", $anatani_c_commu_sub_admin_confirm_list); |
---|
79 | //そのメンバーの人数 |
---|
80 | $this->set("num_anatani_c_commu_sub_admin_confirm_list", count($anatani_c_commu_sub_admin_confirm_list)); |
---|
81 | |
---|
82 | //日記コメント記入履歴 |
---|
83 | $this->set("c_diary_my_comment_list", p_h_home_c_diary_my_comment_list4c_member_id($u, 5)); |
---|
84 | |
---|
85 | // 誕生日かどうか |
---|
86 | $this->set('birthday_flag', db_member_birthday_flag4c_member_id($u)); |
---|
87 | |
---|
88 | if (MAIL_ADDRESS_HASHED) { |
---|
89 | $mail_address = "b{$u}-".t_get_user_hash($u)."@".MAIL_SERVER_DOMAIN; |
---|
90 | } else { |
---|
91 | $mail_address = "blog"."@".MAIL_SERVER_DOMAIN; |
---|
92 | } |
---|
93 | $mail_address = MAIL_ADDRESS_PREFIX . $mail_address; |
---|
94 | $this->set('blog_address', $mail_address); |
---|
95 | |
---|
96 | if (OPENPNE_USE_POINT_RANK) { |
---|
97 | // ポイント |
---|
98 | $point = db_point_get_point($u); |
---|
99 | $this->set("point", $point); |
---|
100 | |
---|
101 | // ランク |
---|
102 | $this->set("rank", db_point_get_rank4point($point)); |
---|
103 | } |
---|
104 | |
---|
105 | // inc_entry_point |
---|
106 | $this->set('inc_ktai_entry_point', fetch_inc_entry_point($this->getView(), 'ktai_h_home')); |
---|
107 | |
---|
108 | return 'success'; |
---|
109 | } |
---|
110 | } |
---|
111 | |
---|
112 | ?> |
---|