Project

General

Profile

« Previous | Next » 

Revision 587

Added by doc over 16 years ago

Added multi-lingual Admin tool description. Moved Admin tool language text from global language file to module language files. Added function get_variable_content to allow extraction of variable without including files.

View differences:

tool.php
26 26
// direct access prevention
27 27
defined('WB_PATH') OR die(header('Location: ../index.php'));
28 28

  
29
// check if module language file exists for the language set by the user (e.g. DE, EN)
30
if(!file_exists(WB_PATH .'/modules/mail_filter/languages/'.LANGUAGE .'.php')) {
31
	// no module language file exists for the language set by the user, include default module language file EN.php
32
	require_once(WB_PATH .'/modules/mail_filter/languages/EN.php');
33
} else {
34
	// a module language file exists for the language defined by the user, load it
35
	require_once(WB_PATH .'/modules/mail_filter/languages/'.LANGUAGE .'.php');
36
}
29 37
// check if data was submitted
30 38
if(isset($_POST['save_settings'])) {
31 39
	// get configuration settings
......
51 59

  
52 60
} else {
53 61
	// write out heading
54
	echo '<h2>Email Output Filter</h2>';
62
	echo '<h2>' .$MOD_MAIL_FILTER['HEADING'] .'</h2>';
55 63

  
56 64
	// include filter functions
57 65
	require_once(WB_PATH .'/modules/mail_filter/filter-routines.php');
......
60 68
	$data = get_mail_filter_settings();
61 69
	
62 70
	// output the form with values from the database
71
	echo '<p>' .$MOD_MAIL_FILTER['HOWTO'] .'</p>';
63 72
?>
64

  
65
<p>You can enable/disable the output filtering of email adresses with the options below. The Javascript mailto: encryption requires to enable the register_frontend_modfiles in your browser.</p>
66 73
<form name="store_settings" action="<?php echo $_SERVER['REQUEST_URI']; ?>" method="post">
67 74
	<table width="98%" cellspacing="0" cellpadding="5px" class="row_a">
68
	<tr><td colspan="2"><strong>Basic Configuration:</strong></td></tr>
75
	<tr><td colspan="2"><strong><?php echo $MOD_MAIL_FILTER['BASIC_CONF'];?>:</strong></td></tr>
69 76
	<tr>
70
		<td width="35%">Email Output Filter:</td>
77
		<td width="35%"><?php echo $MOD_MAIL_FILTER['EMAIL_FILTER'];?>:</td>
71 78
		<td>
72 79
			<input type="radio" <?php echo ($data['email_filter']=='1') ?'checked="checked"' :'';?> 
73
				name="email_filter" value="1">Enabled
80
				name="email_filter" value="1"><?php echo $MOD_MAIL_FILTER['ENABLED'];?>
74 81
			<input type="radio" <?php echo ($data['email_filter']=='0') ?'checked="checked"' :'';?> 
75
				name="email_filter" value="0">Disabled
82
				name="email_filter" value="0"><?php echo $MOD_MAIL_FILTER['DISABLED'];?>
76 83
		</td>
77 84
	</tr>
78 85
	<tr>
79
		<td>Javascript Encryption (mailto):</td>
86
		<td><?php echo $MOD_MAIL_FILTER['MAILTO_FILTER'];?>:</td>
80 87
		<td>
81 88
			<input type="radio" <?php echo ($data['mailto_filter']=='1') ?'checked="checked"' :'';?>
82
				name="mailto_filter" value="1">Enabled
89
				name="mailto_filter" value="1"><?php echo $MOD_MAIL_FILTER['ENABLED'];?>
83 90
			<input type="radio" <?php echo (($data['mailto_filter'])=='0') ?'checked="checked"' :'';?>
84
				name="mailto_filter" value="0">Disabled
91
				name="mailto_filter" value="0"><?php echo $MOD_MAIL_FILTER['DISABLED'];?>
85 92
		</td>
86 93
	</tr>
87
	<tr><td colspan="2"><br /><strong>Email Replacements:</strong></td></tr>
94
	<tr><td colspan="2"><br /><strong><?php echo $MOD_MAIL_FILTER['REPLACEMENT_CONF'];?>:</strong></td></tr>
88 95
	<tr>
89
		<td>Replacement for "@":</td>
96
		<td><?php echo $MOD_MAIL_FILTER['AT_REPLACEMENT'];?>:</td>
90 97
		<td><input type="text" style="width: 160px" value="<?php echo $data['at_replacement'];?>" 
91 98
			name="at_replacement"/></td>
92 99
	</tr>
93 100
	<tr>
94
		<td>Replacement for ".":</td>
101
		<td><?php echo $MOD_MAIL_FILTER['DOT_REPLACEMENT'];?>:</td>
95 102
		<td><input type="text" style="width: 160px" value="<?php echo $data['dot_replacement'];?>" 
96 103
			name="dot_replacement"/></td>
97 104
	</tr>

Also available in: Unified diff