From e378c1697169da51f2753721bf92526ff0219742 Mon Sep 17 00:00:00 2001 From: Cameron Date: Fri, 10 Oct 2014 20:16:11 -0700 Subject: [PATCH] Admin -> Mail : upgraded GUI to v2 standards. Template still requires attention. --- e107_admin/mailout.php | 1146 +++++++++++++++-- e107_core/templates/email_template.php | 27 +- e107_handlers/form_handler.php | 24 +- e107_handlers/mail_manager_class.php | 8 +- e107_handlers/mailout_admin_class.php | 47 +- e107_handlers/mailout_class.php | 2 +- e107_languages/English/admin/help/mailout.php | 1 + e107_languages/English/admin/lan_mailout.php | 6 +- 8 files changed, 1124 insertions(+), 137 deletions(-) diff --git a/e107_admin/mailout.php b/e107_admin/mailout.php index 57bd802a8..8590cfdfb 100644 --- a/e107_admin/mailout.php +++ b/e107_admin/mailout.php @@ -74,6 +74,1018 @@ if (!getperms('W')) header('location:'.e_BASE.'index.php'); exit; } +include_lan(e_LANGUAGEDIR.e_LANGUAGE.'/admin/lan_users.php'); +include_lan(e_LANGUAGEDIR.e_LANGUAGE.'/admin/lan_mailout.php'); + +require_once(e_HANDLER.'ren_help.php'); + +require_once(e_HANDLER.'userclass_class.php'); +require_once(e_HANDLER.'mailout_class.php'); // Class handler for core mailout functions +require_once(e_HANDLER.'mailout_admin_class.php'); // Admin tasks handler +require_once(e_HANDLER.'mail_manager_class.php'); // Mail DB API + + + + +class mailout_admin extends e_admin_dispatcher +{ + + protected $modes = array( + 'main' => array( + 'controller' => 'mailout_main_ui', + 'path' => null, + 'ui' => 'mailout_admin_form_ui', + 'uipath' => null + ), + 'saved' => array( + 'controller' => 'mailout_main_ui', + 'path' => null, + 'ui' => 'mailout_admin_form_ui', + 'uipath' => null + ), + 'pending' => array( + 'controller' => 'mailout_main_ui', + 'path' => null, + 'ui' => 'mailout_admin_form_ui', + 'uipath' => null + ), + 'held' => array( + 'controller' => 'mailout_main_ui', + 'path' => null, + 'ui' => 'mailout_admin_form_ui', + 'uipath' => null + ), + 'sent' => array( + 'controller' => 'mailout_main_ui', + 'path' => null, + 'ui' => 'mailout_admin_form_ui', + 'uipath' => null + ), + 'prefs' => array( + 'controller' => 'mailout_main_ui', + 'path' => null, + 'ui' => 'mailout_admin_form_ui', + 'uipath' => null + ), + 'maint' => array( + 'controller' => 'mailout_main_ui', + 'path' => null, + 'ui' => 'mailout_admin_form_ui', + 'uipath' => null + ), + 'recipients' => array( + 'controller' => 'mailout_recipients_ui', + 'path' => null, + 'ui' => 'mailout_recipients_form_ui', + 'uipath' => null + ) + + ); + + protected $adminMenu = array( + // 'makemail/makemail' => array('caption'=> LAN_MAILOUT_190, 'perm' => 'W', 'url'=>e_SELF), + 'main/list' => array('caption'=> LAN_MANAGE, 'perm'=> 'W'), + 'main/create' => array('caption'=> LAN_MAILOUT_190, 'perm' => 'W'), + 'recipients/list' => array('caption'=> "Recipients", 'perm' => 'W'), + 'other' => array('divider'=> true), + 'saved/list' => array('caption'=> LAN_MAILOUT_191, 'perm' => 'W'), + 'pending/list' => array('caption'=> LAN_MAILOUT_193, 'perm' => 'W'), + 'held/list' => array('caption'=> LAN_MAILOUT_194, 'perm' => 'W'), + 'sent/list' => array('caption'=> LAN_MAILOUT_192, 'perm' => 'W'), + 'other2' => array('divider'=> true), + 'prefs/prefs' => array('caption'=> LAN_PREFS, 'perm' => '0'), + 'maint/maint' => array('caption'=> ADLAN_40, 'perm' => '0'), + + ); + + + + protected $adminMenuAliases = array( + // 'main/edit' => 'main/list', + ); + + protected $menuTitle = LAN_MAILOUT_15; +} + +class mailout_main_ui extends e_admin_ui +{ + + //TODO Move to Class above. + protected $pluginTitle = LAN_MAILOUT_15; + protected $pluginName = LAN_MAILOUT_15; + protected $table = "mail_content"; + + // protected $listQry = "SELECT * FROM #mail_content WHERE mail_content_status = 20 "; + + + // protected $editQry = "SELECT * FROM #mail_content WHERE cust_id = {ID}"; + + protected $pid = "mail_source_id"; + protected $perPage = 10; + protected $listOrder = "mail_source_id desc"; + + protected $batchDelete = true; + protected $batchCopy = true; + + protected $tabs = array('Basic','Advanced'); //TODO Add LAN_BASIC and LAN_ADVANCED to lan_admin.php + + protected $fields = array( + 'checkboxes' => array('title'=> '', 'type' => null, 'width' =>'5%', 'forced'=> TRUE, 'thclass'=>'center', 'class'=>'center'), + 'mail_source_id' => array('title' => LAN_MAILOUT_137, 'width' =>'5%', 'thclass' => 'center', 'class'=>'center', 'forced' => TRUE), + + 'mail_selectors' => array('title' => LAN_MAILOUT_03, 'type'=>'method', 'data'=>false, 'nolist' => true, 'writeParms'=>'nolabel=0'), + 'mail_title' => array('title' => LAN_MAILOUT_135, 'type'=>'text', 'forced' => TRUE, 'data'=>'str', 'inline'=>true, 'writeParms'=>'size=xxlarge&required=1', 'help'=>'whatever'), + 'mail_sender_name' => array('title' => LAN_MAILOUT_150, 'type'=>'method', 'data'=>false), + 'mail_sender_email' => array('title' => LAN_MAILOUT_149,'type'=>'method','data'=>false), + 'mail_copy_to' => array('title' => LAN_MAILOUT_151,'tab'=>1, 'type'=>'method','data'=>false), + 'mail_bcopy_to' => array('title' => LAN_MAILOUT_152,'tab'=>1, 'type'=>'method','data'=>false), + 'mail_subject' => array('title' => LAN_MAILOUT_06, 'type'=>'text', 'forced' => TRUE,'data'=>'str', 'inline'=>true, 'writeParms'=>'size=xxlarge&required=1'), + 'mail_content_status' => array('title' => LAN_MAILOUT_136, 'tab'=>1, 'type'=> 'dropdown', 'data'=>'int', 'filter'=>false, 'inline'=>true, 'thclass' => 'left', 'class'=>'left'), + 'mail_togo_count' => array('title' => LAN_MAILOUT_83, 'noedit'=>true, 'type'=>'number'), + 'mail_sent_count' => array('title' => LAN_MAILOUT_82, 'noedit'=>true, 'type'=>'number'), + 'mail_fail_count' => array('title' => LAN_MAILOUT_128, 'noedit'=>true, 'type'=>'number'), + 'mail_bounce_count' => array('title' => LAN_MAILOUT_144, 'noedit'=>true, 'type'=>'number'), + 'mail_start_send' => array('title' => LAN_MAILOUT_131,'noedit'=>true, 'type'=>'number', 'proc' => 'sdatetime'), + 'mail_end_send' => array('title' => LAN_MAILOUT_132, 'noedit'=>true, 'type'=>'number', 'proc' => 'sdatetime'), + 'mail_create_date' => array('title' => LAN_MAILOUT_130, 'noedit'=>true, 'type'=>'datestamp', 'proc' => 'sdatetime'), + 'mail_creator' => array('title' => LAN_MAILOUT_85, 'noedit'=>true, 'type'=>'user', 'proc' => 'username'), + 'mail_create_app' => array('title' => LAN_MAILOUT_133, 'noedit'=>true), + 'mail_e107_priority' => array('title' => LAN_MAILOUT_134, 'noedit'=>true), + 'mail_notify_complete' => array('title' => LAN_MAILOUT_243, 'noedit'=>true, 'nolist' => true), + 'mail_last_date' => array('title' => LAN_MAILOUT_129, 'noedit'=>true, 'type'=>'int', 'proc' => 'sdatetime'), + 'mail_attach' => array('title' => LAN_MAILOUT_153, 'tab'=>1, 'type'=>'method','data'=>false), + 'mail_include_images' => array('title' => LAN_MAILOUT_224, 'tab'=>1, 'type'=>'boolean','data'=>false, 'proc' => 'yesno'), + 'mail_send_style' => array('title' => LAN_MAILOUT_154,'type'=>'method','data'=>false), + 'mail_body' => array('title' => LAN_MAILOUT_100, 'type'=>'bbarea', 'proc' => 'trunc200'), + 'mail_body_templated' => array('title' => LAN_MAILOUT_257, 'noedit'=>true, 'proc' => 'chars'), + 'mail_other' => array('title' => LAN_MAILOUT_84, 'type'=>null, 'noedit'=>true, 'data'=>'array', 'nolist'=>true), + + 'options' => array('title' => LAN_OPTIONS, 'type'=>'method', 'width'=>'10%', 'forced' => TRUE) + + ); + + + + + protected $fieldpref = array('checkboxes', 'mail_source_id', 'mail_title', 'mail_subject', 'mail_content_status', 'options'); + + + // optional, if $pluginName == 'core', core prefs will be used, else e107::getPluginConfig($pluginName); + protected $prefs = array( + // 'after_submit' => array('title'=> 'Custom After Submit Text:', 'type'=>'bbarea') + // 'submit_question' => array('title'=> 'Allow submitting of Questions by:', 'type'=>'userclass'), + // 'classic_look' => array('title'=> 'Use Classic Layout', 'type'=>'boolean') + ); + + + + + public $mailAdmin = null; + + private $selectFields = array('email_to', + 'extended_1_name','extended_1_value', + 'extended_2_name', 'extended_2_value', + 'user_search_name', 'user_search_value', + 'last_visit_match', 'last_visit_date' + ); + + + private $mailOtherFields = array( + 'mail_sender_email', + 'mail_sender_name', + 'mail_copy_to', + 'mail_bcopy_to', + 'mail_attach', + 'mail_send_style', // HTML, text, template name etc + 'mail_selectors', // Only used internally + 'mail_include_images', // Used to determine whether to embed images, or link to them + 'mail_body_alt' , // If non-empty, use for alternate email text (generally the 'plain text' alternative) + 'mail_overrides' + ); + + + function init() + { + $action = varset($_GET['mode'], 'main'); + $this->mailAdmin = new mailoutAdminClass($action); + + if ($this->mailAdmin->loadMailHandlers() == 0) + { + e107::getMessage()->addDebug('No mail handlers loaded!!'); + + } + + /* + define('MAIL_STATUS_SENT', 0); // Mail sent. Email handler happy, but may have bounced (or may be yet to bounce) + define('MAIL_STATUS_BOUNCED', 1); + define('MAIL_STATUS_CANCELLED', 2); + define('MAIL_STATUS_PARTIAL', 3); // A run which was abandoned - errors, out of time etc + define('MAIL_STATUS_FAILED', 5); // Failure on initial send - rejected by selected email handler + // This must be the numerically highest 'processing complete' code + define('MAIL_STATUS_PENDING', 10); // Mail which is in the sending list (even if outside valid sending window) + // This must be the numerically lowest 'not sent' code + // E107_EMAIL_MAX_TRIES values used in here for retry counting + define('MAIL_STATUS_MAX_ACTIVE', 19); // Highest allowable 'not sent or processed' code + define('MAIL_STATUS_SAVED', 20); // Identifies an email which is just saved (or in process of update) + define('MAIL_STATUS_HELD',21); // Held pending release + define('MAIL_STATUS_TEMP', 22); // Tags entries which aren't yet in any list + */ + + $types = array(10=>'Pending',20=>"Saved", 21=>"Held", 0=>'Sent', 1=>'Bounced', 2=>'Cancelled', 3=> 'Partial', 5=>'Failed', 19 => "Max Active", 22=>"Temp"); + + + $qr = array('saved'=>20,'pending'=>10,'held'=>21,'sent'=>0); + + if($action !== 'main' ) + { + $this->listQry = "SELECT * FROM #mail_content WHERE mail_content_status = ".varset($qr[$action],20); + } + else + { + $this->fields['options']['type'] = ''; + } + + $this->fields['mail_content_status']['writeParms'] = $types; + + + if (getperms('0')) + { + if (isset($_POST['testemail'])) + { // Send test email - uses standard 'single email' handler + if(trim($_POST['testaddress']) == '') + { + $mes->addError(LAN_MAILOUT_19); + $subAction = 'error'; + } + else + { + $mailheader_e107id = USERID; + require_once(e_HANDLER.'mail.php'); + $add = ($pref['mailer']) ? " (".strtoupper($pref['mailer']).")" : ' (PHP)'; + $sendto = trim($_POST['testaddress']); + if (!sendemail($sendto, LAN_MAILOUT_113." ".SITENAME.$add, str_replace("[br]", "\n", LAN_MAILOUT_114),LAN_MAILOUT_189)) + { + $mes->addError(($pref['mailer'] == 'smtp') ? LAN_MAILOUT_67 : LAN_MAILOUT_106); + } + else + { + $mes->addSuccess(LAN_MAILOUT_81. ' ('.$sendto.')'); + $admin_log->log_event('MAIL_01',$sendto,E_LOG_INFORMATIVE,''); + } + } + } + elseif (isset($_POST['updateprefs'])) + { + $this->saveMailPrefs($mes); // TODO check if functional, $emessage -> $mes + } + } + + + + } + + + public function beforeCreate($new_data, $old_data) + { + $ret = $this->processData($new_data); + + $ret['mail_create_date'] = time(); + $ret['mail_creator'] = USERID; + $ret['mail_content_status'] = 20; // Default status is 'Saved'; + + return $ret; + + } + + + public function beforeUpdate($new_data, $old_data, $id) + { + return $this->processData($new_data); + } + + + /** + * Process Posted Data + */ + private function processData($new_data) + { + $other = array(); + + $ret = $new_data; + + foreach($new_data as $k=>$v) + { + if(in_array($k, $this->mailOtherFields)) + { + $other[$k] = $v; + unset($ret[$k]); + } + } + + $other['mail_selectors'] = $this->mailAdmin->getAllSelectors(); + + + $ret['mail_attach'] = trim($new_data['mail_attach']); + $ret['mail_send_style'] = varset($new_data['mail_send_style'],'textonly'); + $ret['mail_include_images'] = (isset($new_data['mail_include_images']) ? 1 : 0); + $ret['mail_other'] = $other; // type is set to 'array' in $fields. + + // e107::getMessage()->addInfo(print_a($ret,true)); + return $ret; + } + + + /* + function createPage() + { + if (!isset($mailData) || !is_array($mailData)) + { + $mailData = array(); // Empty array just in case + } + + if($id = $this->getId()) + { + $mailData = e107::getDB()->retrieve('mail_content','*','mail_source_id='.$id); + } + + return $this->mailAdmin->show_mailform($mailData); + + } + */ + + + + function maintPage() + { + if (!getperms('0')) + { + return; + } + + $mes = e107::getMessage(); + $ns = e107::getRender(); + $frm = e107::getForm(); + + $text = " +
+
+ + + + + + + "; + + $text .= ""; + $text .= "
".LAN_MAILOUT_182." + + ".$frm->admin_button('email_dross','no-value','delete', LAN_RUN)." +
".LAN_MAILOUT_252."
\n
"; + + return $text; + + // return $ns->tablerender(ADLAN_136.SEP.ADLAN_40, $text, 'maint',true); + + } + + function prefsPage() + { + if (!getperms('0')) + { + return; + } + $pref = e107::getPref(); + $e107 = e107::getInstance(); + $frm = e107::getForm(); + $mes = e107::getMessage(); + $ns = e107::getRender(); + + + e107::getCache()->CachePageMD5 = '_'; + $lastload = e107::getCache()->retrieve('emailLastBounce',FALSE,TRUE,TRUE); + $lastBounce = round((time() - $lastload) / 60); + + $lastBounceText = ($lastBounce > 1256474) ? "Never" : "".$lastBounce . " minutes ago."; + + $text = " +
+
+ ".LAN_MAILOUT_110." + + + + + + + + + + + + + + + + + + + + + \n + + + + + + \n + + + + + \n"; + + if (isset($pref['e_mailout_list'])) // Allow selection of email address sources + { + $text .= " + + + \n"; + } + + list($mail_log_option,$mail_log_email) = explode(',',varset($pref['mail_log_options'],'0,0')); + + $check = ($mail_log_email == 1) ? " checked='checked'" : ""; + + + $logOptions = array(LAN_MAILOUT_73,LAN_MAILOUT_74,LAN_MAILOUT_75,LAN_MAILOUT_119); + + $text .= " + + \n"; + /* + $text .= " + \n + ".LAN_MAILOUT_76. + " + \n"; + */ + + + $text .= "
".LAN_MAILOUT_110."
".$frm->admin_button('testemail', LAN_MAILOUT_112,'other')."  + +
".LAN_MAILOUT_115."
+ ".LAN_MAILOUT_116."
"; + + + +// SMTP. --------------> + $smtp_opts = explode(',',varset($pref['smtp_options'],'')); + $smtpdisp = ($pref['mailer'] != 'smtp') ? "style='display:none;'" : ''; + $text .= "
+ + + + + + "; + $text .= " + + + + + + + + + + + + + + + + + "; + + $text .= " + + "; + + $checked = (in_array('useVERP',$smtp_opts) ? "checked='checked'" : ""); + $text .= " + + +
".LAN_MAILOUT_87.":   + +
".LAN_MAILOUT_88.": (".LAN_OPTIONAL.")   + +
".LAN_MAILOUT_89.": (".LAN_OPTIONAL.")   + +
".LAN_MAILOUT_90." + \n
".LAN_MAILOUT_94."
".LAN_MAILOUT_57." + "; + $checked = (varsettrue($pref['smtp_keepalive']) ) ? "checked='checked'" : ''; + $text .= " +
".LAN_MAILOUT_95." + +
"; + + + /* FIXME - posting SENDMAIL path triggers Mod-Security rules. + // Sendmail. --------------> + $senddisp = ($pref['mailer'] != 'sendmail') ? "style='display:none;'" : ''; + $text .= "
"; + $text .= " + + + + + +
".LAN_MAILOUT_20.":   + +
"; + */ + + $text .="
".LAN_MAILOUT_222.""; + $text .= $this->mailAdmin->sendStyleSelect(varset($pref['mail_sendstyle'], 'textonly'), 'mail_sendstyle'); + $text .= + "".LAN_MAILOUT_223." +
".LAN_MAILOUT_25." ".LAN_MAILOUT_26." + ".LAN_MAILOUT_27. + " ".LAN_MAILOUT_29.".
+ ".LAN_MAILOUT_30." +
".LAN_MAILOUT_156." + ".LAN_MAILOUT_157." +
".LAN_MAILOUT_77." "; + + $mail_enable = explode(',',$pref['mailout_enabled']); + + foreach ($pref['e_mailout_list'] as $mailer => $v) + { + $check = (in_array($mailer,$mail_enable)) ? "checked='checked'" : ""; + $text .= "  {$mailer}
"; + } + + $text .= "
".LAN_MAILOUT_72." + ".$frm->select('mail_log_option',$logOptions,$mail_log_option); + $text .= " ".$frm->checkbox('mail_log_email', 1, $check, 'label='.LAN_MAILOUT_76); + $text .= "
+
+ ".LAN_MAILOUT_31." + + + + + + + + +
".LAN_MAILOUT_231.""; + + // bounce divs = mail_bounce_none, mail_bounce_auto, mail_bounce_mail + $autoDisp = ($pref['mail_bounce'] != 'auto') ? "style='display:none;'" : ''; + $autoMail = ($pref['mail_bounce'] != 'mail') ? "style='display:none;'" : ''; + $bounceOpts = array('none' => LAN_MAILOUT_232, 'auto' => LAN_MAILOUT_233, 'mail' => LAN_MAILOUT_234); + $text .= "\n
+ + + + + + + + + + + + + +
".LAN_MAILOUT_32."
".LAN_MAILOUT_233."".(e_DOCROOT).e107::getFolder('handlers')."bounce_handler.php"; + + + if(!is_readable(e_HANDLER.'bounce_handler.php')) + { + $text .= "
".LAN_MAILOUT_161.''; + } + elseif(!is_executable(e_HANDLER.'bounce_handler.php')) // Seems to give wrong answers on Windoze + { + $text .= "
".LAN_MAILOUT_162.''; + } + $text .= "
".LAN_MAILOUT_235."
".LAN_MAILOUT_236."".$lastBounceText."
"; + + // Parameters for mail-account based bounce processing + $text .= " + + + + + + + + + + + \n + "; + + $check = ($pref['mail_bounce_delete']==1) ? " checked='checked'" : ""; + $text .= ""; + + $check = ($pref['mail_bounce_auto']==1) ? " checked='checked'" : ""; + $text .= " + + +
".LAN_MAILOUT_32."
".LAN_MAILOUT_33."
".LAN_MAILOUT_34."
".LAN_MAILOUT_35."
".LAN_MAILOUT_120."
".LAN_MAILOUT_36."
".LAN_MAILOUT_245." ".LAN_MAILOUT_246."
+ +
".$frm->admin_button('updateprefs',LAN_MAILOUT_28,'update')."
+ +
"; + + return $text; +// $caption = ADLAN_136.SEP.LAN_PREFS; +// $ns->tablerender($caption, $mes->render(). $text); + + } + + + + + + + + + // Update Preferences. (security handled elsewhere) + function saveMailPrefs(&$mes) // $emessage to $mes, working? + { + if(!getperms('0')) + { + return; + } + + //$pref = e107::getPref(); + $e107 = e107::getInstance(); + $tp = e107::getParser(); + $mes = e107::getMessage(); + + $bounceOpts = array('none' => LAN_MAILOUT_232, 'auto' => LAN_MAILOUT_233, 'mail' => LAN_MAILOUT_234); + unset($temp); + if (!in_array($_POST['mailer'], array('smtp', 'sendmail', 'php'))) $_POST['mailer'] = 'php'; + $temp['mailer'] = $_POST['mailer']; + // Allow qmail as an option as well - works much as sendmail + if ((strpos($_POST['sendmail'],'sendmail') !== FALSE) || (strpos($_POST['sendmail'],'qmail') !== FALSE)) + { + $temp['sendmail'] = $tp->toDB($_POST['sendmail']); + } + else + { + $temp['sendmail'] = ''; + } + $temp['smtp_server'] = $tp->toDB($_POST['smtp_server']); + $temp['smtp_username'] = $tp->toDB($_POST['smtp_username']); + $temp['smtp_password'] = $tp->toDB($_POST['smtp_password']); + + $smtp_opts = array(); + switch (trim($_POST['smtp_options'])) + { + case 'smtp_ssl' : + $smtp_opts[] = 'secure=SSL'; + break; + case 'smtp_tls' : + $smtp_opts[] = 'secure=TLS'; + break; + case 'smtp_pop3auth' : + $smtp_opts[] = 'pop3auth'; + break; + } + if (varsettrue($_POST['smtp_keepalive'])) $smtp_opts[] = 'keepalive'; + if (varsettrue($_POST['smtp_useVERP'])) $smtp_opts[] = 'useVERP'; + + $temp['smtp_options'] = implode(',',$smtp_opts); + + $temp['mail_sendstyle'] = $tp->toDB($_POST['mail_sendstyle']); + $temp['mail_pause'] = intval($_POST['mail_pause']); + $temp['mail_pausetime'] = intval($_POST['mail_pausetime']); + $temp['mail_workpertick'] = intval($_POST['mail_workpertick']); + $temp['mail_workpertick'] = min($temp['mail_workpertick'],1000); + $temp['mail_bounce'] = isset($bounceOpts[$_POST['mail_bounce']]) ? $_POST['mail_bounce'] : 'none'; + $temp['mail_bounce_auto'] = 0; // Make sure this is always defined + switch ($temp['mail_bounce']) + { + case 'none' : + $temp['mail_bounce_email'] = ''; + break; + case 'auto' : + $temp['mail_bounce_email'] = $tp->toDB($_POST['mail_bounce_email2']); + break; + case 'mail' : + $temp['mail_bounce_email'] = $tp->toDB($_POST['mail_bounce_email']); + $temp['mail_bounce_auto'] = intval($_POST['mail_bounce_auto']); + break; + } + $temp['mail_bounce_pop3'] = $tp->toDB($_POST['mail_bounce_pop3']); + $temp['mail_bounce_user'] = $tp->toDB($_POST['mail_bounce_user']); + $temp['mail_bounce_pass'] = $tp->toDB($_POST['mail_bounce_pass']); + $temp['mail_bounce_type'] = $tp->toDB($_POST['mail_bounce_type']); + $temp['mail_bounce_delete'] = intval(varset($_POST['mail_bounce_delete'], 0)); + + $temp['mailout_enabled'] = implode(',',varset($_POST['mail_mailer_enabled'], '')); + $temp['mail_log_options'] = intval($_POST['mail_log_option']).','.intval($_POST['mail_log_email']); + + foreach ($temp as &$t) + { + if ($t === NULL) $t = ''; + } + $pref = e107::pref('core'); // Core Prefs Array. + if (e107::getAdminLog()->logArrayDiffs($temp, $pref, 'MAIL_03')) + { + e107::getConfig()->updatePref($temp); + e107::getConfig()->save(false); // Only save if changes - generates its own message + } + else + { + $mes->addInfo(LAN_NO_CHANGE); + } + } + + + +} + +class mailout_admin_form_ui extends e_admin_form_ui +{ + + public function mail_selectors($curval, $mode) + { + $val = stripslashes($this->getController()->getModel()->get('mail_other')); + $data = e107::unserialize($val); + + switch($mode) + { + case 'read': + return varset($data['mail_send_style'], ''); + break; + + case 'write': + return $this->getController()->mailAdmin->emailSelector('all', varset($data['mail_selectors'], FALSE)); + break; + + case 'filter': + case 'batch': + // return $controller->getcustCategoryTree(); + break; + + } + + } + + + + + public function mail_send_style($curVal, $mode) + { + $val = stripslashes($this->getController()->getModel()->get('mail_other')); + $data = e107::unserialize($val); + + switch($mode) + { + case 'read': + return varset($data['mail_send_style'], ''); + break; + + case 'write': + return $this->getController()->mailAdmin->sendStyleSelect(varset($data['mail_send_style'], ''),'mail_send_style'); + break; + + case 'filter': + case 'batch': + // return $controller->getcustCategoryTree(); + break; + + } + + + } + + + private function mailDetails($field, $mode) + { + + switch($mode) + { + case 'read': + $val = stripslashes($this->getController()->getListModel()->get('mail_other')); + $data = e107::unserialize($val); + return $data[$field]; + break; + + case 'write': + $val = stripslashes($this->getController()->getModel()->get('mail_other')); + $data = e107::unserialize($val); + + if($field == 'mail_sender_name' && !vartrue($data['mail_sender_name'])) + { + $data['mail_sender_name'] = USERNAME; + } + + if($field == 'mail_sender_email' && !vartrue($data['mail_sender_email'])) + { + $data['mail_sender_email'] = USEREMAIL; + } + + + return $this->text($field, $data[$field],70, 'size=xxlarge'); + break; + + case 'filter': + case 'batch': + // return $controller->getcustCategoryTree(); + break; + + } + } + + + public function mail_sender_name($curVal,$mode) + { + return $this->mailDetails('mail_sender_name', $mode); + } + + public function mail_sender_email($curVal,$mode) + { + return $this->mailDetails('mail_sender_email', $mode); + } + + public function mail_copy_to($curVal,$mode) + { + return $this->mailDetails('mail_copy_to', $mode); + } + + public function mail_bcopy_to($curVal,$mode) + { + return $this->mailDetails('mail_bcopy_to', $mode); + } + + public function mail_attach($curVal,$mode) + { + if($mode == 'read') + { + $val = stripslashes($this->getController()->getListModel()->get('mail_other')); + $data = e107::unserialize($val); + return basename($data['mail_attach']); + } + + if($mode == 'write') + { + $val = stripslashes($this->getController()->getModel()->get('mail_other')); + $data = e107::unserialize($val); + return $this->filepicker('mail_attach',$data['mail_attach'], $mode); + } + + } + + + function options() + { + $controller = $this->getController(); + + $mode = $controller->getMode(); + $mailData = $controller->getListModel()->getData(); + + return $controller->mailAdmin->makeMailOptions($mode,$mailData); + + } + +} + + + + + +class mailout_recipients_ui extends e_admin_ui +{ + + //TODO Move to Class above. + protected $pluginTitle = LAN_MAILOUT_15; + protected $pluginName = LAN_MAILOUT_15; + protected $table = "mail_recipients"; + + // protected $listQry = "SELECT * FROM #mail_content WHERE mail_content_status = 20 "; + + + // protected $editQry = "SELECT * FROM #mail_content WHERE cust_id = {ID}"; + + protected $pid = "mail_target_id"; + protected $perPage = 10; + protected $listOrder = "mail_target_id desc"; + + protected $batchDelete = true; + + // protected $tabs = array('General','Details', 'Questionnaire', 'Correspondence'); + + protected $fields = array( + 'checkboxes' => array('title'=> '', 'type' => null, 'width' =>'5%', 'forced'=> TRUE, 'thclass'=>'center', 'class'=>'center'), + 'mail_target_id' => array('title' => LAN_MAILOUT_143, 'thclass' => 'center', 'forced' => TRUE), + 'mail_recipient_id' => array('title' => LAN_MAILOUT_142, 'thclass' => 'center'), + 'mail_recipient_name' => array('title' => LAN_MAILOUT_141, 'forced' => TRUE), + 'mail_recipient_email' => array('title' => LAN_MAILOUT_140, 'thclass' => 'left', 'forced' => TRUE), + 'mail_status' => array('title' => LAN_MAILOUT_138, 'thclass' => 'center', 'proc' => 'contentstatus'), + 'mail_detail_id' => array('title' => LAN_MAILOUT_137, 'type'=>'dropdown', 'filter'=>true), + 'mail_send_date' => array('title' => LAN_MAILOUT_139, 'proc' => 'sdatetime'), + 'mail_target_info' => array('title' => LAN_MAILOUT_148, 'proc' => 'array'), + 'options' => array('title' => LAN_OPTIONS, 'width'=>'10%', 'forced' => TRUE) + ); + + + protected $fieldpref = array('checkboxes', 'mail_target_id', 'mail_recipient_name', 'mail_recipient_email', 'mail_detail_id', 'mail_status', 'options'); + + + function init() + { + $sql = e107::getDb(); + $sql->gen("SELECT r.mail_detail_id,c.mail_title FROM #mail_recipients AS r LEFT JOIN #mail_content as c ON r.mail_detail_id = c.mail_source_id GROUP BY r.mail_detail_id"); + + while($row = $sql->fetch()) + { + $array[] = $row['mail_title']; + } + $this->fields['mail_detail_id']['writeParms'] = $array; + + + if(strpos($_GET['filter_options'],'mail_detail_id__')===false) + { + $ns = e107::getRender(); + e107::getMessage()->addInfo("Please select a mailing list from the filter menu below to view recipients."); + $this->listQry = "SELECT * FROM #mail_recipients WHERE mail_target_id = 0"; // simulated empty result. + return false; + } + + + + + } + + +} + + + +class mailout_recipients_form_ui extends e_admin_form_ui +{ + + + +} + + +new mailout_admin(); + + + + + + + + + + + + + + $e_sub_cat = 'mail'; @@ -84,15 +1096,7 @@ if(vartrue($_GET['mode']) == "progress") exit; } -require_once(e_HANDLER.'ren_help.php'); -include_lan(e_LANGUAGEDIR.e_LANGUAGE.'/admin/lan_users.php'); -include_lan(e_LANGUAGEDIR.e_LANGUAGE.'/admin/lan_mailout.php'); -require_once(e_HANDLER.'userclass_class.php'); -require_once(e_HANDLER.'mailout_class.php'); // Class handler for core mailout functions -require_once(e_HANDLER.'mailout_admin_class.php'); // Admin tasks handler -require_once(e_HANDLER.'mail_manager_class.php'); // Mail DB API -require_once (e_HANDLER.'message_handler.php'); $mes = e107::getMessage(); $tp = e107::getParser(); @@ -131,6 +1135,9 @@ if ($mailAdmin->loadMailHandlers() == 0) require_once(e_ADMIN.'auth.php'); +e107::getAdminUI()->runPage(); + +require_once(e_ADMIN.'footer.php'); @@ -174,6 +1181,8 @@ if (isset($_POST['targetaction'])) } } + +// e107::getMessage()->addDebug("Action=".$action); //echo "Action: {$action} MailId: {$mailId} Target: {$targetId}
"; // ----------------- Actions -------------------> @@ -181,6 +1190,7 @@ if (isset($_POST['targetaction'])) switch ($action) { + /* case 'prefs' : if (getperms('0')) { @@ -214,7 +1224,8 @@ switch ($action) } } break; - + */ + /* case 'mailcopy' : // Copy existing email and go to edit screen if (isset($_POST['mailaction'])) { @@ -228,7 +1239,7 @@ switch ($action) unset($mailData['mail_source_id']); } break; - + */ case 'mailedit' : // Edit existing mail if (isset($_POST['mailaction'])) { @@ -398,7 +1409,7 @@ switch ($action) case 'mailshowtemplate' : if (isset($_POST['etrigger_ecolumns'])) { - $mailAdmin->mailbodySaveColumnPref($action); + // $mailAdmin->mailbodySaveColumnPref($action); } break; @@ -424,8 +1435,8 @@ switch ($action) default : - $mes->addError('Code malfunction 23! ('.$action.')'); - $ns->tablerender(LAN_MAILOUT_97, $mes->render()); + // $mes->addError('Code malfunction 23! ('.$action.')'); + // $ns->tablerender(LAN_MAILOUT_97, $mes->render()); exit; // Could be a hack attempt } // switch($action) - end of 'executive' tasks @@ -548,7 +1559,7 @@ switch ($action) case 'sent' : case 'pending' : case 'held' : - $mailAdmin->showEmailList($action, -1, -1); + // $mailAdmin->showEmailList($action, -1, -1); break; case 'mailshowtemplate' : // Show the templated email @@ -564,7 +1575,7 @@ switch ($action) break; case 'recipients' : - $mailAdmin->showmailRecipients($mailId, $action); + // $mailAdmin->showmailRecipients($mailId, $action); break; case 'makemail' : @@ -670,101 +1681,16 @@ function sendProgress() } -// Update Preferences. (security handled elsewhere) -function saveMailPrefs(&$mes) // $emessage to $mes, working? -{ - //$pref = e107::getPref(); - $e107 = e107::getInstance(); - $tp = e107::getParser(); - - $bounceOpts = array('none' => LAN_MAILOUT_232, 'auto' => LAN_MAILOUT_233, 'mail' => LAN_MAILOUT_234); - unset($temp); - if (!in_array($_POST['mailer'], array('smtp', 'sendmail', 'php'))) $_POST['mailer'] = 'php'; - $temp['mailer'] = $_POST['mailer']; - // Allow qmail as an option as well - works much as sendmail - if ((strpos($_POST['sendmail'],'sendmail') !== FALSE) || (strpos($_POST['sendmail'],'qmail') !== FALSE)) - { - $temp['sendmail'] = $tp->toDB($_POST['sendmail']); - } - else - { - $temp['sendmail'] = ''; - } - $temp['smtp_server'] = $tp->toDB($_POST['smtp_server']); - $temp['smtp_username'] = $tp->toDB($_POST['smtp_username']); - $temp['smtp_password'] = $tp->toDB($_POST['smtp_password']); - - $smtp_opts = array(); - switch (trim($_POST['smtp_options'])) - { - case 'smtp_ssl' : - $smtp_opts[] = 'secure=SSL'; - break; - case 'smtp_tls' : - $smtp_opts[] = 'secure=TLS'; - break; - case 'smtp_pop3auth' : - $smtp_opts[] = 'pop3auth'; - break; - } - if (varsettrue($_POST['smtp_keepalive'])) $smtp_opts[] = 'keepalive'; - if (varsettrue($_POST['smtp_useVERP'])) $smtp_opts[] = 'useVERP'; - - $temp['smtp_options'] = implode(',',$smtp_opts); - - $temp['mail_sendstyle'] = $tp->toDB($_POST['mail_sendstyle']); - $temp['mail_pause'] = intval($_POST['mail_pause']); - $temp['mail_pausetime'] = intval($_POST['mail_pausetime']); - $temp['mail_workpertick'] = intval($_POST['mail_workpertick']); - $temp['mail_workpertick'] = min($temp['mail_workpertick'],1000); - $temp['mail_bounce'] = isset($bounceOpts[$_POST['mail_bounce']]) ? $_POST['mail_bounce'] : 'none'; - $temp['mail_bounce_auto'] = 0; // Make sure this is always defined - switch ($temp['mail_bounce']) - { - case 'none' : - $temp['mail_bounce_email'] = ''; - break; - case 'auto' : - $temp['mail_bounce_email'] = $tp->toDB($_POST['mail_bounce_email2']); - break; - case 'mail' : - $temp['mail_bounce_email'] = $tp->toDB($_POST['mail_bounce_email']); - $temp['mail_bounce_auto'] = intval($_POST['mail_bounce_auto']); - break; - } - $temp['mail_bounce_pop3'] = $tp->toDB($_POST['mail_bounce_pop3']); - $temp['mail_bounce_user'] = $tp->toDB($_POST['mail_bounce_user']); - $temp['mail_bounce_pass'] = $tp->toDB($_POST['mail_bounce_pass']); - $temp['mail_bounce_type'] = $tp->toDB($_POST['mail_bounce_type']); - $temp['mail_bounce_delete'] = intval(varset($_POST['mail_bounce_delete'], 0)); - - $temp['mailout_enabled'] = implode(',',varset($_POST['mail_mailer_enabled'], '')); - $temp['mail_log_options'] = intval($_POST['mail_log_option']).','.intval($_POST['mail_log_email']); - - foreach ($temp as &$t) - { - if ($t === NULL) $t = ''; - } - $pref = e107::pref('core'); // Core Prefs Array. - if (e107::getAdminLog()->logArrayDiffs($temp, $pref, 'MAIL_03')) - { - e107::getConfig()->updatePref($temp); - e107::getConfig()->save(false); // Only save if changes - generates its own message - } - else - { - $mes->addInfo(LAN_NO_CHANGE); - } -} - //---------------------------------------------------- // MAILER OPTIONS //---------------------------------------------------- - +/* function show_prefs($mailAdmin) { + return; + $pref = e107::getPref(); $e107 = e107::getInstance(); $frm = e107::getForm(); @@ -790,7 +1716,7 @@ function show_prefs($mailAdmin) ".LAN_MAILOUT_110."
- ".$frm->admin_button('testemail', LAN_MAILOUT_112,'other')."  + ".$frm->admin_button('testemail', LAN_MAILOUT_112,'other')."  @@ -868,7 +1794,7 @@ function show_prefs($mailAdmin) "; - +*/ /* FIXME - posting SENDMAIL path triggers Mod-Security rules. // Sendmail. --------------> $senddisp = ($pref['mailer'] != 'sendmail') ? "style='display:none;'" : ''; @@ -883,7 +1809,7 @@ function show_prefs($mailAdmin) "; */ - +/* $text .=" @@ -1036,7 +1962,7 @@ function show_prefs($mailAdmin) $caption = ADLAN_136.SEP.LAN_PREFS; $ns->tablerender($caption, $mes->render(). $text); } - +*/ //----------------------------------------------------------- @@ -1044,6 +1970,8 @@ function show_prefs($mailAdmin) //----------------------------------------------------------- function show_maint($debug = FALSE) { + return; + $mes = e107::getMessage(); $ns = e107::getRender(); $frm = e107::getForm(); @@ -1069,7 +1997,7 @@ function show_maint($debug = FALSE) } - +/* function mailout_adminmenu() { $tp = e107::getParser(); @@ -1111,6 +2039,8 @@ function mailout_adminmenu() } show_admin_menu(LAN_MAILOUT_15, $action, $var); } +*/ + function headerjs() diff --git a/e107_core/templates/email_template.php b/e107_core/templates/email_template.php index aecc3d9a9..c9e5e5304 100644 --- a/e107_core/templates/email_template.php +++ b/e107_core/templates/email_template.php @@ -297,6 +297,7 @@ $MONTHLYUPDATE_TEMPLATE = array( /** Standardized v2 template rewrite + * * Format for individual emails sent by e107 (not bulk emails for now) - a work in progress - bulk could be ported later. * @see e107Email::sendEmail(); * Aim: to make email templates follow the same spec. as other templates while remaining as intuitive as other v2 templates in e107. @@ -396,22 +397,35 @@ $EMAIL_TEMPLATE['quickadduser']['footer'] = $EMAIL_TEMPLATE['default']['footer' -// --------------------------------- +// ------- Notify (@see admin-> notify) - -// Notify (@see admin-> notify) $EMAIL_TEMPLATE['notify']['subject'] = '{SITENAME}: {SUBJECT} '; $EMAIL_TEMPLATE['notify']['header'] = $EMAIL_TEMPLATE['default']['header']; // will use default header above. $EMAIL_TEMPLATE['notify']['body'] = $EMAIL_TEMPLATE['default']['body']; // will use default header above. $EMAIL_TEMPLATE['notify']['footer'] = $EMAIL_TEMPLATE['default']['footer']; // will use default header above. -// --------------------------------- +// ------ User-Mailout Templates + + +$EMAIL_TEMPLATE['user-monthly']['name'] = 'Monthly Update'; +$EMAIL_TEMPLATE['user-monthly']['subject'] = '{SITENAME}: {SUBJECT} '; +$EMAIL_TEMPLATE['user-monthly']['header'] = $EMAIL_TEMPLATE['default']['header']; // will use default header above. +$EMAIL_TEMPLATE['user-monthly']['body'] = "Just to keep you up to date, here's a reminder of what's changed in the past month.
{BODY}
To find out more, simply click on the links!"; +$EMAIL_TEMPLATE['user-monthly']['footer'] = $EMAIL_TEMPLATE['default']['footer']; + + +$EMAIL_TEMPLATE['user-whatsnew']['name'] = "What's New"; +$EMAIL_TEMPLATE['user-whatsnew']['subject'] = '{SITENAME}: {SUBJECT} '; +$EMAIL_TEMPLATE['user-whatsnew']['header'] = $EMAIL_TEMPLATE['default']['header']; // will use default header above. +$EMAIL_TEMPLATE['user-whatsnew']['body'] = "All the latest news and updates.
{BODY}
To find out more, simply click on the links!"; +$EMAIL_TEMPLATE['user-whatsnew']['footer'] = $EMAIL_TEMPLATE['default']['footer']; -// A Dummy Example for theme developers. +// ------ A Dummy Example for theme developers. + $EMAIL_TEMPLATE['example']['subject'] = '{SITENAME}: {SUBJECT} '; $EMAIL_TEMPLATE['example']['header'] = $EMAIL_TEMPLATE['default']['header']; // will use default header above. $EMAIL_TEMPLATE['example']['body'] = $EMAIL_TEMPLATE['default']['body']; // will use default header above. @@ -422,4 +436,7 @@ $EMAIL_TEMPLATE['example']['footer'] = "

"; + + + ?> \ No newline at end of file diff --git a/e107_handlers/form_handler.php b/e107_handlers/form_handler.php index 78ff2ef05..7120b2e36 100644 --- a/e107_handlers/form_handler.php +++ b/e107_handlers/form_handler.php @@ -3984,12 +3984,21 @@ class e_form } } + if(!is_array($att['writeParms'])) + { + parse_str(varset($att['writeParms']), $writeParms); + } + else + { + $writeParms = $att['writeParms']; + } + + + if('hidden' === $att['type']) { - if(!is_array($att['writeParms'])) parse_str(varset($att['writeParms']), $tmp); - else $tmp = $att['writeParms']; - if(!vartrue($tmp['show'])) + if(!vartrue($writeParms['show'])) { continue; } @@ -4039,12 +4048,13 @@ class e_form $leftCell = $required."".defset(vartrue($att['title']), vartrue($att['title']))."".$label; $rightCell = $this->renderElement($keyName, $model->getIfPosted($valPath), $att, varset($model_required[$key], array()), $model->getId())." {$help}"; - if(vartrue($att['type']) == 'bbarea') + if(vartrue($att['type']) == 'bbarea' || $writeParms['nolabel'] == true) { $text .= " - -
".$leftCell."
". - $rightCell." + "; + + $text .= "
".$leftCell."
"; + $text .= $rightCell." diff --git a/e107_handlers/mail_manager_class.php b/e107_handlers/mail_manager_class.php index 55ba7b277..a7650e810 100644 --- a/e107_handlers/mail_manager_class.php +++ b/e107_handlers/mail_manager_class.php @@ -262,8 +262,8 @@ class e107MailManager $res[$f] = ''; } } - $array = new ArrayData; - $res['mail_other'] = $array->WriteArray($res1, TRUE); // Ready to write to DB + // $array = new ArrayData; + $res['mail_other'] = e107::serialize($res1, TRUE); // Ready to write to DB return $res; } @@ -296,8 +296,8 @@ class e107MailManager } if (isset($data['mail_other'])) { - $array = new ArrayData; - $tmp = $array->ReadArray(str_replace('\\\'', '\'',$data['mail_other'])); // May have escaped data + + $tmp = e107::unserialize(str_replace('\\\'', '\'',$data['mail_other'])); // May have escaped data if (is_array($tmp)) { $res = array_merge($res,$tmp); diff --git a/e107_handlers/mailout_admin_class.php b/e107_handlers/mailout_admin_class.php index 4877f0c6e..448c2f67e 100644 --- a/e107_handlers/mailout_admin_class.php +++ b/e107_handlers/mailout_admin_class.php @@ -473,7 +473,6 @@ class mailoutAdminClass extends e107MailManager $ret = ''; $tab = ''; $tabc = ''; - foreach ($this->mailHandlers as $key => $m) { @@ -489,7 +488,7 @@ class mailoutAdminClass extends e107MailManager if(is_array($content)) { - $tabc .= " + $tabc .= "
@@ -498,7 +497,7 @@ class mailoutAdminClass extends e107MailManager foreach($content as $var) { - $tabc .= ""; + $tabc .= ""; } $tabc .= "
".$var['caption']."".$var['html']."
".$var['caption']."".$var['html']."
"; } @@ -552,7 +551,7 @@ class mailoutAdminClass extends e107MailManager */ public function userClassesTotals($name, $curSel) { - $fixedClasses = array('all' => LAN_MAILOUT_12,'unverified' => LAN_MAILOUT_13, 'admin' => LAN_MAILOUT_53, 'self' => LAN_MAILOUT_54); + $fixedClasses = array('self' => LAN_MAILOUT_54, 'all' => LAN_MAILOUT_12,'unverified' => LAN_MAILOUT_13, 'admin' => LAN_MAILOUT_53 ); $ret = ''; $this->checkDB(2); // Make sure DB object created @@ -793,7 +792,7 @@ class mailoutAdminClass extends e107MailManager 'texttheme' => LAN_MAILOUT_127 ); - $text = "\n"; foreach ($emFormat as $key=>$val) { @@ -856,9 +855,12 @@ class mailoutAdminClass extends e107MailManager $text .= "
-
- ".$this->emailSelector('all', varset($mailSource['mail_selectors'], FALSE))." - + "; + + + $text .= $this->emailSelector('all', varset($mailSource['mail_selectors'], FALSE)); + + $text .= "
@@ -901,7 +903,7 @@ class mailoutAdminClass extends e107MailManager - + "; @@ -999,7 +1001,9 @@ class mailoutAdminClass extends e107MailManager "; - $ns->tablerender(ADLAN_136.SEP.LAN_MAILOUT_15, $mes->render(). $text); // Render the complete form + return $text; + + // $ns->tablerender(ADLAN_136.SEP.LAN_MAILOUT_15, $mes->render(). $text); // Render the complete form } @@ -1784,6 +1788,22 @@ class mailoutAdminClass extends e107MailManager public function getEmailTemplateNames($sel = 'all') { $ret = array(); + + $templates = e107::getCoreTemplate('email'); + + foreach($templates as $key=>$layout) + { + if(substr($key,0,5)== 'user-' || $key == 'default') + { + $ret[$key] = $layout['name']; + } + + + } + + return $ret; + /* + foreach (array(e_CORE.'templates/email_template.php', THEME.'templates/email_template.php') as $templateFileName ) // Override file then defaults if (is_readable($templateFileName)) { @@ -1805,7 +1825,14 @@ class mailoutAdminClass extends e107MailManager } } } + + + + + print_a($ret); return $ret; + + */ } } diff --git a/e107_handlers/mailout_class.php b/e107_handlers/mailout_class.php index 6a987e5d6..71c5317c9 100644 --- a/e107_handlers/mailout_class.php +++ b/e107_handlers/mailout_class.php @@ -268,7 +268,7 @@ class core_mailout $var = array(); - $var[0]['caption'] = LAN_MAILOUT_03; // User class select + $var[0]['caption'] = LAN_MAILOUT_260; // LAN_MAILOUT_03; // User class select if ($allow_edit) { diff --git a/e107_languages/English/admin/help/mailout.php b/e107_languages/English/admin/help/mailout.php index 20065ba08..49240c5d2 100644 --- a/e107_languages/English/admin/help/mailout.php +++ b/e107_languages/English/admin/help/mailout.php @@ -37,6 +37,7 @@ $action = e107::getParser()->toDB(varset($_GET['mode'],'makemail')); break; case 'savedmail' : case 'makemail' : + case 'main' : $text = 'Create an email, give it a meaningful title, and select the list of recipients. You can save everything as a template for later, or send immediately.
'; $text .= 'Email addresses may be contributed by plugins (such as newsletter), and duplicates are removed when the mail is sent
'; $text .= 'Any attachment is selected from the list of valid downloads.
'; diff --git a/e107_languages/English/admin/lan_mailout.php b/e107_languages/English/admin/lan_mailout.php index 32e89880d..b681d1495 100644 --- a/e107_languages/English/admin/lan_mailout.php +++ b/e107_languages/English/admin/lan_mailout.php @@ -22,8 +22,8 @@ define("LAN_MAILOUT_08", "Send Email"); define("LAN_MAILOUT_09", "Send format"); define("LAN_MAILOUT_10", "User Subscribed"); define("LAN_MAILOUT_11", "Insert Variables"); -define("LAN_MAILOUT_12", "All Members"); -define("LAN_MAILOUT_13", "All Unverified Members "); +define("LAN_MAILOUT_12", "All Users"); +define("LAN_MAILOUT_13", "All Unverified Users "); define("LAN_MAILOUT_14", "Display Name"); define("LAN_MAILOUT_15", "Mailout"); define("LAN_MAILOUT_16", "Username"); @@ -279,6 +279,8 @@ define("LAN_MAILOUT_259", ""); define("LAN_SEND", "Send"); define("LAN_HOLD", "Hold"); +define("LAN_MAILOUT_260", "User-Type"); + //define("LAN_SUBMIT", "Do it!"); LAN_RUN ?> \ No newline at end of file
".LAN_MAILOUT_51.": ".$frm->text('email_subject',varset($email_subject,''))."".$frm->text('email_subject',varset($email_subject,''),255,'required=1&size=xxlarge')."