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

Changeset 1169


Ignore:
Timestamp:
Dec 14, 2006, 9:16:43 PM (15 years ago)
Author:
ebihara
Message:

#236 BIZモジュール版週間スケジュールの開始曜日を変更できるように

Location:
OpenPNE/branches/ebihara/prj_dev26_calendar/webapp_biz/modules/biz/lib
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • OpenPNE/branches/ebihara/prj_dev26_calendar/webapp_biz/modules/biz/lib/mysql_functions.php

    r1087 r1169  
    12321232    }
    12331233}
     1234
     1235
     1236/**
     1237 * 週間カレンダー開始曜日を取得
     1238 */
     1239function biz_get_schedule_start_day($c_member_id)
     1240{
     1241    $sql = 'SELECT schedule_start_day FROM c_member WHERE c_member_id = ?';
     1242    return db_get_one($sql, array($c_member_id));
     1243}
    12341244?>
  • OpenPNE/branches/ebihara/prj_dev26_calendar/webapp_biz/modules/biz/lib/smarty_functions.php

    r1161 r1169  
    6262    $inc_smarty->assign("cmd", $cmd_head);  //操作の対象ページ
    6363    $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    }
    6470
    6571    require_once 'Calendar/Week.php';
     
    7076    $inc_smarty->assign('w', $w);
    7177    $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);
    7379    $Week->build();
    7480    $calendar = array();
    7581    $dayofweek = array('日','月','火','水','木','金','土');
    76     $i = 0;
    77 
     82    $i = $start_day;
     83    $dayofweek = array_merge($dayofweek,
     84        array_slice($dayofweek, 0, ($start_day + 1)));
    7885    $schedule = array();
    7986
     
    123130
    124131        $time = strtotime($w+$i . " week");
    125         $Week = new Calendar_Week(date('Y', $time), date('m', $time), date('d', $time), 0);
     132        $Week = new Calendar_Week(date('Y', $time), date('m', $time), date('d', $time));
    126133        $Week->build();
    127134
Note: See TracChangeset for help on using the changeset viewer.