Hauptnavigaton

Gesamtübersicht der Termine an der HGB

= SYSDATE()"; $sql.="ORDER BY category;"; $result = mysql_query($sql); echo mysql_error(); $categories = array(); while ($category = mysql_fetch_row($result)){ if ($category[0]=="Sonstiges") $s=1; if ($category[0]!="Sonstiges") array_push($categories,$category[0]); } if ($s==1) array_push($categories,"Sonstiges"); mysql_free_result ($result); if (count($categories)!=0) { $anchors=$categories; // get news for each cotegory and print it out echo "\n"; // anchors echo ""; echo "\n\n"; while (list(, $category) = each ($categories)) { $sql= "SELECT news_id,startdate,enddate,headline,content,linkdescription,linkurl,user "; $sql.="FROM $tabname "; $sql.="WHERE category = '$category'"; $sql.="AND enddate >= SYSDATE()"; $sql.="ORDER BY category,startdate,headline;"; $result = mysql_query($sql); echo mysql_error(); // category echo ""; echo "\n\n"; while ($row = mysql_fetch_array ($result)) { //period list ($startyear,$startmonth,$startday) = split ('-',$row["startdate"]); list ($endyear,$endmonth,$endday) = split ('-',$row["enddate"]); echo ""; echo "\n"; echo "\n\n"; echo "\n\n"; } mysql_free_result ($result); } echo "

\n"; while (list(, $anchor) = each ($anchors)) { echo "$anchor   "; } echo "
 
\n"; echo "$category\n"; echo "
\n"; if ($startday==$endday && $startmonth==$endmonth && $startyear==$endyear) { $monthname=$startmonth-1; echo "$startday. $month[$monthname] $startyear"; } else { $monthname=$startmonth-1; echo "$startday. "; if ($startyear==$endyear && $startmonth!=$endmonth) {echo $month[$monthname];} if ($startyear!=$endyear) {echo "$month[$monthname] ";} if ($startyear!=$endyear) {echo "$startyear ";} $monthname=$endmonth-1; echo " bis $endday. $month[$monthname] $endyear"; } echo "\n"; echo "edit   "; echo "
\n"; //headline echo "
".$row["headline"].""; //content echo "

".nl2br($row["content"])."

"; //link if ($row["linkurl"]!="") { if ($row["linkdescription"]) { echo "".$row["linkdescription"].""; } else { echo "".$row["linkurl"].""; } } echo "

 

"; } else { echo "

Momentan sind keine Termineinträge vorhanden.

"; } ?>

 

Hauptnavigaton