|
From: <be...@us...> - 2014-09-17 10:58:42
|
Revision: 12787
http://sourceforge.net/p/xoops/svn/12787
Author: beckmi
Date: 2014-09-17 10:58:25 +0000 (Wed, 17 Sep 2014)
Log Message:
-----------
Clean-up of assets, PSR-2, __DIR__, English updates, centering icons in Actions (work in progress)
Modified Paths:
--------------
XoopsModules/xnewsletter/branches/mamba/xnewsletter/admin/about.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter/admin/accounts.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter/admin/admin_footer.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter/admin/admin_header.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter/admin/attachment.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter/admin/bmh.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter/admin/bmh_callback_database.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter/admin/cat.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter/admin/catsubscr.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter/admin/import.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter/admin/index.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter/admin/letter.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter/admin/mailinglist.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter/admin/maintenance.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter/admin/menu.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter/admin/protocol.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter/admin/sendletter.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter/admin/subscr.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter/admin/task.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter/admin/template.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter/assets/css/module.css
XoopsModules/xnewsletter/branches/mamba/xnewsletter/attachment.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter/blocks/blocks_catsubscr.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter/blocks/blocks_letter.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter/blocks/blocks_subscrinfo.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter/class/accounts.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter/class/attachment.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter/class/bmh.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter/class/breadcrumb.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter/class/cat.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter/class/catsubscr.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter/class/class.xnewslettermailer.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter/class/import.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter/class/letter.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter/class/mailinglist.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter/class/protocol.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter/class/request.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter/class/session.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter/class/subscr.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter/class/task.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter/class/template.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter/class/xNewsletter_attachment.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter/class/xNewsletter_bmh.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter/class/xNewsletter_cat.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter/class/xNewsletter_catsubscr.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter/class/xNewsletter_import.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter/class/xNewsletter_letter.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter/class/xNewsletter_mailinglist.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter/class/xNewsletter_protocol.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter/class/xNewsletter_subscr.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter/class/xNewsletter_task.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter/class/xnewsletter.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter/cron.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter/docs/changelog.txt
XoopsModules/xnewsletter/branches/mamba/xnewsletter/header.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter/include/common.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter/include/config.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter/include/constants.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter/include/functions.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter/include/html2text/epl-v10.html
XoopsModules/xnewsletter/branches/mamba/xnewsletter/include/html2text/html2text.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter/include/install.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter/include/mailinglist.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter/include/oninstall.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter/include/onupdate.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter/include/phpmailer/PHPMailerAutoload.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter/include/phpmailer/class.phpmailer.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter/include/phpmailer/class.pop3.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter/include/phpmailer/class.smtp.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter/include/phpmailer/extras/EasyPeasyICS.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter/include/phpmailer/extras/class.html2text.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter/include/phpmailer/extras/htmlfilter.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter/include/phpmailer/extras/ntlm_sasl_client.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter/include/phpmailer/language/phpmailer.lang-ar.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter/include/phpmailer/language/phpmailer.lang-be.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter/include/phpmailer/language/phpmailer.lang-br.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter/include/phpmailer/language/phpmailer.lang-ca.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter/include/phpmailer/language/phpmailer.lang-ch.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter/include/phpmailer/language/phpmailer.lang-cz.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter/include/phpmailer/language/phpmailer.lang-de.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter/include/phpmailer/language/phpmailer.lang-dk.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter/include/phpmailer/language/phpmailer.lang-el.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter/include/phpmailer/language/phpmailer.lang-eo.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter/include/phpmailer/language/phpmailer.lang-es.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter/include/phpmailer/language/phpmailer.lang-et.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter/include/phpmailer/language/phpmailer.lang-fa.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter/include/phpmailer/language/phpmailer.lang-fi.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter/include/phpmailer/language/phpmailer.lang-fo.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter/include/phpmailer/language/phpmailer.lang-fr.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter/include/phpmailer/language/phpmailer.lang-gl.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter/include/phpmailer/language/phpmailer.lang-he.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter/include/phpmailer/language/phpmailer.lang-hr.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter/include/phpmailer/language/phpmailer.lang-hu.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter/include/phpmailer/language/phpmailer.lang-it.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter/include/phpmailer/language/phpmailer.lang-ja.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter/include/phpmailer/language/phpmailer.lang-ka.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter/include/phpmailer/language/phpmailer.lang-lt.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter/include/phpmailer/language/phpmailer.lang-lv.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter/include/phpmailer/language/phpmailer.lang-nl.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter/include/phpmailer/language/phpmailer.lang-no.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter/include/phpmailer/language/phpmailer.lang-pl.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter/include/phpmailer/language/phpmailer.lang-pt.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter/include/phpmailer/language/phpmailer.lang-ro.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter/include/phpmailer/language/phpmailer.lang-ru.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter/include/phpmailer/language/phpmailer.lang-se.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter/include/phpmailer/language/phpmailer.lang-sk.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter/include/phpmailer/language/phpmailer.lang-sr.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter/include/phpmailer/language/phpmailer.lang-tr.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter/include/phpmailer/language/phpmailer.lang-uk.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter/include/phpmailer/language/phpmailer.lang-vi.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter/include/phpmailer/language/phpmailer.lang-zh.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter/include/phpmailer/language/phpmailer.lang-zh_cn.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter/include/phpmailer_bmh/class.phpmailer-bmh.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter/include/phpmailer_bmh/phpmailer-bmh_rules.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter/include/search.inc.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter/include/task.inc.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter/index.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter/language/english/admin.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter/language/english/blocks.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter/language/english/common.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter/language/english/main.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter/language/english/modinfo.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter/language/italian/admin.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter/language/italian/blocks.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter/language/italian/common.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter/language/italian/main.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter/language/italian/modinfo.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter/letter.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter/plugins/csv.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter/plugins/evennews.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter/plugins/rmbulletin.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter/plugins/smartpartner.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter/plugins/subscribers.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter/plugins/weblinks.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter/plugins/xoopsuser.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter/print.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter/protocol.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter/sendletter.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter/sql/mysql.sql
XoopsModules/xnewsletter/branches/mamba/xnewsletter/subscription.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter/xoops_version.php
Added Paths:
-----------
XoopsModules/xnewsletter/branches/mamba/xnewsletter/class/xewsletter_accounts.php
Removed Paths:
-------------
XoopsModules/xnewsletter/branches/mamba/xnewsletter/class/xNewsletter_accounts.php
XoopsModules/xnewsletter/branches/mamba/xnewsletter/css/
XoopsModules/xnewsletter/branches/mamba/xnewsletter/images/
XoopsModules/xnewsletter/branches/mamba/xnewsletter/include/module.css
XoopsModules/xnewsletter/branches/mamba/xnewsletter/templates/blocks/xnewsletter_catsubscr_block_day.html
XoopsModules/xnewsletter/branches/mamba/xnewsletter/templates/blocks/xnewsletter_catsubscr_block_recent.html
XoopsModules/xnewsletter/branches/mamba/xnewsletter/templates/blocks/xnewsletter_letter_block_day.html
XoopsModules/xnewsletter/branches/mamba/xnewsletter/templates/blocks/xnewsletter_letter_block_random.html
XoopsModules/xnewsletter/branches/mamba/xnewsletter/templates/blocks/xnewsletter_letter_block_recent.html
XoopsModules/xnewsletter/branches/mamba/xnewsletter/templates/xNewsletter_footer.html
XoopsModules/xnewsletter/branches/mamba/xnewsletter/templates/xNewsletter_header.html
XoopsModules/xnewsletter/branches/mamba/xnewsletter/templates/xNewsletter_index.html
XoopsModules/xnewsletter/branches/mamba/xnewsletter/templates/xnewsletter_letter.html
XoopsModules/xnewsletter/branches/mamba/xnewsletter/templates/xnewsletter_letter_list.html
XoopsModules/xnewsletter/branches/mamba/xnewsletter/templates/xnewsletter_protocol.html
XoopsModules/xnewsletter/branches/mamba/xnewsletter/templates/xnewsletter_subscription.html
XoopsModules/xnewsletter/branches/mamba/xnewsletter/templates/xnewsletter_subscription_result.html
Modified: XoopsModules/xnewsletter/branches/mamba/xnewsletter/admin/about.php
===================================================================
--- XoopsModules/xnewsletter/branches/mamba/xnewsletter/admin/about.php 2014-09-17 10:47:21 UTC (rev 12786)
+++ XoopsModules/xnewsletter/branches/mamba/xnewsletter/admin/about.php 2014-09-17 10:58:25 UTC (rev 12787)
@@ -17,20 +17,21 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* ---------------------------------------------------------------------------
- * @copyright Goffy ( wedega.com )
- * @license GPL 2.0
- * @package xnewsletter
- * @author Goffy ( web...@we... )
*
+ * @copyright Goffy ( wedega.com )
+ * @license GPL 2.0
+ * @package xnewsletter
+ * @author Goffy ( web...@we... )
+ *
* Version : $Id $
* ****************************************************************************
*/
-include_once dirname(__FILE__) . '/admin_header.php';
+include_once __DIR__ . '/admin_header.php';
xoops_cp_header();
//global $indexAdmin;
echo $indexAdmin->addNavigation('about.php');
echo $indexAdmin->renderAbout('9P3B3FXKF868J', false);
-include_once dirname(__FILE__) . '/admin_footer.php';
+include_once __DIR__ . '/admin_footer.php';
Modified: XoopsModules/xnewsletter/branches/mamba/xnewsletter/admin/accounts.php
===================================================================
--- XoopsModules/xnewsletter/branches/mamba/xnewsletter/admin/accounts.php 2014-09-17 10:47:21 UTC (rev 12786)
+++ XoopsModules/xnewsletter/branches/mamba/xnewsletter/admin/accounts.php 2014-09-17 10:58:25 UTC (rev 12787)
@@ -17,17 +17,18 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* ---------------------------------------------------------------------------
- * @copyright Goffy ( wedega.com )
- * @license GPL 2.0
- * @package xnewsletter
- * @author Goffy ( web...@we... )
*
+ * @copyright Goffy ( wedega.com )
+ * @license GPL 2.0
+ * @package xnewsletter
+ * @author Goffy ( web...@we... )
+ *
* Version : $Id $
* ****************************************************************************
*/
$currentFile = basename(__FILE__);
-include_once dirname(__FILE__) . '/admin_header.php';
+include_once __DIR__ . '/admin_header.php';
xoops_cp_header();
// We recovered the value of the argument op in the URL$
@@ -36,7 +37,9 @@
$accounts_id = xnewsletterRequest::getInt('accounts_id', 0);
$post = xnewsletterRequest::getString('post', '');
-if ($post == '' && $op == 'save_accounts' && $save_and_check =='none') $op = "edit_account";
+if ($post == '' && $op == 'save_accounts' && $save_and_check == 'none') {
+ $op = "edit_account";
+}
switch ($op) {
case 'check_account':
@@ -51,7 +54,7 @@
}
$mailhost = $accountObj->getVar('accounts_server_in');
- $port = $accountObj->getVar('accounts_port_in');
+ $port = $accountObj->getVar('accounts_port_in');
switch ($accountObj->getVar('accounts_type')) {
case _XNEWSLETTER_ACCOUNTS_TYPE_VAL_POP3:
$service = 'pop3';
@@ -65,19 +68,23 @@
$service = '';
break;
}
- $service_option = $accountObj->getVar('accounts_securetype_in');
- $accounts_password = $accountObj->getVar('accounts_password');
- $accounts_username = $accountObj->getVar('accounts_username');
- $accounts_inbox = $accountObj->getVar('accounts_inbox');
- $accounts_inbox_ok = false;
- $accounts_hardbox = $accountObj->getVar('accounts_hardbox');
+ $service_option = $accountObj->getVar('accounts_securetype_in');
+ $accounts_password = $accountObj->getVar('accounts_password');
+ $accounts_username = $accountObj->getVar('accounts_username');
+ $accounts_inbox = $accountObj->getVar('accounts_inbox');
+ $accounts_inbox_ok = false;
+ $accounts_hardbox = $accountObj->getVar('accounts_hardbox');
$accounts_hardbox_ok = false;
- $accounts_softbox = $accountObj->getVar('accounts_softbox');
+ $accounts_softbox = $accountObj->getVar('accounts_softbox');
$accounts_softbox_ok = false;
$command = $mailhost . ":" . $port;
- if ($service !='') $command .= '/' . $service;
- if ($service_option !='') $command .= '/' . $service_option;
+ if ($service != '') {
+ $command .= '/' . $service;
+ }
+ if ($service_option != '') {
+ $command .= '/' . $service_option;
+ }
echo "<table class='outer width100' cellspacing='1'>";
echo "<tr>";
@@ -90,7 +97,7 @@
if ($mbox === false) {
echo "<tr>";
echo "<td>" . XNEWSLETTER_IMG_FAILED . "</td>";
- echo "<td>" . _AM_XNEWSLETTER_ACCOUNTS_CHECK_OPEN_MAILBOX._AM_XNEWSLETTER_ACCOUNTS_CHECK_FAILED . "</td>";
+ echo "<td>" . _AM_XNEWSLETTER_ACCOUNTS_CHECK_OPEN_MAILBOX . _AM_XNEWSLETTER_ACCOUNTS_CHECK_FAILED . "</td>";
echo "<td>" . imap_last_error() . "</td>";
echo "</tr>";
} else {
@@ -104,26 +111,28 @@
if ($folders == false) {
echo "<tr>";
echo "<td>" . XNEWSLETTER_IMG_FAILED . "</td>";
- echo "<td>" . _AM_XNEWSLETTER_ACCOUNTS_CHECK_OPEN_FOLDERS._AM_XNEWSLETTER_ACCOUNTS_CHECK_FAILED . "</td>";
+ echo "<td>" . _AM_XNEWSLETTER_ACCOUNTS_CHECK_OPEN_FOLDERS . _AM_XNEWSLETTER_ACCOUNTS_CHECK_FAILED . "</td>";
echo "<td>" . imap_last_error() . "</td>";
echo "</tr>";
} else {
echo "<tr>";
echo "<td>" . XNEWSLETTER_IMG_OK . "</td>";
- echo "<td>" . _AM_XNEWSLETTER_ACCOUNTS_CHECK_OPEN_FOLDERS._AM_XNEWSLETTER_ACCOUNTS_CHECK_OK . "</td>";
+ echo "<td>" . _AM_XNEWSLETTER_ACCOUNTS_CHECK_OPEN_FOLDERS . _AM_XNEWSLETTER_ACCOUNTS_CHECK_OK . "</td>";
echo "<td>";
if (is_array($folders)) {
reset($folders);
sort($folders);
$foldercreated = 0;
- while (list( $key, $val) = each($folders)) {
+ while (list($key, $val) = each($folders)) {
echo "($key) ";
- echo imap_utf7_decode (str_replace("{" . $command . "}", '', $val)) . "<br>\n";
- if ("{" . $command . "}" . $accounts_inbox == $val) $accounts_inbox_ok = true;
+ echo imap_utf7_decode(str_replace("{" . $command . "}", '', $val)) . "<br>\n";
+ if ("{" . $command . "}" . $accounts_inbox == $val) {
+ $accounts_inbox_ok = true;
+ }
if ("{" . $command . "}" . $accounts_hardbox == $val) {
$accounts_hardbox_ok = true;
} else {
- @imap_createmailbox($mbox, imap_utf7_encode('{'.$command.'}' . $accounts_hardbox));
+ @imap_createmailbox($mbox, imap_utf7_encode('{' . $command . '}' . $accounts_hardbox));
$foldercreated = 1;
}
if ("{" . $command . "}" . $accounts_softbox == $val) {
@@ -135,9 +144,13 @@
}
if ($foldercreated == 1) {
$folders_recheck = imap_listmailbox($mbox, "{" . $command . "}", "*");
- while (list( $key, $val) = each ($folders_recheck)) {
- if ("{" . $command . "}" . $accounts_hardbox == $val) $accounts_hardbox_ok = true;
- if ("{" . $command . "}" . $accounts_softbox == $val) $accounts_softbox_ok = true;
+ while (list($key, $val) = each($folders_recheck)) {
+ if ("{" . $command . "}" . $accounts_hardbox == $val) {
+ $accounts_hardbox_ok = true;
+ }
+ if ("{" . $command . "}" . $accounts_softbox == $val) {
+ $accounts_softbox_ok = true;
+ }
}
}
}
@@ -160,7 +173,7 @@
echo _AM_XNEWSLETTER_ACCOUNTS_CHECK_FAILED . XNEWSLETTER_IMG_FAILED;
}
echo "<br />";
- echo _AM_XNEWSLETTER_ACCOUNTS_CHECK_BMH_HARDBOX." ";
+ echo _AM_XNEWSLETTER_ACCOUNTS_CHECK_BMH_HARDBOX . " ";
if ($accounts_hardbox_ok == true) {
echo _AM_XNEWSLETTER_ACCOUNTS_CHECK_OK . XNEWSLETTER_IMG_OK;
} else {
@@ -177,7 +190,7 @@
echo "</td>";
} else {
echo "<td>" . XNEWSLETTER_IMG_OK . "</td>";
- echo "<td>" . _AM_XNEWSLETTER_ACCOUNTS_CHECK_BMH._AM_XNEWSLETTER_ACCOUNTS_CHECK_SKIPPED . "</td>";
+ echo "<td>" . _AM_XNEWSLETTER_ACCOUNTS_CHECK_BMH . _AM_XNEWSLETTER_ACCOUNTS_CHECK_SKIPPED . "</td>";
echo "<td></td>";
}
echo "</tr>";
@@ -190,16 +203,16 @@
case 'list':
case 'list_accounts':
default:
- echo $indexAdmin->addNavigation($currentFile) ;
+ echo $indexAdmin->addNavigation($currentFile);
$indexAdmin->addItemButton(_AM_XNEWSLETTER_NEWACCOUNTS, '?op=new_account', 'add');
echo $indexAdmin->renderButton();
//
- $limit = $xnewsletter->getConfig('adminperpage');
+ $limit = $xnewsletter->getConfig('adminperpage');
$accountsCriteria = new CriteriaCompo();
$accountsCriteria->setSort("accounts_id ASC, accounts_type");
$accountsCriteria->setOrder("ASC");
$accountsCount = $xnewsletter->getHandler('accounts')->getCount();
- $start = xnewsletterRequest::getInt('start', 0);
+ $start = xnewsletterRequest::getInt('start', 0);
$accountsCriteria->setStart($start);
$accountsCriteria->setLimit($limit);
$accountsObjs = $xnewsletter->getHandler('accounts')->getAll($accountsCriteria);
@@ -220,39 +233,40 @@
echo " <th>" . _AM_XNEWSLETTER_ACCOUNTS_YOURNAME . "</th>";
echo " <th>" . _AM_XNEWSLETTER_ACCOUNTS_YOURMAIL . "</th>";
echo " <th>" . _AM_XNEWSLETTER_ACCOUNTS_DEFAULT . "</th>";
- echo " <th>"._AM_XNEWSLETTER_FORMACTION . "</th>";
+ echo " <th>" . _AM_XNEWSLETTER_FORMACTION . "</th>";
echo "</tr>";
if ($accountsCount > 0) {
$class = 'odd';
foreach ($accountsObjs as $accounts_id => $accountsObj) {
- echo "<tr class='".$class."'>";
+ echo "<tr class='" . $class . "'>";
$class = ($class == 'even') ? 'odd' : 'even';
echo "<td class='center'>{$accounts_id}</td>";
$accounts_types = array(
- _XNEWSLETTER_ACCOUNTS_TYPE_VAL_PHP_MAIL => _AM_XNEWSLETTER_ACCOUNTS_TYPE_PHPMAIL,
+ _XNEWSLETTER_ACCOUNTS_TYPE_VAL_PHP_MAIL => _AM_XNEWSLETTER_ACCOUNTS_TYPE_PHPMAIL,
_XNEWSLETTER_ACCOUNTS_TYPE_VAL_PHP_SENDMAIL => _AM_XNEWSLETTER_ACCOUNTS_TYPE_PHPSENDMAIL,
- _XNEWSLETTER_ACCOUNTS_TYPE_VAL_POP3 => _AM_XNEWSLETTER_ACCOUNTS_TYPE_POP3,
- _XNEWSLETTER_ACCOUNTS_TYPE_VAL_SMTP => _AM_XNEWSLETTER_ACCOUNTS_TYPE_SMTP,
- _XNEWSLETTER_ACCOUNTS_TYPE_VAL_GMAIL => _AM_XNEWSLETTER_ACCOUNTS_TYPE_GMAIL
+ _XNEWSLETTER_ACCOUNTS_TYPE_VAL_POP3 => _AM_XNEWSLETTER_ACCOUNTS_TYPE_POP3,
+ _XNEWSLETTER_ACCOUNTS_TYPE_VAL_SMTP => _AM_XNEWSLETTER_ACCOUNTS_TYPE_SMTP,
+ _XNEWSLETTER_ACCOUNTS_TYPE_VAL_GMAIL => _AM_XNEWSLETTER_ACCOUNTS_TYPE_GMAIL
);
echo "<td>{$accounts_types[$accountsObj->getVar('accounts_type')]}</td>";
echo "<td>{$accountsObj->getVar('accounts_name')}</td>";
echo "<td>{$accountsObj->getVar('accounts_yourname')}</td>";
echo "<td>{$accountsObj->getVar('accounts_yourmail')}</td>";
$verif_accounts_default = ($accountsObj->getVar('accounts_default') == 1) ? _YES : _NO;
- echo "<td>{$verif_accounts_default}</td>";
+ echo "<td class='center'>{$verif_accounts_default}</td>";
- echo "<td>";
- echo " <a href='?op=edit_account&accounts_id={$accounts_id}'><img src=" . XNEWSLETTER_ICONS_URL . "/xn_edit.png alt='" . _EDIT . "' title='"._EDIT . "' /></a>";
+ echo "<td class='center'>";
+ echo " <a href='?op=edit_account&accounts_id={$accounts_id}'><img src=" . XNEWSLETTER_ICONS_URL . "/xn_edit.png alt='" . _EDIT . "' title='" . _EDIT . "' /></a>";
echo " <a href='?op=delete_account&accounts_id={$accounts_id}'><img src=" . XNEWSLETTER_ICONS_URL . "/xn_delete.png alt='" . _DELETE . "' title='" . _DELETE . "' /></a>";
if ($accountsObj->getVar("accounts_type") != _XNEWSLETTER_ACCOUNTS_TYPE_VAL_PHP_MAIL && $accountsObj->getVar('accounts_type') != _XNEWSLETTER_ACCOUNTS_TYPE_VAL_PHP_SENDMAIL) {
- echo " <a href='?op=check_account&accounts_id={$accounts_id}'><img src=" . XNEWSLETTER_ICONS_URL . "/xn_check.png alt='" . _AM_XNEWSLETTER_ACCOUNTS_TYPE_CHECK . "' title='" . _AM_XNEWSLETTER_ACCOUNTS_TYPE_CHECK . "' /></a>";
+ echo " <a href='?op=check_account&accounts_id={$accounts_id}'><img src=" . XNEWSLETTER_ICONS_URL . "/xn_check.png alt='" . _AM_XNEWSLETTER_ACCOUNTS_TYPE_CHECK . "' title='"
+ . _AM_XNEWSLETTER_ACCOUNTS_TYPE_CHECK . "' /></a>";
}
echo "</td>";
echo "</tr>";
}
- }
+ }
echo "</table>";
echo "<br />";
echo "<div>{$pagenav}</div>";
@@ -266,7 +280,7 @@
//
$accountObj = $xnewsletter->getHandler('accounts')->create();
$accountObj = xnewsletter_setPost($accountObj, $_POST);
- $form = $accountObj->getForm();
+ $form = $accountObj->getForm();
$form->display();
break;
@@ -275,9 +289,9 @@
redirect_header($currentFile, 3, implode(',', $GLOBALS['xoopsSecurity']->getErrors()));
}
- $accountObj = $xnewsletter->getHandler('accounts')->get($accounts_id);
+ $accountObj = $xnewsletter->getHandler('accounts')->get($accounts_id);
$_POST['accounts_id'] = $accounts_id;
- $accountObj = xnewsletter_setPost($accountObj, $_POST);
+ $accountObj = xnewsletter_setPost($accountObj, $_POST);
$accountsCriteria = new CriteriaCompo();
$accountsCriteria->add(new Criteria('accounts_default', 1));
@@ -286,7 +300,7 @@
if ($accountObj->getVar('accounts_default') == 1) {
$verif_accounts_default = 1;
//reset old accounts_default
- if(!$xnewsletter->getHandler('accounts')->updateAll('accounts_default', 0, null, false)) {
+ if (!$xnewsletter->getHandler('accounts')->updateAll('accounts_default', 0, null, false)) {
exit('MySQL-Error: ' . mysql_error());
}
} else {
@@ -296,7 +310,7 @@
$verif_accounts_default = 1;
}
$accountObj->setVar('accounts_default', $verif_accounts_default);
- if ($accountObj->getVar('accounts_yourmail') != '' && $accountObj->getVar('accounts_yourmail') != _AM_XNEWSLETTER_ACCOUNTS_TYPE_YOUREMAIL ) {
+ if ($accountObj->getVar('accounts_yourmail') != '' && $accountObj->getVar('accounts_yourmail') != _AM_XNEWSLETTER_ACCOUNTS_TYPE_YOUREMAIL) {
if ($xnewsletter->getHandler('accounts')->insert($accountObj)) {
if ($save_and_check == 'none') {
redirect_header('?op=list', 3, _AM_XNEWSLETTER_FORMOK);
@@ -325,7 +339,7 @@
}
$form = $accountObj->getForm();
$form->display();
- break;
+ break;
case 'delete_account':
$accountObj = $xnewsletter->getHandler('accounts')->get($accounts_id);
@@ -343,4 +357,4 @@
}
break;
}
-include_once dirname(__FILE__) . '/admin_footer.php';
+include_once __DIR__ . '/admin_footer.php';
Modified: XoopsModules/xnewsletter/branches/mamba/xnewsletter/admin/admin_footer.php
===================================================================
--- XoopsModules/xnewsletter/branches/mamba/xnewsletter/admin/admin_footer.php 2014-09-17 10:47:21 UTC (rev 12786)
+++ XoopsModules/xnewsletter/branches/mamba/xnewsletter/admin/admin_footer.php 2014-09-17 10:58:25 UTC (rev 12787)
@@ -17,11 +17,12 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* ---------------------------------------------------------------------------
- * @copyright Goffy ( wedega.com )
- * @license GPL 2.0
- * @package xnewsletter
- * @author Goffy ( web...@we... )
*
+ * @copyright Goffy ( wedega.com )
+ * @license GPL 2.0
+ * @package xnewsletter
+ * @author Goffy ( web...@we... )
+ *
* Version : $Id $
* ****************************************************************************
*/
Modified: XoopsModules/xnewsletter/branches/mamba/xnewsletter/admin/admin_header.php
===================================================================
--- XoopsModules/xnewsletter/branches/mamba/xnewsletter/admin/admin_header.php 2014-09-17 10:47:21 UTC (rev 12786)
+++ XoopsModules/xnewsletter/branches/mamba/xnewsletter/admin/admin_header.php 2014-09-17 10:58:25 UTC (rev 12787)
@@ -17,23 +17,24 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* ---------------------------------------------------------------------------
- * @copyright Goffy ( wedega.com )
- * @license GPL 2.0
- * @package xnewsletter
- * @author Goffy ( web...@we... )
*
+ * @copyright Goffy ( wedega.com )
+ * @license GPL 2.0
+ * @package xnewsletter
+ * @author Goffy ( web...@we... )
+ *
* Version : $Id $
* ****************************************************************************
*/
-include_once dirname(dirname(dirname(dirname(__FILE__)))) . '/mainfile.php';
-include_once dirname(dirname(__FILE__)) . '/include/common.php';
+include_once dirname(dirname(dirname(__DIR__))) . '/mainfile.php';
+include_once dirname(__DIR__) . '/include/common.php';
// Include xoops admin header
include_once XOOPS_ROOT_PATH . "/include/cp_functions.php";
-$pathIcon16 = XOOPS_URL . '/' . $xnewsletter->getModule()->getInfo('icons16');
-$pathIcon32 = XOOPS_URL . '/' . $xnewsletter->getModule()->getInfo('icons32');
+$pathIcon16 = XOOPS_URL . '/' . $xnewsletter->getModule()->getInfo('icons16');
+$pathIcon32 = XOOPS_URL . '/' . $xnewsletter->getModule()->getInfo('icons32');
$pathModuleAdmin = XOOPS_ROOT_PATH . '/' . $xnewsletter->getModule()->getInfo('dirmoduleadmin');
require_once $pathModuleAdmin . '/moduleadmin/moduleadmin.php';
@@ -42,7 +43,7 @@
xoops_loadLanguage('modinfo', $xnewsletter->getModule()->dirname());
xoops_loadLanguage('main', $xnewsletter->getModule()->dirname());
-define('XNEWSLETTER_IMG_OK', "<img src='" . XNEWSLETTER_ICONS_URL . "/xn_ok.png' alt='" . _AM_XNEWSLETTER_OK . "' title='"._AM_XNEWSLETTER_OK . "' /> ");
+define('XNEWSLETTER_IMG_OK', "<img src='" . XNEWSLETTER_ICONS_URL . "/xn_ok.png' alt='" . _AM_XNEWSLETTER_OK . "' title='" . _AM_XNEWSLETTER_OK . "' /> ");
define('XNEWSLETTER_IMG_FAILED', "<img src='" . XNEWSLETTER_ICONS_URL . "/xn_failed.png' alt='" . _AM_XNEWSLETTER_FAILED . "' title='" . _AM_XNEWSLETTER_FAILED . "' /> ");
if (!xnewsletter_checkModuleAdmin()) {
Modified: XoopsModules/xnewsletter/branches/mamba/xnewsletter/admin/attachment.php
===================================================================
--- XoopsModules/xnewsletter/branches/mamba/xnewsletter/admin/attachment.php 2014-09-17 10:47:21 UTC (rev 12786)
+++ XoopsModules/xnewsletter/branches/mamba/xnewsletter/admin/attachment.php 2014-09-17 10:58:25 UTC (rev 12787)
@@ -17,22 +17,23 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* ---------------------------------------------------------------------------
- * @copyright Goffy ( wedega.com )
- * @license GNU General Public License 2.0
- * @package xnewsletter
- * @author Goffy ( web...@we... )
*
+ * @copyright Goffy ( wedega.com )
+ * @license GNU General Public License 2.0
+ * @package xnewsletter
+ * @author Goffy ( web...@we... )
+ *
* Version : $Id $
* ****************************************************************************
*/
$currentFile = basename(__FILE__);
-include_once dirname(__FILE__) . '/admin_header.php';
+include_once __DIR__ . '/admin_header.php';
xoops_cp_header();
// We recovered the value of the argument op in the URL$
-$op = xnewsletterRequest::getString('op', 'list');
-$attachment_id = xnewsletterRequest::getInt('attachment_id', 0);
+$op = xnewsletterRequest::getString('op', 'list');
+$attachment_id = xnewsletterRequest::getInt('attachment_id', 0);
switch ($op) {
case 'list':
@@ -40,12 +41,12 @@
echo $indexAdmin->addNavigation($currentFile);
echo $indexAdmin->renderButton();
//
- $limit = $xnewsletter->getConfig('adminperpage');
+ $limit = $xnewsletter->getConfig('adminperpage');
$attachmentCriteria = new CriteriaCompo();
$attachmentCriteria->setSort('attachment_letter_id DESC, attachment_id');
$attachmentCriteria->setOrder('DESC');
$attachmentCount = $xnewsletter->getHandler('attachment')->getCount();
- $start = xnewsletterRequest::getInt('start', 0);
+ $start = xnewsletterRequest::getInt('start', 0);
$attachmentCriteria->setStart($start);
$attachmentCriteria->setLimit($limit);
$attachmentObjs = $xnewsletter->getHandler('attachment')->getObjects($attachmentCriteria, true);
@@ -83,7 +84,7 @@
echo "</td>";
echo "<td>" . XoopsUser::getUnameFromId($attachmentObj->getVar('attachment_submitter'), 'S') . "</td>";
echo "<td>" . formatTimeStamp($attachmentObj->getVar('attachment_created'), 'S') . "</td>";
- echo "<td>";
+ echo "<td class='center'>";
echo " <a href='?op=edit_attachment&attachment_id={$attachment_id}'><img src=" . XNEWSLETTER_ICONS_URL . "/xn_edit.png alt='" . _EDIT . "' title='" . _EDIT . "' /></a>";
echo " ";
echo " <a href='?op=delete_attachment&attachment_id={$attachment_id}'><img src=" . XNEWSLETTER_ICONS_URL . "/xn_delete.png alt='" . _DELETE . "' title='" . _DELETE . "' /></a>";
@@ -102,13 +103,13 @@
echo $indexAdmin->renderButton();
//
$attachmentObj = $xnewsletter->getHandler('attachment')->get($attachment_id);
- $form = $attachmentObj->getForm();
+ $form = $attachmentObj->getForm();
$form->display();
break;
case 'save_attachment':
if (!$GLOBALS['xoopsSecurity']->check()) {
- redirect_header($currentFile, 3, implode(',', $GLOBALS['xoopsSecurity']->getErrors()));
+ redirect_header($currentFile, 3, implode(',', $GLOBALS['xoopsSecurity']->getErrors()));
}
//
$attachmentObj = $xnewsletter->getHandler('attachment')->get($attachment_id);
@@ -136,9 +137,13 @@
echo $attachmentObj->getHtmlErrors();
}
} else {
- xoops_confirm(array('ok' => true, 'attachment_id' => $attachment_id, 'op' => 'delete_attachment'), $_SERVER['REQUEST_URI'], sprintf(_AM_XNEWSLETTER_FORMSUREDEL, $attachmentObj->getVar('attachment_letter_id')));
+ xoops_confirm(
+ array('ok' => true, 'attachment_id' => $attachment_id, 'op' => 'delete_attachment'),
+ $_SERVER['REQUEST_URI'],
+ sprintf(_AM_XNEWSLETTER_FORMSUREDEL, $attachmentObj->getVar('attachment_letter_id'))
+ );
}
- break;
+ break;
}
-include_once dirname(__FILE__) . '/admin_footer.php';
+include_once __DIR__ . '/admin_footer.php';
Modified: XoopsModules/xnewsletter/branches/mamba/xnewsletter/admin/bmh.php
===================================================================
--- XoopsModules/xnewsletter/branches/mamba/xnewsletter/admin/bmh.php 2014-09-17 10:47:21 UTC (rev 12786)
+++ XoopsModules/xnewsletter/branches/mamba/xnewsletter/admin/bmh.php 2014-09-17 10:58:25 UTC (rev 12787)
@@ -17,52 +17,53 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* ---------------------------------------------------------------------------
- * @copyright Goffy ( wedega.com )
- * @license GNU General Public License 2.0
- * @package xnewsletter
- * @author Goffy ( web...@we... )
*
+ * @copyright Goffy ( wedega.com )
+ * @license GNU General Public License 2.0
+ * @package xnewsletter
+ * @author Goffy ( web...@we... )
+ *
* Version : $Id $
* ****************************************************************************
*/
$currentFile = basename(__FILE__);
-include_once dirname(__FILE__) . '/admin_header.php';
+include_once __DIR__ . '/admin_header.php';
xoops_cp_header();
// We recovered the value of the argument op in the URL$
-$op = xnewsletterRequest::getString('op', 'list');
-$bmh_id = xnewsletterRequest::getInt('bmh_id', 0);
+$op = xnewsletterRequest::getString('op', 'list');
+$bmh_id = xnewsletterRequest::getInt('bmh_id', 0);
$bmh_measure = xnewsletterRequest::getInt('bmh_measure', 0);
-$filter = xnewsletterRequest::getInt('bmh_measure_filter', _XNEWSLETTER_BMH_MEASURE_VAL_ALL);
+$filter = xnewsletterRequest::getInt('bmh_measure_filter', _XNEWSLETTER_BMH_MEASURE_VAL_ALL);
switch ($op) {
case 'bmh_delsubscr':
if (xnewsletterRequest::getBool('ok', false, 'POST') == true) {
$count_err = 0;
- $bmhObj = $xnewsletter->getHandler('bmh')->get($bmh_id);
+ $bmhObj = $xnewsletter->getHandler('bmh')->get($bmh_id);
$bmh_email = $bmhObj->getVar('bmh_email');
$sql = "SELECT subscr_id FROM {$xoopsDB->prefix("xnewsletter_subscr")}";
$sql .= " WHERE (subscr_email='{$bmh_email}')";
$sql .= " LIMIT 1;";
- if ( $user = $xoopsDB->query($sql) ) {
- $row_user = $xoopsDB->fetchRow($user);
- $subscr_id = (int) $row_user[0];
+ if ($user = $xoopsDB->query($sql)) {
+ $row_user = $xoopsDB->fetchRow($user);
+ $subscr_id = (int)$row_user[0];
}
if ($subscr_id == 0) {
//set bmh_measure for all entries in bmh with this email
$sql_upd_measure = "UPDATE {$xoopsDB->prefix('xnewsletter_bmh')} SET `bmh_measure` = '" . _XNEWSLETTER_BMH_MEASURE_VAL_NOTHING . "'";
- $sql_upd_measure .=" WHERE ((`{$xoopsDB->prefix('xnewsletter_bmh')}`.`bmh_email` ='{$bmh_email}') AND (`{$xoopsDB->prefix('xnewsletter_bmh')}`.`bmh_measure` ='0'))";
+ $sql_upd_measure .= " WHERE ((`{$xoopsDB->prefix('xnewsletter_bmh')}`.`bmh_email` ='{$bmh_email}') AND (`{$xoopsDB->prefix('xnewsletter_bmh')}`.`bmh_measure` ='0'))";
$xoopsDB->query($sql_upd_measure);
redirect_header('?op=list', 3, _AM_XNEWSLETTER_BMH_ERROR_NO_SUBSCRID);
}
$subscrObj = $xnewsletter->getHandler('subscr')->get($subscr_id);
// delete subscriber
- if (!$xnewsletter->getHandler('subscr')->delete($subscrObj,true)) {
- $actionprot_err = $subscrObj->getHtmlErrors()."<br/><br/><br/>";
+ if (!$xnewsletter->getHandler('subscr')->delete($subscrObj, true)) {
+ $actionprot_err = $subscrObj->getHtmlErrors() . "<br/><br/><br/>";
++$count_err;
}
@@ -73,8 +74,8 @@
if ($catsubscrsCount > 0) {
$catsubscrObjs = $xnewsletter->getHandler('catsubscr')->getAll($catsubscrCriteria);
foreach ($catsubscrObjs as $catsubscr_id => $catsubscrObj) {
- $catsubscrObj = $xnewsletter->getHandler('catsubscr')->get($catsubscrObj->getVar('catsubscr_id'));
- $catObj = $xnewsletter->getHandler('cat')->get($catsubscrObj->getVar('catsubscr_catid'));
+ $catsubscrObj = $xnewsletter->getHandler('catsubscr')->get($catsubscrObj->getVar('catsubscr_id'));
+ $catObj = $xnewsletter->getHandler('cat')->get($catsubscrObj->getVar('catsubscr_catid'));
$cat_mailinglist = $catObj->getVar('cat_mailinglist');
if ($xnewsletter->getHandler('catsubscr')->delete($catsubscrObj, true)) {
@@ -101,12 +102,16 @@
break;
case 'handle_bmh':
- if ($bmh_id == 0) redirect_header($currentFile, 3, _AM_XNEWSLETTER_ERROR_NO_VALID_ID);
- if ($bmh_measure == 0) redirect_header($currentFile, 3, _AM_XNEWSLETTER_ERROR_NO_VALID_ID);
+ if ($bmh_id == 0) {
+ redirect_header($currentFile, 3, _AM_XNEWSLETTER_ERROR_NO_VALID_ID);
+ }
+ if ($bmh_measure == 0) {
+ redirect_header($currentFile, 3, _AM_XNEWSLETTER_ERROR_NO_VALID_ID);
+ }
$bmhObj = $xnewsletter->getHandler('bmh')->get($bmh_id);
- if ($bmhObj->getVar('bmh_measure') == _XNEWSLETTER_BMH_MEASURE_VAL_DELETE ) {
+ if ($bmhObj->getVar('bmh_measure') == _XNEWSLETTER_BMH_MEASURE_VAL_DELETE) {
redirect_header("?op=list&filter={$filter}'", 3, _AM_XNEWSLETTER_BMH_MEASURE_ALREADY_DELETED);
}
@@ -116,13 +121,17 @@
$sql = "UPDATE `{$xoopsDB->prefix('xnewsletter_subscr')}` INNER JOIN `{$xoopsDB->prefix('xnewsletter_catsubscr')}` ON `subscr_id` = `catsubscr_subscrid`";
$sql .= " SET `catsubscr_quited` = " . time();
$sql .= " WHERE (((`subscr_email`)='{$bmh_email}'))";
- if(!$result = $xoopsDB->queryF($sql)) die ('MySQL-Error: ' . mysql_error());
+ if (!$result = $xoopsDB->queryF($sql)) {
+ die ('MySQL-Error: ' . mysql_error());
+ }
}
//set bmh_measure for all entries in bmh with this email
$sql_upd = "UPDATE {$xoopsDB->prefix('xnewsletter_bmh')}";
$sql_upd .= " SET `bmh_measure` = '{$bmh_measure}', `bmh_submitter` = '{$xoopsUser->uid()}', `bmh_created` = '" . time() . "'";
$sql_upd .= " WHERE ((`{$xoopsDB->prefix('xnewsletter_bmh')}`.`bmh_email` ='{$bmh_email}') AND (`{$xoopsDB->prefix('xnewsletter_bmh')}`.`bmh_measure` ='0'))";
- if(!$result = $xoopsDB->queryF($sql_upd)) die ('MySQL-Error: ' . mysql_error());
+ if (!$result = $xoopsDB->queryF($sql_upd)) {
+ die ('MySQL-Error: ' . mysql_error());
+ }
redirect_header("?op=list&filter={$filter}", 3, _AM_XNEWSLETTER_FORMOK);
@@ -139,40 +148,40 @@
if ($accountsCount > 0) {
$accountObjs = $xnewsletter->getHandler('accounts')->getAll($accountCriteria);
- $result_bmh = _AM_XNEWSLETTER_BMH_SUCCESSFUL . "<br/>";
+ $result_bmh = _AM_XNEWSLETTER_BMH_SUCCESSFUL . "<br/>";
foreach ($accountObjs as $account_id => $accountObj) {
- $bmh = new BounceMailHandler();
- $bmh->verbose = VERBOSE_SIMPLE; //VERBOSE_REPORT; //VERBOSE_DEBUG; //VERBOSE_QUIET; // default is VERBOSE_SIMPLE
+ $bmh = new BounceMailHandler();
+ $bmh->verbose = VERBOSE_SIMPLE; //VERBOSE_REPORT; //VERBOSE_DEBUG; //VERBOSE_QUIET; // default is VERBOSE_SIMPLE
//$bmh->use_fetchstructure = true; // true is default, no need to speficy
//$bmh->testmode = true; // false is default, no need to specify
//$bmh->debug_body_rule = false; // false is default, no need to specify
//$bmh->debug_dsn_rule = false; // false is default, no need to specify
//$bmh->purge_unprocessed = false; // false is default, no need to specify
- $bmh->disable_delete = true; // detected mails will be not deleted, default is false
+ $bmh->disable_delete = true; // detected mails will be not deleted, default is false
// for local mailbox (to process .EML files)
//$bmh->openLocalDirectory('/home/email/temp/mailbox');
//$bmh->processMailbox();
// for remote mailbox
- $bmh->mailhost = $accountObj->getVar('accounts_server_in'); // your mail server
- $bmh->mailbox_username = $accountObj->getVar('accounts_username'); // your mailbox username
- $bmh->mailbox_password = $accountObj->getVar('accounts_password'); // your mailbox password
- $bmh->port = $accountObj->getVar('accounts_port_in'); // the port to access your mailbox, default is 143
+ $bmh->mailhost = $accountObj->getVar('accounts_server_in'); // your mail server
+ $bmh->mailbox_username = $accountObj->getVar('accounts_username'); // your mailbox username
+ $bmh->mailbox_password = $accountObj->getVar('accounts_password'); // your mailbox password
+ $bmh->port = $accountObj->getVar('accounts_port_in'); // the port to access your mailbox, default is 143
if ($accountObj->getVar('accounts_type') == _XNEWSLETTER_ACCOUNTS_TYPE_VAL_POP3) {
$bmh->service = 'pop3'; // the service to use (imap or pop3), default is 'imap'
} else {
$bmh->service = 'imap'; // the service to use (imap or pop3), default is 'imap'
}
- $bmh->service_option = $accountObj->getVar('accounts_securetype_in'); // the service options (none, tls, notls, ssl, etc.), default is 'notls'
- $bmh->boxname = $accountObj->getVar('accounts_inbox'); // the mailbox to access, default is 'INBOX'
- $verif_movehard = $accountObj->getVar('accounts_movehard') == '1' ? true : false;
- $bmh->moveHard = $verif_movehard; // default is false
- $bmh->hardMailbox = $accountObj->getVar('accounts_hardbox'); // default is 'INBOX.hard' - NOTE: must start with 'INBOX.'
- $verif_movesoft = $accountObj->getVar('accounts_movesoft') == '1' ? true : false;
- $bmh->moveSoft = $verif_movesoft; // default is false
- $bmh->softMailbox = $accountObj->getVar('accounts_softbox'); // default is 'INBOX.soft' - NOTE: must start with 'INBOX.'
+ $bmh->service_option = $accountObj->getVar('accounts_securetype_in'); // the service options (none, tls, notls, ssl, etc.), default is 'notls'
+ $bmh->boxname = $accountObj->getVar('accounts_inbox'); // the mailbox to access, default is 'INBOX'
+ $verif_movehard = $accountObj->getVar('accounts_movehard') == '1' ? true : false;
+ $bmh->moveHard = $verif_movehard; // default is false
+ $bmh->hardMailbox = $accountObj->getVar('accounts_hardbox'); // default is 'INBOX.hard' - NOTE: must start with 'INBOX.'
+ $verif_movesoft = $accountObj->getVar('accounts_movesoft') == '1' ? true : false;
+ $bmh->moveSoft = $verif_movesoft; // default is false
+ $bmh->softMailbox = $accountObj->getVar('accounts_softbox'); // default is 'INBOX.soft' - NOTE: must start with 'INBOX.'
//$bmh->deleteMsgDate = '2009-01-05'; // format must be as 'yyyy-mm-dd'
// rest used regardless what type of connection it is
@@ -199,19 +208,22 @@
echo $indexAdmin->renderButton();
//
$arr_measure_type = array(
- _XNEWSLETTER_BMH_MEASURE_VAL_ALL=>_AM_XNEWSLETTER_BMH_MEASURE_ALL,
- _XNEWSLETTER_BMH_MEASURE_VAL_PENDING=>_AM_XNEWSLETTER_BMH_MEASURE_PENDING,
- _XNEWSLETTER_BMH_MEASURE_VAL_NOTHING=>_AM_XNEWSLETTER_BMH_MEASURE_NOTHING,
- _XNEWSLETTER_BMH_MEASURE_VAL_QUIT=>_AM_XNEWSLETTER_BMH_MEASURE_QUITED,
- _XNEWSLETTER_BMH_MEASURE_VAL_DELETE=>_AM_XNEWSLETTER_BMH_MEASURE_DELETED);
+ _XNEWSLETTER_BMH_MEASURE_VAL_ALL => _AM_XNEWSLETTER_BMH_MEASURE_ALL,
+ _XNEWSLETTER_BMH_MEASURE_VAL_PENDING => _AM_XNEWSLETTER_BMH_MEASURE_PENDING,
+ _XNEWSLETTER_BMH_MEASURE_VAL_NOTHING => _AM_XNEWSLETTER_BMH_MEASURE_NOTHING,
+ _XNEWSLETTER_BMH_MEASURE_VAL_QUIT => _AM_XNEWSLETTER_BMH_MEASURE_QUITED,
+ _XNEWSLETTER_BMH_MEASURE_VAL_DELETE => _AM_XNEWSLETTER_BMH_MEASURE_DELETED
+ );
- $limit = $xnewsletter->getConfig('adminperpage');
+ $limit = $xnewsletter->getConfig('adminperpage');
$bhmCriteria = new CriteriaCompo();
- if ($filter > -1) $criteria->add(new Criteria('bmh_measure', $filter));
+ if ($filter > -1) {
+ $criteria->add(new Criteria('bmh_measure', $filter));
+ }
$bhmCriteria->setSort('bmh_id');
$bhmCriteria->setOrder('DESC');
$bhmCount = $xnewsletter->getHandler('bmh')->getCount($bhmCriteria);
- $start = xnewsletterRequest::getInt('start', 0);
+ $start = xnewsletterRequest::getInt('start', 0);
$bhmCriteria->setStart($start);
$bhmCriteria->setLimit($limit);
$bhmObjs = $xnewsletter->getHandler('bmh')->getAll($bhmCriteria);
@@ -227,23 +239,23 @@
echo "<table class='outer width100' cellspacing='1'><tr class='odd'><td>";
echo "<form id='form_filter' enctype='multipart/form-data' method='post' action='{$currentFile}' name='form_filter'>";
- $checked = ($filter == -1) ? "checked='checked'" : '';
+ $checked = ($filter == -1) ? "checked='checked'" : '';
echo "<input id='bmh_measure_all' type='radio' {$checked} value='-1' title='" . _AM_XNEWSLETTER_BMH_MEASURE . "' name='bmh_measure_filter' onclick='submit()' />
<label for='bmh_measure_all' name='bmh_measure_all'>" . _AM_XNEWSLETTER_BMH_MEASURE_ALL . "</label>";
- $checked = ($filter == _XNEWSLETTER_BMH_MEASURE_VAL_PENDING) ? "checked='checked'" : "";
+ $checked = ($filter == _XNEWSLETTER_BMH_MEASURE_VAL_PENDING) ? "checked='checked'" : "";
echo "<input id='bmh_measure0' type='radio' {$checked} value='" . _XNEWSLETTER_BMH_MEASURE_VAL_PENDING . "' title='" . _AM_XNEWSLETTER_BMH_MEASURE . "' name='bmh_measure_filter' onclick='submit()' />
<label for='bmh_measure0' name='bmh_measure0'>" . _AM_XNEWSLETTER_BMH_MEASURE_PENDING . "</label>";
- $checked = ($filter == _XNEWSLETTER_BMH_MEASURE_VAL_NOTHING) ? "checked='checked'" : "";
+ $checked = ($filter == _XNEWSLETTER_BMH_MEASURE_VAL_NOTHING) ? "checked='checked'" : "";
echo "<input id='bmh_measure1' type='radio' {$checked} value='" . _XNEWSLETTER_BMH_MEASURE_VAL_NOTHING . "' title='" . _AM_XNEWSLETTER_BMH_MEASURE . "' name='bmh_measure_filter' onclick='submit()' />
<label for='bmh_measure1' name='bmh_measure1'>" . _AM_XNEWSLETTER_BMH_MEASURE_NOTHING . "</label>";
- $checked = ($filter == _XNEWSLETTER_BMH_MEASURE_VAL_QUIT) ? "checked='checked'" : "";
+ $checked = ($filter == _XNEWSLETTER_BMH_MEASURE_VAL_QUIT) ? "checked='checked'" : "";
echo "<input id='bmh_measure2' type='radio' {$checked} value='" . _XNEWSLETTER_BMH_MEASURE_VAL_QUIT . "' title='" . _AM_XNEWSLETTER_BMH_MEASURE . "' name='bmh_measure_filter' onclick='submit()'>
<label for='bmh_measure2' name='bmh_measure2'>" . _AM_XNEWSLETTER_BMH_MEASURE_QUITED . "</label>";
- $checked = ($filter == _XNEWSLETTER_BMH_MEASURE_VAL_DELETE) ? "checked='checked'" : "";
+ $checked = ($filter == _XNEWSLETTER_BMH_MEASURE_VAL_DELETE) ? "checked='checked'" : "";
echo "<input id='bmh_measure3' type='radio' {$checked} value='" . _XNEWSLETTER_BMH_MEASURE_VAL_DELETE . "' title='" . _AM_XNEWSLETTER_BMH_MEASURE . "' name='bmh_measure_filter' onclick='submit()' />
<label for='bmh_measure3' name='bmh_measure3'>" . _AM_XNEWSLETTER_BMH_MEASURE_DELETED . "</label>";
echo "</form>";
@@ -278,14 +290,19 @@
echo "<td>" . $bhmObj->getVar('bmh_email') . "</td>";
echo "<td class='center'>" . $arr_measure_type[$bhmObj->getVar("bmh_measure")] . "</td>";
- echo "<td class='center'>" . formatTimeStamp($bhmObj->getVar("bmh_created"),"S") . "</td>";
+ echo "<td class='center'>" . formatTimeStamp($bhmObj->getVar("bmh_created"), "S") . "</td>";
- echo "<td class='center width20'>";
- echo " <a href='?op=handle_bmh&bmh_id=" . $bhm_id . "&bmh_measure=" . _XNEWSLETTER_BMH_MEASURE_VAL_NOTHING . "&filter=" . $filter . "'><img src=" . XNEWSLETTER_ICONS_URL . "/xn_nothing.png alt='" . _AM_XNEWSLETTER_BMH_MEASURE_NOTHING . "' title='" . _AM_XNEWSLETTER_BMH_MEASURE_NOTHING . "' /></a>";
- echo " <a href='?op=handle_bmh&bmh_id=". $bhm_id . "&bmh_measure=" . _XNEWSLETTER_BMH_MEASURE_VAL_QUIT . "&filter=" . $filter . "'><img src=" . XNEWSLETTER_ICONS_URL . "/xn_catsubscr_temp.png alt='" . _AM_XNEWSLETTER_BMH_MEASURE_QUIT . "' title='" . _AM_XNEWSLETTER_BMH_MEASURE_QUIT . "' /></a>";
- echo " <a href='?op=bmh_delsubscr&bmh_id=" . $bhm_id . "&filter=" . $filter . "'><img src=" . XNEWSLETTER_ICONS_URL . "/xn_quit.png alt='" . _AM_XNEWSLETTER_BMH_MEASURE_DELETE . "' title='" . _AM_XNEWSLETTER_BMH_MEASURE_DELETE . "' /></a>";
- echo " <a href='?op=edit_bmh&bmh_id=" . $bhm_id . "'><img src=" . XNEWSLETTER_ICONS_URL . "/xn_edit.png alt='" . _AM_XNEWSLETTER_BMH_EDIT . "' title='" . _AM_XNEWSLETTER_BMH_EDIT . "' width='16px' /></a>";
- echo " <a href='?op=delete_bmh&bmh_id=" . $bhm_id . "'><img src=" . XNEWSLETTER_ICONS_URL . "/xn_delete.png alt='" . _AM_XNEWSLETTER_BMH_DELETE . "' title='" . _AM_XNEWSLETTER_BMH_DELETE . "' width='16px' /></a>";
+ echo "<td class='center'>";
+ echo " <a href='?op=handle_bmh&bmh_id=" . $bhm_id . "&bmh_measure=" . _XNEWSLETTER_BMH_MEASURE_VAL_NOTHING . "&filter=" . $filter . "'><img src=" . XNEWSLETTER_ICONS_URL
+ . "/xn_nothing.png alt='" . _AM_XNEWSLETTER_BMH_MEASURE_NOTHING . "' title='" . _AM_XNEWSLETTER_BMH_MEASURE_NOTHING . "' /></a>";
+ echo " <a href='?op=handle_bmh&bmh_id=" . $bhm_id . "&bmh_measure=" . _XNEWSLETTER_BMH_MEASURE_VAL_QUIT . "&filter=" . $filter . "'><img src=" . XNEWSLETTER_ICONS_URL
+ . "/xn_catsubscr_temp.png alt='" . _AM_XNEWSLETTER_BMH_MEASURE_QUIT . "' title='" . _AM_XNEWSLETTER_BMH_MEASURE_QUIT . "' /></a>";
+ echo " <a href='?op=bmh_delsubscr&bmh_id=" . $bhm_id . "&filter=" . $filter . "'><img src=" . XNEWSLETTER_ICONS_URL . "/xn_quit.png alt='" . _AM_XNEWSLETTER_BMH_MEASURE_DELETE
+ . "' title='" . _AM_XNEWSLETTER_BMH_MEASURE_DELETE . "' /></a>";
+ echo " <a href='?op=edit_bmh&bmh_id=" . $bhm_id . "'><img src=" . XNEWSLETTER_ICONS_URL . "/xn_edit.png alt='" . _AM_XNEWSLETTER_BMH_EDIT . "' title='" . _AM_XNEWSLETTER_BMH_EDIT
+ . "' width='16px' /></a>";
+ echo " <a href='?op=delete_bmh&bmh_id=" . $bhm_id . "'><img src=" . XNEWSLETTER_ICONS_URL . "/xn_delete.png alt='" . _AM_XNEWSLETTER_BMH_DELETE . "' title='"
+ . _AM_XNEWSLETTER_BMH_DELETE . "' width='16px' /></a>";
echo "</td>";
echo "</tr>";
}
@@ -306,18 +323,18 @@
}
$bmhObj = $xnewsletter->getHandler('bmh')->get($bmh_id);
- $bmhObj->setVar('bmh_rule_no', xnewsletterRequest::getString('bmh_rule_no', ''));
- $bmhObj->setVar('bmh_rule_cat', xnewsletterRequest::getString('bmh_rule_cat', ''));
+ $bmhObj->setVar('bmh_rule_no', xnewsletterRequest::getString('bmh_rule_no', ''));
+ $bmhObj->setVar('bmh_rule_cat', xnewsletterRequest::getString('bmh_rule_cat', ''));
$bmhObj->setVar('bmh_bouncetype', xnewsletterRequest::getString('bmh_bouncetype', ''));
- $bmhObj->setVar('bmh_remove', xnewsletterRequest::getString('bmh_remove', ''));
+ $bmhObj->setVar('bmh_remove', xnewsletterRequest::getString('bmh_remove', ''));
$bmh_email = xnewsletterRequest::getString('bmh_email', '');
$bmh_email = filter_var($bmh_email, FILTER_SANITIZE_EMAIL);
$bmh_email = xnewsletter_checkEmail($bmh_email);
- $bmhObj->setVar('bmh_email', $bmh_email);
- $bmhObj->setVar('bmh_subject', xnewsletterRequest::getString('bmh_subject', ''));
- $bmhObj->setVar('bmh_measure', xnewsletterRequest::getInt('bmh_measure', 0));
- $bmhObj->setVar('bmh_submitter', xnewsletterRequest::getInt('bmh_submitter', 0));
- $bmhObj->setVar('bmh_created', xnewsletterRequest::getInt('bmh_created', 0));
+ $bmhObj->setVar('bmh_email', $bmh_email);
+ $bmhObj->setVar('bmh_subject', xnewsletterRequest::getString('bmh_subject', ''));
+ $bmhObj->setVar('bmh_measure', xnewsletterRequest::getInt('bmh_measure', 0));
+ $bmhObj->setVar('bmh_submitter', xnewsletterRequest::getInt('bmh_subm...
[truncated message content] |