Das klappt wunderbar, die Bilder bzw meine 3 neusten Bilder werden auf der Homepage angezeigt.
Leider untereinander.
Besteht die möglichkeit, oder weiß jemand, wie man die nebeneinander bekommt ?
Momentan sieht es so aus:
die Bilder sollen aber nicht untereinander, sonder so wie hier nebeneinander, am besten noch mit den Daten:
das ist die new_pic.php:
<?php
// PATH to your 4images Gallery / PFAD zu Ihrer 4images Gallerie
define('ROOT_PATH', './4images/');
include(ROOT_PATH.'config.php');
include(ROOT_PATH.'includes/db_mysql.php');
include(ROOT_PATH.'includes/constants.php');
define('SCRIPT_URL', 'http://***********/');
$site_db = new Db($db_host, $db_user, $db_password, $db_name);
function is_remote($file_name) {
return (preg_match('#^https?\\:\\/\\/[a-z0-9\-]+\.([a-z0-9\-]+\.)?[a-z]+#i', $file_name)) ? 1 : 0;
}
// NUMBER OF THUMBNAILS TO DISPLAY / NUMMER DER GEWÜNSCHTEN THUMBNAILS
$num_images = 3;
$sql = "SELECT a.image_id, a.cat_id, a.image_name, a.image_active, a.image_thumb_file, a.image_comments, a.image_date
FROM ".IMAGES_TABLE." a, ".CATEGORIES_TABLE." b
WHERE a.image_active=1
AND a.cat_id = b.cat_id
AND b.auth_viewcat=".AUTH_ALL."
AND b.auth_viewimage=".AUTH_ALL."
ORDER BY a.image_date DESC
LIMIT $num_images";
$result = $site_db->query($sql);
while ($row = $site_db->fetch_array($result)){
$image_id = $row['image_id'];
$cat_id = $row['cat_id'];
$thumb_src = (is_remote($row['image_thumb_file'])) ? $row['image_thumb_file'] : SCRIPT_URL.THUMB_DIR."/".$cat_id."/".$row['image_thumb_file'];
echo "<a href=\"".ROOT_PATH."details.php?image_id=$image_id\" target=\"_new\"><center><img src=\"".$thumb_src."\" border=\"0\" alt=\"$image_name\"></center></a><br>\n";
DIR."/".$cat_id."/".$row['image_thumb_file'];
}
?>
Und das womit ich abfrage:
><iframe src="http://www.Fiat-126.org/random.php" style="border:0px #FFFFFF none;" name="myiframe" scrolling="no" frameborder="0" align=aus marginheight="2px" marginwidth="0px" height="275" width="150"></iframe>