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

Changeset 2816


Ignore:
Timestamp:
May 11, 2007, 11:17:28 PM (13 years ago)
Author:
ebihara
Message:

#707:r2284:2461をマージ

Location:
OpenPNE/branches/ebihara/prj_dev28x/webapp_biz/modules
Files:
19 edited

Legend:

Unmodified
Added
Removed
  • OpenPNE/branches/ebihara/prj_dev28x/webapp_biz/modules/biz/do/f_home_add_biz_schedule.php

    r2527 r2816  
    6868        }
    6969
    70         biz_insertSchedule($title, $u, $begin_date, $finish_date, $begin_time, $finish_time, '', 0, 0, 0, "public", $target_id);  //予定の登録
     70        $join_members = array($target_id);
     71        biz_insertSchedule($title, $u, $begin_date, $finish_date, $begin_time, $finish_time, '', 0, 0, 0, 'public', $join_members);  //予定の登録
    7172        $p = array('target_c_member_id' => $target_id);
    7273        openpne_redirect('pc', 'page_f_home', $p);
  • OpenPNE/branches/ebihara/prj_dev28x/webapp_biz/modules/biz/do/fh_biz_schedule_edit.php

    r1856 r2816  
    1616            handle_kengen_error();
    1717        }
    18 
     18        $schedule = biz_getScheduleInfo($requests['schedule_id']);
     19       
    1920        //ERROR----------------
    2021        //存在しない日付
     
    2223            $redirect_script = '?m=biz&a=page_fh_biz_schedule_edit';
    2324            $msg = '存在しない日付が指定されました。';
    24 
    25             $schedule = biz_getScheduleInfo($requests['schedule_id']);
    2625
    2726            $begin_date = $schedule['begin_date'];
     
    110109            exit();  //強制的にスクリプトを終了しなければいけない
    111110        }
    112 
     111       
     112        //施設、参加者のチェック
     113        if (in_array('0', $requests['sc_j_mem'])) {
     114            //「全員」が含まれている場合は、配列を空に
     115            $requests['sc_j_mem'] = array();
     116        }
     117       
    113118        if (!($requests['sc_b_hour'] || $requests['sc_b_minute'] || $requests['sc_f_hour'] || $requests['sc_f_minute'])) {
    114119            //時刻指定なし
     
    129134            $finish_date = date("Y-m-d", strtotime($requests['sc_b_year'].'-'.$requests['sc_b_month'].'-'.($requests['sc_b_date']+($requests['sc_bn']-1))));
    130135            //繰り返しをしない予定登録
    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']);
     136            biz_editSchedule($requests['sc_title'], $schedule['c_member_id'], $begin_date, $finish_date, $begin_time, $finish_time, $requests['sc_memo'], $rp_rule, 0, $requests['biz_group_id'], $requests['public_flag'], $requests['schedule_id'], $requests['sc_j_mem']);
    132137            $schedule_id = $requests['schedule_id'];
    133138        } else {
     
    158163               
    159164                if ($rp_rule & (1 << date("w", $nowday))) {
    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']);
     165                    biz_insertSchedule($requests['sc_title'], $schedule['c_member_id'], 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'], $requests['sc_j_mem']);
    161166                }
    162167            }
  • OpenPNE/branches/ebihara/prj_dev28x/webapp_biz/modules/biz/do/fhg_biz_schedule_add.php

    r2527 r2816  
    130130            exit();  //強制的にスクリプトを終了しなければいけない
    131131        }
     132        //参加者のチェック
     133        if (in_array('0', $requests['sc_j_mem'])) {
     134            //「全員」が含まれている場合は、配列を空に
     135            $requests['sc_j_mem'] = array();
     136        }
    132137
    133138        if (!$requests['sc_rp'] && ($requests['sc_bn'] == 1)) {
     
    146151        if ($requests['sc_rp']) {
    147152            //終了日の決定
    148             $finish_date = date("Y-m-d", strtotime($requests['sc_b_year'].'-'.$requests['sc_b_month'].'-'.($requests['sc_b_date']+($requests['sc_rcount'])*7)));
     153            $finish_date = date("Y-m-d", strtotime($requests['sc_b_year'].'-'.$requests['sc_b_month'].'-'.$requests['sc_b_date'].' + ' . ($requests['sc_rcount'])*7 . 'days'));
    149154
    150155            //first_idの決定
     
    165170        if (!$requests['sc_rp']) {
    166171            //繰り返しをしない予定登録
    167             biz_insertSchedule($requests['sc_title'], $u, $begin_date, $finish_date, $begin_time, $finish_time,
    168                 $requests['sc_memo'], $rp_rule, 0, $requests['biz_group_id'], $requests['public_flag'], $requests['target_c_member_id']);
     172            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'], $requests['sc_j_mem']);
    169173        } else {
    170174            //繰り返し予定
    171175            $tmp = $begin_date;  //処理中の日付
    172176
    173             for ($i=0; date("Ymd", strtotime($tmp)) < date("Ymd", strtotime($finish_date)); $i++) {
    174                 $nowday = strtotime($requests['sc_b_year'].'-'.$requests['sc_b_month'].'-'.($requests['sc_b_date']+$i));
    175                 $tmp = date("Ymd", $nowday);
     177            for ($i=0; strtotime($tmp) < strtotime($finish_date); $i++) {
     178                $nowday = strtotime($begin_date . ' + ' . $i . 'days');
     179                $tmp = date("Y-m-d", $nowday);
    176180                if ($rp_rule & (1 << date("w",$nowday))) {
    177                     biz_insertSchedule($requests['sc_title'], $u, $tmp, $tmp, $begin_time, $finish_time,
    178                         $requests['sc_memo'], $rp_rule, $first_id, $requests['biz_group_id'], $requests['public_flag'], $requests['target_c_member_id']);
     181                    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'], $requests['sc_j_mem']);
    179182                }
    180183            }
  • OpenPNE/branches/ebihara/prj_dev28x/webapp_biz/modules/biz/do/g_home_add_biz_schedule.php

    r1856 r2816  
    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        }
    3843        if (empty($text)) {
    3944            $p = array('target_c_commu_id' => $target_id, 'msg' => 'タイトルを入力してください。');
     
    4247        }
    4348
    44         biz_insertSchedule($title, $u, $begin_date, $finish_date, $begin_time, $finish_time, '', 0, 0, $target_id, 'group');  //予定の登録
     49        biz_insertSchedule($title, $u, $begin_date, $finish_date, $begin_time, $finish_time, '', 0, 0, $target_id, 'group', $members_id);  //予定の登録
    4550        biz_readSchedule($u, biz_getScheduleMax());  //既読済みに
    4651
  • OpenPNE/branches/ebihara/prj_dev28x/webapp_biz/modules/biz/do/h_home_add_biz_schedule.php

    r1856 r2816  
    6262        }
    6363
    64         biz_insertSchedule($title, $u, $begin_date, $finish_date, $begin_time, $finish_time, '', 0, 0);  //予定の登録
     64        $join_members = array($u);
     65        biz_insertSchedule($title, $u, $begin_date, $finish_date, $begin_time, $finish_time, '', 0, 0, 0, 'public', $join_members);  //予定の登録
    6566        biz_readSchedule($u, biz_getScheduleMax());  //既読に
    6667
  • OpenPNE/branches/ebihara/prj_dev28x/webapp_biz/modules/biz/lib/mysql_functions.php

    r2718 r2816  
    186186        $biz_schedule_member_id_list = db_get_col($sql, array(intval($biz_schedule_id)));
    187187
     188        // スケジュールに参加しているメンバー
     189        $members = biz_getJoinIdSchedule($biz_schedule_id);
    188190        if (biz_isPermissionSchedule($u, $biz_schedule_id)) {
    189             if (in_array($target_c_member_id, $biz_schedule_member_id_list)) {
    190                 $contain[] = $biz_schedule_id;
    191             } elseif(in_array($biz_schedule['biz_group_id'], $biz_group_id_list) && ($value['public_flag'] != 'private')) {
    192                 $contain[] = $biz_schedule_id;
    193             } elseif (empty($biz_schedule_member_id_list) && !$biz_schedule['biz_group_id'] && ($biz_schedule['c_member_id'] == $u)) {
     191            if (in_array($target_c_member_id, $members)) {
    194192                $contain[] = $biz_schedule_id;
    195193            }
     
    845843
    846844//スケジュール登録
    847 function biz_insertSchedule($title, $c_member_id, $begin_date, $finish_date, $begin_time = null, $finish_time = null,
    848     $value = '', $rep_type, $first_id = 0, $biz_group_id = 0,
    849     $public_flag = "public", $target_c_member_id = null)
     845function biz_insertSchedule($title, $member_id, $begin_date, $finish_date, $begin_time = null, $finish_time = null,
     846                                                        $value = '', $rep_type, $first_id = 0,
     847                                                        $biz_group_id = 0, $public_flag = "public", $join_members = array())
    850848{
    851849    //登録値のセット、チェック
     
    872870        'public_flag' => $public_flag,
    873871    );
    874     $biz_schedule_id = db_insert('biz_schedule', $data);
    875 
    876     if (!$biz_group_id) {  //個人の予定
    877         if (is_null($target_c_member_id)) {  //作成者自身の予定
    878             $target_c_member_id = $c_member_id;
    879         }
    880 
    881         $param = array(
    882             'biz_schedule_id' => $biz_schedule_id,
    883             'c_member_id' => $target_c_member_id,
    884             'is_read' => 1
    885         );
    886         db_insert('biz_schedule_member', $param);
     872    $new_schedule_id = db_insert('biz_schedule', $data);
     873
     874    // 参加者が指定されていない場合は、c_memberすべてが予定の参加者に
     875    if (empty($join_members)) {
     876        $sql = 'SELECT c_member_id FROM c_member';
     877        $join_members = db_get_col($sql);
     878    }
     879    foreach ($join_members as $value) {
     880        $data = array(
     881            'c_member_id' => $value,
     882            'biz_schedule_id' => $new_schedule_id,
     883            'is_read' => 0,
     884        );
     885        db_insert('biz_schedule_member', $data);
    887886    }
    888887}
     
    927926                                                    $value = '', $rep_type, $first_id = 0,
    928927                                                    $biz_group_id = 0, $public_flag = "public",
    929                                                     $id)
     928                                                    $id, $join_members = array())
    930929{
    931930    $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` = ?';
     
    945944    );
    946945    db_query($sql, $params);
     946   
     947    $sql = 'DELETE FROM `biz_schedule_member` WHERE `biz_schedule_id` = ?';
     948    $params = array(
     949        intval($id),
     950    );
     951    db_query($sql, $params);
     952
     953    foreach ($join_members as $value) {
     954        $data = array(
     955            'c_member_id' => $value,
     956            'biz_schedule_id' => intval($id),
     957            'is_read' => 0,
     958        );
     959       
     960        db_insert('biz_schedule_member', $data);
     961    }
    947962}
    948963
  • OpenPNE/branches/ebihara/prj_dev28x/webapp_biz/modules/biz/page/fh_biz_schedule_add.php

    r2527 r2816  
    133133        $this->set('target_c_member_id', $target_id);
    134134
     135        // グループのメンバーリストを取得
     136        $biz_group_member_list = biz_getGroupMember($form_val['biz_group_id']);
     137        $biz_group_member_id_list = array();
     138        foreach ($biz_group_member_list as $biz_group_member) {
     139            $biz_group_member_id_list[] = $biz_group_member['c_member_id'];
     140        }
     141
     142        //追加
     143        $members = array();
     144
     145        $sql = 'SELECT c_member_id, nickname FROM c_member WHERE c_member_id != '.$target_id;
     146        $members = db_get_all($sql);
     147
     148        $sql = 'SELECT c_member_id, nickname FROM c_member WHERE c_member_id = '.$target_id;
     149        $my_info = db_get_row($sql);
     150       
     151        array_unshift($members, $my_info);
     152
     153        $members[0]['checkflag'] = 1;
     154
     155        $jmembers = unserialize($requests['sc_j_mem_enc']);
     156
     157        $i = 0;
     158
     159        if (empty($jmembers)) {
     160            foreach ($members as $key => $value) {
     161                if (in_array($value['c_member_id'], $biz_group_member_id_list)) {
     162                    $members[$key]['checkflag'] = 1;
     163                }
     164            }
     165        } else {
     166            foreach ($members as $key => $value) {
     167                if ($jmembers[$i] == $value['c_member_id']) {
     168                    $members[$key]['checkflag'] = 1;
     169                    $i++;
     170                }
     171
     172                if (count($jmembers) < $i) {
     173                    break;
     174                }
     175            }
     176        }
     177        $this->set('members', $members);
     178       
    135179        return 'success';
    136180    }
  • OpenPNE/branches/ebihara/prj_dev28x/webapp_biz/modules/biz/page/fh_biz_schedule_edit.php

    r1856 r2816  
    2323        $schedule = biz_getScheduleInfo($requests['schedule_id']);
    2424
    25         if (empty($requests['target_id']) || ($requests['target_id'] == $u)) {
     25        if ($schedule['c_member_id'] == $u) {
    2626            //自分自身
    2727            $target_id = $u;
     
    184184
    185185        $this->set('public_flag', $schedule['public_flag']);
     186       
     187        //追加
     188        if ($requests['members']) {
     189            $j_members = array_keys(unserialize($requests['members']));
     190            sort($j_members);
     191        } else {
     192                $j_members = biz_getJoinMemberSchedule($requests['schedule_id']);
     193        }
     194        $this->set('j_members', $j_members);
     195        $members = array();
     196
     197        $sql = 'SELECT c_member_id, nickname FROM c_member';
     198        $members = db_get_all($sql, $params);
     199        $i = 0;
     200        foreach ($members as $key => $value) {
     201            if (in_array($value['c_member_id'], $j_members)) {
     202                $members[$key]['checkflag'] = 1;
     203                $i++;
     204            }
     205
     206            if (count($j_members) < $i) {
     207                break;
     208            }
     209        }
     210       
     211        $this->set('members', $members);
    186212
    187213        return 'success';
  • OpenPNE/branches/ebihara/prj_dev28x/webapp_biz/modules/biz/page/fh_biz_schedule_view.php

    r2527 r2816  
    7171        $list['begin_time'] = substr($list['begin_time'], 0, 5);
    7272        $list['finish_time'] = substr($list['finish_time'], 0, 5);
    73         if($list['biz_group_id']) {
    74                 $biz_group = biz_getGroupData($list['biz_group_id']);
    75                 $list['biz_group_name'] = $biz_group['name'];
     73
     74        $jmembers = biz_getJoinMemberSchedule($requests['id']);
     75        if (array_search($target_member['nickname'], $jmembers)) {
     76            $jmembers[$target_member['c_member_id']] = $target_member['nickname'];
    7677        } else {
    7778            $list['target_c_member_nickname'] = biz_getMemberNickname($requests['target_id']);
    7879        }
     80        $this->set('jmembers', $jmembers);
    7981
    8082        $this->set('schedule', $list);
     83        $this->set('jmembers', $jmembers);
     84        $this->set('jmembers_enc', serialize($jmembers));
     85
    8186        $this->set('schedule_id', $requests['id']);
    8287        $this->set('w', $requests['w']);
  • OpenPNE/branches/ebihara/prj_dev28x/webapp_biz/modules/biz/templates/fh_biz_schedule_add.tpl

    r2746 r2816  
    235235<td class="bg_01" colspan="5"><img src="./skin/dummy.gif" style="width:1px;height:1px;" class="dummy"></td>
    236236</tr>
     237<input type="hidden" name="biz_group_id" value="0">
     238({*
    237239<tr>
    238240<td style="width:1px;" class="bg_01"><img src="./skin/dummy.gif" style="width:1px; height:1px;" class="dummy"></td>
     
    265267<td style="width:1px;" class="bg_01"><img src="./skin/dummy.gif" style="width:1px; height:1px;" class="dummy"></td>
    266268</tr>
    267 ({*********})
    268 <tr>
    269 <td style="height:1px;" class="bg_01" colspan="5"><img src="./skin/dummy.gif" style="width:1px;height:1px;" class="dummy"></td>
    270 </tr>
    271 ({*********})
     269*})
     270({*********})
     271({*
     272<tr>
     273<td style="height:1px;" class="bg_01" colspan="5"><img src="./skin/dummy.gif" style="width:1px;height:1px;" class="dummy"></td>
     274</tr>
     275*})
     276({*********})
     277<input type="hidden" name="public_flag" value="public">
     278({*
    272279<tr>
    273280<td class="bg_01" align="center"><img src="./skin/dummy.gif" style="width:1px;height:1px;" class="dummy"></td>
     
    290297<td class="bg_01" align="center"><img src="./skin/dummy.gif" style="width:1px;height:1px;" class="dummy"></td>
    291298</tr>
    292 ({*********})
    293 <tr>
    294 <td style="height:1px;" class="bg_01" colspan="5"><img src="./skin/dummy.gif" style="width:1px;height:1px;" class="dummy"></td>
    295 </tr>
    296 ({*********})
     299*})
     300({*********})
     301({*
     302<tr>
     303<td style="height:1px;" class="bg_01" colspan="5"><img src="./skin/dummy.gif" style="width:1px;height:1px;" class="dummy"></td>
     304</tr>
     305*})
     306({*********})
     307<tr>
     308<td style="width:1px;" class="bg_01"><img src="./skin/dummy.gif" style="width:1px; height:1px;" class="dummy"></td>
     309<td style="width:150px;" class="bg_05">
     310
     311<div class="padding_s" align="center">
     312
     313参加者<br>※未選択は全員
     314
     315</div>
     316
     317</td>
     318<td style="width:1px;" class="bg_01" align="center"><img src="./skin/dummy.gif" style="width:1px;height:1px;" class="dummy"></td>
     319<td style="width:412px;" class="bg_02">
     320
     321<table border="0" cellspacing="0" cellpadding="0" style="width:100%;">
     322<tr>
     323({foreach from=$members item=item name=mem})
     324({if $item})
     325<td class="padding_ss" style="width:33%;" valign="top">
     326
     327<input name='sc_j_mem[]' value='({$item.c_member_id})' type='checkbox' class='no_bg'({if $item.checkflag}) checked="checked"({/if})>({$item.nickname})
     328
     329</td>
     330({else})
     331<td class="padding_ss" style="width:33%;">&nbsp;</td>
     332({/if})
     333
     334
     335({if $smarty.foreach.mem.last && ($smarty.foreach.mem.iteration%3 == 1 || $smarty.foreach.mem.iteration%3 == 2)})<td>&nbsp;</td>({/if})
     336
     337({if $smarty.foreach.mem.last && $smarty.foreach.mem.iteration%3 == 1})<td>&nbsp;</td>({/if})
     338
     339({if !$smarty.foreach.mem.last && $smarty.foreach.mem.iteration%3 == 0})</tr><tr>({/if})
     340({/foreach})
     341</tr>
     342</table>
     343
     344</td>
     345<td style="width:1px;" class="bg_01"><img src="./skin/dummy.gif" style="width:1px; height:1px;" class="dummy"></td>
     346</tr>
     347({*********})
     348<tr>
     349<td style="height:1px;" class="bg_01" colspan="5"><img src="./skin/dummy.gif" style="width:1px;height:1px;" class="dummy"></td>
     350</tr>
     351({*********})
     352
    297353<tr>
    298354<td class="bg_01" align="center"><img src="./skin/dummy.gif" style="width:1px;height:1px;" class="dummy"></td>
  • OpenPNE/branches/ebihara/prj_dev28x/webapp_biz/modules/biz/templates/fh_biz_schedule_edit.tpl

    r2746 r2816  
    246246<td class="bg_01" colspan="5"><img src="./skin/dummy.gif" style="width:1px;height:1px;" class="dummy"></td>
    247247</tr>
     248<input type="hidden" name="biz_group_id" value="0">
     249({*
    248250<tr>
    249251<td style="width:1px;" class="bg_01"><img src="./skin/dummy.gif" style="width:1px; height:1px;" class="dummy"></td>
     
    280282<td style="width:1px;" class="bg_01"><img src="./skin/dummy.gif" style="width:1px; height:1px;" class="dummy"></td>
    281283</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 ({*********})
     284*})
     285({*********})
     286({*
     287<tr>
     288<td style="height:1px;" class="bg_01" colspan="5"><img src="./skin/dummy.gif" style="width:1px;height:1px;" class="dummy"></td>
     289</tr>
     290*})
     291({*********})
     292<input type="hidden" name="public_flag" value="public">
     293({*
    287294<tr>
    288295<td class="bg_01" align="center"><img src="./skin/dummy.gif" style="width:1px;height:1px;" class="dummy"></td>
     
    302309
    303310</div>
     311</td>
     312<td class="bg_01" align="center"><img src="./skin/dummy.gif" style="width:1px;height:1px;" class="dummy"></td>
     313</tr>
     314*})
     315({*********})
     316({*
     317<tr>
     318<td style="height:1px;" class="bg_01" colspan="5"><img src="./skin/dummy.gif" style="width:1px;height:1px;" class="dummy"></td>
     319</tr>
     320*})
     321({*********})
     322<tr>
     323<td class="bg_01" align="center"><img src="./skin/dummy.gif" style="width:1px;height:1px;" class="dummy"></td>
     324<td class="bg_05" align="center" valign="middle">
     325<div style="padding:4px 3px;">
     326参加者
     327</div>
     328</td>
     329<td class="bg_01" align="center"><img src="./skin/dummy.gif" style="width:1px;height:1px;" class="dummy"></td>
     330<td class="bg_02" align="left" valign="middle">
     331
     332<table border="0" cellspacing="0" cellpadding="0">
     333<tr>
     334({foreach name=i from=$members item=item})
     335({if $item})
     336<td class="padding_ss" style="width:33%;" valign="top">
     337<input name='sc_j_mem[]' value='({$item.c_member_id})' type='checkbox' class='no_bg'({if $item.checkflag}) checked="checked"({/if})>({$item.nickname})
     338</td>
     339({else})
     340<td class="padding_ss" style="width:33%;">&nbsp;</td>
     341({/if})
     342
     343({if $smarty.foreach.i.last && ($smarty.foreach.i.iteration%3==1 || $smarty.foreach.i.iteration%3==2)})
     344<td class="padding_ss" style="width:33%;">&nbsp;</td>
     345({/if})
     346({if $smarty.foreach.i.last && $smarty.foreach.i.iteration%3==1 })
     347<td class="padding_ss" style="width:33%;">&nbsp;</td>
     348({/if})
     349({if !$smarty.foreach.i.last && $smarty.foreach.i.iteration%3==0})
     350</tr><tr>
     351({/if})
     352({/foreach})
     353</tr>
     354</table>
     355
     356({*ここまで:新規予定*})
     357
    304358</td>
    305359<td class="bg_01" align="center"><img src="./skin/dummy.gif" style="width:1px;height:1px;" class="dummy"></td>
  • OpenPNE/branches/ebihara/prj_dev28x/webapp_biz/modules/biz/templates/fh_biz_schedule_view.tpl

    r2527 r2816  
    173173</tr>
    174174({*********})
    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;">
     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
    179181登録者
    180182</div>
     
    193195</tr>
    194196({*********})
    195 <tr>
    196 <td class="bg_01" align="center"><img src="./skin/dummy.gif" style="width:1px;height:1px;" class="dummy"></td>
    197 <td class="bg_05" align="center" valign="middle">
    198 <div style="padding:4px 3px;">
    199 ({if $schedule.biz_group_id})
    200 グループ
    201 ({else})
    202 参加者
    203 ({/if})
    204 </div>
    205 </td>
    206 <td class="bg_01" align="center"><img src="./skin/dummy.gif" style="width:1px;height:1px;" class="dummy"></td>
    207 <td class="bg_02" align="left" valign="middle">
    208 <div style="padding:4px 3px;">
    209 ({if $schedule.biz_group_id})
    210         <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>
    211 ({elseif $target_c_member_id})
    212         <a href="({t_url m=pc a=page_f_home})&amp;target_c_member_id=({$target_c_member_id})">({$schedule.target_c_member_nickname})</a>        <br>
    213 ({else})
    214         <a href="({t_url m=pc a=page_f_home})&amp;target_c_member_id=({$schedule.c_member_id})">({$schedule.writer_name})</a>   <br>
    215 ({/if})
    216 </div>
    217 </td>
    218 <td class="bg_01" align="center"><img src="./skin/dummy.gif" style="width:1px;height:1px;" class="dummy"></td>
    219 </tr>
    220 ({*********})
    221 <tr>
    222 <td style="height:1px;" class="bg_01" colspan="5"><img src="./skin/dummy.gif" style="width:1px;height:1px;" class="dummy"></td>
    223 </tr>
    224 ({*********})
    225 <tr>
    226 <td class="bg_01" align="center"><img src="./skin/dummy.gif" style="width:1px;height:1px;" class="dummy"></td>
    227 <td class="bg_05" align="center" valign="middle">
    228 <div style="padding:4px 3px;">
    229 公開範囲
    230 </div>
    231 </td>
    232 <td class="bg_01" align="center"><img src="./skin/dummy.gif" style="width:1px;height:1px;" class="dummy"></td>
    233 <td class="bg_02" align="left" valign="middle">
    234 <div style="padding:4px 3px;">
    235 ({if $schedule.public_flag == "public"})
    236 全員に公開
    237 ({elseif $schedule.public_flag == "group"})
    238 グループまで公開
    239 ({elseif $schedule.public_flag == "private"})
    240 公開しない
    241 ({/if})
     197({/if})
     198<tr>
     199<td class="bg_01" align="center"><img src="./skin/dummy.gif" style="width:1px;height:1px;" class="dummy"></td>
     200<td class="bg_05" align="center" valign="middle">
     201<div style="padding:4px 3px;">
     202
     203蜿ょ刈閠
     204</div>
     205</td>
     206<td class="bg_01" align="center"><img src="./skin/dummy.gif" style="width:1px;height:1px;" class="dummy"></td>
     207<td class="bg_02" align="left" valign="middle">
     208<div style="padding:4px 3px;">
     209
     210({foreach item=name key=id from=$jmembers})
     211        <a href="({t_url m=pc a=page_f_home})&amp;target_c_member_id=({$id})">({$name})</a>     <br>
     212({/foreach})
     213
    242214</div>
    243215</td>
     
    297269</td>
    298270</tr>
     271
    299272({if $schedule.rep_first})
    300273<tr>
  • OpenPNE/branches/ebihara/prj_dev28x/webapp_biz/modules/biz/validate/do/fh_biz_schedule_edit.ini

    r1477 r2816  
    9898[target_id]
    9999type="int"
     100
     101[sc_j_mem]
     102type= "string"
     103is_array = 1
     104required = 0
     105capiton = "メンバー"
  • OpenPNE/branches/ebihara/prj_dev28x/webapp_biz/modules/biz/validate/do/fhg_biz_schedule_add.ini

    r2527 r2816  
    8888caption = 'バナー予定かどうか'
    8989
    90 [target_c_member_id]
    91 type="int"
     90[sc_j_mem]
     91type= "string"
     92is_array = 1
    9293required = 0
    93 caption = '予定参加者'
     94capiton = "メンバー"
     95
  • OpenPNE/branches/ebihara/prj_dev28x/webapp_biz/modules/ktai_biz/do/fh_biz_schedule_edit.php

    r1856 r2816  
    1515            handle_kengen_error();
    1616        }
     17        $schedule = biz_getScheduleInfo($requests['schedule_id']);
     18        echo 1;
     19        print_r($schedule);
     20        exit;
    1721       
    1822        //ERROR----------------
     
    132136        $schedule_id = '';
    133137
    134         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['public_flag'], $requests['schedule_id']);
     138        biz_editSchedule($requests['sc_title'], $schedule['c_member_id'], $begin_date, $finish_date, $begin_time, $finish_time, $requests['sc_memo'], $rp_rule, 0, $requests['sc_j_mem'], $requests['public_flag'], $requests['schedule_id']);
    135139        $schedule_id = $requests['schedule_id'];
    136140
  • OpenPNE/branches/ebihara/prj_dev28x/webapp_biz/modules/ktai_biz/do/fhg_biz_schedule_add.php

    r1856 r2816  
    1515        if (!$requests['target_id']) {
    1616            $requests['target_id'] = $u;
     17        }
     18       
     19        $requests['sc_b_year'] = $requests['sc_b_year'] + 2000;
     20
     21        $biz_schedule_member = array();
     22 
     23        // 自分の予定の場合は自分のみを参加者とする
     24        if ($requests['sc_j_mem'] == 'my') {
     25            $biz_schedule_member = array($requests['target_id']);
    1726        }
    1827
     
    135144        if (!$requests['sc_rp']) {
    136145            //繰り返しをしない予定登録
    137             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']);
     146            biz_insertSchedule($requests['sc_title'], $requests['target_id'], $begin_date, $finish_date, $begin_time, $finish_time, $requests['sc_memo'], $rp_rule, 0, $requests['biz_group_id'], $requests['public_flag'], $biz_schedule_member);
    138147        } else {
    139148            //繰り返し予定
     
    144153                $tmp = date("Ymd", $nowday);
    145154                if ($rp_rule & (1 << date("w",$nowday))) {
    146                     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']);
     155                    biz_insertSchedule($requests['sc_title'], $requests['target_id'], $tmp, $tmp, $begin_time, $finish_time, $requests['sc_memo'], $rp_rule, $first_id, $requests['biz_group_id'], $requests['public_flag'], $biz_schedule_member);
    147156                }
    148157            }
  • OpenPNE/branches/ebihara/prj_dev28x/webapp_biz/modules/ktai_biz/templates/fh_biz_schedule_add.tpl

    r2694 r2816  
    2121タイトル:<input type="text" name='sc_title' size="30"><br>
    2222
     23<input type="hidden" name="biz_group_id" value="0">
     24<input type="hidden" name="public_flag" value="public">
     25参加者:<select name='sc_j_mem'>
     26                <option value="my">({if $is_f})フレンド({else})自分({/if})のみ</option>
     27                <option value="">全ユーザー</option>
     28                ({foreach item=nm from=$jgroup name=join})
     29                <option value="({$nm.biz_group_id})">({$nm.name})
     30                ({/foreach})
     31               
     32                </select><br>
     33({*
    2334グループ:<select name="biz_group_id">
    2435        <option value="0">指定なし
     
    3243<input type='radio' name='public_flag' value='private'>公開しない<br><br>
    3344<center>
     45*})
    3446
    3547
  • OpenPNE/branches/ebihara/prj_dev28x/webapp_biz/modules/ktai_biz/templates/fh_biz_schedule_edit.tpl

    r1801 r2816  
    2929詳細:({$value})<br>
    3030登録者:({$writer})<br>
     31<input type="hidden" name="biz_group_id" value="0">
     32<input type="hidden" name="public_flag" value="public">
     33({*
    3134公開範囲:<br>
    3235<input type='radio' name='public_flag' value='public' ({if $public_flag == 'public'})checked({/if})>全体に公開<br>
     
    3437<input type='radio' name='public_flag' value='private' ({if $public_flag == 'private'})checked({/if})>公開しない<br>
    3538<br>
     39*})
    3640参加者:
    3741        ({foreach item=name key=id from=$member})
  • OpenPNE/branches/ebihara/prj_dev28x/webapp_biz/modules/ktai_biz/validate/do/fhg_biz_schedule_add.ini

    r1801 r2816  
    5252type="string"
    5353requeired = 1
     54
     55[sc_j_mem]
     56type= "string"
     57required = 0
     58capiton = "メンバー"
Note: See TracChangeset for help on using the changeset viewer.