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

Changeset 2077


Ignore:
Timestamp:
Mar 13, 2007, 4:37:13 PM (13 years ago)
Author:
takanashi
Message:

#504 BIZのスケジュールで、個人の予定を登録した際に予定参加者と予定登録者を分けていなかった問題への暫定的対処(r1980/r1994)

Location:
OpenPNE/branches/2_6
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • OpenPNE/branches/2_6/config.php.sample

    r1380 r2077  
    299299
    300300// アップロード画像の大きさ制限(ピクセル)
    301 define('IMAGE_MAX_HEIGHT', 1024);
    302 define('IMAGE_MAX_WIDTH', 768);
     301define('IMAGE_MAX_WIDTH', 1024);
     302define('IMAGE_MAX_HEIGHT', 768);
    303303
    304304
  • OpenPNE/branches/2_6/webapp_biz/modules/biz/do/f_home_add_biz_schedule.php

    r1381 r2077  
    6868        }
    6969
    70         biz_insertSchedule($title, $u, $begin_date, $finish_date, $begin_time, $finish_time, '', 0, 0, array($target_id));  //予定の登録
     70        biz_insertSchedule($title, $u, $begin_date, $finish_date, $begin_time, $finish_time, '', 0, 0, 0, "public", $target_id);  //予定の登録
    7171        $p = array('target_c_member_id' => $target_id);
    7272        openpne_redirect('pc', 'page_f_home', $p);
  • OpenPNE/branches/2_6/webapp_biz/modules/biz/do/fhg_biz_schedule_add.php

    r1087 r2077  
    165165        if (!$requests['sc_rp']) {
    166166            //繰り返しをしない予定登録
    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']);
     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']);
    168169        } else {
    169170            //繰り返し予定
     
    174175                $tmp = date("Ymd", $nowday);
    175176                if ($rp_rule & (1 << date("w",$nowday))) {
    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']);
     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']);
    177179                }
    178180            }
  • OpenPNE/branches/2_6/webapp_biz/modules/biz/lib/mysql_functions.php

    r1598 r2077  
    183183    foreach ($tmp as $biz_schedule_id) {
    184184        $biz_schedule = biz_getScheduleInfo($biz_schedule_id);
     185        $sql = 'SELECT c_member_id FROM biz_schedule_member WHERE biz_schedule_id = ?';
     186        $biz_schedule_member_id_list = db_get_col($sql, array(intval($biz_schedule_id)));
    185187
    186188        if (biz_isPermissionSchedule($u, $biz_schedule_id)) {
    187                 if ($biz_schedule['c_member_id'] == $target_c_member_id) {
     189                if (in_array($target_c_member_id, $biz_schedule_member_id_list)) {
    188190                    $contain[] = $biz_schedule_id;
    189191                } elseif(in_array($biz_schedule['biz_group_id'], $biz_group_id_list) && ($value['public_flag'] != 'private')) {
    190192                    $contain[] = $biz_schedule_id;
    191                 }
     193                } elseif (empty($biz_schedule_member_id_list) && !$biz_schedule['biz_group_id']) {
     194                $contain[] = $biz_schedule_id;
     195            }
    192196        }
    193197    }
     
    809813
    810814//スケジュール登録
    811 function biz_insertSchedule($title, $member_id, $begin_date, $finish_date, $begin_time = null, $finish_time = null,
    812                                                         $value = '', $rep_type, $first_id = 0,
    813                                                         $biz_group_id = 0, $public_flag = "public")
     815function biz_insertSchedule($title, $c_member_id, $begin_date, $finish_date, $begin_time = null, $finish_time = null,
     816    $value = '', $rep_type, $first_id = 0, $biz_group_id = 0,
     817    $public_flag = "public", $target_c_member_id = null)
    814818{
    815819    //登録値のセット、チェック
     
    825829    $data = array(
    826830        'title' => $title,
    827         'c_member_id' => intval($member_id),
     831        'c_member_id' => intval($c_member_id),
    828832        'begin_date' => $begin_date,
    829833        'finish_date' => $finish_date,
     
    836840        'public_flag' => $public_flag,
    837841    );
    838     db_insert('biz_schedule', $data);
     842    $biz_schedule_id = db_insert('biz_schedule', $data);
     843
     844    if (!$biz_group_id) {  //個人の予定
     845        if (is_null($target_c_member_id)) {  //作成者自身の予定
     846            $target_c_member_id = $c_member_id;
     847        }
     848
     849        $param = array(
     850            'biz_schedule_id' => $biz_schedule_id,
     851            'c_member_id' => $target_c_member_id,
     852            'is_read' => 1
     853        );
     854        db_insert('biz_schedule_member', $param);
     855    }
    839856}
    840857
  • OpenPNE/branches/2_6/webapp_biz/modules/biz/lib/smarty_functions.php

    r1448 r2077  
    6161
    6262    $inc_smarty->assign("cmd", $cmd_head);  //操作の対象ページ
    63     $inc_smarty->assign("target_id", $member_id);  //予定登録
     63    $inc_smarty->assign("target_id", $member_id);  //予定参加
    6464
    6565    require_once 'Calendar/Week.php';
  • OpenPNE/branches/2_6/webapp_biz/modules/biz/page/fh_biz_schedule_add.php

    r1607 r2077  
    131131
    132132        $this->set('biz_group_list', $biz_group_list[0]);
     133        $this->set('target_c_member_id', $target_id);
    133134
    134135        return 'success';
  • OpenPNE/branches/2_6/webapp_biz/modules/biz/page/fh_biz_schedule_view.php

    r1268 r2077  
    7474                $biz_group = biz_getGroupData($list['biz_group_id']);
    7575                $list['biz_group_name'] = $biz_group['name'];
     76        } else {
     77            $list['target_c_member_nickname'] = biz_getMemberNickname($requests['target_id']);
    7678        }
    7779
  • OpenPNE/branches/2_6/webapp_biz/modules/biz/templates/fh_biz_schedule_add.tpl

    r1607 r2077  
    1212({t_form _enctype=file m=biz a=do_fhg_biz_schedule_add})
    1313<input type="hidden" name="sessid" value="({$PHPSESSID})">
     14<input type="hidden" name="target_c_member_id" value="({$target_c_member_id})">
    1415
    1516<table border="0" cellspacing="0" cellpadding="0" style="width:540px;margin:0px auto;" class="border_07">
  • OpenPNE/branches/2_6/webapp_biz/modules/biz/templates/fh_biz_schedule_calendar.tpl

    r1187 r2077  
    4040<a href="({$weather_url})" target="_blank">天気予報を見る</a>
    4141&nbsp;<img src="./skin/icon_schedule.gif" class="icon">
    42 <a href="({t_url m=biz a=page_fh_biz_schedule_add})">予定を追加</a>&nbsp;
     42<a href="({t_url m=biz a=page_fh_biz_schedule_add})&target_id=({$c_member.c_member_id})">予定を追加</a>&nbsp;
    4343
    4444</td>
     
    8080({$item.day})
    8181({/if})<br>
    82 <a href="({t_url m=biz a=page_fh_biz_schedule_add})&amp;begin_date=({$year})({$month|string_format:'%02d'})({$item.day|string_format:'%02d'})"><img src="./skin/icon_schedule.gif" class="icon"></a><br>
     82<a href="({t_url m=biz a=page_fh_biz_schedule_add})&amp;begin_date=({$year})({$month|string_format:'%02d'})({$item.day|string_format:'%02d'})&target_id=({$c_member.c_member_id})"><img src="./skin/icon_schedule.gif" class="icon"></a><br>
    8383
    8484({* 祝日 *})
  • OpenPNE/branches/2_6/webapp_biz/modules/biz/templates/fh_biz_schedule_view.tpl

    r1778 r2077  
    177177<td class="bg_05" align="center" valign="middle">
    178178<div style="padding:4px 3px;">
     179登録者
     180</div>
     181</td>
     182<td class="bg_01" align="center"><img src="./skin/dummy.gif" style="width:1px;height:1px;" class="dummy"></td>
     183<td class="bg_02" align="left" valign="middle">
     184<div style="padding:4px 3px;">
     185        <a href="({t_url m=pc a=page_f_home})&amp;target_c_member_id=({$schedule.c_member_id})">({$schedule.writer_name})</a>   <br>
     186</div>
     187</td>
     188<td class="bg_01" align="center"><img src="./skin/dummy.gif" style="width:1px;height:1px;" class="dummy"></td>
     189</tr>
     190({*********})
     191<tr>
     192<td style="height:1px;" class="bg_01" colspan="5"><img src="./skin/dummy.gif" style="width:1px;height:1px;" class="dummy"></td>
     193</tr>
     194({*********})
     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;">
    179199({if $schedule.biz_group_id})
    180 登録者
     200グループ
    181201({else})
    182202参加者
     
    187207<td class="bg_02" align="left" valign="middle">
    188208<div style="padding:4px 3px;">
    189 
     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})
    190214        <a href="({t_url m=pc a=page_f_home})&amp;target_c_member_id=({$schedule.c_member_id})">({$schedule.writer_name})</a>   <br>
    191 
    192 </div>
    193 </td>
    194 <td class="bg_01" align="center"><img src="./skin/dummy.gif" style="width:1px;height:1px;" class="dummy"></td>
    195 </tr>
    196 ({*********})
    197 <tr>
    198 <td style="height:1px;" class="bg_01" colspan="5"><img src="./skin/dummy.gif" style="width:1px;height:1px;" class="dummy"></td>
    199 </tr>
    200 ({*********})
    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})
     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>
    223224({*********})
    224225<tr>
  • OpenPNE/branches/2_6/webapp_biz/modules/biz/validate/do/fhg_biz_schedule_add.ini

    r1087 r2077  
    8888caption = 'バナー予定かどうか'
    8989
     90[target_c_member_id]
     91type="int"
     92required = 0
     93caption = '予定参加者'
  • OpenPNE/branches/2_6/webapp_biz/modules/pc/templates/inc_footer.tpl

    r1181 r2077  
    2424({/if})
    2525</table>
     26
     27({$INC_FOOTER_inc_page_bottom2|smarty:nodefaults})
     28
    2629</td>
    27 
    28 ({$inc_extension_pagelayout_bottom2|smarty:nodefaults})
    2930
    3031({if $INC_FOOTER_side_banner_html_before || $INC_FOOTER_side_banner_html_after || $INC_FOOTER_inc_side_banner || $newschedule || $todolist })
Note: See TracChangeset for help on using the changeset viewer.