reseller.tform.php 32.4 KB
Newer Older
latham's avatar
latham 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
<?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).
32

33
34
35
36
	Search:
	- searchable = 1 or searchable = 2 include the field in the search
	- searchable = 1: this field will be the title of the search result
	- searchable = 2: this field will be included in the description of the search result
latham's avatar
latham committed
37
38
39
40


*/

41
42
43
44
45
46
47
48
49
50
$form["title"]    = "Reseller";
$form["description"]  = "";
$form["name"]    = "reseller";
$form["action"]   = "reseller_edit.php";
$form["db_table"]  = "client";
$form["db_table_idx"] = "client_id";
$form["db_history"]  = "yes";
$form["tab_default"] = "address";
$form["list_default"] = "reseller_list.php";
$form["auth"]   = 'yes';
latham's avatar
latham committed
51
52
53
54
55
56
57

$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

58
59
60
//* Load themes
$themes_list = array();
$handle = @opendir(ISPC_THEMES_PATH);
61
62
63
while ($file = @readdir($handle)) {
	if (substr($file, 0, 1) != '.') {
		if(@is_dir(ISPC_THEMES_PATH."/$file")) {
64
			if(!file_exists(ISPC_THEMES_PATH."/$file/ispconfig_version") || (@file_exists(ISPC_THEMES_PATH."/$file/ispconfig_version") && trim(@file_get_contents(ISPC_THEMES_PATH."/$file/ispconfig_version")) == ISPC_APP_VERSION)) {
65
66
67
68
				$themes_list[$file] = $file;
			}
		}
	}
69
70
}

latham's avatar
latham committed
71
72
73
//* Languages
$language_list = array();
$handle = @opendir(ISPC_ROOT_PATH.'/lib/lang');
74
75
76
while ($file = @readdir($handle)) {
	if ($file != '.' && $file != '..') {
		if(@is_file(ISPC_ROOT_PATH.'/lib/lang/'.$file) and substr($file, -4, 4) == '.lng') {
latham's avatar
latham committed
77
78
			$tmp = substr($file, 0, 2);
			$language_list[$tmp] = $tmp;
79
		}
latham's avatar
latham committed
80
81
82
83
	}
}

$form["tabs"]['address'] = array (
84
85
86
87
88
89
90
	'title'  => "Address",
	'width'  => 100,
	'template'  => "templates/reseller_edit_address.htm",
	'fields'  => array (
		//#################################
		// Begin Datatable fields
		//#################################
latham's avatar
latham committed
91
		'company_name' => array (
92
93
94
95
96
97
98
99
100
			'datatype' => 'VARCHAR',
			'formtype' => 'TEXT',
			'default' => '',
			'value'  => '',
			'separator' => '',
			'width'  => '30',
			'maxlength' => '255',
			'rows'  => '',
			'cols'  => '',
101
			'searchable' => 2
latham's avatar
latham committed
102
		),
103
		'gender' => array (
104
105
106
107
			'datatype' => 'VARCHAR',
			'formtype' => 'SELECT',
			'default' => '',
			'value'  => array('' => '', 'm' => 'gender_m_txt', 'f' => 'gender_f_txt')
108
		),
109
110
111
112
113
114
115
116
117
118
119
120
		'contact_firstname' => array (
			'datatype' => 'VARCHAR',
			'formtype' => 'TEXT',
			'default' => '',
			'value'  => '',
			'separator' => '',
			'width'  => '30',
			'maxlength' => '255',
			'rows'  => '',
			'cols'  => '',
			'searchable' => 1
		),
latham's avatar
latham committed
121
		'contact_name' => array (
122
123
124
125
126
127
128
129
130
131
132
133
			'datatype' => 'VARCHAR',
			'formtype' => 'TEXT',
			'validators' => array (  0 => array ( 'type' => 'NOTEMPTY',
					'errmsg'=> 'contact_error_empty'),
			),
			'default' => '',
			'value'  => '',
			'separator' => '',
			'width'  => '30',
			'maxlength' => '255',
			'rows'  => '',
			'cols'  => '',
134
			'searchable' => 1
latham's avatar
latham committed
135
136
		),
		'customer_no' => array (
137
138
139
140
141
142
143
144
145
146
147
148
149
			'datatype' => 'VARCHAR',
			'formtype' => 'TEXT',
			'validators' => array (  0 => array ( 'type' => 'UNIQUE',
					'errmsg'=> 'customer_no_error_unique',
					'allowempty' => 'y'),
			),
			'default' => '',
			'value'  => '',
			'separator' => '',
			'width'  => '30',
			'maxlength' => '255',
			'rows'  => '',
			'cols'  => '',
150
			'searchable' => 2
latham's avatar
latham committed
151
152
		),
		'username' => array (
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
			'datatype' => 'VARCHAR',
			'formtype' => 'TEXT',
			'validators' => array (  0 => array ( 'type' => 'NOTEMPTY',
					'errmsg'=> 'username_error_empty'),
				1 => array ( 'type' => 'CUSTOM',
					'class' => 'validate_client',
					'function' => 'username_unique',
					'errmsg'=> 'username_error_unique'),
				2 => array ( 'type' => 'CUSTOM',
					'class' => 'validate_client',
					'function' => 'username_collision',
					'errmsg'=> 'username_error_collision'),
				3 => array ( 'type' => 'REGEX',
					'regex' => '/^[\w\.\-\_]{0,64}$/',
					'errmsg'=> 'username_error_regex'),
			),
			'default' => '',
			'value'  => '',
			'separator' => '',
			'width'  => '30',
			'maxlength' => '255',
			'rows'  => '',
			'cols'  => '',
176
			'searchable' => 2
latham's avatar
latham committed
177
178
		),
		'password' => array (
179
180
			'datatype' => 'VARCHAR',
			'formtype' => 'PASSWORD',
181
182
183
184
185
186
187
188
			'validators' => array(
				0 => array(
					'type' => 'CUSTOM',
					'class' => 'validate_password',
					'function' => 'password_check',
					'errmsg' => 'weak_password_txt'
				)
			),
latham's avatar
latham committed
189
			'encryption'=> 'CRYPT',
190
191
192
193
194
195
196
			'default' => '',
			'value'  => '',
			'separator' => '',
			'width'  => '30',
			'maxlength' => '255',
			'rows'  => '',
			'cols'  => ''
latham's avatar
latham committed
197
198
		),
		'language' => array (
199
200
201
202
203
204
205
206
207
			'datatype' => 'VARCHAR',
			'formtype' => 'SELECT',
			'default' => $conf["language"],
			'value'  => $language_list,
			'separator' => '',
			'width'  => '30',
			'maxlength' => '255',
			'rows'  => '',
			'cols'  => ''
latham's avatar
latham committed
208
209
		),
		'usertheme' => array (
210
211
212
213
214
215
216
217
218
			'datatype' => 'VARCHAR',
			'formtype' => 'SELECT',
			'default' => $conf["theme"],
			'value'  => $themes_list,
			'separator' => '',
			'width'  => '30',
			'maxlength' => '255',
			'rows'  => '',
			'cols'  => ''
latham's avatar
latham committed
219
220
		),
		'street' => array (
221
222
223
224
225
226
227
228
229
			'datatype' => 'VARCHAR',
			'formtype' => 'TEXT',
			'default' => '',
			'value'  => '',
			'separator' => '',
			'width'  => '30',
			'maxlength' => '255',
			'rows'  => '',
			'cols'  => '',
230
			'searchable' => 2
latham's avatar
latham committed
231
232
		),
		'zip' => array (
233
234
235
236
237
238
239
240
241
			'datatype' => 'VARCHAR',
			'formtype' => 'TEXT',
			'default' => '',
			'value'  => '',
			'separator' => '',
			'width'  => '10',
			'maxlength' => '255',
			'rows'  => '',
			'cols'  => '',
242
			'searchable' => 2
latham's avatar
latham committed
243
244
		),
		'city' => array (
245
246
247
248
249
250
251
252
253
			'datatype' => 'VARCHAR',
			'formtype' => 'TEXT',
			'default' => '',
			'value'  => '',
			'separator' => '',
			'width'  => '30',
			'maxlength' => '255',
			'rows'  => '',
			'cols'  => '',
254
			'searchable' => 2
latham's avatar
latham committed
255
256
		),
		'state' => array (
257
258
259
260
261
262
263
264
265
			'datatype' => 'VARCHAR',
			'formtype' => 'TEXT',
			'default' => '',
			'value'  => '',
			'separator' => '',
			'width'  => '30',
			'maxlength' => '255',
			'rows'  => '',
			'cols'  => '',
266
			'searchable' => 2
latham's avatar
latham committed
267
268
		),
		'country' => array (
269
			'datatype' => 'VARCHAR',
latham's avatar
latham committed
270

271
272
273
274
275
276
277
278
			'formtype' => 'SELECT',
			'default' => (isset($conf['language']) ? strtoupper($conf['language']) : ''),
			'datasource' => array (  'type' => 'SQL',
				'querystring' => 'SELECT iso,printable_name FROM country ORDER BY printable_name',
				'keyfield'=> 'iso',
				'valuefield'=> 'printable_name'
			),
			'value'  => ''
latham's avatar
latham committed
279
280
		),
		'telephone' => array (
281
282
283
284
285
286
287
288
289
			'datatype' => 'VARCHAR',
			'formtype' => 'TEXT',
			'default' => '',
			'value'  => '',
			'separator' => '',
			'width'  => '30',
			'maxlength' => '255',
			'rows'  => '',
			'cols'  => '',
290
			'searchable' => 2
latham's avatar
latham committed
291
292
		),
		'mobile' => array (
293
294
295
296
297
298
299
300
301
			'datatype' => 'VARCHAR',
			'formtype' => 'TEXT',
			'default' => '',
			'value'  => '',
			'separator' => '',
			'width'  => '30',
			'maxlength' => '255',
			'rows'  => '',
			'cols'  => '',
302
			'searchable' => 2
latham's avatar
latham committed
303
304
		),
		'fax' => array (
305
306
307
308
309
310
311
312
313
			'datatype' => 'VARCHAR',
			'formtype' => 'TEXT',
			'default' => '',
			'value'  => '',
			'separator' => '',
			'width'  => '30',
			'maxlength' => '255',
			'rows'  => '',
			'cols'  => '',
314
			'searchable' => 2
latham's avatar
latham committed
315
316
		),
		'email' => array (
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
			'datatype' => 'VARCHAR',
			'formtype' => 'TEXT',
			'filters'   => array( 0 => array( 'event' => 'SAVE',
					'type' => 'IDNTOASCII'),
				1 => array( 'event' => 'SHOW',
					'type' => 'IDNTOUTF8'),
				2 => array( 'event' => 'SAVE',
					'type' => 'TOLOWER')
			),
			'default' => '',
			'value'  => '',
			'separator' => '',
			'width'  => '30',
			'maxlength' => '255',
			'rows'  => '',
			'cols'  => '',
333
			'searchable' => 2
latham's avatar
latham committed
334
335
		),
		'internet' => array (
336
337
338
339
340
341
342
343
344
			'datatype' => 'VARCHAR',
			'formtype' => 'TEXT',
			'default' => 'http://',
			'value'  => '',
			'separator' => '',
			'width'  => '30',
			'maxlength' => '255',
			'rows'  => '',
			'cols'  => '',
345
			'searchable' => 2
latham's avatar
latham committed
346
347
		),
		'icq' => array (
348
349
350
351
352
353
354
355
356
			'datatype' => 'VARCHAR',
			'formtype' => 'TEXT',
			'default' => '',
			'value'  => '',
			'separator' => '',
			'width'  => '30',
			'maxlength' => '255',
			'rows'  => '',
			'cols'  => ''
latham's avatar
latham committed
357
358
		),
		'vat_id' => array (
359
360
361
362
363
364
365
366
367
			'datatype' => 'VARCHAR',
			'formtype' => 'TEXT',
			'default' => '',
			'value'  => '',
			'separator' => '',
			'width'  => '30',
			'maxlength' => '255',
			'rows'  => '',
			'cols'  => ''
latham's avatar
latham committed
368
		),
369
		'company_id' => array (
370
371
372
373
374
375
376
377
378
			'datatype' => 'VARCHAR',
			'formtype' => 'TEXT',
			'default' => '',
			'value'  => '',
			'separator' => '',
			'width'  => '30',
			'maxlength' => '20',
			'rows'  => '',
			'cols'  => ''
379
380
		),
		'bank_account_owner' => array (
381
382
383
384
385
386
387
388
389
			'datatype' => 'VARCHAR',
			'formtype' => 'TEXT',
			'default' => '',
			'value'  => '',
			'separator' => '',
			'width'  => '30',
			'maxlength' => '255',
			'rows'  => '',
			'cols'  => ''
390
391
		),
		'bank_account_number' => array (
392
393
394
395
396
397
398
399
400
			'datatype' => 'VARCHAR',
			'formtype' => 'TEXT',
			'default' => '',
			'value'  => '',
			'separator' => '',
			'width'  => '30',
			'maxlength' => '255',
			'rows'  => '',
			'cols'  => ''
401
402
		),
		'bank_code' => array (
403
404
405
406
407
408
409
410
411
			'datatype' => 'VARCHAR',
			'formtype' => 'TEXT',
			'default' => '',
			'value'  => '',
			'separator' => '',
			'width'  => '30',
			'maxlength' => '255',
			'rows'  => '',
			'cols'  => ''
412
413
		),
		'bank_name' => array (
414
415
416
417
418
419
420
421
422
			'datatype' => 'VARCHAR',
			'formtype' => 'TEXT',
			'default' => '',
			'value'  => '',
			'separator' => '',
			'width'  => '30',
			'maxlength' => '255',
			'rows'  => '',
			'cols'  => ''
423
424
		),
		'bank_account_iban' => array (
425
426
427
428
429
430
431
432
433
			'datatype' => 'VARCHAR',
			'formtype' => 'TEXT',
			'default' => '',
			'value'  => '',
			'separator' => '',
			'width'  => '30',
			'maxlength' => '255',
			'rows'  => '',
			'cols'  => ''
434
435
		),
		'bank_account_swift' => array (
436
437
438
439
440
441
442
443
444
			'datatype' => 'VARCHAR',
			'formtype' => 'TEXT',
			'default' => '',
			'value'  => '',
			'separator' => '',
			'width'  => '30',
			'maxlength' => '255',
			'rows'  => '',
			'cols'  => ''
445
		),
latham's avatar
latham committed
446
		'notes' => array (
447
448
449
450
451
452
453
454
455
			'datatype' => 'TEXT',
			'formtype' => 'TEXTAREA',
			'default' => '',
			'value'  => '',
			'separator' => '',
			'width'  => '',
			'maxlength' => '',
			'rows'  => '10',
			'cols'  => '30'
latham's avatar
latham committed
456
		),
457
		'paypal_email' => array (
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
			'datatype' => 'VARCHAR',
			'formtype' => 'TEXT',
			'filters'   => array( 0 => array( 'event' => 'SAVE',
					'type' => 'IDNTOASCII'),
				1 => array( 'event' => 'SHOW',
					'type' => 'IDNTOUTF8'),
				2 => array( 'event' => 'SAVE',
					'type' => 'TOLOWER')
			),
			'validators' => array (  0 => array ( 'type' => 'REGEX',
					'regex' => '/^(\w+[\w\.\-\+]*\w{0,}@\w+[\w.-]*\.[a-z\-]{2,10}){0,1}$/i',
					'errmsg'=> 'paypal_email_error_isemail'),
			),
			'default' => '',
			'value'  => '',
			'separator' => '',
			'width'  => '30',
			'maxlength' => '255',
			'rows'  => '',
			'cols'  => '',
478
479
			'searchable' => 2
		),
480
		'locked' => array (
481
482
483
484
			'datatype' => 'VARCHAR',
			'formtype' => 'CHECKBOX',
			'default' => 'n',
			'value'  => array(0 => 'n', 1 => 'y')
485
486
		),
		'canceled' => array (
487
488
489
490
491
			'datatype' => 'VARCHAR',
			'formtype' => 'CHECKBOX',
			'default' => 'n',
			'value'  => array(0 => 'n', 1 => 'y')
		),
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
		'added_date' => array (
			'datatype'	=> 'DATE',
			'formtype'	=> 'TEXT',
			'default'	=> date($app->lng('conf_format_dateshort')),
			'value'		=> '',
			'separator'	=> '',
			'width'		=> '15',
			'maxlength'	=> '15',
			'rows'		=> '',
			'cols'		=> ''
		),
		'added_by' => array (
			'datatype' => 'VARCHAR',
			'formtype' => 'TEXT',
			'default' => $_SESSION['s']['user']['username'],
			'value'  => '',
			'separator' => '',
			'width'  => '30',
			'maxlength' => '255',
			'rows'  => '',
			'cols'  => ''
		),
514
515
516
		//#################################
		// END Datatable fields
		//#################################
latham's avatar
latham committed
517
518
519
520
	)
);

$form["tabs"]['limits'] = array (
521
522
523
524
525
526
527
	'title'  => "Limits",
	'width'  => 80,
	'template'  => "templates/reseller_edit_limits.htm",
	'fields'  => array (
		//#################################
		// Begin Datatable fields
		//#################################
latham's avatar
latham committed
528
		'template_master' => array (
529
530
531
532
533
534
535
536
			'datatype' => 'INTEGER',
			'formtype' => 'SELECT',
			'default' => '1',
			'datasource' => array (  'type' => 'CUSTOM',
				'class'=> 'custom_datasource',
				'function'=> 'master_templates'
			),
			'value'  => ''
latham's avatar
latham committed
537
538
		),
		'template_additional' => array (
539
540
			'datatype' => 'VARCHAR',
			'formtype' => 'TEXT',
latham's avatar
latham committed
541
542
		),
		'default_mailserver' => array (
543
544
545
546
547
548
549
550
551
			'datatype' => 'INTEGER',
			'formtype' => 'SELECT',
			'default' => '1',
			'datasource' => array (  'type' => 'SQL',
				'querystring' => 'SELECT server_id,server_name FROM server WHERE mail_server = 1 AND {AUTHSQL} ORDER BY server_name',
				'keyfield'=> 'server_id',
				'valuefield'=> 'server_name'
			),
			'value'  => ''
latham's avatar
latham committed
552
		),
553
		'mail_servers' => array (
554
555
556
557
558
559
560
561
			'datatype' => 'INTEGER',
			'formtype' => 'MULTIPLE',
			'default' => '1',
			'datasource' => array (  'type' => 'SQL',
				'querystring' => 'SELECT server_id,server_name FROM server WHERE mail_server = 1 AND {AUTHSQL} ORDER BY server_name',
				'keyfield'=> 'server_id',
				'valuefield'=> 'server_name'
			),
562
			'validators'    => array (  0 => array (    'type'  => 'NOTEMPTY',
563
564
565
566
567
568
569
					'errmsg'=> 'no_mail_server_error'),
				1 => array ( 'type' => 'CUSTOM',
					'class' => 'validate_client',
					'function' => 'check_used_servers',
					'errmsg'=> 'mail_servers_used'),
			),
			'value'  => ''
570
		),
latham's avatar
latham committed
571
		'limit_maildomain' => array (
572
573
574
575
576
577
578
579
580
581
582
583
			'datatype' => 'INTEGER',
			'formtype' => 'TEXT',
			'validators' => array (  0 => array ( 'type' => 'ISINT',
					'errmsg'=> 'limit_maildomain_error_notint'),
			),
			'default' => '-1',
			'value'  => '',
			'separator' => '',
			'width'  => '10',
			'maxlength' => '10',
			'rows'  => '',
			'cols'  => ''
latham's avatar
latham committed
584
585
		),
		'limit_mailmailinglist' => array (
586
587
588
589
590
591
592
593
594
595
596
597
			'datatype' => 'INTEGER',
			'formtype' => 'TEXT',
			'validators' => array (  0 => array ( 'type' => 'ISINT',
					'errmsg'=> 'limit_mailmailinglist_error_notint'),
			),
			'default' => '-1',
			'value'  => '',
			'separator' => '',
			'width'  => '10',
			'maxlength' => '10',
			'rows'  => '',
			'cols'  => ''
latham's avatar
latham committed
598
599
		),
		'limit_mailbox' => array (
600
601
602
603
604
605
606
607
608
609
610
611
			'datatype' => 'INTEGER',
			'formtype' => 'TEXT',
			'validators' => array (  0 => array ( 'type' => 'ISINT',
					'errmsg'=> 'limit_mailbox_error_notint'),
			),
			'default' => '-1',
			'value'  => '',
			'separator' => '',
			'width'  => '10',
			'maxlength' => '10',
			'rows'  => '',
			'cols'  => ''
latham's avatar
latham committed
612
613
		),
		'limit_mailalias' => array (
614
615
616
617
618
619
620
621
622
623
624
625
			'datatype' => 'INTEGER',
			'formtype' => 'TEXT',
			'validators' => array (  0 => array ( 'type' => 'ISINT',
					'errmsg'=> 'limit_mailalias_error_notint'),
			),
			'default' => '-1',
			'value'  => '',
			'separator' => '',
			'width'  => '10',
			'maxlength' => '10',
			'rows'  => '',
			'cols'  => ''
latham's avatar
latham committed
626
		),
627
		'limit_mailaliasdomain' => array (
628
629
630
631
632
633
634
635
636
637
638
639
			'datatype' => 'INTEGER',
			'formtype' => 'TEXT',
			'validators' => array (  0 => array ( 'type' => 'ISINT',
					'errmsg'=> 'limit_mailaliasdomain_error_notint'),
			),
			'default' => '-1',
			'value'  => '',
			'separator' => '',
			'width'  => '10',
			'maxlength' => '10',
			'rows'  => '',
			'cols'  => ''
640
		),
latham's avatar
latham committed
641
		'limit_mailforward' => array (
642
643
644
645
646
647
648
649
650
651
652
653
			'datatype' => 'INTEGER',
			'formtype' => 'TEXT',
			'validators' => array (  0 => array ( 'type' => 'ISINT',
					'errmsg'=> 'limit_mailforward_error_notint'),
			),
			'default' => '-1',
			'value'  => '',
			'separator' => '',
			'width'  => '10',
			'maxlength' => '10',
			'rows'  => '',
			'cols'  => ''
latham's avatar
latham committed
654
655
		),
		'limit_mailcatchall' => array (
656
657
658
659
660
661
662
663
664
665
666
667
			'datatype' => 'INTEGER',
			'formtype' => 'TEXT',
			'validators' => array (  0 => array ( 'type' => 'ISINT',
					'errmsg'=> 'limit_mailcatchall_error_notint'),
			),
			'default' => '-1',
			'value'  => '',
			'separator' => '',
			'width'  => '10',
			'maxlength' => '10',
			'rows'  => '',
			'cols'  => ''
latham's avatar
latham committed
668
669
		),
		'limit_mailrouting' => array (
670
671
672
673
674
675
676
677
678
679
680
681
			'datatype' => 'INTEGER',
			'formtype' => 'TEXT',
			'validators' => array (  0 => array ( 'type' => 'ISINT',
					'errmsg'=> 'limit_mailrouting_error_notint'),
			),
			'default' => '0',
			'value'  => '',
			'separator' => '',
			'width'  => '10',
			'maxlength' => '10',
			'rows'  => '',
			'cols'  => ''
latham's avatar
latham committed
682
683
		),
		'limit_mailfilter' => array (
684
685
686
687
688
689
690
691
692
693
694
695
			'datatype' => 'INTEGER',
			'formtype' => 'TEXT',
			'validators' => array (  0 => array ( 'type' => 'ISINT',
					'errmsg'=> 'limit_mailfilter_error_notint'),
			),
			'default' => '-1',
			'value'  => '',
			'separator' => '',
			'width'  => '10',
			'maxlength' => '10',
			'rows'  => '',
			'cols'  => ''
latham's avatar
latham committed
696
697
		),
		'limit_fetchmail' => array (
698
699
700
701
702
703
704
705
706
707
708
709
			'datatype' => 'INTEGER',
			'formtype' => 'TEXT',
			'validators' => array (  0 => array ( 'type' => 'ISINT',
					'errmsg'=> 'limit_mailfetchmail_error_notint'),
			),
			'default' => '-1',
			'value'  => '',
			'separator' => '',
			'width'  => '10',
			'maxlength' => '10',
			'rows'  => '',
			'cols'  => ''
latham's avatar
latham committed
710
711
		),
		'limit_mailquota' => array (
712
713
714
715
716
717
718
719
720
721
722
723
			'datatype' => 'INTEGER',
			'formtype' => 'TEXT',
			'validators' => array (  0 => array ( 'type' => 'ISINT',
					'errmsg'=> 'limit_mailquota_error_notint'),
			),
			'default' => '-1',
			'value'  => '',
			'separator' => '',
			'width'  => '10',
			'maxlength' => '10',
			'rows'  => '',
			'cols'  => ''
latham's avatar
latham committed
724
725
		),
		'limit_spamfilter_wblist' => array (
726
727
728
729
730
731
732
733
734
735
736
737
			'datatype' => 'INTEGER',
			'formtype' => 'TEXT',
			'validators' => array (  0 => array ( 'type' => 'ISINT',
					'errmsg'=> 'limit_spamfilter_wblist_error_notint'),
			),
			'default' => '-1',
			'value'  => '',
			'separator' => '',
			'width'  => '10',
			'maxlength' => '10',
			'rows'  => '',
			'cols'  => ''
latham's avatar
latham committed
738
739
		),
		'limit_spamfilter_user' => array (
740
741
742
743
744
745
746
747
748
749
750
751
			'datatype' => 'INTEGER',
			'formtype' => 'TEXT',
			'validators' => array (  0 => array ( 'type' => 'ISINT',
					'errmsg'=> 'limit_spamfilter_user_error_notint'),
			),
			'default' => '-1',
			'value'  => '',
			'separator' => '',
			'width'  => '10',
			'maxlength' => '10',
			'rows'  => '',
			'cols'  => ''
latham's avatar
latham committed
752
753
		),
		'limit_spamfilter_policy' => array (
754
755
756
757
758
759
760
761
762
763
764
765
			'datatype' => 'INTEGER',
			'formtype' => 'TEXT',
			'validators' => array (  0 => array ( 'type' => 'ISINT',
					'errmsg'=> 'limit_spamfilter_policy_error_notint'),
			),
			'default' => '-1',
			'value'  => '',
			'separator' => '',
			'width'  => '10',
			'maxlength' => '10',
			'rows'  => '',
			'cols'  => ''
latham's avatar
latham committed
766
767
		),
		'default_webserver' => array (
768
769
770
771
772
773
774
775
776
			'datatype' => 'INTEGER',
			'formtype' => 'SELECT',
			'default' => '1',
			'datasource' => array (  'type' => 'SQL',
				'querystring' => 'SELECT server_id,server_name FROM server WHERE web_server = 1 AND {AUTHSQL} ORDER BY server_name',
				'keyfield'=> 'server_id',
				'valuefield'=> 'server_name'
			),
			'value'  => ''
latham's avatar
latham committed
777
		),
778
		'web_servers' => array (
779
780
			'datatype' => 'VARCHAR',
			'formtype' => 'MULTIPLE',
781
			'separator' => ',',
782
783
784
785
786
787
			'default' => '1',
			'datasource' => array (  'type' => 'SQL',
				'querystring' => 'SELECT server_id,server_name FROM server WHERE web_server = 1 AND {AUTHSQL} ORDER BY server_name',
				'keyfield'=> 'server_id',
				'valuefield'=> 'server_name'
			),
788
			'validators'    => array (  0 => array (    'type'  => 'NOTEMPTY',
789
790
791
792
793
794
795
					'errmsg'=> 'no_web_server_error'),
				1 => array ( 'type' => 'CUSTOM',
					'class' => 'validate_client',
					'function' => 'check_used_servers',
					'errmsg'=> 'web_servers_used'),
			),
			'value'  => ''
796
		),
latham's avatar
latham committed
797
		'limit_web_domain' => array (
798
799
800
801
802
803
804
805
806
807
808
809
			'datatype' => 'INTEGER',
			'formtype' => 'TEXT',
			'validators' => array (  0 => array ( 'type' => 'ISINT',
					'errmsg'=> 'limit_web_domain_error_notint'),
			),
			'default' => '-1',
			'value'  => '',
			'separator' => '',
			'width'  => '10',
			'maxlength' => '10',
			'rows'  => '',
			'cols'  => ''
latham's avatar
latham committed
810
811
		),
		'limit_web_quota' => array (
812
813
814
815
816
817
818
819
820
821
822
823
			'datatype' => 'INTEGER',
			'formtype' => 'TEXT',
			'validators' => array (  0 => array ( 'type' => 'ISINT',
					'errmsg'=> 'limit_web_quota_error_notint'),
			),
			'default' => '-1',
			'value'  => '',
			'separator' => '',
			'width'  => '10',
			'maxlength' => '10',
			'rows'  => '',
			'cols'  => ''
latham's avatar
latham committed
824
825
		),
		'web_php_options' => array (
826
827
828
829
830
831
			'datatype' => 'VARCHAR',
			'formtype' => 'CHECKBOXARRAY',
			'validators' => array (  0 => array ( 'type' => 'NOTEMPTY',
					'errmsg'=> 'web_php_options_notempty'),
			),
			'default' => '',
latham's avatar
latham committed
832
			'separator' => ',',
833
			'value'  => array('no' => 'Disabled', 'fast-cgi' => 'Fast-CGI', 'cgi' => 'CGI', 'mod' => 'Mod-PHP', 'suphp' => 'SuPHP', 'php-fpm' => 'PHP-FPM', 'hhvm' => 'HHVM')
latham's avatar
latham committed
834
		),
mcramer's avatar
mcramer committed
835
		'limit_cgi' => array (
836
837
838
839
			'datatype' => 'VARCHAR',
			'formtype' => 'CHECKBOX',
			'default' => 'n',
			'value'  => array(0 => 'n', 1 => 'y')
mcramer's avatar
mcramer committed
840
841
		),
		'limit_ssi' => array (
842
843
844
845
			'datatype' => 'VARCHAR',
			'formtype' => 'CHECKBOX',
			'default' => 'n',
			'value'  => array(0 => 'n', 1 => 'y')
mcramer's avatar
mcramer committed
846
847
		),
		'limit_perl' => array (
848
849
850
851
			'datatype' => 'VARCHAR',
			'formtype' => 'CHECKBOX',
			'default' => 'n',
			'value'  => array(0 => 'n', 1 => 'y')
mcramer's avatar
mcramer committed
852
853
		),
		'limit_ruby' => array (
854
855
856
857
			'datatype' => 'VARCHAR',
			'formtype' => 'CHECKBOX',
			'default' => 'n',
			'value'  => array(0 => 'n', 1 => 'y')
mcramer's avatar
mcramer committed
858
859
		),
		'limit_python' => array (
860
861
862
863
			'datatype' => 'VARCHAR',
			'formtype' => 'CHECKBOX',
			'default' => 'n',
			'value'  => array(0 => 'n', 1 => 'y')
mcramer's avatar
mcramer committed
864
865
		),
		'force_suexec' => array (
866
867
868
869
			'datatype' => 'VARCHAR',
			'formtype' => 'CHECKBOX',
			'default' => 'y',
			'value'  => array(0 => 'n', 1 => 'y')
mcramer's avatar
mcramer committed
870
871
		),
		'limit_hterror' => array (
872
873
874
875
			'datatype' => 'VARCHAR',
			'formtype' => 'CHECKBOX',
			'default' => 'n',
			'value'  => array(0 => 'n', 1 => 'y')
mcramer's avatar
mcramer committed
876
877
		),
		'limit_wildcard' => array (
878
879
880
881
			'datatype' => 'VARCHAR',
			'formtype' => 'CHECKBOX',
			'default' => 'n',
			'value'  => array(0 => 'n', 1 => 'y')
mcramer's avatar
mcramer committed
882
883
		),
		'limit_ssl' => array (
884
885
886
887
			'datatype' => 'VARCHAR',
			'formtype' => 'CHECKBOX',
			'default' => 'n',
			'value'  => array(0 => 'n', 1 => 'y')
mcramer's avatar
mcramer committed
888
		),
latham's avatar
latham committed
889
		'limit_web_aliasdomain' => array (
890
891
892
893
894
895
896
897
898
899
900
901
			'datatype' => 'INTEGER',
			'formtype' => 'TEXT',
			'validators' => array (  0 => array ( 'type' => 'ISINT',
					'errmsg'=> 'limit_web_aliasdomain_error_notint'),
			),
			'default' => '-1',
			'value'  => '',
			'separator' => '',
			'width'  => '10',
			'maxlength' => '10',
			'rows'  => '',
			'cols'  => ''
latham's avatar
latham committed
902
903
		),
		'limit_web_subdomain' => array (
904
905
906
907
908
909
910
911
912
913
914
915
			'datatype' => 'INTEGER',
			'formtype' => 'TEXT',
			'validators' => array (  0 => array ( 'type' => 'ISINT',
					'errmsg'=> 'limit_web_subdomain_error_notint'),
			),
			'default' => '-1',
			'value'  => '',
			'separator' => '',
			'width'  => '10',
			'maxlength' => '10',
			'rows'  => '',
			'cols'  => ''
latham's avatar
latham committed
916
917
		),
		'limit_ftp_user' => array (
918
919
920
921
922
923
924
925
926
927
928
929
			'datatype' => 'INTEGER',
			'formtype' => 'TEXT',
			'validators' => array (  0 => array ( 'type' => 'ISINT',
					'errmsg'=> 'limit_ftp_user_error_notint'),
			),
			'default' => '-1',
			'value'  => '',
			'separator' => '',
			'width'  => '10',
			'maxlength' => '10',
			'rows'  => '',
			'cols'  => ''
latham's avatar
latham committed
930
931
		),
		'limit_shell_user' => array (
932
933
934
935
936
937
938
939
940
941
942
943
			'datatype' => 'INTEGER',
			'formtype' => 'TEXT',
			'validators' => array (  0 => array ( 'type' => 'ISINT',
					'errmsg'=> 'limit_shell_user_error_notint'),
			),
			'default' => '-1',
			'value'  => '',
			'separator' => '',
			'width'  => '10',
			'maxlength' => '10',
			'rows'  => '',
			'cols'  => ''
latham's avatar
latham committed
944
945
		),
		'ssh_chroot' => array (
946
947
948
949
950
951
			'datatype' => 'VARCHAR',
			'formtype' => 'CHECKBOXARRAY',
			'validators' => array (  0 => array ( 'type' => 'NOTEMPTY',
					'errmsg'=> 'ssh_chroot_notempty'),
			),
			'default' => '',
latham's avatar
latham committed
952
			'separator' => ',',
953
			'value'  => array('no' => 'None', 'jailkit' => 'Jailkit')
latham's avatar
latham committed
954
		),
955
		'limit_webdav_user' => array (
956
957
958
959
960
961
962
963
964
965
966
967
			'datatype' => 'INTEGER',
			'formtype' => 'TEXT',
			'validators' => array (  0 => array ( 'type' => 'ISINT',
					'errmsg'=> 'limit_webdav_user_error_notint'),
			),
			'default' => '-1',
			'value'  => '',
			'separator' => '',
			'width'  => '10',
			'maxlength' => '10',
			'rows'  => '',
			'cols'  => ''
968
		),
969
970
971
		'limit_backup' => array (
			'datatype' => 'VARCHAR',
			'formtype' => 'CHECKBOX',
Dominik's avatar
Dominik committed
972
			'default' => 'y',
973
974
			'value'  => array(0 => 'n', 1 => 'y')
		),
latham's avatar
latham committed
975
		'default_dnsserver' => array (
976
977
978
979
980
981
982
983
984
			'datatype' => 'INTEGER',
			'formtype' => 'SELECT',
			'default' => '1',
			'datasource' => array (  'type' => 'SQL',
				'querystring' => 'SELECT server_id,server_name FROM server WHERE dns_server = 1 AND {AUTHSQL} ORDER BY server_name',
				'keyfield'=> 'server_id',
				'valuefield'=> 'server_name'
			),
			'value'  => ''
latham's avatar
latham committed
985
		),
986
		'dns_servers' => array (
987
988
989
990
991
992
993
994
			'datatype' => 'INTEGER',
			'formtype' => 'MULTIPLE',
			'default' => '1',
			'datasource' => array (  'type' => 'SQL',
				'querystring' => 'SELECT server_id,server_name FROM server WHERE dns_server = 1 AND {AUTHSQL} ORDER BY server_name',
				'keyfield'=> 'server_id',
				'valuefield'=> 'server_name'
			),
995
			'validators'    => array (  0 => array (    'type'  => 'NOTEMPTY',
996
997
998
999
1000
					'errmsg'=> 'no_dns_server_error'),
				1 => array ( 'type' => 'CUSTOM',
					'class' => 'validate_client',
					'function' => 'check_used_servers',
					'errmsg'=> 'dns_servers_used'),
For faster browsing, not all history is shown. View entire blame