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 pc_page_c_event_mail_confirm extends OpenPNE_Action |
---|
8 | { |
---|
9 | function execute($requests) |
---|
10 | { |
---|
11 | $u = $GLOBALS['AUTH']->uid(); |
---|
12 | |
---|
13 | // --- リクエスト変数 |
---|
14 | $c_commu_topic_id = $requests['target_c_commu_topic_id']; |
---|
15 | $c_member_ids = $requests['c_member_id']; |
---|
16 | $body = $requests['body']; |
---|
17 | // ---------- |
---|
18 | |
---|
19 | if (!$c_member_ids) { |
---|
20 | $p = array('target_c_commu_topic_id' => $c_commu_topic_id); |
---|
21 | openpne_redirect('pc', 'page_c_event_mail', $p); |
---|
22 | } |
---|
23 | |
---|
24 | $c_topic = db_commu_c_topic4c_commu_topic_id_2($c_commu_topic_id); |
---|
25 | $c_commu_id = $c_topic['c_commu_id']; |
---|
26 | |
---|
27 | |
---|
28 | //--- 権限チェック |
---|
29 | if (!db_commu_is_c_commu_view4c_commu_idAc_member_id($c_commu_id, $u)) { |
---|
30 | handle_kengen_error(); |
---|
31 | } |
---|
32 | if (!db_commu_is_c_event_admin($c_commu_topic_id, $u)) { |
---|
33 | handle_kengen_error(); |
---|
34 | } |
---|
35 | if (in_array($u, $c_member_ids)) { |
---|
36 | handle_kengen_error(); |
---|
37 | } |
---|
38 | //--- |
---|
39 | |
---|
40 | |
---|
41 | $this->set('c_commu', db_commu_c_commu4c_commu_id($c_commu_id)); |
---|
42 | |
---|
43 | $this->set('inc_navi', fetch_inc_navi('c', $c_commu_id)); |
---|
44 | $this->set('c_mail_member', db_commu_c_event_mail_confirm_list4c_member_ids($c_member_ids)); |
---|
45 | |
---|
46 | $this->set('body', $body); |
---|
47 | $this->set('c_member_ids', implode(',', $c_member_ids)); |
---|
48 | $this->set("c_commu_id", $c_commu_id); |
---|
49 | $this->set("c_commu_topic_id", $c_commu_topic_id); |
---|
50 | return 'success'; |
---|
51 | } |
---|
52 | } |
---|
53 | |
---|
54 | ?> |
---|