Marius Cramer
2014-08-13 42539643c396f9d8865dcf9a51b13dc869709d16
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).
32
33
34 */
35
7fe908 36 $form["title"]    = "Email Whitelist";
MC 37 $form["description"]  = "";
38 $form["name"]    = "mail_whitelist";
39 $form["action"]   = "mail_whitelist_edit.php";
40 $form["db_table"]  = "mail_access";
41 $form["db_table_idx"] = "access_id";
42 $form["db_history"]  = "yes";
43 $form["tab_default"] = "whitelist";
44 $form["list_default"] = "mail_whitelist_list.php";
45 $form["auth"]   = 'yes'; // yes / no
e22f1e 46
T 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"]['whitelist'] = array (
0b786c 54     'title'  => "Whitelist",
7fe908 55     'width'  => 100,
MC 56     'template'  => "templates/mail_whitelist_edit.htm",
57     'fields'  => array (
58         //#################################
59         // Begin Datatable fields
60         //#################################
e22f1e 61         'server_id' => array (
7fe908 62             'datatype' => 'INTEGER',
MC 63             'formtype' => 'SELECT',
64             'default' => '',
65             'datasource' => array (  'type' => 'SQL',
66                 'querystring' => 'SELECT server_id,server_name FROM server WHERE {AUTHSQL} ORDER BY server_name',
67                 'keyfield'=> 'server_id',
68                 'valuefield'=> 'server_name'
69             ),
70             'value'  => ''
e22f1e 71         ),
45f11e 72         'source' => array (
7fe908 73             'datatype' => 'VARCHAR',
MC 74             'formtype' => 'TEXT',
75             'default' => '',
76             'validators' => array (  0 => array ( 'type' => 'NOTEMPTY',
77                     'errmsg'=> 'source_error_notempty'),
78             ),
79             'value'  => '',
80             'width'  => '30',
81             'maxlength' => '255'
e22f1e 82         ),
45f11e 83         'access' => array (
7fe908 84             'datatype' => 'VARCHAR',
MC 85             'formtype' => 'TEXT',
86             'default' => 'OK',
87             'value'  => 'OK',
88             'width'  => '30',
89             'maxlength' => '255'
45f11e 90         ),
T 91         'type' => array (
7fe908 92             'datatype' => 'VARCHAR',
MC 93             'formtype' => 'SELECT',
94             'default' => 'y',
95             'value'  => array('recipient' => 'Recipient', 'sender' => 'Sender', 'client' => 'Client')
e22f1e 96         ),
T 97         'active' => array (
7fe908 98             'datatype' => 'VARCHAR',
MC 99             'formtype' => 'CHECKBOX',
100             'default' => 'y',
101             'value'  => array(0 => 'n', 1 => 'y')
e22f1e 102         ),
7fe908 103         //#################################
MC 104         // ENDE Datatable fields
105         //#################################
e22f1e 106     )
T 107 );
108
109
7fe908 110 ?>