Initial revision
[old-projects.git] / philter / philter / include / js_factory.inc.php
CommitLineData
dd8de1ec
PH
1<?php
2/********************************************************************************
3* include/js_factory.inc.php : The include file for creating dynamic JS functions
4* --------------------------
5*
6* This file is part of the philter distribution
7* Copyright: See COPYING files that comes with this distribution
8********************************************************************************/
9?>
10<script language="javascript1.3" type="text/javascript">
11<?php
12
13/********** mail_pool **********/
14echo $mail_pool->to_js();
15
16/********** filter **********/
17echo $filter->to_js();
18
19/********** matches **********/
20foreach($philter->config['match_plugins'] as $id=>$plugin) {
21 echo "matches_list[$id] = '" . $plugin->name() . "';\n";
22 echo "matches_func[$id] = " . $plugin->to_js() . ";\n\n";
23}
24
25/********** actions **********/
26foreach($philter->config['action_plugins'] as $id=>$plugin) {
27 echo "actions_list[$id] = '" . $plugin->name() . "';\n";
28 echo "actions_func[$id] = " . $plugin->to_js() . ";\n\n";
29}
30?>
31</script>
32<?php
33/********************************************************************************
34* $Id$
35* vim: set expandtab shiftwidth=4 tabstop=4 softtabstop=4 textwidth=100:
36********************************************************************************/
37?>