mirror of
https://github.com/e107inc/e107.git
synced 2025-08-12 17:44:37 +02:00
typeahead support for $frm->text();
This commit is contained in:
22
user.php
22
user.php
@@ -21,6 +21,28 @@ include_lan(e_LANGUAGEDIR.e_LANGUAGE.'/lan_'.e_PAGE);
|
||||
global $user;
|
||||
$user['user_id'] = USERID;
|
||||
|
||||
if(e_AJAX_REQUEST)
|
||||
{
|
||||
if(vartrue($_GET['q']))
|
||||
{
|
||||
$q = filter_var($_GET['q'], FILTER_SANITIZE_STRING);
|
||||
if($sql->select("user", "user_name", "user_name LIKE '". $q."%' ORDER BY user_name LIMIT 15"))
|
||||
{
|
||||
while($row = $sql->db_Fetch())
|
||||
{
|
||||
$data[] = $row['user_name'];
|
||||
}
|
||||
|
||||
if(count($data))
|
||||
{
|
||||
echo json_encode($data);
|
||||
}
|
||||
}
|
||||
}
|
||||
exit;
|
||||
}
|
||||
|
||||
|
||||
// require_once(e_CORE."shortcodes/batch/user_shortcodes.php");
|
||||
require_once(e_HANDLER."form_handler.php");
|
||||
|
||||
|
Reference in New Issue
Block a user