Changeset 1182
- Timestamp:
- Dec 15, 2006, 3:15:04 AM (16 years ago)
- Location:
- OpenPNE/branches/takanashi/prj_takanashi4
- Files:
-
- 4 added
- 17 edited
- 8 copied
Legend:
- Unmodified
- Added
- Removed
-
OpenPNE/branches/takanashi/prj_takanashi4/webapp/lib/db/deprecated_temporary4.php
r1131 r1182 446 446 $c_password_query_answer, 447 447 $public_flag_diary, 448 $is_shinobiashi) 448 $is_shinobiashi, 449 $schedule_start_day) 449 450 { 450 451 return db_member_h_config_3( … … 457 458 $c_password_query_answer, 458 459 $public_flag_diary, 459 $is_shinobiashi); 460 $is_shinobiashi, 461 $schedule_start_day); 460 462 } 461 463 -
OpenPNE/branches/takanashi/prj_takanashi4/webapp/lib/db/etc.php
r1175 r1182 744 744 } 745 745 746 /** 747 * カレンダーの祝日を取得する 748 */ 749 function db_c_holiday_list4date($m, $d) 750 { 751 $sql = 'SELECT name FROM c_holiday WHERE month = ? AND day = ?'; 752 $params = array(intval($m), intval($d)); 753 return db_get_col($sql, $params); 754 } 746 755 ?> -
OpenPNE/branches/takanashi/prj_takanashi4/webapp/lib/db/member.php
r1175 r1182 1027 1027 $c_password_query_answer, 1028 1028 $public_flag_diary, 1029 $is_shinobiashi) 1029 $is_shinobiashi, 1030 $schedule_start_day) 1030 1031 { 1031 1032 //function cacheの削除 … … 1040 1041 'public_flag_diary' => $public_flag_diary, 1041 1042 'is_shinobiashi' => $is_shinobiashi, 1043 'schedule_start_day' => $schedule_start_day, 1042 1044 ); 1043 1045 $where = array('c_member_id' => intval($c_member_id)); -
OpenPNE/branches/takanashi/prj_takanashi4/webapp/modules/admin/lib/db_admin.php
r1175 r1182 1941 1941 } 1942 1942 1943 /** 1944 * 祝日のリストを取得 1945 */ 1946 function db_admin_c_holiday_list() 1947 { 1948 $sql = 'SELECT * FROM c_holiday ORDER BY month'; 1949 $holiday_list = db_get_all($sql); 1950 1951 return $holiday_list; 1952 } 1953 1954 /** 1955 * 休日を追加 1956 */ 1957 function db_admin_insert_c_holiday($name, $month, $day) 1958 { 1959 $data = array( 1960 'name' => strval($name), 1961 'month' => intval($month), 1962 'day' => intval($day), 1963 ); 1964 return db_insert('c_holiday', $data); 1965 } 1966 1967 /** 1968 * 休日を編集 1969 */ 1970 function db_admin_update_c_holiday($c_holiday_id, $name, $month, $day) 1971 { 1972 $data = array( 1973 'name' => strval($name), 1974 'month' => intval($month), 1975 'day' => intval($day), 1976 ); 1977 $where = array('c_holiday_id' => intval($c_holiday_id)); 1978 return db_update('c_holiday', $data, $where); 1979 } 1980 1981 /** 1982 * 休日を削除 1983 */ 1984 function db_admin_delete_c_holiday($c_holiday_id) 1985 { 1986 $sql = "DELETE FROM c_holiday WHERE c_holiday_id = ?"; 1987 $params = array(intval($c_holiday_id)); 1988 return db_query($sql, $params); 1989 } 1943 1990 1944 1991 ?> -
OpenPNE/branches/takanashi/prj_takanashi4/webapp/modules/admin/templates/inc_header.tpl
r1076 r1182 71 71 <li><a href="?m=({$module_name})&a=page_({$hash_tbl->hash('list_c_api')})" title="OpenPNE API設定: API通信を許可するIPアドレスの設定">OpenPNE API設定</a></li> 72 72 <li><a href="?m=({$module_name})&a=page_({$hash_tbl->hash('list_c_cmd')})" title="CMD設定: CMDを許可するページの設定">CMD設定</a></li> 73 <li><a href="?m=({$module_name})&a=page_({$hash_tbl->hash('edit_c_holiday')})" title="祝日設定: カレンダーに表示する休日の設定">祝日設定</a></li> 73 74 </ul> 74 75 -
OpenPNE/branches/takanashi/prj_takanashi4/webapp/modules/pc/do/h_config_3.php
r134 r1182 31 31 $public_flag_diary = $requests['public_flag_diary']; 32 32 $is_shinobiashi = $requests['is_shinobiashi']; 33 $schedule_start_day = $requests['schedule_start_day']; 33 34 // ---------- 34 35 … … 58 59 $c_password_query_answer, 59 60 $public_flag_diary, 60 $is_shinobiashi 61 $is_shinobiashi, 62 $schedule_start_day 61 63 ); 62 64 -
OpenPNE/branches/takanashi/prj_takanashi4/webapp/modules/pc/page/h_calendar.php
r134 r1182 60 60 'event' => $event_list[$day], 61 61 'schedule' => p_h_calendar_c_schedule_list4date($year, $month, $day, $u), 62 'holiday' => db_c_holiday_list4date($month, $day), 62 63 ); 63 64 $item['day'] = $day; -
OpenPNE/branches/takanashi/prj_takanashi4/webapp/modules/pc/page/h_home.php
r881 r1182 99 99 /// 週間カレンダー 100 100 if (DISPLAY_SCHEDULE_HOME) { 101 $this->set('calendar', $this->get_calendar($u, $requests['w'])); 101 //開始曜日の設定 102 if ($c_member['schedule_start_day'] == 2) { 103 $start_day = date("w"); 104 } else { 105 $start_day = $c_member['schedule_start_day']; 106 } 107 $this->set('calendar', $this->get_calendar($u, $requests['w'], $start_day)); 102 108 } 103 109 … … 128 134 } 129 135 130 function get_calendar($u, $week )136 function get_calendar($u, $week, $start_day) 131 137 { 132 138 include_once 'Calendar/Week.php'; … … 137 143 $this->set('w', $w); 138 144 $time = strtotime($w . ' week'); 139 $Week = new Calendar_Week(date('Y', $time), date('m', $time), date('d', $time), 0);145 $Week = new Calendar_Week(date('Y', $time), date('m', $time), date('d', $time), $start_day); 140 146 $Week->build(); 141 147 $calendar = array(); 142 148 $dayofweek = array('日','月','火','水','木','金','土'); 143 $i = 0; 149 $i = $start_day; 150 $dayofweek = array_merge($dayofweek, 151 array_slice($dayofweek, 0, ($start_day + 1))); 144 152 while ($Day = $Week->fetch()) { 145 153 $y = $Day->thisYear(); … … 156 164 'event' => p_h_home_event4c_member_id($y, $m, $d, $u), 157 165 'schedule' => p_h_calendar_c_schedule_list4date($y, $m, $d, $u), 166 'holiday' => db_c_holiday_list4date($m, $d), 158 167 ); 159 168 if ($w == 0 && $d == date('d')) { -
OpenPNE/branches/takanashi/prj_takanashi4/webapp/modules/pc/templates/h_calendar.tpl
r1081 r1182 69 69 ({foreach from=$calendar item=week}) 70 70 <tr> 71 ({foreach from=$week item=item })71 ({foreach from=$week item=item name=weekloop}) 72 72 ({if $item.now}) 73 73 <td style="height:65px;padding:2px;" align="left" valign="top" class="bg_09"> 74 ({elseif $item.holiday || $smarty.foreach.weekloop.first}) 75 <td style="height:65px;padding:2px;" align="left" valign="top" class="bg_14"> 74 76 ({else}) 75 77 <td style="height:65px;padding:2px;" align="left" valign="top" class="bg_02"> … … 81 83 ({$item.day}) 82 84 ({/if})<br> 85 83 86 ({if $add_schedule}) 84 87 <a href="({t_url m=pc a=page_h_schedule_add})&year=({$ym.year_disp})&month=({$ym.month_disp})&day=({$item.day})"><img src="({t_img_url_skin filename=icon_schedule})" class="icon"></a><br> 88 ({/if}) 89 90 ({* 祝日 *}) 91 ({if $item.holiday}) 92 ({foreach from=$item.holiday item=item_holiday}) 93 <span class=" c_02">({$item_holiday})</span><br> 94 ({/foreach}) 85 95 ({/if}) 86 96 -
OpenPNE/branches/takanashi/prj_takanashi4/webapp/modules/pc/templates/h_config.tpl
r1175 r1182 368 368 <input type="radio" name="is_receive_daily_news" value="0" ({if $c_member.is_receive_daily_news eq 0}) checked="checked"({/if}) class="no_bg">受け取らない<br> 369 369 <span>※({$SNS_NAME})の最新情報をお届けします。</span> 370 371 </div> 372 </td> 373 <td class="bg_01" align="center"><img src="./skin/dummy.gif" style="width:1px;height:1px;" class="dummy"></td> 374 </tr> 375 ({*********}) 376 <tr> 377 <td style="height:1px;" class="bg_01" colspan="5"><img src="./skin/dummy.gif" style="width:1px;height:1px;" class="dummy"></td> 378 </tr> 379 ({/if}) 380 ({*********}) 381 ({if $smarty.const.DISPLAY_SCHEDULE_HOME}) 382 <tr> 383 <td class="bg_01" align="center"><img src="./skin/dummy.gif" style="width:1px;height:1px;" class="dummy"></td> 384 <td class="bg_05" align="left" valign="middle"> 385 386 <div class="padding_s"> 387 388 週間カレンダー 389 390 </div> 391 392 </td> 393 <td class="bg_01" align="center"><img src="./skin/dummy.gif" style="width:1px;height:1px;" class="dummy"></td> 394 <td class="bg_02" align="left" valign="middle"> 395 <div class="padding_s"> 396 397 <input type="radio" name="schedule_start_day" value="0" ({if $c_member.schedule_start_day == 0}) checked="checked"({/if})>日曜始まり 398 <input type="radio" name="schedule_start_day" value="1" ({if $c_member.schedule_start_day == 1}) checked="checked"({/if})>月曜始まり 399 <input type="radio" name="schedule_start_day" value="2" ({if $c_member.schedule_start_day == 2}) checked="checked"({/if})>本日始まり 370 400 371 401 </div> -
OpenPNE/branches/takanashi/prj_takanashi4/webapp/modules/pc/templates/h_home.tpl
r1106 r1182 923 923 <tr> 924 924 ({foreach from=$calendar item=item name=calendar}) 925 <td style="width:({if $smarty.foreach.calendar.last})64({else})60({/if})px;({if !$smarty.foreach.calendar.last})border-right:none;({/if})" align="left" valign="top" class="border_01 bg_0({if $item.now})9({else})2({/if})({if $item.dayofweek == "日" }) c_02({elseif $item.dayofweek == "土"}) c_03({/if}) padding_s">925 <td style="width:({if $smarty.foreach.calendar.last})64({else})60({/if})px;({if !$smarty.foreach.calendar.last})border-right:none;({/if})" align="left" valign="top" class="border_01 bg_0({if $item.now})9({else})2({/if})({if $item.dayofweek == "日" || $item.holiday}) c_02({elseif $item.dayofweek == "土"}) c_03({/if}) padding_s"> 926 926 ({if $item.now})<span class="b_b">({/if}) 927 927 … … 935 935 936 936 <div> 937 ({* 祝日 *}) 938 ({foreach from=$item.holiday item=item_holiday}) 939 ({$item_holiday})<br> 940 ({/foreach}) 941 937 942 ({* 誕生日 *}) 938 943 ({foreach from=$item.birth item=item_birth}) -
OpenPNE/branches/takanashi/prj_takanashi4/webapp/modules/pc/validate/do/h_config_3.ini
r260 r1182 35 35 type = "string" 36 36 default = "public" 37 38 [schedule_start_day] 39 type="int" 40 default=0 -
OpenPNE/branches/takanashi/prj_takanashi4/webapp_biz/modules/biz/lib/mysql_functions.php
r1179 r1182 1338 1338 } 1339 1339 } 1340 1341 1342 /** 1343 * 週間カレンダー開始曜日を取得 1344 */ 1345 function biz_get_schedule_start_day($c_member_id) 1346 { 1347 $sql = 'SELECT schedule_start_day FROM c_member WHERE c_member_id = ?'; 1348 return db_get_one($sql, array($c_member_id)); 1349 } 1340 1350 ?> -
OpenPNE/branches/takanashi/prj_takanashi4/webapp_biz/modules/biz/lib/smarty_functions.php
r1179 r1182 62 62 $inc_smarty->assign("cmd", $cmd_head); //操作の対象ページ 63 63 $inc_smarty->assign("target_id", $member_id); //予定登録者 64 $schedule_start_day = biz_get_schedule_start_day($member_id); 65 if ($schedule_start_day == 2) { 66 $start_day = date("w"); 67 } else { 68 $start_day = intval($schedule_start_day); 69 } 64 70 65 71 require_once 'Calendar/Week.php'; … … 70 76 $inc_smarty->assign('w', $w); 71 77 $time = strtotime($w . " week"); 72 $Week = new Calendar_Week(date('Y', $time), date('m', $time), date('d', $time), 0);78 $Week = new Calendar_Week(date('Y', $time), date('m', $time), date('d', $time), $start_day); 73 79 $Week->build(); 74 80 $calendar = array(); 75 81 $dayofweek = array('日','月','火','水','木','金','土'); 76 $i = 0; 77 82 $i = $start_day; 83 $dayofweek = array_merge($dayofweek, 84 array_slice($dayofweek, 0, ($start_day + 1))); 78 85 $schedule = array(); 79 86 … … 108 115 'schedule' => $schedule, 109 116 'todo' => biz_schedule_todo4c_member_id($u, $member_id, $y, $m, $d), 117 'holiday' => db_c_holiday_list4date($m, $d), 110 118 ); 111 119 … … 123 131 124 132 $time = strtotime($w+$i . " week"); 125 $Week = new Calendar_Week(date('Y', $time), date('m', $time), date('d', $time) , 0);133 $Week = new Calendar_Week(date('Y', $time), date('m', $time), date('d', $time)); 126 134 $Week->build(); 127 135 -
OpenPNE/branches/takanashi/prj_takanashi4/webapp_biz/modules/biz/page/fh_biz_schedule_calendar.php
r1179 r1182 77 77 'schedule' => $schedule, 78 78 'todo' => $todo_list[$day], 79 'holiday' => db_c_holiday_list4date($month, $day), 79 80 ); 80 81 $item['day'] = $day; -
OpenPNE/branches/takanashi/prj_takanashi4/webapp_biz/modules/biz/templates/fh_biz_schedule_calendar.tpl
r1179 r1182 66 66 ({foreach from=$calendar item=week}) 67 67 <tr> 68 ({foreach from=$week item=item })68 ({foreach from=$week item=item name=weekloop}) 69 69 ({if $item.now}) 70 70 <td style="height:65px;padding:2px;" align="left" valign="top" class="bg_09"> 71 ({elseif $item.holiday || $smarty.foreach.weekloop.first}) 72 <td style="height:65px;padding:2px;" align="left" valign="top" class="bg_14"> 71 73 ({else}) 72 74 <td style="height:65px;padding:2px;" align="left" valign="top" class="bg_02"> … … 79 81 ({/if})<br> 80 82 <a href="({t_url m=biz a=page_fh_biz_schedule_add})&begin_date=({$year})({$month|string_format:'%02d'})({$item.day|string_format:'%02d'})"><img src="./skin/icon_schedule.gif" class="icon"></a><br> 83 84 ({* 祝日 *}) 85 ({foreach from=$item.holiday item=item_holiday}) 86 <span class=" c_02">({$item_holiday})</span><br> 87 ({/foreach}) 81 88 82 89 ({* スケジュール *}) -
OpenPNE/branches/takanashi/prj_takanashi4/webapp_biz/modules/biz/templates/inc_biz_schedule_week.tpl
r1179 r1182 140 140 <td class="bg_05 border_01" style="width:131px;border-top:none;border-right:none;" align="center" valign="top"><img src="./skin/dummy.gif" style="width:130px;height:10px;" class="dummy"></td> 141 141 ({foreach from=$calendar item=item name=calendar}) 142 <td class="({if $item.now})bg_09({else})bg_05({/if}) padding_ss border_01({if $item.dayofweek == "日" }) c_02({elseif $item.dayofweek == "土"}) c_03({else})({/if})" style="width:81px;border-top:none;({if !$smarty.foreach.calendar.last}) border-right:none;({/if})" align="center">142 <td class="({if $item.now})bg_09({else})bg_05({/if}) padding_ss border_01({if $item.dayofweek == "日" || $item.holiday}) c_02({elseif $item.dayofweek == "土"}) c_03({else})({/if})" style="width:81px;border-top:none;({if !$smarty.foreach.calendar.last}) border-right:none;({/if})" align="center"> 143 143 144 144 ({if $item.now})<span class="b_b">({/if}) … … 205 205 </td> 206 206 ({foreach from=$calendar item=item name=calendar}) 207 <td class="({if $item.now})bg_09({else})bg_02({/if}) border_01({if $item.dayofweek == "日"}) c_02({elseif $item.dayofweek == "土"}) c_03({else})({/if})" style="width:81px;border-top:none;({if !$smarty.foreach.calendar.last}) border-right:none;({/if}) border-bottom:none;" align="left" valign="top"> 207 <td class="({if $item.now})bg_09({else})bg_02({/if}) border_01({if $item.dayofweek == "日" || $item.holiday}) c_02({elseif $item.dayofweek == "土"}) c_03({else})({/if})" style="width:81px;border-top:none;({if !$smarty.foreach.calendar.last}) border-right:none;({/if}) border-bottom:none;" align="left" valign="top"> 208 209 ({* 祝日 *}) 210 <div class="padding_s"> 211 ({foreach from=$item.holiday item=item_holiday}) 212 ({$item_holiday})<br> 213 ({/foreach}) 214 </div> 208 215 209 216 ({* スケジュール(時間有) *}) … … 257 264 258 265 ({foreach from=$calendar item=item name=calendar}) 259 <td class="({if $item.now})bg_09({else})bg_02({/if}) border_01({if $item.dayofweek == "日" }) c_02({elseif $item.dayofweek == "土"}) c_03({else})({/if})" style="width:81px;border-top:none;({if !$smarty.foreach.calendar.last}) border-right:none;({/if})" align="left" valign="top">266 <td class="({if $item.now})bg_09({else})bg_02({/if}) border_01({if $item.dayofweek == "日" || $item.holiday}) c_02({elseif $item.dayofweek == "土"}) c_03({else})({/if})" style="width:81px;border-top:none;({if !$smarty.foreach.calendar.last}) border-right:none;({/if})" align="left" valign="top"> 260 267 261 268 ({if $cmd == 'h'})
Note: See TracChangeset
for help on using the changeset viewer.