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') { |
T |
17 |
$liste["name"] = "database_admin"; |
|
18 |
} else { |
|
19 |
$liste["name"] = "database"; |
|
20 |
} |
73c2f2
|
21 |
|
T |
22 |
// Database table |
|
23 |
$liste["table"] = "web_database"; |
|
24 |
|
|
25 |
// Index index field of the database table |
|
26 |
$liste["table_idx"] = "database_id"; |
|
27 |
|
|
28 |
// Search Field Prefix |
|
29 |
$liste["search_prefix"] = "search_"; |
|
30 |
|
|
31 |
// Records per page |
f66e40
|
32 |
$liste["records_per_page"] = "15"; |
73c2f2
|
33 |
|
T |
34 |
// Script File of the list |
|
35 |
$liste["file"] = "database_list.php"; |
|
36 |
|
|
37 |
// Script file of the edit form |
|
38 |
$liste["edit_file"] = "database_edit.php"; |
|
39 |
|
|
40 |
// Script File of the delete script |
|
41 |
$liste["delete_file"] = "database_del.php"; |
|
42 |
|
|
43 |
// Paging Template |
|
44 |
$liste["paging_tpl"] = "templates/paging.tpl.htm"; |
|
45 |
|
|
46 |
// Enable auth |
|
47 |
$liste["auth"] = "yes"; |
|
48 |
|
|
49 |
|
|
50 |
/***************************************************** |
|
51 |
* Suchfelder |
|
52 |
*****************************************************/ |
|
53 |
|
|
54 |
|
|
55 |
$liste["item"][] = array( 'field' => "active", |
|
56 |
'datatype' => "VARCHAR", |
|
57 |
'formtype' => "SELECT", |
|
58 |
'op' => "=", |
|
59 |
'prefix' => "", |
|
60 |
'suffix' => "", |
|
61 |
'width' => "", |
08caf7
|
62 |
'value' => array('y' => "<div id=\"ir-Yes\" class=\"swap\"><span>Yes</span></div>",'n' => "<div class=\"swap\" id=\"ir-No\"><span>No</span></div>")); |
73c2f2
|
63 |
|
T |
64 |
$liste["item"][] = array( 'field' => "remote_access", |
|
65 |
'datatype' => "VARCHAR", |
|
66 |
'formtype' => "SELECT", |
|
67 |
'op' => "=", |
|
68 |
'prefix' => "", |
|
69 |
'suffix' => "", |
|
70 |
'width' => "", |
5c80ff
|
71 |
'value' => array('y' => "<div id=\"ir-Yes\" class=\"swap\"><span>Yes</span></div>",'n' => "<div class=\"swap\" id=\"ir-No\"><span>No</span></div>")); |
73c2f2
|
72 |
|
2332b2
|
73 |
$liste["item"][] = array( 'field' => "type", |
T |
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 |
); |
|
85 |
|
7d6ec3
|
86 |
if($_SESSION['s']['user']['typ'] == 'admin') { |
T |
87 |
$liste["item"][] = array( 'field' => "sys_groupid", |
|
88 |
'datatype' => "INTEGER", |
|
89 |
'formtype' => "SELECT", |
|
90 |
'op' => "=", |
|
91 |
'prefix' => "", |
|
92 |
'suffix' => "", |
|
93 |
'datasource' => array ( 'type' => 'SQL', |
|
94 |
'querystring' => 'SELECT groupid, name FROM sys_group WHERE groupid != 1 ORDER BY name', |
|
95 |
'keyfield'=> 'groupid', |
|
96 |
'valuefield'=> 'name' |
|
97 |
), |
|
98 |
'width' => "", |
|
99 |
'value' => ""); |
|
100 |
} |
|
101 |
|
73c2f2
|
102 |
$liste["item"][] = array( 'field' => "server_id", |
T |
103 |
'datatype' => "VARCHAR", |
|
104 |
'formtype' => "SELECT", |
|
105 |
'op' => "like", |
|
106 |
'prefix' => "%", |
|
107 |
'suffix' => "%", |
|
108 |
'datasource' => array ( 'type' => 'SQL', |
|
109 |
'querystring' => 'SELECT server_id,server_name FROM server WHERE {AUTHSQL} AND db_server = 1 ORDER BY server_name', |
|
110 |
'keyfield'=> 'server_id', |
|
111 |
'valuefield'=> 'server_name' |
|
112 |
), |
|
113 |
'width' => "", |
|
114 |
'value' => ""); |
|
115 |
|
381520
|
116 |
$liste["item"][] = array( 'field' => "database_user_id", |
M |
117 |
'datatype' => "INTEGER", |
|
118 |
'formtype' => "SELECT", |
|
119 |
'op' => "=", |
|
120 |
'prefix' => "", |
|
121 |
'suffix' => "", |
|
122 |
'datasource' => array ( 'type' => 'SQL', |
|
123 |
'querystring' => 'SELECT database_user_id, database_user FROM web_database_user WHERE {AUTHSQL} ORDER BY database_user', |
|
124 |
'keyfield'=> 'database_user_id', |
|
125 |
'valuefield'=> 'database_user' |
|
126 |
), |
73c2f2
|
127 |
'width' => "", |
T |
128 |
'value' => ""); |
|
129 |
|
5045c7
|
130 |
$liste["item"][] = array( 'field' => "database_name", |
M |
131 |
'datatype' => "VARCHAR", |
|
132 |
'formtype' => "TEXT", |
|
133 |
'op' => "like", |
|
134 |
'prefix' => "%", |
|
135 |
'suffix' => "%", |
|
136 |
'width' => "", |
|
137 |
'value' => ""); |
73c2f2
|
138 |
|
2332b2
|
139 |
?> |