mail_user.tform.php 6.1 KB
Newer Older
tbrehm's avatar
tbrehm committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<?php

/*
	Form Definition

	Tabledefinition

	Datatypes:
	- INTEGER (Forces the input to Int)
	- DOUBLE
	- CURRENCY (Formats the values to currency notation)
	- VARCHAR (no format check, maxlength: 255)
	- TEXT (no format check)
	- DATE (Dateformat, automatic conversion to timestamps)

	Formtype:
	- TEXT (Textfield)
	- TEXTAREA (Textarea)
	- PASSWORD (Password textfield, input is not shown when edited)
	- SELECT (Select option field)
	- RADIO
	- CHECKBOX
	- CHECKBOXARRAY
	- FILE

	VALUE:
	- Wert oder Array

	Hint:
	The ID field of the database table is not part of the datafield definition.
	The ID field must be always auto incement (int or bigint).


*/

$form["title"] 			= "Mailbox";
$form["description"] 	= "";
tbrehm's avatar
tbrehm committed
38
39
40
41
$form["name"] 			= "mail_user";
$form["action"]			= "mail_user_edit.php";
$form["db_table"]		= "mail_user";
$form["db_table_idx"]	= "mailuser_id";
tbrehm's avatar
tbrehm committed
42
$form["db_history"]		= "yes";
tbrehm's avatar
tbrehm committed
43
44
$form["tab_default"]	= "mailuser";
$form["list_default"]	= "mail_user_list.php";
tbrehm's avatar
tbrehm committed
45
46
47
48
49
50
51
52
$form["auth"]			= 'yes'; // yes / no

$form["auth_preset"]["userid"]  = 0; // 0 = id of the user, > 0 id must match with id of current user
$form["auth_preset"]["groupid"] = 0; // 0 = default groupid of the user, > 0 id must match with groupid of current user
$form["auth_preset"]["perm_user"] = 'riud'; //r = read, i = insert, u = update, d = delete
$form["auth_preset"]["perm_group"] = 'riud'; //r = read, i = insert, u = update, d = delete
$form["auth_preset"]["perm_other"] = ''; //r = read, i = insert, u = update, d = delete

tbrehm's avatar
tbrehm committed
53
$form["tabs"]['mailuser'] = array (
tbrehm's avatar
tbrehm committed
54
55
	'title' 	=> "Mailbox",
	'width' 	=> 100,
tbrehm's avatar
tbrehm committed
56
	'template' 	=> "templates/mail_user_mailbox_edit.htm",
tbrehm's avatar
tbrehm committed
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
	'fields' 	=> array (
	##################################
	# Begin Datatable fields
	##################################
		'server_id' => array (
			'datatype'	=> 'INTEGER',
			'formtype'	=> 'TEXT',
			'default'	=> '',
			'value'		=> '',
			'width'		=> '30',
			'maxlength'	=> '255'
		),
		'email' => array (
			'datatype'	=> 'VARCHAR',
			'formtype'	=> 'TEXT',
			'validators'	=> array ( 	0 => array (	'type'	=> 'ISEMAIL',
														'errmsg'=> 'email_error_isemail'),
										1 => array (	'type'	=> 'UNIQUE',
														'errmsg'=> 'email_error_unique'),
									),
			'default'	=> '',
			'value'		=> '',
			'width'		=> '30',
			'maxlength'	=> '255'
		),
tbrehm's avatar
tbrehm committed
82
		'password' => array (
tbrehm's avatar
tbrehm committed
83
84
85
86
87
88
89
90
91
92
93
94
95
			'datatype'	=> 'VARCHAR',
			'formtype'	=> 'PASSWORD',
			'encryption'=> 'CRYPT',
			'default'	=> '',
			'value'		=> '',
			'width'		=> '30',
			'maxlength'	=> '255'
		),
		'quota' => array (
			'datatype'	=> 'INTEGER',
			'formtype'	=> 'TEXT',
			'validators'	=> array ( 	0 => array (	'type'	=> 'ISINT',
														'errmsg'=> 'quota_error_isint'),
96
										1 => array (	'type'	=> 'REGEX',
tbrehm's avatar
tbrehm committed
97
														'regex' => '/^([0-9]*)$/',
98
														'errmsg'=> 'quota_error_value'),
tbrehm's avatar
tbrehm committed
99
									),
tbrehm's avatar
tbrehm committed
100
			'default'	=> '-1',
tbrehm's avatar
tbrehm committed
101
102
103
104
105
106
107
108
109
110
111
112
			'value'		=> '',
			'width'		=> '30',
			'maxlength'	=> '255'
		),
		'maildir' => array (
			'datatype'	=> 'VARCHAR',
			'formtype'	=> 'TEXT',
			'default'	=> '',
			'value'		=> '',
			'width'		=> '30',
			'maxlength'	=> '255'
		),
tbrehm's avatar
tbrehm committed
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
		'homedir' => array (
			'datatype'	=> 'VARCHAR',
			'formtype'	=> 'TEXT',
			'default'	=> '',
			'value'		=> '',
			'width'		=> '30',
			'maxlength'	=> '255'
		),
		'uid' => array (
			'datatype'	=> 'INTEGER',
			'formtype'	=> 'TEXT',
			'default'	=> '',
			'value'		=> '',
			'width'		=> '10',
			'maxlength'	=> '10'
		),
		'gid' => array (
			'datatype'	=> 'INTEGER',
			'formtype'	=> 'TEXT',
			'default'	=> '',
			'value'		=> '',
			'width'		=> '10',
			'maxlength'	=> '10'
		),
		'postfix' => array (
tbrehm's avatar
tbrehm committed
138
			'datatype'	=> 'VARCHAR',
tbrehm's avatar
tbrehm committed
139
			'formtype'	=> 'CHECKBOX',
tbrehm's avatar
tbrehm committed
140
141
			'default'	=> 'y',
			'value'		=> array(1 => 'y',0 => 'n')
tbrehm's avatar
tbrehm committed
142
		),
143
		/*
tbrehm's avatar
tbrehm committed
144
		'access' => array (
tbrehm's avatar
tbrehm committed
145
			'datatype'	=> 'VARCHAR',
tbrehm's avatar
tbrehm committed
146
			'formtype'	=> 'CHECKBOX',
tbrehm's avatar
tbrehm committed
147
			'default'	=> 'y',
tbrehm's avatar
tbrehm committed
148
			'value'		=> array(1 => 'y',0 => 'n')
tbrehm's avatar
tbrehm committed
149
		),
150
151
152
153
154
155
156
157
158
159
160
161
162
		*/
		'disableimap' => array (
			'datatype'	=> 'VARCHAR',
			'formtype'	=> 'CHECKBOX',
			'default'	=> '0',
			'value'		=> array(1 => '1',0 => '0')
		),
		'disablepop3' => array (
			'datatype'	=> 'VARCHAR',
			'formtype'	=> 'CHECKBOX',
			'default'	=> 'y',
			'value'		=> array(1 => '1',0 => '0')
		),
tbrehm's avatar
tbrehm committed
163
164
165
166
167
168
169
170
171
	##################################
	# ENDE Datatable fields
	##################################
	)
);

$form["tabs"]['autoresponder'] = array (
	'title' 	=> "Autoresponder",
	'width' 	=> 100,
tbrehm's avatar
tbrehm committed
172
	'template' 	=> "templates/mail_user_autoresponder_edit.htm",
tbrehm's avatar
tbrehm committed
173
174
175
176
177
178
179
180
181
182
183
184
185
	'fields' 	=> array (
	##################################
	# Begin Datatable fields
	##################################
		'autoresponder_text' => array (
			'datatype'	=> 'TEXT',
			'formtype'	=> 'TEXTAREA',
			'default'	=> '',
			'value'		=> '',
			'cols'		=> '30',
			'rows'		=> '15'
		),
		'autoresponder' => array (
186
			'datatype'	=> 'VARCHAR',
tbrehm's avatar
tbrehm committed
187
			'formtype'	=> 'CHECKBOX',
188
189
			'default'	=> 'n',
			'value'		=> array(1 => 'y',0 => 'n')
tbrehm's avatar
tbrehm committed
190
191
192
193
194
195
196
		),
	##################################
	# ENDE Datatable fields
	##################################
	)
);

197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
$form["tabs"]['filter_records'] = array (
	'title' 	=> "Mail Filter",
	'width' 	=> 100,
	'template' 	=> "templates/mail_user_mailfilter_edit.htm",
	'fields' 	=> array (
	##################################
	# Begin Datatable fields
	##################################
		
	##################################
	# ENDE Datatable fields
	##################################
	),
	'plugins' => array (
     	'filter_records' => array (
         	'class'   => 'plugin_listview',
     		'options' => array(
				'listdef' => 'list/mail_user_filter.list.php',
				'sqlextwhere' => "mailuser_id = ".@intval(@$_REQUEST['id']),
				'sql_order_by' => "ORDER BY rulename"
			)
        )
	)
);

222
223
224
if($_SESSION["s"]["user"]["typ"] == 'admin') {

$form["tabs"]['mailfilter'] = array (
225
	'title' 	=> "Custom Rules",
226
	'width' 	=> 100,
227
	'template' 	=> "templates/mail_user_custom_rules_edit.htm",
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
	'fields' 	=> array (
	##################################
	# Begin Datatable fields
	##################################
		'custom_mailfilter' => array (
			'datatype'	=> 'TEXT',
			'formtype'	=> 'TEXTAREA',
			'default'	=> '',
			'value'		=> '',
			'cols'		=> '30',
			'rows'		=> '15'
		),
	##################################
	# ENDE Datatable fields
	##################################
	)
);

}

tbrehm's avatar
tbrehm committed
248

tbrehm's avatar
tbrehm committed
249
?>