PluginProbe
Maps Plugin using Google Maps for WordPress – WP Google Map / 1.5.2
Maps Plugin using Google Maps for WordPress – WP Google Map v1.5.2
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 / gmap.php

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

197 lines 8.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 if ( ! defined( 'ABSPATH' ) ) {
3 exit;
4 }
5 if ( isset( $_GET['page'] ) ) {
6
7 // Form actions like Settings, Contact
8 require_once( plugin_dir_path( __FILE__ ) . '/form_actions.php' );
9
10 $wpgmap_page = esc_html( $_GET['page'] );
11 $wpgmap_tag = '';
12 if ( isset( $_GET['tag'] ) ) {
13 $wpgmap_tag = esc_html( $_GET['tag'] );
14 }
15 ?>
16 <script type="text/javascript">
17 var wp_gmap_api_key = '<?php echo esc_html( get_option( 'wpgmap_api_key' ) );?>';
18 </script>
19 <div class="wrap">
20 <div id="gmap_container_inner">
21 <!--contents-->
22
23 <!-- Menu area-->
24 <div class="gmap_header_section">
25
26 <!-- Left area-->
27 <div class="gmap_header_section_left">
28 <ul id="wp-gmap-nav">
29 <li class="<?php echo ( $wpgmap_page == 'wpgmapembed' && $wpgmap_tag == '' ) ? 'active' : ''; ?>">
30 <a href="<?php echo admin_url(); ?>admin.php?page=wpgmapembed" data-id="wp-gmap-all"
31 class="media-menu-item"><?php _e( 'All Maps', 'gmap-embed' ); ?></a>
32 </li>
33 <li class="<?php echo $wpgmap_tag == 'new' ? 'active' : ''; ?>">
34 <a href="<?php echo esc_url( admin_url() . 'admin.php?page=wpgmapembed&tag=new' ); ?>"
35 data-id="wp-gmap-new"
36 class="media-menu-item"><?php _e( 'Create New Map', 'gmap-embed' ); ?></a>
37 </li>
38 <li class="<?php echo $wpgmap_tag == 'settings' ? 'active' : ''; ?>">
39 <a href="<?php echo esc_url( admin_url() . 'admin.php?page=wpgmapembed&tag=settings' ); ?>"
40 data-id="wp-gmap-settings"
41 class="media-menu-item"><?php _e( 'Settings', 'gmap-embed' ); ?></a>
42 </li>
43 <li class="<?php echo $wpgmap_tag == 'contact' ? 'active' : ''; ?>">
44 <a href="<?php echo esc_url( admin_url() . 'admin.php?page=wpgmapembed&tag=contact' ); ?>"
45 data-id="wp-gmap-settings"
46 class="media-menu-item"><?php _e( 'Having Problem?', 'gmap-embed' ); ?></a>
47 </li>
48 <li>
49 <a target="_blank" href="https://www.youtube.com/watch?v=FRBqfx_lB-Y"
50 class="media-menu-item">
51 <?php _e( 'See Video', 'gmap-embed' ); ?></a>
52 </li>
53 </ul>
54 </div>
55
56 <!-- Right Area-->
57 <div class="gmap_header_section_right">
58 <a class="gmap_donate_button"
59 href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=WVPQNC6CJ6T4Q">
60 <img alt="Donate"
61 src="<?php echo esc_url( plugins_url( "../assets/images/paypal.png", __FILE__ ) ); ?>"
62 width="150"/>
63 </a>
64
65 <?php
66 if ( strlen( trim( get_option( 'wpgmapembed_license' ) ) ) !== 32 ) { ?>
67 <a target="_blank"
68 href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&amp;hosted_button_id=WVPQNC6CJ6T4Q"
69 class="button media-button button-default button-large gmap_get_pro_version">
70 GET PRO VERSION
71 </a>
72 <?php
73 } else {
74 ?>
75 <img style="margin-left: 10px;"
76 src="<?php echo esc_url( plugins_url( "../assets/images/pro_version.png", __FILE__ ) ); ?>"
77 width="80"/>
78 <?php
79 }
80 ?>
81 <a onclick="window.open('https://tawk.to/chat/5ca5dea51de11b6e3b06dc41/default', 'LIVE CHAT', 'width=500,height=300')"
82 style="float: right;cursor: pointer;">
83 <img src="<?php echo esc_url( plugins_url( "../assets/images/live_chat.png", __FILE__ ) ); ?>"
84 width="110"/>
85 </a>
86 </div>
87 </div>
88
89 <div id="wp-gmap-tabs" style="float: left;width: 100%;">
90 <?php
91 if ( isset( $_GET['message'] ) ) {
92 ?>
93 <div class="message">
94 <div id="setting-error-settings_updated" class="updated settings-error notice is-dismissible">
95 <p>
96 <strong>
97 <?php
98 $message_status = $_GET['message'];
99 switch ( $message_status ) {
100 case 1:
101 echo __( 'Map has been created Successfully. <a href="https://youtu.be/aeiycD9m_ko?t=181" target="_blank"> See How to use >></a>', 'gmap-embed' );
102 break;
103 case 2:
104 echo __( 'Map Updated Successfully. <a href="https://youtu.be/aeiycD9m_ko?t=181" target="_blank"> See How to use >></a>', 'gmap-embed' );
105 break;
106 case 3:
107 echo __( 'Settings updated Successfully.', 'gmap-embed' );
108 break;
109 case 4:
110 echo __( $message, 'gmap-embed' );
111 break;
112 case - 1:
113 echo __( 'Map Deleted Successfully.', 'gmap-embed' );
114 break;
115 }
116 ?>
117 </strong>
118 </p>
119 <button type="button" class="notice-dismiss"><span class="screen-reader-text">Dismiss this notice.</span>
120 </button>
121 </div>
122 </div>
123 <?php
124 }
125 ?>
126 <?php
127 if ( get_option( 'wpgmap_api_key' ) == false ) {
128 require_once( plugin_dir_path( __FILE__ ) . '/wpgmap_settings.php' );
129 }
130 ?>
131 <!---------------------------Maps List-------------->
132 <?php
133 if ( $wpgmap_page == 'wpgmapembed' && $wpgmap_tag == '' ) {
134 ?>
135 <div class="wp-gmap-tab-content active" id="wp-gmap-all">
136 <?php
137 require_once( plugin_dir_path( __FILE__ ) . '/wpgmap_list.php' );
138 ?>
139 </div>
140 <?php
141 }
142 ?>
143 <!---------------------------Create New Map-------------->
144
145 <div
146 class="wp-gmap-tab-content <?php echo ( $_GET['page'] == 'wpgmapembed' && $_GET['tag'] == 'new' ) ? 'active' : ''; ?>"
147 id="wp-gmap-new">
148 <?php
149 if ( $wpgmap_page == 'wpgmapembed' && $wpgmap_tag == 'new' ) {
150 require_once( plugin_dir_path( __FILE__ ) . '/wpgmap_create.php' );
151 }
152 ?>
153 </div>
154
155 <!---------------------------Existing map update-------------->
156
157 <div
158 class="wp-gmap-tab-content <?php echo ( $wpgmap_page == 'wpgmapembed' && $wpgmap_tag == 'edit' ) ? 'active' : ''; ?>"
159 id="wp-gmap-edit">
160 <?php
161 if ( $wpgmap_page == 'wpgmapembed' && $wpgmap_tag == 'edit' ) {
162 require_once( plugin_dir_path( __FILE__ ) . '/wpgmap_edit.php' );
163 }
164 ?>
165 </div>
166
167 <!---------------------------Plugin Settings-------------->
168
169 <div
170 class="wp-gmap-tab-content <?php echo ( $wpgmap_page == 'wpgmapembed' && $wpgmap_tag == 'contact' ) ? 'active' : ''; ?>"
171 id="wp-gmap-contact">
172 <?php
173 if ( $wpgmap_page == 'wpgmapembed' && $wpgmap_tag == 'contact' ) {
174 require_once( plugin_dir_path( __FILE__ ) . '/wpgmap_contact.php' );
175 }
176 ?>
177 </div>
178
179 <!---------------------------Plugin Settings-------------->
180
181 <div
182 class="wp-gmap-tab-content <?php echo ( $wpgmap_page == 'wpgmapembed' && $wpgmap_tag == 'settings' ) ? 'active' : ''; ?>"
183 id="wp-gmap-settings">
184 <?php
185 if ( $wpgmap_page == 'wpgmapembed' && $wpgmap_tag == 'settings' ) {
186 require_once( plugin_dir_path( __FILE__ ) . '/wpgmap_settings.php' );
187 }
188 ?>
189 </div>
190
191
192 </div>
193 </div>
194 </div>
195 <?php
196 }
197 ?>