Source for file LC_Page_FrontParts_Bloc_Calendar.php
Documentation is available at LC_Page_FrontParts_Bloc_Calendar.php
* This file is part of EC-CUBE
* Copyright(c) 2000-2011 LOCKON CO.,LTD. All Rights Reserved.
* http://www.lockon.co.jp/
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
define('CALENDAR_ROOT', DATA_REALDIR. 'module/Calendar'. DIRECTORY_SEPARATOR);
require_once $current_dir . '/../../../../module/Calendar/Month/Weekdays.php';
require_once CLASS_REALDIR . 'pages/frontparts/bloc/LC_Page_FrontParts_Bloc.php';
* @author LOCKON CO.,LTD.
* @param integer $disp_month 表示する月数
* @return array $arrCalendar カレンダー情報の配列を返す
for ($j = 0; $j <= $disp_month- 1; ++ $j) {
$year = $year + $month% 12;
$objMonth = new Calendar_Month_Weekdays($year, $month, 0);
while ($objDay = $objMonth->fetch()) {
if ($month == $objDay->month) {
$arrCalendar[$j][$i]['in_month'] = true;
$arrCalendar[$j][$i]['in_month'] = false;
$arrCalendar[$j][$i]['first'] = $objDay->first;
$arrCalendar[$j][$i]['last'] = $objDay->last;
$arrCalendar[$j][$i]['empty'] = $objDay->empty;
$arrCalendar[$j][$i]['year'] = $year;
$arrCalendar[$j][$i]['month'] = $month;
$arrCalendar[$j][$i]['day'] = $objDay->day;
$arrCalendar[$j][$i]['holiday'] = true;
$arrCalendar[$j][$i]['holiday'] = false;
* @return array $arrHoliday 休日情報の配列を返す
$objQuery = SC_Query_Ex::getSingletonInstance();
$objQuery->setOrder('rank DESC');
$arrRet = $objQuery->select('month, day', 'dtb_holiday', $where);
foreach ($arrRet AS $key=> $val) {
$arrHoliday[$val['month']][] = $val['day'];
* @return array $arrRegularHoliday 定休日情報の配列を返す
$arrInfo = SC_Helper_DB_Ex::sfGetBasisData();
$arrRegularHoliday = explode('|', $arrInfo['regular_holiday_ids']);
return $arrRegularHoliday;
* @param integer $month 月
* @return boolean 休日の場合trueを返す
if (!empty($this->arrHoliday[$month])) {
if (in_array($day, $this->arrHoliday[$month])) {
if (!empty($this->arrRegularHoliday)) {
$day = date('w', mktime(0,0,0 ,$month, $day, $year));
if (in_array($day, $this->arrRegularHoliday)) {
Documentation generated on Fri, 24 Feb 2012 14:01:59 +0900 by Seasoft
|