Transparent

Transparent

\n"; if (!isset($bestof_region) OR $bestof_region == "nl") { echo "Netherlands / World

\n"; $bestof_table = "photo_bestof"; $bestof_id = "pht_bstf_id"; } else { echo "Netherlands / World

\n"; $bestof_table = "photo_bestof_world"; $bestof_id = "pht_bstf_wrld_id"; } $sql_photo1 = "SELECT *, UNIX_TIMESTAMP(time) as time FROM $bestof_table ORDER BY pht_id DESC"; $result_photo1 = mysql_query($sql_photo1); if ($row_photo1 = mysql_fetch_array($result_photo1)) { echo "\n"; echo "\n"; $i = 0; $aantal_kolommen = 4; do { $pht_id = $row_photo1["pht_id"]; $pht_bstf_id = $row_photo1[$bestof_id]; $sql_thumbnail = "SELECT * FROM photo_thumbnail WHERE pht_id = $pht_id"; $result_thumbnail = mysql_query($sql_thumbnail); $row_thumbnail = mysql_fetch_array($result_thumbnail); $sql_photo2 = "SELECT * FROM photo WHERE pht_id = $pht_id"; $result_photo2 = mysql_query($sql_photo2); $row_photo2 = mysql_fetch_array($result_photo2); echo "\n"; $i++; // Sluit eventueel rij af if ($i%$aantal_kolommen == 0 && $i>0) { echo "\n"; echo "\n"; } } while ($row_photo1 = mysql_fetch_array($result_photo1)); echo "
\n"; $photo_number = $i + 1; echo "" . $photo_number . ". (" . $row_photo2["views"] . " views)
"; echo "" . $row_photo1["title"] . "

\n"; echo "
\n"; } ?>