PluginProbe
WP Directory Kit / 1.5.9
WP Directory Kit v1.5.9
1.5.9 1.5.7 1.5.6 1.5.5 1.5.4 1.5.3 trunk 1.1.0 1.1.6 1.1.8 1.2.3 1.2.4 1.2.5 1.2.6 1.2.7 1.2.8 1.2.9 1.3.0 1.3.1 1.3.2 1.3.3 1.3.4 1.3.5 1.3.6 1.3.8 All 37 releases
wpdirectorykit / application / views / wdk_messages / index.php

index.php in WP Directory Kit 1.5.9, at application/views/wdk_messages/index.php

150 lines 9.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * The template for Messages Management.
4 *
5 * This is the template that table, search layout
6 *
7 */
8
9 if ( ! defined( 'ABSPATH' ) ) {
10 exit; // Exit if accessed directly.
11 }
12
13 ?>
14
15 <!-- This file should primarily consist of HTML with a little bit of PHP. -->
16
17 <div class="wrap wdk-wrap">
18
19 <h1 class="wp-heading-inline"><?php echo esc_html__('Messages Management', 'wpdirectorykit'); ?></h1>
20 <?php
21 $success_message = NULL;
22 if(isset($_GET['custom_message']))
23 $success_message = esc_html(urldecode($_GET['custom_message']));
24
25 $form->messages('class="alert alert-danger"', $success_message);
26 ?>
27 <form method="GET" action="<?php echo esc_url(wmvc_current_edit_url()); ?>" novalidate="novalidate">
28 <div class="tablenav top">
29 <div class="alignleft actions">
30 <input type="hidden" name="page" value="wdk_messages" />
31 <label class="screen-reader-text" for="search"><?php echo esc_html__('Filter by keyword', 'wpdirectorykit'); ?></label>
32 <input type="text" name="search" id="search" class="postform left" value="<?php echo esc_attr(wmvc_show_data('search', $db_data, '')); ?>" placeholder="<?php echo esc_html__('Filter by keyword', 'wpdirectorykit'); ?>" />
33
34 <label class="screen-reader-text" for="user_id_editor"><?php echo esc_html__('Filter by user', 'wpdirectorykit'); ?></label>
35 <?php
36 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped, WordPress.WP.I18n.NonSingularStringLiteralText
37 echo wmvc_select_option('user_id_editor', $users, wmvc_show_data('user_id_editor', $db_data, ''), NULL, __('User', 'wpdirectorykit')); ?>
38
39
40 <label class="screen-reader-text" for="order_by"><?php echo esc_html__('Order By', 'wpdirectorykit'); ?></label>
41 <?php
42 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped, WordPress.WP.I18n.NonSingularStringLiteralText
43 echo wmvc_select_option('order_by', $order_by, wmvc_show_data('order_by', $db_data, ''), NULL, __('Order by', 'wpdirectorykit')); ?>
44
45 <input type="submit" name="filter_action" id="post-query-submit" class="button" value="<?php echo esc_html__('Filter', 'wpdirectorykit'); ?>">
46 </div>
47 <?php echo wp_kses_post(wmvc_xss_clean($pagination_output)); ?>
48 <br class="clear">
49 </div>
50 </form>
51
52 <form method="GET" action="<?php echo esc_url(wmvc_current_edit_url()); ?>" novalidate="novalidate">
53 <table class="wp-list-table widefat fixed striped table-view-list pages">
54 <thead>
55 <tr>
56 <td id="cb" class="manage-column column-cb check-column"><label class="screen-reader-text" for="cb-select-all-1"><?php echo esc_html__('Select All', 'wpdirectorykit'); ?></label><input id="cb-select-all-1" type="checkbox"></td>
57 <th style="width:50px;"><?php echo esc_html__('#ID', 'wpdirectorykit'); ?></th>
58 <th><?php echo esc_html__('Email From', 'wpdirectorykit'); ?></th>
59 <th><?php echo esc_html__('To User', 'wpdirectorykit'); ?></th>
60 <th><?php echo esc_html__('Date', 'wpdirectorykit'); ?></th>
61 <th><?php echo esc_html__('Message', 'wpdirectorykit'); ?></th>
62 <th class="actions_column"><?php echo esc_html__('Actions', 'wpdirectorykit'); ?></th>
63 </tr>
64 </thead>
65 <?php if (count($messages) == 0) : ?>
66 <tr class="no-items">
67 <td class="colspanchange" colspan="7"><?php echo esc_html__('No Messages found.', 'wpdirectorykit'); ?></td>
68 </tr>
69 <?php endif; ?>
70 <?php foreach ($messages as $item) : ?>
71 <tr>
72 <th scope="row" class="check-column">
73 <input id="cb-select-<?php echo esc_attr(wmvc_show_data('idmessage', $item, '-')); ?>" type="checkbox" name="post[]" value="<?php echo esc_attr(wmvc_show_data('idmessage', $item, '-')); ?>">
74 <div class="locked-indicator">
75 <span class="locked-indicator-icon" aria-hidden="true"></span>
76 <span class="screen-reader-text"><?php echo esc_html__('Is Locked', 'wpdirectorykit'); ?></span>
77 </div>
78 </th>
79 <td>
80 <?php echo esc_attr(wmvc_show_data('idmessage', $item, '-')); ?>
81 </td>
82 <td>
83 <strong>
84 <a class="row-title" href="<?php echo esc_url(get_admin_url() . "admin.php?page=wdk_messages&function=edit&id=" . wmvc_show_data('idmessage', $item, '-')); ?>"><?php echo esc_html(wmvc_show_data('email_sender', $item, '-')); ?></a>
85 <?php if(!wmvc_show_data('is_readed', $item, 0)): ?>
86 <span class="label label-success"><?php echo esc_html__('Unread', 'wpdirectorykit'); ?></span>
87 <?php else: ?>
88 <span class="label label-info"><?php echo esc_html__('I read it', 'wpdirectorykit'); ?></span>
89 <?php endif; ?>
90 </strong>
91 <div class="row-actions">
92 <span class="edit"><a href="<?php echo esc_url(get_admin_url() . "admin.php?page=wdk_messages&function=edit&id=" . wmvc_show_data('idmessage', $item, '-')); ?>"><?php echo esc_html__('Edit', 'wpdirectorykit'); ?></a> | </span>
93 <span class="trash "><a href="<?php echo esc_url(get_admin_url() . "admin.php?page=wdk_messages&function=delete&paged=".esc_attr($paged)."&id=" . wmvc_show_data('idmessage', $item, '-')."&_wpnonce=".wp_create_nonce( 'wdk-messages-delete_'.wmvc_show_data('idmessage', $item, '-')));?>" class="submitdelete question_sure" title="<?php echo esc_attr__('Remove', 'wpdirectorykit');?>" ><?php echo esc_html__('Delete', 'wpdirectorykit'); ?></a></span>
94 </div>
95 </td>
96 <td>
97 <?php echo esc_html(wmvc_show_data('display_name', $item)); ?>
98 </td>
99 <td>
100 <?php echo esc_html(wdk_get_date(wmvc_show_data('message_date', $item), false)); ?>
101 </td>
102 <td>
103 <?php echo esc_html(wp_trim_words(wmvc_show_data('message', $item, '-'), 10)); ?>
104 </td>
105 <td class="actions_column">
106 <a href="<?php echo esc_url(get_admin_url() . "admin.php?page=wdk_messages&function=edit&id=" . wmvc_show_data('idmessage', $item, '-')); ?>" title="<?php echo esc_attr__('Edit','wpdirectorykit');?>"><span class="dashicons dashicons-edit"></span></a>
107 <a class="question_sure" href="<?php echo esc_url(get_admin_url() . "admin.php?page=wdk_messages&function=delete&paged=".esc_attr($paged)."&id=" . wmvc_show_data('idmessage', $item, '-')."&_wpnonce=".wp_create_nonce( 'wdk-messages-delete_'.wmvc_show_data('idmessage', $item, '-')));?>" title="<?php echo esc_attr__('Remove','wpdirectorykit');?>"><span class="dashicons dashicons-no"></span></a>
108 </td>
109 </tr>
110 <?php endforeach; ?>
111 <tfoot>
112 <tr>
113 <td id="cb" class="manage-column column-cb check-column"><label class="screen-reader-text" for="cb-select-all-1"><?php echo esc_html__('Select All', 'wpdirectorykit'); ?></label><input id="cb-select-all-1" type="checkbox"></td>
114 <th style="width:50px;"><?php echo esc_html__('#ID', 'wpdirectorykit'); ?></th>
115 <th><?php echo esc_html__('Email From', 'wpdirectorykit'); ?></th>
116 <th><?php echo esc_html__('To User', 'wpdirectorykit'); ?></th>
117 <th><?php echo esc_html__('Date', 'wpdirectorykit'); ?></th>
118 <th><?php echo esc_html__('Message', 'wpdirectorykit'); ?></th>
119 <th class="actions_column"><?php echo esc_html__('Actions', 'wpdirectorykit'); ?></th>
120 </tr>
121 </tfoot>
122 </table>
123 <div class="tablenav bottom">
124 <div class="alignleft actions bulkactions">
125 <?php wp_nonce_field( 'wdk-messages-bulk', '_wpnonce'); ?>
126 <label for="bulk-action-selector-bottom" class="screen-reader-text"><?php echo esc_html__('Select bulk action', 'wpdirectorykit'); ?></label>
127 <select name="action" id="bulk-action-selector-bottom">
128 <option value="-1"><?php echo esc_html__('Bulk actions', 'wpdirectorykit'); ?></option>
129 <option value="delete" class="hide-if-no-js"><?php echo esc_html__('Delete', 'wpdirectorykit'); ?></option>
130 </select>
131 <input type="hidden" name="page" value="wdk_messages" />
132 <input type="submit" id="table_action" class="button action" name="table_action" value="<?php echo esc_attr__('Apply', 'wpdirectorykit'); ?>">
133 </div>
134
135 <?php echo wp_kses_post(wmvc_xss_clean($pagination_output)); ?>
136 <br class="clear">
137 </div>
138 </form>
139 </div>
140
141 <script>
142 // Generate table
143 jQuery(document).ready(function($) {
144 $('.question_sure').on('click', function() {
145 return confirm("<?php echo esc_js(__('Are you sure? Selected item will be completely removed!', 'wpdirectorykit')); ?>");
146 });
147 });
148 </script>
149
150 <?php $this->view('general/footer', $data); ?>