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

Changeset 2314


Ignore:
Timestamp:
Mar 28, 2007, 3:14:19 PM (13 years ago)
Author:
ebihara
Message:

#430:関数名置換のみかコードの軽微な変更で済むものに対して、旧関数ではなく新関数を使用するようにした

Location:
OpenPNE/branches/ebihara/prj_dev28_bizfix/webapp_biz
Files:
61 edited

Legend:

Unmodified
Added
Removed
  • OpenPNE/branches/ebihara/prj_dev28_bizfix/webapp_biz/lib/db/schedule.php

    r1467 r2314  
    103103 * @param int $month
    104104 * @param int $day
    105  * @param int $c_member_id
     105 * @param int $target_c_member_id
    106106 * @param int $u
    107107 * @return array
  • OpenPNE/branches/ebihara/prj_dev28_bizfix/webapp_biz/lib/db/shisetsu.php

    r1467 r2314  
    168168 * 指定年月日の施設の予定を取得
    169169 */
    170 function db_shisetsu_biz_shisetsu_schedule_list_date4biz_shisetsu_id($y, $m, $d, $biz_shisetsu_id=false)
     170function db_shisetsu_biz_shisetsu_schedule_list_date4biz_shisetsu_id($y, $m, $d, $biz_shisetsu_id = false)
    171171{
    172172    $params = array(
     
    176176    );
    177177
    178     if ($biz_shietsu_id) {
    179         $params[] = intval($biz_shietsu_id);
     178    if ($biz_shisetsu_id) {
     179        $params[] = intval($biz_shisetsu_id);
    180180        $sql = 'SELECT * FROM `biz_shisetsu_schedule` WHERE `date` = "?-?-?" AND biz_shisetsu_id = ? ORDER BY begin_time ASC';
    181181    } else {
  • OpenPNE/branches/ebihara/prj_dev28_bizfix/webapp_biz/lib/util/util.php

    r1460 r2314  
    6060            'event' => p_h_home_event4c_member_id($y, $m, $d, $target_c_member_id),
    6161            'todo' => db_schedule_biz_todo_list_date4c_member_id($target_c_member_id, $target_c_member_id, $y, $m, $d),
    62             'schedule' => db_schedule_biz_schedule_list_date4c_member_id($y, $m, $d, $target_c_member_id),
     62            'schedule' => biz_getDateMemberSchedule($y, $m, $d, $target_c_member_id),
    6363            'holiday' => db_c_holiday_list4date($m, $d),
    6464        );
  • OpenPNE/branches/ebihara/prj_dev28_bizfix/webapp_biz/modules/admin_biz/do/biz_admin_delete_shisetsu.php

    r1856 r2314  
    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_dev28_bizfix/webapp_biz/modules/admin_biz/do/biz_admin_edit_shisetsu.php

    r1856 r2314  
    3131
    3232            //変更前の画像を削除
    33             $shisetsu = biz_getShisetsuData($requests['biz_shisetsu_id']);
    34             biz_deleteImage($shisetsu['image_filename']);
     33            $shisetsu = db_shisetsu_biz_shisetsu4biz_shisetsu_id($requests['biz_shisetsu_id']);
     34            db_image_delete_c_image($shisetsu['image_filename']);
    3535        }
    3636        t_image_clear_tmp(session_id());
    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_dev28_bizfix/webapp_biz/modules/admin_biz/page/biz_edit_shisetsu.php

    r1856 r2314  
    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_dev28_bizfix/webapp_biz/modules/biz/do/f_home_check_biz_todo.php

    r1856 r2314  
    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_dev28_bizfix/webapp_biz/modules/biz/do/f_home_delete_biz_todo.php

    r1856 r2314  
    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_dev28_bizfix/webapp_biz/modules/biz/do/f_home_edit_biz_todo.php

    r1856 r2314  
    3939        $member_info = db_member_c_member4c_member_id_LIGHT($writer_id);
    4040
    41         $todo_info = biz_getTodo($id);
     41        $todo_info = db_todo_biz_todo4biz_todo_id($id);
    4242
    4343        $due_datetime = $due_year . '-' . $due_month . '-' . $due_day . ' 00:00:00';
     
    4646        }
    4747
    48         biz_editTodo($todo_info['c_member_id'], $memo, $writer_id, $sort_order, $is_check, $id,
     48        db_todo_edit_biz_todo($todo_info['c_member_id'], $memo, $writer_id, $sort_order, $is_check, $id,
    4949            $is_done, $due_datetime, $priority, $biz_group_id, $public_flag);
    5050
  • OpenPNE/branches/ebihara/prj_dev28_bizfix/webapp_biz/modules/biz/do/f_home_insert_biz_todo.php

    r1856 r2314  
    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_dev28_bizfix/webapp_biz/modules/biz/do/fh_biz_schedule_edit.php

    r1856 r2314  
    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 {
     
    146146                $replist = biz_getRepeatScheduleID($requests['schedule_id']);
    147147                foreach ($replist as $value) {
    148                     biz_deleteSchedule($value);  //既存の繰り返し予定をすべて削除(予定日数の追加、削除のケースがありうるため)
     148                    db_schedule_delete_biz_schedule($value);  //既存の繰り返し予定をすべて削除(予定日数の追加、削除のケースがありうるため)
    149149                }
    150150            }
  • OpenPNE/branches/ebihara/prj_dev28_bizfix/webapp_biz/modules/biz/do/g_home_add_biz_schedule.php

    r1856 r2314  
    4343
    4444        biz_insertSchedule($title, $u, $begin_date, $finish_date, $begin_time, $finish_time, '', 0, 0, $target_id, 'group');  //予定の登録
    45         biz_readSchedule($u, biz_getScheduleMax());  //既読済みに
     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_dev28_bizfix/webapp_biz/modules/biz/do/g_join_group.php

    r1856 r2314  
    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_dev28_bizfix/webapp_biz/modules/biz/do/h_biz_group_delete.php

    r1856 r2314  
    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_dev28_bizfix/webapp_biz/modules/biz/do/h_biz_group_image_delete.php

    r1856 r2314  
    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_dev28_bizfix/webapp_biz/modules/biz/do/h_biz_schedule_delete.php

    r1856 r2314  
    1919            $rep_schedule = biz_getRepeatScheduleID($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_dev28_bizfix/webapp_biz/modules/biz/do/h_biz_shisetsu_delete.php

    r1856 r2314  
    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_dev28_bizfix/webapp_biz/modules/biz/do/h_home_add_biz_schedule.php

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

    r1856 r2314  
    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_dev28_bizfix/webapp_biz/modules/biz/do/h_home_delete_biz_todo.php

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

    r1856 r2314  
    3939        $member_info = db_member_c_member4c_member_id_LIGHT($writer_id);
    4040
    41         $todo_info = biz_getTodo($id);
     41        $todo_info = db_todo_biz_todo4biz_todo_id($id);
    4242
    4343        $due_datetime = $due_year . '-' . $due_month . '-' . $due_day . ' 00:00:00';
     
    4646        }
    4747
    48         biz_editTodo($todo_info['c_member_id'], $memo, $writer_id, $sort_order, $is_check, $id,
     48        db_todo_edit_biz_todo($todo_info['c_member_id'], $memo, $writer_id, $sort_order, $is_check, $id,
    4949            $is_done, $due_datetime, $priority, $biz_group_id, $public_flag);
    5050
  • OpenPNE/branches/ebihara/prj_dev28_bizfix/webapp_biz/modules/biz/do/h_home_edit_nickname.php

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

    r1856 r2314  
    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_dev28_bizfix/webapp_biz/modules/biz/do/s_add_schedule.php

    r1856 r2314  
    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_dev28_bizfix/webapp_biz/modules/biz/do/s_delete_schedule.php

    r1856 r2314  
    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_dev28_bizfix/webapp_biz/modules/biz/do/s_delete_shisetsu.php

    r1856 r2314  
    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_dev28_bizfix/webapp_biz/modules/biz/do/s_edit_shisetsu.php

    r1856 r2314  
    3232                openpne_redirect('biz', 'page_s_edit_shisetsu', $p);
    3333            } else {
    34                 biz_deleteImage($requests['image_filename']);
     34                db_image_delete_c_image($requests['image_filename']);
    3535            }
    3636        }
     
    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_dev28_bizfix/webapp_biz/modules/biz/lib/mysql_functions.php

    r2312 r2314  
    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{
     
    139129function biz_isPermissionSchedule($u, $biz_schedule_id)
    140130{
    141     $biz_schedule = biz_getScheduleInfo($biz_schedule_id);
     131    $biz_schedule = db_schedule_biz_schedule4biz_schedule_id($biz_schedule_id);
    142132    $public_flag = $biz_schedule['public_flag'];
    143133    $biz_group_id = $biz_schedule['biz_group_id'];
     
    146136    switch ($public_flag) {
    147137    case 'group' :  //グループのメンバーにのみ権限が与えられる予定
    148         $biz_group = biz_getGroupData($biz_group_id);
    149         if (biz_isGroupMember($u, $biz_group_id)) {
     138        $biz_group = db_group_biz_group4biz_group_id($biz_group_id);
     139        if (db_group_is_biz_group_member($u, $biz_group_id)) {
    150140            return true;
    151141        } elseif (empty($biz_group)) {  //グループが存在しない場合はTodoを公開する
     
    182172
    183173    foreach ($tmp as $biz_schedule_id) {
    184         $biz_schedule = biz_getScheduleInfo($biz_schedule_id);
     174        $biz_schedule = db_schedule_biz_schedule4biz_schedule_id($biz_schedule_id);
    185175
    186176        if (biz_isPermissionSchedule($u, $biz_schedule_id)) {
     
    243233}
    244234
    245 //指定された予定IDを保持しているユーザ名を得る関数
    246 function biz_getJoinMemberSchedule($id)
    247 {
    248     $sql = 'SELECT c_member_id FROM biz_schedule_member WHERE biz_schedule_id = ?';
    249     $params = array(
    250         intval($id),
    251     );
    252 
    253     $tmp = db_get_col($sql, $params);
    254     $members = array();
    255 
    256     foreach ($tmp as $value) {
    257         $sql = 'SELECT nickname FROM c_member WHERE c_member_id = ?';
    258         $params = array(
    259             $value,
    260         );
    261 
    262         $members[$value] = db_get_one($sql, $params);
    263     }
    264 
    265     return $members;
    266 }
    267 
    268235//指定された予定IDを保持している施設名を得る関数
    269236function biz_getJoinShisetsuSchedule($id)
     
    302269}
    303270
    304 //指定メンバーidが加入しているグループ数を得る関数
    305 function biz_getGroupCount($id)
    306 {
    307     $sql = 'SELECT * FROM biz_group_member WHERE c_member_id = ?';
    308 
    309     $params = array(
    310         intval($id),
    311     );
    312 
    313 
    314     return count(db_get_col($sql, $params));
    315 }
    316 
    317 //指定グループidのメンバーを得る関数
    318 function biz_getGroupMember($id, $limit=null, $start=null)
    319 {
    320     $params = array(
    321         intval($id),
    322     );
    323 
    324     $sql = 'SELECT * FROM biz_group_member WHERE biz_group_id = ? ';
    325 
    326     if ($start) {
    327         $sql .= 'AND c_member_id <= ? ';
    328         $params[] = $start;
    329     }
    330 
    331     $sql .= 'ORDER BY c_member_id';
    332 
    333     if ($limit) {
    334         $list = db_get_all_limit($sql, 0, $limit, $params);
    335     } else {
    336         $list = db_get_all($sql, $params);
    337     }
    338 
    339     return $list;
    340 }
    341 
    342 //指定されたグループidの情報を得る関数
    343 function biz_getGroupData($id)
    344 {
    345     $sql = "SELECT * FROM biz_group WHERE biz_group_id = ?";
    346     $params = array(
    347         intval($id),
    348     );
    349     if (!$group = db_get_row($sql, $params))
    350         return array();
    351 
    352     return $group;
    353 }
    354 
    355271//指定メンバーidが加入しているグループの情報を得る関数
    356272function biz_getJoinGroup($id, $limit = null)
     
    372288
    373289    foreach ($list as $key => $value) {
    374         $list[$key] += biz_getGroupData($value['biz_group_id']);
    375         $list[$key]['count'] = count(biz_getGroupMember($value['biz_group_id']));
     290        $list[$key] += db_group_biz_group4biz_group_id($value['biz_group_id']);
     291        $list[$key]['count'] = count(db_group_biz_group_member_list4biz_group_id($value['biz_group_id']));
    376292    }
    377293
     
    391307}
    392308
    393 //指定された条件に見合うグループのリストを得る関数
    394 function biz_getGroupList($keyword='', $start=0, $num=20, $order='biz_group_id')
    395 {
    396 
    397     //keywordあり
    398     if ($keyword) {
    399         $sql = 'SELECT * FROM biz_group WHERE 1 AND (info LIKE ? OR name LIKE ?) ORDER BY ?';
    400 
    401         $params = array(
    402             '%'.$keyword.'%',
    403             '%'.$keyword.'%',
    404             $order,
    405         );
    406         $list = db_get_all_limit($sql, $start, ($start + $num), $params);
    407     //keywordなし(全件表示)
    408     } else {
    409         $sql = 'SELECT * FROM biz_group ORDER BY ?';
    410 
    411         $params = array(
    412             $order,
    413         );
    414         $list = db_get_all_limit($sql, $start, ($start + $num), $params);
    415     }
    416 
    417     if (!$list) {
    418         return array();
    419     }
    420 
    421     foreach ($list as $key => $value) {
    422         $count = count(biz_getGroupMember($value['biz_group_id']));
    423         $list[$key]['count'] = $count;
    424     }
    425 
    426     return $list;
    427 }
    428 
    429 //指定日の施設予定を得る関数
    430 function biz_getShisetsuSchedule($y, $m, $d, $id=false)
    431 {
    432     $params = array(
    433         intval($y),
    434         intval($m),
    435         intval($d),
    436     );
    437 
    438     if ($id) {
    439         $params[] = intval($id);
    440         $sql = 'SELECT * FROM `biz_shisetsu_schedule` WHERE `date` = "?-?-?" AND biz_shisetsu_id = ? ORDER BY begin_time ASC';
    441     } else {
    442         $sql = 'SELECT * FROM `biz_shisetsu_schedule` WHERE `date` = "?-?-?" ORDER BY begin_time ASC';
    443     }
    444     $list = db_get_all($sql, $params);
    445     foreach ($list as $key => $value) {
    446         $params = array(
    447             intval($list[$key]['c_member_id']),
    448         );
    449         $sql = 'SELECT nickname FROM c_member WHERE c_member_id = ?';
    450         $list[$key]['c_member_name'] = db_get_one($sql, $params);
    451     }
    452 
    453     return $list;
    454 }
    455 
    456 //施設施設予定の情報を得る関数
    457 function biz_getShisetsuScheduleID($id)
    458 {
    459     $sql = 'SELECT * FROM `biz_shisetsu_schedule` WHERE biz_shisetsu_schedule_id = ?';
    460 
    461     $params = array(
    462         intval($id),
    463     );
    464 
    465     $list = db_get_row($sql, $params);
    466 
    467     $sql = 'SELECT nickname FROM c_member WHERE c_member_id = ?';
    468     $params = array(
    469         intval($list['c_member_id']),
    470     );
    471     $list['member_name'] = db_get_one($sql, $params);
    472 
    473     return $list;
    474 }
    475 
    476 //施設のリストを得る関数
    477 function biz_getShisetsuList()
    478 {
    479     $sql = 'SELECT * FROM biz_shisetsu';
    480     $list = db_get_all($sql, $params);
    481 
    482     return $list;
    483 }
    484 
    485 //指定施設の情報を得る関数
    486 function biz_getShisetsuData($shisetsu_id)
    487 {
    488     $sql = 'SELECT * FROM biz_shisetsu WHERE biz_shisetsu_id = ?';
    489 
    490     $params = array(
    491         intval($shisetsu_id),
    492     );
    493 
    494     $list = db_get_row($sql, $params);
    495 
    496     return $list;
    497 }
    498 
    499309//バッティングしているかどうかを判定する関数
    500310function biz_isBatting($shisetsu_id, $y, $m, $d, $begin_time, $finish_time)
    501311{
    502     $list = biz_getShisetsuSchedule($y, $m, $d, $shisetsu_id);
     312    $list = db_shisetsu_biz_shisetsu_schedule_list_date4biz_shisetsu_id($y, $m, $d, $shisetsu_id);
    503313
    504314    if (empty($list)) {
     
    578388
    579389            if (($begin_date < $testing) && ($finish_date > $testing)) {
    580                 $schedule += biz_getScheduleInfo($value['biz_schedule_id']);
     390                $schedule += db_schedule_biz_schedule4biz_schedule_id($value['biz_schedule_id']);
    581391            }
    582392        }
     
    589399function biz_isPermissionTodo($u, $biz_todo_id)
    590400{
    591     $biz_todo = biz_getTodo($biz_todo_id);
     401    $biz_todo = db_todo_biz_todo4biz_todo_id($biz_todo_id);
    592402    $public_flag = $biz_todo['public_flag'];
    593403    $biz_group_id = $biz_todo['biz_group_id'];
     
    596406    switch ($public_flag) {
    597407    case 'group' :  //グループのメンバーにのみ権限が与えられるTodo
    598         $biz_group = biz_getGroupData($biz_group_id);
    599         if (biz_isGroupMember($u, $biz_group_id)) {
     408        $biz_group = db_group_biz_group4biz_group_id($biz_group_id);
     409        if (db_group_is_biz_group_member($u, $biz_group_id)) {
    600410            return true;
    601411        } elseif (empty($biz_group)) {  //グループが存在しない場合はTodoを公開する
     
    617427}
    618428
    619 //指定メンバーのTodoを得る
    620 function biz_getMemberTodo($u, $target_c_member_id, $cat = null)
    621 {
    622     $sql = 'SELECT * FROM biz_todo WHERE c_member_id = ? AND is_check = ? ORDER BY biz_todo_id DESC;';  //メンバーが保有しているtodoid一覧
    623     $params = array(
    624         intval($target_c_member_id),
    625         intval($cat),
    626     );
    627 
    628     //priorityの高い順にソート
    629     $membertodo = db_get_all($sql, $params);
    630         foreach ($membertodo as $key => $row) {
    631            $priority[$key]  = $row['priority'];
    632         }
    633     if(!is_null($priority)) {
    634         array_multisort($priority, SORT_ASC, $membertodo);
    635     }
    636 
    637     $sql = 'SELECT * FROM biz_todo WHERE c_member_id = 0 AND is_check = ? ORDER BY biz_todo_id DESC;';  //共有Todo
    638     $params = array(
    639         intval($cat),
    640     );
    641     $sharetodo = db_get_all($sql, $params);
    642 
    643     $list = array();  //各Todoの連結処理
    644 
    645     foreach (array_merge($membertodo, $sharetodo) as $key => $value) {
    646         if (biz_isPermissionTodo($u, $value['biz_todo_id'])) {
    647                 $sql = 'SELECT nickname FROM c_member WHERE c_member_id = ?';
    648                 $params = array(
    649                     intval($value['writer_id']),
    650                 );
    651             $list[$key] = $value;
    652                 $list[$key]['writer_name'] = db_get_one($sql, $params);
    653         }
    654     }
    655 
    656     return $list;
    657 }
    658 
    659 //指定idのTodoを得る
    660 function biz_getTodo($id)
    661 {
    662     //メンバーが保有しているtodoid一覧
    663     $sql = 'SELECT * FROM biz_todo WHERE biz_todo_id = ?';
    664 
    665     $params = array(
    666         intval($id),
    667     );
    668 
    669     return db_get_row($sql, $params);
    670 }
    671 
    672 //カレンダー表示用期限付きTodoリストの取得
    673 function biz_schedule_todo4c_member_id($u, $c_member_id, $year, $month, $day = null)
    674 {
    675     $sql = 'SELECT biz_todo_id FROM biz_todo WHERE c_member_id = ?';
    676     $params = array(intval($c_member_id));
    677     $ids = db_get_col($sql, $params);
    678     $ids = implode(', ', $ids);
    679     if (!$ids) {
    680         return array();
    681     }
    682 
    683     if (!is_null($day)) {
    684             $sql = 'SELECT * FROM biz_todo WHERE biz_todo_id IN ('.$ids.')' .
    685                     ' AND due_datetime = ?';
    686             $params = array(
    687                 sprintf('%04d-%02d-%02d', intval($year), intval($month), intval($day)) . ' 00:00:00',
    688             );
    689 
    690         $list = array();
    691             foreach(db_get_all($sql, $params) as $key => $value) {
    692             if(biz_isPermissionTodo($u, $value['biz_todo_id'])) {
    693                         $list[$key] = $value;
    694             }
    695         }
    696        
    697         return $list;
    698     } else {
    699             $sql = 'SELECT * FROM biz_todo WHERE biz_todo_id IN ('.$ids.')' .
    700                     ' AND due_datetime > ? AND due_datetime <= ?';
    701             $params = array(
    702                 sprintf('%04d-%02d', intval($year), intval($month)) . '-00 00:00:00',
    703                 sprintf('%04d-%02d', intval($year), intval($month)) . '-31 23:59:59'
    704             );
    705             $list = db_get_all($sql, $params);
    706 
    707             $res = array();
    708             foreach ($list as $item) {
    709             if(biz_isPermissionTodo($u, $item['biz_todo_id'])) {
    710                         $day = date('j', strtotime($item['due_datetime']));
    711                         $res[$day][] = $item;
    712             }
    713             }
    714             return $res;
    715     }
    716 }
    717 
    718429//自分が投稿したTodoの一覧を得る
    719430function biz_getPostedTodo($id, $limit = null)
     
    753464    return db_get_row($sql, $params);
    754465}
    755 
    756 // 参加グループリスト
    757 function biz_getJoinGroupList($c_member_id, $page, $page_size)
    758 {
    759     $start = ($page - 1) * $page_size;
    760 
    761     $sql = "SELECT biz_group.*" .
    762             " FROM biz_group_member , biz_group";
    763     $sql .= " WHERE biz_group_member.c_member_id = ?";
    764     $sql .= " AND biz_group.biz_group_id=biz_group_member.biz_group_id";
    765     $sql .= " ORDER BY biz_group.biz_group_id DESC ";
    766 
    767     $params = array(
    768         intval($c_member_id),
    769     );
    770 
    771     $biz_group_list = db_get_all_limit($sql, $start, $page_size, $params);
    772 
    773     foreach ($biz_group_list as $key => $value) {
    774         $biz_group_list[$key]['count_members'] =
    775            count(biz_getGroupMember($value['biz_group_id']));
    776     }
    777 
    778     $pager = array(
    779         "total_num" => biz_getGroupCount($c_member_id),
    780         "disp_num"  => count($biz_group_list),
    781         "start_num" => 0,
    782         "end_num"   => 0,
    783         "total_page" => 0,
    784         "prev_page" => 0,
    785         "next_page" => 0,
    786     );
    787 
    788     if ($pager['disp_num'] > 0) {
    789         $pager['start_num'] = $start + 1;
    790         $pager['end_num'] = $pager['start_num'] + $pager['disp_num'] - 1;
    791     }
    792 
    793     if ($pager['total_num']) { 
    794         $pager['total_page'] = ceil($pager['total_num'] / $page_size);
    795 
    796         if ($page < $pager['total_page']) {
    797             $pager['next_page'] = max($page + 1, 1);
    798         }
    799         if ($page > 1) {
    800             $pager['prev_page'] = min($page - 1, $pager['total_page']);
    801         }
    802     }
    803 
    804     return array($biz_group_list, $pager);
    805 }
    806 
    807466
    808467//SET---------------------------------------------
     
    839498}
    840499
    841 //スケジュール削除
    842 function biz_deleteSchedule($id, $group = false)
    843 {
    844     if ($group) {
    845         $sql = 'SELECT first_id FROM biz_schedule WHERE biz_schedule_id = ?';
    846         $params = array(intval($id));
    847         $firstid = db_get_one($sql, $params);
    848 
    849         $sql = 'SELECT biz_schedule_id FROM biz_schedule WHERE first_id = ?';
    850         $params = array(intval($firstid));
    851         $schedules = db_get_col($sql, $params);
    852 
    853         $sql = 'DELETE FROM biz_schedule WHERE first_id = ?';
    854         $params = array(intval($firstid));
    855         db_query($sql, $params);
    856 
    857         foreach ($schedules as $nowid) {
    858             $sql = 'DELETE FROM biz_schedule_member WHERE biz_schedule_id = ?';
    859             $params = array(intval($nowid));
    860             db_query($sql, $params);
    861         }
    862     } else {
    863         $sql = 'DELETE FROM biz_schedule WHERE biz_schedule_id = ?';
    864         $params = array(
    865             intval($id),
    866         );
    867         db_query($sql, $params);
    868         $sql = 'DELETE FROM biz_schedule_member WHERE biz_schedule_id = ?';
    869         $params = array(
    870             intval($id),
    871         );
    872         db_query($sql, $params);
    873     }
    874 }
    875 
    876 //スケジュール編集
    877 function biz_editSchedule($title, $member_id, $begin_date, $finish_date, $begin_time = null, $finish_time = null,
    878                                                     $value = '', $rep_type, $first_id = 0,
    879                                                     $biz_group_id = 0, $public_flag = "public",
    880                                                     $id)
    881 {
    882     $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` = ?';
    883     $params = array(
    884         $title,
    885         $member_id,
    886         $begin_date,
    887         $finish_date,
    888         $begin_time,
    889         $finish_time,
    890         $value,
    891         $rep_type,
    892         $first_id,
    893         $biz_group_id,
    894         $public_flag,
    895         $id,
    896     );
    897     db_query($sql, $params);
    898 }
    899 
    900 //スケジュールを既読済みに
    901 function biz_readSchedule($member_id, $schedule_id)
    902 {
    903     $sql = 'SELECT biz_schedule_member_id FROM biz_schedule_member WHERE biz_schedule_id = ? AND c_member_id = ?';
    904     $params = array(
    905         intval($schedule_id),
    906         intval($member_id),
    907     );
    908     $sid = db_get_one($sql, $params);
    909 
    910     $sql = 'UPDATE `biz_schedule_member` SET `is_read` = \'1\' WHERE `biz_schedule_member_id` = ?';
    911     $params = array(
    912         intval($sid),
    913     );
    914     db_query($sql, $params);
    915 }
    916 
    917500//グループ登録
    918501function biz_insertGroup($name, $member_id, $info, $image_name, $members = array())
     
    986569        db_insert('biz_group_member', $data);
    987570    }
    988 }
    989 
    990 //グループの削除
    991 function biz_deleteGroup($group_id)
    992 {
    993     $sql = 'DELETE FROM biz_group_member WHERE biz_group_id = ?';
    994     $params = array(
    995         intval($group_id),
    996     );
    997     $result = db_query($sql, $params);
    998     $sql = 'DELETE FROM biz_group WHERE biz_group_id = ?';
    999     $params = array(
    1000         intval($group_id),
    1001     );    $result = db_query($sql, $params);
    1002 
    1003 
    1004     $sql = 'UPDATE biz_schedule SET public_flag = "private", biz_group_id = NULL WHERE biz_group_id = ?';
    1005     db_query($sql, array(intval($group_id)));
    1006 
    1007     $sql = 'DELETE FROM biz_todo WHERE biz_group_id = ?';
    1008     db_query($sql, array(intval($group_id)));
    1009 
    1010 }
    1011 
    1012 //グループに参加
    1013 function biz_joinGroup($member_id, $group_id)
    1014 {
    1015     $data = array(
    1016         'c_member_id' => intval($member_id),
    1017         'biz_group_id' => intval($group_id),
    1018     );
    1019     db_insert('biz_group_member', $data);
    1020 }
    1021 
    1022 //施設編集
    1023 function biz_editShisetsu($id, $name, $image_name, $info = '')
    1024 {
    1025     if (!$image_name) {
    1026         $image_name = 0;
    1027     }
    1028 
    1029     $sql = 'UPDATE `biz_shisetsu` SET `name` = ?,`image_filename` = ?, `info` = ? WHERE `biz_shisetsu_id` = ?';
    1030     $params = array(
    1031         $name,
    1032         $image_name,
    1033         $info,
    1034         intval($id),
    1035     );
    1036     db_query($sql, $params);
    1037 }
    1038 
    1039 //施設予定追加
    1040 function db_shisetsu_insert_biz_shisetsuSchedule($shisetsu_id, $member_id, $date, $begin_time, $finish_time)
    1041 {
    1042     $data = array(
    1043         'c_member_id' => intval($member_id),
    1044         'biz_shisetsu_id' => intval($shisetsu_id),
    1045         'date' => $date,
    1046         'begin_time' => $begin_time,
    1047         'finish_time' => $finish_time,
    1048     );
    1049     $insert_id = db_insert('biz_shisetsu_schedule', $data);
    1050 
    1051     $data = array(
    1052         'shisetsu_id' => intval($shisetsu_id),
    1053         'schedule_id' => intval($insert_id),
    1054     );
    1055     db_insert('biz_schedule_shisetsu', $data);
    1056 }
    1057 
    1058 //施設予定削除
    1059 function biz_deleteShisetsuSchedule($shisetsu_id)
    1060 {
    1061     $sql = 'DELETE FROM `biz_shisetsu_schedule` WHERE biz_shisetsu_schedule_id = ?';
    1062     $params = array(
    1063         intval($shisetsu_id),
    1064     );
    1065 
    1066     db_query($sql, $params);
    1067 
    1068     return $sql;
    1069571}
    1070572
     
    1095597}
    1096598
    1097 //Todo登録
    1098 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)
    1099 {
    1100     $todo = biz_getTodo($biz_todo_id);
    1101 
    1102     if ($is_all) {
    1103         //共有Todo
    1104         $member_id = 0;
    1105     } elseif ($member_id == $writer_id) {
    1106         $writer_name = '';
    1107     }
    1108 
    1109     if ($is_done != $todo['is_check']) {
    1110         biz_checkTodo($biz_todo_id, $todo['is_check']);
    1111     }
    1112    
    1113     $sql = 'UPDATE `biz_todo` SET `c_member_id` = ?, `memo` = ?, `writer_id` = ?,'
    1114         .'`r_datetime` = ?, `due_datetime` = ?, `priority` = ?, `biz_group_id` = ?,'
    1115         .'`public_flag` = ? WHERE `biz_todo_id` = ?';
    1116 
    1117     $params = array(
    1118         intval($member_id),
    1119         $memo,
    1120         intval($writer_id),
    1121         date("Y-m-d H:i"),
    1122         $due_datetime,
    1123         intval($priority),
    1124         intval($biz_group_id),
    1125         $public_flag,
    1126         intval($biz_todo_id),
    1127     );
    1128 
    1129     $result = db_query($sql, $params);
    1130 
    1131     return $result;
    1132 }
    1133 
    1134 //Todo削除
    1135 function biz_deleteTodo($delid)
    1136 {
    1137     //指定されたTodoを削除
    1138     $sql = 'DELETE FROM biz_todo WHERE biz_todo_id = ?';
    1139 
    1140     $params = array(
    1141         intval($delid),
    1142     );
    1143 
    1144     $result = db_query($sql, $params);
    1145 
    1146     return $result;
    1147 }
    1148 
    1149 //Todoにチェック
    1150 function biz_checkTodo($chid, $is_check)
    1151 {
    1152     if ($is_check) {
    1153     //チェックを解除する
    1154         $sql = 'UPDATE `biz_todo` SET `is_check` = \'0\' WHERE `biz_todo_id` = ?';
    1155     } else {
    1156     //チェックをつける
    1157         $sql = 'UPDATE `biz_todo` SET `is_check` = \'1\' WHERE `biz_todo_id` = ?';
    1158     }
    1159 
    1160     $params = array(
    1161         intval($chid),
    1162     );
    1163 
    1164     $result = db_query($sql, $params);
    1165 }
    1166 
    1167599//画像をDBに格納する
    1168600function biz_saveImage($upfile, $filename)
     
    1208640}
    1209641
    1210 function biz_deleteImage($filename)
    1211 {
    1212     if (!$filename) {
    1213         return false;
    1214     }
    1215 
    1216     $sql = 'DELETE FROM c_image WHERE filename = ?';
    1217     $params = array(
    1218         $filename,
    1219     );
    1220     db_query($sql, $params);
    1221 
    1222     // cacheの削除
    1223     image_cache_delete($filename);
    1224 }
    1225 
    1226 function biz_deleteGroupImage($id, $filename)
    1227 {
    1228     $sql = 'UPDATE `biz_group` SET `image_filename` = \'0\' WHERE `biz_group_id` = ?';
    1229     $params = array(
    1230         intval($id),
    1231     );
    1232     db_query($sql, $params);
    1233     biz_deleteImage($filename);
    1234 }
    1235 
    1236 function biz_deleteShisetsuImage($id, $filename)
    1237 {
    1238     $sql = 'UPDATE `biz_shisetsu` SET `image_filename` = \'0\' WHERE `biz_shisetsu_id` = ?';
    1239 
    1240     $params = array(
    1241         intval($id),
    1242     );
    1243 
    1244     db_query($sql, $params);
    1245     biz_deleteImage($filename);
    1246 }
    1247 
    1248 function biz_changeNickname($member_id, $new)
    1249 {
    1250     $sql = 'UPDATE `c_member` SET `nickname` = ? WHERE `c_member_id` = ?';
    1251     $params = array(
    1252         $new,
    1253         intval($member_id),
    1254     );
    1255     $result = db_query($sql, $params);
    1256 
    1257     return $result;
    1258 }
    1259 
    1260 //施設情報削除
    1261 //一緒に施設画像も削除
    1262 function biz_deleteShisetsu($id)
    1263 {
    1264 
    1265     $shisetsu = biz_getShisetsuData($id);
    1266 
    1267     //画像削除
    1268     biz_deleteShisetsuImage($id, $shisetsu['image_filename']);
    1269 
    1270     $sql = 'DELETE FROM `biz_shisetsu` WHERE biz_shisetsu_id = ?';
    1271     $params = array(
    1272         intval($id),
    1273     );
    1274 
    1275     db_query($sql, $params);
    1276 }
    1277 
    1278 //-------------------------------
    1279 //admin
    1280 
    1281 function biz_getConfig()
    1282 {
    1283     $sql = "SELECT name, value FROM biz_admin_config";
    1284     return db_get_assoc($sql);
    1285 }
    1286 
    1287642//------------------------------
    1288643//mail
     
    1300655    $send_list = array();
    1301656    foreach ($c_schedule_list as $schedule_id) {
    1302         $value = biz_getScheduleInfo($schedule_id);
     657        $value = db_schedule_biz_schedule4biz_schedule_id($schedule_id);
    1303658        $c_member_id = $value['c_member_id'];
    1304659        $send_list[$c_member_id][] = $value;
  • OpenPNE/branches/ebihara/prj_dev28_bizfix/webapp_biz/modules/biz/lib/smarty_functions.php

    r1856 r2314  
    9494            }
    9595        } else {
    96             $schedule = biz_getShisetsuSchedule($y,$m,$d, $member_id);
     96            $schedule = db_shisetsu_biz_shisetsu_schedule_list_date4biz_shisetsu_id($y,$m,$d, $member_id);
    9797        }
    9898
     
    108108                'event' => db_commu_event4c_member_id($y, $m, $d, $member_id),
    109109                'schedule' => $schedule,
    110                 'todo' => biz_schedule_todo4c_member_id($u, $member_id, $y, $m, $d),
     110                'todo' => db_schedule_biz_todo_list_date4c_member_id($u, $member_id, $y, $m, $d),
    111111                'holiday' => db_c_holiday_list4date($m, $d),
    112112            );
     
    152152        $mins = biz_makeSerialArray(300, 30, 30);  //分
    153153        $inc_smarty->assign("mins", $mins);
    154         $inc_smarty->assign("list", biz_getShisetsuData($member_id));
    155         $config = biz_getConfig();
     154        $inc_smarty->assign("list", db_shisetsu_biz_shisetsu4biz_shisetsu_id($member_id));
     155        $config = db_load_biz_config();
    156156
    157157        $inc_smarty->assign('is_closed_shisetsu', $config['IS_CLOSED_SHISETSU']);
     
    189189    }
    190190
    191     $todolist = biz_getMemberTodo($u, $member_id);
    192     $checkedlist = biz_getMemberTodo($u, $member_id, 1);
     191    $todolist = db_todo_biz_todo_list4c_member_id($u, $member_id);
     192    $checkedlist = db_todo_biz_todo_list4c_member_id($u, $member_id, 1);
    193193
    194194    foreach ($todolist as $key => $value) {
     
    260260    $inc_smarty->templates_dir = 'pc/templates';;
    261261    $inc_smarty->assign("group_list", biz_getJoinGroup($c_member_id, 9));
    262     $inc_smarty->assign("group_count", biz_getGroupCount($c_member_id));
     262    $inc_smarty->assign("group_count", db_group_count_biz_group4c_member_id($c_member_id));
    263263
    264264    $content = $inc_smarty->fetch('file:'.OPENPNE_MODULES_BIZ_DIR.'/biz/templates/inc_biz_home_group_list.tpl');
  • OpenPNE/branches/ebihara/prj_dev28_bizfix/webapp_biz/modules/biz/page/fh_biz_schedule_add.php

    r1856 r2314  
    127127        $this->set('is_h', true);
    128128
    129         $biz_group_count = biz_getGroupCount($target_id);
    130         $biz_group_list = biz_getJoinGroupList($target_id, 1, $biz_group_count);
     129        $biz_group_count = db_group_count_biz_group4c_member_id($target_id);
     130        $biz_group_list = db_group_biz_group_list4c_member_id($target_id, 1, $biz_group_count);
    131131
    132132        $this->set('biz_group_list', $biz_group_list[0]);
  • OpenPNE/branches/ebihara/prj_dev28_bizfix/webapp_biz/modules/biz/page/fh_biz_schedule_calendar.php

    r1856 r2314  
    4646        $birth_list = db_schedule_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';
  • OpenPNE/branches/ebihara/prj_dev28_bizfix/webapp_biz/modules/biz/page/fh_biz_schedule_edit.php

    r1856 r2314  
    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_dev28_bizfix/webapp_biz/modules/biz/page/fh_biz_schedule_view.php

    r1856 r2314  
    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        }
     
    9999            $rep_schedule = biz_getRepeatScheduleID($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_dev28_bizfix/webapp_biz/modules/biz/page/fh_group_list.php

    r1856 r2314  
    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_dev28_bizfix/webapp_biz/modules/biz/page/fh_home_edit_biz_todo.php

    r1856 r2314  
    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_dev28_bizfix/webapp_biz/modules/biz/page/g_home.php

    r1856 r2314  
    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_member_c_member4c_member_id_LIGHT($value['c_member_id']);
  • OpenPNE/branches/ebihara/prj_dev28_bizfix/webapp_biz/modules/biz/page/g_join_group.php

    r1856 r2314  
    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_dev28_bizfix/webapp_biz/modules/biz/page/g_member_list.php

    r1856 r2314  
    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_commu_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_dev28_bizfix/webapp_biz/modules/biz/page/h_biz_group_edit.php

    r1856 r2314  
    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']) {
  • OpenPNE/branches/ebihara/prj_dev28_bizfix/webapp_biz/modules/biz/page/h_biz_group_find_all.php

    r1856 r2314  
    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_dev28_bizfix/webapp_biz/modules/biz/page/h_home_edit_biz_todo.php

    r1856 r2314  
    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_dev28_bizfix/webapp_biz/modules/biz/page/s_add_shisetsu.php

    r1856 r2314  
    1010    {
    1111        $u = $GLOBALS['AUTH']->uid();
    12         $config = biz_getConfig();
     12        $config = db_load_biz_config();
    1313        $this->set('inc_navi', fetch_inc_navi('h'));
    1414
  • OpenPNE/branches/ebihara/prj_dev28_bizfix/webapp_biz/modules/biz/page/s_delete_shisetsu.php

    r1856 r2314  
    1414
    1515        $this->set('target_id',$requests['target_id']);
    16         $config = biz_getConfig();
     16        $config = db_load_biz_config();
    1717
    1818        $this->set('inc_navi', fetch_inc_navi('h'));
  • OpenPNE/branches/ebihara/prj_dev28_bizfix/webapp_biz/modules/biz/page/s_edit_shisetsu.php

    r1856 r2314  
    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);
    1818        $this->set("id", $id);
    19         $config = biz_getConfig();
     19        $config = db_load_biz_config();
    2020
    2121        $this->set('inc_navi', fetch_inc_navi('h'));
  • OpenPNE/branches/ebihara/prj_dev28_bizfix/webapp_biz/modules/biz/page/s_list.php

    r1856 r2314  
    1313        // --- リクエスト変数
    1414
    15         $this->set("list", biz_getShisetsuList());
     15        $this->set("list", db_shisetsu_biz_shisetsu_list());
    1616        //カレンダー表示用
    1717        require_once 'Calendar/Week.php';
     
    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(
     
    5555        }
    5656
    57         $list= biz_getShisetsuList();
     57        $list= db_shisetsu_biz_shisetsu_list();
    5858
    5959        $calendar = '';
     
    6767        $this->set("hours", $hours);
    6868
    69         $config = biz_getConfig();
     69        $config = db_load_biz_config();
    7070
    7171        $this->set('inc_navi', fetch_inc_navi('h'));
  • OpenPNE/branches/ebihara/prj_dev28_bizfix/webapp_biz/modules/biz/page/s_view_schedule.php

    r1856 r2314  
    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'));
     
    2525        $this->set("id", $id);
    2626        $this->set("w", (date("W", (strtotime($schedule['date'])-strtotime(date("Y-m-d"))))-1));
    27         $config = biz_getConfig();
     27        $config = db_load_biz_config();
    2828
    2929
  • OpenPNE/branches/ebihara/prj_dev28_bizfix/webapp_biz/modules/biz/templates/inc_biz_todo.tpl

    r1181 r2314  
    6262</td>
    6363<td class="border_01({if $value.writer_id != $target_id}) bg_09({else}) bg_02({/if})" style="width:35px;border-top:none;border-right:none;" valign="top">
    64 <a href="({t_url m=biz a=do_`$cmd`_home_check_biz_todo})&amp;sessid=({$PHPSESSID})&amp;chid=({$value.biz_todo_id})&amp;is_check=({$value.is_check})">
     64<a href="({t_url m=biz a=do_`$cmd`_home_check_biz_todo})&amp;sessid=({$PHPSESSID})&amp;chid=({$value.biz_todo_id})&amp;is_check=1">
    6565<img src="./skin/biz/checkbox_nochecked_({if $value.c_member_id == 0})share_({/if})2.gif" style="width:34px;height:34px;display:block;"></a>
    6666
     
    113113<td class="border_01({if $value.writer_id != $target_id}) bg_09({else}) bg_02({/if})" style="width:35px;border-top:none;border-right:none;" valign="top">
    114114
    115 <a href="({t_url m=biz a=do_`$cmd`_home_check_biz_todo})&amp;sessid=({$PHPSESSID})&amp;chid=({$value.biz_todo_id})&amp;is_check=({$value.is_check})">
     115<a href="({t_url m=biz a=do_`$cmd`_home_check_biz_todo})&amp;sessid=({$PHPSESSID})&amp;chid=({$value.biz_todo_id})&amp;is_check=0">
    116116<img src="./skin/biz/checkbox_checked_({if !$value.member_id == 0})share_({/if})2.gif" style="width:34px;height:34px;display:block;"></a>
    117117
  • OpenPNE/branches/ebihara/prj_dev28_bizfix/webapp_biz/modules/ktai_biz/do/fh_biz_schedule_delete.php

    r1856 r2314  
    2020            $rep_schedule = biz_getRepeatScheduleID($requests['schedule_id']);
    2121            foreach ($rep_schedule as $value) {
    22                 biz_deleteSchedule($value);
     22                db_schedule_delete_biz_schedule($value);
    2323            }
    2424        } else {
    25             biz_deleteSchedule($requests['schedule_id']);
     25            db_schedule_delete_biz_schedule($requests['schedule_id']);
    2626        }
    2727
  • OpenPNE/branches/ebihara/prj_dev28_bizfix/webapp_biz/modules/ktai_biz/do/fh_biz_schedule_edit.php

    r1856 r2314  
    2222            $msg = urlencode('存在しない日付が指定されました。');
    2323
    24             $schedule = biz_getScheduleInfo($requests['schedule_id']);
     24            $schedule = db_schedule_biz_schedule4biz_schedule_id($requests['schedule_id']);
    2525
    2626            $begin_date = $schedule['begin_date'];
     
    132132        $schedule_id = '';
    133133
    134         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['public_flag'], $requests['schedule_id']);
     134        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['public_flag'], $requests['schedule_id']);
    135135        $schedule_id = $requests['schedule_id'];
    136136
  • OpenPNE/branches/ebihara/prj_dev28_bizfix/webapp_biz/modules/ktai_biz/do/fh_biz_todo_add.php

    r2186 r2314  
    2929            $target_c_member_id = $u;
    3030        }
    31         $result = biz_insertTodo($target_c_member_id, $value, $u, 0, $is_all, $due_datetime);
     31        $result = db_todo_insert_biz_todo($target_c_member_id, $value, $u, 0, $is_all, $due_datetime);
    3232
    3333        $p = array('target_c_member_id' => $target_c_member_id);
  • OpenPNE/branches/ebihara/prj_dev28_bizfix/webapp_biz/modules/ktai_biz/do/fh_biz_todo_check.php

    r1856 r2314  
    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_dev28_bizfix/webapp_biz/modules/ktai_biz/do/fh_biz_todo_delete.php

    r1856 r2314  
    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_dev28_bizfix/webapp_biz/modules/ktai_biz/do/fh_biz_todo_edit.php

    r2187 r2314  
    3030        }
    3131       
    32         $todo = biz_getTodo($target_biz_todo_id);
     32        $todo = db_todo_biz_todo4biz_todo_id($target_biz_todo_id);
    3333
    3434        $is_all = $todo['is_all'];
     
    3838        $public_flag = $todo['public_flag'];
    3939
    40         biz_editTodo($target_c_member_id, $value, $u, 0, $is_all, $target_biz_todo_id,
     40        db_todo_edit_biz_todo($target_c_member_id, $value, $u, 0, $is_all, $target_biz_todo_id,
    4141            $is_done, $due_datetime, $priority, $biz_group_id, $public_flag);
    4242        $p = array('target_c_member_id' => $target_c_member_id);
  • OpenPNE/branches/ebihara/prj_dev28_bizfix/webapp_biz/modules/ktai_biz/page/fh_biz_schedule_add.php

    r1856 r2314  
    4141        $this->set('t_id', $target_id);
    4242
    43         $biz_group_count = biz_getGroupCount($target_id);
    44         $biz_group_list = biz_getJoinGroupList($target_id, 1, $biz_group_count);
     43        $biz_group_count = db_group_count_biz_group4c_member_id($target_id);
     44        $biz_group_list = db_group_biz_group_member_list4biz_group_id($target_id, 1, $biz_group_count);
    4545
    4646        $this->set('biz_group_list', $biz_group_list[0]);
  • OpenPNE/branches/ebihara/prj_dev28_bizfix/webapp_biz/modules/ktai_biz/page/fh_biz_schedule_view.php

    r1856 r2314  
    5050        $this->set("ym", $calendar['ym']);
    5151
    52         $list = biz_getScheduleInfo($requests['id']);
     52        $list = db_schedule_biz_schedule4biz_schedule_id($requests['id']);
    5353
    5454        //繰り返しフラグのチェック
     
    6767        $list['finish_time'] = substr($list['finish_time'], 0, 5);
    6868
    69         $jmembers = biz_getJoinMemberSchedule($requests['id']);
     69        $jmembers = db_schedule_biz_schedule_member_list4biz_schedule_id($requests['id']);
    7070        if (array_search($target_member['nickname'], $jmembers)) {
    7171            $jmembers[$target_member['c_member_id']] = $target_member['nickname'];
     
    108108            $rep_schedule = biz_getRepeatScheduleID($requests['id']);
    109109            foreach ($rep_schedule as $value) {
    110                 biz_readSchedule($u, $value);
     110                db_schedule_update_biz_schedule_is_checked($u, $value);
    111111            }
    112112        } else {
    113             biz_readSchedule($u, $requests['id']);
     113            db_schedule_update_biz_schedule_is_checked($u, $requests['id']);
    114114        }
    115115        return 'success';
  • OpenPNE/branches/ebihara/prj_dev28_bizfix/webapp_biz/modules/ktai_biz/page/fh_biz_schedule_view_member.php

    r1856 r2314  
    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_dev28_bizfix/webapp_biz/modules/ktai_biz/page/fh_biz_todo_edit.php

    r1856 r2314  
    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_dev28_bizfix/webapp_biz/modules/ktai_biz/page/fh_biz_todo_list.php

    r1856 r2314  
    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_dev28_bizfix/webapp_biz/modules/pc/page/f_home.php

    r1856 r2314  
    8383
    8484        $biz_dir = OPENPNE_MODULES_BIZ_DIR.'/biz/';  //bizモジュールディレクトリの定義
     85        util_include_php_files(OPENPNE_WEBAPP_BIZ_DIR . '/lib/db');
     86        util_include_php_files(OPENPNE_WEBAPP_BIZ_DIR . '/lib/util');
    8587        include_once($biz_dir.'lib/smarty_functions.php');  //bizモジュールよりライブラリを拝借
    8688        include_once $biz_dir . 'lib/mysql_functions.php';  //bizモジュールよりライブラリを拝借
  • OpenPNE/branches/ebihara/prj_dev28_bizfix/webapp_biz/modules/pc/page/h_home.php

    r1856 r2314  
    1717
    1818        //bizライブラリを使う
     19        util_include_php_files(OPENPNE_WEBAPP_BIZ_DIR . '/lib/db');
     20        util_include_php_files(OPENPNE_WEBAPP_BIZ_DIR . '/lib/util');
    1921        include_once(OPENPNE_MODULES_BIZ_DIR.'/biz/lib/smarty_functions.php');
    2022        include_once(OPENPNE_MODULES_BIZ_DIR.'/biz/lib/mysql_functions.php');
  • OpenPNE/branches/ebihara/prj_dev28_bizfix/webapp_biz/modules/pc/page/h_prof.php

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