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

Changeset 2527


Ignore:
Timestamp:
Apr 10, 2007, 9:56:17 PM (12 years ago)
Author:
takanashi
Message:

#504 BIZモードで他人のスケジュールを入れられないバグを修正

Location:
OpenPNE/branches/2_8/webapp_biz/modules/biz
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • OpenPNE/branches/2_8/webapp_biz/modules/biz/do/f_home_add_biz_schedule.php

    r1856 r2527  
    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_8/webapp_biz/modules/biz/do/fhg_biz_schedule_add.php

    r1856 r2527  
    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_8/webapp_biz/modules/biz/lib/mysql_functions.php

    r2523 r2527  
    844844
    845845//スケジュール登録
    846 function biz_insertSchedule($title, $member_id, $begin_date, $finish_date, $begin_time = null, $finish_time = null,
    847                                                         $value = '', $rep_type, $first_id = 0,
    848                                                         $biz_group_id = 0, $public_flag = "public")
     846function biz_insertSchedule($title, $c_member_id, $begin_date, $finish_date, $begin_time = null, $finish_time = null,
     847    $value = '', $rep_type, $first_id = 0, $biz_group_id = 0,
     848    $public_flag = "public", $target_c_member_id = null)
    849849{
    850850    //登録値のセット、チェック
     
    860860    $data = array(
    861861        'title' => $title,
    862         'c_member_id' => intval($member_id),
     862        'c_member_id' => intval($c_member_id),
    863863        'begin_date' => $begin_date,
    864864        'finish_date' => $finish_date,
     
    871871        'public_flag' => $public_flag,
    872872    );
    873     db_insert('biz_schedule', $data);
     873    $biz_schedule_id = db_insert('biz_schedule', $data);
     874
     875    if (!$biz_group_id) {  //個人の予定
     876        if (is_null($target_c_member_id)) {  //作成者自身の予定
     877            $target_c_member_id = $c_member_id;
     878        }
     879
     880        $param = array(
     881            'biz_schedule_id' => $biz_schedule_id,
     882            'c_member_id' => $target_c_member_id,
     883            'is_read' => 1
     884        );
     885        db_insert('biz_schedule_member', $param);
     886    }
    874887}
    875888
  • OpenPNE/branches/2_8/webapp_biz/modules/biz/lib/smarty_functions.php

    r1856 r2527  
    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_8/webapp_biz/modules/biz/page/fh_biz_schedule_add.php

    r1856 r2527  
    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_8/webapp_biz/modules/biz/page/fh_biz_schedule_view.php

    r1856 r2527  
    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_8/webapp_biz/modules/biz/templates/fh_biz_schedule_add.tpl

    r1641 r2527  
    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_8/webapp_biz/modules/biz/templates/fh_biz_schedule_calendar.tpl

    r1187 r2527  
    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_8/webapp_biz/modules/biz/templates/fh_biz_schedule_view.tpl

    r1803 r2527  
    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_8/webapp_biz/modules/biz/validate/do/fhg_biz_schedule_add.ini

    r1087 r2527  
    8888caption = 'バナー予定かどうか'
    8989
     90[target_c_member_id]
     91type="int"
     92required = 0
     93caption = '予定参加者'
Note: See TracChangeset for help on using the changeset viewer.