Marius Burkard
2016-04-20 4569cae57f127afd093794310ccd290d2d9fdf36
commit | author | age
e22f1e 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).
b1a6a5 32
59118c 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
e22f1e 37
T 38
39 */
40
b1a6a5 41 $form["title"]    = "Email Alias";
MC 42 $form["description"]  = "";
43 $form["name"]    = "mail_alias";
44 $form["action"]   = "mail_alias_edit.php";
45 $form["db_table"]  = "mail_forwarding";
46 $form["db_table_idx"] = "forwarding_id";
47 $form["db_history"]  = "yes";
48 $form["tab_default"] = "alias";
49 $form["list_default"] = "mail_alias_list.php";
50 $form["auth"]   = 'yes'; // yes / no
e22f1e 51
T 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"]['alias'] = array (
b1a6a5 59     'title'  => "Email Alias",
MC 60     'width'  => 100,
61     'template'  => "templates/mail_alias_edit.htm",
62     'fields'  => array (
63         //#################################
64         // Begin Datatable fields
65         //#################################
e22f1e 66         'server_id' => array (
b1a6a5 67             'datatype' => 'INTEGER',
MC 68             'formtype' => 'TEXT',
69             'default' => '',
70             'value'  => '',
71             'width'  => '30',
72             'maxlength' => '255'
e22f1e 73         ),
ac3b1f 74         'source' => array (
b1a6a5 75             'datatype' => 'VARCHAR',
MC 76             'formtype' => 'TEXT',
77             'filters'   => array( 0 => array( 'event' => 'SAVE',
78                     'type' => 'IDNTOASCII'),
79                 1 => array( 'event' => 'SHOW',
80                     'type' => 'IDNTOUTF8'),
81                 2 => array( 'event' => 'SAVE',
82                     'type' => 'TOLOWER')
83             ),
84             'validators' => array (  0 => array ( 'type' => 'ISEMAIL',
85                     'errmsg'=> 'email_error_isemail'),
86             ),
87             'default' => '',
88             'value'  => '',
89             'width'  => '30',
90             'maxlength' => '255',
59118c 91             'searchable' => 1
e22f1e 92         ),
T 93         'destination' => array (
b1a6a5 94             'datatype' => 'VARCHAR',
MC 95             'formtype' => 'SELECT',
96             'filters'   => array( 0 => array( 'event' => 'SAVE',
97                     'type' => 'IDNTOASCII'),
98                 1 => array( 'event' => 'SHOW',
99                     'type' => 'IDNTOUTF8'),
100                 2 => array( 'event' => 'SAVE',
101                     'type' => 'TOLOWER')
102             ),
103             'default' => '',
104             'datasource' => array (  'type'   => 'SQL',
105                 'querystring'  => 'SELECT email FROM mail_user WHERE {AUTHSQL} ORDER BY email',
106                 'keyfield'  => 'email',
107                 'valuefield' => 'email'
108             ),
109             'validators' => array (  0 => array ( 'type' => 'ISEMAIL',
110                     'errmsg'=> 'destination_error_isemail'),
111             ),
112             'value'  => '',
59118c 113             'searchable' => 2
e22f1e 114         ),
T 115         'type' => array (
b1a6a5 116             'datatype' => 'VARCHAR',
MC 117             'formtype' => 'SELECT',
118             'default' => '',
119             'value'  => array('alias' => 'Alias', 'forward'=>'Forward')
e22f1e 120         ),
T 121         'active' => array (
b1a6a5 122             'datatype' => 'VARCHAR',
MC 123             'formtype' => 'CHECKBOX',
124             'default' => 'y',
125             'value'  => array(0 => 'n', 1 => 'y')
e22f1e 126         ),
779976 127         'allow_send_as' => array (
AT 128             'datatype' => 'VARCHAR',
129             'formtype' => 'CHECKBOX',
130             'default' => 'y',
131             'value'  => array(1 => 'y', 0 => 'n')
132         ),
75722e 133         'greylisting' => array (
D 134             'datatype' => 'VARCHAR',
135             'formtype' => 'CHECKBOX',
136             'default' => 'n',
137             'value'  => array(1 => 'y', 0 => 'n')
138         ),
b1a6a5 139         //#################################
MC 140         // ENDE Datatable fields
141         //#################################
e22f1e 142     )
T 143 );
144
145
146
b1a6a5 147 ?>