[ Index ] |
|
Code source de e107 0.7.8 |
1 <?php 2 3 if (!defined('e107_INIT')) { exit; } 4 5 if(!$calendar_install = $sql -> db_Select("plugin", "*", "plugin_path = 'calendar_menu' AND plugin_installflag = '1' ")) 6 { 7 return; 8 } 9 10 $LIST_CAPTION = $arr[0]; 11 $LIST_DISPLAYSTYLE = ($arr[2] ? "" : "none"); 12 13 require_once ('ecal_class.php'); 14 $ecal_class = new ecal_class; 15 16 $current_day = $ecal_class->cal_date['mday']; 17 $current_month = $ecal_class->cal_date['mon']; 18 $current_year = $ecal_class->cal_date['year']; 19 20 $current = mktime(0,0,0,$current_month, $current_day, $current_year); 21 22 if($mode == "new_page" || $mode == "new_menu" ){ 23 $lvisit = $this -> getlvisit(); 24 $qry = " event_datestamp>".intval($lvisit)." AND "; 25 }else{ 26 $qry = ""; 27 } 28 29 $bullet = $this -> getBullet($arr[6], $mode); 30 31 $qry = " 32 SELECT e.*, c.event_cat_name 33 FROM #event AS e 34 LEFT JOIN #event_cat AS c ON c.event_cat_id = e.event_category 35 WHERE ".$qry." e.event_start>='$current' AND c.event_cat_class REGEXP '".e_CLASS_REGEXP."' 36 ORDER BY e.event_start ASC LIMIT 0,".intval($arr[7]); 37 38 if(!$event_items = $sql->db_Select_gen($qry)){ 39 $LIST_DATA = LIST_CALENDAR_2; 40 }else{ 41 while($row = $sql -> db_Fetch()){ 42 43 $tmp = explode(".", $row['event_author']); 44 if($tmp[0] == "0"){ 45 $AUTHOR = $tmp[1]; 46 }elseif(is_numeric($tmp[0]) && $tmp[0] != "0"){ 47 $AUTHOR = (USER ? "<a href='".e_BASE."user.php?id.".$tmp[0]."'>".$tmp[1]."</a>" : $tmp[1]); 48 }else{ 49 $AUTHOR = ""; 50 } 51 52 $rowheading = $this -> parse_heading($row['event_title'], $mode); 53 $ICON = $bullet; 54 $HEADING = "<a href='".e_PLUGIN."calendar_menu/event.php?".$row['event_start'].".event.".$row['event_id']."' title='".$row['event_title']."'>".$rowheading."</a>"; 55 $CATEGORY = $row['event_cat_name']; 56 $DATE = ($arr[5] ? ($row['event_start'] ? $this -> getListDate($row['event_start'], $mode) : "") : ""); 57 $INFO = ""; 58 $LIST_DATA[$mode][] = array( $ICON, $HEADING, $AUTHOR, $CATEGORY, $DATE, $INFO ); 59 } 60 } 61 62 ?>
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 |