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

Changeset 959


Ignore:
Timestamp:
Nov 30, 2006, 4:27:04 PM (14 years ago)
Author:
ebihara
Message:

スケジュール表示に権限を追加

Location:
OpenPNE/branches/ebihara/dev_2_6
Files:
1 added
21 edited

Legend:

Unmodified
Added
Removed
  • OpenPNE/branches/ebihara/dev_2_6/webapp_biz/modules/biz/do/fh_biz_schedule_edit.php

    r602 r959  
    6363        //--------------------
    6464
    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 
    7665        if ($requests['sc_b_hour'] && !$requests['sc_b_minute']) {
    7766            $requests['sc_b_minute'] = '00';
     
    120109            $finish_date = date("Y-m-d", strtotime($requests['sc_b_year'].'-'.$requests['sc_b_month'].'-'.($requests['sc_b_date']+($requests['sc_bn']-1))));
    121110            //繰り返しをしない予定登録
    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']);
     111            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']);
    123112            $schedule_id = $requests['schedule_id'];
    124113        } else {
     
    149138               
    150139                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']);
     140                    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']);
    152141                }
    153142            }
     
    157146        $week = date("W", abs(strtotime($begin_date) - strtotime(date("Y-m-d")))) - 1;
    158147
    159         if (in_array($u,$requests['sc_j_mem'])) {
    160             $target_id = $u;
    161         } else {
    162             $target_id = $requests['sc_j_mem'][0];
    163         }
    164148        $p = array('w' => $week, 'msg' => '予定を編集しました。',
    165149                   'id' => $schedule_id, 'target_id'  => $target_id);
  • OpenPNE/branches/ebihara/dev_2_6/webapp_biz/modules/biz/do/fhg_biz_schedule_add.php

    r365 r959  
    6868        }
    6969        //--------------------
    70 
    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         }
    8070
    8171        if ($requests['sc_b_hour'] && !$requests['sc_b_minute']) {
     
    150140        if (!$requests['sc_rp']) {
    151141            //繰り返しをしない予定登録
    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']);
     142            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']);
    153143        } else {
    154144            //繰り返し予定
     
    159149                $tmp = date("Ymd", $nowday);
    160150                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']);
     151                    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']);
    162152                }
    163153            }
  • OpenPNE/branches/ebihara/dev_2_6/webapp_biz/modules/biz/do/g_home_add_biz_schedule.php

    r365 r959  
    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/branches/ebihara/dev_2_6/webapp_biz/modules/biz/do/h_home_add_biz_schedule.php

    r406 r959  
    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/branches/ebihara/dev_2_6/webapp_biz/modules/biz/lib/mysql_functions.php

    r824 r959  
    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
  • OpenPNE/branches/ebihara/dev_2_6/webapp_biz/modules/biz/lib/smarty_functions.php

    r406 r959  
    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/branches/ebihara/dev_2_6/webapp_biz/modules/biz/page/fh_biz_schedule_add.php

    r406 r959  
    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/branches/ebihara/dev_2_6/webapp_biz/modules/biz/page/fh_biz_schedule_calendar.php

    r406 r959  
    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/branches/ebihara/dev_2_6/webapp_biz/modules/biz/page/fh_biz_schedule_edit.php

    r406 r959  
    1616
    1717        $sessid = session_id();
     18
     19        $schedule = biz_getScheduleInfo($requests['schedule_id']);
    1820
    1921        if (empty($requests['target_id']) || ($requests['target_id'] == $u)) {
     
    160162        $this->set('is_rep', $is_rep);
    161163
    162         $j_members = array_keys(unserialize($requests['members']));
    163         sort($j_members);
    164 
    165         $this->set('j_members', $j_members);
    166 
    167164        $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);
    200165
    201166        $repeat_begin = biz_getRepeatBegin($requests['schedule_id']);
     
    208173        $this->set('repeat_term', intval($daycount));
    209174
     175        $biz_group_count = biz_getGroupCount($target_id);
     176        $biz_group_list = biz_getJoinGroupList($target_id, 1, $biz_group_count);
     177
     178        $this->set('biz_group_list', $biz_group_list[0]);
     179        $this->set('target_biz_group_id', $schedule['biz_group_id']);
     180
     181        $this->set('public_flag', $schedule['public_flag']);
     182
    210183        return 'success';
    211184    }
  • OpenPNE/branches/ebihara/dev_2_6/webapp_biz/modules/biz/page/fh_biz_schedule_view.php

    r602 r959  
    6767        $list['begin_time'] = substr($list['begin_time'], 0, 5);
    6868        $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'];
     69        if($list['biz_group_id']) {
     70                $biz_group = biz_getGroupData($list['biz_group_id']);
     71                $list['biz_group_name'] = $biz_group['name'];
    7372        }
    74         $jshisetsu = biz_getJoinShisetsuSchedule($requests['id']);
    7573
    7674        $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));
    8175        $this->set('schedule_id', $requests['id']);
    8276        $this->set('w', $requests['w']);
  • OpenPNE/branches/ebihara/dev_2_6/webapp_biz/modules/biz/page/g_home.php

    r406 r959  
    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/branches/ebihara/dev_2_6/webapp_biz/modules/biz/page/s_list.php

    r406 r959  
    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/branches/ebihara/dev_2_6/webapp_biz/modules/biz/templates/fh_biz_schedule_add.tpl

    r415 r959  
    257257<td class="bg_01" colspan="5"><img src="./skin/dummy.gif" style="width:1px;height:1px;" class="dummy"></td>
    258258</tr>
    259 <!--
    260 ({*********})
    261 <script type="text/javascript" src="./modules/biz/schedule_member_form.js"></script>
    262 <tr>
    263 <td class="bg_01" align="center"><img src="./skin/dummy.gif" style="width:1px;height:1px;" class="dummy"></td>
    264 <td class="bg_05" align="center" valign="middle">
    265 <div style="padding:4px 3px;">
    266 参加者<br>
    267 </div>
    268 </td>
    269 <td class="bg_01" align="center"><img src="./skin/dummy.gif" style="width:1px;height:1px;" class="dummy"></td>
    270 <td class="bg_02" align="left" valign="middle">
    271 <div style="padding:4px 3px;">
    272 
    273 <table name="join">
    274 <tr>
    275         <td>
    276                 <select id="groupSelect" onchange="">
    277                         <option value="0">(全員)</option>
    278                 </select>
    279         </td>
    280 </tr>
    281 <tr>
    282         <td>
    283                 <select name="sc_j_mem[]" size="5" multiple="multiple">
    284                 <option value='({$my_id})' selected>({$members[$my_id]})</option>
    285                 </select>
    286         </td>
    287         <td>
    288                 <input value="← 追加" onclick="addMember(this.form, 'members', 'sc_j_mem[]')" type="button" class="submit"><br>
    289                 <input value="削除 →" onclick="deleteMember(this.form, 'sc_j_mem[]')" type="button" class="submit">
    290         <td>
    291         <td>
    292                 <select name="members" size="5" multiple="multiple">
    293                         <option value='({$my_id})' selected>({$members[$my_id]})</option>
    294                 ({section name=i start=1 loop=$members})
    295                         ({if $smarty.section.i.index != $my_id})
    296                         <option value='({$smarty.section.i.index})' selected>({$members[i]})</option>
    297                         ({/if})
    298                 ({/section})
    299                 </select>
    300         </td>
    301 </tr>
    302 </table>-->
    303 <!--    <input name='sc_j_mem[]' value='({$my_id})' type='checkbox' class='no_bg' checked>({$members[$my_id]})<br>
    304         <input name='sc_j_mem[]' value='({$my_id})' type='checkbox' class='no_bg' checked>({$members[$my_id]})<br>
    305         ({section name=i start=1 loop=$members})
    306                 ({if $smarty.section.i.index != $my_id})
    307                 <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>
    308                 ({/if})
    309         ({/section})-->
    310 <!--</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 <tr>
    316 <td style="height:1px;" class="bg_01" colspan="5"><img src="./skin/dummy.gif" style="width:1px;height:1px;" class="dummy"></td>
    317 </tr>
    318 ({*********})-->
    319 
    320 ({*ここから:新規予定*})
    321 
    322259<tr>
    323260<td style="width:1px;" class="bg_01"><img src="./skin/dummy.gif" style="width:1px; height:1px;" class="dummy"></td>
     
    326263<div class="padding_s" align="center">
    327264
    328 参加者<br>※未選択は全員
     265グループ
    329266
    330267</div>
     
    336273<table border="0" cellspacing="0" cellpadding="0" style="width:100%;">
    337274<tr>
    338 ({foreach from=$members item=item name=mem})
    339 ({if $item})
    340 <td class="padding_ss" style="width:33%;" valign="top">
    341 
    342 <input name='sc_j_mem[]' value='({$item.c_member_id})' type='checkbox' class='no_bg'({if $item.checkflag}) checked="checked"({/if})>({$item.nickname})
    343 
    344 </td>
    345 ({else})
    346 <td class="padding_ss" style="width:33%;">&nbsp;</td>
    347 ({/if})
    348 
    349 
    350 ({if $smarty.foreach.mem.last && ($smarty.foreach.mem.iteration%3 == 1 || $smarty.foreach.mem.iteration%3 == 2)})<td>&nbsp;</td>({/if})
    351 
    352 ({if $smarty.foreach.mem.last && $smarty.foreach.mem.iteration%3 == 1})<td>&nbsp;</td>({/if})
    353 
    354 ({if !$smarty.foreach.mem.last && $smarty.foreach.mem.iteration%3 == 0})</tr><tr>({/if})
     275<td class="padding_ss">
     276<select name="biz_group_id">
     277        <option type="radio" value="0">指定なし
     278({foreach from=$biz_group_list item=biz_group})
     279        <option type="radio" value="({$biz_group.biz_group_id})">({$biz_group.name})
    355280({/foreach})
     281</select>
     282</td>
    356283</tr>
    357284</table>
     
    365292</tr>
    366293({*********})
    367 
    368 ({*ここまで:新規予定*})
    369 
    370 
    371 <!--
    372 <tr>
    373 <td class="bg_01" align="center"><img src="./skin/dummy.gif" style="width:1px;height:1px;" class="dummy"></td>
    374 <td class="bg_05" align="center" valign="middle">
    375 <div style="padding:4px 3px;">
    376 設備
    377 </div>
    378 </td>
    379 <td class="bg_01" align="center"><img src="./skin/dummy.gif" style="width:1px;height:1px;" class="dummy"></td>
    380 <td class="bg_02" align="left" valign="middle">
    381 <div style="padding:4px 3px;">
    382         ({foreach item=shisetsu name=i from=$shisetsu})
    383                 <input name='sc_j_plc[]' value='({$shisetsu.biz_shisetsu_id})' type='checkbox' class='no_bg'>({$shisetsu.name})<br>
    384         ({/foreach})
    385 </div>
    386 </td>
    387 <td class="bg_01" align="center"><img src="./skin/dummy.gif" style="width:1px;height:1px;" class="dummy"></td>
    388 </tr>
    389 ({*********})-->
     294<tr>
     295<td class="bg_01" align="center"><img src="./skin/dummy.gif" style="width:1px;height:1px;" class="dummy"></td>
     296<td class="bg_05" align="center" valign="middle">
     297<div style="padding:4px 3px;">
     298
     299公開範囲
     300</div>
     301</td>
     302<td class="bg_01" align="center"><img src="./skin/dummy.gif" style="width:1px;height:1px;" class="dummy"></td>
     303<td class="bg_02" align="left" valign="middle">
     304<div style="padding:4px 3px;">
     305
     306<input type='radio' name='public_flag' value='public' checked class="no_bg">全体に公開<br>
     307<input type='radio' name='public_flag' value='group' class="no_bg">グループまで公開<br>
     308<input type='radio' name='public_flag' value='private' class="no_bg">公開しない<br>
     309
     310</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({*********})
    390315<tr>
    391316<td style="height:1px;" class="bg_01" colspan="5"><img src="./skin/dummy.gif" style="width:1px;height:1px;" class="dummy"></td>
  • OpenPNE/branches/ebihara/dev_2_6/webapp_biz/modules/biz/templates/fh_biz_schedule_edit.tpl

    r602 r959  
    267267<td class="bg_01" colspan="5"><img src="./skin/dummy.gif" style="width:1px;height:1px;" class="dummy"></td>
    268268</tr>
    269 ({*********})
    270 
    271 ({*ここから:新規予定*})
    272 
    273 <tr>
    274 <td class="bg_01" align="center"><img src="./skin/dummy.gif" style="width:1px;height:1px;" class="dummy"></td>
    275 <td class="bg_05" align="center" valign="middle">
    276 <div style="padding:4px 3px;">
    277 参加者
    278 </div>
    279 </td>
    280 <td class="bg_01" align="center"><img src="./skin/dummy.gif" style="width:1px;height:1px;" class="dummy"></td>
    281 <td class="bg_02" align="left" valign="middle">
    282 
    283 <table border="0" cellspacing="0" cellpadding="0">
    284 <tr>
    285 ({foreach name=i from=$members item=item})
    286 ({if $item})
    287 <td class="padding_ss" style="width:33%;" valign="top">
    288 <input name='sc_j_mem[]' value='({$item.c_member_id})' type='checkbox' class='no_bg'({if $item.checkflag}) checked="checked"({/if})>({$item.nickname})
    289 </td>
    290 ({else})
    291 <td class="padding_ss" style="width:33%;">&nbsp;</td>
    292 ({/if})
    293 
    294 ({if $smarty.foreach.i.last && ($smarty.foreach.i.iteration%3==1 || $smarty.foreach.i.iteration%3==2)})
    295 <td class="padding_ss" style="width:33%;">&nbsp;</td>
    296 ({/if})
    297 ({if $smarty.foreach.i.last && $smarty.foreach.i.iteration%3==1 })
    298 <td class="padding_ss" style="width:33%;">&nbsp;</td>
    299 ({/if})
    300 ({if !$smarty.foreach.i.last && $smarty.foreach.i.iteration%3==0})
    301 </tr><tr>
    302 ({/if})
     269<tr>
     270<td style="width:1px;" class="bg_01"><img src="./skin/dummy.gif" style="width:1px; height:1px;" class="dummy"></td>
     271<td style="width:150px;" class="bg_05">
     272
     273<div class="padding_s" align="center">
     274
     275グループ
     276
     277</div>
     278
     279</td>
     280<td style="width:1px;" class="bg_01" align="center"><img src="./skin/dummy.gif" style="width:1px;height:1px;" class="dummy"></td>
     281<td style="width:412px;" class="bg_02">
     282
     283<table border="0" cellspacing="0" cellpadding="0" style="width:100%;">
     284<tr>
     285<td class="padding_ss">
     286<select name="biz_group_id">
     287        <option type="radio" value="0">指定なし
     288({foreach from=$biz_group_list item=biz_group})
     289        <option type="radio" value="({$biz_group.biz_group_id})"
     290        ({if $biz_group.biz_group_id == $target_biz_group_id})
     291         selected
     292        ({/if})
     293        >({$biz_group.name})
    303294({/foreach})
    304 </tr>
    305 </table>
    306 
    307 ({*ここまで:新規予定*})
    308 
     295</select>
     296</td>
     297</tr>
     298</table>
     299
     300</td>
     301<td style="width:1px;" class="bg_01"><img src="./skin/dummy.gif" style="width:1px; height:1px;" class="dummy"></td>
     302</tr>
     303({*********})
     304<tr>
     305<td style="height:1px;" class="bg_01" colspan="5"><img src="./skin/dummy.gif" style="width:1px;height:1px;" class="dummy"></td>
     306</tr>
     307({*********})
     308<tr>
     309<td class="bg_01" align="center"><img src="./skin/dummy.gif" style="width:1px;height:1px;" class="dummy"></td>
     310<td class="bg_05" align="center" valign="middle">
     311<div style="padding:4px 3px;">
     312
     313公開範囲
     314</div>
     315</td>
     316<td class="bg_01" align="center"><img src="./skin/dummy.gif" style="width:1px;height:1px;" class="dummy"></td>
     317<td class="bg_02" align="left" valign="middle">
     318<div style="padding:4px 3px;">
     319
     320<input type='radio' name='public_flag' value='public' ({if $public_flag == 'public'})checked({/if}) class="no_bg">全体に公開<br>
     321<input type='radio' name='public_flag' value='group' ({if $public_flag == 'group'})checked({/if}) class="no_bg">グループまで公開<br>
     322<input type='radio' name='public_flag' value='private' ({if $public_flag == 'private'})checked({/if}) class="no_bg">公開しない<br>
     323
     324</div>
    309325</td>
    310326<td class="bg_01" align="center"><img src="./skin/dummy.gif" style="width:1px;height:1px;" class="dummy"></td>
  • OpenPNE/branches/ebihara/dev_2_6/webapp_biz/modules/biz/templates/fh_biz_schedule_view.tpl

    r762 r959  
    197197</tr>
    198198({*********})
    199 ({if $is_h})
    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 
     199<tr>
     200<td class="bg_01" align="center"><img src="./skin/dummy.gif" style="width:1px;height:1px;" class="dummy"></td>
     201<td class="bg_05" align="center" valign="middle">
     202<div style="padding:4px 3px;">
     203({if $schedule.biz_group_id})
    205204登録者
     205({else})
     206参加者
     207({/if})
    206208</div>
    207209</td>
     
    221223</tr>
    222224({*********})
    223 ({/if})
    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 参加者
    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 
    236 ({foreach item=name key=id from=$jmembers})
    237         <a href="({t_url m=pc a=page_f_home})&amp;target_c_member_id=({$id})">({$name})</a>     <br>
    238 ({/foreach})
    239 
     225({if $schedule.biz_group_id})
     226<tr>
     227<td class="bg_01" align="center"><img src="./skin/dummy.gif" style="width:1px;height:1px;" class="dummy"></td>
     228<td class="bg_05" align="center" valign="middle">
     229<div style="padding:4px 3px;">
     230グループ
     231</div>
     232</td>
     233<td class="bg_01" align="center"><img src="./skin/dummy.gif" style="width:1px;height:1px;" class="dummy"></td>
     234<td class="bg_02" align="left" valign="middle">
     235<div style="padding:4px 3px;">
     236        <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>
     237</div>
     238</td>
     239<td class="bg_01" align="center"><img src="./skin/dummy.gif" style="width:1px;height:1px;" class="dummy"></td>
     240</tr>
     241({*********})
     242<tr>
     243<td style="height:1px;" class="bg_01" colspan="5"><img src="./skin/dummy.gif" style="width:1px;height:1px;" class="dummy"></td>
     244</tr>
     245({*********})
     246({/if})
     247({*********})
     248<tr>
     249<td class="bg_01" align="center"><img src="./skin/dummy.gif" style="width:1px;height:1px;" class="dummy"></td>
     250<td class="bg_05" align="center" valign="middle">
     251<div style="padding:4px 3px;">
     252公開範囲
     253</div>
     254</td>
     255<td class="bg_01" align="center"><img src="./skin/dummy.gif" style="width:1px;height:1px;" class="dummy"></td>
     256<td class="bg_02" align="left" valign="middle">
     257<div style="padding:4px 3px;">
     258({if $schedule.public_flag == "public"})
     259全員に公開
     260({elseif $schedule.public_flag == "group"})
     261グループまで公開
     262({elseif $schedule.public_flag == "private"})
     263公開しない
     264({/if})
    240265</div>
    241266</td>
  • OpenPNE/branches/ebihara/dev_2_6/webapp_biz/modules/biz/validate/do/fh_biz_schedule_edit.ini

    r602 r959  
    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/branches/ebihara/dev_2_6/webapp_biz/modules/biz/validate/do/fhg_biz_schedule_add.ini

    r217 r959  
    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/branches/ebihara/dev_2_6/webapp_biz/modules/ktai_biz/page/fh_calendar_week.php

    r406 r959  
    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/branches/ebihara/dev_2_6/webapp_biz/modules/pc/page/f_home.php

    r312 r959  
    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/branches/ebihara/dev_2_6/webapp_biz/modules/pc/page/h_home.php

    r406 r959  
    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/branches/ebihara/dev_2_6/webapp_biz/modules/pc/page/h_prof.php

    r406 r959  
    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.