search in user list
loading gif lists can be closed and opened number of trainings at diary
This commit is contained in:
28
_ajax/get_user_list.php
Normal file
28
_ajax/get_user_list.php
Normal file
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
//tag listánál ez adja vissza a keresés eredményét
|
||||
ini_set('include_path', '../_class/');
|
||||
include('class_sql.php');
|
||||
if ($_SERVER['HTTP_HOST'] == 'badmintoncoach.hu') $sql = new sql('localhost','root','','badminton_coach');
|
||||
else $sql = new sql('localhost','tollashodos','uprRscU8bGpJ','tollashodos');
|
||||
|
||||
$filter1 = "";
|
||||
if (!empty($_POST['uk_filter_name'])) {
|
||||
$filter1 = "AND uk_name LIKE '%".$_POST['uk_filter_name']."%'";
|
||||
}
|
||||
|
||||
$filter2 = "";
|
||||
if (in_array($_POST['is_active'], array(0,1))) {
|
||||
$filter2 = "AND uk_is_active = " . $_POST['is_active'];
|
||||
}
|
||||
|
||||
$kid_query = "SELECT uk_id, uk_name FROM user_kid WHERE uk_deleted = 0
|
||||
". $filter1 . "
|
||||
". $filter2 . "
|
||||
ORDER BY uk_name ASC";
|
||||
|
||||
$kid_assoc_array = $sql->assoc_array($kid_query);
|
||||
|
||||
|
||||
echo json_encode($kid_assoc_array);
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user