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 " ] = "Mail DomainAlias " ;
37+ $ form ["description " ] = "" ;
38+ $ form ["name " ] = "mail_domain_alias " ;
39+ $ form ["action " ] = "mail_domain_alias_edit.php " ;
40+ $ form ["db_table " ] = "mail_domain " ;
41+ $ form ["db_table_idx " ] = "domain_id " ;
42+ $ form ["db_history " ] = "yes " ;
43+ $ form ["tab_default " ] = "domain " ;
44+ $ form ["list_default " ] = "mail_domain_alias_list.php " ;
45+ $ form ["auth " ] = '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 " ]['domain ' ] = array (
54+ 'title ' => "Domain " ,
55+ 'width ' => 100 ,
56+ 'template ' => "templates/mail_domain_alias_edit.htm " ,
57+ 'fields ' => array (
58+ ##################################
59+ # Begin Datatable fields
60+ ##################################
61+ 'server_id ' => array (
62+ 'datatype ' => 'INTEGER ' ,
63+ 'formtype ' => 'SELECT ' ,
64+ 'default ' => '' ,
65+ 'datasource ' => array ( 'type ' => 'SQL ' ,
66+ 'querystring ' => 'SELECT server_id,server_name FROM server WHERE 1 ORDER BY server_name ' ,
67+ 'keyfield ' => 'server_id ' ,
68+ 'valuefield ' => 'server_name '
69+ ),
70+ 'value ' => ''
71+ ),
72+ 'domain ' => array (
73+ 'datatype ' => 'VARCHAR ' ,
74+ 'formtype ' => 'TEXT ' ,
75+ 'validators ' => array ( 0 => array ( 'type ' => 'NOTEMPTY ' ,
76+ 'errmsg ' => 'domain_error_empty ' ),
77+ 1 => array ( 'type ' => 'UNIQUE ' ,
78+ 'errmsg ' => 'domain_error_unique ' ),
79+ ),
80+ 'default ' => '' ,
81+ 'value ' => '' ,
82+ 'width ' => '30 ' ,
83+ 'maxlength ' => '255 '
84+ ),
85+ 'destination ' => array (
86+ 'datatype ' => 'VARCHAR ' ,
87+ 'formtype ' => 'TEXT ' ,
88+ 'validators ' => array ( 0 => array ( 'type ' => 'NOTEMPTY ' ,
89+ 'errmsg ' => 'destination_error_empty ' ),
90+ 1 => array ( 'type ' => 'UNIQUE ' ,
91+ 'errmsg ' => 'destination_error_unique ' ),
92+ ),
93+ 'default ' => '' ,
94+ 'value ' => '' ,
95+ 'width ' => '30 ' ,
96+ 'maxlength ' => '255 '
97+ ),
98+ 'type ' => array (
99+ 'datatype ' => 'VARCHAR ' ,
100+ 'formtype ' => 'SELECT ' ,
101+ 'default ' => '' ,
102+ 'value ' => array ('alias ' => 'alias ' ,'local ' => 'local ' ,'relay ' =>'relay ' ,'manual_relay ' =>'manual Relay ' )
103+ ),
104+ 'active ' => array (
105+ 'datatype ' => 'INTEGER ' ,
106+ 'formtype ' => 'CHECKBOX ' ,
107+ 'default ' => '1 ' ,
108+ 'value ' => '1 '
109+ ),
110+ ##################################
111+ # ENDE Datatable fields
112+ ##################################
113+ )
114+ );
115+
116+
117+ ?>
0 commit comments