Changeset 1050
- Timestamp:
- Dec 6, 2006, 7:13:12 PM (15 years ago)
- Location:
- OpenPNE/branches/ebihara/prj_dev26_todo
- Files:
-
- 1 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
OpenPNE/branches/ebihara/prj_dev26_todo/webapp_biz/modules/biz/do/h_home_edit_biz_todo.php
r942 r1050 18 18 $writer_id = $requests['writer_id']; 19 19 $memo = $requests['memo']; 20 $is_done = $requests['is_done']; 21 $due_year = $requests['due_year']; 22 $due_month = $requests['due_month']; 23 $due_day = $requests['due_day']; 24 $priority = $requests['priority']; 25 $biz_group_id = $requests['biz_group_id']; 26 $public_flag = $requests['public_flag']; 20 27 // ---------- 21 28 … … 24 31 $todo_info = biz_getTodo($id); 25 32 26 biz_editTodo($todo_info['c_member_id'], $memo, $writer_id, $sort_order, $is_check, $id); 33 $due_datetime = $due_year . '-' . $due_month . '-' . $due_day . ' 00:00:00'; 34 if(!$todo_info['c_member_id'] && !$is_check) { 35 $todo_info['c_member_id'] = $writer_id; 36 } 37 38 biz_editTodo($todo_info['c_member_id'], $memo, $writer_id, $sort_order, $is_check, $id, 39 $is_done, $due_datetime, $priority, $biz_group_id, $public_flag); 27 40 28 41 openpne_redirect('pc', 'page_h_home'); -
OpenPNE/branches/ebihara/prj_dev26_todo/webapp_biz/modules/biz/lib/mysql_functions.php
r896 r1050 1002 1002 1003 1003 //Todo登録 1004 function biz_editTodo($member_id, $memo, $writer_id, $sort_order, $is_all, $target) 1005 { 1004 function biz_editTodo($member_id, $memo, $writer_id, $sort_order, $is_all, $biz_todo_id, $is_done, $due_datetime, $priority, $biz_group_id, $public_flag) 1005 { 1006 $todo = biz_getTodo($biz_todo_id); 1007 1006 1008 if ($is_all) { 1007 1009 //共有Todo … … 1011 1013 } 1012 1014 1013 $sql = 'UPDATE `biz_todo` SET `c_member_id` = ?, `memo` = ?, `writer_id` = ?, `r_datetime` = ? WHERE `biz_todo_id` = ?'; 1015 if ($is_done != $todo['is_check']) { 1016 biz_checkTodo($biz_todo_id, $todo['is_check']); 1017 } 1018 1019 $sql = 'UPDATE `biz_todo` SET `c_member_id` = ?, `memo` = ?, `writer_id` = ?,' 1020 .'`r_datetime` = ?, `due_datetime` = ?, `priority` = ?, `biz_group_id` = ?,' 1021 .'`public_flag` = ? WHERE `biz_todo_id` = ?'; 1014 1022 1015 1023 $params = array( … … 1018 1026 intval($writer_id), 1019 1027 date("Y-m-d H:i"), 1020 $target, 1028 $due_datetime, 1029 intval($priority), 1030 intval($biz_group_id), 1031 $public_flag, 1032 intval($biz_todo_id), 1021 1033 ); 1022 1034 -
OpenPNE/branches/ebihara/prj_dev26_todo/webapp_biz/modules/biz/page/fh_home_edit_biz_todo.php
r406 r1050 13 13 14 14 $this->set("id", $requests['id']); 15 $this->set("todo", biz_getTodo($requests['id'])); 15 $todo = biz_getTodo($requests['id']); 16 $this->set("todo", $todo); 16 17 17 18 if (empty($requests['target_id']) || ($requests['target_id'] == $u)) { … … 29 30 } 30 31 32 $year_list = array(); 33 $curr_year = date('Y'); 34 $year_list[$curr_year] = $curr_year; 35 $year_list[$curr_year+1] = $curr_year + 1; 36 $this->set('year_list', $year_list); 37 38 $month_list = array(); 39 for ($i=1; $i <= 12; $i++) { 40 $month_list[$i] = $i; 41 } 42 $this->set('month_list', $month_list); 43 44 $day_list = array(); 45 for ($i=1; $i <= 31; $i++) { 46 $day_list[$i] = $i; 47 } 48 $this->set('day_list', $day_list); 49 31 50 $this->set("target_id", $target_id); 51 52 $biz_group_count = biz_getGroupCount($target_id); 53 $biz_group_list = biz_getJoinGroupList($target_id, 1, $biz_group_count); 54 55 $this->set('biz_group_list', $biz_group_list[0]); 56 $todo_date = explode('-', substr($todo['due_datetime'], 0, 10)); 57 $this->set('todo_date', $todo_date); 32 58 33 59 return 'success'; -
OpenPNE/branches/ebihara/prj_dev26_todo/webapp_biz/modules/biz/templates/fh_home_edit_biz_todo.tpl
r387 r1050 87 87 <textarea name="memo" style="width:30em;height:6em;">({$todo.memo})</textarea> 88 88 89 ({*<input type="text" name="memo" value="({$todo.memo})" size="90">*}) 90 91 </div> 92 93 <div class="padding_s"> 94 95 <input type="checkbox" name="is_check" value="1"({if $todo.c_member_id == 0}) checked({/if}) class="no_bg">この予定を全員で共有する<br> 89 </div> 90 91 <div class="padding_s"> 92 93 <input type="checkbox" name="is_done" value="1"({if $todo.is_check}) checked({/if}) class="no_bg">このTodoを完了済みにする<br> 94 95 </div> 96 97 </td> 98 <td style="width:1px;" class="bg_01" align="center"><img src="./skin/dummy.gif" style="width:1px;height:1px;" class="dummy"></td> 99 </tr> 100 ({*********}) 101 <tr> 102 <td style="width:636px;height:1px;" class="bg_01" colspan="5"><img src="./skin/dummy.gif" style="width:1px;height:1px;" class="dummy"></td> 103 </tr> 104 ({*********}) 105 <tr> 106 <td style="width:1px;" class="bg_01" align="center"><img src="./skin/dummy.gif" style="width:1px;height:1px;" class="dummy"></td> 107 <td style="width:130px;" class="bg_05" align="center" valign="middle"> 108 109 <div class="padding_s"> 110 111 目標期日 112 113 </div> 114 115 </td> 116 <td style="width:1px;" class="bg_01" align="center"><img src="./skin/dummy.gif" style="width:1px;height:1px;" class="dummy"></td> 117 <td style="width:503px;" class="bg_02" align="left" valign="middle"> 118 119 <div class="padding_s"> 120 121 <select name="due_year"> 122 <option>-- 123 ({foreach from=$year_list item=item}) 124 <option value="({$item})"({if $item==$todo_date.0}) selected({/if})>({$item}) 125 ({/foreach}) 126 </select>年 127 <select name="due_month"> 128 <option>-- 129 ({foreach from=$month_list item=item}) 130 <option value="({$item})"({if $item==$todo_date.1}) selected({/if})>({$item}) 131 ({/foreach}) 132 </select>月 133 <select name="due_day"> 134 <option>-- 135 ({foreach from=$day_list item=item}) 136 <option value="({$item})"({if $item==$todo_date.2}) selected({/if})>({$item}) 137 ({/foreach}) 138 </select>日 139 140 </div> 141 142 </td> 143 <td style="width:1px;" class="bg_01" align="center"><img src="./skin/dummy.gif" style="width:1px;height:1px;" class="dummy"></td> 144 </tr> 145 ({*********}) 146 <tr> 147 <td style="width:636px;height:1px;" class="bg_01" colspan="5"><img src="./skin/dummy.gif" style="width:1px;height:1px;" class="dummy"></td> 148 </tr> 149 ({*********}) 150 <tr> 151 <td style="width:1px;" class="bg_01" align="center"><img src="./skin/dummy.gif" style="width:1px;height:1px;" class="dummy"></td> 152 <td style="width:130px;" class="bg_05" align="center" valign="middle"> 153 154 <div class="padding_s"> 155 156 重要度 157 158 </div> 159 160 </td> 161 <td style="width:1px;" class="bg_01" align="center"><img src="./skin/dummy.gif" style="width:1px;height:1px;" class="dummy"></td> 162 <td style="width:503px;" class="bg_02" align="left" valign="middle"> 163 164 <div class="padding_s"> 165 <select name="priority"> 166 <option value="1"({if $todo.priority == 1}) selected({/if})>高 167 <option value="2"({if $todo.priority == 2}) selected({/if})>中 168 <option value="3"({if $todo.priority == 3}) selected({/if})>低 169 </select> 170 </div> 171 172 </td> 173 <td style="width:1px;" class="bg_01" align="center"><img src="./skin/dummy.gif" style="width:1px;height:1px;" class="dummy"></td> 174 </tr> 175 ({*********}) 176 <tr> 177 <td style="width:636px;height:1px;" class="bg_01" colspan="5"><img src="./skin/dummy.gif" style="width:1px;height:1px;" class="dummy"></td> 178 </tr> 179 ({*********}) 180 <tr> 181 <td style="width:1px;" class="bg_01" align="center"><img src="./skin/dummy.gif" style="width:1px;height:1px;" class="dummy"></td> 182 <td style="width:130px;" class="bg_05" align="center" valign="middle"> 183 184 <div class="padding_s"> 185 186 グループ 187 188 </div> 189 190 </td> 191 <td style="width:1px;" class="bg_01" align="center"><img src="./skin/dummy.gif" style="width:1px;height:1px;" class="dummy"></td> 192 <td style="width:503px;" class="bg_02" align="left" valign="middle"> 193 194 <div class="padding_s"> 195 <select name="biz_group_id"> 196 <option type="radio" value="0">指定なし 197 ({foreach from=$biz_group_list item=biz_group}) 198 <option type="radio" value="({$biz_group.biz_group_id})" 199 ({if $biz_group.biz_group_id == $todo.biz_group_id}) 200 selected 201 ({/if}) 202 >({$biz_group.name}) 203 ({/foreach}) 204 </select> 205 </div> 206 207 </td> 208 <td style="width:1px;" class="bg_01" align="center"><img src="./skin/dummy.gif" style="width:1px;height:1px;" class="dummy"></td> 209 </tr> 210 ({*********}) 211 <tr> 212 <td style="height:1px;" class="bg_01" colspan="5"><img src="./skin/dummy.gif" style="width:1px;height:1px;" class="dummy"></td> 213 </tr> 214 ({*********}) 215 <tr> 216 <td style="width:1px;" class="bg_01" align="center"><img src="./skin/dummy.gif" style="width:1px;height:1px;" class="dummy"></td> 217 <td style="width:130px;" class="bg_05" align="center" valign="middle"> 218 219 <div class="padding_s"> 220 221 公開範囲 222 223 </div> 224 225 </td> 226 <td style="width:1px;" class="bg_01" align="center"><img src="./skin/dummy.gif" style="width:1px;height:1px;" class="dummy"></td> 227 <td style="width:503px;" class="bg_02" align="left" valign="middle"> 228 229 <div class="padding_s"> 230 231 <input type="radio" name="public_flag" value="public"({if $todo.public_flag == "public"}) checked="checked"({/if}) class="no_bg" id="public_flag_public"><label for="public_flag_public">全員に公開</label><br> 232 <input type="radio" name="public_flag" value="group"({if $todo.public_flag == "group"}) checked="checked"({/if}) class="no_bg" id="public_flag_group"><label for="public_flag_group">グループまで公開</label><br> 233 <input type="radio" name="public_flag" value="private"({if $todo.public_flag == "private"}) checked="checked"({/if}) class="no_bg" id="public_flag_private"><label for="public_flag_private">公開しない</label><br> 234 235 </div> 236 237 <div class="padding_s"> 238 239 <input type="checkbox" name="is_check" value="1"({if $todo.c_member_id == 0}) checked({/if}) class="no_bg">だれかがTodo<br> 96 240 97 241 </div> -
OpenPNE/branches/ebihara/prj_dev26_todo/webapp_biz/modules/biz/validate/do/h_home_edit_biz_todo.ini
r217 r1050 3 3 4 4 [is_check] 5 type = "bool"6 default =05 type="int" 6 default=0 7 7 8 8 [writer_name] … … 22 22 type="string" 23 23 24 [is_done] 25 type="int" 26 default=0 27 28 [due_year] 29 type="string" 30 require=0 31 32 [due_month] 33 type="string" 34 require=0 35 36 [due_day] 37 type="string" 38 require=0 39 40 [priority] 41 type="int" 42 43 [biz_group_id] 44 type="int" 45 46 [public_flag] 47 type="string"
Note: See TracChangeset
for help on using the changeset viewer.