[ Index ]
 

Code source de SPIP 1.9.2c

Accédez au Source d'autres logiciels libres

title

Body

[fermer]

/ecrire/exec/ -> rechercher_auteur.php (source)

   1  <?php
   2  
   3  /***************************************************************************\
   4   *  SPIP, Systeme de publication pour l'internet                           *
   5   *                                                                         *
   6   *  Copyright (c) 2001-2007                                                *
   7   *  Arnaud Martin, Antoine Pitrou, Philippe Riviere, Emmanuel Saint-James  *
   8   *                                                                         *
   9   *  Ce programme est un logiciel libre distribue sous licence GNU/GPL.     *
  10   *  Pour plus de details voir le fichier COPYING.txt ou l'aide en ligne.   *
  11  \***************************************************************************/
  12  
  13  if (!defined("_ECRIRE_INC_VERSION")) return;
  14  
  15  # gerer un charset minimaliste en convertissant tout en unicode &#xxx;
  16  
  17  // http://doc.spip.org/@exec_rechercher_auteur_dist
  18  function exec_rechercher_auteur_dist()
  19  {
  20      $idom = _request('idom');
  21      if (!preg_match('/\w+/',$idom))
  22            {include_spip('minipres');
  23          echo minipres();
  24          exit;
  25            }
  26  
  27      $where = split("[[:space:]]+", _request('nom'));
  28      if ($where) {
  29          foreach ($where as $k => $v) 
  30              $where[$k] = "'%" . substr(str_replace("%","\%", _q($v)),1,-1) . "%'";
  31          $where= ("(nom LIKE " . join(" AND nom LIKE ", $where) . ")");
  32      }
  33  
  34      $q = spip_query("SELECT * FROM spip_auteurs WHERE $where ORDER BY nom");
  35      include_spip('inc/selectionner_auteur');
  36      ajax_retour(selectionner_auteur_boucle($q, $idom));
  37  }
  38  ?>


Généré le : Wed Nov 21 10:20:27 2007 par Balluche grâce à PHPXref 0.7
  Clicky Web Analytics