diff --git a/e107_admin/db.php b/e107_admin/db.php index 43835cde8..c62046c32 100644 --- a/e107_admin/db.php +++ b/e107_admin/db.php @@ -9,8 +9,8 @@ * Administration - Database Utilities * * $Source: /cvs_backup/e107_0.8/e107_admin/db.php,v $ - * $Revision: 1.36 $ - * $Date: 2009-09-28 07:17:51 $ + * $Revision: 1.37 $ + * $Date: 2009-10-26 01:04:05 $ * $Author: e107coders $ * */ @@ -627,7 +627,16 @@ class system_tools $error_messages = array(0 => DBLAN_31, 1 => DBLAN_32, 2 => DBLAN_33, 3 => DBLAN_34); $error_image = array("integrity_pass.png", "integrity_fail.png", "warning.png", "blank.png"); - global $sql, $e107, $emessage, $frm; + + + global $e107; + $sql = e107::getDb(); + $tp = e107::getParser(); + $frm = e107::getForm(); + $emessage = e107::getMessage(); + + + require_once (e_HANDLER."plugin_class.php"); $ep = new e107plugin(); @@ -670,6 +679,8 @@ class system_tools $previous = ''; while($row = $sql->db_Fetch()) { + e107::loadLanFiles($row['plugin_path'],'admin'); + $text .= " ".$e107->tp->toHtml($row['plugin_name'], FALSE, "defs,emotes_off")." diff --git a/e107_admin/mailout.php b/e107_admin/mailout.php index 2dae5eece..10396e58a 100644 --- a/e107_admin/mailout.php +++ b/e107_admin/mailout.php @@ -11,8 +11,8 @@ | GNU General Public License (http://gnu.org). | | $Source: /cvs_backup/e107_0.8/e107_admin/mailout.php,v $ -| $Revision: 1.19 $ -| $Date: 2009-10-25 15:03:52 $ +| $Revision: 1.20 $ +| $Date: 2009-10-26 01:04:06 $ | $Author: e107coders $ | | Work in progress - supplementary mailer plugin @@ -20,7 +20,7 @@ +----------------------------------------------------------------------------+ Features: -1. Additional sources of email addresses for mailouts can be provided via plugins +1. Additional sources of email addresses for mailouts can be provided via plugins. (How?) 2. Both list of email recipients and the email are separately stored in the DB using a documented interface (allows alternative creation/mailout routines) 3. Can specify qmail in the sendmail path 4. Handling of partially sent email runs @@ -630,7 +630,7 @@ function showMailouts($sub_par,$mail_id) $text .= " "; - $e107->ns->tablerender(LAN_MAILOUT_102,$text); + $e107->ns->tablerender(LAN_MAILOUT_102." :: ".LAN_MAILOUT_97,$text); } else { // Should only happen if people fiddle! @@ -729,7 +729,7 @@ function showMailouts($sub_par,$mail_id) if (!$count) { $text = "
".LAN_MAILOUT_79."
"; - $e107->ns -> tablerender("
".LAN_MAILOUT_78."
", $text); + $e107->ns -> tablerender(ADLAN_136." :: ".LAN_MAILOUT_78, $text); require_once(e_ADMIN."footer.php"); exit; } @@ -785,7 +785,7 @@ function showMailouts($sub_par,$mail_id) } $text .= "\n


"; - $e107->ns -> tablerender("
".LAN_MAILOUT_78."
", $text); + $e107->ns -> tablerender(ADLAN_136." :: ".LAN_MAILOUT_78, $text); // Now see if we can find any 'orphaned' mailout entries $qry = "SELECT @@ -846,10 +846,13 @@ function show_mailform($foo="") global $pref,$HANDLERS_DIRECTORY; global $mail_handlers; $e107 = e107::getInstance(); + $tp = e107::getParser(); + $frm = e107::getForm(); + $email_subject = $foo['gen_ip']; - $email_body = $e107->tp->toForm($foo['gen_chardata']); + $email_body = $tp->toForm($foo['gen_chardata']); $email_id = $foo['gen_id']; $text = ""; @@ -931,7 +934,7 @@ function show_mailform($foo="") "; -// Attachment. +// Attachment. //TODO needs to be pluginized. eg. e_mailout.php $text .= " ".LAN_MAILOUT_07.": "; @@ -986,7 +989,8 @@ function show_mailform($foo="") if(e_WYSIWYG) { - $text .=" + $text .=" + "; } @@ -1001,21 +1005,25 @@ function show_mailform($foo="") if(isset($_POST['edit'])) { $text .= ""; - $text .= ""; + $text .= $frm->admin_button('update_email', LAN_UPDATE); } else { - $text .= ""; + + $text .= $frm->admin_button('save_email', LAN_SAVE); } - $text .="  + + $text .= $frm->admin_button('submit', LAN_MAILOUT_08); + + $text .= " "; - $e107->ns->tablerender(LAN_MAILOUT_15, $text); + $e107->ns->tablerender(ADLAN_136." :: ".LAN_MAILOUT_56, $text); } //---------------------------------------------------- @@ -1026,6 +1034,9 @@ function show_prefs() { global $pref; $e107 = e107::getInstance(); + $frm = e107::getForm(); + $mes = e107::getMessage(); + e107::getCache()->CachePageMD5 = '_'; $lastload = e107::getCache()->retrieve('emailLastBounce',FALSE,TRUE,TRUE); @@ -1039,57 +1050,57 @@ function show_prefs() - + - - - +
".LAN_MAILOUT_110."
  - + ".$frm->admin_button(testemail, LAN_MAILOUT_112)."  +
".LAN_MAILOUT_115."
".LAN_MAILOUT_116."
+ ".LAN_MAILOUT_115."

"; + $mailers = array('php','smtp','sendmail'); + foreach($mailers as $opt) + { + $sel = ($pref['mailer'] == $opt) ? "selected='selected'" : ""; + $text .= "\n"; + } + $text .=" ".LAN_MAILOUT_116."
"; // SMTP. --------------> $smtp_opts = explode(',',varset($pref['smtp_options'],'')); $smtpdisp = ($pref['mailer'] != "smtp") ? "display:none;" : ""; - $text .= "
- "; + $text .= "
+
"; $text .= " - - + - - + - - + - "; $text .= " - - @@ -1122,12 +1133,12 @@ function show_prefs() // Sendmail. --------------> $senddisp = ($pref['mailer'] != "sendmail") ? "display:none;" : ""; - $text .= "
".LAN_MAILOUT_87.":   + ".LAN_MAILOUT_87.":  
".LAN_MAILOUT_88.": (".LAN_OPTIONAL.")   + ".LAN_MAILOUT_88.": (".LAN_OPTIONAL.")  
".LAN_MAILOUT_89.": (".LAN_OPTIONAL.")   + ".LAN_MAILOUT_89.": (".LAN_OPTIONAL.")  
".LAN_MAILOUT_90.":  + ".LAN_MAILOUT_90.":  \n
".LAN_MAILOUT_94."
".LAN_MAILOUT_57.":  + ".LAN_MAILOUT_57.":  "; $checked = (varsettrue($pref['smtp_keepalive']) ) ? "checked='checked'" : ""; $text .= " @@ -1113,7 +1124,7 @@ function show_prefs() $checked = (in_array('useVERP',$smtp_opts) ? "checked='checked'" : ""); $text .= "
".LAN_MAILOUT_95.":  + ".LAN_MAILOUT_95.": 
"; + $text .= "
"; $text .= " - @@ -1140,44 +1151,21 @@ function show_prefs() - - \n - - - - - - \n"; + \n"; + + + if (isset($pref['mailout_sources'])) { // Allow selection of email address sources $text .= " - - \n"; - $text .= "
".LAN_MAILOUT_20.":   +
".LAN_MAILOUT_25." ".LAN_MAILOUT_26." + ".LAN_MAILOUT_26." ".LAN_MAILOUT_27. - " ".LAN_MAILOUT_29.".
- ".LAN_MAILOUT_30." + " ".LAN_MAILOUT_29.". + ".LAN_MAILOUT_30."
".LAN_MAILOUT_31." -
Last Bounce Processed: ".$lastBounceText."
- Forward the bounce email address below to ".$_SERVER['DOCUMENT_ROOT'].e_HANDLER_ABS."bounce_handler.php -
-
".LAN_MAILOUT_32.":
-
".LAN_MAILOUT_33.":
-
".LAN_MAILOUT_34.":
-
".LAN_MAILOUT_35.":
-
".LAN_MAILOUT_120.":
\n - "; - - $check = ($pref['mail_bounce_delete']==1) ? " checked='checked'" : ""; - $text .= "
".LAN_MAILOUT_36.":
- -
".LAN_MAILOUT_77." + "; $mail_enable = explode(',',$pref['mailout_enabled']); foreach (explode(',',$pref['mailout_sources']) as $mailer) @@ -1192,27 +1180,61 @@ function show_prefs() $check = ($mail_log_email == 1) ? " checked='checked'" : ""; $text .= "
".LAN_MAILOUT_72." +
\n -
".LAN_MAILOUT_76. + ".LAN_MAILOUT_76. "
-
- -
+ $text .= " + +
+ +
+ ".LAN_MAILOUT_31." + + + + + + + + + + + + + + + + + + \n + "; + + $check = ($pref['mail_bounce_delete']==1) ? " checked='checked'" : ""; + $text .= " + + +
Last Bounce Processed".$lastBounceText."
Auto-process script".$_SERVER['DOCUMENT_ROOT'].e_HANDLER_ABS."bounce_handler.php
".LAN_MAILOUT_32."
".LAN_MAILOUT_33."
".LAN_MAILOUT_34."
".LAN_MAILOUT_35."
".LAN_MAILOUT_120."
".LAN_MAILOUT_36."
+ +
".$frm->admin_button('updateprefs',LAN_MAILOUT_28)."
"; - $caption = LAN_PREFS; - $e107->ns->tablerender($caption, $text); + $caption = ADLAN_136." :: ".LAN_PREFS; + $e107->ns->tablerender($caption,$mes->render(). $text); } @@ -1235,7 +1257,7 @@ function showList($type='massmail') if (!$count) { $text = "
".LAN_MAILOUT_22."
"; - $ns -> tablerender("
".LAN_MAILOUT_21."
", $text); + $ns -> tablerender(ADLAN_136." :: ".LAN_MAILOUT_97, $text); require_once(e_ADMIN."footer.php"); exit; } @@ -1283,7 +1305,7 @@ function showList($type='massmail') } $text .= "\n


"; - $ns -> tablerender("
".LAN_MAILOUT_21."
", $text); + $ns -> tablerender(ADLAN_136." :: ".LAN_MAILOUT_97, $text); } @@ -1335,11 +1357,11 @@ function mailout_adminmenu() $var['mailouts']['perm'] = "W"; if(getperms("0")){ - $var['prefs']['text'] = LAN_OPTIONS; + $var['prefs']['text'] = LAN_PREFS; $var['prefs']['link'] = e_SELF."?prefs"; $var['prefs']['perm'] = "0"; } - show_admin_menu(LAN_MAILOUT_15, $action, $var); + show_admin_menu(ADLAN_136, $action, $var); }