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

Changeset 1159


Ignore:
Timestamp:
Dec 14, 2006, 4:39:12 PM (13 years ago)
Author:
ebihara
Message:

#315 PCモジュール上で祝日の表示ができるように

Location:
OpenPNE/branches/ebihara/prj_dev26_calendar/webapp
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • OpenPNE/branches/ebihara/prj_dev26_calendar/webapp/lib/db/etc.php

    r1096 r1159  
    732732}
    733733
     734/**
     735 * カレンダーの祝日を取得する
     736 */
     737function db_c_holiday_list4date($m, $d)
     738{
     739    $sql = 'SELECT name FROM c_holiday WHERE month = ? AND day = ?';
     740    $params = array(intval($m), intval($d));
     741    return db_get_col($sql, $params);
     742}
    734743?>
  • OpenPNE/branches/ebihara/prj_dev26_calendar/webapp/modules/pc/page/h_calendar.php

    r134 r1159  
    6060                    'event' => $event_list[$day],
    6161                    'schedule' => p_h_calendar_c_schedule_list4date($year, $month, $day, $u),
     62                    'holiday' => db_c_holiday_list4date($month, $day),
    6263                );
    6364                $item['day'] = $day;
  • OpenPNE/branches/ebihara/prj_dev26_calendar/webapp/modules/pc/page/h_home.php

    r881 r1159  
    156156                'event' => p_h_home_event4c_member_id($y, $m, $d, $u),
    157157                'schedule' => p_h_calendar_c_schedule_list4date($y, $m, $d, $u),
     158                'holiday' => db_c_holiday_list4date($m, $d),
    158159            );
    159160            if ($w == 0 && $d == date('d')) {
  • OpenPNE/branches/ebihara/prj_dev26_calendar/webapp/modules/pc/templates/h_calendar.tpl

    r1081 r1159  
    8181({$item.day})
    8282({/if})<br>
     83
    8384({if $add_schedule})
    8485<a href="({t_url m=pc a=page_h_schedule_add})&amp;year=({$ym.year_disp})&amp;month=({$ym.month_disp})&amp;day=({$item.day})"><img src="({t_img_url_skin filename=icon_schedule})" class="icon"></a><br>
     86({/if})
     87
     88({* 祝日 *})
     89({if $item.holiday})
     90({foreach from=$item.holiday item=item_holiday})
     91<span class=" c_02">({$item_holiday})</span><br>
     92({/foreach})
    8593({/if})
    8694
  • OpenPNE/branches/ebihara/prj_dev26_calendar/webapp/modules/pc/templates/h_home.tpl

    r1106 r1159  
    923923<tr>
    924924({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">
    926926({if $item.now})<span class="b_b">({/if})
    927927
     
    935935
    936936<div>
     937({* 祝日 *})
     938({foreach from=$item.holiday item=item_holiday})
     939({$item_holiday})<br>
     940({/foreach})
     941
    937942({* 誕生日 *})
    938943({foreach from=$item.birth item=item_birth})
Note: See TracChangeset for help on using the changeset viewer.