function rsscache_title($d = NULL) { global $rsscache_title; global $rsscache_time; $v = rsscache_get_request_value('v'); $c = rsscache_get_request_value('c'); $a = array(); if (trim($rsscache_title) != '') { $a[] = $rsscache_title; } if (trim($c) != '') { $category = config_xml_by_category($c); if ($category) { if (trim($category['title']) != '') { $a[] = $category['title']; } } } if ($v && $d != NULL) { $a[] = $d['rsstool_title']; } return implode(' - ', $a); }
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 $output = rsscache_get_request_value('output'); // output if (!$output) { $output = $rsscache_default_output; } $q = rsscache_get_request_value('q'); // search query $item = rsscache_get_request_value('item'); // item crc32 $start = rsscache_get_request_value('start'); // offset if (!$start) { $start = 0; } $num = rsscache_get_request_value('num'); // number of results if (!$num) { $num = $rsscache_results; } if ($num > $rsscache_max_results) { $num = $rsscache_max_results; } $config = config_xml(); // DEBUG //echo '<pre><tt>'; //print_r ($config); //echo generate_rss2 ($config['channel'], $config['item'], 1, 1); //exit; // NOT admin if ($rsscache_admin == 0) {