61
4images code on GitHub Click here to visit GitHub.
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
<?php
define('ROOT_PATH', '/home/&#38;#1090;&#38;#1099;&#38;#1097;/&#38;#1087;&#38;#1099;&#38;#1094;/sait.ru/');
include(ROOT_PATH.'config.php');
include(ROOT_PATH.'includes/db_mysql.php');
include(ROOT_PATH.'includes/constants.php');
$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;
}
$num_images = 5;
$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);
//start table
echo "<table><tr>";
while ($row = $site_db->fetch_array($result)){
$image_id = $row['image_id'];
$cat_id = $row['cat_id'];
$image_name = $row['image_name'];
$image_comments = $row['image_comments'];
$thumb_src = (is_remote($row['image_thumb_file'])) ? $row['image_thumb_file'] : "http://sait.ru/data/thumbnails/".$cat_id."/".$row['image_thumb_file'];
//make column
echo "<td>";
echo "<a href=\"http://sait.ru/details.php?image_id=$image_id\"><img src=\"".$thumb_src."\" border=\"0\" alt=\"$image_name\"></a><br>\n";
echo "<b>$image_name</b><br>\n";
echo "&#38;#1050;&#38;#1086;&#38;#1084;&#38;#1084;&#38;#1077;&#38;#1085;&#38;#1090;&#38;#1072;&#38;#1088;&#38;#1080;&#38;#1080;: $image_comments\n";
echo "</td>";
}
echo "</tr></table>";
//end table
?>
$user_name_link = "<a href=\"".$site_sess->url($user_profile_link)."\" target=\"_blank\">".$user_name."</a>";
auch wenn das spanisch italienisch ist, sind wir trozdem überrascht
<a href="javascript:history.go(-2)">2 Seiten zurück</a>