commit | author | age
|
73c2f2
|
1 |
<?php |
T |
2 |
|
|
3 |
/* |
|
4 |
Datatypes: |
|
5 |
- INTEGER |
|
6 |
- DOUBLE |
|
7 |
- CURRENCY |
|
8 |
- VARCHAR |
|
9 |
- TEXT |
|
10 |
- DATE |
|
11 |
*/ |
|
12 |
|
|
13 |
|
|
14 |
|
|
15 |
// Name of the list |
7d6ec3
|
16 |
if($_SESSION['s']['user']['typ'] == 'admin') { |
b1a6a5
|
17 |
$liste["name"] = "database_admin"; |
7d6ec3
|
18 |
} else { |
b1a6a5
|
19 |
$liste["name"] = "database"; |
7d6ec3
|
20 |
} |
73c2f2
|
21 |
|
T |
22 |
// Database table |
b1a6a5
|
23 |
$liste["table"] = "web_database"; |
73c2f2
|
24 |
|
T |
25 |
// Index index field of the database table |
b1a6a5
|
26 |
$liste["table_idx"] = "database_id"; |
73c2f2
|
27 |
|
T |
28 |
// Search Field Prefix |
b1a6a5
|
29 |
$liste["search_prefix"] = "search_"; |
73c2f2
|
30 |
|
T |
31 |
// Records per page |
b1a6a5
|
32 |
$liste["records_per_page"] = "15"; |
73c2f2
|
33 |
|
T |
34 |
// Script File of the list |
b1a6a5
|
35 |
$liste["file"] = "database_list.php"; |
73c2f2
|
36 |
|
T |
37 |
// Script file of the edit form |
b1a6a5
|
38 |
$liste["edit_file"] = "database_edit.php"; |
73c2f2
|
39 |
|
T |
40 |
// Script File of the delete script |
b1a6a5
|
41 |
$liste["delete_file"] = "database_del.php"; |
73c2f2
|
42 |
|
T |
43 |
// Paging Template |
b1a6a5
|
44 |
$liste["paging_tpl"] = "templates/paging.tpl.htm"; |
73c2f2
|
45 |
|
T |
46 |
// Enable auth |
b1a6a5
|
47 |
$liste["auth"] = "yes"; |
73c2f2
|
48 |
|
T |
49 |
|
|
50 |
/***************************************************** |
|
51 |
* Suchfelder |
|
52 |
*****************************************************/ |
|
53 |
|
|
54 |
|
b1a6a5
|
55 |
$liste["item"][] = array( 'field' => "active", |
MC |
56 |
'datatype' => "VARCHAR", |
|
57 |
'formtype' => "SELECT", |
|
58 |
'op' => "=", |
|
59 |
'prefix' => "", |
|
60 |
'suffix' => "", |
|
61 |
'width' => "", |
0ea7b9
|
62 |
'value' => array('y' => "<div id=\"ir-Yes\" class=\"swap\"><span>".$app->lng('yes_txt')."</span></div>", 'n' => "<div class=\"swap\" id=\"ir-No\"><span>".$app->lng('no_txt')."</span></div>")); |
73c2f2
|
63 |
|
b1a6a5
|
64 |
$liste["item"][] = array( 'field' => "remote_access", |
MC |
65 |
'datatype' => "VARCHAR", |
|
66 |
'formtype' => "SELECT", |
|
67 |
'op' => "=", |
|
68 |
'prefix' => "", |
|
69 |
'suffix' => "", |
|
70 |
'width' => "", |
0ea7b9
|
71 |
'value' => array('y' => "<div id=\"ir-Yes\" class=\"swap\"><span>".$app->lng('yes_txt')."</span></div>", 'n' => "<div class=\"swap\" id=\"ir-No\"><span>".$app->lng('no_txt')."</span></div>")); |
73c2f2
|
72 |
|
b1a6a5
|
73 |
$liste["item"][] = array( 'field' => "type", |
MC |
74 |
'datatype' => "VARCHAR", |
|
75 |
'formtype' => "SELECT", |
|
76 |
'op' => "=", |
|
77 |
'prefix' => "", |
|
78 |
'suffix' => "", |
|
79 |
'width' => "", |
|
80 |
'value' => array( |
|
81 |
'mongo' => "MongoDB", |
|
82 |
'mysql' => "MySQL" |
|
83 |
) |
|
84 |
); |
bd68aa
|
85 |
|
7d6ec3
|
86 |
if($_SESSION['s']['user']['typ'] == 'admin') { |
b1a6a5
|
87 |
$liste["item"][] = array( 'field' => "sys_groupid", |
MC |
88 |
'datatype' => "INTEGER", |
|
89 |
'formtype' => "SELECT", |
|
90 |
'op' => "=", |
|
91 |
'prefix' => "", |
|
92 |
'suffix' => "", |
|
93 |
'datasource' => array ( 'type' => 'SQL', |
7ee336
|
94 |
//'querystring' => 'SELECT groupid, name FROM sys_group WHERE groupid != 1 ORDER BY name', |
MC |
95 |
'querystring' => "SELECT sys_group.groupid,CONCAT(IF(client.company_name != '', CONCAT(client.company_name, ' :: '), ''), IF(client.contact_firstname != '', CONCAT(client.contact_firstname, ' '), ''), client.contact_name, ' (', client.username, IF(client.customer_no != '', CONCAT(', ', client.customer_no), ''), ')') as name FROM sys_group, client WHERE sys_group.groupid != 1 AND sys_group.client_id = client.client_id ORDER BY client.company_name, client.contact_name", |
b1a6a5
|
96 |
'keyfield'=> 'groupid', |
MC |
97 |
'valuefield'=> 'name' |
|
98 |
), |
|
99 |
'width' => "", |
|
100 |
'value' => ""); |
7d6ec3
|
101 |
} |
T |
102 |
|
b1a6a5
|
103 |
$liste["item"][] = array( 'field' => "server_id", |
aff9ac
|
104 |
'datatype' => "INTEGER", |
b1a6a5
|
105 |
'formtype' => "SELECT", |
MC |
106 |
'op' => "like", |
|
107 |
'prefix' => "%", |
|
108 |
'suffix' => "%", |
|
109 |
'datasource' => array ( 'type' => 'SQL', |
aff9ac
|
110 |
'querystring' => 'SELECT a.server_id, a.server_name FROM server a, web_database b WHERE (a.server_id = b.server_id) AND ({AUTHSQL-B}) ORDER BY a.server_name', |
b1a6a5
|
111 |
'keyfield'=> 'server_id', |
MC |
112 |
'valuefield'=> 'server_name' |
|
113 |
), |
|
114 |
'width' => "", |
|
115 |
'value' => ""); |
73c2f2
|
116 |
|
b1a6a5
|
117 |
$liste["item"][] = array( 'field' => "parent_domain_id", |
MC |
118 |
'datatype' => "VARCHAR", |
|
119 |
'filters' => array( 0 => array( 'event' => 'SHOW', |
|
120 |
'type' => 'IDNTOUTF8') |
|
121 |
), |
|
122 |
'formtype' => "SELECT", |
|
123 |
'op' => "=", |
|
124 |
'prefix' => "", |
|
125 |
'suffix' => "", |
|
126 |
'datasource' => array ( 'type' => 'SQL', |
|
127 |
'querystring' => "SELECT domain_id,domain FROM web_domain WHERE type = 'vhost' AND {AUTHSQL} ORDER BY domain", |
|
128 |
'keyfield'=> 'domain_id', |
|
129 |
'valuefield'=> 'domain' |
|
130 |
), |
|
131 |
'width' => "", |
|
132 |
'value' => ""); |
|
133 |
|
|
134 |
$liste["item"][] = array( 'field' => "database_user_id", |
|
135 |
'datatype' => "INTEGER", |
|
136 |
'formtype' => "SELECT", |
|
137 |
'op' => "=", |
|
138 |
'prefix' => "", |
|
139 |
'suffix' => "", |
|
140 |
'datasource' => array ( 'type' => 'SQL', |
|
141 |
'querystring' => 'SELECT database_user_id, database_user FROM web_database_user WHERE {AUTHSQL} ORDER BY database_user', |
|
142 |
'keyfield'=> 'database_user_id', |
|
143 |
'valuefield'=> 'database_user' |
|
144 |
), |
|
145 |
'width' => "", |
|
146 |
'value' => ""); |
73c2f2
|
147 |
|
5045c7
|
148 |
$liste["item"][] = array( 'field' => "database_name", |
b1a6a5
|
149 |
'datatype' => "VARCHAR", |
MC |
150 |
'formtype' => "TEXT", |
|
151 |
'op' => "like", |
|
152 |
'prefix' => "%", |
|
153 |
'suffix' => "%", |
|
154 |
'width' => "", |
|
155 |
'value' => ""); |
73c2f2
|
156 |
|
bd68aa
|
157 |
?> |