• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

PHP getSearchDate函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了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;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP getSearchListHeaderValues函数代码示例发布时间:2022-05-15
下一篇:
PHP getScheme函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap