- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
switch($_REQUEST["su_type_id"] || $_REQUEST["su_type_id1"]) {
case "1":
$filter[] = " !`contr_user` AND u.id NOT IN (SELECT DISTINCT(`user_id`) FROM `link_sc_chiefs`) AND u.id NOT IN (SELECT DISTINCT(`user_id`) FROM `list_empl`) ";
break;
case "2":
$filter[] = " `contr_user`>0 ";
break;
case "3":
# EF: Новая система доступов на СЦ
#$filter[] = " (u.id IN (SELECT DISTINCT(`user_id`) FROM `list_empl`)) ";
$filter[] = "( exists (select *
from link_sc_user lsc,
user_sc_access usa
where usa.user_id = ".$USER->getId()."
and lsc.user_id = u.id
and usa.sc_id = lsc.sc_id) )";
break;
case "4":
$filter[] = " u.id IN (SELECT DISTINCT(`user_id`) FROM `link_sc_chiefs`) ";
break;
default:
break;
}
gost 23.11.2016 15:15 # −1
wvxvw 23.11.2016 17:08 # 0
proctologist 23.11.2016 17:09 # 0
barop 24.11.2016 00:59 # 0
А вот собирать фильтр по кускам это пздц
barop 23.11.2016 17:14 # 0
guest 25.11.2016 07:50 # 0