예제 #1
0
    while ($item = $result->fetch()) {
        if (!empty($item['image']) and file_exists(NV_ROOTDIR . '/' . NV_UPLOADS_DIR . '/' . $module_upload . '/img/' . $item['image'])) {
            $item['src'] = videos_thumbs($item['id'], $item['image'], $module_upload, $module_config[$module_name]['homewidth'], $module_config[$module_name]['homeheight'], 90);
        } elseif (nv_is_url($item['image'])) {
            $item['src'] = $item['image'];
        } elseif (!empty($show_no_image)) {
            $item['src'] = NV_BASE_SITEURL . $show_no_image;
        } else {
            $item['src'] = '';
        }
        $item['alt'] = !empty($item['homeimgalt']) ? $item['homeimgalt'] : $item['title'];
        $item['width'] = $module_config[$module_name]['blockwidth'];
        $item['link'] = NV_BASE_SITEURL . 'index.php?' . NV_LANG_VARIABLE . '=' . NV_LANG_DATA . '&' . NV_NAME_VARIABLE . '=' . $module_name . '&' . NV_OP_VARIABLE . '=' . $module_info['alias']['playlists'] . '/' . $item['alias'];
        $item['fake_id'] = 0;
        $db->sqlreset()->select('COUNT(*)')->from(NV_PREFIXLANG . '_' . $module_data . '_playlist')->where('playlist_id= ' . $item['id']);
        $num_items = $db->query($db->sql())->fetchColumn();
        $item['num_items'] = $num_items;
        if ($item['private_mode'] == 1 and $user_info['userid'] != $item['userid'] and !defined('NV_IS_MODADMIN')) {
            unset($item);
        } else {
            $playlist_array[] = $item;
        }
    }
    $result->closeCursor();
    unset($result, $row);
    $playlist_other_array = array();
    $contents = playlist_theme($playlist_array, '', '', $playlist_info, '', '');
}
include NV_ROOTDIR . '/includes/header.php';
echo nv_site_theme($contents);
include NV_ROOTDIR . '/includes/footer.php';
예제 #2
0
    if (empty($contents)) {
        $query_cat = $db->query('SELECT bid as id, title, alias, image, description, weight FROM ' . NV_PREFIXLANG . '_' . $module_data . '_block_cat ORDER BY weight ASC');
        while ($item = $query_cat->fetch()) {
            if (!empty($item['image']) and file_exists(NV_ROOTDIR . '/' . NV_UPLOADS_DIR . '/' . $module_upload . '/img/' . $item['image'])) {
                $item['src'] = videos_thumbs($item['id'], $item['image'], $module_upload, $module_config[$module_name]['homewidth'], $module_config[$module_name]['homeheight'], 90);
            } elseif (nv_is_url($item['image'])) {
                $item['src'] = $item['image'];
            } elseif (!empty($show_no_image)) {
                $item['src'] = NV_BASE_SITEURL . $show_no_image;
            } else {
                $item['src'] = '';
            }
            $item['alt'] = $item['title'];
            $item['width'] = $module_config[$module_name]['blockwidth'];
            $item['link'] = NV_BASE_SITEURL . 'index.php?' . NV_LANG_VARIABLE . '=' . NV_LANG_DATA . '&' . NV_NAME_VARIABLE . '=' . $module_name . '&' . NV_OP_VARIABLE . '=' . $module_info['alias']['groups'] . '/' . $item['alias'];
            $item['publtime'] = 0;
            $array_cat[] = $item;
        }
        $query_cat->closeCursor();
        unset($query_cat, $item);
        $contents = playlist_theme($array_cat, '', '', $groups_info, '', '');
        if (!defined('NV_IS_MODADMIN') and $contents != '' and $cache_file != '') {
            $nv_Cache->setItem($module_name, $cache_file, $contents);
        }
    }
    $page_title = $module_info['funcs']['groups']['func_custom_name'];
    $key_words = $module_info['keywords'];
}
include NV_ROOTDIR . '/includes/header.php';
echo nv_site_theme($contents);
include NV_ROOTDIR . '/includes/footer.php';