PluginProbe ʕ •ᴥ•ʔ
Interactive Image Map Builder / trunk
Interactive Image Map Builder vtrunk
3.2 trunk 1.0 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9 2.0 2.1 2.2 2.3 2.4 2.5 2.6 2.7 2.8 2.9 3.0 3.1
interactive-image-map-builder / settings / save.php
interactive-image-map-builder / settings Last commit date
css 2 years ago add-point-html.php 10 months ago builder.php 2 years ago edit-point-html.php 10 months ago form.php 10 months ago how-to-use.php 2 years ago import-export-plugins.php 1 year ago nested-point.php 3 months ago plugin-settings.php 2 years ago save.php 2 years ago template-settings.php 10 months ago wpmart-plugins.php 2 years ago
save.php
38 lines
1 <?php
2 if (!empty($_POST['update_style_change']) && $_POST['update_style_change'] == 'Save' && $_POST['id'] != '') {
3 $nonce = $_REQUEST['_wpnonce'];
4 if (!wp_verify_nonce($nonce, 'isimb_6310_nonce_field_form')) {
5 die('You do not have sufficient permissions to access this pagess.');
6 } else {
7 $id = sanitize_text_field($_POST['id']);
8 $name = sanitize_text_field($_POST['name']);
9 $css = isimb_6310_extract_data($_POST);
10 if ($id) {
11 $wpdb->query($wpdb->prepare("UPDATE $style_table SET name = %s, css = %s WHERE id = %d", $name, $css, $id));
12 } else {
13 $wpdb->query($wpdb->prepare("INSERT into $style_table SET name = %s, css = %s", $name, $css));
14 $redirect_id = $wpdb->insert_id;
15 $url = admin_url("admin.php?page=isimb-6310-image-map-builder&action=preview&styleid=$redirect_id");
16 wp_register_script('isimb-6310-redirect-script', '');
17 wp_enqueue_script('isimb-6310-redirect-script');
18 wp_add_inline_script('isimb-6310-redirect-script', "document.location.href = '" . $url . "';");
19 }
20 }
21 }
22 $cssData = [];
23 if ($ids) {
24 $styledata = $wpdb->get_row($wpdb->prepare("SELECT * FROM $style_table WHERE id = %d ", $ids), ARRAY_A);
25 $css = explode("!!##!!", $styledata['css']);
26 $key = explode(",", $css[0]);
27 $value = explode("||##||", $css[1]);
28 $filterKey = [];
29 $filterValue = [];
30 for ($i = 0; $i < count($key); $i++) {
31 $filterKey[] = esc_attr($key[$i]);
32 }
33 for ($i = 0; $i < count($value); $i++) {
34 $filterValue[] = esc_attr($value[$i]);
35 }
36 $cssData = array_combine($filterKey, $filterValue);
37 }
38 $jsonData = isset($cssData['json_data']) ? json_decode(stripslashes(html_entity_decode($cssData['json_data']))) : [];