Gerch2003: Bild wir über Text gelegt

Beitrag lesen

Hallo Leute,

schaut euch mal bitte folgende Seite einmal im Firefox und einmal im Internetexplorer an.
Ihr werdet sehen, dass das Bild vom Artikel über dem Text liegt.
Das war sicher nicht im Sinne des Erfinders..und nein, ich hab den Code nicht geschrieben...aber ich darf es wie so oft ausbügeln.

http://hauswelt.de/index.php?main=news&sub=rdnews

Vielleicht hat ja jemand nen guten Rat, ansonsten werd ich mal ein bischen herum tüfteln.

Hier der Code

<?php  
		//---------- Einträge auf Laufzeit überprüfen ----------  
		$mysql_action		= "DELETE FROM hauswelt_news WHERE (runtime>0 && written<".time()."-(runtime*30*24*60*60));";  
		//echo( "ACTION: ".$mysql_action."<br>" );  
		mysql_query( $mysql_action );  
		//---------- Verbindung zur Hauswelt-News-Tabelle herstellen ----------  
		$mysql_select = "SELECT category, COUNT(*) FROM hauswelt_news WHERE (publish='on') GROUP BY category ORDER BY category;";  
		$ressource_id_1	= mysql_query( $mysql_select );  
		//echo( "ID 1: ".$ressource_id_1."<br>".$mysql_select."<br>" );  
		//---------- Prüfe ob Vertriebspartner freigeschaltete wurde ----------  
		if ($ressource_id_1 && mysql_num_rows($ressource_id_1) > 0)  {  
			echo("<table width=\"430\"  bgcolor=\"#E2EDC7\" border=\"0\" cellspacing=\"0\" cellpadding=\"3\" class=\"navig\" style=\"margin-bottom:10px;\">");  
				for ($i=0; $i < mysql_num_rows($ressource_id_1); $i++)  {  
					$output 																																				= mysql_fetch_array($ressource_id_1);  
					$category_count[substr($output['category'], 0, 3)]	= $output['COUNT(*)'];  
					echo("<tr>  
						<td width=\"1%\" style=\"padding-left:5px;\"><a href=\"?main=news&sub=rdnews&item=".$output['category']."\" target=\"_self\" class=\"navig\">");  
						if ($item == $output['category'])  
							echo("<strong>");  
							//---------- Platzhalter in der Kategorie ersetzen ----------  
							$text = $output['category'];  
							include("include/text.php");  
							$output['category'] = $text;  
							echo(substr($output['category'], 3)."</a></strong>  
						</td>  
						<td><a href=\"?main=news&sub=rdnews&item=".$output['category']."\" target=\"_self\" class=\"navig\">(".$output['COUNT(*)'].")</a></td>  
					</tr>");  
					}  
				//---------- MySQL-Speicher leeren ----------  
				mysql_free_result($ressource_id_1);  
			echo("</table>");  
			}  
		//---------- Seitennavigation anzeigen ----------  
		if ($item && is_array($category_count) && array_key_exists(substr($item, 0, 3), $category_count) && $category_count[substr($item, 0, 3)] > $max_list)  {  
			echo("<table width=\"430\"  bgcolor=\"#E2EDC7\" border=\"0\" cellspacing=\"0\" cellpadding=\"3\" class=\"navig\" style=\"margin-bottom:10px;\">  
				<tr>");  
					if ($list > 0)  
						echo("<td><a href=\"?main=news&sub=rdnews&item=".$item."&list=".($list-$max_list)."\" target=\"_self\" class=\"navig\">zur&uuml;ck</a></td>");  
					if (($list+$max_list) < $category_count[substr($item, 0, 3)])  
						echo("<td align=\"right\"><a href=\"?main=news&sub=rdnews&item=".$item."&list=".($list+$max_list)."\" target=\"_self\" class=\"navig\">weiter</a></td>");  
				echo("</tr>  
			</table>");  
			}  
		//---------- Verbindung zur Hauswelt-News-Tabelle herstellen ----------  
		if (!$item)  
			$mysql_select = "SELECT written,headline,txt,pic,download FROM hauswelt_news WHERE publish='on' ORDER BY written DESC LIMIT 0,".$max_list.";";  
		else  
			$mysql_select = "SELECT written,headline,txt,pic,download FROM hauswelt_news WHERE (publish='on' AND category='".$item."') ORDER BY written DESC LIMIT ".(int)$list.",".$max_list.";";  
		$ressource_id_1	= mysql_query( $mysql_select );  
		// echo( "ID 1: ".$ressource_id_1."<br>".$mysql_select."<br>" );  
		//---------- Hauswelt-News anzeigen ----------  
		if ($ressource_id_1 && mysql_num_rows($ressource_id_1) > 0)  {  
			echo("<table width=\"430\" border=\"0\" cellspacing=\"0\" cellpadding=\"5\" class=\"navig\" style=\"\">");  
				for ($i=0; $i < mysql_num_rows($ressource_id_1); $i++)  {  
					$output = mysql_fetch_array($ressource_id_1);  
					//---------- Platzhalter in der Überschrift ersetzen ----------  
					$text = $output['headline'];  
					include("include/text.php");  
					$output['headline'] = $text;  
					//---------- Platzhalter im Text ersetzen ----------  
					$text = $output['txt'];  
					include("include/text.php");  
					$output['txt'] = $text;  
					//---------- Bild einfügen ----------  
					if (strlen($output['pic']) > 1)  {  
						$position	=substr($output['pic'], 0, 1);  
						$picture		="pictures/".substr($output['pic'], 1);  
						if (file_exists($picture))  {  
							$size	=getimagesize($picture);  
							if ($position == "t")  
								$output['txt']="<img src=\"".$picture."\" ".$size[3]." border=\"0\" style=\"margin-bottom:3px;\"><br>".$output['txt'];  
							elseif ($position == "r" || $position == "-")  
								$output['txt']="<img src=\"".$picture."\" ".$size[3]." border=\"0\" align=\"right\" style=\"margin-left:5px;margin-bottom:3px;\">".$output['txt'];  
							elseif ($position == "l")  
								$output['txt']="<img src=\"".$picture."\" ".$size[3]." border=\"0\" align=\"left\" style=\"margin-right:5px;margin-bottom:3px;\">".$output['txt'];  
							elseif ($position == "b")  
								$output['txt'].="<br><img src=\"".$picture."\" ".$size[3]." border=\"0\" style=\"margin-top:3px;\">";  
							}  
						}  
					echo("<tr>  
						<td");  
						if ($i > 0)  
							echo(" style=\"border-top:solid 1px #BEDCF9;\"");  
						echo("><strong>".$output['headline']."</strong><br><em>".date("d", $output['written']).". ".$month[date("n", $output['written'])]." ".date("Y", $output['written'])."</em></td>  
					</tr>  
					<tr>  
						<td style=\"padding-top:0px;\">".nl2br($output['txt'])."</td>  
					</tr>");  
					if ($output['download'] && file_exists("download/".$output['download']))  {  
						echo("<tr>  
							<td style=\"padding-top:0px;\">  
								<a href=\"download/".$output['download']."\" target=\"_blank\" class=\"navig\"><img src=\"images/icons/popup.gif\" width=\"10\" height=\"10\" border=\"0\" align=\"absmiddle\"> ".$output['download']."</a><br><font style=\"font-size:9px;\">");  
								if (filesize("download/".$output['download']) < 1000000000)  
									echo(round((filesize("download/".$output['download'])/1000), 1)." K");  
								else  
									echo(round((filesize("download/".$output['download'])/1000000000), 2)." M");  
								echo("B ge&auml;ndert am ".date("d.m.Y", filemtime("download/".$output['download']))."</font>  
							</td>  
						</tr>");  
						}  
					}  
				//---------- MySQL-Speicher leeren ----------  
				mysql_free_result($ressource_id_1);  
			echo("</table>");  
			}  
		//---------- Keine News vorhanden----------  
		else  {  
			echo("<table width=\"430\" border=\"0\" cellspacing=\"5\" cellpadding=\"0\" bgcolor=\"#EEEEEE\" class=\"main\" style=\"border:dashed 2px #CCCCCC;\">  
				<tr>  
					<td>Zur Zeit haben wir keine aktuellen News f&uuml;r Sie.</td>  
				</tr>  
			</table>");  
			}  
	?>