commit | author | age
|
f14188
|
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 |
*/ |
65ea2e
|
35 |
global $app; |
f14188
|
36 |
|
7fe908
|
37 |
$form["title"] = "DNS ALIAS"; |
MC |
38 |
$form["description"] = ""; |
|
39 |
$form["name"] = "dns_alias"; |
|
40 |
$form["action"] = "dns_alias_edit.php"; |
|
41 |
$form["db_table"] = "dns_rr"; |
|
42 |
$form["db_table_idx"] = "id"; |
|
43 |
$form["db_history"] = "yes"; |
|
44 |
$form["tab_default"] = "dns"; |
|
45 |
$form["list_default"] = "dns_a_list.php"; |
|
46 |
$form["auth"] = 'yes'; // yes / no |
f14188
|
47 |
|
T |
48 |
$form["auth_preset"]["userid"] = 0; // 0 = id of the user, > 0 id must match with id of current user |
|
49 |
$form["auth_preset"]["groupid"] = 0; // 0 = default groupid of the user, > 0 id must match with groupid of current user |
|
50 |
$form["auth_preset"]["perm_user"] = 'riud'; //r = read, i = insert, u = update, d = delete |
|
51 |
$form["auth_preset"]["perm_group"] = 'riud'; //r = read, i = insert, u = update, d = delete |
|
52 |
$form["auth_preset"]["perm_other"] = ''; //r = read, i = insert, u = update, d = delete |
|
53 |
|
|
54 |
$form["tabs"]['dns'] = array ( |
7fe908
|
55 |
'title' => "DNS ALIAS", |
MC |
56 |
'width' => 100, |
|
57 |
'template' => "templates/dns_alias_edit.htm", |
|
58 |
'fields' => array ( |
|
59 |
//################################# |
|
60 |
// Begin Datatable fields |
|
61 |
//################################# |
f14188
|
62 |
'server_id' => array ( |
7fe908
|
63 |
'datatype' => 'INTEGER', |
MC |
64 |
'formtype' => 'SELECT', |
|
65 |
'default' => '', |
|
66 |
'value' => '', |
|
67 |
'width' => '30', |
|
68 |
'maxlength' => '255' |
f14188
|
69 |
), |
T |
70 |
'zone' => array ( |
7fe908
|
71 |
'datatype' => 'INTEGER', |
MC |
72 |
'formtype' => 'TEXT', |
|
73 |
'default' => @$app->functions->intval($_REQUEST["zone"]), |
|
74 |
'value' => '', |
|
75 |
'width' => '30', |
|
76 |
'maxlength' => '255' |
f14188
|
77 |
), |
T |
78 |
'name' => array ( |
7fe908
|
79 |
'datatype' => 'VARCHAR', |
MC |
80 |
'formtype' => 'TEXT', |
|
81 |
'filters' => array( 0 => array( 'event' => 'SAVE', |
|
82 |
'type' => 'IDNTOASCII'), |
|
83 |
1 => array( 'event' => 'SHOW', |
|
84 |
'type' => 'IDNTOUTF8'), |
|
85 |
2 => array( 'event' => 'SAVE', |
|
86 |
'type' => 'TOLOWER') |
|
87 |
), |
|
88 |
'validators' => array ( 0 => array ( 'type' => 'NOTEMPTY', |
|
89 |
'errmsg'=> 'name_error_empty'), |
|
90 |
1 => array ( 'type' => 'REGEX', |
91bb61
|
91 |
'regex' => '/^[a-zA-Z0-9\.\-]{1,255}$/', |
7fe908
|
92 |
'errmsg'=> 'name_error_regex'), |
MC |
93 |
), |
|
94 |
'default' => '', |
|
95 |
'value' => '', |
|
96 |
'width' => '30', |
|
97 |
'maxlength' => '255' |
f14188
|
98 |
), |
T |
99 |
'type' => array ( |
7fe908
|
100 |
'datatype' => 'VARCHAR', |
MC |
101 |
'formtype' => 'TEXT', |
|
102 |
'default' => 'ALIAS', |
|
103 |
'value' => '', |
|
104 |
'width' => '5', |
|
105 |
'maxlength' => '5' |
f14188
|
106 |
), |
T |
107 |
'data' => array ( |
7fe908
|
108 |
'datatype' => 'VARCHAR', |
MC |
109 |
'formtype' => 'TEXT', |
|
110 |
'filters' => array( 0 => array( 'event' => 'SAVE', |
|
111 |
'type' => 'IDNTOASCII'), |
|
112 |
1 => array( 'event' => 'SHOW', |
|
113 |
'type' => 'IDNTOUTF8'), |
|
114 |
2 => array( 'event' => 'SAVE', |
|
115 |
'type' => 'TOLOWER') |
|
116 |
), |
|
117 |
'validators' => array ( 0 => array ( 'type' => 'NOTEMPTY', |
|
118 |
'errmsg'=> 'data_error_empty'), |
|
119 |
1 => array ( 'type' => 'REGEX', |
91bb61
|
120 |
'regex' => '/^[a-zA-Z0-9\.\-]{1,255}$/', |
7fe908
|
121 |
'errmsg'=> 'data_error_regex'), |
MC |
122 |
), |
|
123 |
'default' => '', |
|
124 |
'value' => '', |
|
125 |
'width' => '30', |
|
126 |
'maxlength' => '255' |
f14188
|
127 |
), |
T |
128 |
/* |
|
129 |
'aux' => array ( |
|
130 |
'datatype' => 'INTEGER', |
|
131 |
'formtype' => 'TEXT', |
|
132 |
'default' => '0', |
|
133 |
'value' => '', |
|
134 |
'width' => '10', |
|
135 |
'maxlength' => '10' |
|
136 |
), |
|
137 |
*/ |
|
138 |
'ttl' => array ( |
7fe908
|
139 |
'datatype' => 'INTEGER', |
MC |
140 |
'formtype' => 'TEXT', |
|
141 |
'default' => '86400', |
|
142 |
'value' => '', |
|
143 |
'width' => '10', |
|
144 |
'maxlength' => '10' |
f14188
|
145 |
), |
T |
146 |
'active' => array ( |
7fe908
|
147 |
'datatype' => 'VARCHAR', |
MC |
148 |
'formtype' => 'CHECKBOX', |
|
149 |
'default' => 'Y', |
|
150 |
'value' => array(0 => 'N', 1 => 'Y') |
f14188
|
151 |
), |
56b0b8
|
152 |
'stamp' => array ( |
7fe908
|
153 |
'datatype' => 'VARCHAR', |
MC |
154 |
'formtype' => 'TEXT', |
|
155 |
'default' => '', |
|
156 |
'value' => '', |
|
157 |
'width' => '30', |
|
158 |
'maxlength' => '255' |
56b0b8
|
159 |
), |
F |
160 |
'serial' => array ( |
7fe908
|
161 |
'datatype' => 'INTEGER', |
MC |
162 |
'formtype' => 'TEXT', |
|
163 |
'default' => '', |
|
164 |
'value' => '', |
|
165 |
'width' => '10', |
|
166 |
'maxlength' => '10' |
56b0b8
|
167 |
), |
7fe908
|
168 |
//################################# |
MC |
169 |
// ENDE Datatable fields |
|
170 |
//################################# |
f14188
|
171 |
) |
T |
172 |
); |
|
173 |
|
|
174 |
|
|
175 |
|
7fe908
|
176 |
?> |