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

Changeset 6557


Ignore:
Timestamp:
Apr 16, 2008, 2:45:53 AM (14 years ago)
Author:
ebihara
Message:

#135:管理画面からアルバム写真管理が使用できるようにした

Location:
OpenPNE/trunk
Files:
3 added
4 edited

Legend:

Unmodified
Added
Removed
  • OpenPNE/trunk/public_html/modules/admin/default.css

    r6555 r6557  
    14981498#admin_page_edit_album_list td.formbutton { text-align: center; }
    14991499
     1500/** admin_page_edit_album_image_list **/
     1501#admin_page_edit_album_image_list h2 { padding-left: 17px; background: url("../../admin/img/icn_ttl.gif") no-repeat 0 50%; line-height: 22px; font-size: 22px;}
     1502#admin_page_edit_album_image_list table { width: 100%;}
     1503#admin_page_edit_album_image_list td.menu { padding-right: 10px; vertical-align: top;}
     1504#admin_page_edit_album_image_list td.detail { padding-bottom: 10px; width: 100%; border: 1px #A4A4A6 solid; vertical-align: top;}
     1505#admin_page_edit_album_image_list td.menu ul { padding: 2px 18px 20px 0;}
     1506#admin_page_edit_album_image_list td.menu ul li { padding-top: 2px; list-style-type: none; white-space: pre;}
     1507#admin_page_edit_album_image_list td.detail div { padding: 20px;}
     1508#admin_page_edit_album_image_list td.detail h3 { padding-left: 20px; border-bottom: 1px #A3A3A6 solid; background-color: #58585C; color:#fff; line-height: 200%; font-size: medium;}
     1509#admin_page_edit_album_image_list div#searchForm form {margin-bottom: 10px;}
     1510#admin_page_edit_album_image_list p#noAlbum { text-align: center; margin: 15px 0; }
     1511#admin_page_edit_album_image_list table.album { margin: 15px; width: 570px; }
     1512#admin_page_edit_album_image_list td.textbody { width: 470px; word-break: break-all; }
     1513#admin_page_edit_album_image_list td.formbutton { text-align: center; }
     1514
    15001515/*********** footer ***********/
    15011516.footer { margin-top: 20px; padding: 10px 0; text-align: center;}
  • OpenPNE/trunk/webapp/lib/db/album.php

    r6546 r6557  
    635635}
    636636
    637 //管理画面用に残しておく
    638 function db_image_c_album_image_list($page, $page_size, &$pager)
    639 {
    640     $db =& db_get_instance('image');
    641 
    642     $sql = 'SELECT c_image_id FROM c_image_album ORDER BY c_image_id DESC';
    643     $id_list = db_get_col_page($sql, $page, $page_size);
    644 
    645     $c_image_list = array();
    646     foreach ($id_list as $c_image_id) {
    647         $sql = 'SELECT c_image_id, filename, r_datetime FROM c_image_album WHERE c_image_id = ?';
    648         $params = array(intval($c_image_id));
    649         $c_image_list[] = $db->get_row($sql, $params);
    650     }
    651 
    652     $sql = 'SELECT COUNT(*) FROM c_image_album';
    653     $total_num = $db->get_one($sql);
    654 
    655     $pager = admin_make_pager($page, $page_size, $total_num);
    656     return $c_image_list;
    657 }
    658 
    659637function db_album_image_data_delete($image_filename)
    660638{
     
    666644    image_cache_delete($image_filename);
    667645}
    668 
    669 
    670646
    671647function db_album_image_delete_c_image($filename)
  • OpenPNE/trunk/webapp/modules/admin/lib/db_admin.php

    r6555 r6557  
    30603060}
    30613061
     3062function db_admin_c_album_image_list($page, $page_size, &$pager, $c_album_id = null)
     3063{
     3064    $db =& db_get_instance('image');
     3065
     3066    $params = array();
     3067    $sql = 'SELECT cai.c_album_image_id, cai.image_filename, cai.r_datetime, cai.image_description, cai.c_album_id, ca.subject'
     3068         . ' FROM c_album_image AS cai'
     3069         . ' INNER JOIN c_album AS ca ON cai.c_album_id = ca.c_album_id';
     3070    if ($c_album_id) {
     3071        $sql .= ' WHERE ca.c_album_id = ?';
     3072        $params[] = $c_album_id;
     3073    }
     3074    $sql .= ' ORDER BY r_datetime DESC';
     3075    $c_image_album_list = db_get_all_page($sql, $page, $page_size, $params);
     3076
     3077    $sql = 'SELECT COUNT(*) FROM c_album_image';
     3078    if ($c_album_id) {
     3079        $sql .=  'WHERE c_album_id = ?';
     3080    }
     3081    $total_num = $db->get_one($sql, $params);
     3082
     3083    $pager = admin_make_pager($page, $page_size, $total_num);
     3084    return $c_image_album_list;
     3085}
     3086
     3087function db_admin_c_album_image_list4c_album_image_id($page, $page_size, &$pager, $c_album_image_id)
     3088{
     3089    $db =& db_get_instance('image');
     3090
     3091    $sql = 'SELECT cai.c_album_image_id, cai.image_filename, cai.r_datetime, cai.image_description, cai.c_album_id, ca.subject'
     3092         . ' FROM c_album_image AS cai'
     3093         . ' INNER JOIN c_album AS ca ON cai.c_album_id = ca.c_album_id'
     3094         . ' WHERE cai.c_album_image_id = ?'
     3095         . ' ORDER BY r_datetime DESC';
     3096    $params = array($c_album_image_id);
     3097    $c_image_album_list = db_get_all_page($sql, $page, $page_size, $params);
     3098
     3099    $sql = 'SELECT COUNT(*) FROM c_album_image'
     3100         . ' WHERE c_album_image_id = ?';
     3101    $total_num = $db->get_one($sql, $params);
     3102
     3103    $pager = admin_make_pager($page, $page_size, $total_num);
     3104    return $c_image_album_list;
     3105}
    30623106?>
  • OpenPNE/trunk/webapp/modules/admin/templates/edit_album_list.tpl

    r6555 r6557  
    8282            <th>表紙</th>
    8383            <td>
    84             <img src="({if $item.album_cover_image})({t_img_album_url filename=$item.album_cover_image w=180 h=180})({else})({t_img_url_skin filename=no_image w=180 h=180})({/if})">
     84            <img src="({if $item.album_cover_image})({t_img_album_url filename=$item.album_cover_image w=120 h=120})({else})({t_img_url_skin filename=no_image w=120 h=120})({/if})">
    8585            </td>
    8686            </tr>
Note: See TracChangeset for help on using the changeset viewer.