コード例 #1
0
$server_path = create_server_url();
$total_pics = 0;
$album_config['cols_per_page'] = $album_config['cols_per_page'] == 0 ? 4 : $album_config['cols_per_page'];
$album_config['rows_per_page'] = $album_config['rows_per_page'] == 0 ? 5 : $album_config['rows_per_page'];
$pics_per_page = $album_config['rows_per_page'] * $album_config['cols_per_page'];
$pic_row_count = 0;
$pic_col_count = 0;
$s_colspan = $album_config['cols_per_page'];
$s_colwidth = 100 / $s_colspan . '%';
$images_data = array();
if ($mode == 'full') {
    $images_data = $class_images->get_all_user_images('i.pic_id DESC', $start, $pics_per_page);
    $total_pics = $class_images->get_total_images();
} else {
    $images_data = $class_images->get_user_images($pic_user_id, 'i.pic_id DESC', $start, $pics_per_page);
    $total_pics = $class_images->get_total_user_images($pic_user_id);
}
$nav_server_url = create_server_url();
$breadcrumbs['address'] = $lang['Nav_Separator'] . '<a href="' . $nav_server_url . append_sid('album.' . PHP_EXT) . '">' . $lang['Album'] . '</a>' . $lang['Nav_Separator'] . '<a class="nav-current" href="' . $nav_server_url . append_sid(CMS_PAGE_IMAGES) . '">' . $lang['Uploaded_Images_Local'] . '</a>';
if (empty($images_data)) {
    message_die(GENERAL_MESSAGE, $lang['No_Pics']);
}
$pics_parsed = 0;
foreach ($images_data as $image_data) {
    $pics_parsed++;
    if (empty($pic_col_count) || $pic_col_count == $album_config['cols_per_page']) {
        $template->assign_block_vars('pic_row', array());
        $pic_col_count = 0;
    }
    $pic_col_count++;
    // We are checking for small thumbnails... added an underscore to distinguish those small thumbs respect to mid sized!