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

Changeset 2793


Ignore:
Timestamp:
May 11, 2007, 7:35:34 PM (12 years ago)
Author:
ebihara
Message:

#685:CSVインポートで追加したユーザの生年月日を0/0/0とし、それに伴い表示上もしくは機能的に不自然になった箇所を修正

Location:
OpenPNE/branches/2.6.x/webapp/modules
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • OpenPNE/branches/2.6.x/webapp/modules/admin/do/import_c_member.php

    r2732 r2793  
    108108            $c_member['nickname'] = $nickname;
    109109            $c_member['birth_year'] = 0;
    110             $c_member['birth_month'] = 1;
    111             $c_member['birth_day'] = 1;
     110            $c_member['birth_month'] = 0;
     111            $c_member['birth_day'] = 0;
    112112            $c_member['c_password_query_id'] = 0;
    113113            $c_member['c_member_id_invite'] = 1;
  • OpenPNE/branches/2.6.x/webapp/modules/admin/lib/db_admin.php

    r2433 r2793  
    557557        $params[] = $cond_list['e_year'];
    558558    }
     559
     560    // 誕生日による絞り込みの場合は、誕生年が0のユーザを除外する
     561    if (!empty($cond_list['s_year']) || !empty($cond_list['e_year'])) {
     562        $sql .= ' AND birth_year <> 0';
     563    }
     564
    559565    $sql .= ' ORDER BY c_member_id';
    560566
     
    13911397    );
    13921398   
    1393     $sql = "select ((year(curdate()) - birth_year)- (RIGHT(CURDATE(),5)<concat(birth_month,'-',birth_day))) as age from c_member;";
     1399    $sql = "SELECT ((YEAR(CURDATE()) - birth_year)- " .
     1400        "(RIGHT(CURDATE(),5)<CONCAT(birth_month,'-',birth_day))) " .
     1401        "AS age FROM c_member WHERE birth_year <> 0;";
    13941402    $lst = db_get_all($sql);
    13951403
  • OpenPNE/branches/2.6.x/webapp/modules/ktai/templates/f_home.tpl

    r2431 r2793  
    4949({capture name="birth"})
    5050({if $target_c_member.age !== NULL})年齢:({$target_c_member.age})歳<br>({/if})
     51({if $target_c_member.birth_month && $target_c_member.birth_day})
    5152誕生日:({$target_c_member.birth_month})月({$target_c_member.birth_day})日<br>
     53({/if})
    5254({/capture})
    5355
  • OpenPNE/branches/2.6.x/webapp/modules/ktai/templates/h_config_prof.tpl

    r882 r2793  
    1515({capture name="birth"})
    1616<font color="red">*</font>生まれた年<br>
    17 <input type="text" name="birth_year" istyle="4" mode="numeric" value="({$c_member.birth_year})" size="4" maxlength="4"><br>
     17<input type="text" name="birth_year" istyle="4" mode="numeric" value="({if $c_member.birth_year})({$c_member.birth_year})({/if})" size="4" maxlength="4"><br>
    1818<select name="public_flag_birth_year">
    1919    ({foreach from=$public_flags key=key item=item})
     
    2424<font color="red">*</font>誕生日<br>
    2525<select name="birth_month">
     26    <option>--
    2627    ({foreach from=$month item=item})
    2728    <option value="({$item})"({if $item == $c_member.birth_month}) selected="selected"({/if})>({$item})
     
    2930</select>
    3031<select name="birth_day">
     32    <option>--
    3133    ({foreach from=$day item=item})
    3234    <option value="({$item})"({if $item == $c_member.birth_day}) selected="selected"({/if})>({$item})
  • OpenPNE/branches/2.6.x/webapp/modules/pc/templates/h_config_prof.tpl

    r1881 r2793  
    9999<div class="padding_s">
    100100
    101 <input type="text" class="text" name="birth_year" value="({$c_member.birth_year})" size="10" maxlength="4">年
     101<input type="text" class="text" name="birth_year" value="({if $c_member.birth_year})({$c_member.birth_year})({/if})" size="10" maxlength="4">年
    102102
    103103</div>
  • OpenPNE/branches/2.6.x/webapp/modules/pc/templates/inc_f_home_h_prof.tpl

    r2646 r2793  
    853853<!-- ここまで:主内容>年齢 -->
    854854<!-- ここから:主内容>誕生日 -->
     855({if $target_c_member.birth_month && $target_c_member.birth_day})
    855856<tr>
    856857<td class="border_01 bg_09 padding_s" style="width:90px;border-right:none;border-top:none;">
     
    865866</td>
    866867</tr>
     868({/if})
    867869<!-- ここまで:主内容>誕生日 -->
    868870({/capture})
Note: See TracChangeset for help on using the changeset viewer.