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

Changeset 1325


Ignore:
Timestamp:
Dec 21, 2006, 6:20:34 PM (14 years ago)
Author:
ebihara
Message:

一部のPNEBIZ関数について関数名の命名規則を見直し、lib/db以下のファイルで定義するようにした

Location:
OpenPNE/branches/ebihara/prj_dev26_bizfix/webapp_biz
Files:
7 added
65 edited

Legend:

Unmodified
Added
Removed
  • OpenPNE/branches/ebihara/prj_dev26_bizfix/webapp_biz/modules/admin_biz/do/biz_admin_add_shisetsu.php

    r284 r1325  
    2525        t_image_clear_tmp(session_id());
    2626
    27         biz_addShisetsu($requests['name'], $filename);
     27        db_shisetsu_insert_biz_shisetsu($requests['name'], $filename);
    2828
    2929        admin_biz_client_redirect('biz_shisetsu_list', "施設を追加しました。");
  • OpenPNE/branches/ebihara/prj_dev26_bizfix/webapp_biz/modules/admin_biz/do/biz_admin_delete_shisetsu.php

    r276 r1325  
    1212        $id = $requests['biz_shisetsu_id'];
    1313
    14         biz_deleteShisetsu($id);
     14        db_shisetsu_delete_biz_shisetsu($id);
    1515
    1616        admin_biz_client_redirect('biz_shisetsu_list', "施設を削除しました。");
  • OpenPNE/branches/ebihara/prj_dev26_bizfix/webapp_biz/modules/admin_biz/do/biz_admin_edit_shisetsu.php

    r284 r1325  
    3131
    3232            //変更前の画像を削除
    33             $shisetsu = biz_getShisetsuData($requests['biz_shisetsu_id']);
     33            $shisetsu = db_shisetsu_biz_shisetsu4biz_shisetsu_id($requests['biz_shisetsu_id']);
    3434            biz_deleteImage($shisetsu['image_filename']);
    3535        }
     
    3737
    3838
    39         biz_editShisetsu($requests['biz_shisetsu_id'], $requests['name'], $filename);
     39        db_shisetsu_edit_biz_shisetsu($requests['biz_shisetsu_id'], $requests['name'], $filename);
    4040
    4141        admin_biz_client_redirect('biz_shisetsu_list', "施設を編集しました。");
  • OpenPNE/branches/ebihara/prj_dev26_bizfix/webapp_biz/modules/admin_biz/init.inc

    r312 r1325  
    2323require_once $module_lib_dir . '/hash_admin.php';
    2424require_once $module_lib_dir . '/biz_admin.php';
     25
     26_include_dir(OPENPNE_WEBAPP_BIZ_DIR . '/lib/db');
    2527
    2628$biz_dir = OPENPNE_MODULES_BIZ_DIR.'/biz/';  //bizモジュールディレクトリの定義
  • OpenPNE/branches/ebihara/prj_dev26_bizfix/webapp_biz/modules/admin_biz/page/biz_edit_shisetsu.php

    r269 r1325  
    1212        $v = array();
    1313
    14         $v['shisetsu'] = biz_getShisetsuData($requests['biz_shisetsu_id']);
     14        $v['shisetsu'] = db_shisetsu_biz_shisetsu4biz_shisetsu_id($requests['biz_shisetsu_id']);
    1515
    1616        $this->set($v);
  • OpenPNE/branches/ebihara/prj_dev26_bizfix/webapp_biz/modules/biz/do/f_home_add_biz_schedule.php

    r365 r1325  
    6868        }
    6969
    70         biz_insertSchedule($title, $target_id, $begin_date, $finish_date, $begin_time, $finish_time, '', 0, 0, array($target_id));  //予定の登録
     70        db_schedule_insert_biz_schedule($title, $target_id, $begin_date, $finish_date, $begin_time, $finish_time, '', 0, 0, array($target_id));  //予定の登録
    7171        $p = array('target_c_member_id' => $target_id);
    7272        openpne_redirect('pc', 'page_f_home', $p);
  • OpenPNE/branches/ebihara/prj_dev26_bizfix/webapp_biz/modules/biz/do/f_home_check_biz_todo.php

    r1181 r1325  
    2020                    handle_kengen_error();
    2121                }
    22         biz_checkTodo($chid, $is_check);
     22        db_todo_update_biz_is_check($chid, $is_check);
    2323
    2424        $p = array('target_c_member_id' => $id);
  • OpenPNE/branches/ebihara/prj_dev26_bizfix/webapp_biz/modules/biz/do/f_home_delete_biz_todo.php

    r1181 r1325  
    1919                    handle_kengen_error();
    2020                }
    21         biz_deleteTodo($delid);
     21        db_todo_delete_biz_todo($delid);
    2222
    2323        $p = array('target_c_member_id' => $id);
  • OpenPNE/branches/ebihara/prj_dev26_bizfix/webapp_biz/modules/biz/do/f_home_edit_biz_todo.php

    r1181 r1325  
    2525                }
    2626
    27         biz_editTodo($requests['target_id'], $memo, $writer_id, $sort_order, $is_check, $id);
     27        db_todo_edit_biz_todo($requests['target_id'], $memo, $writer_id, $sort_order, $is_check, $id);
    2828
    2929        $p = array('target_c_member_id' => $requests['target_id']);
  • OpenPNE/branches/ebihara/prj_dev26_bizfix/webapp_biz/modules/biz/do/f_home_insert_biz_todo.php

    r365 r1325  
    1818        // ----------
    1919
    20         biz_insertTodo($id, $todo, $u, 0, $is_all);
     20        db_todo_insert_biz_todo($id, $todo, $u, 0, $is_all);
    2121
    2222        $p = array('target_c_member_id' => $id);
  • OpenPNE/branches/ebihara/prj_dev26_bizfix/webapp_biz/modules/biz/do/fh_biz_schedule_edit.php

    r1087 r1325  
    2323            $msg = '存在しない日付が指定されました。';
    2424
    25             $schedule = biz_getScheduleInfo($requests['schedule_id']);
     25            $schedule = db_schedule_biz_schedule4biz_schedule_id($requests['schedule_id']);
    2626
    2727            $begin_date = $schedule['begin_date'];
     
    129129            $finish_date = date("Y-m-d", strtotime($requests['sc_b_year'].'-'.$requests['sc_b_month'].'-'.($requests['sc_b_date']+($requests['sc_bn']-1))));
    130130            //繰り返しをしない予定登録
    131             biz_editSchedule($requests['sc_title'], $u, $begin_date, $finish_date, $begin_time, $finish_time, $requests['sc_memo'], $rp_rule, 0, $requests['biz_group_id'], $requests['public_flag'], $requests['schedule_id']);
     131            db_schedule_edit_biz_schedule($requests['sc_title'], $u, $begin_date, $finish_date, $begin_time, $finish_time, $requests['sc_memo'], $rp_rule, 0, $requests['biz_group_id'], $requests['public_flag'], $requests['schedule_id']);
    132132            $schedule_id = $requests['schedule_id'];
    133133        } else {
     
    144144            if ($requests['iskeep']) {
    145145                //繰り返し予定グループの維持(同予定から派生した繰り返し予定を一斉に編集)
    146                 $replist = biz_getRepeatScheduleID($requests['schedule_id']);
     146                $replist = db_schedule_biz_repeat_schedule_list4biz_schedule_id($requests['schedule_id']);
    147147                foreach ($replist as $value) {
    148                     biz_deleteSchedule($value);  //既存の繰り返し予定をすべて削除(予定日数の追加、削除のケースがありうるため)
     148                    db_schedule_delete_biz_schedule($value);  //既存の繰り返し予定をすべて削除(予定日数の追加、削除のケースがありうるため)
    149149                }
    150150            }
     
    158158               
    159159                if ($rp_rule & (1 << date("w", $nowday))) {
    160                     biz_insertSchedule($requests['sc_title'], $u, date("Y-m-d", $tmp), date("Y-m-d", $tmp), $begin_time, $finish_time, $requests['sc_memo'], $rp_rule, $first_id, $requests['biz_group_id'], $requests['public_flag']);
     160                    db_schedule_insert_biz_schedule($requests['sc_title'], $u, date("Y-m-d", $tmp), date("Y-m-d", $tmp), $begin_time, $finish_time, $requests['sc_memo'], $rp_rule, $first_id, $requests['biz_group_id'], $requests['public_flag']);
    161161                }
    162162            }
  • OpenPNE/branches/ebihara/prj_dev26_bizfix/webapp_biz/modules/biz/do/fhg_biz_schedule_add.php

    r1087 r1325  
    165165        if (!$requests['sc_rp']) {
    166166            //繰り返しをしない予定登録
    167             biz_insertSchedule($requests['sc_title'], $u, $begin_date, $finish_date, $begin_time, $finish_time, $requests['sc_memo'], $rp_rule, 0, $requests['biz_group_id'], $requests['public_flag']);
     167            db_schedule_insert_biz_schedule($requests['sc_title'], $u, $begin_date, $finish_date, $begin_time, $finish_time, $requests['sc_memo'], $rp_rule, 0, $requests['biz_group_id'], $requests['public_flag']);
    168168        } else {
    169169            //繰り返し予定
     
    174174                $tmp = date("Ymd", $nowday);
    175175                if ($rp_rule & (1 << date("w",$nowday))) {
    176                     biz_insertSchedule($requests['sc_title'], $u, $tmp, $tmp, $begin_time, $finish_time, $requests['sc_memo'], $rp_rule, $first_id, $requests['biz_group_id'], $requests['public_flag']);
     176                    db_schedule_insert_biz_schedule($requests['sc_title'], $u, $tmp, $tmp, $begin_time, $finish_time, $requests['sc_memo'], $rp_rule, $first_id, $requests['biz_group_id'], $requests['public_flag']);
    177177                }
    178178            }
  • OpenPNE/branches/ebihara/prj_dev26_bizfix/webapp_biz/modules/biz/do/g_home_add_biz_schedule.php

    r1087 r1325  
    4242        }
    4343
    44         biz_insertSchedule($title, $u, $begin_date, $finish_date, $begin_time, $finish_time, '', 0, 0, $target_id, 'group');  //予定の登録
    45         biz_readSchedule($u, biz_getScheduleMax());  //既読済みに
     44        db_schedule_insert_biz_schedule($title, $u, $begin_date, $finish_date, $begin_time, $finish_time, '', 0, 0, $target_id, 'group');  //予定の登録
     45        db_schedule_update_biz_schedule_is_checked($u, biz_getScheduleMax());  //既読済みに
    4646
    4747        $p = array('target_c_commu_id' => $target_id);
  • OpenPNE/branches/ebihara/prj_dev26_bizfix/webapp_biz/modules/biz/do/g_join_group.php

    r365 r1325  
    1313        $target_id = $request['target_id'];
    1414
    15         biz_joinGroup($u, $target_id);
     15        db_group_insert_biz_group_member($u, $target_id);
    1616
    1717        $p = array();
  • OpenPNE/branches/ebihara/prj_dev26_bizfix/webapp_biz/modules/biz/do/h_biz_group_add.php

    r365 r1325  
    3333        t_image_clear_tmp(session_id());
    3434
    35         biz_insertGroup($requests['name'], $u, $requests['info'], $filename, $requests['member_list']);
     35        db_group_insert_biz_group($requests['name'], $u, $requests['info'], $filename, $requests['member_list']);
    3636
    3737        $p = array('target_c_commu_id' => biz_getGroupMax());
  • OpenPNE/branches/ebihara/prj_dev26_bizfix/webapp_biz/modules/biz/do/h_biz_group_delete.php

    r365 r1325  
    1313        $sessid = session_id();
    1414
    15         biz_deleteGroup($requests['target_id']);
     15        db_group_delete_biz_group($requests['target_id']);
    1616
    1717        $p = array('msg' => 'グループを削除しました。');
  • OpenPNE/branches/ebihara/prj_dev26_bizfix/webapp_biz/modules/biz/do/h_biz_group_edit.php

    r365 r1325  
    3434        t_image_clear_tmp(session_id());
    3535
    36         biz_editGroup($id, $requests['name'], $u, $requests['info'], $filename, $requests['member_list']);
     36        db_group_update_biz_group($id, $requests['name'], $u, $requests['info'], $filename, $requests['member_list']);
    3737
    3838        $p = array('msg' => 'グループを編集しました。', 'target_c_commu_id' => $id);
  • OpenPNE/branches/ebihara/prj_dev26_bizfix/webapp_biz/modules/biz/do/h_biz_group_image_delete.php

    r365 r1325  
    1212        $sessid = session_id();
    1313
    14         biz_deleteGroupImage($requests['id'], $requests['filename']);
     14        db_group_delete_biz_group_image($requests['id'], $requests['filename']);
    1515
    1616        $p = array('msg' => '画像を削除しました', 'target_id' => $requests['id']);
  • OpenPNE/branches/ebihara/prj_dev26_bizfix/webapp_biz/modules/biz/do/h_biz_schedule_delete.php

    r1087 r1325  
    1717
    1818        if ($requests['is_rep']) {
    19             $rep_schedule = biz_getRepeatScheduleID($requests['schedule_id']);
     19            $rep_schedule = db_schedule_biz_repeat_schedule_list4biz_schedule_id($requests['schedule_id']);
    2020            foreach ($rep_schedule as $value) {
    21                 biz_deleteSchedule($value);
     21                db_schedule_delete_biz_schedule($value);
    2222            }
    2323        } else {
    24             biz_deleteSchedule($requests['schedule_id']);
     24            db_schedule_delete_biz_schedule($requests['schedule_id']);
    2525        }
    2626
  • OpenPNE/branches/ebihara/prj_dev26_bizfix/webapp_biz/modules/biz/do/h_biz_shisetsu_delete.php

    r924 r1325  
    1111        $u = $GLOBALS['AUTH']->uid();
    1212        $sessid = session_id();
    13         biz_deleteShisetsuImage($requests['id'], $requests['filename']);
     13        db_shisetsu_delete_biz_shisetsu_image($requests['id'], $requests['filename']);
    1414
    1515        $p = array('id' => $requests['id']);
  • OpenPNE/branches/ebihara/prj_dev26_bizfix/webapp_biz/modules/biz/do/h_home_add_biz_schedule.php

    r1087 r1325  
    6262        }
    6363
    64         biz_insertSchedule($title, $u, $begin_date, $finish_date, $begin_time, $finish_time, '', 0, 0);  //予定の登録
    65         biz_readSchedule($u, biz_getScheduleMax());  //既読に
     64        db_schedule_insert_biz_schedule($title, $u, $begin_date, $finish_date, $begin_time, $finish_time, '', 0, 0);  //予定の登録
     65        db_schedule_update_biz_schedule_is_checked($u, biz_getScheduleMax());  //既読に
    6666
    6767        $p = array();
  • OpenPNE/branches/ebihara/prj_dev26_bizfix/webapp_biz/modules/biz/do/h_home_check_biz_todo.php

    r1181 r1325  
    1616        // ----------
    1717
    18         biz_checkTodo($chid, $is_check);
     18        db_todo_update_biz_is_check($chid, $is_check);
    1919
    2020                if (!biz_isPermissionTodo($u, $chid)) {
  • OpenPNE/branches/ebihara/prj_dev26_bizfix/webapp_biz/modules/biz/do/h_home_delete_biz_todo.php

    r1181 r1325  
    1515        // ----------
    1616
    17         biz_deleteTodo($delid);
     17        db_todo_delete_biz_todo($delid);
    1818
    1919        if (!biz_isPermissionTodo($u, $delid)) {
  • OpenPNE/branches/ebihara/prj_dev26_bizfix/webapp_biz/modules/biz/do/h_home_edit_biz_todo.php

    r1181 r1325  
    3333        $member_info = db_common_c_member4c_member_id_LIGHT($writer_id);
    3434
    35         $todo_info = biz_getTodo($id);
     35        $todo_info = db_todo_biz_todo4biz_todo_id($id);
    3636
    3737        $due_datetime = $due_year . '-' . $due_month . '-' . $due_day . ' 00:00:00';
     
    4040        }
    4141
    42         biz_editTodo($todo_info['c_member_id'], $memo, $writer_id, $sort_order, $is_check, $id,
     42        db_todo_edit_biz_todo($todo_info['c_member_id'], $memo, $writer_id, $sort_order, $is_check, $id,
    4343            $is_done, $due_datetime, $priority, $biz_group_id, $public_flag);
    4444
  • OpenPNE/branches/ebihara/prj_dev26_bizfix/webapp_biz/modules/biz/do/h_home_edit_nickname.php

    r365 r1325  
    1616        // ----------
    1717
    18         biz_changeNickname($member_id, $state);
     18        db_member_update_nickname($member_id, $state);
    1919
    2020        $p = array();
  • OpenPNE/branches/ebihara/prj_dev26_bizfix/webapp_biz/modules/biz/do/h_home_insert_biz_todo.php

    r365 r1325  
    1717        // ----------
    1818
    19         biz_insertTodo($u, $todo, $u, 0, $is_all);
     19        db_todo_insert_biz_todo($u, $todo, $u, 0, $is_all);
    2020
    2121        $p = array();
  • OpenPNE/branches/ebihara/prj_dev26_bizfix/webapp_biz/modules/biz/do/s_add_schedule.php

    r942 r1325  
    4545
    4646        //($shisetsu_id, $member_id, $date, $begin_time, $finish_time)
    47         biz_addShisetsuSchedule($requests['shisetsu_id'], $u, $requests['start_date'], $begin_time_str, $finish_time_str);
     47        db_shisetsu_insert_biz_shisetsu_schedule($requests['shisetsu_id'], $u, $requests['start_date'], $begin_time_str, $finish_time_str);
    4848
    4949        $p = array(
  • OpenPNE/branches/ebihara/prj_dev26_bizfix/webapp_biz/modules/biz/do/s_add_shisetsu.php

    r786 r1325  
    2929        t_image_clear_tmp(session_id());
    3030
    31         biz_addShisetsu($requests['name'], $filename, $requests['info']);
     31        db_shisetsu_insert_biz_shisetsu($requests['name'], $filename, $requests['info']);
    3232
    3333        $p = array('msg' => '施設を追加しました');
  • OpenPNE/branches/ebihara/prj_dev26_bizfix/webapp_biz/modules/biz/do/s_delete_schedule.php

    r269 r1325  
    1414        $sessid = session_id();
    1515
    16         biz_deleteShisetsuSchedule($requests['shisetsu_id']);
     16        db_shisestu_delete_biz_shisetsu_schedule($requests['shisetsu_id']);
    1717
    1818        $p = array('msg' => '施設スケジュールを削除しました');
  • OpenPNE/branches/ebihara/prj_dev26_bizfix/webapp_biz/modules/biz/do/s_delete_shisetsu.php

    r269 r1325  
    1616        $id = $requests['target_id'];
    1717
    18         biz_deleteShisetsu($id);
     18        db_shisetsu_delete_biz_shisetsu($id);
    1919
    2020        $p = array('msg' => '施設情報を削除しました' );
  • OpenPNE/branches/ebihara/prj_dev26_bizfix/webapp_biz/modules/biz/do/s_edit_shisetsu.php

    r786 r1325  
    3838        t_image_clear_tmp(session_id());
    3939
    40         biz_editShisetsu($id, $requests['name'], $filename, $requests['info']);
     40        db_shisetsu_edit_biz_shisetsu($id, $requests['name'], $filename, $requests['info']);
    4141
    4242        $p = array('msg' => '施設を編集しました');
  • OpenPNE/branches/ebihara/prj_dev26_bizfix/webapp_biz/modules/biz/init.inc

    r1081 r1325  
    66
    77//ライブラリの読み込み
     8_include_dir(OPENPNE_WEBAPP_BIZ_DIR . '/lib/db');
    89$biz_lib_dir = dirname(__FILE__) . '/lib';
    910require_once($biz_lib_dir . '/mysql_functions.php');  //MySQLを使用する関数群の定義されたライブラリ
  • OpenPNE/branches/ebihara/prj_dev26_bizfix/webapp_biz/modules/biz/lib/mysql_functions.php

    r1187 r1325  
    6161}
    6262
    63 //指定された予定IDの情報を得る関数
    64 function biz_getScheduleInfo($schedule_id)
    65 {
    66     $sql = 'SELECT * FROM biz_schedule WHERE biz_schedule_id = ?';
    67     $params = array(
    68         intval($schedule_id),
    69     );
    70     return db_get_row($sql, $params);
    71 }
    72 
    7363function biz_getMemberNickname($c_member_id)
    7464{
     
    7969
    8070    return db_get_one($sql, $params);
    81 }
    82 
    83 //指定された予定と同じ繰り返しグループに属するすべての予定idを得る関数
    84 function biz_getRepeatScheduleID($schedule_id)
    85 {
    86     $sql = 'SELECT rep_first FROM biz_schedule WHERE biz_schedule_id = ?';
    87     $params = array(
    88         intval($schedule_id),
    89     );
    90     $first_id = db_get_one($sql, $params);
    91 
    92     $sql = 'SELECT biz_schedule_id FROM biz_schedule WHERE rep_first = ? ORDER BY begin_date';
    93     $params = array(
    94         intval($first_id),
    95     );
    96     $schedule = db_get_col($sql, $params);
    97 
    98     return $schedule;
    9971}
    10072
     
    139111function biz_isPermissionSchedule($u, $biz_schedule_id)
    140112{
    141     $biz_schedule = biz_getScheduleInfo($biz_schedule_id);
     113    $biz_schedule = db_schedule_biz_schedule4biz_schedule_id($biz_schedule_id);
    142114    $public_flag = $biz_schedule['public_flag'];
    143115    $biz_group_id = $biz_schedule['biz_group_id'];
     
    146118    switch ($public_flag) {
    147119    case 'group' :  //グループのメンバーにのみ権限が与えられる予定
    148         if (biz_isGroupMember($u, $biz_group_id)) {
     120        if (db_group_is_biz_group_member($u, $biz_group_id)) {
    149121            return true;
    150122        } else {
     
    164136}
    165137
    166 //指定された日付に存在する特定ユーザの予定idのみを得る関数
    167 function biz_getDateMemberSchedule($y, $m, $d, $target_c_member_id, $u)
    168 {
    169     $schedule = array();
    170     $contain = array();
    171 
    172     $tmp = biz_getDateSchedule($y, $m, $d);
    173     $sc_list = array();
    174    
    175     $biz_group_id_list = array();
    176     foreach(biz_getJoinGroup($target_c_member_id) as $value) {
    177         $biz_group_id_list[] = $value['biz_group_id'];
    178     }
    179 
    180     foreach ($tmp as $biz_schedule_id) {
    181         $biz_schedule = biz_getScheduleInfo($biz_schedule_id);
    182 
    183         if (biz_isPermissionSchedule($u, $biz_schedule_id)) {
    184                 if ($biz_schedule['c_member_id'] == $target_c_member_id) {
    185                     $contain[] = $biz_schedule_id;
    186                 } elseif(in_array($biz_schedule['biz_group_id'], $biz_group_id_list) && ($value['public_flag'] != 'private')) {
    187                     $contain[] = $biz_schedule_id;
    188                 }
    189         }
    190     }
    191 
    192     $tmp = array_unique($tmp);
    193 
    194     foreach ($contain as $key => $value) {
    195         if (!is_null($value)) {
    196            
    197             //そのidの予定を得る
    198             $sql = 'SELECT * FROM biz_schedule WHERE biz_schedule_id = ?';
    199             $params = array(
    200                 $value,
    201             );
    202             $schedule += array($key => db_get_row($sql, $params));
    203         }
    204     }
    205     return $schedule;
    206 }
    207 
    208138//指定された予定idの保持するユーザidを得る関数
    209139function biz_getJoinIdSchedule($id)
     
    238168
    239169    return $schedule;
    240 }
    241 
    242 //指定された予定IDを保持しているユーザ名を得る関数
    243 function biz_getJoinMemberSchedule($id)
    244 {
    245     $sql = 'SELECT c_member_id FROM biz_schedule_member WHERE biz_schedule_id = ?';
    246     $params = array(
    247         intval($id),
    248     );
    249 
    250     $tmp = db_get_col($sql, $params);
    251     $members = array();
    252 
    253     foreach ($tmp as $value) {
    254         $sql = 'SELECT nickname FROM c_member WHERE c_member_id = ?';
    255         $params = array(
    256             $value,
    257         );
    258 
    259         $members[$value] = db_get_one($sql, $params);
    260     }
    261 
    262     return $members;
    263170}
    264171
     
    299206}
    300207
    301 //指定メンバーidが加入しているグループ数を得る関数
    302 function biz_getGroupCount($id)
    303 {
    304     $sql = 'SELECT * FROM biz_group_member WHERE c_member_id = ?';
    305 
    306     $params = array(
    307         intval($id),
    308     );
    309 
    310 
    311     return count(db_get_col($sql, $params));
    312 }
    313 
    314 //指定グループidのメンバーを得る関数
    315 function biz_getGroupMember($id, $limit=null, $start=null)
    316 {
    317     $params = array(
    318         intval($id),
    319     );
    320 
    321     $sql = 'SELECT * FROM biz_group_member WHERE biz_group_id = ? ';
    322 
    323     if ($start) {
    324         $sql .= 'AND c_member_id <= ? ';
    325         $params[] = $start;
    326     }
    327 
    328     $sql .= 'ORDER BY c_member_id';
    329 
    330     if ($limit) {
    331         $list = db_get_all_limit($sql, 0, $limit, $params);
    332     } else {
    333         $list = db_get_all($sql, $params);
    334     }
    335 
    336     return $list;
    337 }
    338 
    339 //指定されたグループidの情報を得る関数
    340 function biz_getGroupData($id)
    341 {
    342     $sql = "SELECT * FROM biz_group WHERE biz_group_id = ?";
    343     $params = array(
    344         intval($id),
    345     );
    346     if (!$group = db_get_row($sql, $params))
    347         return array();
    348 
    349     return $group;
    350 }
    351 
    352208//指定メンバーidが加入しているグループの情報を得る関数
    353209function biz_getJoinGroup($id, $limit = null)
     
    369225
    370226    foreach ($list as $key => $value) {
    371         $list[$key] += biz_getGroupData($value['biz_group_id']);
    372         $list[$key]['count'] = count(biz_getGroupMember($value['biz_group_id']));
    373     }
    374 
    375     return $list;
    376 }
    377 
    378 //指定メンバーがグループに所属しているかどうかを返す関数
    379 function biz_isGroupMember($member_id, $group_id)
    380 {
    381     $sql = 'SELECT * FROM biz_group_member WHERE c_member_id = ? AND biz_group_id = ?';
    382     $params = array(
    383         intval($member_id),
    384         intval($group_id),
    385     );
    386 
    387     return db_get_one($sql, $params);
    388 }
    389 
    390 //指定された条件に見合うグループのリストを得る関数
    391 function biz_getGroupList($keyword='', $start=0, $num=20, $order='biz_group_id')
    392 {
    393 
    394     //keywordあり
    395     if ($keyword) {
    396         $sql = 'SELECT * FROM biz_group WHERE 1 AND (info LIKE ? OR name LIKE ?) ORDER BY ?';
    397 
    398         $params = array(
    399             '%'.$keyword.'%',
    400             '%'.$keyword.'%',
    401             $order,
    402         );
    403         $list = db_get_all_limit($sql, $start, ($start + $num), $params);
    404     //keywordなし(全件表示)
    405     } else {
    406         $sql = 'SELECT * FROM biz_group ORDER BY ?';
    407 
    408         $params = array(
    409             $order,
    410         );
    411         $list = db_get_all_limit($sql, $start, ($start + $num), $params);
    412     }
    413 
    414     if (!$list) {
    415         return array();
    416     }
    417 
    418     foreach ($list as $key => $value) {
    419         $count = count(biz_getGroupMember($value['biz_group_id']));
    420         $list[$key]['count'] = $count;
    421     }
    422 
    423     return $list;
    424 }
    425 
    426 //指定日の施設予定を得る関数
    427 function biz_getShisetsuSchedule($y, $m, $d, $id=false)
    428 {
    429     $params = array(
    430         intval($y),
    431         intval($m),
    432         intval($d),
    433     );
    434 
    435     if ($id) {
    436         $params[] = intval($id);
    437         $sql = 'SELECT * FROM `biz_shisetsu_schedule` WHERE `date` = "?-?-?" AND biz_shisetsu_id = ? ORDER BY begin_time ASC';
    438     } else {
    439         $sql = 'SELECT * FROM `biz_shisetsu_schedule` WHERE `date` = "?-?-?" ORDER BY begin_time ASC';
    440     }
    441     $list = db_get_all($sql, $params);
    442     foreach ($list as $key => $value) {
    443         $params = array(
    444             intval($list[$key]['c_member_id']),
    445         );
    446         $sql = 'SELECT nickname FROM c_member WHERE c_member_id = ?';
    447         $list[$key]['c_member_name'] = db_get_one($sql, $params);
     227        $list[$key] += db_group_biz_group4biz_group_id($value['biz_group_id']);
     228        $list[$key]['count'] = count(db_group_biz_group_member_list4biz_group_id($value['biz_group_id']));
    448229    }
    449230
     
    480261}
    481262
    482 //指定施設の情報を得る関数
    483 function biz_getShisetsuData($shisetsu_id)
    484 {
    485     $sql = 'SELECT * FROM biz_shisetsu WHERE biz_shisetsu_id = ?';
    486 
    487     $params = array(
    488         intval($shisetsu_id),
    489     );
    490 
    491     $list = db_get_row($sql, $params);
    492 
    493     return $list;
    494 }
    495 
    496263//バッティングしているかどうかを判定する関数
    497264function biz_isBatting($shisetsu_id, $y, $m, $d, $begin_time, $finish_time)
    498265{
    499     $list = biz_getShisetsuSchedule($y, $m, $d, $shisetsu_id);
     266    $list = db_shisetsu_biz_shisetsu_schedule_list_date4biz_shisetsu_id($y, $m, $d, $shisetsu_id);
    500267
    501268    if (empty($list)) {
     
    575342
    576343            if (($begin_date < $testing) && ($finish_date > $testing)) {
    577                 $schedule += biz_getScheduleInfo($value['biz_schedule_id']);
     344                $schedule += db_schedule_biz_schedule4biz_schedule_id($value['biz_schedule_id']);
    578345            }
    579346        }
     
    586353function biz_isPermissionTodo($u, $biz_todo_id)
    587354{
    588     $biz_todo = biz_getTodo($biz_todo_id);
     355    $biz_todo = db_todo_biz_todo4biz_todo_id($biz_todo_id);
    589356    $public_flag = $biz_todo['public_flag'];
    590357    $biz_group_id = $biz_todo['biz_group_id'];
     
    593360    switch ($public_flag) {
    594361    case 'group' :  //グループのメンバーにのみ権限が与えられるTodo
    595         if (biz_isGroupMember($u, $biz_group_id)) {
     362        if (db_group_is_biz_group_member($u, $biz_group_id)) {
    596363            return true;
    597364        } else {
     
    611378}
    612379
    613 //指定メンバーのTodoを得る
    614 function biz_getMemberTodo($u, $target_c_member_id, $cat = null)
    615 {
    616     $sql = 'SELECT * FROM biz_todo WHERE c_member_id = ? AND is_check = ? ORDER BY biz_todo_id DESC;';  //メンバーが保有しているtodoid一覧
    617     $params = array(
    618         intval($target_c_member_id),
    619         intval($cat),
    620     );
    621 
    622     //priorityの高い順にソート
    623     $membertodo = db_get_all($sql, $params);
    624         foreach ($membertodo as $key => $row) {
    625            $priority[$key]  = $row['priority'];
    626         }
    627     if(!is_null($priority)) {
    628         array_multisort($priority, SORT_ASC, $membertodo);
    629     }
    630 
    631     $sql = 'SELECT * FROM biz_todo WHERE c_member_id = 0 AND is_check = ? ORDER BY biz_todo_id DESC;';  //共有Todo
    632     $params = array(
    633         intval($cat),
    634     );
    635     $sharetodo = db_get_all($sql, $params);
    636 
    637     $list = array();  //各Todoの連結処理
    638 
    639     foreach (array_merge($membertodo, $sharetodo) as $key => $value) {
    640         if (biz_isPermissionTodo($u, $value['biz_todo_id'])) {
    641                 $sql = 'SELECT nickname FROM c_member WHERE c_member_id = ?';
    642                 $params = array(
    643                     intval($value['writer_id']),
    644                 );
    645             $list[$key] = $value;
    646                 $list[$key]['writer_name'] = db_get_one($sql, $params);
    647         }
    648     }
    649 
    650     return $list;
    651 }
    652 
    653 //指定idのTodoを得る
    654 function biz_getTodo($id)
    655 {
    656     //メンバーが保有しているtodoid一覧
    657     $sql = 'SELECT * FROM biz_todo WHERE biz_todo_id = ?';
    658 
    659     $params = array(
    660         intval($id),
    661     );
    662 
    663     return db_get_row($sql, $params);
    664 }
    665 
    666 //カレンダー表示用期限付きTodoリストの取得
    667 function biz_schedule_todo4c_member_id($u, $c_member_id, $year, $month, $day = null)
    668 {
    669     $sql = 'SELECT biz_todo_id FROM biz_todo WHERE c_member_id = ?';
    670     $params = array(intval($c_member_id));
    671     $ids = db_get_col($sql, $params);
    672     $ids = implode(', ', $ids);
    673     if (!$ids) {
    674         return array();
    675     }
    676 
    677     if (!is_null($day)) {
    678             $sql = 'SELECT * FROM biz_todo WHERE biz_todo_id IN ('.$ids.')' .
    679                     ' AND due_datetime = ?';
    680             $params = array(
    681                 sprintf('%04d-%02d-%02d', intval($year), intval($month), intval($day)) . ' 00:00:00',
    682             );
    683 
    684         $list = array();
    685             foreach(db_get_all($sql, $params) as $key => $value) {
    686             if(biz_isPermissionTodo($u, $value['biz_todo_id'])) {
    687                         $list[$key] = $value;
    688             }
    689         }
    690        
    691         return $list;
    692     } else {
    693             $sql = 'SELECT * FROM biz_todo WHERE biz_todo_id IN ('.$ids.')' .
    694                     ' AND due_datetime > ? AND due_datetime <= ?';
    695             $params = array(
    696                 sprintf('%04d-%02d', intval($year), intval($month)) . '-00 00:00:00',
    697                 sprintf('%04d-%02d', intval($year), intval($month)) . '-31 23:59:59'
    698             );
    699             $list = db_get_all($sql, $params);
    700 
    701             $res = array();
    702             foreach ($list as $item) {
    703             if(biz_isPermissionTodo($u, $item['biz_todo_id'])) {
    704                         $day = date('j', strtotime($item['due_datetime']));
    705                         $res[$day][] = $item;
    706             }
    707             }
    708             return $res;
    709     }
    710 }
    711 
    712380//自分が投稿したTodoの一覧を得る
    713381function biz_getPostedTodo($id, $limit = null)
     
    748416}
    749417
    750 // 参加グループリスト
    751 function biz_getJoinGroupList($c_member_id, $page, $page_size)
    752 {
    753     $start = ($page - 1) * $page_size;
    754 
    755     $sql = "SELECT biz_group.*" .
    756             " FROM biz_group_member , biz_group";
    757     $sql .= " WHERE biz_group_member.c_member_id = ?";
    758     $sql .= " AND biz_group.biz_group_id=biz_group_member.biz_group_id";
    759     $sql .= " ORDER BY biz_group.biz_group_id DESC ";
    760 
    761     $params = array(
    762         intval($c_member_id),
    763     );
    764 
    765     $biz_group_list = db_get_all_limit($sql, $start, $page_size, $params);
    766 
    767     foreach ($biz_group_list as $key => $value) {
    768         $biz_group_list[$key]['count_members'] =
    769            count(biz_getGroupMember($value['biz_group_id']));
    770     }
    771 
    772     $pager = array(
    773         "total_num" => biz_getGroupCount($c_member_id),
    774         "disp_num"  => count($biz_group_list),
    775         "start_num" => 0,
    776         "end_num"   => 0,
    777         "total_page" => 0,
    778         "prev_page" => 0,
    779         "next_page" => 0,
    780     );
    781 
    782     if ($pager['disp_num'] > 0) {
    783         $pager['start_num'] = $start + 1;
    784         $pager['end_num'] = $pager['start_num'] + $pager['disp_num'] - 1;
    785     }
    786 
    787     if ($pager['total_num']) { 
    788         $pager['total_page'] = ceil($pager['total_num'] / $page_size);
    789 
    790         if ($page < $pager['total_page']) {
    791             $pager['next_page'] = max($page + 1, 1);
    792         }
    793         if ($page > 1) {
    794             $pager['prev_page'] = min($page - 1, $pager['total_page']);
    795         }
    796     }
    797 
    798     return array($biz_group_list, $pager);
    799 }
    800 
    801 
    802418//SET---------------------------------------------
    803 
    804 //スケジュール登録
    805 function biz_insertSchedule($title, $member_id, $begin_date, $finish_date, $begin_time = null, $finish_time = null,
    806                                                         $value = '', $rep_type, $first_id = 0,
    807                                                         $biz_group_id = 0, $public_flag = "public")
    808 {
    809     //登録値のセット、チェック
    810     if (!$value) {
    811         $value = '';
    812     }
    813 
    814     if (!$rep_type) {
    815         $rep_type = 0;
    816     }
    817 
    818     //biz_scheduleにデータを追加する
    819     $data = array(
    820         'title' => $title,
    821         'c_member_id' => intval($member_id),
    822         'begin_date' => $begin_date,
    823         'finish_date' => $finish_date,
    824         'begin_time' => $begin_time,
    825         'finish_time' => $finish_time,
    826         'value' => $value,
    827         'rep_type' => $rep_type,
    828         'rep_first' => $first_id,
    829         'biz_group_id' => $biz_group_id,
    830         'public_flag' => $public_flag,
    831     );
    832     db_insert('biz_schedule', $data);
    833 }
    834 
    835 //スケジュール削除
    836 function biz_deleteSchedule($id, $group = false)
    837 {
    838     if ($group) {
    839         $sql = 'SELECT first_id FROM biz_schedule WHERE biz_schedule_id = ?';
    840         $params = array(intval($id));
    841         $firstid = db_get_one($sql, $params);
    842 
    843         $sql = 'SELECT biz_schedule_id FROM biz_schedule WHERE first_id = ?';
    844         $params = array(intval($firstid));
    845         $schedules = db_get_col($sql, $params);
    846 
    847         $sql = 'DELETE FROM biz_schedule WHERE first_id = ?';
    848         $params = array(intval($firstid));
    849         db_query($sql, $params);
    850 
    851         foreach ($schedules as $nowid) {
    852             $sql = 'DELETE FROM biz_schedule_member WHERE biz_schedule_id = ?';
    853             $params = array(intval($nowid));
    854             db_query($sql, $params);
    855         }
    856     } else {
    857         $sql = 'DELETE FROM biz_schedule WHERE biz_schedule_id = ?';
    858         $params = array(
    859             intval($id),
    860         );
    861         db_query($sql, $params);
    862         $sql = 'DELETE FROM biz_schedule_member WHERE biz_schedule_id = ?';
    863         $params = array(
    864             intval($id),
    865         );
    866         db_query($sql, $params);
    867     }
    868 }
    869 
    870 //スケジュール編集
    871 function biz_editSchedule($title, $member_id, $begin_date, $finish_date, $begin_time = null, $finish_time = null,
    872                                                     $value = '', $rep_type, $first_id = 0,
    873                                                     $biz_group_id = 0, $public_flag = "public",
    874                                                     $id)
    875 {
    876     $sql = 'UPDATE `biz_schedule` SET `title` = ?,`c_member_id` = ?,`begin_date` = ?,`finish_date` = ?,`begin_time` = ?,`finish_time` = ?,`value` = ?,`rep_type` = ?,`rep_first` = ?, `biz_group_id` = ?, `public_flag` = ?, `is_read` = 0 WHERE `biz_schedule_id` = ?';
    877     $params = array(
    878         $title,
    879         $member_id,
    880         $begin_date,
    881         $finish_date,
    882         $begin_time,
    883         $finish_time,
    884         $value,
    885         $rep_type,
    886         $first_id,
    887         $biz_group_id,
    888         $public_flag,
    889         $id,
    890     );
    891     db_query($sql, $params);
    892 }
    893 
    894 //スケジュールを既読済みに
    895 function biz_readSchedule($member_id, $schedule_id)
    896 {
    897     $sql = 'SELECT biz_schedule_member_id FROM biz_schedule_member WHERE biz_schedule_id = ? AND c_member_id = ?';
    898     $params = array(
    899         intval($schedule_id),
    900         intval($member_id),
    901     );
    902     $sid = db_get_one($sql, $params);
    903 
    904     $sql = 'UPDATE `biz_schedule_member` SET `is_read` = \'1\' WHERE `biz_schedule_member_id` = ?';
    905     $params = array(
    906         intval($sid),
    907     );
    908     db_query($sql, $params);
    909 }
    910 
    911 //グループ登録
    912 function biz_insertGroup($name, $member_id, $info, $image_name, $members = array())
    913 {   
    914     //登録値のセット、チェック
    915     if (!$image_name) {
    916         $image_name = 0;
    917     }
    918     if (!$info) {
    919         $info = "";
    920     }
    921     if (empty($members)) {
    922         $members = array($member_id);
    923     }
    924 
    925     //biz_groupにデータを追加する
    926     $data = array(
    927         'name' => $name,
    928         'info' => $info,
    929         'admin_id' => intval($member_id),
    930         'image_filename' => $image_name,
    931     );
    932     $new_group_id = db_insert('biz_group', $data);
    933 
    934     foreach ($members as $key => $value) {
    935         $data = array(
    936             'c_member_id' => $value,
    937             'biz_group_id' => $new_group_id,
    938         );
    939         db_insert('biz_group_member', $data);
    940     }
    941 }
    942 
    943 function biz_editGroup($biz_group_id, $name, $member_id, $info, $image_name, $members = array())
    944 {
    945     //登録値のセット、チェック
    946     if (!$image_name) {
    947         $image_name = 0;
    948     }
    949 
    950     if (!$info) {
    951         $info = "";
    952     }
    953 
    954     if (empty($members)) {
    955         $members = array($member_id);
    956     }
    957 
    958     //biz_groupにデータを追加する
    959 
    960     $sql = 'UPDATE `biz_group` SET `name` = ?,`info` = ?,`image_filename` = ? WHERE `biz_group_id` = ?';
    961     $params = array(
    962         $name,
    963         $info,
    964         $image_name,
    965         intval($biz_group_id),
    966     );
    967     db_query($sql, $params);
    968 
    969     $sql = 'DELETE FROM biz_group_member WHERE biz_group_id = ?';
    970     $params = array(
    971         intval($biz_group_id),
    972     );
    973     $result = db_query($sql, $params);
    974 
    975     foreach ($members as $key => $value) {
    976         $data = array(
    977             'c_member_id' => $value,
    978             'biz_group_id' => intval($biz_group_id),
    979         );
    980         db_insert('biz_group_member', $data);
    981     }
    982 }
    983 
    984 //グループの削除
    985 function biz_deleteGroup($group_id)
    986 {
    987     $sql = 'DELETE FROM biz_group_member WHERE biz_group_id = ?';
    988     $params = array(
    989         intval($group_id),
    990     );
    991     $result = db_query($sql, $params);
    992     $sql = 'DELETE FROM biz_group WHERE biz_group_id = ?';
    993     $params = array(
    994         intval($group_id),
    995     );    $result = db_query($sql, $params);
    996 
    997 
    998     $sql = 'UPDATE biz_schedule SET public_flag = "private", biz_group_id = NULL WHERE biz_group_id = ?';
    999     db_query($sql, array(intval($group_id)));
    1000 
    1001     $sql = 'DELETE FROM biz_todo WHERE biz_group_id = ?';
    1002     db_query($sql, array(intval($group_id)));
    1003 
    1004 }
    1005 
    1006 //グループに参加
    1007 function biz_joinGroup($member_id, $group_id)
    1008 {
    1009     $data = array(
    1010         'c_member_id' => intval($member_id),
    1011         'biz_group_id' => intval($group_id),
    1012     );
    1013     db_insert('biz_group_member', $data);
    1014 }
    1015 
    1016 //施設追加
    1017 function biz_addShisetsu($name, $image_name, $info = '')
    1018 {
    1019     if (!$image_name) {
    1020         $image_name = '0';
    1021     }
    1022 
    1023     $data = array(
    1024         'name' => $name,
    1025         'image_filename' => $image_name,
    1026         'info' => $info,
    1027     );
    1028     db_insert('biz_shisetsu', $data);
    1029 }
    1030 
    1031 //施設編集
    1032 function biz_editShisetsu($id, $name, $image_name, $info = '')
    1033 {
    1034     if (!$image_name) {
    1035         $image_name = 0;
    1036     }
    1037 
    1038     $sql = 'UPDATE `biz_shisetsu` SET `name` = ?,`image_filename` = ?, `info` = ? WHERE `biz_shisetsu_id` = ?';
    1039     $params = array(
    1040         $name,
    1041         $image_name,
    1042         $info,
    1043         intval($id),
    1044     );
    1045     db_query($sql, $params);
    1046 }
    1047 
    1048 //施設予定追加
    1049 function biz_addShisetsuSchedule($shisetsu_id, $member_id, $date, $begin_time, $finish_time)
    1050 {
    1051     $data = array(
    1052         'c_member_id' => intval($member_id),
    1053         'biz_shisetsu_id' => intval($shisetsu_id),
    1054         'date' => $date,
    1055         'begin_time' => $begin_time,
    1056         'finish_time' => $finish_time,
    1057     );
    1058     $insert_id = db_insert('biz_shisetsu_schedule', $data);
    1059 
    1060     $data = array(
    1061         'shisetsu_id' => intval($shisetsu_id),
    1062         'schedule_id' => intval($insert_id),
    1063     );
    1064     db_insert('biz_schedule_shisetsu', $data);
    1065 }
    1066 
    1067 //施設予定削除
    1068 function biz_deleteShisetsuSchedule($shisetsu_id)
    1069 {
    1070     $sql = 'DELETE FROM `biz_shisetsu_schedule` WHERE biz_shisetsu_schedule_id = ?';
    1071     $params = array(
    1072         intval($shisetsu_id),
    1073     );
    1074 
    1075     db_query($sql, $params);
    1076 
    1077     return $sql;
    1078 }
    1079 
    1080 //Todo登録
    1081 function biz_insertTodo($member_id, $memo, $writer_id, $sort_order, $is_all,
    1082     $due_datetime = '', $priority = 3, $biz_group_id = '', $public_flag = 'public')
    1083 {
    1084     if ($is_all) {
    1085         //共有Todo
    1086         $member_id = 0;
    1087     } elseif ($member_id == $writer_id) {
    1088         $writer_name = '';
    1089     }
    1090 
    1091     $data = array(
    1092         'c_member_id' => $member_id,
    1093         'memo' => $memo,
    1094         'is_check' => 0,
    1095         'writer_id' => $writer_id,
    1096         'sort_order' => $sort_order,
    1097         'r_datetime' => date("Y-m-d H:i"),
    1098         'due_datetime' => $due_datetime,
    1099         'priority' => $priority,
    1100         'biz_group_id' => $biz_group_id,
    1101         'public_flag' => $public_flag,
    1102     );
    1103     return db_insert('biz_todo', $data);
    1104 }
    1105 
    1106 //Todo登録
    1107 function biz_editTodo($member_id, $memo, $writer_id, $sort_order, $is_all, $biz_todo_id, $is_done, $due_datetime, $priority, $biz_group_id, $public_flag)
    1108 {
    1109     $todo = biz_getTodo($biz_todo_id);
    1110 
    1111     if ($is_all) {
    1112         //共有Todo
    1113         $member_id = 0;
    1114     } elseif ($member_id == $writer_id) {
    1115         $writer_name = '';
    1116     }
    1117 
    1118     if ($is_done != $todo['is_check']) {
    1119         biz_checkTodo($biz_todo_id, $todo['is_check']);
    1120     }
    1121    
    1122     $sql = 'UPDATE `biz_todo` SET `c_member_id` = ?, `memo` = ?, `writer_id` = ?,'
    1123         .'`r_datetime` = ?, `due_datetime` = ?, `priority` = ?, `biz_group_id` = ?,'
    1124         .'`public_flag` = ? WHERE `biz_todo_id` = ?';
    1125 
    1126     $params = array(
    1127         intval($member_id),
    1128         $memo,
    1129         intval($writer_id),
    1130         date("Y-m-d H:i"),
    1131         $due_datetime,
    1132         intval($priority),
    1133         intval($biz_group_id),
    1134         $public_flag,
    1135         intval($biz_todo_id),
    1136     );
    1137 
    1138     $result = db_query($sql, $params);
    1139 
    1140     return $result;
    1141 }
    1142 
    1143 //Todo削除
    1144 function biz_deleteTodo($delid)
    1145 {
    1146     //指定されたTodoを削除
    1147     $sql = 'DELETE FROM biz_todo WHERE biz_todo_id = ?';
    1148 
    1149     $params = array(
    1150         intval($delid),
    1151     );
    1152 
    1153     $result = db_query($sql, $params);
    1154 
    1155     return $result;
    1156 }
    1157 
    1158 //Todoにチェック
    1159 function biz_checkTodo($chid, $is_check)
    1160 {
    1161     if ($is_check) {
    1162     //チェックを解除する
    1163         $sql = 'UPDATE `biz_todo` SET `is_check` = \'0\' WHERE `biz_todo_id` = ?';
    1164     } else {
    1165     //チェックをつける
    1166         $sql = 'UPDATE `biz_todo` SET `is_check` = \'1\' WHERE `biz_todo_id` = ?';
    1167     }
    1168 
    1169     $params = array(
    1170         intval($chid),
    1171     );
    1172 
    1173     $result = db_query($sql, $params);
    1174 }
    1175419
    1176420//画像をDBに格納する
     
    1233477}
    1234478
    1235 function biz_deleteGroupImage($id, $filename)
    1236 {
    1237     $sql = 'UPDATE `biz_group` SET `image_filename` = \'0\' WHERE `biz_group_id` = ?';
    1238     $params = array(
    1239         intval($id),
    1240     );
    1241     db_query($sql, $params);
    1242     biz_deleteImage($filename);
    1243 }
    1244 
    1245 function biz_deleteShisetsuImage($id, $filename)
    1246 {
    1247     $sql = 'UPDATE `biz_shisetsu` SET `image_filename` = \'0\' WHERE `biz_shisetsu_id` = ?';
    1248 
    1249     $params = array(
    1250         intval($id),
    1251     );
    1252 
    1253     db_query($sql, $params);
    1254     biz_deleteImage($filename);
    1255 }
    1256 
    1257 function biz_changeNickname($member_id, $new)
    1258 {
    1259     $sql = 'UPDATE `c_member` SET `nickname` = ? WHERE `c_member_id` = ?';
    1260     $params = array(
    1261         $new,
    1262         intval($member_id),
    1263     );
    1264     $result = db_query($sql, $params);
    1265 
    1266     return $result;
    1267 }
    1268 
    1269 //施設情報削除
    1270 //一緒に施設画像も削除
    1271 function biz_deleteShisetsu($id)
    1272 {
    1273 
    1274     $shisetsu = biz_getShisetsuData($id);
    1275 
    1276     //画像削除
    1277     biz_deleteShisetsuImage($id, $shisetsu['image_filename']);
    1278 
    1279     $sql = 'DELETE FROM `biz_shisetsu` WHERE biz_shisetsu_id = ?';
    1280     $params = array(
    1281         intval($id),
    1282     );
    1283 
    1284     db_query($sql, $params);
    1285 }
    1286 
    1287479//-------------------------------
    1288480//admin
     
    1321513    $send_list = array();
    1322514    foreach ($c_schedule_list as $schedule_id) {
    1323         $value = biz_getScheduleInfo($schedule_id);
     515        $value = db_schedule_biz_schedule4biz_schedule_id($schedule_id);
    1324516        $c_member_id = $value['c_member_id'];
    1325517        $send_list[$c_member_id][] = $value;
     
    1339531}
    1340532
    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 }
    1350533?>
  • OpenPNE/branches/ebihara/prj_dev26_bizfix/webapp_biz/modules/biz/lib/smarty_functions.php

    r1187 r1325  
    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);
     64    $schedule_start_day = db_member_schedule_start_day4c_member_id($member_id);
    6565        if ($schedule_start_day == 2) {
    6666        $start_day = date("w");
     
    9393
    9494        if ($cmd != 's_list') {
    95             $schedule = biz_getDateMemberSchedule($y, $m, $d, $member_id, $u);
     95            $schedule = db_schedule_biz_schedule_list_date4c_member_id($y, $m, $d, $member_id, $u);
    9696            $banner = biz_isBannerSchedule($y, $m, $d, $member_id);
    9797
     
    100100            }
    101101        } else {
    102             $schedule = biz_getShisetsuSchedule($y,$m,$d, $member_id);
     102            $schedule = db_shisetsu_biz_shisetsu_schedule_list_date4biz_shisetsu_id($y,$m,$d, $member_id);
    103103        }
    104104
     
    114114                'event' => p_h_home_event4c_member_id($y, $m, $d, $member_id),
    115115                'schedule' => $schedule,
    116                 'todo' => biz_schedule_todo4c_member_id($u, $member_id, $y, $m, $d),
     116                'todo' => db_schedule_biz_todo_list_date4c_member_id($u, $member_id, $y, $m, $d),
    117117                'holiday' => db_c_holiday_list4date($m, $d),
    118118            );
     
    158158        $mins = biz_makeSerialArray(300, 30, 30);  //分
    159159        $inc_smarty->assign("mins", $mins);
    160         $inc_smarty->assign("list", biz_getShisetsuData($member_id));
     160        $inc_smarty->assign("list", db_shisetsu_biz_shisetsu4biz_shisetsu_id($member_id));
    161161        $config = biz_getConfig();
    162162
     
    195195    }
    196196
    197     $todolist = biz_getMemberTodo($u, $member_id);
    198     $checkedlist = biz_getMemberTodo($u, $member_id, 1);
     197    $todolist = db_todo_biz_todo_list4c_member_id($u, $member_id);
     198    $checkedlist = db_todo_biz_todo_list4c_member_id($u, $member_id, 1);
    199199
    200200    foreach ($todolist as $key => $value) {
     
    266266    $inc_smarty->templates_dir = 'pc/templates';;
    267267    $inc_smarty->assign("group_list", biz_getJoinGroup($c_member_id, 9));
    268     $inc_smarty->assign("group_count", biz_getGroupCount($c_member_id));
     268    $inc_smarty->assign("group_count", db_group_count_biz_group4c_member_id($c_member_id));
    269269
    270270    $content = $inc_smarty->fetch('file:'.OPENPNE_MODULES_BIZ_DIR.'/biz/templates/inc_biz_home_group_list.tpl');
  • OpenPNE/branches/ebihara/prj_dev26_bizfix/webapp_biz/modules/biz/page/fh_biz_schedule_add.php

    r1087 r1325  
    126126        $this->set('is_h', true);
    127127
    128         $biz_group_count = biz_getGroupCount($target_id);
    129         $biz_group_list = biz_getJoinGroupList($target_id, 1, $biz_group_count);
     128        $biz_group_count = db_group_count_biz_group4c_member_id($target_id);
     129        $biz_group_list = db_group_biz_group_list4c_member_id($target_id, 1, $biz_group_count);
    130130
    131131        $this->set('biz_group_list', $biz_group_list[0]);
  • OpenPNE/branches/ebihara/prj_dev26_bizfix/webapp_biz/modules/biz/page/fh_biz_schedule_calendar.php

    r1187 r1325  
    4646        $birth_list = p_h_calendar_birth4c_member_id($month, $target_id);
    4747        // Todo
    48         $todo_list = biz_schedule_todo4c_member_id($u, $target_id, $year, $month);
     48        $todo_list = db_schedule_biz_todo_list_date4c_member_id($u, $target_id, $year, $month);
    4949
    5050        require_once 'Calendar/Month/Weekdays.php';
     
    6363              $day = $Day->thisDay();
    6464
    65               $schedule = biz_getDateMemberSchedule($year, sprintf("%02d", $month), sprintf("%02d", $day), $target_id, $u);
     65              $schedule = db_schedule_biz_schedule_list_date4c_member_id($year, sprintf("%02d", $month), sprintf("%02d", $day), $target_id, $u);
    6666              $banner = biz_isBannerSchedule($year, sprintf("%02d", $month), sprintf("%02d", $day), $target_id);
    6767
  • OpenPNE/branches/ebihara/prj_dev26_bizfix/webapp_biz/modules/biz/page/fh_biz_schedule_edit.php

    r1087 r1325  
    2121        $sessid = session_id();
    2222
    23         $schedule = biz_getScheduleInfo($requests['schedule_id']);
     23        $schedule = db_schedule_biz_schedule4biz_schedule_id($requests['schedule_id']);
    2424
    2525        if (empty($requests['target_id']) || ($requests['target_id'] == $u)) {
     
    177177        $this->set('repeat_term', intval($daycount));
    178178
    179         $biz_group_count = biz_getGroupCount($target_id);
    180         $biz_group_list = biz_getJoinGroupList($target_id, 1, $biz_group_count);
     179        $biz_group_count = db_group_count_biz_group4c_member_id($target_id);
     180        $biz_group_list = db_group_biz_group_list4c_member_id($target_id, 1, $biz_group_count);
    181181
    182182        $this->set('biz_group_list', $biz_group_list[0]);
  • OpenPNE/branches/ebihara/prj_dev26_bizfix/webapp_biz/modules/biz/page/fh_biz_schedule_view.php

    r1087 r1325  
    5656        $this->set("ym", $calendar['ym']);
    5757
    58         $list = biz_getScheduleInfo($requests['id']);
     58        $list = db_schedule_biz_schedule4biz_schedule_id($requests['id']);
    5959
    6060        //繰り返しフラグのチェック
     
    7272        $list['finish_time'] = substr($list['finish_time'], 0, 5);
    7373        if($list['biz_group_id']) {
    74                 $biz_group = biz_getGroupData($list['biz_group_id']);
     74                $biz_group = db_group_biz_group4biz_group_id($list['biz_group_id']);
    7575                $list['biz_group_name'] = $biz_group['name'];
    7676        }
     
    9797        if ($list['rep_type']) {
    9898            //繰り返し予定の場合はまとめて既読済みに
    99             $rep_schedule = biz_getRepeatScheduleID($requests['id']);
     99            $rep_schedule = db_schedule_biz_repeat_schedule_list4biz_schedule_id($requests['id']);
    100100            foreach ($rep_schedule as $value) {
    101                 biz_readSchedule($u, $value);
     101                db_schedule_update_biz_schedule_is_checked($u, $value);
    102102            }
    103103        } else {
    104             biz_readSchedule($u, $requests['id']);
     104            db_schedule_update_biz_schedule_is_checked($u, $requests['id']);
    105105        }
    106106
  • OpenPNE/branches/ebihara/prj_dev26_bizfix/webapp_biz/modules/biz/page/fh_group_list.php

    r406 r1325  
    4141        $this->set("page", $page);
    4242
    43         list($c_commu_list, $pager) = biz_getJoinGroupList($target_c_member_id, $page, $page_size);
     43        list($c_commu_list, $pager) = db_group_biz_group_list4c_member_id($target_c_member_id, $page, $page_size);
    4444
    4545        $this->set("fh_com_list_user", $c_commu_list);
  • OpenPNE/branches/ebihara/prj_dev26_bizfix/webapp_biz/modules/biz/page/fh_home_edit_biz_todo.php

    r1181 r1325  
    1717
    1818        $this->set("id", $requests['id']);
    19         $todo = biz_getTodo($requests['id']);
     19        $todo = db_todo_biz_todo4biz_todo_id($requests['id']);
    2020        $this->set("todo", $todo);
    2121
     
    5454        $this->set("target_id", $target_id);
    5555
    56         $biz_group_count = biz_getGroupCount($target_id);
    57         $biz_group_list = biz_getJoinGroupList($target_id, 1, $biz_group_count);
     56        $biz_group_count = db_group_count_biz_group4c_member_id($target_id);
     57        $biz_group_list = db_group_biz_group_list4c_member_id($target_id, 1, $biz_group_count);
    5858
    5959        $this->set('biz_group_list', $biz_group_list[0]);
  • OpenPNE/branches/ebihara/prj_dev26_bizfix/webapp_biz/modules/biz/page/g_biz_schedule_add.php

    r406 r1325  
    9494        $member_list = array();
    9595        $this->set('target_id', $requests['target_id']);
    96         foreach (biz_getGroupMember($requests['target_id']) as $key => $value) {
     96        foreach (db_group_biz_group_member_list4biz_group_id($requests['target_id']) as $key => $value) {
    9797            $member_list[$value['c_member_id']] = 1;
    9898        }
    99         $this->set('member_list', biz_getGroupMember($requests['target_id']));
     99        $this->set('member_list', db_group_biz_group_member_list4biz_group_id($requests['target_id']));
    100100
    101101        //追加
  • OpenPNE/branches/ebihara/prj_dev26_bizfix/webapp_biz/modules/biz/page/g_home.php

    r1181 r1325  
    1515        $target_id = $requests['target_c_commu_id'];
    1616        // ----------
    17         $group = biz_getGroupData($target_id);
     17        $group = db_group_biz_group4biz_group_id($target_id);
    1818
    1919        if (!$group) {
     
    2525        $this->set("group", $group);
    2626
    27         $member_list = biz_getGroupMember($target_id, 9);
    28         $member_list_full = biz_getGroupMember($target_id);
     27        $member_list = db_group_biz_group_member_list4biz_group_id($target_id, 9);
     28        $member_list_full = db_group_biz_group_member_list4biz_group_id($target_id);
    2929        foreach ($member_list as $key => $value) {
    3030            $member_list[$key] = db_common_c_member4c_member_id_LIGHT($value['c_member_id']);
  • OpenPNE/branches/ebihara/prj_dev26_bizfix/webapp_biz/modules/biz/page/g_join_group.php

    r1108 r1325  
    1515
    1616        $this->set('inc_navi', fetch_inc_navi('h'));
    17         $this->set('group', biz_getGroupData($target_id));
     17        $this->set('group', db_group_biz_group4biz_group_id($target_id));
    1818
    1919        return 'success';
  • OpenPNE/branches/ebihara/prj_dev26_bizfix/webapp_biz/modules/biz/page/g_member_list.php

    r1108 r1325  
    2626
    2727        //
    28         $this->set("c_commu_num", count(biz_getGroupMember($target_c_commu_id)));
     28        $this->set("c_commu_num", count(db_group_biz_group_member_list4biz_group_id($target_c_commu_id)));
    2929
    3030        //$this->set("c_commu", _db_c_commu4c_commu_id );
    31         $this->set("c_commu", biz_getGroupMember($target_c_commu_id));
     31        $this->set("c_commu", db_group_biz_group_member_list4biz_group_id($target_c_commu_id));
    3232
    3333        $page_size = 50;
     
    3737
    3838
    39         $c_member_list = biz_getGroupMember($target_c_commu_id, $page_size, $start);
     39        $c_member_list = db_group_biz_group_member_list4biz_group_id($target_c_commu_id, $page_size, $start);
    4040
    4141        foreach ($c_member_list as $key => $value) {
     
    4343        }
    4444
    45         $total_num = count(biz_getGroupMember($target_c_commu_id));
     45        $total_num = count(db_group_biz_group_member_list4biz_group_id($target_c_commu_id));
    4646
    4747        $this->set('inc_navi', fetch_inc_navi('h'));
  • OpenPNE/branches/ebihara/prj_dev26_bizfix/webapp_biz/modules/biz/page/h_biz_group_edit.php

    r1108 r1325  
    2929
    3030        $id = $requests['target_id'];
    31         $group = biz_getGroupData($id);
     31        $group = db_group_biz_group4biz_group_id($id);
    3232
    3333        if ($u != $group['admin_id']) {
     
    3636
    3737        foreach ($members as $key => $value) {
    38             if (biz_isGroupMember($value['c_member_id'], $id)) {
     38            if (db_group_is_biz_group_member($value['c_member_id'], $id)) {
    3939                $members[$key]['joined'] = true;
    4040            } else {
  • OpenPNE/branches/ebihara/prj_dev26_bizfix/webapp_biz/modules/biz/page/h_biz_group_find_all.php

    r269 r1325  
    2727        $this->set('page', $page);
    2828
    29         $list = biz_getGroupList($keyword, $page, $page_size);
     29        $list = db_group_serach_biz_group($keyword, $page, $page_size);
    3030
    3131        $this->set('c_commu_search_list', $list);
  • OpenPNE/branches/ebihara/prj_dev26_bizfix/webapp_biz/modules/biz/page/h_home_edit_biz_todo.php

    r384 r1325  
    1313
    1414        $this->set("id", $requests['id']);
    15         $this->set("todo", biz_getTodo($requests['id']));
     15        $this->set("todo", db_todo_biz_todo4biz_todo_id($requests['id']));
    1616        $this->set("cmd", 'h');
    1717        $this->set('inc_navi',fetch_inc_navi('h'));
  • OpenPNE/branches/ebihara/prj_dev26_bizfix/webapp_biz/modules/biz/page/s_edit_shisetsu.php

    r1108 r1325  
    1313        $sessid = session_id();
    1414
    15         $list = biz_getShisetsuData($id);
     15        $list = db_shisetsu_biz_shisetsu4biz_shisetsu_id($id);
    1616
    1717        $this->set("list", $list);
  • OpenPNE/branches/ebihara/prj_dev26_bizfix/webapp_biz/modules/biz/page/s_list.php

    r1181 r1325  
    3636            $d = sprintf("%02d",$Day->thisDay());
    3737
    38             $schedule = biz_getShisetsuSchedule($y,$m,$d);
     38            $schedule = db_shisetsu_biz_shisetsu_schedule_list_date4biz_shisetsu_id($y,$m,$d);
    3939
    4040            $item = array(
  • OpenPNE/branches/ebihara/prj_dev26_bizfix/webapp_biz/modules/biz/page/s_view_schedule.php

    r1108 r1325  
    1717        $shisetsu_id = biz_getJoinShisetsuScheduleID($id);
    1818
    19         $list = biz_getShisetsuData($shisetsu_id);
    20         $schedule = biz_getShisetsuScheduleID($id);
     19        $list = db_shisetsu_biz_shisetsu4biz_shisetsu_id($shisetsu_id);
     20        $schedule = db_shisetsu_biz_shisetsu_schedule4biz_shisetsu_schedule_id($id);
    2121
    2222        $this->set('inc_navi', fetch_inc_navi('h'));
  • OpenPNE/branches/ebihara/prj_dev26_bizfix/webapp_biz/modules/ktai_biz/do/fh_biz_schedule_delete.php

    r406 r1325  
    1414
    1515        if ($requests['is_rep']) {
    16             $rep_schedule = biz_getRepeatScheduleID($requests['schedule_id']);
     16            $rep_schedule = db_schedule_biz_repeat_schedule_list4biz_schedule_id($requests['schedule_id']);
    1717            foreach ($rep_schedule as $value) {
    18                 biz_deleteSchedule($value);
     18                db_schedule_delete_biz_schedule($value);
    1919            }
    2020        } else {
    21             biz_deleteSchedule($requests['schedule_id']);
     21            db_schedule_delete_biz_schedule($requests['schedule_id']);
    2222        }
    2323
  • OpenPNE/branches/ebihara/prj_dev26_bizfix/webapp_biz/modules/ktai_biz/do/fh_biz_schedule_edit.php

    r406 r1325  
    1818            $msg = urlencode('存在しない日付が指定されました。');
    1919
    20             $schedule = biz_getScheduleInfo($requests['schedule_id']);
     20            $schedule = db_schedule_biz_schedule4biz_schedule_id($requests['schedule_id']);
    2121
    2222            $begin_date = $schedule['begin_date'];
     
    128128        $schedule_id = '';
    129129
    130         biz_editSchedule($requests['sc_title'], $u, $begin_date, $finish_date, $begin_time, $finish_time, $requests['sc_memo'], $rp_rule, 0, $requests['sc_j_mem'], $requests['sc_j_plc'], $requests['schedule_id']);
     130        db_schedule_edit_biz_schedule($requests['sc_title'], $u, $begin_date, $finish_date, $begin_time, $finish_time, $requests['sc_memo'], $rp_rule, 0, $requests['sc_j_mem'], $requests['sc_j_plc'], $requests['schedule_id']);
    131131        $schedule_id = $requests['schedule_id'];
    132132
  • OpenPNE/branches/ebihara/prj_dev26_bizfix/webapp_biz/modules/ktai_biz/do/fh_biz_todo_add.php

    r1181 r1325  
    2626            $target_c_member_id = $u;
    2727        }
    28         biz_insertTodo($target_c_member_id, $value, $u, 0, $is_all, $due_datetime);
     28        db_todo_insert_biz_todo($target_c_member_id, $value, $u, 0, $is_all, $due_datetime);
    2929
    3030        $p = array('target_c_member_id' => $target_c_member_id);
  • OpenPNE/branches/ebihara/prj_dev26_bizfix/webapp_biz/modules/ktai_biz/do/fh_biz_todo_check.php

    r1181 r1325  
    2525                    handle_kengen_error();
    2626                }
    27         biz_checkTodo($target_biz_todo_id, $is_checked);
     27        db_todo_update_biz_is_check($target_biz_todo_id, $is_checked);
    2828
    2929        $p = array('target_c_member_id' => $target_c_member_id,
  • OpenPNE/branches/ebihara/prj_dev26_bizfix/webapp_biz/modules/ktai_biz/do/fh_biz_todo_delete.php

    r1181 r1325  
    2424                    handle_kengen_error();
    2525                }
    26         biz_deleteTodo($target_biz_todo_id);
     26        db_todo_delete_biz_todo($target_biz_todo_id);
    2727
    2828        $p = array('target_c_member_id' => $target_c_member_id,
  • OpenPNE/branches/ebihara/prj_dev26_bizfix/webapp_biz/modules/ktai_biz/do/fh_biz_todo_edit.php

    r1181 r1325  
    2828        }
    2929       
    30         $todo = biz_getTodo($target_biz_todo_id);
     30        $todo = db_todo_biz_todo4biz_todo_id($target_biz_todo_id);
    3131
    3232        $is_all = $todo['is_all'];
     
    3636        $public_flag = $todo['public_flag'];
    3737
    38         biz_editTodo($target_c_member_id, $value, $u, 0, $is_all, $target_biz_todo_id,
     38        db_todo_edit_biz_todo($target_c_member_id, $value, $u, 0, $is_all, $target_biz_todo_id,
    3939            $is_done, $due_datetime, $priority, $biz_group_id, $public_flag);
    4040        $p = array('target_c_member_id' => $target_c_member_id);
  • OpenPNE/branches/ebihara/prj_dev26_bizfix/webapp_biz/modules/ktai_biz/do/fhg_biz_schedule_add.php

    r406 r1325  
    9393            $requests['sc_j_mem']=array($requests['target_id']);
    9494        } else {
    95             $join_group = biz_getGroupMember($requests['sc_j_mem']);
     95            $join_group = db_group_biz_group_member_list4biz_group_id($requests['sc_j_mem']);
    9696            $i = 0;
    9797
     
    154154        if (!$requests['sc_rp']) {
    155155            //繰り返しをしない予定登録
    156             biz_insertSchedule($requests['sc_title'], $u, $begin_date, $finish_date, $begin_time, $finish_time, $requests['sc_memo'], $rp_rule, 0, $requests['sc_j_mem'], $requests['sc_j_plc']);
     156            db_schedule_insert_biz_schedule($requests['sc_title'], $u, $begin_date, $finish_date, $begin_time, $finish_time, $requests['sc_memo'], $rp_rule, 0, $requests['sc_j_mem'], $requests['sc_j_plc']);
    157157        } else {
    158158            //繰り返し予定
     
    163163                $tmp = date("Ymd", $nowday);
    164164                if ($rp_rule & (1 << date("w",$nowday))) {
    165                     biz_insertSchedule($requests['sc_title'], $u, $tmp, $tmp, $begin_time, $finish_time, $requests['sc_memo'], $rp_rule, $first_id, $requests['sc_j_mem'], $requests['sc_j_plc']);
     165                    db_schedule_insert_biz_schedule($requests['sc_title'], $u, $tmp, $tmp, $begin_time, $finish_time, $requests['sc_memo'], $rp_rule, $first_id, $requests['sc_j_mem'], $requests['sc_j_plc']);
    166166                }
    167167            }
  • OpenPNE/branches/ebihara/prj_dev26_bizfix/webapp_biz/modules/ktai_biz/page/fh_biz_schedule_view.php

    r406 r1325  
    4646        $this->set("ym", $calendar['ym']);
    4747
    48         $list = biz_getScheduleInfo($requests['id']);
     48        $list = db_schedule_biz_schedule4biz_schedule_id($requests['id']);
    4949
    5050        //繰り返しフラグのチェック
     
    6363        $list['finish_time'] = substr($list['finish_time'], 0, 5);
    6464
    65         $jmembers = biz_getJoinMemberSchedule($requests['id']);
     65        $jmembers = db_schedule_biz_schedule_member_list4biz_schedule_id($requests['id']);
    6666        if (array_search($target_member['nickname'], $jmembers)) {
    6767            $jmembers[$target_member['c_member_id']] = $target_member['nickname'];
     
    102102        if ($list['rep_type']) {
    103103            //繰り返し予定の場合はまとめて既読済みに
    104             $rep_schedule = biz_getRepeatScheduleID($requests['id']);
     104            $rep_schedule = db_schedule_biz_repeat_schedule_list4biz_schedule_id($requests['id']);
    105105            foreach ($rep_schedule as $value) {
    106                 biz_readSchedule($u, $value);
     106                db_schedule_update_biz_schedule_is_checked($u, $value);
    107107            }
    108108        } else {
    109             biz_readSchedule($u, $requests['id']);
     109            db_schedule_update_biz_schedule_is_checked($u, $requests['id']);
    110110        }
    111111        return 'success';
  • OpenPNE/branches/ebihara/prj_dev26_bizfix/webapp_biz/modules/ktai_biz/page/fh_biz_schedule_view_member.php

    r406 r1325  
    2424        $this->set('inc_navi',fetch_inc_navi("h"));
    2525
    26         $jmembers = biz_getJoinMemberSchedule($requests['id']);
     26        $jmembers = db_schedule_biz_schedule_member_list4biz_schedule_id($requests['id']);
    2727        if (array_search($target_member['nickname'], $jmembers)) {
    2828            $jmembers[$target_member['c_member_id']] = $target_member['nickname'];
  • OpenPNE/branches/ebihara/prj_dev26_bizfix/webapp_biz/modules/ktai_biz/page/fh_biz_todo_edit.php

    r1181 r1325  
    2020
    2121        $this->set("target_biz_todo_id", $requests['target_biz_todo_id']);
    22         $todo = biz_getTodo($requests['target_biz_todo_id']);
     22        $todo = db_todo_biz_todo4biz_todo_id($requests['target_biz_todo_id']);
    2323        $this->set("todo", $todo);
    2424
  • OpenPNE/branches/ebihara/prj_dev26_bizfix/webapp_biz/modules/ktai_biz/page/fh_biz_todo_list.php

    r1181 r1325  
    1919        $is_checked = $requests['is_checked'];
    2020        if ($is_checked) {
    21             $todolist = biz_getMemberTodo($u, $target_c_member_id, 1);
     21            $todolist = db_todo_biz_todo_list4c_member_id($u, $target_c_member_id, 1);
    2222        } else {
    23             $todolist = biz_getMemberTodo($u, $target_c_member_id);
     23            $todolist = db_todo_biz_todo_list4c_member_id($u, $target_c_member_id);
    2424        }
    2525
  • OpenPNE/branches/ebihara/prj_dev26_bizfix/webapp_biz/modules/ktai_biz/page/fh_calendar_week.php

    r1087 r1325  
    6262
    6363            //スケジュール
    64             $schedule = biz_getDateMemberSchedule($y,$m,$d,$target_id,$u);
     64            $schedule = db_schedule_biz_schedule_list_date4c_member_id($y,$m,$d,$target_id,$u);
    6565
    6666            $banner = biz_isBannerSchedule($y, $m, $d, $target_id);
  • OpenPNE/branches/ebihara/prj_dev26_bizfix/webapp_biz/modules/pc/page/f_home.php

    r1181 r1325  
    8282        $this->set('is_f_home', 1);
    8383
     84        _include_dir(OPENPNE_WEBAPP_BIZ_DIR . '/lib/db');
    8485        $biz_dir = OPENPNE_MODULES_BIZ_DIR.'/biz/';  //bizモジュールディレクトリの定義
    8586        include_once($biz_dir.'lib/smarty_functions.php');  //bizモジュールよりライブラリを拝借
  • OpenPNE/branches/ebihara/prj_dev26_bizfix/webapp_biz/modules/pc/page/h_home.php

    r1181 r1325  
    1717
    1818        //bizライブラリを使う
     19        _include_dir(OPENPNE_WEBAPP_BIZ_DIR . '/lib/db');
    1920        include_once(OPENPNE_MODULES_BIZ_DIR.'/biz/lib/smarty_functions.php');
    2021        include_once(OPENPNE_MODULES_BIZ_DIR.'/biz/lib/mysql_functions.php');
  • OpenPNE/branches/ebihara/prj_dev26_bizfix/webapp_biz/modules/pc/page/h_prof.php

    r1181 r1325  
    5050
    5151        //カレンダー表示用
     52        _include_dir(OPENPNE_WEBAPP_BIZ_DIR . '/lib/db');
    5253        $biz_dir = OPENPNE_MODULES_BIZ_DIR.'/biz/';  //bizモジュールディレクトリの定義
    5354        include_once($biz_dir.'lib/smarty_functions.php');  //bizモジュールよりライブラリを拝借
Note: See TracChangeset for help on using the changeset viewer.