mirror of
https://github.com/e107inc/e107.git
synced 2025-04-14 01:22:13 +02:00
Mailout - start of cleaning up old code and LAN. More work needed.
This commit is contained in:
parent
b3f6512e4b
commit
9cef260d41
@ -8,10 +8,8 @@
|
||||
*
|
||||
* Administration - Mailout
|
||||
*
|
||||
* $Source: /cvs_backup/e107_0.8/e107_admin/mailout.php,v $
|
||||
* $Revision$
|
||||
* $Date$
|
||||
* $Author$
|
||||
* $URL$
|
||||
* $Id$
|
||||
*
|
||||
*/
|
||||
|
||||
@ -97,8 +95,10 @@ 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');
|
||||
$emessage = &eMessage :: getInstance();
|
||||
$mes = e107::getMessage();
|
||||
$tp = e107::getParser();
|
||||
|
||||
if($_GET['mode']=="process")
|
||||
{
|
||||
@ -119,7 +119,7 @@ if($_GET['mode']=="process")
|
||||
|
||||
|
||||
|
||||
$action = $e107->tp->toDB(varset($_GET['mode'],'makemail'));
|
||||
$action = $tp->toDB(varset($_GET['mode'],'makemail'));
|
||||
$pageMode = varset($_GET['savepage'], $action); // Sometimes we need to know what brought us here - $action gets changed
|
||||
$mailId = intval(varset($_GET['m'],0));
|
||||
$targetId = intval(varset($_GET['t'],0));
|
||||
@ -192,7 +192,7 @@ switch ($action)
|
||||
{ // Send test email - uses standard 'single email' handler
|
||||
if(trim($_POST['testaddress']) == '')
|
||||
{
|
||||
$emessage->add(LAN_MAILOUT_19, E_MESSAGE_ERROR);
|
||||
$mes->addError(LAN_MAILOUT_19);
|
||||
$subAction = 'error';
|
||||
}
|
||||
else
|
||||
@ -203,18 +203,18 @@ switch ($action)
|
||||
$sendto = trim($_POST['testaddress']);
|
||||
if (!sendemail($sendto, LAN_MAILOUT_113." ".SITENAME.$add, LAN_MAILOUT_114,LAN_MAILOUT_189))
|
||||
{
|
||||
$emessage->add(($pref['mailer'] == 'smtp') ? LAN_MAILOUT_67 : LAN_MAILOUT_106, E_MESSAGE_ERROR);
|
||||
$mes->addError(($pref['mailer'] == 'smtp') ? LAN_MAILOUT_67 : LAN_MAILOUT_106);
|
||||
}
|
||||
else
|
||||
{
|
||||
$emessage->add(LAN_MAILOUT_81. ' ('.$sendto.')', E_MESSAGE_SUCCESS);
|
||||
$mes->addSuccess(LAN_MAILOUT_81. ' ('.$sendto.')');
|
||||
$admin_log->log_event('MAIL_01',$sendto,E_LOG_INFORMATIVE,'');
|
||||
}
|
||||
}
|
||||
}
|
||||
elseif (isset($_POST['updateprefs']))
|
||||
{
|
||||
saveMailPrefs($emessage);
|
||||
saveMailPrefs($mes); // TODO check if functional, $emessage -> $mes
|
||||
}
|
||||
}
|
||||
break;
|
||||
@ -226,7 +226,7 @@ switch ($action)
|
||||
$mailData = $mailAdmin->retrieveEmail($mailId);
|
||||
if ($mailData === FALSE)
|
||||
{
|
||||
$emessage->add(LAN_MAILOUT_164.':'.$mailId, E_MESSAGE_ERROR);
|
||||
$mes->addError(LAN_MAILOUT_164.':'.$mailId);
|
||||
break;
|
||||
}
|
||||
unset($mailData['mail_source_id']);
|
||||
@ -240,7 +240,7 @@ switch ($action)
|
||||
$mailData = $mailAdmin->retrieveEmail($mailId);
|
||||
if ($mailData === FALSE)
|
||||
{
|
||||
$emessage->add(LAN_MAILOUT_164.':'.$mailId, E_MESSAGE_ERROR);
|
||||
$mes->addError(LAN_MAILOUT_164.':'.$mailId);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -288,11 +288,11 @@ switch ($action)
|
||||
if (is_numeric($result))
|
||||
{
|
||||
$mailData['mail_source_id'] = $result;
|
||||
$emessage->add(LAN_MAILOUT_145, E_MESSAGE_SUCCESS);
|
||||
$mes->addSuccess(LAN_MAILOUT_145);
|
||||
}
|
||||
else
|
||||
{
|
||||
$emessage->add(LAN_MAILOUT_146, E_MESSAGE_ERROR);
|
||||
$mes->addError(LAN_MAILOUT_146);
|
||||
}
|
||||
break;
|
||||
case 'update' :
|
||||
@ -301,11 +301,11 @@ switch ($action)
|
||||
if (is_numeric($result))
|
||||
{
|
||||
$mailData['mail_source_id'] = $result;
|
||||
$emessage->add(LAN_MAILOUT_147, E_MESSAGE_SUCCESS);
|
||||
$mes->addSuccess(LAN_MAILOUT_147);
|
||||
}
|
||||
else
|
||||
{
|
||||
$emessage->add(LAN_MAILOUT_146, E_MESSAGE_ERROR);
|
||||
$mes->addError(LAN_MAILOUT_146);
|
||||
}
|
||||
break;
|
||||
}
|
||||
@ -315,7 +315,7 @@ switch ($action)
|
||||
$action = 'held';
|
||||
if ($mailAdmin->holdEmail($mailId))
|
||||
{
|
||||
$emessage->add(str_replace('--ID--', $mailId, LAN_MAILOUT_229), E_MESSAGE_SUCCESS);
|
||||
$mes->addSuccess(str_replace('--ID--', $mailId, LAN_MAILOUT_229));
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -327,7 +327,7 @@ switch ($action)
|
||||
$action = $pageMode; // Want to return to some other page
|
||||
if ($mailAdmin->cancelEmail($mailId))
|
||||
{
|
||||
$emessage->add(str_replace('--ID--', $mailId, LAN_MAILOUT_220), E_MESSAGE_SUCCESS);
|
||||
$mes->addSuccess(str_replace('--ID--', $mailId, LAN_MAILOUT_220));
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -349,7 +349,7 @@ switch ($action)
|
||||
{
|
||||
if ($mailAdmin->activateEmail($mailId, TRUE))
|
||||
{
|
||||
$emessage->add(str_replace('--ID--', $mailId, LAN_MAILOUT_187), E_MESSAGE_SUCCESS);
|
||||
$mes->addSuccess(str_replace('--ID--', $mailId, LAN_MAILOUT_187));
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -388,7 +388,7 @@ switch ($action)
|
||||
|
||||
case 'mailonedelete' :
|
||||
case 'debug' :
|
||||
$emessage->add('Not implemented yet', E_MESSAGE_ERROR);
|
||||
$mes->addError('Not implemented yet');
|
||||
break;
|
||||
|
||||
case 'mailtargets' :
|
||||
@ -410,7 +410,7 @@ switch ($action)
|
||||
if (isset($_POST['email_dross']))
|
||||
if ($mailAdmin->dbTidy()) // Admin logging done in this routine
|
||||
{
|
||||
$emessage->add(LAN_MAILOUT_184, E_MESSAGE_SUCCESS);
|
||||
$mes->addSuccess(LAN_MAILOUT_184);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -428,8 +428,8 @@ switch ($action)
|
||||
|
||||
|
||||
default :
|
||||
$emessage->add('Code malfunction 23! ('.$action.')', E_MESSAGE_ERROR);
|
||||
$e107->ns->tablerender(LAN_MAILOUT_97, $emessage->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
|
||||
|
||||
@ -458,7 +458,7 @@ switch ($midAction)
|
||||
}
|
||||
else
|
||||
{
|
||||
$emessage->add(str_replace('--ID--', $mailId, LAN_MAILOUT_167), E_MESSAGE_SUCCESS);
|
||||
$mes->addSuccess(str_replace('--ID--', $mailId, LAN_MAILOUT_167));
|
||||
}
|
||||
}
|
||||
if (isset($result['recipients']))
|
||||
@ -469,7 +469,7 @@ switch ($midAction)
|
||||
}
|
||||
else
|
||||
{
|
||||
$emessage->add(str_replace(array('--ID--', '--NUM--'), array($mailId, $result['recipients']), LAN_MAILOUT_170), E_MESSAGE_SUCCESS);
|
||||
$mes->addSuccess(str_replace(array('--ID--', '--NUM--'), array($mailId, $result['recipients']), LAN_MAILOUT_170));
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -489,7 +489,7 @@ switch ($midAction)
|
||||
}
|
||||
if ($mailAdmin->activateEmail($mailId, FALSE, $notify, $first, $last))
|
||||
{
|
||||
$emessage->add(LAN_MAILOUT_185, E_MESSAGE_SUCCESS);
|
||||
$mes->addSuccess(LAN_MAILOUT_185);
|
||||
$admin_log->log_event('MAIL_06','ID: '.$mailId,E_LOG_INFORMATIVE,'');
|
||||
}
|
||||
else
|
||||
@ -509,13 +509,13 @@ if (is_array($errors) && (count($errors) > 0))
|
||||
{
|
||||
foreach ($errors as $e)
|
||||
{
|
||||
$emessage->add($e, E_MESSAGE_ERROR);
|
||||
$mes->addError($e);
|
||||
}
|
||||
unset($errors);
|
||||
}
|
||||
if ($emessage->hasMessage())
|
||||
if ($mes->hasMessage())
|
||||
{
|
||||
$ns->tablerender(LAN_MAILOUT_97, $emessage->render());
|
||||
$ns->tablerender(LAN_MAILOUT_97, $mes->render());
|
||||
}
|
||||
|
||||
|
||||
@ -592,7 +592,7 @@ require_once(e_ADMIN.'footer.php');
|
||||
*/
|
||||
function sendImmediately($id)
|
||||
{
|
||||
global $emessage;
|
||||
$mes = e107::getMessage();
|
||||
|
||||
$text = "<div id='mstatus'>Processing Mailout ID: ".$id."</div>";
|
||||
$text .= "<div id='progress' style='margin-bottom:30px'> </div>";
|
||||
@ -628,9 +628,9 @@ function sendImmediately($id)
|
||||
</script>";
|
||||
|
||||
|
||||
$emessage->add($text, E_MESSAGE_SUCCESS);
|
||||
$mes->addSuccess($text);
|
||||
|
||||
e107::getRender()->tablerender("Sending...", $emessage->render());
|
||||
e107::getRender()->tablerender("Sending...", $mes->render());
|
||||
|
||||
}
|
||||
|
||||
@ -675,10 +675,11 @@ function sendProgress()
|
||||
|
||||
|
||||
// Update Preferences. (security handled elsewhere)
|
||||
function saveMailPrefs(&$emessage)
|
||||
function saveMailPrefs(&$mes) // $emessage to $mes, working?
|
||||
{
|
||||
global $pref;
|
||||
$pref = e107::getPref();
|
||||
$e107 = e107::getInstance();
|
||||
|
||||
$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';
|
||||
@ -746,11 +747,10 @@ function saveMailPrefs(&$emessage)
|
||||
if ($e107->admin_log->logArrayDiffs($temp, $pref, 'MAIL_03'))
|
||||
{
|
||||
save_prefs(); // Only save if changes - generates its own message
|
||||
// $emessage->add(LAN_SETSAVED, E_MESSAGE_SUCCESS);
|
||||
}
|
||||
else
|
||||
{
|
||||
$emessage->add(LAN_NO_CHANGE, E_MESSAGE_INFO);
|
||||
$mes->addInfo(LAN_NO_CHANGE);
|
||||
}
|
||||
}
|
||||
|
||||
@ -762,10 +762,11 @@ function saveMailPrefs(&$emessage)
|
||||
|
||||
function show_prefs($mailAdmin)
|
||||
{
|
||||
global $pref;
|
||||
$pref = e107::getPref();
|
||||
$e107 = e107::getInstance();
|
||||
$frm = e107::getForm();
|
||||
$mes = e107::getMessage();
|
||||
$ns = e107::getRender();
|
||||
|
||||
|
||||
e107::getCache()->CachePageMD5 = '_';
|
||||
@ -1023,8 +1024,8 @@ function show_prefs($mailAdmin)
|
||||
|
||||
</form>";
|
||||
|
||||
$caption = ADLAN_136.' :: '.LAN_PREFS;
|
||||
$e107->ns->tablerender($caption,$mes->render(). $text);
|
||||
$caption = ADLAN_136.SEP.LAN_PREFS;
|
||||
$ns->tablerender($caption, $mes->render(). $text);
|
||||
}
|
||||
|
||||
|
||||
@ -1038,9 +1039,7 @@ function show_maint($debug = FALSE)
|
||||
$ns = e107::getRender();
|
||||
$frm = e107::getForm();
|
||||
|
||||
$text = "<div style='text-align:center'>";
|
||||
|
||||
$text .= "
|
||||
$text = "
|
||||
<form action='".e_SELF."?mode=maint' id='email_maint' method='post'>
|
||||
<fieldset id='email-maint'>
|
||||
<table class='table adminlist'>
|
||||
@ -1055,22 +1054,18 @@ function show_maint($debug = FALSE)
|
||||
|
||||
".$frm->admin_button('email_dross','no-value','delete',LAN_SUBMIT)."
|
||||
<br /><span class='field-help'>".LAN_MAILOUT_252."</span></td></tr>";
|
||||
$text .= "</tbody></table>\n</fieldset></form></div>";
|
||||
$text .= "</tbody></table>\n</fieldset></form>";
|
||||
|
||||
$ns->tablerender("<div style='text-align:center'>".ADLAN_136." :: ".ADLAN_40."</div>", $mes->render().$text);
|
||||
|
||||
// $text .= "</table></div>";
|
||||
$ns->tablerender(ADLAN_136.SEP.ADLAN_40, $mes->render().$text);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
function mailout_adminmenu()
|
||||
{
|
||||
$e107 = e107::getInstance();
|
||||
$action = $e107->tp->toDB(varset($_GET['mode'],'makemail'));
|
||||
$tp = e107::getParser();
|
||||
|
||||
$action = $tp->toDB(varset($_GET['mode'],'makemail'));
|
||||
if($action == 'mailedit')
|
||||
{
|
||||
$action = 'makemail';
|
||||
@ -1109,8 +1104,6 @@ function mailout_adminmenu()
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
function headerjs()
|
||||
{
|
||||
|
||||
@ -1163,6 +1156,4 @@ function headerjs()
|
||||
|
||||
return $text;
|
||||
}
|
||||
|
||||
|
||||
?>
|
@ -8,10 +8,8 @@
|
||||
*
|
||||
* Mailout - admin-related functions
|
||||
*
|
||||
* $Source: /cvs_backup/e107_0.8/e107_handlers/mailout_admin_class.php,v $
|
||||
* $Revision: 12775 $
|
||||
* $Date: 2012-06-01 09:09:14 +0100 (Fri, 01 Jun 2012) $
|
||||
* $Author: e107coders $
|
||||
* $URL$
|
||||
* $Id$
|
||||
*
|
||||
*/
|
||||
|
||||
@ -419,7 +417,7 @@ class mailoutAdminClass extends e107MailManager
|
||||
*/
|
||||
public function loadMailHandlers($options = 'all')
|
||||
{
|
||||
global $pref;
|
||||
$pref = e107::getPref();
|
||||
|
||||
$ret = 0;
|
||||
$toLoad = explode(',', $options);
|
||||
@ -493,13 +491,13 @@ class mailoutAdminClass extends e107MailManager
|
||||
if ($m->mailerEnabled)
|
||||
{
|
||||
$tab .= "<li id='tab-main_".$key."'><a href='#main-mail-".$key."'>".$m->mailerName."</a></li>";
|
||||
$tabc .= "<div id='main-mail-".$key."' style='padding:0px;border-collapse:collapse;'>";
|
||||
$tabc .= "<div id='main-mail-".$key."' style='padding:0px;border-collapse:collapse;'>";
|
||||
|
||||
$content = $m->showSelect(TRUE, varset($selectorInfo[$key], FALSE));
|
||||
|
||||
if(is_array($content))
|
||||
{
|
||||
$tabc .= "<table class='table adminform' style='width:100%;margin-left:0px'>
|
||||
$tabc .= "<table class='table adminform' style='width:100%;margin-left:0px'>
|
||||
<colgroup span='2'>
|
||||
<col class='col-label' />
|
||||
<col class='col-control' />
|
||||
@ -520,9 +518,9 @@ class mailoutAdminClass extends e107MailManager
|
||||
$tabc .= "</div>";
|
||||
}
|
||||
}
|
||||
|
||||
// $ret .= "<ul class='e-tabs e-hideme' id='core-mail-tabs'>".$tab."</ul>"; // This hides tabs!
|
||||
$ret .= "<ul class='e-tabs' id='core-mail-tabs'>".$tab."</ul>";
|
||||
|
||||
// $ret .= "<ul class='e-tabs e-hideme' id='core-mail-tabs'>".$tab."</ul>"; // This hides tabs!
|
||||
$ret .= "<ul class='e-tabs' id='core-mail-tabs'>".$tab."</ul>";
|
||||
$ret .= $tabc;
|
||||
$ret .= "</div>";
|
||||
|
||||
@ -793,7 +791,7 @@ class mailoutAdminClass extends e107MailManager
|
||||
* @param $name name of item
|
||||
* @return text for display
|
||||
*/
|
||||
//FIXME use $frm->selectbox() instead.
|
||||
//FIXME use $frm->selectbox() instead.
|
||||
public function sendStyleSelect($curval = '', $name = 'email_send_style', $incTemplates = TRUE)
|
||||
{
|
||||
|
||||
@ -832,7 +830,7 @@ class mailoutAdminClass extends e107MailManager
|
||||
*/
|
||||
function show_mailform(&$mailSource)
|
||||
{
|
||||
global $pref,$HANDLERS_DIRECTORY;
|
||||
global $HANDLERS_DIRECTORY;
|
||||
global $mailAdmin;
|
||||
|
||||
$sql = e107::getDb();
|
||||
@ -840,11 +838,11 @@ class mailoutAdminClass extends e107MailManager
|
||||
$tp = e107::getParser();
|
||||
$frm = e107::getForm();
|
||||
$mes = e107::getMessage();
|
||||
$pref = e107::getPref();
|
||||
|
||||
if (!is_array($mailSource))
|
||||
{
|
||||
$mes = e107::getMessage();
|
||||
$mes->add('Coding error - mail not array (521)', E_MESSAGE_ERROR);
|
||||
$mes->addError('Coding error - mail not array (521)');
|
||||
//$ns->tablerender('ERROR!!', );
|
||||
//exit;
|
||||
}
|
||||
@ -858,7 +856,7 @@ class mailoutAdminClass extends e107MailManager
|
||||
if(strpos($_SERVER['SERVER_SOFTWARE'],'mod_gzip') && !is_readable(e_HANDLER.'phpmailer/.htaccess'))
|
||||
{
|
||||
$warning = LAN_MAILOUT_40.' '.$HANDLERS_DIRECTORY.'phpmailer/ '.LAN_MAILOUT_41;
|
||||
$ns->tablerender(LAN_MAILOUT_42, $warning);
|
||||
$ns->tablerender(LAN_MAILOUT_42, $mes->render().$warning);
|
||||
}
|
||||
|
||||
$debug = (e_MENU == "debug") ? "?[debug]" : "";
|
||||
@ -868,7 +866,7 @@ class mailoutAdminClass extends e107MailManager
|
||||
$text .= "<div>
|
||||
<form method='post' action='".e_SELF."?mode=makemail' id='mailout_form'>
|
||||
".$this->emailSelector('all', varset($mailSource['mail_selectors'], FALSE))."
|
||||
<table class='table adminform'>
|
||||
<table class='table adminform'>
|
||||
<colgroup>
|
||||
<col class='col-label' />
|
||||
<col class='col-control' />
|
||||
@ -942,8 +940,8 @@ class mailoutAdminClass extends e107MailManager
|
||||
|
||||
|
||||
}
|
||||
// TODO File-Picker from Media-Manager.
|
||||
|
||||
// TODO File-Picker from Media-Manager.
|
||||
|
||||
|
||||
$text .= "
|
||||
<tr>
|
||||
@ -969,8 +967,8 @@ class mailoutAdminClass extends e107MailManager
|
||||
$text .="
|
||||
</td></tr>\n
|
||||
<tr>
|
||||
|
||||
<td colspan='2'>".$frm->bbarea('email_body',$email_body,'mailout','helpb')."</td>
|
||||
|
||||
<td colspan='2'>".$frm->bbarea('email_body',$email_body,'mailout','helpb')."</td>
|
||||
</tr>";
|
||||
|
||||
$text .="
|
||||
@ -982,10 +980,10 @@ class mailoutAdminClass extends e107MailManager
|
||||
|
||||
if(e_WYSIWYG)
|
||||
{
|
||||
$text .="<span style='vertical-align: super;margin-left:5%;margin-bottom:auto;margin-top:auto'><input type='button' class='btn button' name='usrname' value=\"".LAN_MAILOUT_16."\" onclick=\"tinyMCE.selectedInstance.execCommand('mceInsertContent',0,'|USERNAME|')\" />
|
||||
<input type='button' class='btn button' name='usrlink' value=\"".LAN_MAILOUT_14."\" onclick=\"tinyMCE.selectedInstance.execCommand('mceInsertContent',0,'|DISPLAYNAME|')\" />
|
||||
<input type='button' class='btn button' name='usrlink' value=\"".LAN_MAILOUT_17."\" onclick=\"tinyMCE.selectedInstance.execCommand('mceInsertContent',0,'|SIGNUP_LINK|')\" />
|
||||
<input type='button' class='btn button' name='usrid' value=\"".LAN_MAILOUT_18."\" onclick=\"tinyMCE.selectedInstance.execCommand('mceInsertContent',0,'|USERID|')\" /></span>";
|
||||
$text .="<span style='vertical-align: super;margin-left:5%;margin-bottom:auto;margin-top:auto'><input type='button' class='btn button' name='usrname' value=\"".LAN_MAILOUT_16."\" onclick=\"tinyMCE.selectedInstance.execCommand('mceInsertContent',0,'|USERNAME|')\" />
|
||||
<input type='button' class='btn button' name='usrlink' value=\"".LAN_MAILOUT_14."\" onclick=\"tinyMCE.selectedInstance.execCommand('mceInsertContent',0,'|DISPLAYNAME|')\" />
|
||||
<input type='button' class='btn button' name='usrlink' value=\"".LAN_MAILOUT_17."\" onclick=\"tinyMCE.selectedInstance.execCommand('mceInsertContent',0,'|SIGNUP_LINK|')\" />
|
||||
<input type='button' class='btn button' name='usrid' value=\"".LAN_MAILOUT_18."\" onclick=\"tinyMCE.selectedInstance.execCommand('mceInsertContent',0,'|USERID|')\" /></span>";
|
||||
}
|
||||
|
||||
$text .="
|
||||
@ -1005,9 +1003,9 @@ class mailoutAdminClass extends e107MailManager
|
||||
}
|
||||
else
|
||||
{
|
||||
$text .= $frm->admin_button('save_email',LAN_SAVE,'other');
|
||||
$text .= $frm->admin_button('save_email',LAN_SAVE,'other');
|
||||
}
|
||||
|
||||
|
||||
|
||||
$text .= $frm->admin_button('send_email',LAN_MAILOUT_08); //
|
||||
|
||||
@ -1016,7 +1014,7 @@ class mailoutAdminClass extends e107MailManager
|
||||
</form>
|
||||
</div>";
|
||||
|
||||
$ns->tablerender(LAN_MAILOUT_15,$mes->render(). $text); // Render the complete form
|
||||
$ns->tablerender(ADLAN_136.SEP.LAN_MAILOUT_15, $mes->render(). $text); // Render the complete form
|
||||
}
|
||||
|
||||
|
||||
@ -1087,14 +1085,15 @@ class mailoutAdminClass extends e107MailManager
|
||||
*/
|
||||
public function showEmailTemplate($mailId)
|
||||
{
|
||||
$mes = e107::getMessage();
|
||||
$ns = e107::getRender();
|
||||
|
||||
$mailData = $this->retrieveEmail($mailId);
|
||||
|
||||
$text = "<div style='text-align:center'>";
|
||||
|
||||
if ($mailData === FALSE)
|
||||
{
|
||||
$text = "<div class='forumheader2' style='text-align:center'>".LAN_MAILOUT_79.'</div></div>';
|
||||
$this->e107->ns-> tablerender("<div style='text-align:center'>".LAN_MAILOUT_171."</div>", $text);
|
||||
$mes->addInfo(LAN_MAILOUT_79);
|
||||
$ns-> tablerender(ADLAN_136.SEP.LAN_MAILOUT_171, $mes->render().$text);
|
||||
exit;
|
||||
}
|
||||
|
||||
@ -1114,11 +1113,11 @@ class mailoutAdminClass extends e107MailManager
|
||||
$text .= "</tbody></table>\n</fieldset>";
|
||||
|
||||
$text .= "<div class='buttons-bar center'>
|
||||
<input class='btn button' type='submit' name='email_delete' value=\"".LAN_MAILOUT_256."\" />
|
||||
</div>";
|
||||
".$frm->admin_button('email_delete', LAN_MAILOUT_256, 'other')."
|
||||
</div>";
|
||||
|
||||
$text .= "</form></div>";
|
||||
$this->e107->ns->tablerender("<div style='text-align:center'>".ADLAN_136." :: ".LAN_MAILOUT_255.$mailId.'</div>', $text);
|
||||
$text .= "</form>";
|
||||
$ns->tablerender(ADLAN_136.SEP.LAN_MAILOUT_255.$mailId, $text);
|
||||
}
|
||||
|
||||
|
||||
@ -1134,20 +1133,21 @@ class mailoutAdminClass extends e107MailManager
|
||||
public function showDeleteConfirm($mailID, $nextPage = 'saved')
|
||||
{
|
||||
$mailData = $this->retrieveEmail($mailID);
|
||||
$frm = e107::getForm();
|
||||
$ns = e107::getRender();
|
||||
$mes = e107::getMessage();
|
||||
|
||||
$text = "<div style='text-align:center'>";
|
||||
|
||||
if ($mailData === FALSE)
|
||||
{
|
||||
$text = "<div class='forumheader2' style='text-align:center'>".LAN_MAILOUT_79."</div>";
|
||||
$this->e107->ns-> tablerender("<div style='text-align:center'>".LAN_MAILOUT_171."</div>", $text);
|
||||
$mes->addInfo(LAN_MAILOUT_79);
|
||||
$ns-> tablerender(ADLAN_136.SEP.LAN_MAILOUT_171, $mes->render().$text);
|
||||
exit;
|
||||
}
|
||||
|
||||
$text .= "
|
||||
<form action='".e_SELF.'?mode=maildeleteconfirm&m='.$mailID.'&savepage='.$nextPage."' id='email_delete' method='post'>
|
||||
<fieldset id='email-delete'>
|
||||
<table class='table adminlist'>
|
||||
<table class='table adminlist'>
|
||||
<colgroup>
|
||||
<col class='col-label' />
|
||||
<col class='col-control' />
|
||||
@ -1165,12 +1165,12 @@ class mailoutAdminClass extends e107MailManager
|
||||
$text .= "</tbody></table>\n</fieldset>";
|
||||
|
||||
$text .= "<div class='buttons-bar center'>
|
||||
<input class='btn button' type='submit' name='email_delete' value=\"".LAN_DELETE."\" />
|
||||
<input class='btn button' type='submit' name='email_cancel' value=\"".LAN_CANCEL."\" />
|
||||
</div>";
|
||||
".$frm->admin_button('email_delete', LAN_DELETE, 'delete')."
|
||||
".$frm->admin_button('email_cancel', LAN_CANCEL, 'cancel')."
|
||||
</div>
|
||||
</form>";
|
||||
|
||||
$text .= "</form></div>";
|
||||
$this->e107->ns->tablerender("<div style='text-align:center'>".ADLAN_136." :: ".LAN_MAILOUT_171."</div>", $text);
|
||||
$ns->tablerender(ADLAN_136.SEP.LAN_MAILOUT_171, $text);
|
||||
}
|
||||
|
||||
|
||||
@ -1188,6 +1188,10 @@ class mailoutAdminClass extends e107MailManager
|
||||
// Need to select main email entries; count number of addresses attached to each
|
||||
$gen = new convert;
|
||||
$frm = e107::getForm();
|
||||
$ns = e107::getRender();
|
||||
$mes = e107::getMessage();
|
||||
$tp = e107::getParser();
|
||||
|
||||
switch ($type)
|
||||
{
|
||||
case 'sent' :
|
||||
@ -1205,19 +1209,17 @@ class mailoutAdminClass extends e107MailManager
|
||||
|
||||
$emails_found = array(); // Log ID and count for later
|
||||
|
||||
$text = "<div style='text-align:center'>";
|
||||
|
||||
if (!$count)
|
||||
{
|
||||
$text = "<div class='forumheader2' style='text-align:center'>".LAN_MAILOUT_79."</div>";
|
||||
$this->e107->ns-> tablerender("<div style='text-align:center'>".$this->tasks[$type]['title']."</div>", $text);
|
||||
return;
|
||||
$mes->addInfo(LAN_MAILOUT_79);
|
||||
$ns->tablerender($this->tasks[$type]['title'], $mes->render() . $text);
|
||||
return;
|
||||
}
|
||||
|
||||
$text .= "
|
||||
$text = "
|
||||
<form action='".e_SELF.'?'.e_QUERY."' id='email_list' method='post'>
|
||||
<fieldset id='emails-list'>
|
||||
<table class='table adminlist'>";
|
||||
<table class='table adminlist'>";
|
||||
|
||||
$fieldPrefs = $this->calcFieldSpec($type, TRUE); // Get columns to display
|
||||
|
||||
@ -1243,7 +1245,7 @@ class mailoutAdminClass extends e107MailManager
|
||||
$text .= $gen->convert_date($row[$fieldName], 'short');
|
||||
break;
|
||||
case 'trunc200' :
|
||||
$text .= $this->e107->tp->text_truncate($row[$fieldName], 200, '...');
|
||||
$text .= $tp->text_truncate($row[$fieldName], 200, '...');
|
||||
break;
|
||||
case 'chars' : // Show generated html as is
|
||||
$text .= htmlspecialchars($row[$fieldName], ENT_COMPAT, 'UTF-8');
|
||||
@ -1273,14 +1275,14 @@ class mailoutAdminClass extends e107MailManager
|
||||
}
|
||||
$text .= "</tbody></table><br /><br />\n";
|
||||
|
||||
if ($totalCount > $count)
|
||||
if ($totalCount > $count)
|
||||
{
|
||||
$parms = "{$totalCount},{$amount},{$from},".e_SELF."?mode={$type}&count={$amount}&frm=[FROM]&fld={$this->sortField}&asc={$this->sortOrder}";
|
||||
$text .= $this->e107->tp->parseTemplate("{NEXTPREV={$parms}}");
|
||||
$text .= $tp->parseTemplate("{NEXTPREV={$parms}}");
|
||||
}
|
||||
|
||||
$text .= '</fieldset></form><br /></div>';
|
||||
$this->e107->ns->tablerender("<div style='text-align:center'>".ADLAN_136." :: ".$this->tasks[$type]['title']."</div>", $text);
|
||||
$text .= '</fieldset></form>';
|
||||
$ns->tablerender(ADLAN_136.SEP.$this->tasks[$type]['title'], $text);
|
||||
}
|
||||
|
||||
|
||||
@ -1363,12 +1365,11 @@ class mailoutAdminClass extends e107MailManager
|
||||
|
||||
// We've got all the email addresses here - display a confirmation form
|
||||
// Include start/end dates for send
|
||||
$text = "<div style='text-align:center'>";
|
||||
|
||||
$text .= "
|
||||
$text = "
|
||||
<form action='".e_SELF.'?mode=marksend&m='.$mailMainID."' id='email_send' method='post'>
|
||||
<fieldset id='email-send'>
|
||||
<table class='table adminlist'>
|
||||
<table class='table adminlist'>
|
||||
<colgroup>
|
||||
<col class='col-label' />
|
||||
<col class='col-control' />
|
||||
@ -1419,7 +1420,7 @@ class mailoutAdminClass extends e107MailManager
|
||||
</form>
|
||||
</div>";
|
||||
|
||||
e107::getRender()->tablerender("<div style='text-align:center'>".ADLAN_136." :: ".LAN_MAILOUT_179."</div>",$mes->render(). $text);
|
||||
e107::getRender()->tablerender(ADLAN_136.SEP.LAN_MAILOUT_179, $mes->render(). $text);
|
||||
} // End of previewed email
|
||||
|
||||
|
||||
@ -1435,7 +1436,7 @@ class mailoutAdminClass extends e107MailManager
|
||||
$text = "
|
||||
<legend>".LAN_MAILOUT_242."</legend>
|
||||
<fieldset id='email-send-options'>
|
||||
<table class='table adminlist'>
|
||||
<table class='table adminlist'>
|
||||
<colgroup>
|
||||
<col class='col-label' />
|
||||
<col class='col-control' />
|
||||
@ -1501,22 +1502,22 @@ class mailoutAdminClass extends e107MailManager
|
||||
{
|
||||
$gen = new convert;
|
||||
$frm = e107::getForm();
|
||||
$mes = e107::getMessage();
|
||||
$tp = e107::getRender();
|
||||
|
||||
$mailData = $this->retrieveEmail($mailID);
|
||||
|
||||
$text = "<div style='text-align:center'>";
|
||||
|
||||
if ($mailData === FALSE)
|
||||
{
|
||||
$text = "<div class='forumheader2' style='text-align:center'>".LAN_MAILOUT_79."</div>";
|
||||
$this->e107->ns-> tablerender("<div style='text-align:center'>".LAN_MAILOUT_171."</div>", $text);
|
||||
$mes->addInfo(LAN_MAILOUT_79);
|
||||
$ns-> tablerender(ADLAN_136.SEP.LAN_MAILOUT_171, $mes->render().$text);
|
||||
exit;
|
||||
}
|
||||
|
||||
$text .= "
|
||||
<form action='".e_SELF.'?'.e_QUERY."' id='email_recip_header' method='post'>
|
||||
<fieldset id='email-recip_header'>
|
||||
<table class='table adminlist'>
|
||||
<table class='table adminlist'>
|
||||
<colgroup>
|
||||
<col class='col-label' />
|
||||
<col class='col-control' />
|
||||
@ -1548,7 +1549,7 @@ class mailoutAdminClass extends e107MailManager
|
||||
$text .= "
|
||||
<form action='".e_SELF."?mode=recipients&m={$mailID}&count={$count}&frm={$this->showFrom}&fld={$this->sortField}&asc={$this->sortOrder}&savepage={$nextPage}' id='email_recip_body' method='post'>
|
||||
<fieldset id='email-recip_body'>
|
||||
<table class='table adminlist'>";
|
||||
<table class='table adminlist'>";
|
||||
|
||||
|
||||
$fieldPrefs = $this->calcFieldSpec('recipients', TRUE); // Get columns to display
|
||||
@ -1625,13 +1626,11 @@ class mailoutAdminClass extends e107MailManager
|
||||
if ($totalCount > $count)
|
||||
{
|
||||
$parms = "{$totalCount},{$this->showCount},{$this->showFrom},".e_SELF."?mode=recipients&m={$mailID}&count={$this->showCount}&frm=[FROM]&fld={$this->sortField}&asc={$this->sortOrder}&savepage={$nextPage}";
|
||||
$text .= $this->e107->tp->parseTemplate("{NEXTPREV={$parms}}");
|
||||
$text .= $tp->parseTemplate("{NEXTPREV={$parms}}");
|
||||
}
|
||||
}
|
||||
|
||||
$text .= "</div>";
|
||||
|
||||
$this->e107->ns->tablerender("<div style='text-align:center'>".ADLAN_136." :: ".LAN_MAILOUT_181."</div>", $text);
|
||||
$ns->tablerender(ADLAN_136.SEP.LAN_MAILOUT_181, $mes->render() . $text);
|
||||
}
|
||||
|
||||
|
||||
@ -1831,4 +1830,4 @@ class mailoutAdminClass extends e107MailManager
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
?>
|
@ -8,13 +8,13 @@
|
||||
*
|
||||
* Administration - Site Maintenance
|
||||
*
|
||||
* $Source: /cvs_backup/e107_0.8/e107_languages/English/admin/lan_mailout.php,v $
|
||||
* $Revision$
|
||||
* $Date$
|
||||
* $Author$
|
||||
* $URL$
|
||||
* $Id$
|
||||
*
|
||||
*/
|
||||
|
||||
// TODO - MAJOR LAN REWRITE NEEDED
|
||||
|
||||
define('CORE_DATE_ORDER', 'dmy'); // Temporary until we find somewhere better to put it.
|
||||
// Defines order of field entry/display in date boxes
|
||||
// Acceptable values: dmy, mdy, ymd
|
||||
@ -33,9 +33,9 @@ define('LAN_MAILOUT_12','All Members');
|
||||
define('LAN_MAILOUT_13','All Unverified Members ');
|
||||
define('LAN_MAILOUT_14','Display Name');
|
||||
define('LAN_MAILOUT_15','Mailout');
|
||||
define('LAN_MAILOUT_16','username');
|
||||
define('LAN_MAILOUT_17','signup link');
|
||||
define('LAN_MAILOUT_18','user id');
|
||||
define('LAN_MAILOUT_16','Username');
|
||||
define('LAN_MAILOUT_17','Signup link');
|
||||
define('LAN_MAILOUT_18','User ID');
|
||||
define('LAN_MAILOUT_19','No target email address specified');
|
||||
define('LAN_MAILOUT_20','Sendmail-path');
|
||||
define('LAN_MAILOUT_21','Bulk mailing Entries');
|
||||
|
Loading…
x
Reference in New Issue
Block a user