mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-05 09:41:40 +09:00
Implement SMS logging and viewing
This commit is contained in:
parent
137728d527
commit
85c9b633ec
17 changed files with 307 additions and 31 deletions
|
|
@ -149,7 +149,7 @@ class Advanced_MailerAdminController extends Advanced_Mailer
|
|||
}
|
||||
|
||||
/**
|
||||
* Clear old sending log.
|
||||
* Clear old mail sending log.
|
||||
*/
|
||||
public function procAdvanced_mailerAdminClearSentMail()
|
||||
{
|
||||
|
|
@ -167,15 +167,46 @@ class Advanced_MailerAdminController extends Advanced_Mailer
|
|||
$obj = new stdClass();
|
||||
$obj->status = $status;
|
||||
$obj->regdate = date('YmdHis', time() - ($clear_before_days * 86400) + zgap());
|
||||
$output = executeQuery('advanced_mailer.deleteLogs', $obj);
|
||||
$output = executeQuery('advanced_mailer.deleteMailLogs', $obj);
|
||||
|
||||
if ($status === 'success')
|
||||
{
|
||||
$this->setRedirectUrl(getNotEncodedUrl('', 'module', 'admin', 'act', 'dispAdvanced_mailerAdminSentMail'));
|
||||
$this->setRedirectUrl(getNotEncodedUrl('', 'module', 'admin', 'act', 'dispAdvanced_mailerAdminMailLog'));
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->setRedirectUrl(getNotEncodedUrl('', 'module', 'admin', 'act', 'dispAdvanced_mailerAdminErrors'));
|
||||
$this->setRedirectUrl(getNotEncodedUrl('', 'module', 'admin', 'act', 'dispAdvanced_mailerAdminMailErrors'));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Clear old SMS sending log.
|
||||
*/
|
||||
public function procAdvanced_mailerAdminClearSentSMS()
|
||||
{
|
||||
$status = Context::get('status');
|
||||
$clear_before_days = intval(Context::get('clear_before_days'));
|
||||
if (!in_array($status, array('success', 'error')))
|
||||
{
|
||||
return new Object(-1, 'msg_invalid_request');
|
||||
}
|
||||
if ($clear_before_days < 0)
|
||||
{
|
||||
return new Object(-1, 'msg_invalid_request');
|
||||
}
|
||||
|
||||
$obj = new stdClass();
|
||||
$obj->status = $status;
|
||||
$obj->regdate = date('YmdHis', time() - ($clear_before_days * 86400) + zgap());
|
||||
$output = executeQuery('advanced_mailer.deleteSMSLogs', $obj);
|
||||
|
||||
if ($status === 'success')
|
||||
{
|
||||
$this->setRedirectUrl(getNotEncodedUrl('', 'module', 'admin', 'act', 'dispAdvanced_mailerAdminSMSLog'));
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->setRedirectUrl(getNotEncodedUrl('', 'module', 'admin', 'act', 'dispAdvanced_mailerAdminSMSErrors'));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -110,7 +110,7 @@ class Advanced_MailerAdminView extends Advanced_Mailer
|
|||
}
|
||||
|
||||
/**
|
||||
* Display the test send form.
|
||||
* Display the mail test form.
|
||||
*/
|
||||
public function dispAdvanced_MailerAdminMailTest()
|
||||
{
|
||||
|
|
@ -122,18 +122,18 @@ class Advanced_MailerAdminView extends Advanced_Mailer
|
|||
Context::set('sending_method', config('mail.type'));
|
||||
|
||||
$this->setTemplatePath($this->module_path.'tpl');
|
||||
$this->setTemplateFile('test');
|
||||
$this->setTemplateFile('mail_test');
|
||||
}
|
||||
|
||||
/**
|
||||
* Display the sent mail log.
|
||||
* Display the mail log.
|
||||
*/
|
||||
public function dispAdvanced_MailerAdminMailLog()
|
||||
{
|
||||
$obj = new stdClass();
|
||||
$obj->status = 'success';
|
||||
$obj->page = $page = Context::get('page') ?: 1;
|
||||
$maillog = executeQuery('advanced_mailer.getLogByType', $obj);
|
||||
$maillog = executeQueryArray('advanced_mailer.getMailLogByType', $obj);
|
||||
$maillog = $maillog->toBool() ? $this->procMailLog($maillog->data) : array();
|
||||
Context::set('advanced_mailer_log', $maillog);
|
||||
Context::set('advanced_mailer_status', 'success');
|
||||
|
|
@ -148,18 +148,18 @@ class Advanced_MailerAdminView extends Advanced_Mailer
|
|||
Context::set('sending_methods', $sending_methods);
|
||||
|
||||
$this->setTemplatePath($this->module_path.'tpl');
|
||||
$this->setTemplateFile('view_log');
|
||||
$this->setTemplateFile('mail_log');
|
||||
}
|
||||
|
||||
/**
|
||||
* Display the error log.
|
||||
* Display the mail error log.
|
||||
*/
|
||||
public function dispAdvanced_MailerAdminMailErrors()
|
||||
{
|
||||
$obj = new stdClass();
|
||||
$obj->status = 'error';
|
||||
$obj->page = $page = Context::get('page') ?: 1;
|
||||
$maillog = executeQuery('advanced_mailer.getLogByType', $obj);
|
||||
$maillog = executeQueryArray('advanced_mailer.getMailLogByType', $obj);
|
||||
$maillog = $maillog->toBool() ? $this->procMailLog($maillog->data) : array();
|
||||
Context::set('advanced_mailer_log', $maillog);
|
||||
Context::set('advanced_mailer_status', 'error');
|
||||
|
|
@ -174,7 +174,75 @@ class Advanced_MailerAdminView extends Advanced_Mailer
|
|||
Context::set('sending_methods', $sending_methods);
|
||||
|
||||
$this->setTemplatePath($this->module_path.'tpl');
|
||||
$this->setTemplateFile('view_log');
|
||||
$this->setTemplateFile('mail_log');
|
||||
}
|
||||
|
||||
/**
|
||||
* Display the SMS test form.
|
||||
*/
|
||||
public function dispAdvanced_MailerAdminSMSTest()
|
||||
{
|
||||
$advanced_mailer_config = $this->getConfig();
|
||||
$sending_methods = Rhymix\Framework\Mail::getSupportedDrivers();
|
||||
|
||||
Context::set('advanced_mailer_config', $advanced_mailer_config);
|
||||
Context::set('sending_methods', $sending_methods);
|
||||
Context::set('sending_method', config('mail.type'));
|
||||
|
||||
$this->setTemplatePath($this->module_path.'tpl');
|
||||
$this->setTemplateFile('sms_test');
|
||||
}
|
||||
|
||||
/**
|
||||
* Display the SMS log.
|
||||
*/
|
||||
public function dispAdvanced_MailerAdminSMSLog()
|
||||
{
|
||||
$obj = new stdClass();
|
||||
$obj->status = 'success';
|
||||
$obj->page = $page = Context::get('page') ?: 1;
|
||||
$smslog = executeQueryArray('advanced_mailer.getSMSLogByType', $obj);
|
||||
$smslog = $smslog->toBool() ? $smslog->data : array();
|
||||
Context::set('advanced_mailer_log', $smslog);
|
||||
Context::set('advanced_mailer_status', 'success');
|
||||
|
||||
$paging = $this->procPaging('success', $page);
|
||||
Context::set('total_count', $paging->total_count);
|
||||
Context::set('total_page', $paging->total_page);
|
||||
Context::set('page', $paging->page);
|
||||
Context::set('page_navigation', $paging->page_navigation);
|
||||
|
||||
$sending_methods = Rhymix\Framework\SMS::getSupportedDrivers();
|
||||
Context::set('sending_methods', $sending_methods);
|
||||
|
||||
$this->setTemplatePath($this->module_path.'tpl');
|
||||
$this->setTemplateFile('sms_log');
|
||||
}
|
||||
|
||||
/**
|
||||
* Display the SMS error log.
|
||||
*/
|
||||
public function dispAdvanced_MailerAdminSMSErrors()
|
||||
{
|
||||
$obj = new stdClass();
|
||||
$obj->status = 'error';
|
||||
$obj->page = $page = Context::get('page') ?: 1;
|
||||
$smslog = executeQueryArray('advanced_mailer.getSMSLogByType', $obj);
|
||||
$smslog = $smslog->toBool() ? $smslog->data : array();
|
||||
Context::set('advanced_mailer_log', $smslog);
|
||||
Context::set('advanced_mailer_status', 'error');
|
||||
|
||||
$paging = $this->procPaging('error', $page);
|
||||
Context::set('total_count', $paging->total_count);
|
||||
Context::set('total_page', $paging->total_page);
|
||||
Context::set('page', $paging->page);
|
||||
Context::set('page_navigation', $paging->page_navigation);
|
||||
|
||||
$sending_methods = Rhymix\Framework\SMS::getSupportedDrivers();
|
||||
Context::set('sending_methods', $sending_methods);
|
||||
|
||||
$this->setTemplatePath($this->module_path.'tpl');
|
||||
$this->setTemplateFile('sms_log');
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -58,7 +58,6 @@ class Advanced_MailerController extends Advanced_Mailer
|
|||
if (toBool($config->log_sent_mail) || (toBool($config->log_errors) && count($mail->errors)))
|
||||
{
|
||||
$obj = new \stdClass();
|
||||
$obj->mail_srl = getNextSequence();
|
||||
$obj->mail_from = '';
|
||||
$obj->mail_to = '';
|
||||
|
||||
|
|
@ -99,9 +98,9 @@ class Advanced_MailerController extends Advanced_Mailer
|
|||
$obj->subject = $mail->message->getSubject();
|
||||
$obj->calling_script = $mail->getCaller();
|
||||
$obj->sending_method = strtolower(class_basename($mail->driver));
|
||||
$obj->status = !count($mail->errors) ? 'success' : 'error';
|
||||
$obj->errors = count($mail->errors) ? implode("\n", $mail->errors) : null;
|
||||
$output = executeQuery('advanced_mailer.insertLog', $obj);
|
||||
$obj->status = !count($mail->getErrors()) ? 'success' : 'error';
|
||||
$obj->errors = count($mail->getErrors()) ? implode("\n", $mail->getErrors()) : null;
|
||||
$output = executeQuery('advanced_mailer.insertMailLog', $obj);
|
||||
if (!$output->toBool())
|
||||
{
|
||||
return $output;
|
||||
|
|
@ -155,18 +154,27 @@ class Advanced_MailerController extends Advanced_Mailer
|
|||
|
||||
if (toBool($config->log_sent_sms) || (toBool($config->log_sms_errors) && count($sms->errors)))
|
||||
{
|
||||
return new Object();
|
||||
|
||||
$obj = new \stdClass();
|
||||
$obj->sms_srl = getNextSequence();
|
||||
$obj->sms_from = '';
|
||||
$obj->sms_to = '';
|
||||
$obj->content = $sms->getContent();
|
||||
$obj->sms_from = $sms->getFrom();
|
||||
$obj->sms_to = array();
|
||||
foreach ($sms->getRecipientsWithCountry() as $to)
|
||||
{
|
||||
if ($to->country)
|
||||
{
|
||||
$obj->sms_to[] = '+' . $to->country . '.' . $to->number;
|
||||
}
|
||||
else
|
||||
{
|
||||
$obj->sms_to[] = $to->number;
|
||||
}
|
||||
}
|
||||
$obj->sms_to = implode(', ', $obj->sms_to);
|
||||
$obj->content = trim($sms->getSubject() . "\n" . $sms->getBody());
|
||||
$obj->calling_script = $sms->getCaller();
|
||||
$obj->sending_method = strtolower(class_basename($sms->driver));
|
||||
$obj->status = !count($sms->errors) ? 'success' : 'error';
|
||||
$obj->errors = count($sms->errors) ? implode("\n", $sms->errors) : null;
|
||||
$output = executeQuery('advanced_mailer.insertLog', $obj);
|
||||
$obj->status = !count($sms->getErrors()) ? 'success' : 'error';
|
||||
$obj->errors = count($sms->getErrors()) ? implode("\n", $sms->getErrors()) : null;
|
||||
$output = executeQuery('advanced_mailer.insertSMSLog', $obj);
|
||||
if (!$output->toBool())
|
||||
{
|
||||
return $output;
|
||||
|
|
|
|||
|
|
@ -16,7 +16,9 @@
|
|||
<action name="procAdvanced_mailerAdminInsertExceptions" type="controller" />
|
||||
<action name="procAdvanced_mailerAdminCheckDNSRecord" type="controller" />
|
||||
<action name="procAdvanced_mailerAdminClearSentMail" type="controller" />
|
||||
<action name="procAdvanced_mailerAdminClearSentSMS" type="controller" />
|
||||
<action name="procAdvanced_mailerAdminTestSendMail" type="controller" />
|
||||
<action name="procAdvanced_mailerAdminTestSendSMS" type="controller" />
|
||||
</actions>
|
||||
<menus>
|
||||
<menu name="advanced_mailer" type="all">
|
||||
|
|
|
|||
|
|
@ -107,6 +107,7 @@ $lang->msg_advanced_mailer_log_is_empty = 'There are no entries to display.';
|
|||
$lang->cmd_advanced_mailer_status_sender = 'Sender';
|
||||
$lang->cmd_advanced_mailer_status_recipient = 'Recipient';
|
||||
$lang->cmd_advanced_mailer_status_subject = 'Subject';
|
||||
$lang->cmd_advanced_mailer_status_content = 'Content';
|
||||
$lang->cmd_advanced_mailer_status_sending_method = 'Method';
|
||||
$lang->cmd_advanced_mailer_status_time = 'Time';
|
||||
$lang->cmd_advanced_mailer_status = 'Status';
|
||||
|
|
|
|||
|
|
@ -107,6 +107,7 @@ $lang->msg_advanced_mailer_log_is_empty = '표시할 항목이 없습니다.';
|
|||
$lang->cmd_advanced_mailer_status_sender = '보낸이';
|
||||
$lang->cmd_advanced_mailer_status_recipient = '받는이';
|
||||
$lang->cmd_advanced_mailer_status_subject = '제목';
|
||||
$lang->cmd_advanced_mailer_status_content = '내용';
|
||||
$lang->cmd_advanced_mailer_status_sending_method = '발송 방법';
|
||||
$lang->cmd_advanced_mailer_status_time = '발송 시간';
|
||||
$lang->cmd_advanced_mailer_status = '상태';
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<query id="deleteLogs" action="delete">
|
||||
<query id="deleteMailLogs" action="delete">
|
||||
<tables>
|
||||
<table name="advanced_mailer_log" />
|
||||
</tables>
|
||||
9
modules/advanced_mailer/queries/deleteSMSLogs.xml
Normal file
9
modules/advanced_mailer/queries/deleteSMSLogs.xml
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
<query id="deleteSMSLogs" action="delete">
|
||||
<tables>
|
||||
<table name="advanced_mailer_sms_log" />
|
||||
</tables>
|
||||
<conditions>
|
||||
<condition operation="equal" column="status" var="status" />
|
||||
<condition operation="less" column="regdate" var="regdate" pipe="and" />
|
||||
</conditions>
|
||||
</query>
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
<query id="getLogByType" action="select">
|
||||
<query id="getMailLogByType" action="select">
|
||||
<tables>
|
||||
<table name="advanced_mailer_log" />
|
||||
</tables>
|
||||
17
modules/advanced_mailer/queries/getSMSLogByType.xml
Normal file
17
modules/advanced_mailer/queries/getSMSLogByType.xml
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
<query id="getSMSLogByType" action="select">
|
||||
<tables>
|
||||
<table name="advanced_mailer_sms_log" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="*" />
|
||||
</columns>
|
||||
<conditions>
|
||||
<condition operation="equal" column="status" var="status" />
|
||||
</conditions>
|
||||
<navigation>
|
||||
<index var="sort_index" default="sms_id" order="desc" />
|
||||
<list_count var="list_count" default="20" />
|
||||
<page_count var="page_count" default="10" />
|
||||
<page var="page" default="1" />
|
||||
</navigation>
|
||||
</query>
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
<query id="insertLog" action="insert">
|
||||
<query id="insertMailLog" action="insert">
|
||||
<tables>
|
||||
<table name="advanced_mailer_log" />
|
||||
</tables>
|
||||
15
modules/advanced_mailer/queries/insertSMSLog.xml
Normal file
15
modules/advanced_mailer/queries/insertSMSLog.xml
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
<query id="insertSMSLog" action="insert">
|
||||
<tables>
|
||||
<table name="advanced_mailer_sms_log" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="sms_from" var="sms_from" notnull="notnull" />
|
||||
<column name="sms_to" var="sms_to" notnull="notnull" />
|
||||
<column name="content" var="content" notnull="notnull" />
|
||||
<column name="calling_script" var="calling_script" notnull="notnull" />
|
||||
<column name="sending_method" var="sending_method" notnull="notnull" />
|
||||
<column name="regdate" var="regdate" notnull="notnull" default="curdate()" />
|
||||
<column name="status" var="status" notnull="notnull" default="success" />
|
||||
<column name="errors" var="errors" />
|
||||
</columns>
|
||||
</query>
|
||||
|
|
@ -10,7 +10,7 @@
|
|||
<li class="x_active"|cond="$act == 'dispAdvanced_mailerAdminMailTest'"><a href="{getUrl('', 'module', 'admin', 'act', 'dispAdvanced_mailerAdminMailTest')}">{$lang->cmd_advanced_mailer_mail_test}</a></li>
|
||||
<li class="x_active"|cond="$act == 'dispAdvanced_mailerAdminMailLog'"><a href="{getUrl('', 'module', 'admin', 'act', 'dispAdvanced_mailerAdminMailLog')}">{$lang->cmd_advanced_mailer_log_mail}</a></li>
|
||||
<li class="x_active"|cond="$act == 'dispAdvanced_mailerAdminMailErrors'"><a href="{getUrl('', 'module', 'admin', 'act', 'dispAdvanced_mailerAdminMailErrors')}">{$lang->cmd_advanced_mailer_log_mail_errors}</a></li>
|
||||
<li class="x_active"|cond="$act == 'dispAdvanced_mailerAdminTestSMS'"><a href="{getUrl('', 'module', 'admin', 'act', 'dispAdvanced_mailerAdminTestSMS')}">{$lang->cmd_advanced_mailer_sms_test}</a></li>
|
||||
<li class="x_active"|cond="$act == 'dispAdvanced_mailerAdminSentSMS'"><a href="{getUrl('', 'module', 'admin', 'act', 'dispAdvanced_mailerAdminSentSMS')}">{$lang->cmd_advanced_mailer_log_sms}</a></li>
|
||||
<li class="x_active"|cond="$act == 'dispAdvanced_mailerAdminSMSTest'"><a href="{getUrl('', 'module', 'admin', 'act', 'dispAdvanced_mailerAdminSMSTest')}">{$lang->cmd_advanced_mailer_sms_test}</a></li>
|
||||
<li class="x_active"|cond="$act == 'dispAdvanced_mailerAdminSMSLog'"><a href="{getUrl('', 'module', 'admin', 'act', 'dispAdvanced_mailerAdminSMSLog')}">{$lang->cmd_advanced_mailer_log_sms}</a></li>
|
||||
<li class="x_active"|cond="$act == 'dispAdvanced_mailerAdminSMSErrors'"><a href="{getUrl('', 'module', 'admin', 'act', 'dispAdvanced_mailerAdminSMSErrors')}">{$lang->cmd_advanced_mailer_log_sms_errors}</a></li>
|
||||
</ul>
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
<form class="x_form-horizontal" action="./" method="post" id="advanced_mailer">
|
||||
<input type="hidden" name="module" value="advanced_mailer" />
|
||||
<input type="hidden" name="act" value="procAdvanced_mailerAdminTestConfig" />
|
||||
<input type="hidden" name="act" value="procAdvanced_mailerAdminTestSendMail" />
|
||||
<input type="hidden" name="success_return_url" value="{getRequestUriByServerEnviroment()}" />
|
||||
|
||||
<div cond="$XE_VALIDATOR_MESSAGE" class="message {$XE_VALIDATOR_MESSAGE_TYPE}">
|
||||
79
modules/advanced_mailer/tpl/sms_log.html
Normal file
79
modules/advanced_mailer/tpl/sms_log.html
Normal file
|
|
@ -0,0 +1,79 @@
|
|||
<include target="./common.html" />
|
||||
<load target="css/view_log.css" />
|
||||
<load target="js/view_log.js" />
|
||||
|
||||
<table id="advanced_mailer_log" class="x_table x_table-striped x_table-hover">
|
||||
<caption>
|
||||
<strong>Total: {number_format($total_count)}, Page: {number_format($page)}/{number_format($total_page)}</strong>
|
||||
</caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col" class="nowr">{$lang->cmd_advanced_mailer_status_sender}</th>
|
||||
<th scope="col" class="nowr">{$lang->cmd_advanced_mailer_status_recipient}</th>
|
||||
<th scope="col" class="nowr">{$lang->cmd_advanced_mailer_status_content}</th>
|
||||
<th scope="col" class="nowr">{$lang->cmd_advanced_mailer_status_sending_method}</th>
|
||||
<th scope="col" class="nowr">{$lang->cmd_advanced_mailer_status_time}</th>
|
||||
<th scope="col" class="nowr">{$lang->cmd_advanced_mailer_status}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr loop="$advanced_mailer_log => $sms_id, $val">
|
||||
<td class="nowr">
|
||||
{htmlspecialchars($val->sms_from)}
|
||||
</td>
|
||||
<td class="nowr">
|
||||
{htmlspecialchars($val->sms_to)}
|
||||
</td>
|
||||
<td class="nowr">{nl2br(htmlspecialchars($val->content))}</td>
|
||||
<td class="nowr">
|
||||
{@ if($val->sending_method === 'mail') $val->sending_method = 'mailfunction'}
|
||||
{strval(isset($sending_methods[$val->sending_method]['name']) ? $sending_methods[$val->sending_method]['name'] : $val->sending_method)}
|
||||
</td>
|
||||
<td class="nowr">{(zdate($val->regdate, "Y-m-d\nH:i:s"))}</td>
|
||||
<td class="nowr">
|
||||
<!--@if($val->status === 'success')-->
|
||||
{$lang->cmd_advanced_mailer_status_success}
|
||||
<!--@else-->
|
||||
<a href="javascript:void(0)" class="show-errors">{$lang->cmd_advanced_mailer_status_error}</a>
|
||||
<div class="mail-log-errors">
|
||||
<strong>{$lang->cmd_advanced_mailer_status_error_msg}:</strong><br />
|
||||
{nl2br(htmlspecialchars(trim($val->errors)))}<br /><br />
|
||||
<strong>{$lang->cmd_advanced_mailer_status_calling_script}:</strong><br />
|
||||
{htmlspecialchars($val->calling_script)}
|
||||
</div>
|
||||
<!--@end-->
|
||||
</td>
|
||||
</tr>
|
||||
<tr cond="!$advanced_mailer_log">
|
||||
<td>{$lang->msg_advanced_mailer_log_is_empty}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<div class="x_clearfix">
|
||||
<form class="x_pagination x_pull-left" style="margin-top:8px" action="{Context::getUrl('')}" method="post" no-error-return-url="true">
|
||||
<input loop="$param => $key, $val" cond="!in_array($key, array('mid', 'vid', 'act'))" type="hidden" name="{$key}" value="{$val}" />
|
||||
<ul>
|
||||
<li class="x_disabled"|cond="$page == 1"><a href="{getUrl('page', '')}">« {$lang->first_page}</a></li>
|
||||
<!--@while($page_no = $page_navigation->getNextPage())-->
|
||||
<li class="x_active"|cond="$page_no == $page"><a href="{getUrl('page', $page_no)}">{$page_no}</a></li>
|
||||
<!--@end-->
|
||||
<li class="x_disabled"|cond="$page == $page_navigation->last_page"><a href="{getUrl('page', $page_navigation->last_page)}">{$lang->last_page} »</a></li>
|
||||
</ul>
|
||||
</form>
|
||||
<form class="x_pull-right x_input-append" style="margin-top:8px" action="{Context::getUrl('')}" method="post">
|
||||
<input type="hidden" name="module" value="advanced_mailer" />
|
||||
<input type="hidden" name="act" value="procAdvanced_mailerAdminClearSentSMS" />
|
||||
<input type="hidden" name="status" value="{$advanced_mailer_status}" />
|
||||
<select name="clear_before_days" style="width:120px">
|
||||
<option value="0">{$lang->cmd_advanced_mailer_clear_log_condition_all}</option>
|
||||
<option value="1">{sprintf($lang->cmd_advanced_mailer_clear_log_condition, 1)}</option>
|
||||
<option value="3">{sprintf($lang->cmd_advanced_mailer_clear_log_condition, 3)}</option>
|
||||
<option value="7" selected="selected">{sprintf($lang->cmd_advanced_mailer_clear_log_condition, 7)}</option>
|
||||
<option value="14">{sprintf($lang->cmd_advanced_mailer_clear_log_condition, 14)}</option>
|
||||
<option value="30">{sprintf($lang->cmd_advanced_mailer_clear_log_condition, 30)}</option>
|
||||
<option value="60">{sprintf($lang->cmd_advanced_mailer_clear_log_condition, 60)}</option>
|
||||
</select>
|
||||
<button class="x_btn" type="submit" disabled="disabled"|cond="!count($advanced_mailer_log)">{$lang->cmd_advanced_mailer_clear_log_button}</button>
|
||||
</form>
|
||||
</div>
|
||||
45
modules/advanced_mailer/tpl/sms_test.html
Normal file
45
modules/advanced_mailer/tpl/sms_test.html
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
<include target="./common.html" />
|
||||
<load target="css/config.css" />
|
||||
<load target="js/config.js" />
|
||||
|
||||
<form class="x_form-horizontal" action="./" method="post" id="advanced_mailer">
|
||||
<input type="hidden" name="module" value="advanced_mailer" />
|
||||
<input type="hidden" name="act" value="procAdvanced_mailerAdminTestSendMail" />
|
||||
<input type="hidden" name="success_return_url" value="{getRequestUriByServerEnviroment()}" />
|
||||
|
||||
<div cond="$XE_VALIDATOR_MESSAGE" class="message {$XE_VALIDATOR_MESSAGE_TYPE}">
|
||||
<p>{$XE_VALIDATOR_MESSAGE}</p>
|
||||
</div>
|
||||
|
||||
<section class="section">
|
||||
|
||||
<h2>{$lang->cmd_advanced_mailer_mail_test}</h2>
|
||||
|
||||
<div class="x_control-group">
|
||||
<label class="x_control-label" for="advanced_mailer_recipient_name">{$lang->cmd_advanced_mailer_recipient_name}</label>
|
||||
<div class="x_controls">
|
||||
<input type="text" id="advanced_mailer_recipient_name" value="{Context::get('logged_info')->nick_name}" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="x_control-group">
|
||||
<label class="x_control-label" for="advanced_mailer_recipient_email">{$lang->cmd_advanced_mailer_recipient_email}</label>
|
||||
<div class="x_controls">
|
||||
<input type="text" id="advanced_mailer_recipient_email" value="{Context::get('logged_info')->email_address}" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="x_control-group">
|
||||
<label class="x_control-label">{$lang->cmd_advanced_mailer_test_result}</label>
|
||||
<div class="x_controls">
|
||||
<div id="advanced_mailer_test_result"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</section>
|
||||
|
||||
<div class="btnArea x_clearfix">
|
||||
<button id="advanced_mailer_test_send_mail" type="submit" class="x_btn x_btn-primary x_pull-right">{$lang->cmd_advanced_mailer_send}</button>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
Loading…
Add table
Add a link
Reference in a new issue