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

Changeset 9319


Ignore:
Timestamp:
Nov 21, 2008, 7:57:00 PM (11 years ago)
Author:
akamine
Message:

#2151 スケジュールお知らせメールの送り先の条件を変更

File:
1 edited

Legend:

Unmodified
Added
Removed
  • OpenPNE/branches/stable-2.12.x/webapp_biz/modules/biz/lib/mysql_functions.php

    r9263 r9319  
    13621362        $send_list[$c_member_id][] = $value;
    13631363    }
    1364 
    1365     foreach ($send_list as $key => $value) {
    1366         $c_member_secure = db_member_c_member_secure4c_member_id($key);
    1367         $pc_address = $c_member_secure['pc_address'];
    1368 
    1369         $params = array(
    1370             "c_member" => db_member_c_member4c_member_id_LIGHT($key),
    1371             "c_schedule_list" => $value,
    1372         );
     1364    $c_member = db_member_c_member4c_member_id($c_member_id, true);
     1365
     1366    if (!empty($c_member['secure']['pc_address'])) {
     1367        // PCメールアドレスがある場合は、PCのみ送信
     1368        foreach ($send_list as $key => $value) {
     1369            $c_member_secure = db_member_c_member_secure4c_member_id($key);
     1370            $pc_address = $c_member_secure['pc_address'];
     1371
     1372            $params = array(
     1373                'c_member' => db_member_c_member4c_member_id_LIGHT($key),
     1374                'c_schedule_list' => $value,
     1375            );
    13731376        fetch_send_mail($pc_address, 'm_pc_schedule_mail', $params);
    1374     }
    1375     foreach ($send_list as $key => $value) {
    1376         $c_member_secure = db_member_c_member_secure4c_member_id($key);
    1377         $ktai_address = $c_member_secure['ktai_address'];
    1378 
    1379         $params = array(
    1380             "c_member" => db_member_c_member4c_member_id_LIGHT($key),
    1381             "c_schedule_list" => $value,
    1382         );
    1383         fetch_send_mail($ktai_address, 'm_ktai_schedule_mail', $params);
     1377        }
     1378    } else {
     1379        foreach ($send_list as $key => $value) {
     1380            $c_member_secure = db_member_c_member_secure4c_member_id($key);
     1381            $ktai_address = $c_member_secure['ktai_address'];
     1382            // PCメールアドレスがない場合は、携帯のみ送信
     1383            $to = $c_member['secure']['ktai_address'];
     1384            $p = array('kad' => t_encrypt(db_member_username4c_member_id($c_member['c_member_id'], true)));
     1385            $login_url = openpne_gen_url('ktai', 'page_o_login', $p);
     1386
     1387            $params = array(
     1388                'c_member' => db_member_c_member4c_member_id_LIGHT($key),
     1389                'login_url'   => $login_url,
     1390                'c_schedule_list' => $value,
     1391            );
     1392            fetch_send_mail($ktai_address, 'm_ktai_schedule_mail', $params);
     1393        }
    13841394    }
    13851395}
Note: See TracChangeset for help on using the changeset viewer.