4883ba99fa46ddc4866987b6b42806d7d73c38dd
1 <?php
2 class goSpamServerRule extends plugin {
4 var $attributes = array("name","rule");
5 var $name = "";
6 var $rule = "";
8 var $orig_name = "";
10 function goSpamServerRule($config,$dn,$name = "",$rule ="")
11 {
12 plugin::plugin($config,$dn);
13 $this->name = $this->orig_name= $name;
14 $this->rule = $rule;
15 }
18 function execute()
19 {
20 $smarty = get_smarty();
21 foreach($this->attributes as $attr){
22 $smarty->assign($attr,$this->$attr);
23 }
24 return($smarty->fetch(get_template_path("goSpamServerRule.tpl",TRUE,dirname(__FILE__))));
25 }
27 function save_object()
28 {
29 plugin::save_object();
30 }
33 function save()
34 {
35 $ret =array();
36 $ret['orig_name'] = $this->orig_name;
37 $ret['name'] = $this->name;
38 $ret['rule'] = $this->rule;
39 return($ret);
40 }
42 function check()
43 {
44 $messages = plugin::check();
45 return($messages);
46 }
47 }
49 ?>