/
Functions.php
74 lines (56 loc) · 1.09 KB
/
Functions.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
<?php
function get_admin_list () {
global $dbr;
$result = $dbr->select(
'admin_users',
'au_host'
);
$list = Database::mysql2array($result);
$list2 = array();
foreach( $list as $lu ) {
$list2[] = $lu['au_host'];
}
return $list2;
}
function get_dev_list () {
global $dbr;
$result = $dbr->select(
'dev_users',
'du_host'
);
$list = Database::mysql2array($result);
$list2 = array();
foreach( $list as $lu ) {
$list2[] = $lu['du_host'];
}
return $list2;
}
function get_clerk_list () {
global $dbr;
$result = $dbr->select(
'clerk_users',
'cl_user'
);
$list = Database::mysql2array($result);
$list2 = array();
foreach( $list as $lu ) {
$list2[] = $lu['cl_user'];
}
return $list2;
}
function get_cu_list () {
global $edbr;
$result = $edbr->select(
array('user_groups','user'),
'user_name',
array(array('ug_group','=','checkuser')),
array('ORDER BY' => 'user_name ASC'),
array('ug_user' => 'user_id')
);
$list = Database::mysql2array($result);
$list2=array();
foreach($list as $cu) {
$list2[] = $cu['user_name'];
}
return $list2;
}