Files
ISP-Billing/ui/compiled/cba6c0be1b673672973fcf86fe42360f1df48934_0.file.message-bulk.tpl.php

232 lines
12 KiB
PHP
Raw Normal View History

<?php
/* Smarty version 4.3.1, created on 2025-12-18 17:04:57
from '/var/www/html/yatmack/ui/ui/message-bulk.tpl' */
/* @var Smarty_Internal_Template $_smarty_tpl */
if ($_smarty_tpl->_decodeProperties($_smarty_tpl, array (
'version' => '4.3.1',
'unifunc' => 'content_69440a09de5f76_95647507',
'has_nocache_code' => false,
'file_dependency' =>
array (
'cba6c0be1b673672973fcf86fe42360f1df48934' =>
array (
0 => '/var/www/html/yatmack/ui/ui/message-bulk.tpl',
1 => 1713579562,
2 => 'file',
),
),
'includes' =>
array (
'file:sections/header.tpl' => 1,
'file:sections/footer.tpl' => 1,
),
),false)) {
function content_69440a09de5f76_95647507 (Smarty_Internal_Template $_smarty_tpl) {
$_smarty_tpl->_subTemplateRender("file:sections/header.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, $_smarty_tpl->cache_lifetime, array(), 0, false);
?>
<div class="container-fluid">
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/1.11.3/css/jquery.dataTables.min.css">
<div class="row">
<div class="col-sm-12 col-md-12">
<div class="card card-primary card-hovered card-stacked mb30">
<div class="card-header">
<h3 class="card-title"><?php echo Lang::T('Send Bulk Message');?>
</h3>
</div>
<div class="card-body">
<form class="form-horizontal" method="post" role="form" id="bulkMessageForm" action="">
<div class="form-group row">
<label class="col-md-2 control-label"><?php echo Lang::T('Group');?>
</label>
<div class="col-md-6">
<select class="form-select" style="height: 52px; background-color: white;" name="group" id="group">
<option value="all" selected><?php echo Lang::T('All Customers');?>
</option>
<option value="new"><?php echo Lang::T('New Customers');?>
</option>
<option value="expired"><?php echo Lang::T('Expired Customers');?>
</option>
<option value="active"><?php echo Lang::T('Active Customers');?>
</option>
</select>
</div>
</div>
<div class="form-group row">
<label class="col-md-2 control-label"><?php echo Lang::T('Send Via');?>
</label>
<div class="col-md-6">
<select class="form-select" style="height: 52px; background-color: white;" name="via" id="via">
<option value="sms" selected><?php echo Lang::T('SMS');?>
</option>
<option value="wa"><?php echo Lang::T('WhatsApp');?>
</option>
<option value="both"><?php echo Lang::T('SMS and WhatsApp');?>
</option>
</select>
</div>
</div>
<div class="form-group row">
<label class="col-md-2 control-label"><?php echo Lang::T('Message per time');?>
</label>
<div class="col-md-6">
<select class="form-select" style="height: 52px; background-color: white;" name="batch" id="batch">
<option value="5"><?php echo Lang::T('5 Messages');?>
</option>
<option value="10" selected><?php echo Lang::T('10 Messages');?>
</option>
<option value="15"><?php echo Lang::T('15 Messages');?>
</option>
<option value="20"><?php echo Lang::T('20 Messages');?>
</option>
<option value="20"><?php echo Lang::T('30 Messages');?>
</option>
<option value="20"><?php echo Lang::T('40 Messages');?>
</option>
<option value="20"><?php echo Lang::T('50 Messages');?>
</option>
<option value="20"><?php echo Lang::T('60 Messages');?>
</option>
</select><?php echo Lang::T('Use 20 and above if you are sending to all customers to avoid server time out');?>
</div>
</div>
<div class="form-group row">
<label class="col-md-2 control-label"><?php echo Lang::T('Delay');?>
</label>
<div class="col-md-6">
<select class="form-select" style="height: 52px; background-color: white;" name="delay" id="delay">
<option value="0" selected><?php echo Lang::T('No Delay');?>
</option>
<option value="5"><?php echo Lang::T('5 Seconds');?>
</option>
<option value="10"><?php echo Lang::T('10 Seconds');?>
</option>
<option value="15"><?php echo Lang::T('15 Seconds');?>
</option>
<option value="20"><?php echo Lang::T('20 Seconds');?>
</option>
</select><?php echo Lang::T('Use at least 5 secs if you are sending to all customers to avoid being banned by your message provider');?>
</div>
</div>
<div class="form-group row">
<label class="col-md-2 control-label"><?php echo Lang::T('Message');?>
</label>
<div class="col-md-6">
<textarea class="form-control" id="message" name="message"
placeholder="<?php echo Lang::T('Compose your message...');?>
" rows="5"></textarea>
<input name="test" type="checkcard"> <?php echo Lang::T('Testing [if checked no real message is sent]');?>
</div>
<p class="help-block col-md-4">
<?php echo Lang::T('Use placeholders:');?>
<br>
<b>[[name]]</b> - <?php echo Lang::T('Customer Name');?>
<br>
<b>[[user_name]]</b> - <?php echo Lang::T('Customer Username');?>
<br>
<b>[[phone]]</b> - <?php echo Lang::T('Customer Phone');?>
<br>
<b>[[company_name]]</b> - <?php echo Lang::T('Your Company Name');?>
</p>
</div>
<center>
<div class="form-group row">
<div class="col-lg-offset-2 col-lg-10">
<button class="btn btn-success mb-3" type="submit" name=send value=now>
<?php echo Lang::T('Send Message');?>
</button>
<a class="btn btn-outline-primary" href="<?php echo $_smarty_tpl->tpl_vars['_url']->value;?>
dashboard" class="btn btn-default"><?php echo Lang::T('Cancel');?>
</a>
</div>
</div>
</center>
</form>
</div>
</div>
</div>
<?php if ($_smarty_tpl->tpl_vars['batchStatus']->value) {?>
<p><span class="label label-success">Total SMS Sent: <?php echo $_smarty_tpl->tpl_vars['totalSMSSent']->value;?>
</span> <span class="label label-danger">Total SMS
Failed: <?php echo $_smarty_tpl->tpl_vars['totalSMSFailed']->value;?>
</span> <span class="label label-success">Total WhatsApp Sent:
<?php echo $_smarty_tpl->tpl_vars['totalWhatsappSent']->value;?>
</span> <span class="label label-danger">Total WhatsApp Failed:
<?php echo $_smarty_tpl->tpl_vars['totalWhatsappFailed']->value;?>
</span></p>
<?php }?>
<div class="col-sm-12 col-md-12">
<div class="card card-primary card-hovered card-stacked mb30">
<div class="card-header">
<h3 class="card-title">Message Results</h3>
</div>
<!-- /.card-header -->
<div class="table-responsive">
<table id="messageResultsTable" class="table table-bordered table-striped table-condensed table-hover border-primary">
<thead>
<tr>
<th>Name</th>
<th>Phone</th>
<th>Message</th>
<th>Status</th>
</tr>
</thead>
<tbody>
<?php
$_from = $_smarty_tpl->smarty->ext->_foreach->init($_smarty_tpl, $_smarty_tpl->tpl_vars['batchStatus']->value, 'customer');
$_smarty_tpl->tpl_vars['customer']->do_else = true;
if ($_from !== null) foreach ($_from as $_smarty_tpl->tpl_vars['customer']->value) {
$_smarty_tpl->tpl_vars['customer']->do_else = false;
?>
<tr>
<td><?php echo $_smarty_tpl->tpl_vars['customer']->value['name'];?>
</td>
<td><?php echo $_smarty_tpl->tpl_vars['customer']->value['phone'];?>
</td>
<td><?php echo $_smarty_tpl->tpl_vars['customer']->value['message'];?>
</td>
<td><?php echo $_smarty_tpl->tpl_vars['customer']->value['status'];?>
</td>
</tr>
<?php
}
$_smarty_tpl->smarty->ext->_foreach->restore($_smarty_tpl, 1);?>
</tbody>
</table>
</div>
<!-- /.card-body -->
</div>
</div>
<!-- /.card -->
</div>
<?php echo '<script'; ?>
src="https://code.jquery.com/jquery-3.6.0.min.js"><?php echo '</script'; ?>
>
<?php echo '<script'; ?>
src="https://cdn.datatables.net/1.11.3/js/jquery.dataTables.min.js"><?php echo '</script'; ?>
>
<?php echo '<script'; ?>
>
var $j = jQuery.noConflict();
$j(document).ready(function () {
$j('#messageResultsTable').DataTable();
});
<?php echo '</script'; ?>
>
</div>
<?php $_smarty_tpl->_subTemplateRender("file:sections/footer.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, $_smarty_tpl->cache_lifetime, array(), 0, false);
}
}