|
@@ -2,6 +2,13 @@
|
|
if (!defined('IN_CRONLITE')) {
|
|
if (!defined('IN_CRONLITE')) {
|
|
exit;
|
|
exit;
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+$PageInfo['rel'] = '<link href="' . $site_url . '/assets/css/bootstrap-table.css" rel="stylesheet" />';
|
|
|
|
+
|
|
|
|
+require ROOT_ADMIN . '/views/header.php';
|
|
|
|
+require ROOT_ADMIN . '/views/navbar.php';
|
|
|
|
+require ROOT_ADMIN . '/views/sidebar.php';
|
|
|
|
+
|
|
?>
|
|
?>
|
|
|
|
|
|
<div class="content-wrapper">
|
|
<div class="content-wrapper">
|
|
@@ -9,47 +16,100 @@ if (!defined('IN_CRONLITE')) {
|
|
<li><a href="index.php"><?php echo $lang->I18N('Dashboard'); ?></a></li>
|
|
<li><a href="index.php"><?php echo $lang->I18N('Dashboard'); ?></a></li>
|
|
<li class="active"><?php echo $lang->I18N('Emails List'); ?></li>
|
|
<li class="active"><?php echo $lang->I18N('Emails List'); ?></li>
|
|
</ol>
|
|
</ol>
|
|
- <div class="panel panel-default">
|
|
|
|
- <div class="panel-heading">
|
|
|
|
- <div class="pull-right">
|
|
|
|
- <a href="emails.php?action=add" class="btn btn-primary btn-xs">
|
|
|
|
- <i class="fa fa-plus"></i> <?php echo $lang->I18N('add'); ?>
|
|
|
|
- </a>
|
|
|
|
|
|
+ <div id="searchToolbar">
|
|
|
|
+ <form onsubmit="return searchSubmit()" method="GET" class="form-inline">
|
|
|
|
+ <input type="hidden" name="did">
|
|
|
|
+ <div class="form-group">
|
|
|
|
+ <label>搜索</label>
|
|
|
|
+ <input type="text" class="form-control" name="email_id" placeholder="邮件ID" style="width: 80px;" />
|
|
|
|
+ </div>
|
|
|
|
+ <div class="form-group">
|
|
|
|
+ <input type="text" class="form-control" name="email_client_id" placeholder="客户ID" style="width: 80px;" />
|
|
|
|
+ </div>
|
|
|
|
+ <div class="form-group">
|
|
|
|
+ <input type="text" class="form-control" name="email_to" placeholder="接收人" style="width: 120px;" />
|
|
|
|
+ </div>
|
|
|
|
+ <div class="form-group">
|
|
|
|
+ <input type="text" class="form-control" name="email_subject" placeholder="主题">
|
|
|
|
+ </div>
|
|
|
|
+ <div class="form-group">
|
|
|
|
+ <button class="btn btn-primary" type="submit"><i class="fa fa-search"></i> 搜索</button>
|
|
|
|
+ <a href="javascript:searchClear()" class="btn btn-default" title="刷新记录列表"><i class="fa fa-repeat"></i> 重置</a>
|
|
</div>
|
|
</div>
|
|
- <span class="panel-title"><?php echo $PageInfo['title']; ?></span>
|
|
|
|
- </div>
|
|
|
|
- <div class="table-responsive">
|
|
|
|
- <table class="table table-stripped table-bordered table-hover">
|
|
|
|
- <thead>
|
|
|
|
- <th width="100">ID</th>
|
|
|
|
- <th><?php echo $lang->I18N('Client'); ?></th>
|
|
|
|
- <th><?php echo $lang->I18N('Title'); ?></th>
|
|
|
|
- <th><?php echo $lang->I18N('Status'); ?></th>
|
|
|
|
- <th style="width: 160px;"><?php echo $lang->I18N('Date'); ?></th>
|
|
|
|
- <th style="width: 100px;"><?php echo $lang->I18N('Action'); ?></th>
|
|
|
|
- </thead>
|
|
|
|
- <tbody>
|
|
|
|
- <?php if ($count > 0): ?>
|
|
|
|
- <?php foreach ($rows as $value): ?>
|
|
|
|
- <tr>
|
|
|
|
- <td><?php echo $value['email_id']; ?></td>
|
|
|
|
- <td><?php echo $value['email_client_id']; ?></td>
|
|
|
|
- <td><?php echo $value["email_subject"]; ?></td>
|
|
|
|
- <td><?php echo $status_types[$value['email_read']]; ?></td>
|
|
|
|
- <td><?php echo $value["email_date"]; ?></td>
|
|
|
|
- <td>
|
|
|
|
- <a href="emails.php?action=view&id=<?php echo $value['email_id']; ?>" class="btn btn-primary btn-xs"><i class="fa fa-info-circle"></i> <?php echo $lang->I18N('details'); ?></a>
|
|
|
|
- </td>
|
|
|
|
- </tr>
|
|
|
|
- <?php endforeach;?>
|
|
|
|
- <?php else: ?>
|
|
|
|
- <tr>
|
|
|
|
- <td colspan="5" class="text-center">Nothing found</td>
|
|
|
|
- </tr>
|
|
|
|
- <?php endif;?>
|
|
|
|
- </tbody>
|
|
|
|
- </table>
|
|
|
|
- </div>
|
|
|
|
- <div class="panel-footer"><?php echo $count; ?> Records Found, Page 1 of 1</div>
|
|
|
|
|
|
+ </form>
|
|
</div>
|
|
</div>
|
|
|
|
+ <table id="listTable"></table>
|
|
</div>
|
|
</div>
|
|
|
|
+
|
|
|
|
+<?php
|
|
|
|
+require ROOT_ADMIN . '/views/footer.php';
|
|
|
|
+?>
|
|
|
|
+
|
|
|
|
+<script src="<?php echo $site_cdnpublic; ?>bootstrap-table/1.20.2/bootstrap-table.min.js"></script>
|
|
|
|
+<script src="<?php echo $site_cdnpublic; ?>bootstrap-table/1.20.2/extensions/page-jump-to/bootstrap-table-page-jump-to.min.js"></script>
|
|
|
|
+<script src="<?php echo $site_url; ?>/assets/js/custom.js"></script>
|
|
|
|
+<script>
|
|
|
|
+ $(document).ready(function() {
|
|
|
|
+ updateToolbar();
|
|
|
|
+ const defaultPageSize = 15;
|
|
|
|
+ const pageNumber = typeof window.$_GET['pageNumber'] != 'undefined' ? parseInt(window.$_GET['pageNumber']) : 1;
|
|
|
|
+ const pageSize = typeof window.$_GET['pageSize'] != 'undefined' ? parseInt(window.$_GET['pageSize']) : defaultPageSize;
|
|
|
|
+
|
|
|
|
+ $("#listTable").bootstrapTable({
|
|
|
|
+ url: 'api/emails.php?act=list',
|
|
|
|
+ pageNumber: pageNumber,
|
|
|
|
+ pageSize: pageSize,
|
|
|
|
+ classes: 'table table-striped table-hover table-bordered',
|
|
|
|
+ columns: [{
|
|
|
|
+ field: 'email_id',
|
|
|
|
+ title: '<?php echo $lang->I18N('Email ID'); ?>',
|
|
|
|
+ formatter: function(value, row, index) {
|
|
|
|
+ return '<a href="emails.php?action=view&id=' + value + '">' + value + '</a>';
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ field: 'email_client_id',
|
|
|
|
+ title: '<?php echo $lang->I18N('Clients'); ?>',
|
|
|
|
+ formatter: function(value, row, index) {
|
|
|
|
+ if (value > 0) {
|
|
|
|
+ return '<a href="clients.php?action=details&id=' + value + '">' + value + '</a>';
|
|
|
|
+ }
|
|
|
|
+ return '-';
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ field: 'email_subject',
|
|
|
|
+ title: '<?php echo $lang->I18N('Title'); ?>'
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ field: 'email_to',
|
|
|
|
+ title: '接收人',
|
|
|
|
+ formatter: function(value, row, index) {
|
|
|
|
+ return value || '-';
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ field: 'email_date',
|
|
|
|
+ title: '<?php echo $lang->I18N('Date'); ?>'
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ field: 'email_read',
|
|
|
|
+ title: '<?php echo $lang->I18N('Status'); ?>',
|
|
|
|
+ formatter: function(value, row, index) {
|
|
|
|
+ return value == 0 ? '<span class="label label-success">已查看</span>' : '<span class="label label-default">未查看</span>';
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ field: '',
|
|
|
|
+ title: '<?php echo $lang->I18N('Action'); ?>',
|
|
|
|
+ formatter: function(value, row, index) {
|
|
|
|
+ return '<a href="emails.php?action=view&id=' + row.email_id + '" class="btn btn-primary btn-xs"><i class="fa fa-info-circle"></i> <?php echo $lang->I18N('details'); ?></a>';
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ ]
|
|
|
|
+ })
|
|
|
|
+ });
|
|
|
|
+</script>
|
|
|
|
+
|
|
|
|
+</body>
|
|
|
|
+</html>
|