Location: PHPKode > projects > cms.libe.net > rss.php
<?php
@include("var.php");
@include("functions.php");
@include("buildpage.php");
$firstparturl= str_replace ("rss.php", "", $firstparturl);
function decodehtmlent($decode)
{
$decode= str_replace ("&uuml;", "ü", $decode);
$decode= str_replace ("&Uuml;", "Ü", $decode);
$decode= str_replace ("&Auml;", "Ä", $decode);
$decode= str_replace ("&auml;", "ä", $decode);
$decode= str_replace ("&Uuml;", "Ü", $decode);
$decode= str_replace ("&ouml;", "ö", $decode);
$decode= str_replace ("&Ouml;", "Ö", $decode);
$decode= str_replace ("&szlig;", "ß", $decode);
$decode= str_replace ("&nbsp;", " ", $decode);
$decode= str_replace ("&quot;", " ", $decode);
$decode= preg_replace("/[^a-zA-Z0-9äöüÄÖÜß ]/", "", $decode);
return $decode;
}



echo "<?xml version=\"1.0\"?>\n<rss version=\"2.0\">
";

$zahlneu=10; //Anzahl der Themen

$title= str_replace ("http://", "", $firstparturl);
$xmlurl=$meineurl. "/rss.php";
// Kopf für XML:

echo "<channel>
   <title>",$page_title, "</title>
   <link>", $firstparturl,"</link>
   <description>",$page_description, "</description>
   <pubDate>" , date("Y-m-dTH:i"), "</pubDate>
   <language>",$lang, "</language>";

/*
   <dc:rights>Copyright &#169; " , date("Y")," Lindner Bernhard</dc:rights>

   <sy:updatePeriod>week</sy:updatePeriod>
   <sy:updateFrequency>1</sy:updateFrequency>
   <sy:updateBase>2000-01-01T00:00:00Z</sy:updateBase>
   
   <image rdf:resource=\"", $meineurl, "/seite/bild.gif\" />";
   
*/

rssnewest(10,0);

echo "      
</channel>\n\n</rss>";


//aus build



function rssnewest($maxentries, $images)
{global $newsentryarray,$datumarray,$fileandpathnamearray,$menuarray,$titelmenuarray,$firstparturl,$smalldescriptionarray,$titelarray;
//$layout: 12 ... 1; 2,. ...
					arsort($datumarray);
					foreach($datumarray as $key => $value) 
					{
					if ($newsentryarray[$key]==1) 
						{if (!empty($menuarray[$key])) $nummer++;
						if ($nummer>$start)
							{
							if (!empty($fileandpathnamearray[$key]))$linkurl= $fileandpathnamearray[$key] ;else $linkurl="index.php/".encodeurl($menuarray[$key]);
							//Images:
							if ($images==1){
							if (!empty($titelmenuarray[$key])) {
								/*echo "<content:items>\n<rdf:Bag>\n<rdf:li>\n";
								$Pfadimage=str_replace ("../", "/", $Pfadimage);
								if ($endung==jpg)  echo "<content:item rdf:about=\"", $meineurl, $Pfadimage, "/mini/", $Bildeinss[$menuepkt[$datumx-$c]], "\">";
								$Standardbild= str_replace ("../", "/", $Standardbild);
								if (empty($endung)) echo "<content:item rdf:about=\"", $meineurl, $Standardbild, "\">";
								echo "\n<content:format rdf:resource=\"http://www.w3.org/Graphics/JPEG/jfif.txt\">\n</content:item>\n</rdf:li>\n</rdf:Bag>\n</content:items>\n";
								$datumerscheinens[$menuepkt[$datumx-$c]]=str_replace (".", "-",$datumerscheinens[$menuepkt[$datumx-$c]]);
								$datumerscheinens[$menuepkt[$datumx-$c]]=str_replace (" ", "CEST",$datumerscheinens[$menuepkt[$datumx-$c]]);
								echo "<dc:date>", $datumerscheinens[$menuepkt[$datumx-$c]], "</dc:date>\n";
								echo "</item>\n\n"; */
								echo "<a href=\"".$firstparturl. $linkurl." \">";//Low-Level-Format-1-150.jpg
								if(file_exists("image/". encodeurl($menuarray[$key])."-1-150.jpg")) 
								echo "<img src=\"".$firstparturl."image/". encodeurl($menuarray[$key])."-1-150.jpg\" width=\"150\" ";else echo "<img src=\"".$firstparturl."image/cms-default.jpg\" width=\"150\" ";
								echo "style=\"float:left;";
								echo "margin:10px;\" alt=\"".trim($titelarray[$key])."\"></a> ";			
												}
									}					
							//... Images

			echo "\n<item>\n";
			echo "<title>",decodehtmlent(utf8_encode($titelmenuarray[$key])), "</title>\n";
			echo "<link>", $firstparturl. str_replace ("rss.php", "",$linkurl). "</link>\n";
			echo "<description>",decodehtmlent(utf8_encode($smalldescriptionarray[$key])), "</description>\n</item>";

							if ($nummer>$maxentries){break;}
							}

						}
					}
}

?>

Return current item: cms.libe.net