Till Brehm
2014-09-30 49b3f5ec2a3c105652d451469eeb09a5ed75eba0
commit | author | age
3d229b 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).
7fe908 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
3d229b 37
T 38
39 */
40
7fe908 41 $form["title"]    = "Domain Alias";
MC 42 $form["description"]  = "";
43 $form["name"]    = "mail_aliasdomain";
44 $form["action"]   = "mail_aliasdomain_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_aliasdomain_list.php";
50 $form["auth"]   = 'yes'; // yes / no
3d229b 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 (
7fe908 59     'title'  => "Domain Alias",
MC 60     'width'  => 100,
61     'template'  => "templates/mail_aliasdomain_edit.htm",
62     'fields'  => array (
63         //#################################
64         // Begin Datatable fields
65         //#################################
3d229b 66         'server_id' => array (
7fe908 67             'datatype' => 'INTEGER',
MC 68             'formtype' => 'TEXT',
69             'default' => '',
70             'value'  => '',
71             'width'  => '30',
72             'maxlength' => '255'
3d229b 73         ),
T 74         'source' => array (
7fe908 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' => 'NOTEMPTY',
85                     'errmsg'=> 'source_error_empty'),
86                 1 => array ( 'type' => 'UNIQUE',
87                     'errmsg'=> 'source_error_unique'),
88                 2 => array ( 'type' => 'REGEX',
49b3f5 89                     'regex' => '/^\@[\w\.\-]{2,64}\.[a-zA-Z0-9\-]{2,20}$/',
7fe908 90                     'errmsg'=> 'source_error_regex'),
MC 91             ),
92             'default' => '',
93             'value'  => '',
94             'width'  => '30',
95             'maxlength' => '255',
59118c 96             'searchable' => 1
3d229b 97         ),
T 98         'destination' => array (
7fe908 99             'datatype' => 'VARCHAR',
MC 100             'formtype' => 'TEXT',
101             'filters'   => array( 0 => array( 'event' => 'SAVE',
102                     'type' => 'IDNTOASCII'),
103                 1 => array( 'event' => 'SHOW',
104                     'type' => 'IDNTOUTF8'),
105                 2 => array( 'event' => 'SAVE',
106                     'type' => 'TOLOWER')
107             ),
108             'default' => '',
109             'value'  => '',
110             'width'  => '30',
111             'maxlength' => '255',
59118c 112             'searchable' => 2
3d229b 113         ),
T 114         'type' => array (
7fe908 115             'datatype' => 'VARCHAR',
MC 116             'formtype' => 'SELECT',
117             'default' => '',
118             'value'  => array('alias' => 'Alias', 'forward'=>'Forward')
3d229b 119         ),
T 120         'active' => array (
7fe908 121             'datatype' => 'VARCHAR',
MC 122             'formtype' => 'CHECKBOX',
123             'default' => 'y',
124             'value'  => array(0 => 'n', 1 => 'y')
3d229b 125         ),
7fe908 126         //#################################
MC 127         // ENDE Datatable fields
128         //#################################
3d229b 129     )
T 130 );
131
132
133
7fe908 134 ?>