function getHitResults() { $results = NULL; $total = $this->getTotalResults(); $searchwords = getSearchWords(); $searchdate = getSearchDate(); if (!empty($searchdate)) { if (!empty($seachwords)) { $searchwords .= ": "; } $searchwords .= $searchdate; } if (empty($searchwords)) { return NULL; } if ($total > 0) { if ($total > 1) { $results = "{$total} Hits for <em>{$searchwords}</em>"; } else { $results = "1 Hit for <em>{$searchwords}</em>"; } } else { $results = "No Hit for <em>{$searchwords}</em>"; } return $results; }
?> </div> <div id="breadcrumb"> <h2><?php printGalleryIndexURL(' » '); printSearchBreadcrumb(" » "); ?> </h2> </div> <div id="content"> <div id="content-left"> <?php $searchwords = getSearchWords(); $searchdate = getSearchDate(); if (!empty($searchdate)) { if (!empty($searchwords)) { $searchwords .= ": "; } $searchwords .= $searchdate; } if ($total > 0) { ?> <h3> <?php printf(ngettext('%1$u Hit for <em>%2$s</em>', '%1$u Hits for <em>%2$s</em>', $total), $total, html_encode($searchwords)); ?> </h3> <?php }
<?php echo getGalleryTitle(); ?> </a> | <?php echo "<em>" . gettext("Search") . "</em>"; ?> </span></h2> </div> <hr /> <?php if (($total = getNumImages() + getNumAlbums()) > 0) { if (isset($_REQUEST['date'])) { $searchwords = getSearchDate(); } else { $searchwords = getSearchWords(); } echo "<p>" . sprintf(gettext('Total matches for <em>%1$s</em>: %2$u'), $searchwords, $total) . '</p>'; } $c = 0; ?> <div id="albums"> <?php while (next_album()) { $c++; ?> <div class="album"> <div class="albumthumb"><a href="<?php echo htmlspecialchars(getAlbumURL());
/** * Prints a compendum of dates and links to a search page that will show results of the date * * @param string $class optional class * @param string $yearid optional class for "year" * @param string $monthid optional class for "month" * @param string $order set to 'desc' for the list to be in descending order */ function printAllDates($class = 'archive', $yearid = 'year', $monthid = 'month', $order = 'asc') { global $_zp_current_search, $_zp_gallery_page; if (empty($class)) { $classactive = 'archive_active'; } else { $classactive = $class . '_active'; $class = "class=\"{$class}\""; } if ($_zp_gallery_page == 'search.php') { $activedate = getSearchDate('%Y-%m'); } else { $activedate = ''; } if (!empty($yearid)) { $yearid = "class=\"{$yearid}\""; } if (!empty($monthid)) { $monthid = "class=\"{$monthid}\""; } $datecount = getAllDates($order); $lastyear = ""; echo "\n<ul {$class}>\n"; $nr = 0; while (list($key, $val) = each($datecount)) { $nr++; if ($key == '0000-00-01') { $year = "no date"; $month = ""; } else { $dt = strftime('%Y-%B', strtotime($key)); $year = substr($dt, 0, 4); $month = substr($dt, 5); } if ($lastyear != $year) { $lastyear = $year; if ($nr != 1) { echo "</ul>\n</li>\n"; } echo "<li {$yearid}>{$year}\n<ul {$monthid}>\n"; } if (is_object($_zp_current_search)) { $albumlist = $_zp_current_search->getAlbumList(); } else { $albumlist = NULL; } $datekey = substr($key, 0, 7); if ($activedate = $datekey) { $cl = ' class="' . $classactive . '"'; } else { $cl = ''; } echo "<li" . $cl . "><a href=\"" . html_encode(getSearchURl('', $datekey, '', 0, array('allbums' => $albumlist))) . "\">{$month} ({$val})</a></li>\n"; } echo "</ul>\n</li>\n</ul>\n"; }
"><?php echo getGalleryTitle(); ?> </a> </span> <?php if ($sd) { ?> <span class="linkit"> <a href="<?php echo getGalleryIndexURL(); ?> ?p=archive">Archives</a> </span> <span class="albumtitle"><span><?php echo getSearchDate(); ?> </span></span> <?php } else { ?> <span class="albumtitle"><span>Archives</span></span> <?php } ?> </h2> </div> <div id="padbox"> <?php