commit | author | age
|
a59731
|
1 |
<?php |
D |
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). |
7fe908
|
32 |
|
4c28d9
|
33 |
Search: |
F |
34 |
- searchable = 1 or searchable = 2 include the field in the search |
|
35 |
- searchable = 1: this field will be the title of the search result |
|
36 |
- searchable = 2: this field will be included in the description of the search result |
a59731
|
37 |
|
D |
38 |
|
|
39 |
*/ |
|
40 |
|
7fe908
|
41 |
$form["title"] = "Secondary DNS Zone"; |
MC |
42 |
$form["description"] = ""; |
|
43 |
$form["name"] = "dns_slave"; |
|
44 |
$form["action"] = "dns_slave_edit.php"; |
|
45 |
$form["db_table"] = "dns_slave"; |
|
46 |
$form["db_table_idx"] = "id"; |
|
47 |
$form["db_history"] = "yes"; |
|
48 |
$form["tab_default"] = "dns_slave"; |
|
49 |
$form["list_default"] = "dns_slave_list.php"; |
|
50 |
$form["auth"] = 'yes'; // yes / no |
a59731
|
51 |
|
D |
52 |
$form["auth_preset"]["userid"] = 0; // 0 = id of the user, > 0 id must match with id of current user |
|
53 |
$form["auth_preset"]["groupid"] = 0; // 0 = default groupid of the user, > 0 id must match with groupid of current user |
|
54 |
$form["auth_preset"]["perm_user"] = 'riud'; //r = read, i = insert, u = update, d = delete |
|
55 |
$form["auth_preset"]["perm_group"] = 'riud'; //r = read, i = insert, u = update, d = delete |
|
56 |
$form["auth_preset"]["perm_other"] = ''; //r = read, i = insert, u = update, d = delete |
|
57 |
|
|
58 |
$form["tabs"]['dns_slave'] = array ( |
7fe908
|
59 |
'title' => "Secondary DNS Zone", |
MC |
60 |
'width' => 100, |
|
61 |
'template' => "templates/dns_slave_edit.htm", |
|
62 |
'fields' => array ( |
|
63 |
//################################# |
|
64 |
// Begin Datatable fields |
|
65 |
//################################# |
a59731
|
66 |
'server_id' => array ( |
7fe908
|
67 |
'datatype' => 'INTEGER', |
MC |
68 |
'formtype' => 'SELECT', |
|
69 |
'datasource' => array ( 'type' => 'SQL', |
|
70 |
'querystring' => 'SELECT server_id,server_name FROM server WHERE mirror_server_id = 0 AND dns_server = 1 AND {AUTHSQL} ORDER BY server_name', |
|
71 |
'keyfield'=> 'server_id', |
|
72 |
'valuefield'=> 'server_name' |
|
73 |
), |
|
74 |
'validators' => array ( 0 => array ( 'type' => 'NOTEMPTY', |
|
75 |
'errmsg'=> 'server_id_error_empty'), |
|
76 |
), |
|
77 |
'default' => '', |
|
78 |
'value' => '', |
|
79 |
'width' => '30', |
|
80 |
'maxlength' => '255' |
a59731
|
81 |
), |
D |
82 |
'origin' => array ( |
7fe908
|
83 |
'datatype' => 'VARCHAR', |
MC |
84 |
'formtype' => 'TEXT', |
|
85 |
'filters' => array( 0 => array( 'event' => 'SAVE', |
|
86 |
'type' => 'IDNTOASCII'), |
|
87 |
1 => array( 'event' => 'SHOW', |
|
88 |
'type' => 'IDNTOUTF8'), |
|
89 |
2 => array( 'event' => 'SAVE', |
|
90 |
'type' => 'TOLOWER') |
|
91 |
), |
|
92 |
'validators' => array ( 0 => array ( 'type' => 'NOTEMPTY', |
|
93 |
'errmsg'=> 'origin_error_empty'), |
|
94 |
/* |
a59731
|
95 |
1 => array ( 'type' => 'UNIQUE', |
D |
96 |
'errmsg'=> 'origin_error_unique'), |
3f478f
|
97 |
*/ |
7fe908
|
98 |
1 => array ( 'type' => 'REGEX', |
91bb61
|
99 |
'regex' => '/^[a-zA-Z0-9\.\-\/]{2,255}\.[a-zA-Z0-9\-]{2,10}[\.]{0,1}$/', |
7fe908
|
100 |
'errmsg'=> 'origin_error_regex'), |
MC |
101 |
), |
|
102 |
'default' => '', |
|
103 |
'value' => '', |
|
104 |
'width' => '30', |
|
105 |
'maxlength' => '255', |
4c28d9
|
106 |
'searchable' => 1 |
a59731
|
107 |
), |
D |
108 |
'ns' => array ( |
7fe908
|
109 |
'datatype' => 'VARCHAR', |
MC |
110 |
'formtype' => 'TEXT', |
|
111 |
'validators' => array ( 0 => array ( 'type' => 'REGEX', |
|
112 |
'regex' => '/^[0-9\.]{1,255}$/', |
|
113 |
'errmsg'=> 'ns_error_regex'), |
|
114 |
), |
|
115 |
'default' => '', |
|
116 |
'value' => '', |
|
117 |
'width' => '30', |
|
118 |
'maxlength' => '255', |
4c28d9
|
119 |
'searchable' => 2 |
a59731
|
120 |
), |
7fe908
|
121 |
'xfer' => array ( |
MC |
122 |
'datatype' => 'VARCHAR', |
|
123 |
'formtype' => 'TEXT', |
9a30ec
|
124 |
'validators' => array ( 0 => array ( 'type' => 'ISIP', |
TB |
125 |
'allowempty' => 'y', |
|
126 |
'separator' => ',', |
|
127 |
'errmsg'=> 'xfer_error_regex'), |
|
128 |
), |
7fe908
|
129 |
'default' => '', |
MC |
130 |
'value' => '', |
|
131 |
'width' => '30', |
|
132 |
'maxlength' => '255' |
a59731
|
133 |
), |
7fe908
|
134 |
'active' => array ( |
MC |
135 |
'datatype' => 'VARCHAR', |
|
136 |
'formtype' => 'CHECKBOX', |
|
137 |
'default' => 'Y', |
|
138 |
'value' => array(0 => 'N', 1 => 'Y') |
|
139 |
), |
|
140 |
//################################# |
|
141 |
// ENDE Datatable fields |
|
142 |
//################################# |
a59731
|
143 |
) |
D |
144 |
); |
|
145 |
|
|
146 |
|
|
147 |
?> |