| 1 |
<?php |
| 2 |
/** |
| 3 |
* Database Result |
| 4 |
* |
| 5 |
* @package Wow Plugin |
| 6 |
* @subpackage Admin/Database_result |
| 7 |
* @author Dmytro Lobov <i@wpbiker.com> |
| 8 |
* @copyright 2019 Wow-Company |
| 9 |
* @license GNU Public License |
| 10 |
* @version 1.0 |
| 11 |
*/ |
| 12 |
|
| 13 |
if ( ! defined( 'ABSPATH' ) ) { |
| 14 |
exit; |
| 15 |
} |
| 16 |
|
| 17 |
global $wpdb; |
| 18 |
$data = $wpdb->prefix . 'wow_' . $this->plugin['prefix']; |
| 19 |
$info = ( isset( $_REQUEST['info'] ) ) ? sanitize_text_field( $_REQUEST['info'] ) : ''; |
| 20 |
if ( $info == 'saved' ) { |
| 21 |
$message_data = esc_attr__( 'Item Added', $this->plugin['text'] ); |
| 22 |
echo '<div class="updated" id="message"><p><strong>' . $message_data . '</strong>.</p></div>'; |
| 23 |
} elseif ( $info == 'update' ) { |
| 24 |
$message_data = esc_attr__( 'Item Updated', $this->plugin['text'] ); |
| 25 |
echo '<div class="updated" id="message"><p><strong>' . $message_data . '</strong>.</p></div>'; |
| 26 |
} elseif ( $info == 'delete' ) { |
| 27 |
$delid = absint( $_GET['did'] ); |
| 28 |
$wpdb->query( 'delete from ' . $data . ' where id=' . $delid ); |
| 29 |
self::delete_file( $delid ); |
| 30 |
$message_data = esc_attr__( 'Item Deleted', $this->plugin['text'] ); |
| 31 |
echo '<div class="updated" id="message"><p><strong>' . $message_data . '</strong>.</p></div>'; |
| 32 |
} |
| 33 |
|