本文整理汇总了PHP中getSearchDate函数的典型用法代码示例。如果您正苦于以下问题:PHP getSearchDate函数的具体用法?PHP getSearchDate怎么用?PHP getSearchDate使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了getSearchDate函数的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: getHitResults
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;
}
开发者ID:Imagenomad,项目名称:Unsupported,代码行数:26,代码来源:SearchController.php
示例2: printGalleryIndexURL
?>
</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
}
开发者ID:jmruas,项目名称:zenphoto,代码行数:31,代码来源:search.php
示例3: getGalleryTitle
<?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());
开发者ID:Imagenomad,项目名称:Unsupported,代码行数:31,代码来源:search.php
示例4: printAllDates
/**
* 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";
}
开发者ID:IliyanGochev,项目名称:zenphoto,代码行数:64,代码来源:template-functions.php
注:本文中的getSearchDate函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论