function escape_html($string)
{
if (is_string($string)) {
- $transtbl = Array('<' => '<', '>' => '>', '"' => '"', '\'' => ''');
- return preg_replace("/&(?![A-Za-z]{0,4}\w{2,3};|#[0-9]{2,4};)/u", "&", strtr(pl_entities($string), $transtbl));
+ $transtbl = Array('<' => '<', '>' => '>', '"' => '"', '\'' => ''');
+ return strtr($string, $transtbl);
} else {
- return $string;
+ return $string;
}
}
if (!Env::has('rechercher')) {
$this->form_prepare();
} else {
-
$search = new XOrgSearch(array($this, 'get_advanced'));
$search->setNbLines($globals->search->per_page);
$page->assign('url_search_form', $search->make_url(Array('rechercher'=>0)));
- if (Env::has('with_soundex')) {
- $page->assign('with_soundex', $search->make_url(Array())."&with_soundex=1");
+ if (!Env::i('with_soundex')) {
+ $page->assign('with_soundex', $search->make_url(Array()) . "&with_soundex=1");
}
-
$nb_tot = $search->show();
if ($nb_tot > $globals->search->private_max) {
<input type="hidden" name="rechercher" value="Chercher"/>
<input type="submit" style="display:none"/>
<input type="text" name="name" size="32" value="{$smarty.request.name}" />
- {if $smarty.request.name && !$with_soundex && $smarty.request.recherche}
- <a class='smaller' href="search/adv?with_soundex=1&{$url_args}">
- étendre par proximité sonore
- </a>
- {/if}
</td>
</tr>
<tr>
<td>Prénom</td>
<td>
<input type="text" name="firstname" size="32" value="{$smarty.request.firstname}" />
- {if $smarty.request.firstname && !$with_soundex && $smarty.request.recherche}
- <a class='smaller' href="search/adv?with_soundex=1&{$url_args}">
- étendre par proximité sonore
- </a>
- {/if}
</td>
</tr>
<tr>
</td>
</tr>
<tr>
- <th colspan="2">Géographie</th>
- </tr>
- <tr>
<td colspan="2">
- <label for="only_current"><input name="only_current" id="only_current" type="checkbox"{if $smarty.request.only_current} checked="checked"{/if}/>chercher uniquement les adresses où les camarades sont actuellement.</label></td>
+ <input type="checkbox" name="with_soundex" value="1" {if $smarty.request.with_soundex}checked="checked"{/if} id="sdxn" />
+ <label for="sdxn">étendre par proximité sonore (uniquement sur nom et prénom)</label>
+ </td>
+ <tr>
+ <th colspan="2">Géographie</th>
</tr>
<tr>
<td>Ville</td>
</td>
</tr>
<tr>
+ <td colspan="2">
+ <label for="only_current"><input name="only_current" id="only_current" type="checkbox"{if $smarty.request.only_current}
+checked="checked"{/if}/>chercher uniquement les adresses où les camarades sont actuellement.</label></td>
+ </tr>
+ <tr>
<th colspan="2">Activité</th>
</tr>
<tr>
{/if}
</div>
{/if}
-
+
<p class="noprint">
- <strong>Astuce:</strong>
- Si tu survoles une fiche, tu sauras quand elle a été mise à jour la dernière fois !</p>
+ <strong>{icon name=lightbulb title=Astruce}Astuce :</strong>
+ {if $search_results_nb}
+ Si tu survoles une fiche, tu sauras quand elle a été mise à jour la dernière fois !
+ {elseif $advanced && $with_soundex && ($smarty.request.name || $smarty.request.firstname)}
+ Si tu n'es pas sur de l'orthographe d'un nom, tu peux essayer la <a href="{$with_soundex}">recherche par
+ proximité sonore</a>
+ {elseif $advanced}
+ Essaye d'élargir tes critères de recherche.
+ {elseif $smarty.session.auth ge AUTH_COOKIE}
+ Essaye la <a href="search/adv">recherche avancée</a>
+ {else}
+ Pour les X inscrits à Polytechnique.org, un module de recherche avancée est disponible permettant de réaliser
+ des recherches fines dans l'annuaire. Si vous êtes un X et que vous n'êtes pas encore inscrit, commencez dès
+ maintenant la <a href="register">procédure</a>.
+ {/if}
+ </p>
{/if}
{else}
{if $advanced}