ここの情報は古いです。ご理解頂いた上でお取り扱いください。

source: OpenPNE/branches/kunitada/MyNETS/trunk/webapp/modules/ktai/do/c_event_mail.php @ 3043

Last change on this file since 3043 was 3043, checked in by kunitada, 16 years ago

MyNETS1.0.1 merge

File size: 2.2 KB
Line 
1<?php
2
3/* ========================================================================
4 *
5 * @license This source file is subject to version 3.01 of the PHP license,
6 *              that is available at http://www.php.net/license/3_01.txt
7 *              If you did not receive a copy of the PHP license and are unable
8 *              to obtain it through the world-wide-web, please send a note to
9 *              license@php.net so we can mail you a copy immediately. 
10 *
11 * @category   Application of MyNETS
12 * @project    OpenPNE UsagiProject 2006-2007
13 * @package    MyNETS
14 * @author     UsagiProject <info@usagi.mynets.jp>
15 * @copyright  2006-2007 UsagiProject <author member ad http://usagi.mynets.jp/member.html>
16 * @version    MyNETS,v 1.0.0
17 * @since      File available since Release 1.0.0 Nighty
18 * @chengelog  [2007/02/17] Ver1.1.0Nighty package
19 * ========================================================================
20 */
21
22/**
23 * OpenPNE
24 * @copyright 2005-2006 OpenPNE Project
25 * @link      http://www.tejimaya.com/openpne.shtml
26 *
27 */
28
29class ktai_do_c_event_mail extends OpenPNE_Action
30{
31    function execute($requests)
32    {
33        $u  = $GLOBALS['KTAI_C_MEMBER_ID'];
34        $tail = $GLOBALS['KTAI_URL_TAIL'];
35
36        // --- リクエスト変数
37        $c_commu_id = $requests['c_commu_id'];
38        $c_commu_topic_id = $requests['c_commu_topic_id'];
39        $c_member_ids = $requests['c_member_ids'];
40        $body = $requests['body'];
41        // ----------
42
43        $c_topic = c_event_detail_c_topic4c_commu_topic_id($c_commu_topic_id);
44        $c_commu_id = $c_topic['c_commu_id'];
45
46        //--- 権限チェック
47
48        //イベントの管理者でないと送信できない
49        if (!_db_is_c_event_admin($c_commu_topic_id, $u)) {
50            handle_kengen_error();
51        }
52        //---
53
54        //メッセージ送信
55        list($msg_subject, $msg_body) =
56            create_message_event_message($u, $body, $c_commu_topic_id);
57
58        foreach ($c_member_ids as $key => $value) {
59            do_common_send_message_event_message($u, $value, $msg_subject, $msg_body);
60        }
61
62        $p = array('target_c_commu_topic_id' => $c_commu_topic_id);
63        openpne_redirect('ktai', 'page_c_event_mail_end', $p);
64    }
65}
66
67?>
Note: See TracBrowser for help on using the repository browser.