PluginProbe
WP Data Access – App Builder for Tables, Forms, Charts, Maps & Dashboards / 5.5.84
WP Data Access – App Builder for Tables, Forms, Charts, Maps & Dashboards v5.5.84
5.5.84 5.5.83 5.5.82 5.5.81 5.5.80 5.5.79 5.5.77 5.5.76 5.5.75 5.5.73 5.5.72 5.5.22 5.5.23 5.5.29 5.5.3 5.5.31 5.5.32 5.5.34 5.5.35 5.5.36 5.5.37 5.5.4 5.5.40 5.5.41 5.5.42 All 160 releases
wp-data-access / WPDataAccess / Data_Apps / WPDA_Table_Container.php

WPDA_Table_Container.php in WP Data Access – App Builder for Tables, Forms, Charts, Maps & Dashboards 5.5.84, at WPDataAccess/Data_Apps/WPDA_Table_Container.php

80 lines 2.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace WPDataAccess\Data_Apps;
4
5 use WPDataAccess\API\WPDA_API_Core;
6 use WPDataAccess\WPDA;
7 class WPDA_Table_Container extends WPDA_Container {
8 private $dbs = null;
9
10 private $tbl = null;
11
12 private $s;
13
14 // Search string
15 private $c;
16
17 // Case sensitive ("true"|"false")
18 public function __construct( $args = array() ) {
19 parent::__construct( $args );
20 if ( !WPDA::current_user_is_admin() ) {
21 if ( !is_admin() && !$this->send_feedback() ) {
22 return;
23 }
24 $this->show_feedback( __( 'Not authorized', 'wp-data-access' ) );
25 return;
26 }
27 if ( isset( $args['dbs'], $args['tbl'] ) ) {
28 $this->dbs = WPDA_API_Core::sanitize_db_identifier( $args['dbs'] );
29 $this->tbl = WPDA_API_Core::sanitize_db_identifier( $args['tbl'] );
30 } else {
31 if ( isset( $args['feedback'] ) && false === $args['feedback'] ) {
32 return;
33 }
34 throw new \Exception(esc_attr__( 'ERROR: Invalid usage', 'wp-data-access' ));
35 }
36 $this->s = ( isset( $args['s'] ) ? sanitize_text_field( $args['s'] ) : '' );
37 // Not required
38 $this->c = ( isset( $args['c'] ) ? sanitize_text_field( $args['c'] ) : '' );
39 // Not required
40 }
41
42 public function show() {
43 if ( !WPDA::current_user_is_admin() ) {
44 if ( !is_admin() && !$this->send_feedback() ) {
45 return;
46 }
47 $this->show_feedback( __( 'Not authorized', 'wp-data-access' ) );
48 return;
49 }
50 ?>
51 <div class="wrap wpda-explorer-backend">
52
53 <h1 class="wp-heading-inline" style="margin-bottom: 18px">
54 <?php
55 ?>
56 Data Explorer
57 </h1>
58
59 <div class="wpda-pp-container">
60 <div
61 class="pp-container-explorer pp-container-admin"
62 data-source="{ 'dbs': '<?php
63 echo esc_attr( $this->dbs );
64 ?>', 'tbl': '<?php
65 echo esc_attr( $this->tbl );
66 ?>', 's': '<?php
67 echo esc_attr( $this->s );
68 ?>', 'c': '<?php
69 echo esc_attr( $this->c );
70 ?>' }"
71 ></div>
72 </div>
73
74 </div>
75 <?php
76 $this->add_client( 'de' );
77 }
78
79 }
80