Marius Cramer
2015-08-06 37b29231e47a0c4458dc1c15d98588f16f07e1e2
commit | author | age
429dcf 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
b1a6a5 36 $form["title"]    = "Email relay recipient";
MC 37 $form["description"]  = "";
38 $form["name"]    = "mail_relay_recipient";
39 $form["action"]   = "mail_relay_recipient_edit.php";
40 $form["db_table"]  = "mail_relay_recipient";
41 $form["db_table_idx"] = "relay_recipient_id";
42 $form["db_history"]  = "yes";
43 $form["tab_default"] = "relay_recipient";
44 $form["list_default"] = "mail_relay_recipient_list.php";
45 $form["auth"]   = 'yes'; // yes / no
429dcf 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"]['relay_recipient'] = array (
b1a6a5 54     'title'  => "Relay recipient",
MC 55     'width'  => 100,
56     'template'  => "templates/mail_relay_recipient_edit.htm",
57     'fields'  => array (
58         //#################################
59         // Begin Datatable fields
60         //#################################
429dcf 61         'server_id' => array (
b1a6a5 62             'datatype' => 'INTEGER',
MC 63             'formtype' => 'SELECT',
64             'default' => '',
65             'datasource' => array (  'type' => 'SQL',
02e7ea 66                 'querystring' => 'SELECT server_id,server_name FROM server WHERE mail_server = 1 AND mirror_server_id = 0 AND {AUTHSQL} ORDER BY server_name',
b1a6a5 67                 'keyfield'=> 'server_id',
MC 68                 'valuefield'=> 'server_name'
69             ),
70             'value'  => ''
429dcf 71         ),
T 72         'source' => array (
b1a6a5 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'
429dcf 82         ),
T 83         'access' => array (
b1a6a5 84             'datatype' => 'VARCHAR',
MC 85             'formtype' => 'TEXT',
86             'default' => 'OK',
87             'value'  => 'OK',
88             'width'  => '30',
89             'maxlength' => '255'
429dcf 90         ),
T 91         'active' => array (
b1a6a5 92             'datatype' => 'VARCHAR',
MC 93             'formtype' => 'CHECKBOX',
94             'default' => 'y',
95             'value'  => array(0 => 'n', 1 => 'y')
429dcf 96         ),
b1a6a5 97         //#################################
MC 98         // ENDE Datatable fields
99         //#################################
429dcf 100     )
T 101 );
102
103
b1a6a5 104 ?>