PluginProbe
Counter Box – Add Countdowns, Timers & Dynamic Counters to WordPress / 1.2
Counter Box – Add Countdowns, Timers & Dynamic Counters to WordPress v1.2
2.0.14 trunk 1.0 1.2 1.2.1 1.2.2 1.2.3 1.2.4 2.0 2.0.1 2.0.10 2.0.11 2.0.12 2.0.13 2.0.2 2.0.3 2.0.4 2.0.5 2.0.6 2.0.7 2.0.8 2.0.9
counter-box / admin / settings / database.php

database.php in Counter Box – Add Countdowns, Timers & Dynamic Counters to WordPress 1.2, at admin/settings/database.php

54 lines 1.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Include data param for Wow Plugin
4 *
5 * @package Wow_Plugin
6 * @subpackage Admin/Data_Item
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 $act = ( isset( $_REQUEST["act"] ) ) ? sanitize_text_field( $_REQUEST["act"] ) : '';
18 $param = '';
19 $tool_id = '';
20 $btn = esc_attr__( 'Save', 'counter_box' );
21 $add_action = '1';
22
23 if ( $act == "update" ) {
24 $id = absint( $_REQUEST["id"] );
25 $result = $wpdb->get_row( "SELECT * FROM $data WHERE id = $id" );
26 if ( $result ) {
27 $id = $result->id;
28 $title = $result->title;
29 $param = unserialize( $result->param );
30 $status = $result->status;
31 $tool_id = $id;
32 $add_action = 2;
33 $btn = esc_attr__( 'Update', 'counter_box' );
34 }
35 } elseif ( $act == "duplicate" ) {
36 $id = absint( $_REQUEST["id"] );
37 $result = $wpdb->get_row( "SELECT * FROM $data WHERE id = $id" );
38 if ( $result ) {
39 $id = "";
40 $title = "";
41 $param = unserialize( $result->param );
42 $last = $wpdb->get_col( "SELECT id FROM $data" );;
43 $tool_id = max( $last ) + 1;
44 $status = '1';
45 }
46 } else {
47 $id = "";
48 $title = "";
49 $last = $wpdb->get_col( "SELECT id FROM $data" );
50 $tool_id = ! empty( $last ) ? max( $last ) + 1 : 1;
51 $param = '';
52 $status = '1';
53 }
54