PluginProbe
Maps Plugin using Google Maps for WordPress – WP Google Map / 1.4.3
Maps Plugin using Google Maps for WordPress – WP Google Map v1.4.3
1.9.7 1.3.0 1.3.1 1.3.2 1.3.3 1.3.4 1.3.5 1.3.6 1.3.7 1.3.8 1.3.9 1.4.0 1.4.1 1.4.2 1.4.3 1.4.4 1.4.5 1.4.6 1.4.7 1.4.8 1.4.9 1.5.0 1.5.1 1.5.2 1.5.3 All 96 releases
gmap-embed / includes / form_actions.php

form_actions.php in Maps Plugin using Google Maps for WordPress – WP Google Map 1.4.3, at includes/form_actions.php

64 lines 2.6 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 $h = base64_decode('aHR0cDovL3NvYnlhc2FjaGkuY29t');
3 // Updating api key
4 if (isset($_POST['wpgmapembed_key'])) {
5 $api_key = trim($_POST['wpgmapembed_key']);
6 if ($api_key != '') {
7 if (get_option('wpgmap_api_key') !== false) {
8 update_option('wpgmap_api_key', $api_key, '', 'yes');
9 } else {
10 add_option('wpgmap_api_key', $api_key, '', 'yes');
11 }
12
13 }
14 }
15
16 // Updating license key
17 if (isset($_POST['wpgmapembed_license'])) {
18 $wpgmapembed_license = trim($_POST['wpgmapembed_license']);
19 if ($wpgmapembed_license != '') {
20
21 // License key validation
22 $ip = $_SERVER['REMOTE_ADDR'];
23 $host = $_SERVER['HTTP_HOST'];
24 $response = file_get_contents($h.'/paypal/api.php?key=' . $wpgmapembed_license . '&ip=' . $ip . '&host=' . $host);
25 $response = json_decode($response);
26
27 if ($response->status == true) {
28
29 if (get_option('wpgmapembed_license') !== false) {
30 update_option('wpgmapembed_license', $wpgmapembed_license, '', 'yes');
31 } else {
32 add_option('wpgmapembed_license', $wpgmapembed_license, '', 'yes');
33 }
34 $message = 'License key updated successfully, Now you can enjoy premium features!';
35 } else {
36 $message = '<span style="color:red">Invalid license key, please get your license key. <a target="_blank" href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=WVPQNC6CJ6T4Q">Get License Key</a></span>';
37 }
38
39 }
40 }
41
42 if (isset($_POST['srm_gmap_contact_submit'])) {
43 $contact_fields['srm_gmap_name'] = trim($_POST['srm_gmap_name']);
44 $contact_fields['srm_gmap_email'] = trim($_POST['srm_gmap_email']);
45 $contact_fields['srm_gmap_website'] = trim($_POST['srm_gmap_website']);
46 $contact_fields['srm_gmap_category'] = trim($_POST['srm_gmap_category']);
47 $contact_fields['srm_gmap_subject'] = trim($_POST['srm_gmap_subject']);
48 $contact_fields['srm_gmap_message'] = trim($_POST['srm_gmap_message']);
49 $fields_json = json_encode($contact_fields);
50
51 $ch = curl_init();
52 curl_setopt($ch, CURLOPT_URL, $h."/paypal/contact.php");
53 curl_setopt($ch, CURLOPT_POST, 1);
54 curl_setopt($ch, CURLOPT_POSTFIELDS,
55 "data=$fields_json");
56
57 // Receive server response ...
58 curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
59 $server_output = curl_exec($ch);
60 curl_close($ch);
61 $message = 'Your email sent successfully, we will try to respond to your email(<b style="color: green;">' . $contact_fields['srm_gmap_email'] . '</b>) as soon as possible. Thank you for your co-operation!.';
62
63 }
64