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

Changeset 6559


Ignore:
Timestamp:
Apr 16, 2008, 2:38:16 PM (12 years ago)
Author:
ebihara
Message:

#135:アルバム管理から指定したアルバムのアルバム写真管理ページに遷移できるようにした

Location:
OpenPNE/trunk/webapp/modules/admin
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • OpenPNE/trunk/webapp/modules/admin/lib/db_admin.php

    r6557 r6559  
    29802980}
    29812981
     2982function db_admin_album_count_c_album_image4c_album_id($c_album_id)
     2983{
     2984    $sql = 'SELECT COUNT(*) FROM c_album_image WHERE c_album_id = ?';
     2985    return db_get_one($sql, array(intval($c_album_id)));
     2986}
     2987
    29822988function db_admin_album_list($keyword, $page_size, $page)
    29832989{
     
    30143020    foreach ($list as $key => $value) {
    30153021        $list[$key]['c_member'] = db_member_c_member_with_profile($value['c_member_id']);
     3022        $list[$key]['count_images'] = db_admin_album_count_c_album_image4c_album_id($value['c_album_id']);
    30163023    }
    30173024
     
    30453052    foreach ($list as $key => $value) {
    30463053        $list[$key]['c_member'] = db_member_c_member_with_profile($value['c_member_id']);
     3054        $list[$key]['count_images'] = db_admin_album_count_c_album_image4c_album_id($value['c_album_id']);
    30473055    }
    30483056
     
    30773085    $sql = 'SELECT COUNT(*) FROM c_album_image';
    30783086    if ($c_album_id) {
    3079         $sql .=  'WHERE c_album_id = ?';
     3087        $sql .=  ' WHERE c_album_id = ?';
    30803088    }
    30813089    $total_num = $db->get_one($sql, $params);
  • OpenPNE/trunk/webapp/modules/admin/templates/edit_album_list.tpl

    r6557 r6559  
    6969            <td>
    7070            <a href="({t_url _absolute=1 m=pc a=page_fh_album})&amp;target_c_album_id=({$item.c_album_id})" target="_blank">({$item.subject})</a>
     71            (({if $item.count_images})<a href="?m=({$module_name})&amp;a=page_({$hash_tbl->hash('edit_album_image_list','page')})&amp;target_c_album_id=({$item.c_album_id})">({/if})写真:({$item.count_images})件({if $item.count_images})</a>({/if}))
    7172            </td>
    7273            </tr>
Note: See TracChangeset for help on using the changeset viewer.