projects
/
squirrelmail.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
New get_plugin_version() function, and a couple places to use it.
[squirrelmail.git]
/
plugins
/
filters
/
options.php
diff --git
a/plugins/filters/options.php
b/plugins/filters/options.php
index 58ecfddd5c8c59085183bbd315682ac8330559b9..8056a83dc5cb2cefe04fc1a91ef8827be3ff8e34 100644
(file)
--- a/
plugins/filters/options.php
+++ b/
plugins/filters/options.php
@@
-3,7
+3,7
@@
/**
* Message and Spam Filter Plugin - Filtering Options
*
/**
* Message and Spam Filter Plugin - Filtering Options
*
- * @copyright © 1999-200
6
The SquirrelMail Project Team
+ * @copyright © 1999-200
7
The SquirrelMail Project Team
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @version $Id$
* @package plugins
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @version $Id$
* @package plugins
@@
-11,22
+11,16
@@
*/
/**
*/
/**
- * Path for SquirrelMail required files.
- * @ignore
+ * Include the SquirrelMail initialization file.
*/
*/
-define('SM_PATH','../../');
-
-/* SquirrelMail required files. */
-require_once(SM_PATH . 'include/validate.php');
-include_once(SM_PATH . 'functions/imap.php');
+require('../../include/init.php');
+include_once(SM_PATH . 'functions/imap_general.php');
+include_once(SM_PATH . 'functions/forms.php');
include_once(SM_PATH . 'plugins/filters/filters.php');
displayPageHeader($color, 'None');
/* get globals */
include_once(SM_PATH . 'plugins/filters/filters.php');
displayPageHeader($color, 'None');
/* get globals */
-sqgetGlobalVar('username', $username, SQ_SESSION);
-sqgetGlobalVar('key', $key, SQ_COOKIE);
-sqgetGlobalVar('onetimepad', $onetimepad, SQ_SESSION);
sqgetGlobalVar('delimiter', $delimiter, SQ_SESSION);
sqgetGlobalVar('theid', $theid);
sqgetGlobalVar('delimiter', $delimiter, SQ_SESSION);
sqgetGlobalVar('theid', $theid);
@@
-104,8
+98,7
@@
if (sqgetGlobalVar('filter_submit',$filter_submit,SQ_POST)) {
'center', '', 'width="95%" border="0" cellpadding="2" cellspacing="0"'
) .
'<br /><form method="post" action="options.php">'.
'center', '', 'width="95%" border="0" cellpadding="2" cellspacing="0"'
) .
'<br /><form method="post" action="options.php">'.
- '<div style="text-align: center;">'.
- html_tag( 'table', '', '', '', 'border="0" cellpadding="2" cellspacing="0"' ) .
+ html_tag( 'table', '', 'center', '', 'border="0" cellpadding="2" cellspacing="0"' ) .
html_tag( 'tr' ) .
html_tag( 'th', _("What to Scan:"), 'right', '', 'style="white-space: nowrap;"' ) .
html_tag( 'td', '', 'left' ) .
html_tag( 'tr' ) .
html_tag( 'th', _("What to Scan:"), 'right', '', 'style="white-space: nowrap;"' ) .
html_tag( 'td', '', 'left' ) .
@@
-124,7
+117,6
@@
if (sqgetGlobalVar('filter_submit',$filter_submit,SQ_POST)) {
'</td>'.
html_tag( 'td', '<input type="submit" name="user_submit" value="' . _("Save") . '" />', 'left' ) .
'</table>'.
'</td>'.
html_tag( 'td', '<input type="submit" name="user_submit" value="' . _("Save") . '" />', 'left' ) .
'</table>'.
- '</div>'.
'</form>'.
html_tag( 'div', '[<a href="options.php?action=add">' . _("New") .
'</form>'.
html_tag( 'div', '[<a href="options.php?action=add">' . _("New") .
@@
-133,7
+125,7
@@
if (sqgetGlobalVar('filter_submit',$filter_submit,SQ_POST)) {
if (isset($action) && ($action == 'add' || $action == 'edit')) {
if (isset($action) && ($action == 'add' || $action == 'edit')) {
- $imapConnection = sqimap_login($username,
$key
, $imapServerAddress, $imapPort, 0);
+ $imapConnection = sqimap_login($username,
false
, $imapServerAddress, $imapPort, 0);
$boxes = sqimap_mailbox_list($imapConnection);
for ($a = 0, $cnt = count($boxes); $a < $cnt; $a++) {
$boxes = sqimap_mailbox_list($imapConnection);
for ($a = 0, $cnt = count($boxes); $a < $cnt; $a++) {
@@
-202,8
+194,8
@@
if (sqgetGlobalVar('filter_submit',$filter_submit,SQ_POST)) {
if ( isset($filters[$theid]['folder']) )
$selected = array(strtolower($filters[$theid]['folder']));
echo sqimap_mailbox_option_list(0, $selected, 0, $boxes);
if ( isset($filters[$theid]['folder']) )
$selected = array(strtolower($filters[$theid]['folder']));
echo sqimap_mailbox_option_list(0, $selected, 0, $boxes);
- echo
'</t
t>'.
- '</
selec
t>'.
+ echo
'</selec
t>'.
+ '</
t
t>'.
'</td>'.
'</tr>'.
'</table>'.
'</td>'.
'</tr>'.
'</table>'.
@@
-214,6
+206,7
@@
if (sqgetGlobalVar('filter_submit',$filter_submit,SQ_POST)) {
}
}
+if (count($filters)) {
echo html_tag( 'table', '', 'center', '', 'border="0" cellpadding="3" cellspacing="0"' );
for ($i=0, $num = count($filters); $i < $num; $i++) {
echo html_tag( 'table', '', 'center', '', 'border="0" cellpadding="3" cellspacing="0"' );
for ($i=0, $num = count($filters); $i < $num; $i++) {
@@
-250,15
+243,15
@@
if (sqgetGlobalVar('filter_submit',$filter_submit,SQ_POST)) {
printf( _("If %s contains %s then move to %s"),
'<b>'.$filters[$i]['where'].'</b>',
'<b>'.$filters[$i]['what'].'</b>',
printf( _("If %s contains %s then move to %s"),
'<b>'.$filters[$i]['where'].'</b>',
'<b>'.$filters[$i]['what'].'</b>',
- '<b>'.
imap_utf7_decode_local($fdr
).'</b>');
+ '<b>'.
htmlspecialchars(imap_utf7_decode_local($fdr)
).'</b>');
echo '</td></tr>';
}
echo '</td></tr>';
}
- echo '</table>'.
- html_tag( 'table',
+ echo '</table>';
+}
+ echo html_tag( 'table',
html_tag( 'tr',
html_tag( 'td', ' ', 'left' )
) ,
'center', '', 'width="80%" border="0" cellpadding="2" cellspacing="0"' );
echo '</body></html>';
html_tag( 'tr',
html_tag( 'td', ' ', 'left' )
) ,
'center', '', 'width="80%" border="0" cellpadding="2" cellspacing="0"' );
echo '</body></html>';
-?>
\ No newline at end of file