31ae41c39ae9a7d45a9e0ada3d569624c299d24c
1 <?php
3 class filterEditor extends plugin{
5 var $filterListing = NULL;
6 var $filterRules = array();
8 function __construct($config, $rules)
9 {
10 plugin::plugin($config);
11 $this->filterRules = $rules;
13 $this->filterListing= new sortableListing();
14 $this->filterListing->setDeleteable(true);
15 $this->filterListing->setEditable(true);
16 $this->filterListing->setColspecs(array('*'));
17 $this->filterListing->setWidth("100%");
18 $this->filterListing->setHeight("200px;");
19 }
21 function execute()
22 {
24 $this->filter = array();
25 $this->filter[] = array (
26 'TYPE' => 'AND',
27 'NAME' => 'MuellRaus',
28 'DESC' => 'Spam loeschen',
29 'CONDITIONS' => array (
30 array('FIELD' => 'from',
31 'COMPARATOR' => 'equals',
32 'MATCH' => 'herbert'),
33 array('FIELD' => 'subject',
34 'COMPARATOR' => 'contains',
35 'MATCH' => 'advertising'),
36 ),
37 'ACTION' => array (
38 array('ACTION'=>'MARK',
39 'VALUE' => 'SPAM'),
40 array('ACTION'=>'MOVE',
41 'VALUE' => 'gosa+shared/hickert/trash')
42 )
43 );
45 $this->filter[] = array (
46 'TYPE' => 'OR',
47 'NAME' => 'Kunden',
48 'DESC' => 'Kunden Mails in Wichtig schieben',
49 'CONDITIONS' => array (
50 array('FIELD' => 'from',
51 'COMPARATOR' => 'contains',
52 'MATCH' => 'gonicus'),
53 array('FIELD' => 'from',
54 'COMPARATOR' => 'contains',
55 'MATCH' => 'lka'),
56 ),
57 'ACTION' => array (
58 array('ACTION'=>'MARK',
59 'VALUE' => 'HAM'),
60 array('ACTION'=>'MOVE',
61 'VALUE' => 'gosa+shared/hickert/wichtig')
62 )
63 );
66 $smarty = get_smarty();
70 $smarty->assign('list', $this->filterListing->render());
72 return($smarty->fetch(get_template_path('filterEditor.tpl',TRUE,dirname(__FILE__))));
73 }
75 }
77 ?>