$i = -1;
while ($news = @mysql_fetch_array($newsData)):
$i++;
// Select Author
$selectAuthor = "select pe.fID, pe.fName as Name, ne.fID, ne.frAuthorID
from kfmPeople pe
inner join kfmNews ne on ne.frAuthorID = pe.fID
where ne.fID = ".$news["newsID"]."
group by pe.fID";
$authorData = @mysql_query($selectAuthor, $dbh);
$author = @mysql_result($authorData, 0, 1);
// Check for Trip
if (($news["TripTitle"] != "") && ($news["TripStatus"] == 1)) {
$tripTitle = "
".$news["TripTitle"]."";
}
elseif (($news["TripTitle"] != "") && ($news["TripStatus"] == 0)) {
$tripTitle = "
".$news["TripTitle"]."";
}
else {
$tripTitle = "Allgemein";
}
?>
//
// Select Fotos
$selectFotos = "select fo.fID as fotoID, fo.fFilename, fo.frDayID, db.frFotoID, db.frNewsID
from kfmFoto fo
left outer join kfmFotoDB db on db.frFotoID = fo.fID
where db.frNewsID = ".$newsID."
order by fo.fFilename";
$fotosData = @mysql_query($selectFotos, $dbh);
$i = 0;
while ($fotos = @mysql_fetch_array($fotosData)):
$i++;
// Select Foto Details
$selectFotoDetails = "select fo.fID, fo.fFilename, co.fID, co.fTitle, co.fComment, co.frLanguageID, co.fStatusID, foda.frFotoID, foda.frCommentID
from kfmFoto fo
inner join kfmFotoData foda on foda.frFotoID = fo.fID
inner join kfmFotoComment co on co.fID = foda.frCommentID
where fo.fID = ".$fotos["fotoID"]." and co.frLanguageID = 1
group by fo.fID";
$fotoDetailsData = @mysql_query($selectFotoDetails, $dbh);
$FotoTitleGe = @mysql_result($fotoDetailsData, 0, 3);
$FotoCommentGe = @mysql_result($fotoDetailsData, 0, 4);
?>
![]()
if ($FotoTitleGe != ""): ?>
endif; ?>
endwhile; ?>
endwhile; ?>
Kommentar verfassen
if ($_POST["post_comment"] == "") {
if (empty($_POST)) { ?>
}
else { //form is posted
include("scripts/captcha/securimage.php");
$img = new Securimage();
$valid = $img->check($_POST['code']);
if($valid == true) { ?>
Vielen Dank! Jetzt einfach das Formular ausfüllen, um einen Kommentar zu posten.
} else { ?>
Du hast dich bei der Eingabe des Codes vertippt. Bitte versuch' es erneut (auf Groß-/Kleinschreibung achten)!
}
}
}
else {
if ($_POST["inputCommentGe"] != "") {
$post_comment = "";
echo "
Vielen Dank für deinen Kommentar!
";
}
}
if ($_POST["post_comment"] != "") {
if ($_POST["inputCommentGe"] == "") {
echo $emptyfields;
?>
}
}
?>
// Load all comments
$selectComment = "select fID, fName as Name, fWebsite as Homepage, fTitle as Title, fComment as Comment, fStatusID, frLanguageID, frReportID, date_format(fCreated, '%d.%m.%Y - %H:%i') as commentDate
from kfmGuestbook
where fStatusID = 1 and frLanguageID = 1 and frNewsID = ".$newsID."
order by fCreated
desc";
$commentReport = @mysql_query($selectComment, $dbh);
$counter = 0;
while($comment = @mysql_fetch_array($commentReport)):
$counter++;
?>
endwhile; ?>