Marius Burkard
2016-04-20 4569cae57f127afd093794310ccd290d2d9fdf36
commit | author | age
45f11e 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
45f11e 37
T 38
39 */
40
b1a6a5 41 $form["title"]    = "Email Forward";
MC 42 $form["description"]  = "";
43 $form["name"]    = "mail_forward";
44 $form["action"]   = "mail_forward_edit.php";
45 $form["db_table"]  = "mail_forwarding";
46 $form["db_table_idx"] = "forwarding_id";
47 $form["db_history"]  = "yes";
48 $form["tab_default"] = "forward";
49 $form["list_default"] = "mail_forward_list.php";
50 $form["auth"]   = 'yes'; // yes / no
45f11e 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"]['forward'] = array (
b1a6a5 59     'title'  => "Email Forward",
MC 60     'width'  => 100,
61     'template'  => "templates/mail_forward_edit.htm",
62     'fields'  => array (
63         //#################################
64         // Begin Datatable fields
65         //#################################
45f11e 66         'server_id' => array (
b1a6a5 67             'datatype' => 'INTEGER',
MC 68             'formtype' => 'TEXT',
69             'default' => '',
70             'value'  => '',
71             'width'  => '30',
72             'maxlength' => '255'
45f11e 73         ),
T 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
45f11e 92         ),
T 93         'destination' => array (
b1a6a5 94             'datatype' => 'VARCHAR',
MC 95             'formtype' => 'TEXT',
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             'value'  => '',
105             'width'  => '30',
106             'maxlength' => '255',
59118c 107             'searchable' => 2
45f11e 108         ),
T 109         'type' => array (
b1a6a5 110             'datatype' => 'VARCHAR',
MC 111             'formtype' => 'SELECT',
112             'default' => '',
113             'value'  => array('forward'=>'Forward', 'alias' => 'Alias')
45f11e 114         ),
T 115         'active' => array (
b1a6a5 116             'datatype' => 'VARCHAR',
MC 117             'formtype' => 'CHECKBOX',
118             'default' => 'y',
119             'value'  => array(0 => 'n', 1 => 'y')
45f11e 120         ),
779976 121         'allow_send_as' => array (
AT 122             'datatype' => 'VARCHAR',
123             'formtype' => 'CHECKBOX',
124             'default' => 'n',
125             'value'  => array(1 => 'y', 0 => 'n')
126         ),
75722e 127         'greylisting' => array (
D 128             'datatype' => 'VARCHAR',
129             'formtype' => 'CHECKBOX',
130             'default' => 'n',
131             'value'  => array(1 => 'y', 0 => 'n')
132         ),
b1a6a5 133         //#################################
MC 134         // ENDE Datatable fields
135         //#################################
45f11e 136     )
T 137 );
138
139
140
b1a6a5 141 ?>