Commit 77c16c1c authored by tbrehm's avatar tbrehm
Browse files

Added spamfilter policys

parent 7de96bb4
<?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 = read, i = insert, u = update, d = delete
$form["tabs"]['policy'] = array (
'title' => "Policy",
'width' => 100,
'template' => "templates/spamfilter_policy_edit.htm",
'fields' => array (
##################################
# Begin Datatable fields
##################################
'policy_name' => array (
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
'default' => '',
'validators' => array ( 0 => array ( 'type' => 'NOTEMPTY',
'errmsg'=> 'policyname_error_notempty'),
),
'value' => '',
'width' => '30',
'maxlength' => '255'
),
'virus_lover' => array (
'datatype' => 'VARCHAR',
'formtype' => 'SELECT',
'default' => 'N',
'value' => array('N' => 'No','Y' => 'Yes')
),
'spam_lover' => array (
'datatype' => 'VARCHAR',
'formtype' => 'SELECT',
'default' => 'N',
'value' => array('N' => 'No','Y' => 'Yes')
),
'banned_files_lover' => array (
'datatype' => 'VARCHAR',
'formtype' => 'SELECT',
'default' => 'N',
'value' => array('N' => 'No','Y' => 'Yes')
),
'bad_header_lover' => array (
'datatype' => 'VARCHAR',
'formtype' => 'SELECT',
'default' => 'N',
'value' => array('N' => 'No','Y' => 'Yes')
),
'bypass_virus_checks' => array (
'datatype' => 'VARCHAR',
'formtype' => 'SELECT',
'default' => 'N',
'value' => array('N' => 'No','Y' => 'Yes')
),
'bypass_banned_checks' => array (
'datatype' => 'VARCHAR',
'formtype' => 'SELECT',
'default' => 'N',
'value' => array('N' => 'No','Y' => 'Yes')
),
'bypass_header_checks' => array (
'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
##################################
'virus_quarantine_to' => array (
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
'default' => '',
'value' => '',
'width' => '30',
'maxlength' => '255'
),
'spam_quarantine_to' => array (
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
'default' => '',
'value' => '',
'width' => '30',
'maxlength' => '255'
),
'banned_quarantine_to' => array (
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
'default' => '',
'value' => '',
'width' => '30',
'maxlength' => '255'
),
'bad_header_quarantine_to' => array (
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
'default' => '',
'value' => '',
'width' => '30',
'maxlength' => '255'
),
'clean_quarantine_to' => array (
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
'default' => '',
'value' => '',
'width' => '30',
'maxlength' => '255'
),
'other_quarantine_to' => array (
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
'default' => '',
'value' => '',
'width' => '30',
'maxlength' => '255'
),
##################################
# ENDE Datatable fields
##################################
)
);
$form["tabs"]['taglevel'] = array (
'title' => "Tag-Level",
'width' => 100,
'template' => "templates/spamfilter_taglevel_edit.htm",
'fields' => array (
##################################
# Begin Datatable fields
##################################
'spam_tag_level' => array (
'datatype' => 'DOUBLE',
'formtype' => 'TEXT',
'default' => '0',
'value' => '',
'width' => '10',
'maxlength' => '255'
),
'spam_tag2_level' => array (
'datatype' => 'DOUBLE',
'formtype' => 'TEXT',
'default' => '0',
'value' => '',
'width' => '10',
'maxlength' => '255'
),
'spam_kill_level' => array (
'datatype' => 'DOUBLE',
'formtype' => 'TEXT',
'default' => '0',
'value' => '',
'width' => '10',
'maxlength' => '255'
),
'spam_dsn_cutoff_level' => array (
'datatype' => 'DOUBLE',
'formtype' => 'TEXT',
'default' => '0',
'value' => '',
'width' => '10',
'maxlength' => '255'
),
'spam_quarantine_cutoff_level' => array (
'datatype' => 'DOUBLE',
'formtype' => 'TEXT',
'default' => '0',
'value' => '',
'width' => '10',
'maxlength' => '255'
),
'spam_modifies_subj' => array (
'datatype' => 'VARCHAR',
'formtype' => 'SELECT',
'default' => 'N',
'value' => array('N' => 'No','Y' => 'Yes')
),
'spam_subject_tag' => array (
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
'default' => '',
'value' => '',
'width' => '30',
'maxlength' => '255'
),
'spam_subject_tag2' => array (
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
'default' => '',
'value' => '',
'width' => '30',
'maxlength' => '255'
),
##################################
# ENDE Datatable fields
##################################
)
);
$form["tabs"]['other'] = array (
'title' => "Other",
'width' => 100,
'template' => "templates/spamfilter_other_edit.htm",
'fields' => array (
##################################
# Begin Datatable fields
##################################
'addr_extension_virus' => array (
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
'default' => '',
'value' => '',
'width' => '30',
'maxlength' => '255'
),
'addr_extension_spam' => array (
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
'default' => '',
'value' => '',
'width' => '30',
'maxlength' => '255'
),
'addr_extension_banned' => array (
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
'default' => '',
'value' => '',
'width' => '30',
'maxlength' => '255'
),
'addr_extension_bad_header' => array (
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
'default' => '',
'value' => '',
'width' => '30',
'maxlength' => '255'
),
'warnvirusrecip' => array (
'datatype' => 'VARCHAR',
'formtype' => 'SELECT',
'default' => 'N',
'value' => array('N' => 'No','Y' => 'Yes')
),
'warnbannedrecip' => array (
'datatype' => 'VARCHAR',
'formtype' => 'SELECT',
'default' => 'N',
'value' => array('N' => 'No','Y' => 'Yes')
),
'warnbadhrecip' => array (
'datatype' => 'VARCHAR',
'formtype' => 'SELECT',
'default' => 'N',
'value' => array('N' => 'No','Y' => 'Yes')
),
'newvirus_admin' => array (
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
'default' => '',
'value' => '',
'width' => '30',
'maxlength' => '255'
),
'virus_admin' => array (
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
'default' => '',
'value' => '',
'width' => '30',
'maxlength' => '255'
),
'banned_admin' => array (
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
'default' => '',
'value' => '',
'width' => '30',
'maxlength' => '255'
),
'bad_header_admin' => array (
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
'default' => '',
'value' => '',
'width' => '30',
'maxlength' => '255'
),
'spam_admin' => array (
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
'default' => '',
'value' => '',
'width' => '30',
'maxlength' => '255'
),
'message_size_limit' => array (
'datatype' => 'INTEGER',
'formtype' => 'TEXT',
'default' => '',
'value' => '',
'width' => '10',
'maxlength' => '255'
),
'banned_rulenames' => array (
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
'default' => '',
'value' => '',
'width' => '30',
'maxlength' => '255'
),
##################################
# ENDE Datatable fields
##################################
)
);
?>
\ No newline at end of file
<?php
$wb["policy_name_txt"] = 'policy_name';
$wb["virus_lover_txt"] = 'virus_lover';
$wb["spam_lover_txt"] = 'spam_lover';
$wb["banned_files_lover_txt"] = 'banned_files_lover';
$wb["bad_header_lover_txt"] = 'bad_header_lover';
$wb["bypass_virus_checks_txt"] = 'bypass_virus_checks';
$wb["bypass_banned_checks_txt"] = 'bypass_banned_checks';
$wb["bypass_header_checks_txt"] = 'bypass_header_checks';
$wb["btn_save_txt"] = 'Save';
$wb["btn_cancel_txt"] = 'Cancel';
$wb["virus_quarantine_to_txt"] = 'virus_quarantine_to';
$wb["spam_quarantine_to_txt"] = 'spam_quarantine_to';
$wb["banned_quarantine_to_txt"] = 'banned_quarantine_to';
$wb["bad_header_quarantine_to_txt"] = 'bad_header_quarantine_to';
$wb["clean_quarantine_to_txt"] = 'clean_quarantine_to';
$wb["other_quarantine_to_txt"] = 'other_quarantine_to';
$wb["spam_tag_level_txt"] = 'spam_tag_level';
$wb["spam_tag2_level_txt"] = 'spam_tag2_level';
$wb["spam_kill_level_txt"] = 'spam_kill_level';
$wb["spam_dsn_cutoff_level_txt"] = 'spam_dsn_cutoff_level';
$wb["spam_quarantine_cutoff_level_txt"] = 'spam_quarantine_cutoff_level';
$wb["spam_modifies_subj_txt"] = 'spam_modifies_subj';
$wb["spam_subject_tag_txt"] = 'spam_subject_tag';
$wb["spam_subject_tag2_txt"] = 'spam_subject_tag2';
$wb["addr_extension_virus_txt"] = 'addr_extension_virus';
$wb["addr_extension_spam_txt"] = 'addr_extension_spam';
$wb["addr_extension_banned_txt"] = 'addr_extension_banned';
$wb["addr_extension_bad_header_txt"] = 'addr_extension_bad_header';
$wb["warnvirusrecip_txt"] = 'warnvirusrecip';
$wb["warnbannedrecip_txt"] = 'warnbannedrecip';
$wb["warnbadhrecip_txt"] = 'warnbadhrecip';
$wb["newvirus_admin_txt"] = 'newvirus_admin';
$wb["virus_admin_txt"] = 'virus_admin';
$wb["banned_admin_txt"] = 'banned_admin';
$wb["bad_header_admin_txt"] = 'bad_header_admin';
$wb["spam_admin_txt"] = 'spam_admin';
$wb["message_size_limit_txt"] = 'message_size_limit';
$wb["banned_rulenames_txt"] = 'banned_rulenames';
?>
\ No newline at end of file
<?php
$wb["list_head_txt"] = 'Spamfilter Policy';
$wb["policy_name_txt"] = 'Name';
$wb["virus_lover_txt"] = 'Virus lover';
$wb["spam_lover_txt"] = 'Spam lover';
$wb["banned_files_lover_txt"] = 'Banned Files lover';
$wb["bad_header_lover_txt"] = 'Bad Header lover';
$wb["page_txt"] = 'Page';
$wb["page_of_txt"] = 'of';
$wb["page_next_txt"] = 'Next';
$wb["page_back_txt"] = 'Back';
$wb["delete_txt"] = 'Delete';
$wb["filter_txt"] = 'Filter';
$wb["add_new_record_txt"] = 'Add Policy record';
?>
\ No newline at end of file
<?php
/*
Datatypes:
- INTEGER
- DOUBLE
- CURRENCY
- VARCHAR
- TEXT
- DATE
*/
// Name of the list
$liste["name"] = "spamfilter_policy";
// Database table
$liste["table"] = "spamfilter_policy";
// Index index field of the database table
$liste["table_idx"] = "id";
// Search Field Prefix
$liste["search_prefix"] = "search_";
// Records per page
$liste["records_per_page"] = 15;
// Script File of the list
$liste["file"] = "spamfilter_policy_list.php";
// Script file of the edit form
$liste["edit_file"] = "spamfilter_policy_edit.php";
// Script File of the delete script
$liste["delete_file"] = "spamfilter_policy_del.php";
// Paging Template
$liste["paging_tpl"] = "templates/paging.tpl.htm";
// Enable auth
$liste["auth"] = "yes";
/*****************************************************
* Suchfelder
*****************************************************/
$liste["item"][] = array( 'field' => "policy_name",
'datatype' => "VARCHAR",
'formtype' => "TEXT",
'op' => "like",
'prefix' => "%",
'suffix' => "%",
'width' => "",
'value' => "");
$liste["item"][] = array( 'field' => "virus_lover",
'datatype' => "VARCHAR",
'formtype' => "SELECT",
'op' => "=",
'prefix' => "",
'suffix' => "",
'width' => "",
'value' => array('y' => "Yes",'n' => "No"));
$liste["item"][] = array( 'field' => "spam_lover",
'datatype' => "VARCHAR",
'formtype' => "SELECT",
'op' => "=",
'prefix' => "",
'suffix' => "",
'width' => "",
'value' => array('y' => "Yes",'n' => "No"));
$liste["item"][] = array( 'field' => "banned_files_lover",
'datatype' => "VARCHAR",
'formtype' => "SELECT",
'op' => "=",
'prefix' => "",
'suffix' => "",
'width' => "",
'value' => array('y' => "Yes",'n' => "No"));
$liste["item"][] = array( 'field' => "bad_header_lover",
'datatype' => "VARCHAR",
'formtype' => "SELECT",
'op' => "=",
'prefix' => "",
'suffix' => "",
'width' => "",
'value' => array('y' => "Yes",'n' => "No"));
?>
\ No newline at end of file
<?php
/*
Copyright (c) 2007, Till Brehm, projektfarm Gmbh
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of ISPConfig nor the names of its contributors
may be used to endorse or promote products derived from this software without
specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
/******************************************
* Begin Form configuration
******************************************/
$list_def_file = "list/spamfilter_policy.list.php";
$tform_def_file = "form/spamfilter_policy.tform.php";
/******************************************
* End Form configuration
******************************************/
require_once('../../lib/config.inc.php');
require_once('../../lib/app.inc.php');
// Checke Berechtigungen für Modul