function rsscache_sql2array($d_array) { global $rsscache_link; global $rsscache_time; global $rsscache_logo; global $rsscache_results; global $rsscache_admin; global $output; global $rsscache_link_static; // DEBUG // echo '<pre><tt>'; // print_r ($d_array); //exit; $f = rsscache_get_request_value('f'); // function // $output = rsscache_get_request_value ('output'); $item = array(); // $config = config_xml (); for ($i = 0; isset($d_array[$i]); $i++) { $category_xml = config_xml_by_category($d_array[$i]['tv2_moved']); // DEBUG // echo '<pre><tt>'; // print_r ($category_xml); //exit; $a = array('title' => $d_array[$i]['rsstool_title'], 'link' => $d_array[$i]['rsstool_url'], 'description' => $d_array[$i]['rsstool_desc'], 'pubDate' => $d_array[$i]['rsstool_date'], 'enclosure' => $category_xml['enclosure'], 'category' => $d_array[$i]['tv2_moved'], 'author' => $d_array[$i]['rsstool_user'], 'media:duration' => $d_array[$i]['rsstool_media_duration'] * 1, 'media:keywords' => str_replace(' ', ', ', $d_array[$i]['rsstool_keywords']), 'media:thumbnail' => misc_cleanup_slashes($rsscache_link_static . '/thumbnails/rsscache/' . $d_array[$i]['rsstool_url_crc32'] . '.jpg'), 'rsscache:dl_date' => $d_array[$i]['rsstool_dl_date'] * 1, 'rsscache:related_id' => $d_array[$i]['rsstool_related_id'] * 1, 'rsscache:event_start' => $d_array[$i]['rsstool_event_start'] * 1, 'rsscache:event_end' => $d_array[$i]['rsstool_event_end'] * 1, 'rsscache:url_crc32' => $d_array[$i]['rsstool_url_crc32'] * 1, 'rsscache:table_suffix' => isset($category_xml['rsscache:table_suffix']) ? $category_xml['rsscache:table_suffix'] : NULL, 'rsscache:category_title' => $category_xml['title'], 'cms:separate' => $category_xml['cms:separate'] * 1, 'cms:button_only' => $category_xml['cms:button_only'] * 1, 'cms:status' => isset($category_xml['cms:status']) ? $category_xml['cms:status'] * 1 : 0, 'cms:select' => $category_xml['cms:select'] * 1, 'cms:local' => isset($category_xml['cms:local']) ? $category_xml['cms:local'] : NULL, 'cms:iframe' => isset($category_xml['cms:iframe']) ? $category_xml['cms:iframe'] : NULL, 'cms:proxy' => isset($category_xml['cms:proxy']) ? $category_xml['cms:proxy'] : NULL); if (isset($category_xml['rsscache:stats_category'])) { $a['rsscache:stats_category'] = $category_xml['rsscache:stats_category']; $a['rsscache:stats_items'] = $category_xml['rsscache:stats_items'] * 1; $a['rsscache:stats_days'] = $category_xml['rsscache:stats_days'] * 1; $a['rsscache:stats_items_today'] = $category_xml['rsscache:stats_items_today'] * 1; $a['rsscache:stats_items_7_days'] = $category_xml['rsscache:stats_items_7_days'] * 1; $a['rsscache:stats_items_30_days'] = $category_xml['rsscache:stats_items_30_days'] * 1; } //widget_media_demux ($media_url) //widget_media ($media_url, $width = NULL, $height = NULL, $ratio = NULL, $autoplay = 0, $hq = 0, $loop = 0, $blackbg = 0) $demux = widget_media_demux($d_array[$i]['rsstool_url']); if ($demux != 0) { $a['media:embed'] = widget_media($d_array[$i]['rsstool_url'], -1, -1); $a['cms:demux'] = $demux; } for ($j = 0; isset($category_xml['rsscache:feed_' . $j . '_link']); $j++) { $b = array(); // if (isset ($category_xml['rsscache:feed_'.$j.'_client'])) // $b['rsscache:feed_'.$j.'_client'] = $category_xml['rsscache:feed_'.$j.'_client']; $b['rsscache:feed_' . $j . '_exec'] = $category_xml['rsscache:feed_' . $j . '_exec']; $b['rsscache:feed_' . $j . '_link'] = $category_xml['rsscache:feed_' . $j . '_link']; $a = array_merge($b, $a); } $item[] = $a; } return $item; }
function widget_media_playlist($media_urls, $width = NULL, $height = NULL, $ratio = NULL, $autoplay = 0, $hq = 0, $loop = 0, $blackbg = 0) { $p = ''; $a = array(); for ($i = 0; isset($media_urls[$i]) && $i < 10; $i++) { $demux = widget_media_demux($media_urls[$i]); if ($demux == 1) { $a[] = $media_urls[$i]; } } //print_r ($a); if (count($a) > 0) { $p .= widget_video_youtube_playlist($a, $width, $height, $ratio, $autoplay, $hq, $loop); } return $p; }