commit | author | age
|
87a4a6
|
1 |
<?php |
T |
2 |
|
|
3 |
/* |
|
4 |
Form Definition |
|
5 |
|
|
6 |
Tabledefinition |
|
7 |
|
|
8 |
Datatypes: |
|
9 |
- INTEGER (Forces the input to Int) |
|
10 |
- DOUBLE |
|
11 |
- CURRENCY (Formats the values to currency notation) |
|
12 |
- VARCHAR (no format check, maxlength: 255) |
|
13 |
- TEXT (no format check) |
|
14 |
- DATE (Dateformat, automatic conversion to timestamps) |
|
15 |
|
|
16 |
Formtype: |
|
17 |
- TEXT (Textfield) |
|
18 |
- TEXTAREA (Textarea) |
|
19 |
- PASSWORD (Password textfield, input is not shown when edited) |
|
20 |
- SELECT (Select option field) |
|
21 |
- RADIO |
|
22 |
- CHECKBOX |
|
23 |
- CHECKBOXARRAY |
|
24 |
- FILE |
|
25 |
|
|
26 |
VALUE: |
|
27 |
- Wert oder Array |
|
28 |
|
|
29 |
Hint: |
|
30 |
The ID field of the database table is not part of the datafield definition. |
|
31 |
The ID field must be always auto incement (int or bigint). |
|
32 |
|
|
33 |
|
|
34 |
*/ |
|
35 |
|
b1a6a5
|
36 |
$form["title"] = "Server"; |
MC |
37 |
$form["description"] = ""; |
|
38 |
$form["name"] = "server"; |
|
39 |
$form["action"] = "server_edit.php"; |
|
40 |
$form["db_table"] = "server"; |
|
41 |
$form["db_table_idx"] = "server_id"; |
|
42 |
$form["db_history"] = "yes"; |
|
43 |
$form["tab_default"] = "services"; |
|
44 |
$form["list_default"] = "server_list.php"; |
|
45 |
$form["auth"] = 'yes'; |
87a4a6
|
46 |
|
T |
47 |
$form["auth_preset"]["userid"] = 0; // 0 = id of the user, > 0 id must match with id of current user |
|
48 |
$form["auth_preset"]["groupid"] = 1; // 0 = default groupid of the user, > 0 id must match with groupid of current user |
|
49 |
$form["auth_preset"]["perm_user"] = 'riud'; //r = read, i = insert, u = update, d = delete |
|
50 |
$form["auth_preset"]["perm_group"] = 'riud'; //r = read, i = insert, u = update, d = delete |
|
51 |
$form["auth_preset"]["perm_other"] = ''; //r = read, i = insert, u = update, d = delete |
|
52 |
|
|
53 |
$form["tabs"]['services'] = array ( |
b1a6a5
|
54 |
'title' => "Services", |
MC |
55 |
'width' => 100, |
|
56 |
'template' => "templates/server_edit_services.htm", |
|
57 |
'fields' => array ( |
|
58 |
//################################# |
|
59 |
// Begin Datatable fields |
|
60 |
//################################# |
87a4a6
|
61 |
'server_name' => array ( |
b1a6a5
|
62 |
'datatype' => 'VARCHAR', |
MC |
63 |
'formtype' => 'TEXT', |
|
64 |
'default' => '', |
|
65 |
'value' => '', |
|
66 |
'width' => '30', |
|
67 |
'maxlength' => '255' |
87a4a6
|
68 |
), |
T |
69 |
'mail_server' => array ( |
b1a6a5
|
70 |
'datatype' => 'INTEGER', |
MC |
71 |
'formtype' => 'CHECKBOX', |
|
72 |
'default' => '0', |
|
73 |
'value' => array(0 => 0, 1 => 1) |
87a4a6
|
74 |
), |
T |
75 |
'web_server' => array ( |
b1a6a5
|
76 |
'datatype' => 'INTEGER', |
MC |
77 |
'formtype' => 'CHECKBOX', |
|
78 |
'default' => '0', |
|
79 |
'value' => array(0 => 0, 1 => 1) |
87a4a6
|
80 |
), |
T |
81 |
'dns_server' => array ( |
b1a6a5
|
82 |
'datatype' => 'INTEGER', |
MC |
83 |
'formtype' => 'CHECKBOX', |
|
84 |
'default' => '0', |
|
85 |
'value' => array(0 => 0, 1 => 1) |
87a4a6
|
86 |
), |
T |
87 |
'file_server' => array ( |
b1a6a5
|
88 |
'datatype' => 'INTEGER', |
MC |
89 |
'formtype' => 'CHECKBOX', |
|
90 |
'default' => '0', |
|
91 |
'value' => array(0 => 0, 1 => 1) |
87a4a6
|
92 |
), |
T |
93 |
'db_server' => array ( |
b1a6a5
|
94 |
'datatype' => 'INTEGER', |
MC |
95 |
'formtype' => 'CHECKBOX', |
|
96 |
'default' => '0', |
|
97 |
'value' => array(0 => 0, 1 => 1) |
87a4a6
|
98 |
), |
T |
99 |
'vserver_server' => array ( |
b1a6a5
|
100 |
'datatype' => 'INTEGER', |
MC |
101 |
'formtype' => 'CHECKBOX', |
|
102 |
'default' => '0', |
|
103 |
'value' => array(0 => 0, 1 => 1) |
87a4a6
|
104 |
), |
9f94a1
|
105 |
'xmpp_server' => array ( |
MF |
106 |
'datatype' => 'INTEGER', |
|
107 |
'formtype' => 'CHECKBOX', |
|
108 |
'default' => '0', |
|
109 |
'value' => array(0 => 0, 1 => 1) |
|
110 |
), |
9adcf5
|
111 |
'mirror_server_id' => array ( |
b1a6a5
|
112 |
'datatype' => 'INTEGER', |
MC |
113 |
'formtype' => 'TEXT', |
|
114 |
'default' => '', |
|
115 |
'value' => '' |
9adcf5
|
116 |
), |
cf71a4
|
117 |
/* |
87a4a6
|
118 |
'update' => array ( |
T |
119 |
'datatype' => 'INTEGER', |
|
120 |
'formtype' => 'SELECT', |
|
121 |
'default' => '1', |
|
122 |
'value' => array(0 => 'No', 1 => 'Yes') |
|
123 |
), |
cf71a4
|
124 |
*/ |
87a4a6
|
125 |
'active' => array ( |
b1a6a5
|
126 |
'datatype' => 'INTEGER', |
MC |
127 |
'formtype' => 'SELECT', |
|
128 |
'default' => '1', |
|
129 |
'value' => array(0 => 'No', 1 => 'Yes') |
87a4a6
|
130 |
), |
b1a6a5
|
131 |
//################################# |
MC |
132 |
// ENDE Datatable fields |
|
133 |
//################################# |
87a4a6
|
134 |
) |
T |
135 |
); |
|
136 |
|
be7d7f
|
137 |
/* |
ba747c
|
138 |
$form["tabs"]['config'] = array ( |
T |
139 |
'title' => "Config", |
|
140 |
'width' => 100, |
|
141 |
'template' => "templates/server_edit_config.htm", |
|
142 |
'fields' => array ( |
|
143 |
################################## |
|
144 |
# Begin Datatable fields |
|
145 |
################################## |
|
146 |
'config' => array ( |
|
147 |
'datatype' => 'TEXT', |
|
148 |
'formtype' => 'TEXTAREA', |
|
149 |
'default' => '', |
|
150 |
'value' => '', |
|
151 |
'width' => '', |
|
152 |
'cols' => '40', |
|
153 |
'rows' => '20', |
|
154 |
'maxlength' => '' |
|
155 |
), |
|
156 |
################################## |
|
157 |
# ENDE Datatable fields |
|
158 |
################################## |
|
159 |
) |
|
160 |
); |
be7d7f
|
161 |
*/ |
ba747c
|
162 |
|
b1a6a5
|
163 |
?> |