[ Index ] |
|
Code source de e107 0.7.8 |
1 <?php 2 3 // Reflects updates to CVS version 1.3 made 29.10.2006 4 5 if (!defined('e107_INIT')) { exit; } 6 7 //##### create feed for admin, return array $eplug_rss_feed -------------------------------- 8 $feed['name'] = EC_ADLAN_A12; 9 $feed['url'] = 'calendar'; //the identifier for the rss feed url 10 $feed['topic_id'] = ''; //the topic_id, empty on default (to select a certain category) 11 $feed['path'] = 'calendar_menu'; //this is the plugin path location 12 $feed['text'] = EC_ADLAN_A157; 13 $feed['class'] = '0'; 14 $feed['limit'] = '9'; 15 //##### ------------------------------------------------------------------------------------ 16 17 require_once ('ecal_class.php'); 18 $ecal_class = new ecal_class; 19 20 //##### create rss data, return as array $eplug_rss_data ----------------------------------- 21 $current_day = $ecal_class->cal_date['mday']; 22 $current_month = $ecal_class->cal_date['mon']; 23 $current_year = $ecal_class->cal_date['year']; 24 $current = mktime(0,0,0,$current_month, $current_day, $current_year); 25 26 $qry = " 27 SELECT e.*, c.event_cat_name 28 FROM #event AS e 29 LEFT JOIN #event_cat AS c ON c.event_cat_id = e.event_category 30 WHERE e.event_start>='$current' AND c.event_cat_class REGEXP '".e_CLASS_REGEXP."' 31 ORDER BY e.event_start ASC LIMIT 0,".$this->limit; 32 33 $rss = array(); 34 $sqlrss = new db; 35 if($items = $sqlrss->db_Select_gen($qry)){ 36 $i=0; 37 while($rowrss = $sqlrss -> db_Fetch()){ 38 $tmp = explode(".", $rowrss['event_author']); 39 $rss[$i]['author'] = $tmp[1]; 40 $rss[$i]['author_email'] = ''; 41 $rss[$i]['link'] = $e107->base_path.$PLUGINS_DIRECTORY."calendar_menu/event.php?".$rowrss['event_start'].".event.".$rowrss['event_id']; 42 $rss[$i]['linkid'] = $rowrss['event_id']; 43 $rss[$i]['title'] = $rowrss['event_title']; 44 $rss[$i]['description'] = ''; 45 $rss[$i]['category_name'] = $rowrss['event_cat_name']; 46 $rss[$i]['category_link'] = ''; 47 $rss[$i]['datestamp'] = $rowrss['event_start']; 48 $rss[$i]['enc_url'] = ""; 49 $rss[$i]['enc_leng'] = ""; 50 $rss[$i]['enc_type'] = ""; 51 $i++; 52 } 53 } 54 //##### ------------------------------------------------------------------------------------ 55 56 $eplug_rss_feed[] = $feed; 57 $eplug_rss_data[] = $rss; 58 59 ?>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Sun Apr 1 01:23:32 2007 | par Balluche grâce à PHPXref 0.7 |