get_results('SELECT date_sub( date( now( ) ) , INTERVAL ' . $from . ' MONTH ) as begin'); $from = $r[0]->begin; if (!empty($gallery['from'])) $options .= '&f_min_date_created=' . $from; $PiwigoPress_divclass = empty($gallery['divclass']) ? '' : (' class="' . $gallery['divclass'] .'"'); $PiwigoPress_class = empty($gallery['class']) ? '' : (' class="' . $gallery['class'] .'"'); $mbcategories = empty($gallery['mbcategories']) ? '' : $gallery['mbcategories']; $most_visited = empty($gallery['most_visited']) ? '' : $gallery['most_visited']; $best_rated = empty($gallery['best_rated']) ? '' : $gallery['best_rated']; $most_commented = empty($gallery['most_commented']) ? '' : $gallery['most_commented']; $random = empty($gallery['random']) ? '' : $gallery['random']; $recent_pics = empty($gallery['recent_pics']) ? '' : $gallery['recent_pics']; $calendar = empty($gallery['calendar']) ? '' : $gallery['calendar']; $tags = empty($gallery['tags']) ? '' : $gallery['tags']; $comments = empty($gallery['comments']) ? '' : $gallery['comments']; echo $before_widget; echo $title; if (!function_exists('pwg_get_contents')) include 'PiwigoPress_get.php'; if ($thumbnail == 'true') { // Make the Piwigo link $response = pwg_get_contents( $piwigo_url . 'ws.php?method=pwg.categories.getImages&format=php' . $options . '&recursive=true&order=random&f_with_thumbnail=true'); $thumbc = unserialize($response); if ($thumbc["stat"] == 'ok') { $pictures = $thumbc["result"]["images"]["_content"]; foreach ($pictures as $picture) { echo '
'; } } } if ($mbcategories == 'true') { // Make the Piwigo category list $response = pwg_get_contents( $piwigo_url . 'ws.php?method=pwg.categories.getList&format=php&public=true'); $cats = unserialize($response); if ($cats["stat"] == 'ok') { echo '