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

Changeset 1353


Ignore:
Timestamp:
Dec 23, 2006, 3:45:33 PM (14 years ago)
Author:
takanashi
Message:

BIZの週間カレンダーの開始曜日指定ができないバグ修正

Location:
OpenPNE/branches/takanashi/prj_takanashi/webapp_biz/modules
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • OpenPNE/branches/takanashi/prj_takanashi/webapp_biz/modules/biz/lib/mysql_functions.php

    r1268 r1353  
    13381338    }
    13391339}
    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 }
    13501340?>
  • OpenPNE/branches/takanashi/prj_takanashi/webapp_biz/modules/biz/lib/smarty_functions.php

    r1268 r1353  
    4747
    4848//スケジュール用カレンダーを得る
    49 function biz_getScheduleWeek($u, $member_id, $w, $cmd, $head = true, $value = true, $foot = true, $member_info = false)
     49function biz_getScheduleWeek($u, $member_id, $w, $cmd, $head = true, $value = true, $foot = true, $member_info = false,$start_day )
    5050{
    5151    if ($cmd != 'p') {
     
    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     }
    7064
    7165    require_once 'Calendar/Week.php';
     
    131125
    132126        $time = strtotime($w+$i . " week");
    133         $Week = new Calendar_Week(date('Y', $time), date('m', $time), date('d', $time));
     127        $Week = new Calendar_Week(date('Y', $time), date('m', $time), date('d', $time),$start_day);
    134128        $Week->build();
    135129
  • OpenPNE/branches/takanashi/prj_takanashi/webapp_biz/modules/pc/page/h_home.php

    r1268 r1353  
    1919        include_once(OPENPNE_MODULES_BIZ_DIR.'/biz/lib/smarty_functions.php');
    2020        include_once(OPENPNE_MODULES_BIZ_DIR.'/biz/lib/mysql_functions.php');
    21 
    2221
    2322        $this->set('inc_navi', fetch_inc_navi('h'));
     
    4746        $this->set('anatani_c_commu_admin_confirm_list',$anatani_c_commu_admin_confirm_list);
    4847        $this->set('num_anatani_c_commu_admin_confirm_list', count($anatani_c_commu_admin_confirm_list));
     48
     49        // あなたにコミュニティ副管理者を希望しているメンバー
     50        $anatani_c_commu_sub_admin_confirm_list = db_commu_anatani_c_commu_sub_admin_confirm_list4c_member_id($u);
     51        $this->set('anatani_c_commu_sub_admin_confirm_list', $anatani_c_commu_sub_admin_confirm_list);
     52        $this->set('num_anatani_c_commu_sub_admin_confirm_list', count($anatani_c_commu_sub_admin_confirm_list));
    4953
    5054        // 誕生日かどうか
     
    8791        /// その他 ///
    8892
     93        //PNEPOINT
     94        $point = db_point_get_point($u);
     95        $this->set("point", $point);
     96
     97        //rank
     98        $this->set("rank", db_point_get_rank4point($point));
     99
    89100        // 紹介文
    90         $this->set('c_friend_intro_list', db_friend_c_friend_intro_list4c_member_id($u, 5));
     101        $c_friend_intro_list = db_friend_c_friend_intro_list4c_member_id($u, 5);
     102        $this->set('c_friend_intro_list', $c_friend_intro_list);
    91103
    92104        // 今日の日付、曜日
     
    97109        /// 週間カレンダー
    98110        if (DISPLAY_SCHEDULE_HOME) {
    99             //pne用
    100 //            $this->set('calendar', $this->get_calendar($u, $requests['w']));
    101 
    102             //--- biz ここから
    103             $this->set('calendar_biz', biz_getScheduleWeek($u, $u, $requests['w'], 'h', true, true, true, $c_member));
    104             //--- biz ここまで
    105 
    106 
     111            //開始曜日の設定
     112            if ($c_member['schedule_start_day'] == 2) {
     113                $start_day = date("w");
     114            } else {
     115                $start_day = $c_member['schedule_start_day'];
     116            }
     117            $this->set('calendar_biz', biz_getScheduleWeek($u, $u, $requests['w'], 'h', true, true, true, $c_member,$start_day));
    107118        }
    108119
     
    123134        }
    124135
    125 
    126136        //--- biz ここから
    127137        $this->set('is_h_home', 1);
    128 
    129 //      list($ru_list) = p_h_message_box_c_message_received_user_list4c_member_id4range($u, 1, 20);
    130138
    131139        $this->set("c_message_ru_list",$ru_list);
     
    147155        //--- biz ここまで
    148156
    149 
    150 
    151157        // アクセス日時を記録
    152158        db_member_do_access($u);
     
    155161    }
    156162
    157     function get_calendar($u, $week)
    158     {
    159         include_once 'Calendar/Week.php';
    160         $w = intval($week);
    161         if (empty($w)) {
    162             $w = 0;
    163         }
    164         $this->set('w', $w);
    165         $time = strtotime($w . ' week');
    166         $Week = new Calendar_Week(date('Y', $time), date('m', $time), date('d', $time), 0);
    167         $Week->build();
    168         $calendar = array();
    169         $dayofweek = array('日','月','火','水','木','金','土');
    170         $i = 0;
    171         while ($Day = $Week->fetch()) {
    172             $y = $Day->thisYear();
    173             $m = $Day->thisMonth();
    174             $d = $Day->thisDay();
    175             $item = array(
    176                 'year'=> $y,
    177                 'month'=>$m,
    178                 'day' => $d,
    179                 'dayofweek'=>$dayofweek[$i++],
    180                 'now' => false,
    181                 'birth' => db_member_birth4c_member_id($m, $d, $u),
    182                 'event' => db_commu_event4c_member_id($y, $m, $d, $u),
    183                 'schedule' => db_schedule_c_schedule_list4date($y, $m, $d, $u),
    184             );
    185             if ($w == 0 && $d == date('d')) {
    186                 $item['now'] = true;
    187             }
    188             $calendar[] = $item;
    189         }
    190         return $calendar;
    191     }
    192163}
    193164
Note: See TracChangeset for help on using the changeset viewer.