SM-Finder-Logo        
herz Karte Kalender Suche Bookmarks Experte FAQ

Module

Download

SMFinder_Query_composeDates4UIDs

Wird verwendet von:
SMFinder_Main
SMFinder_Query_Calendar
SMFinder_Query_composeDates4UIDs
SMFinder_Query_showEventList
SMallGiessen_SMFinder

Keine Erläuterungen gefunden.

<?php /* published under GPL www.gnu.org/licenses/gpl.html */
function SMFinder_Query_composeDates4UIDs($UIDs,$start,$end,$details,$title){
  include("SMFinder_Config.php");
  include_once('SMFinder_Query_readEvent.php');
  include_once('SMFinder_Query_expandSeries.php');
  include_once("SMFinder_Query_validDate.php");
#  if($GLOBALS['debug']){echo "<b>SMFinder_Query_composeDates4UIDs.php</b><br>";}
  $mm=-1;
  if (empty($start)){
    list($year,$month,$day)=SMFinder_Query_validDate(date('Y'),date('m'),date('d'));
    $start=sprintf("%04d-%02d-%02d",$year,$month,$day);
  }
  if (empty($end)){
    list($year,$month,$day)=SMFinder_Query_validDate(date('Y'),date('m')+2,date('d'));
    $end=sprintf("%04d-%02d-%02d",$year,$month,$day);
  }
  for ($n=0;$n<count($UIDs);$n++){
    #echo "<br> ".$n." ".$UIDs[$n]."<br> ";
    $event=SMFinder_Query_readEvent($UIDs[$n]);
    $event['summary']=str_replace("<crlf />","<br>",$event['summary']);
    if($title==1){
      $tmp=explode("<br>",$event['summary']);
      $event['summary']=$tmp[0];
    }elseif($title==2 AND eregi("<br>",$event['summary'])){
      $tmp=explode("<br>",$event['summary']);
      $event['summary']=$tmp[1];
    }
    $dates4event=SMFinder_Query_expandSeries($event,$start,$end);
    $NoOfEvents=count($dates4event);
    #print_r($dates4event); echo " ".$NoOfEvents."<br>";
    if (!empty($event['freq'])){$isSeries=true;}else{$isSeries=false;}
    for ($m=0;$m<$NoOfEvents;$m++){
      $mm++;
      $allDates[$mm]=$dates4event[$m];
      $allUIDs[$mm]=$event['UID'];
      $allSummaries[$mm]=$event['summary'];
      $allIsSeries[$mm]=$isSeries;
      $allDesc[$mm]=$event['desc'];
      $thisCats=explode(",",$event['cats']);
#echo "cats<br>";print_r($thisCats);echo "cats<br>";
      for ($c=0;$c<count($thisCats);$c++){
	if (!empty($thisCats[$c])){
	  $allCats[$mm]=$thisCats[$c];
	  break;
	}
	if (empty($allCats[$mm])){$allCats[$mm]="";}
      }
    } #m
    #echo $n."<br> ";print_r($event);echo "<br>bla";
  } #n
  #echo "<br>return: ";#print_r($allDates); echo"<br>UID: ";print_r($allUIDs);
  if (count($allDates)>1){
    array_multisort($allDates,$allUIDs,$allSummaries,$allCats,$allIsSeries,$allDesc);
  }
  #echo "<br>return: ";print_r($allDates); echo"<br>UID: ";print_r($allUIDs);
  #exit(1);



  /* compose output */
  $lastDate="";
  for ($n=0;$n<count($allDates);$n++){
    $bgcolor="class='light' ";
    $bgcolor=$color[$allCats[$n]];
    if ($allDates[$n]!=$lastDate){
      /* new day */
      $m=0;
      $lastSummary="";
      $lastDate=$allDates[$n];
      $datesTensor[$allDates[$n]][$m]['UID']=$allUIDs[$n];
      $datesTensor[$allDates[$n]][$m]['summary']=$allSummaries[$n];
      $datesTensor[$allDates[$n]][$m]['cats']=$allCats[$n];
      $datesTensor[$allDates[$n]][$m]['bgcolor']=$bgcolor;
      $datesTensor[$allDates[$n]][$m]['isSeries']=$allIsSeries[$n];
      if ($details=="desc"){$datesTensor[$allDates[$n]][$m]['desc']=$allDesc[$n];}
    }else{
      /* same day */
      if ($lastSummary!=$allSummaries[$n]){
	$m++;
	$datesTensor[$allDates[$n]][$m]['UID']=$allUIDs[$n];
	$datesTensor[$allDates[$n]][$m]['summary']=$allSummaries[$n];
	$datesTensor[$allDates[$n]][$m]['cats']=$allCats[$n];
	$datesTensor[$allDates[$n]][$m]['bgcolor']=$bgcolor;
	$datesTensor[$allDates[$n]][$m]['isSeries']=$allIsSeries[$n];
	if ($details=="desc"){$datesTensor[$allDates[$n]][$m]['desc']=$allDesc[$n];}
      }else{
	/* at same day there are two dates with same summary, 
           take the one which is not a series. */
	if (!$allIsSeries[$n]){
	    $datesTensor[$allDates[$n]][$m]['UID']=$allUIDs[$n];
	    $datesTensor[$allDates[$n]][$m]['summary']=$allSummaries[$n];
	    $datesTensor[$allDates[$n]][$m]['cats']=$allCats[$n];
	    $datesTensor[$allDates[$n]][$m]['bgcolor']=$bgcolor;
	    $datesTensor[$allDates[$n]][$m]['isSeries']=$allIsSeries[$n];
	    if ($details=="desc"){$datesTensor[$allDates[$n]][$m]['desc']=$allDesc[$n];}
	}
      }
    }
    $lastSummary=$allSummaries[$n];
  } #n
  if ($GLOBALS['debug']){
    $tmp=count($allDates);
    echo "<aj>SMFinder_Query_composeDates4UIDs:</aj> found dates: ".$tmp."<br>";
    $tmp1=count($datesTensor);
    echo "Der datesTensor hat ".$tmp." Eintraege<br>";
    #print_r($datesTensor);
  }
  return array($datesTensor,$allDates);
}
?>

Index

Für die Funktionalität des SM-Finders sind viele kleine Tools notwendig. Alle Funktionen beginnen mit SMFinder_ um deren Ursprung zu kennzeichnen. Dem schließt sich die Funktionsgruppe, z.B. Geo_ an, gefolgt vom eigentlichen Namen, der die Aufgabe der Funktion widerspiegeln soll, z.B. PLZ2DB.

Der gesamte Sourcecode darf gemäß GNU General Public License weiterverbreitet werden.

1Makefile
2SMFinder_Admin
3SMFinder_Admin_addCategories
4SMFinder_Admin_checkAllLinks
5SMFinder_Admin_clean
6SMFinder_Admin_exportXML
7SMFinder_Admin_genMap
8SMFinder_Admin_getTimefInt
9SMFinder_Admin_importGeo
10SMFinder_Admin_sendXML2user
11SMFinder_Admin_uploadXML
12SMFinder_Config
13SMFinder_DTD
14SMFinder_Datenbanken
15SMFinder_Edit
16SMFinder_Edit_AddressFields
17SMFinder_Edit_AdrFields
18SMFinder_Edit_CatsAtrs
19SMFinder_Edit_EventFields
20SMFinder_Edit_LinkFields
21SMFinder_Edit_Modus
22SMFinder_Edit_POST
23SMFinder_Edit_PersFields
24SMFinder_Edit_genUID
25SMFinder_Elementdefinitions
26SMFinder_Geo
27SMFinder_Geo_PLZ2DB
28SMFinder_Geo_Umkreis
29SMFinder_Geo_getGeo
30SMFinder_Help
31SMFinder_Help_Download
32SMFinder_Help_FAQ
33SMFinder_Help_KategorienInfo
34SMFinder_Help_editAddress
35SMFinder_Help_editEvent
36SMFinder_Main
37SMFinder_MapDACH
38SMFinder_Menu
39SMFinder_Modules
40SMFinder_ModulesIndex
41SMFinder_Pagelayout
42SMFinder_Query_ABC
43SMFinder_Query_Calendar
44SMFinder_Query_CheckCatsAtrs
45SMFinder_Query_Map
46SMFinder_Query_Mask
47SMFinder_Query_SearchEngine
48SMFinder_Query_analyzeSearch
49SMFinder_Query_composeDates4UIDs
50SMFinder_Query_dateFormat
51SMFinder_Query_dmoz
52SMFinder_Query_expandSeries
53SMFinder_Query_find
54SMFinder_Query_getAllUID
55SMFinder_Query_getUID4CatsAtrsGeo
56SMFinder_Query_getUID4Geo
57SMFinder_Query_getUID4adr
58SMFinder_Query_getUID4fn
59SMFinder_Query_readAddress
60SMFinder_Query_readAdr
61SMFinder_Query_readBookmark
62SMFinder_Query_readEvent
63SMFinder_Query_readLink
64SMFinder_Query_readPers
65SMFinder_Query_showAddress
66SMFinder_Query_showAdr
67SMFinder_Query_showCalendar
68SMFinder_Query_showCalendarDynamic
69SMFinder_Query_showEvent
70SMFinder_Query_showEventList
71SMFinder_Query_showEventsChronological
72SMFinder_Query_showLink
73SMFinder_Query_showPers
74SMFinder_Query_showResult
75SMFinder_Query_validDate
76SMFinder_Style
77SMFinder_Write_Address
78SMFinder_Write_Adr
79SMFinder_Write_Event
80SMFinder_Write_Link
81SMFinder_Write_Pers
82SMFinder_Write_deleteEntry
83SMFinder_XML_checkType
84SMFinder_XML_export
85SMFinder_XML_extractAttribute
86SMFinder_XML_extractTag
87SMFinder_XML_findAllElements
88SMFinder_XML_import
89SMFinder_XML_importParseAddress
90SMFinder_XML_importParseAdr
91SMFinder_XML_importParseCatsAtrs
92SMFinder_XML_importParseEvent
93SMFinder_XML_importParseLink
94SMFinder_XML_importParsePerson
95SMFinder_XML_readFile
96SMallGiessen_SMFinder
97ShowCatsAtrsNice
98index
99php2txt.pl
100sm-finder-02.dtd
101testGeo
102sm-finder-02.dtd
103

Datenbanken

 

SM-Finder-Logo

Die hier zur Verfügung gestellten Informationen basieren auf dem Austauschnetzwerk des SM-Finders.
Änderungen an eurem Datensatz könnt ihr z.B. beim Arbeitskreis SM-Finder vornehmen.
Bei Fragen und Problemen schreibt bitte an: sm-finderATki-co.org
Der AK-SM-Finder ist korporatives Mitglied der BVSM e.V.

Für Aktualität und Richtigkeit der dargebotenen Infomationen kann keine Gewähr übernommen werden!

blank

blank