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

Changeset 6629


Ignore:
Timestamp:
Apr 18, 2008, 7:02:44 PM (13 years ago)
Author:
ebihara
Message:

#135:ハードタブや行末のスペースなどを除去・置換

File:
1 edited

Legend:

Unmodified
Added
Removed
  • OpenPNE/trunk/webapp/lib/db/album.php

    r6627 r6629  
    77/**
    88 * db_album_public_flag_condition
    9  * 
     9 *
    1010 * @param int $c_member_id target c_member_id
    1111 * @param int $u viewer's c_member_id
     
    4646    $sql = 'SELECT * FROM c_album WHERE c_album_id = ?';
    4747    $params = array(intval($c_album_id));
    48    
     48
    4949    $album = db_get_row($sql, $params);
    5050
     
    5454/**
    5555 * あるメンバーのアルバム一覧を取得
    56  * 
     56 *
    5757 * @param int $c_member_id target_member_id
    5858 * @param int $count
     
    6363{
    6464    $pf_condition = db_album_public_flag_condition($c_member_id, $u, $force);
    65     $sql = 'SELECT * FROM c_album WHERE c_member_id = ? ' 
     65    $sql = 'SELECT * FROM c_album WHERE c_member_id = ? '
    6666         . $pf_condition
    6767         . ' ORDER BY u_datetime DESC';
    68    
    69     $params = array(intval($c_member_id));       
     68
     69    $params = array(intval($c_member_id));
    7070    return db_get_all_limit($sql, 0, $count, $params);
    7171}
     
    103103    $sql = 'SELECT c_album_image_id FROM c_album_image WHERE c_album_image_id = ?';
    104104    $params = array(intval($c_album_image_id));
    105    
     105
    106106    return (bool)db_get_one($sql,$params);
    107107}
     
    121121    $orderby = ' ORDER BY i.r_datetime DESC';
    122122    $sql = $select .$from . $where .$orderby;
    123    
     123
    124124    $params = array(intval($c_album_id));
    125125    $list = db_get_all_limit($sql, $page_size * ($page - 1), $page_size, $params);
    126    
     126
    127127    $sql = 'SELECT COUNT(c_album_image_id) FROM c_album_image WHERE c_album_id = ?';
    128128    $params = array(intval($c_album_id));
     
    156156{
    157157    $public_flag_condition = db_album_public_flag_condition($c_member_id, $u);
    158    
     158
    159159    $select  = 'SELECT c_album_image.c_album_image_id ';
    160160    $from    = ' FROM c_album_image, c_album';
    161     $where   = ' WHERE c_album.c_album_id = c_album_image.c_album_id' . 
     161    $where   = ' WHERE c_album.c_album_id = c_album_image.c_album_id' .
    162162                ' AND c_album.c_member_id = ?' .
    163163                ' AND c_album.c_album_id = ?' .
     
    167167    $sql = $select . $from . $where . $orderby;
    168168    $params = array(intval($c_member_id),intval($c_album_id),intval($c_album_image_id));
    169        
     169
    170170    return db_get_one($sql, $params);
    171171}
     
    181181{
    182182    $public_flag_condition = db_album_public_flag_condition($c_member_id, $u);
    183    
     183
    184184    $select  = 'SELECT c_album_image.c_album_image_id ';
    185185    $from    = ' FROM c_album_image, c_album';
    186     $where   = ' WHERE c_album.c_album_id = c_album_image.c_album_id' . 
     186    $where   = ' WHERE c_album.c_album_id = c_album_image.c_album_id' .
    187187                ' AND c_album.c_member_id = ?' .
    188188                ' AND c_album.c_album_id = ?' .
     
    192192    $sql = $select . $from . $where . $orderby;
    193193    $params = array(intval($c_member_id),intval($c_album_id),intval($c_album_image_id));
    194        
     194
    195195    return db_get_one($sql, $params);
    196196}
     
    239239    $params = array(intval($c_member_id));
    240240    $list = db_get_all_page($sql,$page, $page_size,$params);
    241    
     241
    242242    $sql = 'SELECT COUNT(c_album_id) FROM c_album WHERE c_member_id = ?' . $pf_cond;
    243243    $total_num = db_get_one($sql, $params);
    244    
     244
    245245    if ($total_num != 0) {
    246246        $total_page_num =  ceil($total_num / $page_size);
     
    257257        }
    258258    }
    259    
     259
    260260    return array($list, $prev, $next, $total_num);
    261261}
     
    290290        foreach ($keyword_list as $word) {
    291291            $word = check_search_word($word);
    292            
     292
    293293            $where .= ' AND (subject LIKE ? OR description LIKE ?)';
    294294            $params[] = '%'.$word.'%';
     
    299299
    300300    $sql = $select . $from . $where . $order;
    301    
     301
    302302    $list = db_get_all_page($sql, $page, $page_size, $params);
    303303    foreach($list as $key => $value) {
     
    434434    );
    435435    return db_update('c_album', $data, $where);
    436    
     436
    437437}
    438438
     
    444444
    445445     if ($image_filename) {
    446         $data['image_filename'] = $image_filename;
     446        $data['image_filename'] = $image_filename;
    447447        $data['filesize'] = $filesize;
    448448     }
     
    451451        'c_album_image_id' => intval($c_album_image_id),
    452452    );
    453    
     453
    454454    return db_update('c_album_image', $data, $where);
    455455
     
    498498function db_album_update_c_album_u_datetime($album_id)
    499499{
    500         $data = array(
     500    $data = array(
    501501        'u_datetime' => db_now(),
    502502    );
    503    
     503
    504504    $where =array(
    505505        'c_album_id' => $album_id,
     
    557557
    558558    $params = array(intval($c_album_id));
    559    
     559
    560560    //アルバムと画像の関連
    561561    $sql = 'DELETE FROM c_album_image WHERE c_album_id = ?';
     
    614614            'type' => '',
    615615        );
    616        
     616
    617617        $db =& db_get_instance('image');
    618618        if ($db->insert("c_image", $params)) {
     
    704704 * @params int $new_filesize
    705705 * @return bool
    706  */ 
     706 */
    707707function db_album_is_insertable4c_member_id($c_member_id, $new_filesize = 0)
    708708{
Note: See TracChangeset for help on using the changeset viewer.