{source}
<?php $hostname_connect = "db637925207.db.1and1.com";
$database_connect = "db637925207";
$username_connect = "dbo637925207";
$password_connect = "Hstg6_mmh";
$connect = mysql_pconnect($hostname_connect, $username_connect, $password_connect) or trigger_error(mysql_error(),E_USER_ERROR);
mysql_set_charset('utf8', $connect);
$heute=date("YmdHis");
function date_mysql2german($date) {
$d = explode("-",$date);
return sprintf("%02d.%02d.%04d", $d[2], $d[1], $d[0]);
}
mysql_select_db($database_connect, $connect);
$query_Recordset2 = "SELECT * FROM ww_Artikel WHERE ww_Artikel.Datum<=$heute AND ((ww_Artikel.Enddatum>=$heute OR YEAR(ww_Artikel.Enddatum)='0000') AND YEAR(ww_Artikel.Datum)='2015') ORDER BY ww_Artikel.Datum DESC";
$Recordset2 = mysql_query($query_Recordset2, $connect) or die(mysql_error());
$row_Recordset2 = mysql_fetch_assoc($Recordset2);
$totalRows_Recordset2 = mysql_num_rows($Recordset2);
$abs_pfad="/kunden/homepages/14/d31736059/htdocs/waldmueller/relaunch2016/images/";
$URL="http://www.wolfgang-waldmueller.de/relaunch2016/images/";
if ($totalRows_Recordset2>0) {
do {
$query_Recordset1 = "SELECT * FROM ww_ArtikelAbsatz WHERE ww_ArtikelAbsatz.ArtNr=".$row_Recordset2["ArtNr"]." ORDER BY AbsNr";
$Recordset1 = mysql_query($query_Recordset1, $connect) or die(mysql_error());
$row_Recordset1 = mysql_fetch_assoc($Recordset1);
$totalRows_Recordset1 = mysql_num_rows($Recordset1);
echo "<div class='itemtext'>";
echo "<h2>".date_mysql2german($row_Recordset2['Datum'])." | ". $row_Recordset2['Titel']."</h2>";
$URL_bild=$URL."aktuelles/".$row_Recordset2['Bild'];
$path_bild=$abs_pfad."aktuelles/".$row_Recordset2['Bild'];
echo '<h4>';
if (!empty($row_Recordset2['Bild']) && is_file($path_bild)) {
//if (!empty($row_Recordset2['Bild'])) {
echo '<img src="'. $URL_bild.'" alt="'. $row_Recordset2['Titel'].'" border="0" style="float:left; margin-right:15px;">';
}
echo $row_Recordset2['Teaser'].'</h4>';
do {
echo '<p>';
if (!empty($row_Recordset1['Titel'])) echo "<strong>".$row_Recordset1['Titel']."</strong>";
$URL_bild=$URL."aktuelles/".$row_Recordset1['Bild'];
$path_bild=$abs_pfad."aktuelles/".$row_Recordset1['Bild'];
if (!empty($row_Recordset1['Bild']) && is_file($path_bild)) {
//if (!empty($row_Recordset1['Bild'])) {
echo '<img src="'. $URL_bild.'" alt="'. $row_Recordset1['Titel'].'" border="0" style="float:left; margin-right:15px;">';
}
echo $row_Recordset1['Inhalt'];
echo '</p>';
} while ($row_Recordset1 = mysql_fetch_assoc($Recordset1));
echo '</div>';
echo ' <hr style="clear:both;"/>';
} while ($row_Recordset2 = mysql_fetch_assoc($Recordset2));
}
?>
{/source}