get_results( "SELECT gid FROM " . $wpdb->prefix . "ngg_gallery WHERE slug = '" . mysql_clean($slug) . "'", ARRAY_A); //deb($gallery); if (sizeof($gallery)==1){ $pageNumber=$gallery[0]['gid']; }else{ $pageNumber = 0; } if($pageNumber > 0){ // obrazky v galerii $galleries = array(); } else{ //prehled galerii $galleries = $wpdb->get_results( "SELECT gid, title, path, pageid, previewpic, galdesc, slug FROM " . $wpdb->prefix . "ngg_gallery WHERE 1 ORDER BY title ASC", ARRAY_A); /* */ } //konec prehledu galerii ?>

Virtuální prohlídka

Prohlédněte si prostory restaurace z pohodlí domova ve virtuální prohlídce

Fotogalerie 0){ // obrazky v galerii $gallery = $wpdb->get_results( "SELECT gid, title, path, pageid, previewpic FROM " . $wpdb->prefix . "ngg_gallery WHERE gid = '" . ($pageNumber * 1) . "' ORDER BY title ASC", ARRAY_A); if(sizeof($gallery) == 1){ echo " - " . $gallery[0]['title'] . ""; } } ?>