1
0
mirror of https://github.com/e107inc/e107.git synced 2025-01-17 20:58:30 +01:00
php-e107/e107_handlers/search/search_user.php

48 lines
1.4 KiB
PHP
Raw Normal View History

2006-12-02 04:36:16 +00:00
<?php
/*
2009-11-12 15:11:17 +00:00
* e107 website system
*
2012-02-24 13:22:29 +00:00
* Copyright (C) 2008-2012 e107 Inc (e107.org)
2009-11-12 15:11:17 +00:00
* Released under the terms and conditions of the
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
*
2012-02-24 13:22:29 +00:00
* $URL$
* $Id$
2009-11-12 15:11:17 +00:00
*/
2006-12-02 04:36:16 +00:00
if (!defined('e107_INIT')) { exit; }
// MOVED TO user/e_search.php
/*
2006-12-02 04:36:16 +00:00
// advanced
$advanced_where = "";
if (isset($_GET['time']) && is_numeric($_GET['time'])) {
$advanced_where .= " user_join ".($_GET['on'] == 'new' ? '>=' : '<=')." '".(time() - $_GET['time'])."' AND";
}
// basic
$return_fields = 'user_id, user_name, user_email, user_signature, user_join';
$search_fields = array('user_name', 'user_signature');
2006-12-02 04:36:16 +00:00
$weights = array('1.2', '0.6', '0.6', '0.6', '0.6');
$no_results = LAN_198;
$where = $advanced_where;
$order = array('user_join' => DESC);
$ps = $sch -> parsesearch('user', $return_fields, $search_fields, $weights, 'search_user', $no_results, $where, $order);
$text .= $ps['text'];
$results = $ps['results'];
function search_user($row) {
$tp = e107::getParser();
2012-02-24 13:22:29 +00:00
$res['link'] = e107::getUrl()->create('user/profile/view', array('id' => $row['user_id'], 'name' => $row['user_name']));//"user.php?id.".$row['user_id'];
2006-12-02 04:36:16 +00:00
$res['pre_title'] = $row['user_id']." | ";
$res['title'] = $row['user_name'];
$res['summary'] = $row['user_signature'] ? LAN_SEARCH_72.": ".$row['user_signature'] : LAN_SEARCH_73;
$res['detail'] = LAN_SEARCH_74.": ".$tp->toDate($row['user_join'], "long");
2006-12-02 04:36:16 +00:00
return $res;
}
2020-09-28 20:59:12 -05:00
*/