本文整理汇总了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;
}
示例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…" 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>
示例3: search_form_input
function search_form_input($extra = '')
{
return '<input name="term" type="text" ' . $extra . ' value="' . search_term() . '">';
}
示例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 “<?php
echo e(search_term());
?>
”</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