mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-22 05:15:29 +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
|
|
@ -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