--- /dev/null
+<?php
+/********************************************************************************
+* include/plugin_custheader.inc.php : The class for Custom Header Based Match
+* ---------------------------------
+*
+* This file is part of the philter distribution
+* Copyright: See COPYING files that comes with this distribution
+********************************************************************************/
+
+class CustHdrPlugin extends MatchPlugin {
+ function HdrPlugin($glob) { $this->MatchPlugin(false); }
+ function rtti() { return 3; }
+ function name() { return _i18n('3_cust_hdr'); }
+
+ function to_js() {
+ return
+"function(Node, data) {
+ var i,j;
+ var sel = 0;
+
+ Node.appendChild(document.createTextNode(' '));
+ var txt_i = document.createElement('input');
+ txt_i.setAttribute('type','text');
+ txt_i.setAttribute('name', Node.name+'[1]');
+ txt_i.setAttribute('value', (data[1] ? data[1] :'') );
+ Node.appendChild(txt_i);
+
+ Node.appendChild(document.createTextNode(' '));
+ var op_s = document.createElement('select');
+ op_s.setAttribute('name', Node.name+'[2]');
+ Node.appendChild(op_s);
+
+ op_s.options[0] = new Option('"._i18n('3_contains')."',0,false,data[2]==0);
+ op_s.options[1] = new Option('"._i18n('3_not_contains')."',1,false,data[2]==1);
+ op_s.options[2] = new Option(' = ',2,false,data[2]==2);
+ op_s.options[3] = new Option(' != ',3,false,data[2]==3);
+ op_s.options[4] = new Option(' >= ',4,false,data[2]==4);
+ op_s.options[5] = new Option(' > ',5,false,data[2]==5);
+ op_s.options[6] = new Option(' <= ',6,false,data[2]==6);
+ op_s.options[7] = new Option(' < ',7,false,data[2]==7);
+ op_s.selectIndex = data[2];
+
+ Node.appendChild(document.createTextNode(' '));
+ var txt_i = document.createElement('input');
+ txt_i.setAttribute('type','text');
+ txt_i.setAttribute('name', Node.name+'[3]');
+ txt_i.setAttribute('value', (data[3] ? data[3] : '') );
+ Node.appendChild(txt_i);
+}";
+ }
+}
+
+/********************************************************************************
+* $Id$
+* vim: set expandtab shiftwidth=4 tabstop=4 softtabstop=4 textwidth=100:
+********************************************************************************/
+?>
--- /dev/null
+<?php
+/********************************************************************************
+* i18n file
+*
+* This file is part of the philter distribution
+* Copyright: See COPYING files that comes with this distribution
+********************************************************************************/
+
+$philter->config['i18n']['3_cust_hdr'] = 'Custom Header';
+$philter->config['i18n']['3_contains'] = 'contains';
+$philter->config['i18n']['3_not_contains'] = 'contains not';
+
+/********************************************************************************
+* $Id$
+* vim: set expandtab shiftwidth=4 tabstop=4 softtabstop=4 textwidth=100:
+********************************************************************************/
+?>
--- /dev/null
+<?php
+/********************************************************************************
+* i18n file
+*
+* This file is part of the philter distribution
+* Copyright: See COPYING files that comes with this distribution
+********************************************************************************/
+
+$philter->config['i18n']['3_hdr'] = 'EntĂȘte Perso.';
+$philter->config['i18n']['3_contains'] = 'contient';
+$philter->config['i18n']['3_not_contains'] = 'ne contient pas';
+
+/********************************************************************************
+* $Id$
+* vim: set expandtab shiftwidth=4 tabstop=4 softtabstop=4 textwidth=100:
+********************************************************************************/
+?>