当前位置: 首页>>代码示例>>PHP>>正文


PHP search_term函数代码示例

本文整理汇总了PHP中search_term函数的典型用法代码示例。如果您正苦于以下问题:PHP search_term函数的具体用法?PHP search_term怎么用?PHP search_term使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了search_term函数的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: search_entity_by_synonym

function search_entity_by_synonym($data_search, $exclude = array(), $padre = "")
{
    $result = array();
    $vivienda_directory = 'public://fast-etc/vivienda';
    $ciudades_directory = 'public://fast-etc/ciudades';
    //  +===============================+
    //  |  Detalle y Orden de búsqueda  |
    //  +===============================+
    $tipoNegocio = array("key" => "tipo_negocio", "entidad" => "tipo-negocio", "uri" => $vivienda_directory . '/tipo-negocio.xml', "entidad_padre" => "", "single" => TRUE);
    $tipoInmueble = array("key" => "tipo_inmueble", "entidad" => "tipo-inmueble", "uri" => $vivienda_directory . '/tipo-inmueble.xml', "entidad_padre" => "", "single" => TRUE);
    $ciudadesVehiculos = array("key" => "ciudades_vivienda", "entidad" => "", "uri" => $ciudades_directory . '/ciudades-vivienda.xml', "entidad_padre" => "", "single" => FALSE);
    $zona = array("key" => "zona", "entidad" => "zona", "uri" => $vivienda_directory . '/zona.xml', "entidad_padre" => "", "single" => TRUE);
    $data = array($tipoNegocio, $tipoInmueble, $ciudadesVehiculos, $zona);
    //  +============+
    //  |  Búsqueda  |
    //  +============+
    //
    foreach ($data as $item) {
        if (!in_array($item["entidad"], $exclude)) {
            $result = search_term($item["key"], $item["uri"], $data_search, $item["entidad"], $item["entidad_padre"], $item["single"], $padre);
        }
        if (!empty($result)) {
            break;
        }
    }
    //  +=============+
    //  |  Resultado  |
    //  +=============+
    if (empty($result)) {
        //  +===========+
        //  | Clbasico  |
        //  +===========+
        $result[0]['termino'] = (string) $data_search;
        $result[0]['id_fast'] = "";
        $result[0]['campo_fast'] = "clbasico";
    }
    return $result;
}
开发者ID:TakenCdosG,项目名称:aasa_new,代码行数:38,代码来源:untitled.php

示例2: article_js

    		<script><?php 
    echo article_js();
    ?>
</script>
		<?php 
}
?>
	</head>
	<body>
	
		<form id="search" action="<?php 
echo search_url();
?>
" method="post">
			<input type="search" name="term" placeholder="To search, type and hit enter&hellip;" value="<?php 
echo search_term();
?>
">
		</form>
	
		<header id="top">
			<div class="wrap">
				
				<a id="logo" href="<?php 
echo base_url();
?>
"><?php 
echo site_name();
?>
</a>
	
开发者ID:rubenvincenten,项目名称:anchor-site,代码行数:30,代码来源:header.php

示例3: search_form_input

function search_form_input($extra = '')
{
    return '<input name="term" type="text" ' . $extra . ' value="' . search_term() . '">';
}
开发者ID:k4kfh,项目名称:anchor-cms,代码行数:4,代码来源:search.php

示例4: theme_include

<?php

theme_include('header');
?>

<section class="header">
	<div class="row">
		<div class="medium-12 columns">
			<h1><?php 
echo site_name();
?>
</h1>
			<p>Search results for &ldquo;<?php 
echo e(search_term());
?>
&rdquo;</p>
		</div>
	</div>
</section>

<section class="search content">
	<?php 
if (!has_search_results()) {
    ?>
		<div class="row">
			<div class="medium-12 columns">
				<h2>No results.</h2>
				<p>There are no results.</p>
			</div>
		</div>
	<?php 
开发者ID:angelog,项目名称:anchor-foundation,代码行数:31,代码来源:search.php


注:本文中的search_term函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。