1 | <?php |
---|
2 | /** |
---|
3 | * @copyright 2005-2006 OpenPNE Project |
---|
4 | * @license http://www.php.net/license/3_01.txt PHP License 3.01 |
---|
5 | */ |
---|
6 | |
---|
7 | class biz_do_f_home_edit_biz_todo extends OpenPNE_Action |
---|
8 | { |
---|
9 | function execute($requests) |
---|
10 | { |
---|
11 | $u = $GLOBALS['AUTH']->uid(); |
---|
12 | |
---|
13 | // --- リクエスト変数 |
---|
14 | $id = $requests['id']; |
---|
15 | $is_check = $requests['is_check']; |
---|
16 | $writer_name = $requests['writer_name']; |
---|
17 | $sort_order = $requests['sort_order']; |
---|
18 | $writer_id = $requests['writer_id']; |
---|
19 | $memo = $requests['memo']; |
---|
20 | $is_done = $requests['is_done']; |
---|
21 | $due_year = $requests['due_year']; |
---|
22 | $due_month = $requests['due_month']; |
---|
23 | $due_day = $requests['due_day']; |
---|
24 | $priority = $requests['priority']; |
---|
25 | $biz_group_id = $requests['biz_group_id']; |
---|
26 | $public_flag = $requests['public_flag']; |
---|
27 | // ---------- |
---|
28 | |
---|
29 | if (!biz_isPermissionTodo($u, $id)) { |
---|
30 | handle_kengen_error(); |
---|
31 | } |
---|
32 | |
---|
33 | if (!$biz_group_id && $public_flag == 'group') { |
---|
34 | $_REQUEST['msg'] = '「グループまで公開」Todoの場合はグループを指定してください'; |
---|
35 | openpne_forward('biz', 'page', 'fh_home_edit_biz_todo'); |
---|
36 | exit; |
---|
37 | } |
---|
38 | |
---|
39 | $member_info = db_member_c_member4c_member_id_LIGHT($writer_id); |
---|
40 | |
---|
41 | $todo_info = biz_getTodo($id); |
---|
42 | |
---|
43 | $due_datetime = $due_year . '-' . $due_month . '-' . $due_day . ' 00:00:00'; |
---|
44 | if(!$todo_info['c_member_id'] && !$is_check) { |
---|
45 | $todo_info['c_member_id'] = $writer_id; |
---|
46 | } |
---|
47 | |
---|
48 | biz_editTodo($todo_info['c_member_id'], $memo, $writer_id, $sort_order, $is_check, $id, |
---|
49 | $is_done, $due_datetime, $priority, $biz_group_id, $public_flag); |
---|
50 | |
---|
51 | $p = array('target_c_member_id' => $requests['target_id']); |
---|
52 | openpne_redirect('pc', 'page_f_home', $p); |
---|
53 | |
---|
54 | } |
---|
55 | } |
---|
56 | |
---|
57 | ?> |
---|