search in user list

loading gif
lists can be closed and opened
number of trainings at diary
This commit is contained in:
Ricsi
2017-01-19 19:10:51 +01:00
parent 92be8a8c95
commit 1b78abb5c7
13 changed files with 379 additions and 41 deletions

28
_ajax/get_user_list.php Normal file
View 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);
?>