| 1 |
<?php |
| 2 |
|
| 3 |
namespace WPDataAccess\WPDA_Navi { |
| 4 |
|
| 5 |
use WPDataAccess\WPDA; |
| 6 |
|
| 7 |
class WPDA_Navi { |
| 8 |
|
| 9 |
private $option_legacy_tools; |
| 10 |
|
| 11 |
public function __construct() { |
| 12 |
$this->option_legacy_tools = WPDA::get_option( WPDA::OPTION_PLUGIN_LEGACY_TOOLS ); |
| 13 |
} |
| 14 |
|
| 15 |
public function show() { |
| 16 |
?> |
| 17 |
<div class="wpda-navi-container"> |
| 18 |
<?php |
| 19 |
$this->header(); |
| 20 |
$this->tool_guide(); |
| 21 |
?> |
| 22 |
</div> |
| 23 |
<?php |
| 24 |
} |
| 25 |
|
| 26 |
private function header() { |
| 27 |
?> |
| 28 |
<div class="wpda-navi-container-header"> |
| 29 |
<div class="wpda-navi-container-header-title"> |
| 30 |
<div> |
| 31 |
<h1> |
| 32 |
Welcome to WP Data Access |
| 33 |
</h1> |
| 34 |
|
| 35 |
<h2> |
| 36 |
A powerful data-driven App Builder with an intuitive Table Builder, a highly customizable Form Builder and interactive Chart support in 35 languages |
| 37 |
</h2> |
| 38 |
</div> |
| 39 |
|
| 40 |
<div></div> |
| 41 |
</div> |
| 42 |
|
| 43 |
<div class="wpda-navi-container-header-image"> |
| 44 |
<img src="<?php echo esc_attr( plugins_url('../../assets/images/coding-isometric-01-blauw.png', __FILE__ ) ); ?>" alt="laptop" /> |
| 45 |
</div> |
| 46 |
</div> |
| 47 |
<?php |
| 48 |
WPDA::load_wp_tables(); |
| 49 |
} |
| 50 |
|
| 51 |
/** |
| 52 |
* @param $tool |
| 53 |
* |
| 54 |
* @return string |
| 55 |
*/ |
| 56 |
private function tool_status( $tool ) { |
| 57 |
?> |
| 58 |
<div onclick="setLegacyToolStatus(this)" class="tool_status_icon"> |
| 59 |
<?php |
| 60 |
if ( true === $tool[0] ) { |
| 61 |
?> |
| 62 |
<i class="fas fa-toggle-on" style="font-size: 28px;"></i> |
| 63 |
<?php |
| 64 |
} else { |
| 65 |
?> |
| 66 |
<i class="fas fa-toggle-off" style="font-size: 28px;"></i> |
| 67 |
<?php |
| 68 |
} |
| 69 |
?> |
| 70 |
</div> |
| 71 |
<?php |
| 72 |
return ''; |
| 73 |
} |
| 74 |
|
| 75 |
private function tool_guide() { |
| 76 |
?> |
| 77 |
<div class="wpda-navi-container-content" |
| 78 |
style="display: grid; grid-template-columns: auto auto; justify-content: space-between; align-items: center; padding-bottom: 0;" |
| 79 |
> |
| 80 |
<h2> |
| 81 |
Tool Guide |
| 82 |
</h2> |
| 83 |
|
| 84 |
<div id="wpda-legacy-tool-settings"> |
| 85 |
<a href="javascript:void(0)" onclick="setLegacyTools()"> |
| 86 |
<?php |
| 87 |
if ( |
| 88 |
!$this->option_legacy_tools['tables'][0] && |
| 89 |
!$this->option_legacy_tools['forms'][0] && |
| 90 |
!$this->option_legacy_tools['templates'][0] && |
| 91 |
!$this->option_legacy_tools['designer'][0] && |
| 92 |
!$this->option_legacy_tools['dashboards'][0] && |
| 93 |
!$this->option_legacy_tools['charts'][0] |
| 94 |
) { |
| 95 |
?> |
| 96 |
<i class="fas fa-toggle-off" style="font-size: 28px;"></i> |
| 97 |
<?php |
| 98 |
} else { |
| 99 |
?> |
| 100 |
<i class="fas fa-toggle-on" style="font-size: 28px;"></i> |
| 101 |
<?php |
| 102 |
} |
| 103 |
?> |
| 104 |
|
| 105 |
<span> |
| 106 |
LEGACY TOOL USAGE |
| 107 |
</span> |
| 108 |
</a> |
| 109 |
<div id="wpda-legacy-tool-settings-panel"> |
| 110 |
<table> |
| 111 |
<thead> |
| 112 |
<tr> |
| 113 |
<th class="label">LEGACY TOOL</th> |
| 114 |
<th class="items">ACTIVE ITEMS</th> |
| 115 |
<th class="status">STATUS</th> |
| 116 |
</tr> |
| 117 |
</thead> |
| 118 |
<tbody> |
| 119 |
<tr> |
| 120 |
<td>Tables</td> |
| 121 |
<td class="items"><?php echo esc_attr( $this->option_legacy_tools['tables'][1] ); ?></td> |
| 122 |
<td class="status" data-tool="tables"><?php echo $this->tool_status( $this->option_legacy_tools['tables'] ); // phpcs:ignore WordPress.Security.EscapeOutput ?></td> |
| 123 |
</tr> |
| 124 |
<tr> |
| 125 |
<td>Forms</td> |
| 126 |
<td class="items"><?php echo esc_attr( $this->option_legacy_tools['forms'][1] ); ?></td> |
| 127 |
<td class="status" data-tool="forms"><?php echo $this->tool_status( $this->option_legacy_tools['forms'] ); // phpcs:ignore WordPress.Security.EscapeOutput ?></td> |
| 128 |
</tr> |
| 129 |
<tr> |
| 130 |
<td>Templates</td> |
| 131 |
<td class="items"><?php echo esc_attr( $this->option_legacy_tools['templates'][1] ); ?></td> |
| 132 |
<td class="status" data-tool="templates"><?php echo $this->tool_status( $this->option_legacy_tools['templates'] ); // phpcs:ignore WordPress.Security.EscapeOutput ?></td> |
| 133 |
</tr> |
| 134 |
<tr> |
| 135 |
<td>Designer</td> |
| 136 |
<td class="items"><?php echo esc_attr( $this->option_legacy_tools['designer'][1] ); ?></td> |
| 137 |
<td class="status" data-tool="designer"><?php echo $this->tool_status( $this->option_legacy_tools['designer'] ); // phpcs:ignore WordPress.Security.EscapeOutput ?></td> |
| 138 |
</tr> |
| 139 |
<tr> |
| 140 |
<td>Dashboards</td> |
| 141 |
<td class="items"><?php echo esc_attr( $this->option_legacy_tools['dashboards'][1] ); ?></td> |
| 142 |
<td class="status" data-tool="dashboards"><?php echo $this->tool_status( $this->option_legacy_tools['dashboards'] ); // phpcs:ignore WordPress.Security.EscapeOutput ?></td> |
| 143 |
</tr> |
| 144 |
<tr> |
| 145 |
<td>Charts</td> |
| 146 |
<td class="items"><?php echo esc_attr( $this->option_legacy_tools['charts'][1] ); ?></td> |
| 147 |
<td class="status" data-tool="charts"><?php echo $this->tool_status( $this->option_legacy_tools['charts'] ); // phpcs:ignore WordPress.Security.EscapeOutput ?></td> |
| 148 |
</tr> |
| 149 |
</tbody> |
| 150 |
</table> |
| 151 |
|
| 152 |
<div id="wpda-legacy-tool-settings-submit"> |
| 153 |
<button type="submit" onclick="updateLegacyTools()">UPDATE STATUS</button> |
| 154 |
<button type="button" onclick="setLegacyTools()">CANCEL</button> |
| 155 |
</div> |
| 156 |
|
| 157 |
<div style="display: none"> |
| 158 |
<form |
| 159 |
id="wpda-legacy-tool-settings-form-data" |
| 160 |
action="<?php echo esc_url( admin_url( 'admin.php' ) ); ?>?page=wpda_navi" |
| 161 |
method="POST" |
| 162 |
> |
| 163 |
<label for="wpda-legacy-tool-settings-legacy-tool-data"></label><input |
| 164 |
type="text" |
| 165 |
name="wpda-legacy-tool-status" |
| 166 |
id="wpda-legacy-tool-settings-legacy-tool-data" |
| 167 |
/> |
| 168 |
</form> |
| 169 |
</div> |
| 170 |
</div> |
| 171 |
</div> |
| 172 |
</div> |
| 173 |
|
| 174 |
<div class="wpda-navi-container-content"> |
| 175 |
<div class="wpda-navi-container-content-items"> |
| 176 |
<div class="wpda-navi-container-content-item wpda-featured"> |
| 177 |
<div class="wpda-navi-container-content-item-title"> |
| 178 |
<span class="fa-solid wpda-icon"> |
| 179 |
<svg xmlns="http://www.w3.org/2000/svg" |
| 180 |
height="18px" |
| 181 |
width="18px" |
| 182 |
viewBox="4 4 16 16" |
| 183 |
fill="inherit" |
| 184 |
class="wpda-icon" |
| 185 |
> |
| 186 |
<path d="M4 8h4V4H4v4zm6 12h4v-4h-4v4zm-6 0h4v-4H4v4zm0-6h4v-4H4v4zm6 0h4v-4h-4v4zm6-10v4h4V4h-4zm-6 4h4V4h-4v4zm6 6h4v-4h-4v4zm0 6h4v-4h-4v4z"></path> |
| 187 |
</svg> |
| 188 |
</span> |
| 189 |
<h3>App Builder</h3> |
| 190 |
<div class="wpda-navi-container-content-item-title-help"> |
| 191 |
<a |
| 192 |
href="https://docs.rad.wpdataaccess.com/" |
| 193 |
target="_blank" |
| 194 |
class="wpda_tooltip" |
| 195 |
title="View online App Builder documentation" |
| 196 |
> |
| 197 |
<i class="fa-solid fa-question-circle wpda-icon-help"></i> |
| 198 |
</a> |
| 199 |
</div> |
| 200 |
</div> |
| 201 |
|
| 202 |
<div class="wpda-navi-container-content-item-slogan" style="display: flex; justify-content: space-between; align-items: center;"> |
| 203 |
<span> |
| 204 |
A data-driven Rapid Application Development tool. |
| 205 |
</span> |
| 206 |
|
| 207 |
<span></span> |
| 208 |
</div> |
| 209 |
|
| 210 |
<div class="wpda-navi-container-content-item-content"> |
| 211 |
<ul class="wpda-navi-container-content-item-content-grid switch-grid"> |
| 212 |
<li> |
| 213 |
<a href="?page=wpda_apps">Start App Builder</a> |
| 214 |
</li> |
| 215 |
<li> |
| 216 |
<a href="?page=wpda_apps&page_iaction=create_new_app">Create a new app</a> |
| 217 |
</li> |
| 218 |
</ul> |
| 219 |
</div> |
| 220 |
|
| 221 |
<div class="wpda-navi-container-content-item-facts"> |
| 222 |
<ul> |
| 223 |
<li><strong>Table Builder</strong> – Create powerful data tables.</li> |
| 224 |
<li><strong>Form Builder</strong> – Design data entry forms.</li> |
| 225 |
<li><strong>Chart Builder</strong> – Visualize data.</li> |
| 226 |
<li><strong>Map Builder</strong> – Plot location data.</li> |
| 227 |
<li><strong>Dashboard Builder</strong> – Centralize and monitor insights.</li> |
| 228 |
<li><strong>Theme Builder</strong> – Personalize app appearance.</li> |
| 229 |
</ul> |
| 230 |
</div> |
| 231 |
</div> |
| 232 |
|
| 233 |
<div class="wpda-navi-container-content-item"> |
| 234 |
<div class="wpda-navi-container-content-item-title"> |
| 235 |
<span class="fa-solid fa-database wpda-icon"></span> |
| 236 |
<h3>Explorer</h3> |
| 237 |
<div class="wpda-navi-container-content-item-title-help"> |
| 238 |
<a |
| 239 |
href="https://docs.explorer.wpdataaccess.com/" |
| 240 |
target="_blank" |
| 241 |
class="wpda_tooltip" |
| 242 |
title="View online Data Explorer documentation" |
| 243 |
> |
| 244 |
<i class="fa-solid fa-question-circle wpda-icon-help"></i> |
| 245 |
</a> |
| 246 |
</div> |
| 247 |
</div> |
| 248 |
|
| 249 |
<div class="wpda-navi-container-content-item-slogan"> |
| 250 |
Perform data and database related tasks. |
| 251 |
</div> |
| 252 |
|
| 253 |
<div class="wpda-navi-container-content-item-content"> |
| 254 |
<ul class="wpda-navi-container-content-item-content-grid"> |
| 255 |
<li> |
| 256 |
<a href="?page=wpda">Start Data Explorer</a> |
| 257 |
</li> |
| 258 |
<li> |
| 259 |
<a href="?page=wpda&page_iaction=wpda_import_sql">Import SQL files</a> |
| 260 |
</li> |
| 261 |
<li> |
| 262 |
<a href="?page=wpda&page_iaction=manage_databases">Manage databases</a> |
| 263 |
</li> |
| 264 |
<li> |
| 265 |
<a href="?page=wpda&page_action=wpda_import_csv">Import CSV files</a> |
| 266 |
</li> |
| 267 |
</ul> |
| 268 |
</div> |
| 269 |
|
| 270 |
<div class="wpda-navi-container-content-item-facts"> |
| 271 |
<ul> |
| 272 |
<li>Schedule unattended exports (new Data Explorer only).</li> |
| 273 |
<li>Manage database connections, databases and table data.</li> |
| 274 |
<li>Explore local and remote databases.</li> |
| 275 |
<li>Global search and replace.</li> |
| 276 |
</ul> |
| 277 |
</div> |
| 278 |
|
| 279 |
<div class="wpda-navi-container-content-item-facts"> |
| 280 |
<ul> |
| 281 |
<li> |
| 282 |
Old Data Explorer no longer available. |
| 283 |
</li> |
| 284 |
</ul> |
| 285 |
</div> |
| 286 |
</div> |
| 287 |
|
| 288 |
<div class="wpda-navi-container-content-item"> |
| 289 |
<div class="wpda-navi-container-content-item-title"> |
| 290 |
<span class="fa-solid fa-code wpda-icon"></span> |
| 291 |
<h3>SQL</h3> |
| 292 |
<div class="wpda-navi-container-content-item-title-help"> |
| 293 |
<a |
| 294 |
href="https://docs.sql.wpdataaccess.com/" |
| 295 |
target="_blank" |
| 296 |
class="wpda_tooltip" |
| 297 |
title="View online SQL Query Builder Documentation" |
| 298 |
> |
| 299 |
<i class="fa-solid fa-question-circle wpda-icon-help"></i> |
| 300 |
</a> |
| 301 |
</div> |
| 302 |
</div> |
| 303 |
|
| 304 |
<div class="wpda-navi-container-content-item-slogan"> |
| 305 |
Execute any SQL command from your WordPress dashboard. |
| 306 |
</div> |
| 307 |
|
| 308 |
<div class="wpda-navi-container-content-item-content"> |
| 309 |
<ul> |
| 310 |
<li> |
| 311 |
<a href="?page=wpda_query_builder">Start SQL Query Builder</a> |
| 312 |
</li> |
| 313 |
</ul> |
| 314 |
</div> |
| 315 |
|
| 316 |
<div class="wpda-navi-container-content-item-facts"> |
| 317 |
<ul> |
| 318 |
<li>Write, store, execute and reuse any SQL command.</li> |
| 319 |
<li>Store queries privately or globally.</li> |
| 320 |
<li>Schedule SQL commands to run at specific intervals.</li> |
| 321 |
<li>Ask AI Assistant to help writing queries and solve errors.</li> |
| 322 |
<li>Build SQL queries visually with our Visual Query Builder.</li> |
| 323 |
</ul> |
| 324 |
</div> |
| 325 |
|
| 326 |
<div class="wpda-navi-container-content-item-facts"> |
| 327 |
<ul> |
| 328 |
<li> |
| 329 |
Old SQL Query Builder no longer available. |
| 330 |
</li> |
| 331 |
</ul> |
| 332 |
</div> |
| 333 |
</div> |
| 334 |
|
| 335 |
<div class="wpda-navi-container-content-item wpda-featured" |
| 336 |
style="grid-template-rows: auto 1fr" |
| 337 |
> |
| 338 |
<div class="wpda-navi-container-content-item-title"> |
| 339 |
<span class="fa-solid fa-comments wpda-icon"></span> |
| 340 |
<h3>What's new?</h3> |
| 341 |
<div class="wpda-navi-container-content-item-title-help"> |
| 342 |
<a |
| 343 |
href="https://wordpress.org/plugins/wp-data-access/#developers" |
| 344 |
target="_blank" |
| 345 |
class="wpda_tooltip" |
| 346 |
title="View full changelog" |
| 347 |
> |
| 348 |
<i class="fa-solid fa-question-circle wpda-icon-help"></i> |
| 349 |
</a> |
| 350 |
</div> |
| 351 |
</div> |
| 352 |
|
| 353 |
<div class="wpda-navi-container-content-item-facts whats-new"> |
| 354 |
<ul> |
| 355 |
<li> |
| 356 |
<a href="?page=wpda_navi-affiliation" class="whatsnew"> |
| 357 |
⭐⭐⭐ Affiliates Program ⭐⭐⭐<br/>Become our ambassador and earn on every referral. |
| 358 |
</a> |
| 359 |
</li> |
| 360 |
<li> |
| 361 |
<a href="https://docs.rad.wpdataaccess.com/table-builder/menu/columns/column-settings.html#%E2%9A%99%EF%B8%8F-pin-column-to" target="_blank" class="whatsnew"> |
| 362 |
Added column pinning to Table Builder. |
| 363 |
</a> |
| 364 |
</li> |
| 365 |
<li> |
| 366 |
<a href="https://docs.rad.wpdataaccess.com/table-builder/menu/columns/column-settings.html#%F0%9F%93%8C-notes" target="_blank" class="whatsnew"> |
| 367 |
Show hidden columns on tablets and mobiles. |
| 368 |
</a> |
| 369 |
</li> |
| 370 |
<li> |
| 371 |
<a href="https://docs.rad.wpdataaccess.com/app-manager/running-apps/progressive-web-apps.html" target="_blank" class="whatsnew"> |
| 372 |
Run a WP Data Access app as a Progressive Web App. ⭐⭐⭐ |
| 373 |
</a> |
| 374 |
</li> |
| 375 |
<li> |
| 376 |
<a href="https://docs.rad.wpdataaccess.com/running-apps.html#%E2%9C%8F%EF%B8%8F-using-the-gutenberg-block-editor" target="_blank" class="whatsnew"> |
| 377 |
Gutenberg block support for [wpda_app] shortcode. |
| 378 |
</a> |
| 379 |
</li> |
| 380 |
<li> |
| 381 |
<a href="https://docs.rad.wpdataaccess.com/table-builder/menu/table/column-filters.html" target="_blank" class="whatsnew"> |
| 382 |
Show column filters in popup. |
| 383 |
</a> |
| 384 |
</li> |
| 385 |
</ul> |
| 386 |
</div> |
| 387 |
|
| 388 |
<div class="wpda-navi-container-content-item-facts whats-new"> |
| 389 |
<h4 style="margin-top:0;margin-bottom:5px;font-weight:bold;">Now available to FREE USERS</h4> |
| 390 |
<ul> |
| 391 |
<li> |
| 392 |
<a href="https://docs.rad.wpdataaccess.com/table-builder/menu/table/css-table-editor.html" target="_blank" class="whatsnew"> |
| 393 |
CSS Table Editor |
| 394 |
</a> |
| 395 |
</li> |
| 396 |
<li> |
| 397 |
<a href="https://docs.rad.wpdataaccess.com/form-builder/menu/form/css-form-editor.html" target="_blank" class="whatsnew"> |
| 398 |
CSS Form Editor |
| 399 |
</a> |
| 400 |
</li> |
| 401 |
<li> |
| 402 |
<a href="https://docs.rad.wpdataaccess.com/table-builder/menu/columns/computed-fields.html" target="_blank" class="whatsnew"> |
| 403 |
Computed Text Fields |
| 404 |
</a> |
| 405 |
</li> |
| 406 |
<li> |
| 407 |
<a href="https://docs.sql.wpdataaccess.com/visual-query-builder.html" target="_blank" class="whatsnew"> |
| 408 |
Visual Query Builder |
| 409 |
</a> |
| 410 |
</li> |
| 411 |
</ul> |
| 412 |
</div> |
| 413 |
</div> |
| 414 |
</div> |
| 415 |
</div> |
| 416 |
<?php |
| 417 |
} |
| 418 |
|
| 419 |
} |
| 420 |
|
| 421 |
} |