| 1 | <?php |
| 2 | if(count($_POST)) { // a FORM has been submitted |
| 3 | if(isset($_POST['global'])) { // FORM global |
| 4 | foreach($philter->config['global_plugins'] as $id=>$g_plugin) |
| 5 | if(isset($_POST['global'][$id])) |
| 6 | $filter->set_global_data($id,$_POST['global'][$id]); |
| 7 | $filter->rules[0]->sql_store(get_user_id(),0); |
| 8 | } |
| 9 | if(isset($_POST['emails'])) // FORM emails |
| 10 | if(!$mail_pool->handle_form()) |
| 11 | echo "<p style=\"color:red;\">".$philter->error()."</p>\n"; |
| 12 | } |
| 13 | ?> |
| 14 | <div class="rubrique"><?php i18n('global_title'); ?></div> |
| 15 | <?php |
| 16 | i18n('global_help'); |
| 17 | if(count($philter->config['global_plugins'])) { |
| 18 | echo "<form action=\"{$_SERVER['REQUEST_URI']}\" method=\"post\">\n" |
| 19 | ."<table width=\"95%\" class=\"bicol\" cellspacing=\"1\" cellpadding=\"1\" align=\"center\">\n"; |
| 20 | |
| 21 | $pair = 0; |
| 22 | foreach($philter->config['global_plugins'] as $id=>$g_plugin) { |
| 23 | echo "<tr><td class='".($pair ? 'pair':'impair')."'>\n"; |
| 24 | echo $g_plugin->to_form($filter->get_global_data($id)); |
| 25 | echo "</td></tr>\n"; |
| 26 | $pair = 1 - $pair; |
| 27 | } |
| 28 | |
| 29 | echo "</table><br />\n" |
| 30 | ."<center><input type='submit' name='global[submit]' value='" |
| 31 | ._i18n('apply_changes')."'/></center\n" |
| 32 | ."</form>\n"; |
| 33 | } |
| 34 | |
| 35 | /********** emails **********/ |
| 36 | ?> |
| 37 | <br /> |
| 38 | <div class="rubrique"><?php i18n('pool_title'); ?></div> |
| 39 | <?php |
| 40 | i18n('pool_help'); |
| 41 | echo $mail_pool->to_form(); |
| 42 | ?> |
| 43 | <div class="rubrique"><?php i18n('filter_adv'); ?></div> |
| 44 | <?php i18n('filter_adv_txt'); ?> |
| 45 | <form action="<?php echo $_SERVER['REQUEST_URI'] ?>" method="post"> |
| 46 | <center> |
| 47 | <input type="submit" value='<?php i18n('filter_adv') ?>' name='set_adv' /> |
| 48 | </center> |
| 49 | </form> |