Newer
Older
<?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"] = "Spamfilter policy";
$form["description"] = "";
$form["name"] = "spamfilter_policy";
$form["action"] = "spamfilter_policy_edit.php";
$form["db_table"] = "spamfilter_policy";
$form["db_table_idx"] = "id";
$form["db_history"] = "yes";
$form["tab_default"] = "policy";
$form["list_default"] = "spamfilter_policy_list.php";
$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'; //r = read, i = insert, u = update, d = delete
'title' => "Policy",
'width' => 100,
'template' => "templates/spamfilter_policy_edit.htm",
'fields' => array (
//#################################
// Begin Datatable fields
//#################################
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
'default' => '',
'validators' => array ( 0 => array ( 'type' => 'NOTEMPTY',
'errmsg'=> 'policyname_error_notempty'),
),
'filters' => array(
0 => array( 'event' => 'SAVE',
'type' => 'STRIPTAGS'),
1 => array( 'event' => 'SAVE',
'type' => 'STRIPNL')
),
'value' => '',
'width' => '30',
'maxlength' => '255'
'datatype' => 'VARCHAR',
'formtype' => 'SELECT',
'default' => 'N',
'value' => array('N' => 'No', 'Y' => 'Yes')
'datatype' => 'VARCHAR',
'formtype' => 'SELECT',
'default' => 'N',
'value' => array('N' => 'No', 'Y' => 'Yes')
'datatype' => 'VARCHAR',
'formtype' => 'SELECT',
'default' => 'N',
'value' => array('N' => 'No', 'Y' => 'Yes')
'datatype' => 'VARCHAR',
'formtype' => 'SELECT',
'default' => 'N',
'value' => array('N' => 'No', 'Y' => 'Yes')
'datatype' => 'VARCHAR',
'formtype' => 'SELECT',
'default' => 'N',
'value' => array('N' => 'No', 'Y' => 'Yes')
'datatype' => 'VARCHAR',
'formtype' => 'SELECT',
'default' => 'N',
'value' => array('N' => 'No', 'Y' => 'Yes')
'datatype' => 'VARCHAR',
'formtype' => 'SELECT',
'default' => 'N',
'value' => array('N' => 'No', 'Y' => 'Yes')
),
//#################################
// ENDE Datatable fields
//#################################
)
);
$form["tabs"]['quarantine'] = array (
'title' => "Quarantine",
'width' => 100,
'template' => "templates/spamfilter_quarantine_edit.htm",
'fields' => array (
//#################################
// Begin Datatable fields
//#################################
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
'filters' => array(
0 => array( 'event' => 'SAVE',
'type' => 'STRIPTAGS'),
1 => array( 'event' => 'SAVE',
'type' => 'STRIPNL')
),
'default' => '',
'value' => '',
'width' => '30',
'maxlength' => '255'
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
'filters' => array(
0 => array( 'event' => 'SAVE',
'type' => 'STRIPTAGS'),
1 => array( 'event' => 'SAVE',
'type' => 'STRIPNL')
),
'default' => '',
'value' => '',
'width' => '30',
'maxlength' => '255'
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
'filters' => array(
0 => array( 'event' => 'SAVE',
'type' => 'STRIPTAGS'),
1 => array( 'event' => 'SAVE',
'type' => 'STRIPNL')
),
'default' => '',
'value' => '',
'width' => '30',
'maxlength' => '255'
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
'filters' => array(
0 => array( 'event' => 'SAVE',
'type' => 'STRIPTAGS'),
1 => array( 'event' => 'SAVE',
'type' => 'STRIPNL')
),
'default' => '',
'value' => '',
'width' => '30',
'maxlength' => '255'
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
'filters' => array(
0 => array( 'event' => 'SAVE',
'type' => 'STRIPTAGS'),
1 => array( 'event' => 'SAVE',
'type' => 'STRIPNL')
),
'default' => '',
'value' => '',
'width' => '30',
'maxlength' => '255'
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
'filters' => array(
0 => array( 'event' => 'SAVE',
'type' => 'STRIPTAGS'),
1 => array( 'event' => 'SAVE',
'type' => 'STRIPNL')
),
'default' => '',
'value' => '',
'width' => '30',
'maxlength' => '255'
),
//#################################
// ENDE Datatable fields
//#################################
'title' => "Tag-Level",
'width' => 100,
'template' => "templates/spamfilter_taglevel_edit.htm",
'fields' => array (
//#################################
// Begin Datatable fields
//#################################
'datatype' => 'DOUBLE',
'formtype' => 'TEXT',
'default' => '0',
'value' => '',
'width' => '10',
'maxlength' => '255'
'datatype' => 'DOUBLE',
'formtype' => 'TEXT',
'default' => '0',
'value' => '',
'width' => '10',
'maxlength' => '255'
'datatype' => 'DOUBLE',
'formtype' => 'TEXT',
'default' => '0',
'value' => '',
'width' => '10',
'maxlength' => '255'
'datatype' => 'DOUBLE',
'formtype' => 'TEXT',
'default' => '0',
'value' => '',
'width' => '10',
'maxlength' => '255'
'datatype' => 'DOUBLE',
'formtype' => 'TEXT',
'default' => '0',
'value' => '',
'width' => '10',
'maxlength' => '255'
'datatype' => 'VARCHAR',
'formtype' => 'SELECT',
'default' => 'N',
'value' => array('N' => 'No', 'Y' => 'Yes')
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
'filters' => array(
0 => array( 'event' => 'SAVE',
'type' => 'STRIPTAGS'),
1 => array( 'event' => 'SAVE',
'type' => 'STRIPNL')
),
'default' => '',
'value' => '',
'width' => '30',
'maxlength' => '255'
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
'filters' => array(
0 => array( 'event' => 'SAVE',
'type' => 'STRIPTAGS'),
1 => array( 'event' => 'SAVE',
'type' => 'STRIPNL')
),
'default' => '',
'value' => '',
'width' => '30',
'maxlength' => '255'
),
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
'rspamd_greylisting' => array (
'datatype' => 'VARCHAR',
'formtype' => 'CHECKBOX',
'default' => 'y',
'value' => array(0 => 'n', 1 => 'y')
),
'rspamd_spam_greylisting_level' => array (
'datatype' => 'DOUBLE',
'formtype' => 'TEXT',
'default' => '0',
'value' => '',
'width' => '10',
'maxlength' => '255'
),
'rspamd_spam_tag_level' => array (
'datatype' => 'DOUBLE',
'formtype' => 'TEXT',
'default' => '0',
'value' => '',
'width' => '10',
'maxlength' => '255'
),
'rspamd_spam_tag_method' => array (
'datatype' => 'VARCHAR',
'formtype' => 'SELECT',
'default' => 'rewrite_subject',
'value' => array('add_header' => $app->lng('add_header_txt'), 'rewrite_subject' => $app->lng('rewrite_subject_txt'))
),
'rspamd_spam_kill_level' => array (
'datatype' => 'DOUBLE',
'formtype' => 'TEXT',
'default' => '0',
'value' => '',
'width' => '10',
'maxlength' => '255'
),
//#################################
// ENDE Datatable fields
//#################################
'title' => "Other",
'width' => 100,
'template' => "templates/spamfilter_other_edit.htm",
'fields' => array (
//#################################
// Begin Datatable fields
//#################################
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
'filters' => array(
0 => array( 'event' => 'SAVE',
'type' => 'STRIPTAGS'),
1 => array( 'event' => 'SAVE',
'type' => 'STRIPNL')
),
'default' => '',
'value' => '',
'width' => '30',
'maxlength' => '255'
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
'filters' => array(
0 => array( 'event' => 'SAVE',
'type' => 'STRIPTAGS'),
1 => array( 'event' => 'SAVE',
'type' => 'STRIPNL')
),
'default' => '',
'value' => '',
'width' => '30',
'maxlength' => '255'
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
'filters' => array(
0 => array( 'event' => 'SAVE',
'type' => 'STRIPTAGS'),
1 => array( 'event' => 'SAVE',
'type' => 'STRIPNL')
),
'default' => '',
'value' => '',
'width' => '30',
'maxlength' => '255'
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
'filters' => array(
0 => array( 'event' => 'SAVE',
'type' => 'STRIPTAGS'),
1 => array( 'event' => 'SAVE',
'type' => 'STRIPNL')
),
'default' => '',
'value' => '',
'width' => '30',
'maxlength' => '255'
'datatype' => 'VARCHAR',
'formtype' => 'SELECT',
'default' => 'N',
'value' => array('N' => 'No', 'Y' => 'Yes')
'datatype' => 'VARCHAR',
'formtype' => 'SELECT',
'default' => 'N',
'value' => array('N' => 'No', 'Y' => 'Yes')
'datatype' => 'VARCHAR',
'formtype' => 'SELECT',
'default' => 'N',
'value' => array('N' => 'No', 'Y' => 'Yes')
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
'filters' => array(
0 => array( 'event' => 'SAVE',
'type' => 'STRIPTAGS'),
1 => array( 'event' => 'SAVE',
'type' => 'STRIPNL')
),
'default' => '',
'value' => '',
'width' => '30',
'maxlength' => '255'
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
'filters' => array(
0 => array( 'event' => 'SAVE',
'type' => 'STRIPTAGS'),
1 => array( 'event' => 'SAVE',
'type' => 'STRIPNL')
),
'default' => '',
'value' => '',
'width' => '30',
'maxlength' => '255'
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
'filters' => array(
0 => array( 'event' => 'SAVE',
'type' => 'STRIPTAGS'),
1 => array( 'event' => 'SAVE',
'type' => 'STRIPNL')
),
'default' => '',
'value' => '',
'width' => '30',
'maxlength' => '255'
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
'filters' => array(
0 => array( 'event' => 'SAVE',
'type' => 'STRIPTAGS'),
1 => array( 'event' => 'SAVE',
'type' => 'STRIPNL')
),
'default' => '',
'value' => '',
'width' => '30',
'maxlength' => '255'
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
'filters' => array(
0 => array( 'event' => 'SAVE',
'type' => 'STRIPTAGS'),
1 => array( 'event' => 'SAVE',
'type' => 'STRIPNL')
),
'default' => '',
'value' => '',
'width' => '30',
'maxlength' => '255'
),
'datatype' => 'INTEGER',
'formtype' => 'TEXT',
'default' => '',
'value' => '',
'width' => '10',
'maxlength' => '255'
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
'filters' => array(
0 => array( 'event' => 'SAVE',
'type' => 'STRIPTAGS'),
1 => array( 'event' => 'SAVE',
'type' => 'STRIPNL')
),
'default' => '',
'value' => '',
'width' => '30',
'maxlength' => '255'
),
//#################################
// ENDE Datatable fields
//#################################