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

Changeset 1087


Ignore:
Timestamp:
Dec 8, 2006, 5:28:16 PM (14 years ago)
Author:
takanashi
Message:

#246 スケジュールに権限を入れる

Location:
OpenPNE/trunk
Files:
1 added
25 edited
1 copied

Legend:

Unmodified
Added
Removed
  • OpenPNE/trunk/webapp_biz/modules/biz/do/fh_biz_schedule_edit.php

    r602 r1087  
    1212        $u = $GLOBALS['AUTH']->uid();
    1313        $sessid = session_id();
     14
     15        if (!biz_isPermissionSchedule($u, $requests['schedule_id'])) {
     16            handle_kengen_error();
     17        }
    1418
    1519        //ERROR----------------
     
    6367        //--------------------
    6468
    65 
    66         //施設、参加者のチェック
    67         if (in_array('0', $requests['sc_j_mem'])) {
    68             //「全員」が含まれている場合は、配列を空に
    69             $requests['sc_j_mem'] = array();
    70         }
    71 
    72         if (!$requests['sc_j_plc']) {
    73             $requests['sc_j_plc'] = 0;
    74         }
    75 
    7669        if ($requests['sc_b_hour'] && !$requests['sc_b_minute']) {
    7770            $requests['sc_b_minute'] = '00';
     
    10295        //--------------------
    10396
     97        //ERROR---------------
     98        //グループまで公開の予定なのにグループが指定されていない
     99        //--------------------
     100        if(($requests['public_flag'] == 'group') && empty($requests['biz_group_id'])) {
     101            $msg = '「グループまで公開」予定の場合はグループを指定してください';
     102            $begin_date = $requests['sc_b_year'].'-'.$requests['sc_b_month'].'-'.$requests['sc_b_date'];
     103
     104            $p = array('msg' => $msg, 'begin_date' => $begin_date, 'title' => $requests['sc_title'],
     105                'sc_rp' => $requests['sc_rp'], 'value' => $requests['sc_memo'], 'members' => serialize($requests['sc_j_mem']),
     106                'sc_rwk_enc' => serialize($requests['sc_rwk_enc']), 'sc_rcount' => $requests['sc_rcount'],
     107                'schedule_id' => $requests['schedule_id']);
     108            openpne_redirect('biz', 'page_fh_biz_schedule_edit', $p);
     109
     110            exit();  //強制的にスクリプトを終了しなければいけない
     111        }
     112
    104113        if (!($requests['sc_b_hour'] || $requests['sc_b_minute'] || $requests['sc_f_hour'] || $requests['sc_f_minute'])) {
    105114            //時刻指定なし
     
    120129            $finish_date = date("Y-m-d", strtotime($requests['sc_b_year'].'-'.$requests['sc_b_month'].'-'.($requests['sc_b_date']+($requests['sc_bn']-1))));
    121130            //繰り返しをしない予定登録
    122             biz_editSchedule($requests['sc_title'], $u, $begin_date, $finish_date, $begin_time, $finish_time, $requests['sc_memo'], $rp_rule, 0, $requests['sc_j_mem'], $requests['sc_j_plc'], $requests['schedule_id']);
     131            biz_editSchedule($requests['sc_title'], $u, $begin_date, $finish_date, $begin_time, $finish_time, $requests['sc_memo'], $rp_rule, 0, $requests['biz_group_id'], $requests['public_flag'], $requests['schedule_id']);
    123132            $schedule_id = $requests['schedule_id'];
    124133        } else {
     
    149158               
    150159                if ($rp_rule & (1 << date("w", $nowday))) {
    151                     biz_insertSchedule($requests['sc_title'], $u, date("Y-m-d", $tmp), date("Y-m-d", $tmp), $begin_time, $finish_time, $requests['sc_memo'], $rp_rule, $first_id, $requests['sc_j_mem']);
     160                    biz_insertSchedule($requests['sc_title'], $u, date("Y-m-d", $tmp), date("Y-m-d", $tmp), $begin_time, $finish_time, $requests['sc_memo'], $rp_rule, $first_id, $requests['biz_group_id'], $requests['public_flag']);
    152161                }
    153162            }
     
    157166        $week = date("W", abs(strtotime($begin_date) - strtotime(date("Y-m-d")))) - 1;
    158167
    159         if (in_array($u,$requests['sc_j_mem'])) {
    160             $target_id = $u;
    161         } else {
    162             $target_id = $requests['sc_j_mem'][0];
    163         }
    164168        $p = array('w' => $week, 'msg' => '予定を編集しました。',
    165169                   'id' => $schedule_id, 'target_id'  => $target_id);
  • OpenPNE/trunk/webapp_biz/modules/biz/do/fhg_biz_schedule_add.php

    r365 r1087  
    6969        //--------------------
    7070
    71         //施設、参加者のチェック
    72         if (in_array('0', $requests['sc_j_mem'])) {
    73             //「全員」が含まれている場合は、配列を空に
    74             $requests['sc_j_mem'] = array();
    75         }
    76 
    77         if (!$requests['sc_j_plc']) {
    78             $requests['sc_j_plc'] = 0;
    79         }
    80 
    8171        if ($requests['sc_b_hour'] && !$requests['sc_b_minute']) {
    8272            $requests['sc_b_minute'] = '00';
     
    116106        //--------------------
    117107
     108        //ERROR---------------
     109        //グループまで公開の予定なのにグループが指定されていない
     110        //--------------------
     111        if(($requests['public_flag'] == 'group') && empty($requests['biz_group_id'])) {
     112            $msg = '「グループまで公開」予定の場合はグループを指定してください';
     113            $begin_date = $requests['sc_b_year'].'-'.$requests['sc_b_month'].'-'.$requests['sc_b_date'];
     114            $begin_time = $requests['sc_b_hour'].':'.$requests['sc_b_minute'];
     115            $finish_time = $requests['sc_f_hour'].':'.$requests['sc_f_minute'];
     116            $url = $redirect_script.
     117                        '&msg='.$msg.
     118                        '&begin_date='.$begin_date.
     119                        '&sc_title='.$requests['sc_title'].
     120                        '&sc_rp='.$requests['sc_rp'].
     121                        '&sc_memo='.$requests['sc_memo'].
     122                        '&sc_j_mem_enc='.serialize($requests['sc_j_mem']).
     123                        '&sc_rwk_enc='.serialize($requests['sc_rwk_enc']).
     124                        '&sc_rcount='.$requests['sc_rcount'];
     125
     126            $p = array('msg' => $msg, 'begin_date' => $begin_date, 'sc_rp' => $requests['sc_rp'],
     127                'sc_memo' => $requests['sc_memo'], 'sc_j_mem_enc' => serialize($requests['sc_j_mem']),
     128                'sc_rwk_enc' => serialize($requests['sc_rwk_enc']), 'sc_rcount' => $requests['sc_rcount']);
     129            openpne_redirect('biz', 'page_fh_biz_schedule_add', $p);
     130            exit();  //強制的にスクリプトを終了しなければいけない
     131        }
     132
    118133        if (!$requests['sc_rp'] && ($requests['sc_bn'] == 1)) {
    119134            //当日中に終わる予定は、開始日と終了日は同一でなければならない
     
    150165        if (!$requests['sc_rp']) {
    151166            //繰り返しをしない予定登録
    152             biz_insertSchedule($requests['sc_title'], $u, $begin_date, $finish_date, $begin_time, $finish_time, $requests['sc_memo'], $rp_rule, 0, $requests['sc_j_mem'], $requests['sc_j_plc']);
     167            biz_insertSchedule($requests['sc_title'], $u, $begin_date, $finish_date, $begin_time, $finish_time, $requests['sc_memo'], $rp_rule, 0, $requests['biz_group_id'], $requests['public_flag']);
    153168        } else {
    154169            //繰り返し予定
     
    159174                $tmp = date("Ymd", $nowday);
    160175                if ($rp_rule & (1 << date("w",$nowday))) {
    161                     biz_insertSchedule($requests['sc_title'], $u, $tmp, $tmp, $begin_time, $finish_time, $requests['sc_memo'], $rp_rule, $first_id, $requests['sc_j_mem'], $requests['sc_j_plc']);
     176                    biz_insertSchedule($requests['sc_title'], $u, $tmp, $tmp, $begin_time, $finish_time, $requests['sc_memo'], $rp_rule, $first_id, $requests['biz_group_id'], $requests['public_flag']);
    162177                }
    163178            }
  • OpenPNE/trunk/webapp_biz/modules/biz/do/g_home_add_biz_schedule.php

    r365 r1087  
    3636        }
    3737
    38         $members = biz_getGroupMember($target_id);
    39         $members_id = array();
    40         foreach ($members as $key => $values) {
    41             array_push($members_id, $values['c_member_id']);
    42         }
    4338        if (empty($text)) {
    4439            $p = array('target_c_commu_id' => $target_id, 'msg' => 'タイトルを入力してください。');
     
    4742        }
    4843
    49         biz_insertSchedule($title, $u, $begin_date, $finish_date, $begin_time, $finish_time, '', 0, 0, $members_id);  //予定の登録
     44        biz_insertSchedule($title, $u, $begin_date, $finish_date, $begin_time, $finish_time, '', 0, 0, $target_id, 'group');  //予定の登録
    5045        biz_readSchedule($u, biz_getScheduleMax());  //既読済みに
    5146
  • OpenPNE/trunk/webapp_biz/modules/biz/do/h_biz_schedule_delete.php

    r406 r1087  
    1111        $u = $GLOBALS['AUTH']->uid();
    1212        $sessid = session_id();
     13
     14        if (!biz_isPermissionSchedule($u, $requests['schedule_id'])) {
     15            handle_kengen_error();
     16        }
    1317
    1418        if ($requests['is_rep']) {
  • OpenPNE/trunk/webapp_biz/modules/biz/do/h_home_add_biz_schedule.php

    r406 r1087  
    6262        }
    6363
    64         biz_insertSchedule($title, $u, $begin_date, $finish_date, $begin_time, $finish_time, '', 0, 0, array($u));  //予定の登録
     64        biz_insertSchedule($title, $u, $begin_date, $finish_date, $begin_time, $finish_time, '', 0, 0);  //予定の登録
    6565        biz_readSchedule($u, biz_getScheduleMax());  //既読に
    6666
  • OpenPNE/trunk/webapp_biz/modules/biz/lib/mysql_functions.php

    r896 r1087  
    136136}
    137137
     138//指定された予定に関する権限があるかどうかをチェックする関数
     139function biz_isPermissionSchedule($u, $biz_schedule_id)
     140{
     141    $biz_schedule = biz_getScheduleInfo($biz_schedule_id);
     142    $public_flag = $biz_schedule['public_flag'];
     143    $biz_group_id = $biz_schedule['biz_group_id'];
     144    $target_c_member_id = $biz_schedule['c_member_id'];
     145
     146    switch ($public_flag) {
     147    case 'group' :  //グループのメンバーにのみ権限が与えられる予定
     148        if (biz_isGroupMember($u, $biz_group_id)) {
     149            return true;
     150        } else {
     151            return false;
     152        }
     153        break;
     154    case 'private' :  //予定作成者にのみ権限が与えられる予定
     155        if ($target_c_member_id == $u) {
     156            return true;
     157        } else {
     158            return false;
     159        }
     160        break;
     161    default :  //すべてのユーザに権限が与えられる予定
     162        return true;
     163    }
     164}
     165
    138166//指定された日付に存在する特定ユーザの予定idのみを得る関数
    139 function biz_getDateMemberSchedule($y, $m, $d, $id)
     167function biz_getDateMemberSchedule($y, $m, $d, $target_c_member_id, $u)
    140168{
    141169    $schedule = array();
    142170    $contain = array();
    143171
    144     $tmp = biz_getDateSchedule($y,$m,$d);
     172    $tmp = biz_getDateSchedule($y, $m, $d);
    145173    $sc_list = array();
    146 
    147     foreach ($tmp as $value) {
    148         $members = biz_getJoinIdSchedule($value);
    149         if (in_array($id, $members)) {
    150             $contain[] = $value;
     174   
     175    $biz_group_id_list = array();
     176    foreach(biz_getJoinGroup($target_c_member_id) as $value) {
     177        $biz_group_id_list[] = $value['biz_group_id'];
     178    }
     179
     180    foreach ($tmp as $biz_schedule_id) {
     181        $biz_schedule = biz_getScheduleInfo($biz_schedule_id);
     182
     183        if (biz_isPermissionSchedule($u, $biz_schedule_id)) {
     184                if ($biz_schedule['c_member_id'] == $target_c_member_id) {
     185                    $contain[] = $biz_schedule_id;
     186                } elseif(in_array($biz_schedule['biz_group_id'], $biz_group_id_list) && ($value['public_flag'] != 'private')) {
     187                    $contain[] = $biz_schedule_id;
     188                }
    151189        }
    152190    }
     
    156194    foreach ($contain as $key => $value) {
    157195        if (!is_null($value)) {
     196           
    158197            //そのidの予定を得る
    159198            $sql = 'SELECT * FROM biz_schedule WHERE biz_schedule_id = ?';
     
    337376}
    338377
    339 //指定されたグループのメンバーを返す関数
     378//指定メンバーがグループに所属しているかどうかを返す関数
    340379function biz_isGroupMember($member_id, $group_id)
    341380{
     
    682721function biz_insertSchedule($title, $member_id, $begin_date, $finish_date, $begin_time = null, $finish_time = null,
    683722                                                        $value = '', $rep_type, $first_id = 0,
    684                                                         $join_members = array(), $join_shisetsu = array())
     723                                                        $biz_group_id = 0, $public_flag = "public")
    685724{
    686725    //登録値のセット、チェック
     
    689728    }
    690729
    691     //参加者が指定されていない
    692     if (empty($join_members)) {
    693         $join_members = db_get_col('SELECT c_member_id FROM c_member');  //強制的に全員参加と見なす
    694     }
    695 
    696     if (empty($join_shisetsu)) {
    697         $join_shisetsu = array();
    698     }
    699        
    700730    if (!$rep_type) {
    701731        $rep_type = 0;
     
    713743        'rep_type' => $rep_type,
    714744        'rep_first' => $first_id,
     745        'biz_group_id' => $biz_group_id,
     746        'public_flag' => $public_flag,
    715747    );
    716748    db_insert('biz_schedule', $data);
    717 
    718     //biz_schedule_memberで予定とメンバーを関連づける
    719 
    720     $new_schedule_id = mysql_insert_id();
    721 
    722     foreach ($join_members as $value) {
    723         $data = array(
    724             'c_member_id' => $value,
    725             'biz_schedule_id' => $new_schedule_id,
    726             'is_read' => 0,
    727         );
    728         db_insert('biz_schedule_member', $data);
    729     }
    730749}
    731750
     
    768787function biz_editSchedule($title, $member_id, $begin_date, $finish_date, $begin_time = null, $finish_time = null,
    769788                                                    $value = '', $rep_type, $first_id = 0,
    770                                                     $join_members = array(), $join_shisetsu,
     789                                                    $biz_group_id = 0, $public_flag = "public",
    771790                                                    $id)
    772791{
    773     $sql = 'UPDATE `biz_schedule` SET `title` = ?,`c_member_id` = ?,`begin_date` = ?,`finish_date` = ?,`begin_time` = ?,`finish_time` = ?,`value` = ?,`rep_type` = ?,`rep_first` = ?,`is_read` = 0 WHERE `biz_schedule_id` = ?';
     792    $sql = 'UPDATE `biz_schedule` SET `title` = ?,`c_member_id` = ?,`begin_date` = ?,`finish_date` = ?,`begin_time` = ?,`finish_time` = ?,`value` = ?,`rep_type` = ?,`rep_first` = ?, `biz_group_id` = ?, `public_flag` = ?, `is_read` = 0 WHERE `biz_schedule_id` = ?';
    774793    $params = array(
    775794        $title,
     
    782801        $rep_type,
    783802        $first_id,
     803        $biz_group_id,
     804        $public_flag,
    784805        $id,
    785806    );
    786807    db_query($sql, $params);
    787 
    788     $sql = 'DELETE FROM `biz_schedule_member` WHERE `biz_schedule_id` = ?';
    789     $params = array(
    790         intval($id),
    791     );
    792     db_query($sql, $params);
    793 
    794     foreach ($join_members as $value) {
    795         $data = array(
    796             'c_member_id' => $value,
    797             'biz_schedule_id' => intval($id),
    798             'is_read' => 0,
    799         );
    800         db_insert('biz_schedule_member', $data);
    801     }
    802808}
    803809
     
    904910        intval($group_id),
    905911    );    $result = db_query($sql, $params);
     912
     913    $sql = 'UPDATE biz_schedule SET public_flag = "private", biz_group_id = NULL WHERE biz_group_id = ?';
     914    db_query($sql, array(intval($group_id)));
    906915}
    907916
  • OpenPNE/trunk/webapp_biz/modules/biz/lib/smarty_functions.php

    r406 r1087  
    4747
    4848//スケジュール用カレンダーを得る
    49 function biz_getScheduleWeek($member_id, $w, $cmd, $head = true, $value = true, $foot = true, $member_info = false)
     49function biz_getScheduleWeek($member_id, $u, $w, $cmd, $head = true, $value = true, $foot = true, $member_info = false)
    5050{
    5151    if ($cmd != 'p') {
     
    8686
    8787        if ($cmd != 's_list') {
    88             $schedule = biz_getDateMemberSchedule($y, $m, $d, $member_id);
     88            $schedule = biz_getDateMemberSchedule($y, $m, $d, $member_id, $u);
    8989            $banner = biz_isBannerSchedule($y, $m, $d, $member_id);
    9090
  • OpenPNE/trunk/webapp_biz/modules/biz/page/fh_biz_schedule_add.php

    r406 r1087  
    126126        $this->set('is_h', true);
    127127
    128         //追加
    129         $members = array();
     128        $biz_group_count = biz_getGroupCount($target_id);
     129        $biz_group_list = biz_getJoinGroupList($target_id, 1, $biz_group_count);
    130130
    131         $sql = 'SELECT c_member_id, nickname FROM c_member WHERE c_member_id != '.$target_id;
    132         $members = db_get_all($sql);
    133 
    134         $sql = 'SELECT c_member_id, nickname FROM c_member WHERE c_member_id = '.$target_id;
    135         $my_info = db_get_row($sql);
    136 
    137         array_unshift($members, $my_info);
    138 
    139         $members[0]['checkflag'] = 1;
    140 
    141         $jmembers = unserialize($requests['sc_j_mem_enc']);
    142 
    143         $i = 0;
    144 
    145         foreach ($members as $key => $value) {
    146             if ($jmembers[$i] == $value['c_member_id']) {
    147                 $members[$key]['checkflag'] = 1;
    148                 $i++;
    149             }
    150 
    151             if (count($jmembers) < $i) {
    152                 break;
    153             }
    154         }
    155         $this->set('members', $members);
     131        $this->set('biz_group_list', $biz_group_list[0]);
    156132
    157133        return 'success';
  • OpenPNE/trunk/webapp_biz/modules/biz/page/fh_biz_schedule_calendar.php

    r406 r1087  
    6161              $day = $Day->thisDay();
    6262
    63               $schedule = biz_getDateMemberSchedule($year, sprintf("%02d", $month), sprintf("%02d", $day), $target_id);
     63              $schedule = biz_getDateMemberSchedule($year, sprintf("%02d", $month), sprintf("%02d", $day), $target_id, $u);
    6464              $banner = biz_isBannerSchedule($year, sprintf("%02d", $month), sprintf("%02d", $day), $target_id);
    6565
  • OpenPNE/trunk/webapp_biz/modules/biz/page/fh_biz_schedule_edit.php

    r406 r1087  
    1212        $u = $GLOBALS['AUTH']->uid();
    1313
     14        if (!biz_isPermissionSchedule($u, $requests['schedule_id'])) {
     15            handle_kengen_error();
     16        }
     17
    1418        $form_val['subject'] = $requests['subject'];
    1519        $form_val['body'] = $requests['body'];
    1620
    1721        $sessid = session_id();
     22
     23        $schedule = biz_getScheduleInfo($requests['schedule_id']);
    1824
    1925        if (empty($requests['target_id']) || ($requests['target_id'] == $u)) {
     
    160166        $this->set('is_rep', $is_rep);
    161167
    162         $j_members = array_keys(unserialize($requests['members']));
    163         sort($j_members);
    164 
    165         $this->set('j_members', $j_members);
    166 
    167168        $this->set('schedule_id', $requests['schedule_id']);
    168 
    169         //追加
    170         $members = array();
    171 
    172         $sql = 'SELECT c_member_id, nickname FROM c_member WHERE c_member_id <> ?';
    173 
    174         $params = array(
    175             intval($target_id),
    176         );
    177         $members = db_get_all($sql, $params);
    178 
    179         $sql = 'SELECT c_member_id, nickname FROM c_member WHERE c_member_id = ?';
    180         $params = array(
    181             intval($target_id),
    182         );
    183         $my_info = db_get_row($sql, $params);
    184         array_unshift($members, $my_info);
    185         $i = 0;
    186 
    187         foreach ($members as $key => $value) {
    188             if ($j_members[$i] == $value['c_member_id']) {
    189                 $members[$key]['checkflag'] = 1;
    190                 $i++;
    191             }
    192 
    193             if (count($j_members) < $i) {
    194                 break;
    195             }
    196         }
    197 
    198         $members[0]['checkflag'] = 1;
    199         $this->set('members', $members);
    200169
    201170        $repeat_begin = biz_getRepeatBegin($requests['schedule_id']);
     
    208177        $this->set('repeat_term', intval($daycount));
    209178
     179        $biz_group_count = biz_getGroupCount($target_id);
     180        $biz_group_list = biz_getJoinGroupList($target_id, 1, $biz_group_count);
     181
     182        $this->set('biz_group_list', $biz_group_list[0]);
     183        $this->set('target_biz_group_id', $schedule['biz_group_id']);
     184
     185        $this->set('public_flag', $schedule['public_flag']);
     186
    210187        return 'success';
    211188    }
  • OpenPNE/trunk/webapp_biz/modules/biz/page/fh_biz_schedule_view.php

    r602 r1087  
    1010    {
    1111        $u = $GLOBALS['AUTH']->uid();
     12
     13        if (!biz_isPermissionSchedule($u, $requests['id'])) {
     14            handle_kengen_error();
     15        }
    1216
    1317        $form_val['subject'] = $requests['subject'];
     
    6771        $list['begin_time'] = substr($list['begin_time'], 0, 5);
    6872        $list['finish_time'] = substr($list['finish_time'], 0, 5);
    69 
    70         $jmembers = biz_getJoinMemberSchedule($requests['id']);
    71         if (array_search($target_member['nickname'], $jmembers)) {
    72             $jmembers[$target_member['c_member_id']] = $target_member['nickname'];
     73        if($list['biz_group_id']) {
     74                $biz_group = biz_getGroupData($list['biz_group_id']);
     75                $list['biz_group_name'] = $biz_group['name'];
    7376        }
    74         $jshisetsu = biz_getJoinShisetsuSchedule($requests['id']);
    7577
    7678        $this->set('schedule', $list);
    77         $this->set('jmembers', $jmembers);
    78         $this->set('jmembers_enc', serialize($jmembers));
    79         $this->set('jshisetsu', $jshisetsu);
    80         $this->set('jshisetsu_enc', serialize($jshisetsu));
    8179        $this->set('schedule_id', $requests['id']);
    8280        $this->set('w', $requests['w']);
  • OpenPNE/trunk/webapp_biz/modules/biz/page/g_home.php

    r406 r1087  
    4242        $this->set("admin_data", db_common_c_member4c_member_id_LIGHT($group['admin_id']));
    4343
    44         $this->set('calendar_head', biz_getScheduleWeek($target_id, $requests['w'], 'g', ture, false, false));
     44        $this->set('calendar_head', biz_getScheduleWeek($target_id, $u, $requests['w'], 'g', ture, false, false));
    4545
    4646        foreach ($member_list_full as $key => $value) {
    47             $calendar_value .= biz_getScheduleWeek($value['c_member_id'], $requests['w'], 'g', false, true, false, $value);
     47            $calendar_value .= biz_getScheduleWeek($value['c_member_id'], $u, $requests['w'], 'g', false, true, false, $value);
    4848        }
    4949
    5050        $this->set('calendar_value', $calendar_value);
    51         $this->set('calendar_foot', biz_getScheduleWeek($target_id, $requests['w'], 'g', false, false, true));
     51        $this->set('calendar_foot', biz_getScheduleWeek($target_id, $u, $requests['w'], 'g', false, false, true));
    5252
    5353        if ($u == $group['admin_id']) {
  • OpenPNE/trunk/webapp_biz/modules/biz/page/h_biz_schedule_delete.php

    r942 r1087  
    1414
    1515        $this->set('inc_navi', fetch_inc_navi("h"));
     16        if (!biz_isPermissionSchedule($u, $requests['schedule_id'])) {
     17            handle_kengen_error();
     18        }
     19
    1620        $this->set('schedule_id',$requests['schedule_id']);
    1721        $this->set("is_rep", $requests['is_rep']);
  • OpenPNE/trunk/webapp_biz/modules/biz/page/s_list.php

    r406 r1087  
    6060        $calendar = '';
    6161        foreach ($list as $key => $value) {
    62             $calendar .= biz_getScheduleWeek($value['biz_shisetsu_id'], $requests['w'], 's_list', true, true, true);
     62            $calendar .= biz_getScheduleWeek($value['biz_shisetsu_id'], $u, $requests['w'], 's_list', true, true, true);
    6363        }
    6464
  • OpenPNE/trunk/webapp_biz/modules/biz/templates/fh_biz_schedule_add.tpl

    r1081 r1087  
    234234<td class="bg_01" colspan="5"><img src="./skin/dummy.gif" style="width:1px;height:1px;" class="dummy"></td>
    235235</tr>
    236 <!--
    237 ({*********})
    238 <script type="text/javascript" src="./modules/biz/schedule_member_form.js"></script>
    239 <tr>
    240 <td class="bg_01" align="center"><img src="./skin/dummy.gif" style="width:1px;height:1px;" class="dummy"></td>
    241 <td class="bg_05" align="center" valign="middle">
    242 <div style="padding:4px 3px;">
    243 参加者<br>
    244 </div>
    245 </td>
    246 <td class="bg_01" align="center"><img src="./skin/dummy.gif" style="width:1px;height:1px;" class="dummy"></td>
    247 <td class="bg_02" align="left" valign="middle">
    248 <div style="padding:4px 3px;">
    249 
    250 <table name="join">
    251 <tr>
    252         <td>
    253                 <select id="groupSelect" onchange="">
    254                         <option value="0">(全員)</option>
    255                 </select>
    256         </td>
    257 </tr>
    258 <tr>
    259         <td>
    260                 <select name="sc_j_mem[]" size="5" multiple="multiple">
    261                 <option value='({$my_id})' selected>({$members[$my_id]})</option>
    262                 </select>
    263         </td>
    264         <td>
    265                 <input value="← 追加" onclick="addMember(this.form, 'members', 'sc_j_mem[]')" type="button" class="submit"><br>
    266                 <input value="削除 →" onclick="deleteMember(this.form, 'sc_j_mem[]')" type="button" class="submit">
    267         <td>
    268         <td>
    269                 <select name="members" size="5" multiple="multiple">
    270                         <option value='({$my_id})' selected>({$members[$my_id]})</option>
    271                 ({section name=i start=1 loop=$members})
    272                         ({if $smarty.section.i.index != $my_id})
    273                         <option value='({$smarty.section.i.index})' selected>({$members[i]})</option>
    274                         ({/if})
    275                 ({/section})
    276                 </select>
    277         </td>
    278 </tr>
    279 </table>-->
    280 <!--    <input name='sc_j_mem[]' value='({$my_id})' type='checkbox' class='no_bg' checked>({$members[$my_id]})<br>
    281         <input name='sc_j_mem[]' value='({$my_id})' type='checkbox' class='no_bg' checked>({$members[$my_id]})<br>
    282         ({section name=i start=1 loop=$members})
    283                 ({if $smarty.section.i.index != $my_id})
    284                 <input name='sc_j_mem[]' value='({$smarty.section.i.index})' type='checkbox' class='no_bg' ({if $smarty.section.i.index == $my_id})checked({/if})>({$members[i]})<br>
    285                 ({/if})
    286         ({/section})-->
    287 <!--</div>
    288 </td>
    289 <td class="bg_01" align="center"><img src="./skin/dummy.gif" style="width:1px;height:1px;" class="dummy"></td>
    290 </tr>
    291 ({*********})
    292 <tr>
    293 <td style="height:1px;" class="bg_01" colspan="5"><img src="./skin/dummy.gif" style="width:1px;height:1px;" class="dummy"></td>
    294 </tr>
    295 ({*********})-->
    296 
    297 ({*ここから:新規予定*})
    298 
    299236<tr>
    300237<td style="width:1px;" class="bg_01"><img src="./skin/dummy.gif" style="width:1px; height:1px;" class="dummy"></td>
     
    303240<div class="padding_s" align="center">
    304241
    305 参加者<br>※未選択は全員
     242グループ
    306243
    307244</div>
     
    313250<table border="0" cellspacing="0" cellpadding="0" style="width:100%;">
    314251<tr>
    315 ({foreach from=$members item=item name=mem})
    316 ({if $item})
    317 <td class="padding_ss" style="width:33%;" valign="top">
    318 
    319 <input name='sc_j_mem[]' value='({$item.c_member_id})' type='checkbox' class='no_bg'({if $item.checkflag}) checked="checked"({/if})>({$item.nickname})
    320 
    321 </td>
    322 ({else})
    323 <td class="padding_ss" style="width:33%;">&nbsp;</td>
    324 ({/if})
    325 
    326 
    327 ({if $smarty.foreach.mem.last && ($smarty.foreach.mem.iteration%3 == 1 || $smarty.foreach.mem.iteration%3 == 2)})<td>&nbsp;</td>({/if})
    328 
    329 ({if $smarty.foreach.mem.last && $smarty.foreach.mem.iteration%3 == 1})<td>&nbsp;</td>({/if})
    330 
    331 ({if !$smarty.foreach.mem.last && $smarty.foreach.mem.iteration%3 == 0})</tr><tr>({/if})
     252<td class="padding_ss">
     253<select name="biz_group_id">
     254        <option type="radio" value="0">指定なし
     255({foreach from=$biz_group_list item=biz_group})
     256        <option type="radio" value="({$biz_group.biz_group_id})">({$biz_group.name})
    332257({/foreach})
     258</select>
     259</td>
    333260</tr>
    334261</table>
     
    342269</tr>
    343270({*********})
    344 
    345 ({*ここまで:新規予定*})
    346 
    347 
    348 <!--
    349 <tr>
    350 <td class="bg_01" align="center"><img src="./skin/dummy.gif" style="width:1px;height:1px;" class="dummy"></td>
    351 <td class="bg_05" align="center" valign="middle">
    352 <div style="padding:4px 3px;">
    353 設備
    354 </div>
    355 </td>
    356 <td class="bg_01" align="center"><img src="./skin/dummy.gif" style="width:1px;height:1px;" class="dummy"></td>
    357 <td class="bg_02" align="left" valign="middle">
    358 <div style="padding:4px 3px;">
    359         ({foreach item=shisetsu name=i from=$shisetsu})
    360                 <input name='sc_j_plc[]' value='({$shisetsu.biz_shisetsu_id})' type='checkbox' class='no_bg'>({$shisetsu.name})<br>
    361         ({/foreach})
    362 </div>
    363 </td>
    364 <td class="bg_01" align="center"><img src="./skin/dummy.gif" style="width:1px;height:1px;" class="dummy"></td>
    365 </tr>
    366 ({*********})-->
     271<tr>
     272<td class="bg_01" align="center"><img src="./skin/dummy.gif" style="width:1px;height:1px;" class="dummy"></td>
     273<td class="bg_05" align="center" valign="middle">
     274<div style="padding:4px 3px;">
     275
     276公開範囲
     277</div>
     278</td>
     279<td class="bg_01" align="center"><img src="./skin/dummy.gif" style="width:1px;height:1px;" class="dummy"></td>
     280<td class="bg_02" align="left" valign="middle">
     281<div style="padding:4px 3px;">
     282
     283<input type='radio' name='public_flag' value='public' checked class="no_bg">全体に公開<br>
     284<input type='radio' name='public_flag' value='group' class="no_bg">グループまで公開<br>
     285<input type='radio' name='public_flag' value='private' class="no_bg">公開しない<br>
     286
     287</div>
     288</td>
     289<td class="bg_01" align="center"><img src="./skin/dummy.gif" style="width:1px;height:1px;" class="dummy"></td>
     290</tr>
     291({*********})
    367292<tr>
    368293<td style="height:1px;" class="bg_01" colspan="5"><img src="./skin/dummy.gif" style="width:1px;height:1px;" class="dummy"></td>
  • OpenPNE/trunk/webapp_biz/modules/biz/templates/fh_biz_schedule_edit.tpl

    r1081 r1087  
    246246<td class="bg_01" colspan="5"><img src="./skin/dummy.gif" style="width:1px;height:1px;" class="dummy"></td>
    247247</tr>
    248 ({*********})
    249 
    250 ({*ここから:新規予定*})
    251 
    252 <tr>
    253 <td class="bg_01" align="center"><img src="./skin/dummy.gif" style="width:1px;height:1px;" class="dummy"></td>
    254 <td class="bg_05" align="center" valign="middle">
    255 <div style="padding:4px 3px;">
    256 参加者
    257 </div>
    258 </td>
    259 <td class="bg_01" align="center"><img src="./skin/dummy.gif" style="width:1px;height:1px;" class="dummy"></td>
    260 <td class="bg_02" align="left" valign="middle">
    261 
    262 <table border="0" cellspacing="0" cellpadding="0">
    263 <tr>
    264 ({foreach name=i from=$members item=item})
    265 ({if $item})
    266 <td class="padding_ss" style="width:33%;" valign="top">
    267 <input name='sc_j_mem[]' value='({$item.c_member_id})' type='checkbox' class='no_bg'({if $item.checkflag}) checked="checked"({/if})>({$item.nickname})
    268 </td>
    269 ({else})
    270 <td class="padding_ss" style="width:33%;">&nbsp;</td>
    271 ({/if})
    272 
    273 ({if $smarty.foreach.i.last && ($smarty.foreach.i.iteration%3==1 || $smarty.foreach.i.iteration%3==2)})
    274 <td class="padding_ss" style="width:33%;">&nbsp;</td>
    275 ({/if})
    276 ({if $smarty.foreach.i.last && $smarty.foreach.i.iteration%3==1 })
    277 <td class="padding_ss" style="width:33%;">&nbsp;</td>
    278 ({/if})
    279 ({if !$smarty.foreach.i.last && $smarty.foreach.i.iteration%3==0})
    280 </tr><tr>
    281 ({/if})
     248<tr>
     249<td style="width:1px;" class="bg_01"><img src="./skin/dummy.gif" style="width:1px; height:1px;" class="dummy"></td>
     250<td style="width:150px;" class="bg_05">
     251
     252<div class="padding_s" align="center">
     253
     254グループ
     255
     256</div>
     257
     258</td>
     259<td style="width:1px;" class="bg_01" align="center"><img src="./skin/dummy.gif" style="width:1px;height:1px;" class="dummy"></td>
     260<td style="width:412px;" class="bg_02">
     261
     262<table border="0" cellspacing="0" cellpadding="0" style="width:100%;">
     263<tr>
     264<td class="padding_ss">
     265<select name="biz_group_id">
     266        <option type="radio" value="0">指定なし
     267({foreach from=$biz_group_list item=biz_group})
     268        <option type="radio" value="({$biz_group.biz_group_id})"
     269        ({if $biz_group.biz_group_id == $target_biz_group_id})
     270         selected
     271        ({/if})
     272        >({$biz_group.name})
    282273({/foreach})
    283 </tr>
    284 </table>
    285 
    286 ({*ここまで:新規予定*})
    287 
     274</select>
     275</td>
     276</tr>
     277</table>
     278
     279</td>
     280<td style="width:1px;" class="bg_01"><img src="./skin/dummy.gif" style="width:1px; height:1px;" class="dummy"></td>
     281</tr>
     282({*********})
     283<tr>
     284<td style="height:1px;" class="bg_01" colspan="5"><img src="./skin/dummy.gif" style="width:1px;height:1px;" class="dummy"></td>
     285</tr>
     286({*********})
     287<tr>
     288<td class="bg_01" align="center"><img src="./skin/dummy.gif" style="width:1px;height:1px;" class="dummy"></td>
     289<td class="bg_05" align="center" valign="middle">
     290<div style="padding:4px 3px;">
     291
     292公開範囲
     293</div>
     294</td>
     295<td class="bg_01" align="center"><img src="./skin/dummy.gif" style="width:1px;height:1px;" class="dummy"></td>
     296<td class="bg_02" align="left" valign="middle">
     297<div style="padding:4px 3px;">
     298
     299<input type='radio' name='public_flag' value='public' ({if $public_flag == 'public'})checked({/if}) class="no_bg">全体に公開<br>
     300<input type='radio' name='public_flag' value='group' ({if $public_flag == 'group'})checked({/if}) class="no_bg">グループまで公開<br>
     301<input type='radio' name='public_flag' value='private' ({if $public_flag == 'private'})checked({/if}) class="no_bg">公開しない<br>
     302
     303</div>
    288304</td>
    289305<td class="bg_01" align="center"><img src="./skin/dummy.gif" style="width:1px;height:1px;" class="dummy"></td>
  • OpenPNE/trunk/webapp_biz/modules/biz/templates/fh_biz_schedule_view.tpl

    r1081 r1087  
    173173</tr>
    174174({*********})
    175 ({if $is_h})
    176 <tr>
    177 <td class="bg_01" align="center"><img src="./skin/dummy.gif" style="width:1px;height:1px;" class="dummy"></td>
    178 <td class="bg_05" align="center" valign="middle">
    179 <div style="padding:4px 3px;">
    180 
     175<tr>
     176<td class="bg_01" align="center"><img src="./skin/dummy.gif" style="width:1px;height:1px;" class="dummy"></td>
     177<td class="bg_05" align="center" valign="middle">
     178<div style="padding:4px 3px;">
     179({if $schedule.biz_group_id})
    181180登録者
     181({else})
     182参加者
     183({/if})
    182184</div>
    183185</td>
     
    197199</tr>
    198200({*********})
    199 ({/if})
    200 <tr>
    201 <td class="bg_01" align="center"><img src="./skin/dummy.gif" style="width:1px;height:1px;" class="dummy"></td>
    202 <td class="bg_05" align="center" valign="middle">
    203 <div style="padding:4px 3px;">
    204 
    205 参加者
    206 </div>
    207 </td>
    208 <td class="bg_01" align="center"><img src="./skin/dummy.gif" style="width:1px;height:1px;" class="dummy"></td>
    209 <td class="bg_02" align="left" valign="middle">
    210 <div style="padding:4px 3px;">
    211 
    212 ({foreach item=name key=id from=$jmembers})
    213         <a href="({t_url m=pc a=page_f_home})&amp;target_c_member_id=({$id})">({$name})</a>     <br>
    214 ({/foreach})
    215 
     201({if $schedule.biz_group_id})
     202<tr>
     203<td class="bg_01" align="center"><img src="./skin/dummy.gif" style="width:1px;height:1px;" class="dummy"></td>
     204<td class="bg_05" align="center" valign="middle">
     205<div style="padding:4px 3px;">
     206グループ
     207</div>
     208</td>
     209<td class="bg_01" align="center"><img src="./skin/dummy.gif" style="width:1px;height:1px;" class="dummy"></td>
     210<td class="bg_02" align="left" valign="middle">
     211<div style="padding:4px 3px;">
     212        <a href="({t_url m=biz a=page_g_home})&amp;target_c_commu_id=({$schedule.biz_group_id})">({$schedule.biz_group_name})</a><br>
     213</div>
     214</td>
     215<td class="bg_01" align="center"><img src="./skin/dummy.gif" style="width:1px;height:1px;" class="dummy"></td>
     216</tr>
     217({*********})
     218<tr>
     219<td style="height:1px;" class="bg_01" colspan="5"><img src="./skin/dummy.gif" style="width:1px;height:1px;" class="dummy"></td>
     220</tr>
     221({*********})
     222({/if})
     223({*********})
     224<tr>
     225<td class="bg_01" align="center"><img src="./skin/dummy.gif" style="width:1px;height:1px;" class="dummy"></td>
     226<td class="bg_05" align="center" valign="middle">
     227<div style="padding:4px 3px;">
     228公開範囲
     229</div>
     230</td>
     231<td class="bg_01" align="center"><img src="./skin/dummy.gif" style="width:1px;height:1px;" class="dummy"></td>
     232<td class="bg_02" align="left" valign="middle">
     233<div style="padding:4px 3px;">
     234({if $schedule.public_flag == "public"})
     235全員に公開
     236({elseif $schedule.public_flag == "group"})
     237グループまで公開
     238({elseif $schedule.public_flag == "private"})
     239公開しない
     240({/if})
    216241</div>
    217242</td>
  • OpenPNE/trunk/webapp_biz/modules/biz/templates/h_biz_group_delete.tpl

    r1081 r1087  
    4646<tr>
    4747
    48 ({t_form m=biz a=do_h_biz_delete_group})
     48({t_form m=biz a=do_h_biz_group_delete})
    4949<input type="hidden" name="sessid" value="({$PHPSESSID})">
    5050<input type="hidden" name="target_id" value="({$target_id})">
  • OpenPNE/trunk/webapp_biz/modules/biz/templates/h_biz_group_edit.tpl

    r1081 r1087  
    282282<td class="padding_s" style="text-align:left;">
    283283
    284 ({t_form _enctype=file m=biz a=do_h_biz_group_delete})
     284({t_form _enctype=file m=biz a=page_h_biz_group_delete})
    285285<input type="hidden" name="sessid" value="({$PHPSESSID})">
    286286<input name="target_id" type="hidden" value="({$group.biz_group_id})" />
  • OpenPNE/trunk/webapp_biz/modules/biz/validate/do/fh_biz_schedule_edit.ini

    r602 r1087  
    6464capiton = "メモ"
    6565
    66 [sc_j_mem]
     66[biz_group_id]
     67type="int"
     68default=0
     69
     70[public_flag]
    6771type= "string"
    68 is_array = 1
    69 required = 0
    70 capiton = "メンバー"
    71 
    72 [sc_j_plc]
    73 type= "string"
    74 is_array = 1
    75 required = 0
    76 capiton = "施設"
     72default="public"
    7773
    7874[sc_rwk]
  • OpenPNE/trunk/webapp_biz/modules/biz/validate/do/fhg_biz_schedule_add.ini

    r217 r1087  
    6464capiton = "メモ"
    6565
    66 [sc_j_mem]
     66[biz_group_id]
     67type="int"
     68default=0
     69
     70[public_flag]
    6771type= "string"
    68 is_array = 1
    69 required = 0
    70 capiton = "メンバー"
    71 
    72 [sc_j_plc]
    73 type= "string"
    74 is_array = 1
    75 required = 0
    76 capiton = "施設"
     72default="public"
    7773
    7874[sc_rwk]
  • OpenPNE/trunk/webapp_biz/modules/ktai_biz/page/fh_calendar_week.php

    r406 r1087  
    6262
    6363            //スケジュール
    64             $schedule = biz_getDateMemberSchedule($y,$m,$d,$target_id);
     64            $schedule = biz_getDateMemberSchedule($y,$m,$d,$target_id,$u);
    6565
    6666            $banner = biz_isBannerSchedule($y, $m, $d, $target_id);
  • OpenPNE/trunk/webapp_biz/modules/pc/page/f_home.php

    r312 r1087  
    9191        $this->set("todolist", $todolist);
    9292
    93         $this->set('calendar', biz_getScheduleWeek($target_c_member_id, $requests['w'], 'f', true, true, true, $target_c_member));
     93        $this->set('calendar', biz_getScheduleWeek($target_c_member_id, $u, $requests['w'], 'f', true, true, true, $target_c_member));
    9494
    9595        $group_list = biz_getHomeGroupList($target_c_member_id);
  • OpenPNE/trunk/webapp_biz/modules/pc/page/h_home.php

    r406 r1087  
    101101
    102102            //--- biz ここから
    103             $this->set('calendar_biz', biz_getScheduleWeek($u, $requests['w'], 'h', true, true, true, $c_member));
     103            $this->set('calendar_biz', biz_getScheduleWeek($u, $u, $requests['w'], 'h', true, true, true, $c_member));
    104104            //--- biz ここまで
    105105
  • OpenPNE/trunk/webapp_biz/modules/pc/page/h_prof.php

    r942 r1087  
    5353        include_once($biz_dir.'lib/smarty_functions.php');  //bizモジュールよりライブラリを拝借
    5454        include_once $biz_dir . 'lib/mysql_functions.php';  //bizモジュールよりライブラリを拝借
    55         $this->set('calendar', biz_getScheduleWeek($u, $requests['w'], 'p', true, true, true, $target_c_member));
     55        $this->set('calendar', biz_getScheduleWeek($u, $u, $requests['w'], 'p', true, true, true, $target_c_member));
    5656
    5757        $todolist = biz_getTodoList($u, "h", $target_c_member['nickname']);
Note: See TracChangeset for help on using the changeset viewer.