1+ <?php
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+
36+ $ form ["title " ] = "Record " ;
37+ $ form ["description " ] = "" ;
38+ $ form ["name " ] = "rr " ;
39+ $ form ["action " ] = "rr_edit.php " ;
40+ $ form ["db_table " ] = "rr " ;
41+ $ form ["db_table_idx " ] = "id " ;
42+ $ form ["db_history " ] = "yes " ;
43+ $ form ["tab_default " ] = "rr " ;
44+ $ form ["list_default " ] = "rr_list.php " ;
45+ $ form ["auth " ] = 'no ' ; // yes / no
46+
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 " ] = 0 ; // 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 " ]['rr ' ] = array (
54+ 'title ' => "Record " ,
55+ 'width ' => 100 ,
56+ 'template ' => "templates/rr_edit.htm " ,
57+ 'fields ' => array (
58+ ##################################
59+ # Begin Datatable fields
60+ ##################################
61+ /*
62+ 'server_id' => array (
63+ 'datatype' => 'INTEGER',
64+ 'formtype' => 'SELECT',
65+ 'default' => '',
66+ 'datasource' => array ( 'type' => 'SQL',
67+ 'querystring' => 'SELECT server_id,server_name FROM server WHERE 1 ORDER BY server_name',
68+ 'keyfield'=> 'server_id',
69+ 'valuefield'=> 'server_name'
70+ ),
71+ 'value' => ''
72+ ),
73+ */
74+ 'zone ' => array (
75+ 'datatype ' => 'INTEGER ' ,
76+ 'formtype ' => 'TEXT ' ,
77+ 'validators ' => array (0 => array ('type ' => 'NOTEMPTY ' ,
78+ 'errmsg ' => 'rr_zone_error_empty ' ),
79+ ),
80+ 'default ' => '' ,
81+ 'value ' => '' ,
82+ 'width ' => '30 ' ,
83+ 'maxlength ' => '255 '
84+ ),
85+ 'name ' => array (
86+ 'datatype ' => 'VARCHAR ' ,
87+ 'formtype ' => 'TEXT ' ,
88+ 'default ' => '' ,
89+ 'value ' => '' ,
90+ 'width ' => '30 ' ,
91+ 'maxlength ' => '255 '
92+ ),
93+ 'type ' => array (
94+ 'datatype ' => 'VARCHAR ' ,
95+ 'formtype ' => 'SELECT ' ,
96+ 'default ' => '' ,
97+ 'value ' => array ('A ' => 'A ' , 'AAAA ' => 'AAAA ' , 'ALIAS ' => 'ALIAS ' , 'CNAME ' => 'CNAME ' , 'HINFO ' => 'HINFO ' , 'MX ' => 'MX ' , 'NS ' => 'NS ' , 'PTR ' => 'PTR ' , 'RP ' => 'RP ' , 'SRV ' => 'SRV ' , 'TXT ' => 'TXT ' )
98+ ),
99+ 'data ' => array (
100+ 'datatype ' => 'VARCHAR ' ,
101+ 'formtype ' => 'TEXT ' ,
102+ 'validators ' => array (0 => array ('type ' => 'NOTEMPTY ' ,
103+ 'errmsg ' => 'rr_data_error_empty ' ),
104+ ),
105+ 'default ' => '' ,
106+ 'value ' => '' ,
107+ 'width ' => '30 ' ,
108+ 'maxlength ' => '255 '
109+ ),
110+ 'aux ' => array (
111+ 'datatype ' => 'INTEGER ' ,
112+ 'formtype ' => 'TEXT ' ,
113+ 'default ' => '' ,
114+ 'value ' => '' ,
115+ 'width ' => '30 ' ,
116+ 'maxlength ' => '255 '
117+ ),
118+ 'ttl ' => array (
119+ 'datatype ' => 'INTEGER ' ,
120+ 'formtype ' => 'TEXT ' ,
121+ 'validators ' => array (0 => array ('type ' => 'NOTEMPTY ' ,
122+ 'errmsg ' => 'rr_ttl_error_empty ' ),
123+ ),
124+ 'default ' => '86400 ' ,
125+ 'value ' => '86400 ' ,
126+ 'width ' => '30 ' ,
127+ 'maxlength ' => '255 '
128+ ),
129+ ##################################
130+ # ENDE Datatable fields
131+ ##################################
132+ )
133+ );
134+
135+
136+ ?>
0 commit comments