1 | <?php |
---|
2 | /** |
---|
3 | * @copyright 2005-2007 OpenPNE Project |
---|
4 | * @license http://www.php.net/license/3_01.txt PHP License 3.01 |
---|
5 | */ |
---|
6 | |
---|
7 | class ktai_page_c_home extends OpenPNE_Action |
---|
8 | { |
---|
9 | function execute($requests) |
---|
10 | { |
---|
11 | $u = $GLOBALS['KTAI_C_MEMBER_ID']; |
---|
12 | |
---|
13 | // --- リクエスト変数 |
---|
14 | $target_c_commu_id = $requests['target_c_commu_id']; |
---|
15 | // ---------- |
---|
16 | |
---|
17 | $c_commu = db_commu_c_commu4c_commu_id($target_c_commu_id); |
---|
18 | |
---|
19 | //コミュニティの存在の有無 |
---|
20 | if (!$c_commu) { |
---|
21 | openpne_redirect('ktai', 'page_h_home'); |
---|
22 | } |
---|
23 | |
---|
24 | |
---|
25 | //--- 権限チェック |
---|
26 | //未処理 |
---|
27 | //掲示板の閲覧権限チェック tplでやっている |
---|
28 | $this->set("is_c_commu_view", db_commu_is_c_commu_view4c_commu_idAc_member_id($target_c_commu_id, $u)); |
---|
29 | $this->set("is_c_commu_member", db_commu_is_c_commu_member($target_c_commu_id, $u)); |
---|
30 | //--- |
---|
31 | |
---|
32 | //管理画面HTML |
---|
33 | $this->set('c_siteadmin', p_common_c_siteadmin4target_pagename('k_c_home')); |
---|
34 | |
---|
35 | //コミュニティ情報 |
---|
36 | $this->set("c_commu", db_commu_c_commu4c_commu_id_k($target_c_commu_id)); |
---|
37 | |
---|
38 | //コミュニティメンバーリスト |
---|
39 | $this->set("c_commu_member_list", |
---|
40 | k_p_c_home_c_commu_member_list_random4c_commu_id($target_c_commu_id, 5)); |
---|
41 | |
---|
42 | //参加コミュニティの新着トピック書き込み |
---|
43 | $this->set("new_topic_comment", db_commu_new_topic_comment4c_commu_id($target_c_commu_id, 5)); |
---|
44 | //参加コミュニティの新着イベント書き込み |
---|
45 | $this->set("new_topic_comment_event", db_commu_new_topic_comment4c_commu_id($target_c_commu_id, 5, 1)); |
---|
46 | |
---|
47 | //自分($u)とこのコミュとの関係 |
---|
48 | $this->set("relation_c_member_and_c_commu", |
---|
49 | k_p_c_home_relationship_between_member_commu($target_c_commu_id, $u)); |
---|
50 | |
---|
51 | $c_member_secure = db_member_c_member_secure4c_member_id($u); |
---|
52 | if (empty($c_member_secure['ktai_address'])) { |
---|
53 | $is_registered_ktai_address = false; |
---|
54 | } else { |
---|
55 | $is_registered_ktai_address = true; |
---|
56 | } |
---|
57 | |
---|
58 | //コミュニティメール(ktai)受信設定 |
---|
59 | $this->set("is_receive_mail", db_commu_is_receive_mail_ktai($target_c_commu_id, $u)); |
---|
60 | //コミュニティメール(pc)受信設定 |
---|
61 | $this->set("is_receive_mail_pc", db_commu_is_receive_mail_pc($target_c_commu_id, $u)); |
---|
62 | //管理者からのメッセージ受信設定 |
---|
63 | $this->set("is_receive_message", db_commu_is_receive_message($target_c_commu_id, $u)); |
---|
64 | // 携帯アドレス登録状況 |
---|
65 | $this->set('is_registered_ktai_address', $is_registered_ktai_address); |
---|
66 | |
---|
67 | $this->set('is_unused_pc_bbs', util_is_unused_mail('m_pc_bbs_info')); |
---|
68 | $this->set('is_unused_ktai_bbs', util_is_unused_mail('m_ktai_bbs_info')); |
---|
69 | |
---|
70 | // inc_entry_point |
---|
71 | $this->set('inc_ktai_entry_point', fetch_inc_entry_point($this->getView(), 'ktai_c_home')); |
---|
72 | |
---|
73 | return 'success'; |
---|
74 | } |
---|
75 | } |
---|
76 | |
---|
77 | ?> |
---|