Galarie test

query_firstrow($sql); $total_images = $row['total_images']; mt_srand((double)microtime() * 1000000); $number = ($total_images > 1) ? mt_rand(0, $total_images - 1) : 0; $sql = "SELECT a.image_id, a.cat_id, a.image_name, a.image_active, a.image_thumb_file, a.image_comments 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." LIMIT $number, 1"; $row = $site_db->query_firstrow($sql); $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'] : ROOT_PATH.THUMB_DIR."/".$cat_id."/".$row['image_thumb_file']; echo "\"$image_name\"
\n"; // *echo "$image_name
\n";/ // *echo "Comments: $image_comments
\n";/ ?>

Druckbare Version
Seitenanfang nach oben