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 " ] = "Email Alias " ;
37+ $ form ["description " ] = "" ;
38+ $ form ["name " ] = "mail_alias " ;
39+ $ form ["action " ] = "mail_alias_edit.php " ;
40+ $ form ["db_table " ] = "mail_redirect " ;
41+ $ form ["db_table_idx " ] = "redirect_id " ;
42+ $ form ["db_history " ] = "yes " ;
43+ $ form ["tab_default " ] = "mailbox " ;
44+ $ form ["list_default " ] = "mail_box_list.php " ;
45+ $ form ["auth " ] = 'yes ' ; // 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 " ]['mailbox ' ] = array (
54+ 'title ' => "Mailbox " ,
55+ 'width ' => 100 ,
56+ 'template ' => "templates/mail_box_mailbox_edit.htm " ,
57+ 'fields ' => array (
58+ ##################################
59+ # Begin Datatable fields
60+ ##################################
61+ 'server_id ' => array (
62+ 'datatype ' => 'INTEGER ' ,
63+ 'formtype ' => 'TEXT ' ,
64+ 'default ' => '' ,
65+ 'value ' => '' ,
66+ 'width ' => '30 ' ,
67+ 'maxlength ' => '255 '
68+ ),
69+ 'email ' => array (
70+ 'datatype ' => 'VARCHAR ' ,
71+ 'formtype ' => 'TEXT ' ,
72+ 'validators ' => array ( 0 => array ( 'type ' => 'ISEMAIL ' ,
73+ 'errmsg ' => 'email_error_isemail ' ),
74+ 1 => array ( 'type ' => 'UNIQUE ' ,
75+ 'errmsg ' => 'email_error_unique ' ),
76+ ),
77+ 'default ' => '' ,
78+ 'value ' => '' ,
79+ 'width ' => '30 ' ,
80+ 'maxlength ' => '255 '
81+ ),
82+ 'cryptpwd ' => array (
83+ 'datatype ' => 'VARCHAR ' ,
84+ 'formtype ' => 'PASSWORD ' ,
85+ 'encryption ' => 'CRYPT ' ,
86+ 'default ' => '' ,
87+ 'value ' => '' ,
88+ 'width ' => '30 ' ,
89+ 'maxlength ' => '255 '
90+ ),
91+ 'active ' => array (
92+ 'datatype ' => 'INTEGER ' ,
93+ 'formtype ' => 'CHECKBOX ' ,
94+ 'default ' => '1 ' ,
95+ 'value ' => '1 '
96+ ),
97+ ##################################
98+ # ENDE Datatable fields
99+ ##################################
100+ )
101+ );
102+
103+ $ form ["tabs " ]['autoresponder ' ] = array (
104+ 'title ' => "Autoresponder " ,
105+ 'width ' => 100 ,
106+ 'template ' => "templates/mail_box_autoresponder_edit.htm " ,
107+ 'fields ' => array (
108+ ##################################
109+ # Begin Datatable fields
110+ ##################################
111+ 'autoresponder_text ' => array (
112+ 'datatype ' => 'TEXT ' ,
113+ 'formtype ' => 'TEXTAREA ' ,
114+ 'default ' => '' ,
115+ 'value ' => '' ,
116+ 'cols ' => '30 ' ,
117+ 'rows ' => '15 '
118+ ),
119+ 'autoresponder ' => array (
120+ 'datatype ' => 'INTEGER ' ,
121+ 'formtype ' => 'CHECKBOX ' ,
122+ 'default ' => '1 ' ,
123+ 'value ' => '1 '
124+ ),
125+ ##################################
126+ # ENDE Datatable fields
127+ ##################################
128+ )
129+ );
130+
131+
132+ ?>
0 commit comments