[ Index ]
 

Code source de e107 0.7.8

Accédez au Source d'autres logiciels libresSoutenez Angelica Josefina !

title

Body

[fermer]

/e107_handlers/search/ -> search_user.php (source)

   1  <?php
   2  /*
   3  + ----------------------------------------------------------------------------+
   4  |     e107 website system
   5  |
   6  |     ©Steve Dunstan 2001-2002
   7  |     http://e107.org
   8  |     jalist@e107.org
   9  |
  10  |     Released under the terms and conditions of the
  11  |     GNU General Public License (http://gnu.org).
  12  |
  13  |     $Source: /cvsroot/e107/e107_0.7/e107_handlers/search/search_user.php,v $
  14  |     $Revision: 1.7 $
  15  |     $Date: 2005/12/14 17:37:34 $
  16  |     $Author: sweetas $
  17  +----------------------------------------------------------------------------+
  18  */
  19  
  20  if (!defined('e107_INIT')) { exit; }
  21  
  22  // advanced 
  23  $advanced_where = "";
  24  if (isset($_GET['time']) && is_numeric($_GET['time'])) {
  25      $advanced_where .= " user_join ".($_GET['on'] == 'new' ? '>=' : '<=')." '".(time() - $_GET['time'])."' AND";
  26  }
  27  
  28  // basic
  29  $return_fields = 'user_id, user_name, user_email, user_signature, user_join';
  30  $search_fields = array('user_name', 'user_email', 'user_signature');
  31  $weights = array('1.2', '0.6', '0.6', '0.6', '0.6');
  32  $no_results = LAN_198;
  33  $where = $advanced_where;
  34  $order = array('user_join' => DESC);
  35  
  36  $ps = $sch -> parsesearch('user', $return_fields, $search_fields, $weights, 'search_user', $no_results, $where, $order);
  37  $text .= $ps['text'];
  38  $results = $ps['results'];
  39  
  40  function search_user($row) {
  41      global $con;
  42      $res['link'] = "user.php?id.".$row['user_id'];
  43      $res['pre_title'] = $row['user_id']." | ";
  44      $res['title'] = $row['user_name'];
  45      $res['summary'] = $row['user_signature'] ?  LAN_SEARCH_72.": ".$row['user_signature'] : LAN_SEARCH_73;
  46      $res['detail'] = LAN_SEARCH_74.": ".$con -> convert_date($row['user_join'], "long");
  47      return $res;
  48  }
  49  
  50  ?>


Généré le : Sun Apr 1 01:23:32 2007 par Balluche grâce à PHPXref 0.7