PluginProbe
Contact Forms by Cimatti / 1.9.2
Contact Forms by Cimatti v1.9.2
2.3.6 2.3.5 2.3.0 2.2.32 2.2.4 2.2.0 2.1.2 2.1.1 trunk 1.0 1.1 1.2 1.2.1 1.3 1.3.1 1.3.2 1.3.3 1.3.4 1.3.5 1.3.6 1.3.7 1.3.8 1.3.9 1.4.0 1.4.1 All 62 releases
← All changes | accua-forms-list-page.php +357 -320 1.01.9.2 View file →
@@ -1,320 +1,357 @@
1 -<?php
2 -if(!class_exists('WP_List_Table')){
3 - require_once( ABSPATH . 'wp-admin/includes/class-wp-list-table.php' );
4 -}
5 -
6 -class Accua_Forms_List_Table extends WP_List_Table {
7 -
8 - var $message = NULL;
9 - var $active_items = 0;
10 - var $del_items = 0;
11 -
12 - function __construct(){
13 - global $status, $page;
14 - $this->message = '';
15 - parent::__construct( array(
16 - 'singular' => 'form',
17 - 'plural' => 'forms',
18 - 'ajax' => false
19 - ) );
20 - }
21 -
22 - function get_num_of_active_items () {
23 - return $this->active_items;
24 - }
25 -
26 - function get_num_of_del_items () {
27 - return $this->del_items;
28 - }
29 -
30 - function column_default($item, $column_name){
31 - if (isset($item[$column_name])) {
32 - return htmlspecialchars($item[$column_name], ENT_QUOTES);
33 - } else {
34 - return '';
35 - }
36 - }
37 -
38 - /*
39 - function column_title($item){
40 - return "<a href='admin.php?page=accua_forms_list&amp;fid=".$item['ID']."'>".$item['title']."</a>";
41 - }*/
42 -
43 - function column_cb($item){
44 - return sprintf(
45 - '<input type="checkbox" name="%1$s[]" value="%2$s" />',
46 - /*$1%s*/ $this->_args['singular'], //Let's simply repurpose the table's singular label ("movie")
47 - /*$2%s*/ $item['ID'] //The value of the checkbox should be the record's id
48 - );
49 - }
50 -
51 - function column_title($item){
52 - if ($item['deleted']) {
53 - if (isset($item['title'])) {
54 - $item_name = $item['title'];
55 - } else {
56 - $item_name = $item['ID'];
57 - }
58 - $actions = array(
59 - 'edit' => "<a href='admin.php?page=accua_forms_list&amp;fid={$item['ID']}&amp;restore=1'>".__("Restore", 'accua-form-api')."</a>",
60 - );
61 - return "<strong>".$item_name."</strong>".$this->row_actions($actions);
62 - } else {
63 - $item_name = '"'.$item['ID'].'"';
64 - $actions = array(
65 - 'edit' => "<a href='admin.php?page=accua_forms_list&amp;fid={$item['ID']}'>".__("Edit", 'accua-form-api')."</a>"
66 - . " &middot; <a href='admin.php?page=accua_forms_add&amp;clonefrom={$item['ID']}'>".__("Clone", 'accua-form-api')."</a>"
67 - . " &middot; <a href='admin.php?page=accua_forms_submissions_list&amp;fid={$item['ID']}'>".__("Report", 'accua-form-api')."</a>"
68 - . " &middot; <a href='admin.php?page=accua_forms_list&amp;fid_del={$item['ID']}'>".__("Trash", 'accua-form-api')."</a>",
69 - );
70 - return "<strong><a class='row-title' href='admin.php?page=accua_forms_list&amp;fid=".$item['ID']."'>".$item['title']."</a></strong>".$this->row_actions($actions);
71 - }
72 - }
73 -
74 -
75 -
76 -
77 - function column_submissions($item){
78 - if($item['submissions']!=0)
79 - return sprintf(
80 - '<a href="admin.php?page=accua_forms_submissions_list&amp;fid=%1$s">%2$s</a>',
81 - /*$1%s*/ $item['ID'],
82 - /*$2%s*/ $item['submissions']
83 - );
84 - else
85 - return "0";
86 - }
87 -
88 -
89 - function get_columns(){
90 - $columns = array(
91 - 'cb' => '<input type="checkbox" />', //Render a checkbox instead of text
92 - 'title' => __('Title', 'accua-form-api'),
93 - 'ID' => 'ID',
94 - 'basic-shortcode' => __('Basic Shortcode', 'accua-form-api'),
95 - 'submissions' => __('Submissions', 'accua-form-api'),
96 - );
97 - return $columns;
98 - }
99 -
100 - function get_sortable_columns() {
101 - return array(
102 - 'title' => array('title', false),
103 - 'ID' => array('ID', false),
104 - 'submissions' => array('submissions', false),
105 - );
106 - }
107 -
108 - function get_bulk_actions() {
109 - $actions = array(
110 - 'delete' => 'Delete'
111 - );
112 - return $actions;
113 - }
114 -
115 - function set_message($single_message) {
116 - $this->message=$single_message;
117 - }
118 -
119 - function get_message() {
120 - if($this->message!=NULL)
121 - return $this->message;
122 - else
123 - return NULL;
124 - }
125 -
126 - function accua_usort_numeric( $a, $b ) {
127 - $result = ((int)$a[$this->accua_orderby]) - ((int)$b[$this->accua_orderby]);
128 - if (!$result) {
129 - $result = ((int)$a['ID']) - ((int)$b['ID']);
130 - }
131 - return ( $this->accua_order_asc ) ? $result : -$result;
132 - }
133 -
134 - function accua_usort_string( $a, $b ) {
135 - $result = strcasecmp($a[$this->accua_orderby], $b[$this->accua_orderby]);
136 - if (!$result) {
137 - $result = ((int)$a['ID']) - ((int)$b['ID']);
138 - }
139 - return ( $this->accua_order_asc ) ? $result : -$result;
140 - }
141 -
142 - function process_bulk_action() {
143 -
144 - $forms= $_GET['form'];
145 - if('delete'===$this->current_action() ) {
146 - $forms_deleted = false;
147 - $forms_data = get_option('accua_forms_saved_forms', array());
148 - $trash_data = get_option('accua_forms_trash_forms', array());
149 -
150 - foreach($forms as $single_form) {
151 - if(isset($forms_data[$single_form])) {
152 - $trash_data[$single_form] = $forms_data[$single_form];
153 - unset($forms_data[$single_form]);
154 - $forms_deleted = true;
155 - ?>
156 - <script type="text/javascript">
157 - jQuery(function($){
158 - jQuery("#the-list tr:has(th.check-column input[type='checkbox'][value='<?php echo $single_form; ?>'])").fadeOut();
159 - });
160 - </script>
161 - <?php
162 - }
163 - }
164 - if ($forms_deleted) {
165 - update_option('accua_forms_trash_forms', $trash_data);
166 - update_option('accua_forms_saved_forms', $forms_data);
167 - $this->set_message("Form cancellati");
168 - }
169 -
170 - }
171 -
172 - }
173 -
174 - function prepare_items() {
175 - global $wpdb, $hook_suffix;
176 - $per_page = 50;
177 - $del = false;
178 - if(isset($_GET['del']) && $_GET['del']==1)
179 - $del = true;
180 -
181 - $columns = $this->get_columns();
182 - $hidden = get_hidden_columns($hook_suffix);
183 - $sortable = $this->get_sortable_columns();
184 -
185 -
186 - $this->_column_headers = array($columns, $hidden, $sortable);
187 -
188 - $current_page = $this->get_pagenum();
189 -
190 - $limit = ($current_page - 1) * $per_page;
191 -
192 - $forms_data = get_option('accua_forms_saved_forms', array());
193 - $forms_trash = get_option('accua_forms_trash_forms', array());
194 -
195 - $this->active_items = count($forms_data);
196 - $this->del_items = count($forms_data);
197 -
198 - $data = array();
199 -
200 - if ($del) {
201 - $start = $forms_trash;
202 - } else {
203 - $start = $forms_data;
204 - }
205 -
206 - foreach ($start as $id => $form) {
207 - if (isset($form['title']) && (trim($form['title']) !== '')) {
208 - $title = $form['title'];
209 - } else {
210 - $title = __('(no title)','accua-form-api');
211 - }
212 -
213 - $data[$id] = array (
214 - 'ID' => $id,
215 - 'title' => $title,
216 - 'submissions' => 0,
217 - 'basic-shortcode'=> '[accua-form fid="'.$id.'"]',
218 - 'deleted' => $del,
219 - );
220 - }
221 -
222 - $query = "SELECT afs_form_id AS fid, count(*) AS submissions
223 - FROM `{$wpdb->prefix}accua_forms_submissions`
224 - WHERE afs_status <> -1
225 - GROUP BY afs_form_id";
226 -
227 - $submissions = $wpdb->get_results($query, OBJECT);
228 - foreach ($submissions as $fsub) {
229 - if (isset($data[$fsub->fid])) {
230 - $data[$fsub->fid]['submissions'] = $fsub->submissions;
231 - } else if ($del){
232 - $data[$fsub->fid] = array(
233 - 'ID' => $fsub->fid,
234 - 'submissions' => $fsub->submissions,
235 - 'deleted' => true,
236 - 'basic-shortcode'=> '[accua-form fid="'.$fsub->fid.'"]',
237 - );
238 - $this->del_items++;
239 - } else if (!isset($forms_data[$fsub->fid])) {
240 - $this->del_items++;
241 - }
242 - }
243 -
244 - $this->accua_order_asc = empty($_GET['order']) || ($_GET['order'] != 'desc');
245 - $this->accua_orderby = (isset($_GET['orderby'])) ? $_GET['orderby'] : 'title';
246 - switch($this->accua_orderby) {
247 - case 'ID':
248 - case 'submissions':
249 - $this->accua_orderby = $_GET['orderby'];
250 - usort( $data, array( &$this, 'accua_usort_numeric' ) );
251 - break;
252 - //case 'title':
253 - default:
254 - $this->accua_orderby = 'title';
255 - usort( $data, array( &$this, 'accua_usort_string' ) );
256 - }
257 -
258 - $total_items = count($data);
259 -
260 - $this->items = array_slice($data,$limit,$per_page);
261 -
262 - $this->set_pagination_args( array(
263 - 'total_items' => $total_items,
264 - 'per_page' => $per_page,
265 - 'total_pages' => ceil($total_items/$per_page)
266 - ) );
267 -
268 - }
269 -
270 -}
271 -
272 -function accua_forms_list_page_table($head = false){
273 -
274 - static $listTable = null;
275 -
276 - if(isset($_GET['fid_del']))
277 - {
278 - $fid = $_GET['fid_del'];
279 - $forms_data = get_option('accua_forms_saved_forms', array());
280 - if (isset($forms_data[$fid])) {
281 - $trash_data = get_option('accua_forms_trash_forms', array());
282 - $trash_data[$fid] = $forms_data[$fid];
283 - update_option('accua_forms_trash_forms', $trash_data);
284 - unset($forms_data[$fid]);
285 - update_option('accua_forms_saved_forms', $forms_data);
286 - }
287 - }
288 -
289 -
290 - if ($listTable === null) {
291 - $listTable = new Accua_Forms_List_Table();
292 - $listTable->process_bulk_action();
293 - $listTable->prepare_items();
294 - }
295 -
296 - if ($head === true) {
297 - return;
298 - }
299 -
300 - if($listTable->get_message()!=NULL) { ?>
301 - <div class="updated"><p><?php echo $listTable->get_message(); ?></p></div>
302 - <?php } ?>
303 - <ul class="subsubsub">
304 - <li>
305 - <a <?php if (!isset($_GET['del']) || ($_GET['del']!=1)) { echo " class='current' "; } ?> href="admin.php?page=accua_forms_list">
306 - <?php _e("Active", 'accua-form-api'); ?></a> (<?php echo $listTable->get_num_of_active_items(); ?>) |
307 - </li>
308 - <li>
309 - <a <?php if (isset($_GET['del']) && ($_GET['del']==1)) { echo " class='current' "; } ?> href="admin.php?page=accua_forms_list&del=1">
310 - <?php _e("Trash", 'accua-form-api'); ?></a> (<?php echo $listTable->get_num_of_del_items(); ?>)
311 - </li>
312 - </ul>
313 -
314 - <form id="accua-forms-list-filter" method="get">
315 - <input type="hidden" name="page" value="<?php echo htmlspecialchars(stripslashes($_REQUEST['page'])); ?>" />
316 - <?php $listTable->display(); ?>
317 - </form>
318 - <?php /* echo '<pre>$listTable = ' htmlspecialchars(print_r($listTable, true)); ?></pre> */ ?>
319 -<?php
320 -}
1 +<?php
2 +if(!class_exists('WP_List_Table')){
3 + require_once( ABSPATH . 'wp-admin/includes/class-wp-list-table.php' );
4 +}
5 +
6 +class Accua_Forms_List_Table extends WP_List_Table {
7 +
8 + var $message = NULL;
9 + var $active_items = 0;
10 + var $del_items = 0;
11 +
12 + var $accua_orderby = null;
13 + var $accua_order_asc = null;
14 +
15 + function __construct(){
16 + global $status, $page;
17 + $this->message = '';
18 + parent::__construct( array(
19 + 'singular' => 'form',
20 + 'plural' => 'forms',
21 + 'ajax' => false
22 + ) );
23 + }
24 +
25 + function get_num_of_active_items () {
26 + return $this->active_items;
27 + }
28 +
29 + function get_num_of_del_items () {
30 + return $this->del_items;
31 + }
32 +
33 + function column_default($item, $column_name){
34 + if (isset($item[$column_name])) {
35 + return htmlspecialchars($item[$column_name], ENT_QUOTES);
36 + } else {
37 + return '';
38 + }
39 + }
40 +
41 + function column_cb($item){
42 + return sprintf(
43 + '<input type="checkbox" name="%1$s[]" value="%2$s" />',
44 + /*$1%s*/ $this->_args['singular'],
45 + /*$2%s*/ $item['ID']
46 + );
47 + }
48 +
49 + function column_title($item){
50 + if ($item['deleted']) {
51 + if (isset($item['title'])) {
52 + $item_name = htmlspecialchars($item['title']);
53 + } else {
54 + $item_name = $item['ID'];
55 + }
56 + $nonced_edit = wp_nonce_url('admin.php?page=accua_forms_list&amp;fid=' . $item['ID'] . '&amp;restore=1', 'edit_posts');
57 + $actions = array(
58 + 'edit' => "<a href='" . $nonced_edit . "'>".__("Restore", 'contact-forms')."</a>",
59 + );
60 + return "<strong>".$item_name."</strong>".$this->row_actions($actions);
61 + } else {
62 + $nonced_edit = wp_nonce_url('admin.php?page=accua_forms_list&amp;fid=' . $item['ID'], 'edit_posts');
63 + $nonced_clone = wp_nonce_url('admin.php?page=accua_forms_add&amp;clonefrom=' . $item['ID'], 'clone_posts');
64 + $nonced_del = wp_nonce_url('admin.php?page=accua_forms_list&amp;fid_del=' . $item['ID'], 'trash_posts');
65 + $actions = array(
66 + 'edit' => "<a href='{$nonced_edit}'>".__("Edit", 'contact-forms')."</a>"
67 + . " &middot; <a href='{$nonced_clone}'>".__("Clone", 'contact-forms')."</a>"
68 + . " &middot; <a href='admin.php?page=accua_forms_submissions_list&amp;fid={$item['ID']}'>".__("Report", 'contact-forms')."</a>"
69 + . " &middot; <a href='{$nonced_del}'>".__("Trash", 'contact-forms')."</a>",
70 + );
71 + return "<strong><a class='row-title' href='{$nonced_edit}'>".htmlspecialchars($item['title'])."</a></strong>".$this->row_actions($actions);
72 + }
73 + }
74 +
75 +
76 +
77 +
78 + function column_submissions($item){
79 + if($item['submissions']!=0)
80 + return sprintf(
81 + '<a href="admin.php?page=accua_forms_submissions_list&amp;fid=%1$s">%2$s</a>',
82 + /*$1%s*/ $item['ID'],
83 + /*$2%s*/ $item['submissions']
84 + );
85 + else
86 + return "0";
87 + }
88 +
89 +
90 + function get_columns(){
91 + $columns = array(
92 + 'cb' => '<input type="checkbox" />', //Render a checkbox instead of text
93 + 'title' => __('Title', 'contact-forms'),
94 + 'ID' => 'ID',
95 + 'shortcode' => __('Shortcode', 'contact-forms'),
96 + 'phpcode' => __('PHP code', 'contact-forms'),
97 + 'fromemail' => __('From Email', 'contact-forms'),
98 + 'fromname' => __('From Name', 'contact-forms'),
99 + 'adminemail' => __('Admin Email', 'contact-forms'),
100 + 'bccemail' => __('BCC Email', 'contact-forms'),
101 + 'submissions' => __('Submissions', 'contact-forms'),
102 + );
103 + return $columns;
104 + }
105 +
106 + function get_sortable_columns() {
107 + return array(
108 + 'title' => array('title', false),
109 + 'ID' => array('ID', false),
110 + 'submissions' => array('submissions', false),
111 + );
112 + }
113 +
114 + function get_bulk_actions() {
115 + if(isset($_GET['del']) && $_GET['del']==1) {
116 + $actions = array();
117 + } else {
118 + $actions = array(
119 + 'delete' => __('Move to trash', 'contact-forms')
120 + );
121 + }
122 + return $actions;
123 + }
124 +
125 + function set_message($single_message) {
126 + $this->message=$single_message;
127 + }
128 +
129 + function get_message() {
130 + if($this->message!=NULL)
131 + return $this->message;
132 + else
133 + return NULL;
134 + }
135 +
136 + function accua_usort_numeric( $a, $b ) {
137 + $result = ((int)$a[$this->accua_orderby]) - ((int)$b[$this->accua_orderby]);
138 + if (!$result) {
139 + $result = ((int)$a['ID']) - ((int)$b['ID']);
140 + }
141 + return ( $this->accua_order_asc ) ? $result : -$result;
142 + }
143 +
144 + function accua_usort_string( $a, $b ) {
145 + $result = strcasecmp($a[$this->accua_orderby], $b[$this->accua_orderby]);
146 + if (!$result) {
147 + $result = ((int)$a['ID']) - ((int)$b['ID']);
148 + }
149 + return ( $this->accua_order_asc ) ? $result : -$result;
150 + }
151 +
152 + function process_bulk_action() {
153 +
154 + $forms = (isset($_GET['form']) && is_array($_GET['form'])) ? $_GET['form'] : array();
155 + if('delete'===$this->current_action() ) {
156 + $forms_deleted = false;
157 + $forms_data = get_option('accua_forms_saved_forms', array());
158 + $trash_data = get_option('accua_forms_trash_forms', array());
159 +
160 + foreach($forms as $single_form) {
161 + if(isset($forms_data[$single_form])) {
162 + $trash_data[$single_form] = $forms_data[$single_form];
163 + unset($forms_data[$single_form]);
164 + $forms_deleted = true;
165 + ?>
166 + <script type="text/javascript">
167 + jQuery(function($){
168 + jQuery("#the-list tr:has(th.check-column input[type='checkbox'][value='<?php echo $single_form; ?>'])").fadeOut();
169 + });
170 + </script>
171 + <?php
172 + }
173 + }
174 + if ($forms_deleted) {
175 + update_option('accua_forms_trash_forms', $trash_data);
176 + update_option('accua_forms_saved_forms', $forms_data);
177 + $this->set_message(__("Forms deleted", 'contact-forms'));
178 + }
179 +
180 + }
181 +
182 + }
183 +
184 + function prepare_items() {
185 + global $wpdb, $hook_suffix;
186 + $per_page = 50;
187 + $del = isset($_GET['del']) && $_GET['del']==1;
188 +
189 + $columns = $this->get_columns();
190 + $hidden = get_hidden_columns($hook_suffix);
191 + $sortable = $this->get_sortable_columns();
192 +
193 +
194 + $this->_column_headers = array($columns, $hidden, $sortable);
195 +
196 + $current_page = $this->get_pagenum();
197 +
198 + $limit = ($current_page - 1) * $per_page;
199 +
200 + $forms_data = get_option('accua_forms_saved_forms', array());
201 + $forms_trash = get_option('accua_forms_trash_forms', array());
202 + $forms_default = get_option('accua_forms_default_form_data',array());
203 +
204 + $this->active_items = count($forms_data);
205 + $this->del_items = count($forms_trash);
206 +
207 + $data = array();
208 +
209 + if ($del) {
210 + check_admin_referer('deleted_forms');
211 + $start = $forms_trash;
212 + } else {
213 + $start = $forms_data;
214 + }
215 +
216 + foreach ($start as $id => $form) {
217 + if (isset($form['title']) && (trim($form['title']) !== '')) {
218 + $title = $form['title'];
219 + } else {
220 + $title = __('(no title)','contact-forms');
221 + }
222 +
223 + $data[$id] = array (
224 + 'ID' => $id,
225 + 'title' => $title,
226 + 'submissions' => 0,
227 + 'shortcode'=> $del?'':'[accua-form fid="'.$id.'"]',
228 + 'phpcode'=> $del?'':"<?php accua_forms_include('$id'); ?>",
229 + 'deleted' => $del,
230 + );
231 +
232 + $forminfos = array(
233 + 'fromemail' => 'emails_from',
234 + 'fromname' => 'emails_from_name',
235 + 'adminemail' => 'admin_emails_to',
236 + 'bccemail' => 'emails_bcc',
237 + );
238 +
239 + foreach ($forminfos as $infodest => $infoid) {
240 + if (isset($form[$infoid])) {
241 + $data[$id][$infodest] = $form[$infoid];
242 + } else {
243 + $data[$id][$infodest] = $forms_default[$infoid] . " (default)";
244 + }
245 + }
246 +
247 + }
248 +
249 + $query = "SELECT afs_form_id AS fid, count(*) AS submissions
250 + FROM `{$wpdb->prefix}accua_forms_submissions`
251 + WHERE afs_status >= 0
252 + GROUP BY afs_form_id";
253 +
254 + $submissions = $wpdb->get_results($query, OBJECT);
255 + foreach ($submissions as $fsub) {
256 + if (isset($data[$fsub->fid])) {
257 + $data[$fsub->fid]['submissions'] = $fsub->submissions;
258 + } else if ($del){
259 + if (!isset($forms_data[$fsub->fid])) {
260 + $data[$fsub->fid] = array(
261 + 'ID' => $fsub->fid,
262 + 'submissions' => $fsub->submissions,
263 + 'deleted' => true,
264 + 'shortcode' => '',
265 + 'phpcode' => '',
266 + 'fromemail' => '',
267 + 'fromname' => '',
268 + 'adminemail' => '',
269 + 'bccemail' => '',
270 + );
271 + $this->del_items++;
272 + }
273 + } else if (!isset($forms_trash[$fsub->fid])) {
274 + $this->del_items++;
275 + }
276 + }
277 +
278 + $this->accua_order_asc = empty($_GET['order']) || ($_GET['order'] != 'desc');
279 + $this->accua_orderby = (isset($_GET['orderby'])) ? $_GET['orderby'] : 'title';
280 + switch($this->accua_orderby) {
281 + case 'ID':
282 + case 'submissions':
283 + $this->accua_orderby = $_GET['orderby'];
284 + @ usort( $data, array( &$this, 'accua_usort_numeric' ) );
285 + break;
286 + //case 'title':
287 + default:
288 + $this->accua_orderby = 'title';
289 + @ usort( $data, array( &$this, 'accua_usort_string' ) );
290 + }
291 +
292 + $total_items = count($data);
293 +
294 + $this->items = array_slice($data,$limit,$per_page);
295 +
296 + $this->set_pagination_args( array(
297 + 'total_items' => $total_items,
298 + 'per_page' => $per_page,
299 + 'total_pages' => ceil($total_items/$per_page)
300 + ) );
301 +
302 + }
303 +
304 +}
305 +
306 +function accua_forms_list_page_table($head = false){
307 +
308 + static $listTable = null;
309 + //var_dump($_REQUEST);
310 +
311 + if(isset($_GET['fid_del'])) {
312 + check_admin_referer('trash_posts');
313 + $fid = $_GET['fid_del'];
314 + $forms_data = get_option('accua_forms_saved_forms', array());
315 + if (isset($forms_data[$fid])) {
316 + $trash_data = get_option('accua_forms_trash_forms', array());
317 + $trash_data[$fid] = $forms_data[$fid];
318 + update_option('accua_forms_trash_forms', $trash_data);
319 + unset($forms_data[$fid]);
320 + update_option('accua_forms_saved_forms', $forms_data);
321 + }
322 + }
323 +
324 +
325 + if ($listTable === null) {
326 + $listTable = new Accua_Forms_List_Table();
327 + $listTable->process_bulk_action();
328 + $listTable->prepare_items();
329 + }
330 +
331 + if ($head === true) {
332 + return;
333 + }
334 +
335 + if($listTable->get_message()!=NULL) { ?>
336 + <div class="updated"><p><?php echo $listTable->get_message(); ?></p></div>
337 + <?php } ?>
338 + <ul class="subsubsub">
339 + <li>
340 + <?php $nonced_url = wp_nonce_url('admin.php?page=accua_forms_list', 'home_forms') ?>
341 + <a <?php if (!isset($_GET['del']) || ($_GET['del']!=1)) { echo " class='current' "; } ?> href="<?php echo $nonced_url ?>">
342 + <?php _e("Active", 'contact-forms'); ?></a> (<?php echo $listTable->get_num_of_active_items(); ?>) |
343 + </li>
344 + <li>
345 + <?php $nonced_url = wp_nonce_url('admin.php?page=accua_forms_list&del=1', 'deleted_forms'); ?>
346 + <a <?php if (isset($_GET['del']) && ($_GET['del']==1)) { echo " class='current' "; } ?> href="<?php echo $nonced_url ?>">
347 + <?php _e("Trash", 'contact-forms'); ?></a> (<?php echo $listTable->get_num_of_del_items(); ?>)
348 + </li>
349 + </ul>
350 +
351 + <form id="accua-forms-list-filter" method="get">
352 + <input type="hidden" name="page" value="<?php echo htmlspecialchars(stripslashes($_REQUEST['page'])); ?>" />
353 + <?php $listTable->display(); ?>
354 + </form>
355 + <?php /* echo '<pre>$listTable = ' htmlspecialchars(print_r($listTable, true)); ?></pre> */ ?>
356 +<?php
357 +}