/**
     * Admin page settings
     */
    function AdminOptionsPage()
    {
        //Check if curl extension is set and curl_init method is callable
        $this->checkCurlExtension();
        $woocommerce = 'off';
        if (in_array('woocommerce/woocommerce.php', apply_filters('active_plugins', get_option('active_plugins')))) {
            $woocommerce = 'on';
        }
        $apikey = isset($_POST['api_key']) ? $_POST['api_key'] : get_option($this->GrOptionDbPrefix . 'api_key');
        if (!empty($apikey)) {
            $api = new GetResponseIntegration($apikey);
            // api errors
            $ping = $api->ping();
            if (is_array($ping) && isset($ping['type']) && $ping['type'] == 'error') {
                echo $ping['msg'];
                return;
            }
            if (isset($ping->result->ping)) {
                update_option($this->GrOptionDbPrefix . 'api_key', $apikey);
                // admin page settings
                if (isset($_POST['comment_campaign']) || isset($_POST['checkout_campaign'])) {
                    $post_fields = array('comment_campaign', 'checkout_campaign', 'comment_on', 'comment_label', 'comment_checked', 'checkout_checked', 'sync_order_data', 'fields_prefix', 'registration_campaign', 'registration_campaign', 'registration_on', 'registration_label', 'registration_checked');
                    foreach ($post_fields as $field) {
                        $val = isset($_POST[$field]) ? $_POST[$field] : null;
                        update_option($this->GrOptionDbPrefix . $field, $val);
                    }
                    // woocommerce settings
                    if ($woocommerce == 'on' and isset($_POST['checkout_on'])) {
                        update_option($this->GrOptionDbPrefix . 'checkout_on', $_POST['checkout_on']);
                        update_option($this->GrOptionDbPrefix . 'checkout_label', $_POST['checkout_label']);
                    }
                    ?>
					<div id="message" class="updated fade" style="margin: 2px; 0px; 0px;">
						<p><strong><?php 
                    _e('Settings saved', 'Gr_Integration');
                    ?>
</strong></p>
					</div>
					<?php 
                    // sync order data - custom fields
                    if (isset($_POST['custom_field'])) {
                        foreach ($this->biling_fields as $value => $bf) {
                            if (in_array($value, array_keys($_POST['custom_field'])) == true && preg_match('/^[_a-zA-Z0-9]{2,32}$/m', stripslashes($_POST['custom_field'][$value])) == true) {
                                update_option($this->GrOptionDbPrefix . $value, $_POST['custom_field'][$value]);
                            } else {
                                delete_option($this->GrOptionDbPrefix . $value);
                            }
                        }
                    } else {
                        foreach (array_keys($this->biling_fields) as $value) {
                            delete_option($this->GrOptionDbPrefix . $value);
                        }
                    }
                }
            } else {
                ?>
				<div id="message" class="error " style="margin: 2px; 0px; 0px;">
					<p><strong><?php 
                _e('Settings error', 'Gr_Integration');
                ?>
</strong> <?php 
                _e(' - Invalid API Key', 'Gr_Integration');
                ?>
</p>
				</div>
			<?php 
            }
        }
        if (isset($_POST['api_key']) and $_POST['api_key'] == '') {
            ?>
			<div id="message" class="error " style="margin: 2px; 0px; 0px;">
				<p><strong><?php 
            _e('Settings error', 'Gr_Integration');
            ?>
</strong> <?php 
            _e(' - API Key can\'t be empty.', 'Gr_Integration');
            ?>
</p>
			</div>
		<?php 
            update_option($this->GrOptionDbPrefix . 'api_key', $apikey);
        }
        ?>
		<!-- CONFIG BOX -->
			<div class="GR_config_box">
				<table class="wp-list-table widefat">
					<thead>
						<tr>
							<th><span class="GR_header"><?php 
        _e('GetResponse Plugin Settings', 'Gr_Integration');
        ?>
</span></th>
						</tr>
					</thead>
					<tbody id="the-list">
						<tr class="active" id="">
							<td class="desc">
								<form method="post" action="<?php 
        echo admin_url('options-general.php?page=' . $this->PluginName());
        ?>
">

									<!-- API KEY -->
									<p>
										<label class="GR_label" for="api_key"><?php 
        _e('API Key:', 'Gr_Integration');
        ?>
</label>
										<input class="GR_api" type="text" name="api_key" value="<?php 
        echo get_option($this->GrOptionDbPrefix . 'api_key');
        ?>
" />

										<a class="gr-tooltip">
											<span class="gr-tip" style="width:178px">
												<span>
													<?php 
        _e('Enter your API key. You can find it on your GetResponse profile in Account Details -> GetResponse API', 'Gr_Integration');
        ?>
												</span>
											</span>
										</a>
									</p>

									<!-- SUBMIT -->
									<br/>
									<input type="submit" name="Submit" value="<?php 
        _e('Save', 'Gr_Integration');
        ?>
"  class="button-primary" />

									<!-- WEBFORM SETTINGS -->
									<div id="settings" <?php 
        if (get_option($this->GrOptionDbPrefix . 'api_key') == '') {
            ?>
style="display: none;"<?php 
        }
        ?>
>
										<!-- SUBSCRIBE VIA WEB FORM -->
										<h3>
											<?php 
        _e('Subscribe via Web Form', 'Gr_Integration');
        ?>
										</h3>

										<p>
											<?php 
        _e('To activate a GetResponse Web Form widget drag it to a sidebar or click on it.', 'Gr_Integration');
        ?>
											<?php 
        echo '<a href="' . admin_url('widgets.php') . '"><strong>' . __('Go to Widgets site', 'Gr_Integration') . '</strong></a>';
        ?>
										</p>

										<!-- SUBSCRIPTION VIA COMMENT -->
										<h3>
											<?php 
        _e('Subscribe via Comment', 'Gr_Integration');
        ?>
										</h3>

										<!-- COMMENT INTEGRATION SWITCH ON/OFF -->
										<?php 
        $comment_type = get_option($this->GrOptionDbPrefix . 'comment_on');
        $registration_type = get_option($this->GrOptionDbPrefix . 'registration_on');
        ?>
										<p>
											<label class="GR_label" for="comment_on"><?php 
        _e('Comment integration:', 'Gr_Integration');
        ?>
</label>
											<select class="GR_select2" name="comment_on" id="comment_integration">
												<option value="0" <?php 
        selected($comment_type, 0);
        ?>
><?php 
        _e('Off', 'Gr_Integration');
        ?>
</option>
												<option value="1" <?php 
        selected($comment_type, 1);
        ?>
><?php 
        _e('On', 'Gr_Integration');
        ?>
</option>
											</select> <?php 
        _e('(allow subscriptions when visitors comment)', 'Gr_Integration');
        ?>
										</p>

										<?php 
        $comment_campaign = get_option($this->GrOptionDbPrefix . 'comment_campaign');
        $checkout_campaign = get_option($this->GrOptionDbPrefix . 'checkout_campaign');
        $registration_campaign = get_option($this->GrOptionDbPrefix . 'registration_campaign');
        // API Instance
        $api = $this->GetApiInstance();
        if ($api) {
            $campaigns = $api->getCampaigns();
        }
        ?>

										<div id="comment_show" <?php 
        if (get_option($this->GrOptionDbPrefix . 'comment_on') != 1) {
            ?>
style="display: none;"<?php 
        }
        ?>
>
											<!-- CAMPAIGN TARGET -->
											<p>
												<label class="GR_label"for="comment_campaign"><?php 
        _e('Target Campaign:', 'Gr_Integration');
        ?>
</label>
												<?php 
        // sort campaigns by name
        if (!empty($campaigns)) {
            $campaigns = $this->SortByKeyValue($campaigns, 'name');
        }
        // check if no errors
        if (!empty($campaigns) and false === (is_array($campaigns) and isset($campaigns['type']) and $campaigns['type'] == 'error')) {
            ?>
												<select name="comment_campaign" id="comment_campaign" class="GR_select">
													<?php 
            foreach ($campaigns as $campaign) {
                if (is_object($campaign)) {
                    echo '<option value="' . $campaign->id . '" id="' . $campaign->id . '"', $comment_campaign == $campaign->id ? ' selected="selected"' : '', '>', $campaign->name, '</option>';
                }
            }
            ?>
												</select>
												<?php 
        } else {
            _e('No Campaigns.', 'Gr_Integration');
        }
        ?>
											</p>

											<!-- ADDITIONAL TEXT - COMMENT SUBSCRIPTION-->
											<p>
												<label class="GR_label" for="comment_label"><?php 
        _e('Additional text:', 'Gr_Integration');
        ?>
</label>
												<input class="GR_input2" type="text" name="comment_label" value="<?php 
        echo get_option($this->GrOptionDbPrefix . 'comment_label', __('Sign up to our newsletter!', 'Gr_Integration'));
        ?>
" />
											</p>

											<!-- DEFAULT CHECKED - COMMENT SUBSCRIPTION -->
											<p>
												<label class="GR_label" for="comment_checked"><?php 
        _e('Subscribe checkbox checked by default', 'Gr_Integration');
        ?>
</label>
												<input class="GR_checkbox" type="checkbox" name="comment_checked" value="1" <?php 
        if (get_option($this->GrOptionDbPrefix . 'comment_checked', '') == 1) {
            ?>
checked="checked"<?php 
        }
        ?>
/>
											</p>
										</div>

										<script>
											jQuery('#comment_integration').change(function() {
												var value = jQuery(this).val();
												if (value == '1') {
													jQuery('#comment_show').show('slow');
												}
												else {
													jQuery('#comment_show').hide('slow');
												}
											});
										</script>

										<!-- SUBSCRIBE VIA REGISTRATION PAGE-->
										<h3>
											<?php 
        _e('Subscribe via Registration Page', 'Gr_Integration');
        ?>
										</h3>

										<p>
											<label class="GR_label" for="registration_on"><?php 
        _e('Registration integration:', 'Gr_Integration');
        ?>
</label>
											<select class="GR_select2" name="registration_on" id="registration_integration">
												<option value="0" <?php 
        selected($registration_type, 0);
        ?>
><?php 
        _e('Off', 'Gr_Integration');
        ?>
</option>
												<option value="1" <?php 
        selected($registration_type, 1);
        ?>
><?php 
        _e('On', 'Gr_Integration');
        ?>
</option>
											</select> <?php 
        _e('(allow subscriptions at the registration page)', 'Gr_Integration');
        ?>
										</p>

										<div id="registration_show" <?php 
        if (get_option($this->GrOptionDbPrefix . 'registration_on') != 1) {
            ?>
style="display: none;"<?php 
        }
        ?>
>
											<!-- CAMPAIGN TARGET -->
											<p>
												<label class="GR_label"for="registration_campaign"><?php 
        _e('Target Campaign:', 'Gr_Integration');
        ?>
</label>
												<?php 
        // check if no errors
        if (!empty($campaigns) and false === (is_array($campaigns) and isset($campaigns['type']) and $campaigns['type'] == 'error')) {
            ?>
													<select name="registration_campaign" id="registration_campaign" class="GR_select">
														<?php 
            foreach ($campaigns as $campaign) {
                echo '<option value="' . $campaign->id . '" id="' . $campaign->id . '"', $registration_campaign == $campaign->id ? ' selected="selected"' : '', '>', $campaign->name, '</option>';
            }
            ?>
													</select>
												<?php 
        } else {
            _e('No Campaigns.', 'Gr_Integration');
        }
        ?>
											</p>

											<!-- ADDITIONAL TEXT - REGISTRATION SUBSCRIPTION-->
											<p>
												<label class="GR_label" for="registration_label"><?php 
        _e('Additional text:', 'Gr_Integration');
        ?>
</label>
												<input class="GR_input2" type="text" name="registration_label" value="<?php 
        echo get_option($this->GrOptionDbPrefix . 'registration_label', __('Sign up to our newsletter!', 'Gr_Integration'));
        ?>
" />
											</p>

											<!-- DEFAULT CHECKED - REGISTRATION SUBSCRIPTION -->
											<p>
												<label class="GR_label" for="registration_checked"><?php 
        _e('Subscribe checkbox checked by default', 'Gr_Integration');
        ?>
</label>
												<input class="GR_checkbox" type="checkbox" name="registration_checked" value="1" <?php 
        if (get_option($this->GrOptionDbPrefix . 'registration_checked', '') == 1) {
            ?>
checked="checked"<?php 
        }
        ?>
/>
											</p>
										</div>

										<script>
											jQuery('#registration_integration').change(function() {
												var value = jQuery(this).val();
												if (value == '1') {
													jQuery('#registration_show').show('slow');
												}
												else {
													jQuery('#registration_show').hide('slow');
												}
											});
										</script>

										<!-- SUBSCRIPTION VIA CHECKOUT PAGE -->
										<?php 
        if ($woocommerce == 'on') {
            $checkout_type = get_option($this->GrOptionDbPrefix . 'checkout_on');
            ?>
											<h3><?php 
            _e('Subscribe via Checkout Page', 'Gr_Integration');
            ?>
</h3>

											<!-- CHECKOUT INTEGRATION SWITCH ON/OFF -->
											<p>
												<label class="GR_label" for="checkout_on"><?php 
            _e('Checkout integration:', 'Gr_Integration');
            ?>
</label>
												<select class="GR_select2" name="checkout_on" id="checkout_integration">
													<option value="0" <?php 
            selected($checkout_type, 0);
            ?>
><?php 
            _e('Off', 'Gr_Integration');
            ?>
</option>
													<option value="1" <?php 
            selected($checkout_type, 1);
            ?>
><?php 
            _e('On', 'Gr_Integration');
            ?>
</option>
												</select> <?php 
            _e('(allow subscriptions at the checkout stage)', 'Gr_Integration');
            ?>
<br />
											</p>

											<div id="checkout_show" <?php 
            if (get_option($this->GrOptionDbPrefix . 'checkout_on') == 0) {
                ?>
style="display: none;"<?php 
            }
            ?>
>
												<!-- CAMPAIGN TARGET -->
												<p>
													<label class="GR_label" for="checkout_campaign"><?php 
            _e('Target campaign:', 'Gr_Integration');
            ?>
</label>

													<?php 
            // check if no errors
            if (!empty($campaigns) and false === (is_array($campaigns) and isset($campaigns['type']) and $campaigns['type'] == 'error')) {
                ?>
														<select name="checkout_campaign" id="checkout_campaign" class="GR_select">
															<?php 
                foreach ($campaigns as $campaign) {
                    echo '<option value="' . $campaign->id . '" id="' . $campaign->id . '"', $checkout_campaign == $campaign->id ? ' selected="selected"' : '', '>', $campaign->name, '</option>';
                }
                ?>
														</select>
													<?php 
            } else {
                _e('No Campaigns.', 'Gr_Integration');
            }
            ?>
												</p>

												<!-- ADDITIONAL TEXT - CHECKOUT SUBSCRIPTION -->
												<p>
													<label class="GR_label" for="comment_label"><?php 
            _e('Additional text:', 'Gr_Integration');
            ?>
</label>
													<input class="GR_input2" type="text" name="checkout_label" value="<?php 
            echo get_option($this->GrOptionDbPrefix . 'checkout_label', __('Sign up to our newsletter!', 'Gr_Integration'));
            ?>
" />
												</p>

												<!-- DEFAULT CHECKED - CHECKOUT SUBSCRIPTION -->
												<p>
													<label class="GR_label" for="checkout_checked"><?php 
            _e('Sign up box checked by default', 'Gr_Integration');
            ?>
</label>
													<input class="GR_checkbox" type="checkbox" name="checkout_checked" value="1" <?php 
            if (get_option($this->GrOptionDbPrefix . 'checkout_checked', '') == 1) {
                ?>
checked="checked"<?php 
            }
            ?>
/>
												</p>

												<!-- SYNC ORDER DATA - CHECKOUT SUBSCRIPTION -->
												<p>
													<label class="GR_label" for="sync_order_data"><?php 
            _e('Map custom fields:', 'Gr_Integration');
            ?>
</label>
													<input class="GR_checkbox" type="checkbox" name="sync_order_data" id="sync_order_data" value="1" <?php 
            if (get_option($this->GrOptionDbPrefix . 'sync_order_data', '') == 1) {
                ?>
checked="checked"<?php 
            }
            ?>
/>

													<a class="gr-tooltip">
														<span class="gr-tip" style="width:170px">
															<span>
																<?php 
            _e('Check to update customer details. Each input can be max. 32 characters and include lowercase, a-z letters, digits or underscores. Incorrect or empty entries won’t be added.', 'Gr_Integration');
            ?>
															</span>
														</span>
													</a>
												</p>

												<!-- CUSTOM FIELDS PREFIX - CHECKOUT SUBSCRIPTION -->
												<div id="customNameFields" style="display: none;">
													<div class="gr-custom-field" style="padding-left: 150px;">
														<select class="jsNarrowSelect" name="custom_field" multiple="multiple">
															<?php 
            foreach ($this->biling_fields as $value => $filed) {
                $custom = get_option($this->GrOptionDbPrefix . $value);
                $field_name = $custom ? $custom : $filed['name'];
                echo '<option data-inputvalue="' . $field_name . '" value="' . $value . '" id="' . $filed['value'] . '"', $filed['default'] == 'yes' || $custom ? ' selected="selected"' : '', $filed['default'] == 'yes' ? ' disabled="disabled"' : '', '>', $filed['name'], '</option>';
            }
            ?>
														</select>
													</div>
												</div>
											</div>

											<script>
												jQuery('#checkout_integration').change(function() {
													var value = jQuery(this).val();
													if (value == '1') {
														jQuery('#checkout_show').show();
													}
													else {
														jQuery('#checkout_show').hide();
													}
												});

												var sod = jQuery('#sync_order_data'), cfp = jQuery('#customNameFields');
												if (sod.prop('checked') == true) {
													cfp.show();
												}
												sod.change(function() {
													cfp.toggle('slow');
												});

												jQuery('.jsNarrowSelect').selectNarrowDown();
											</script>

											<?php 
        }
        ?>

										<!-- SUBMIT -->
										<input type="submit" name="Submit" value="<?php 
        _e('Save', 'Gr_Integration');
        ?>
" class="button-primary" />

										<!-- WEB FORM SHORTCODE -->
										<h3><?php 
        _e('Web Form Shortcode', 'Gr_Integration');
        ?>
</h3>
										<p><?php 
        _e('With the GetResponse Wordpress plugin, you can use shortcodes to place web forms in blog posts. Simply place the following tag in your post wherever you want the web form to appear:', 'Gr_Integration');
        ?>
											<br/>
											<code>[grwebform url="PUT_WEBFORM_URL_HERE" css="on/off"].</code>
											<br/>
											<?php 
        _e('Set the CSS parameter to ON, and the web form will be displayed in GetResponse format; set it to OFF, and the web form will be displayed in the standard Wordpress format.', 'Gr_Integration');
        ?>
										</p>
										<div class="GR_img_webform_shortcode"></div>
									</div>
								</form>
							</td>
						</tr>
					</tbody>
				</table>
			</div>			
		<!-- RSS BOX -->	
			<div class="GR_rss_box">
				<table class="wp-list-table widefat">
					<thead>
						<tr>
							<th>GetResponse RSS</th>
						</tr>
					</thead>
					<tbody id="the-list2">
						<tr class="active" id="">
							<td class="desc">
						<?php 
        $this->GrRss();
        ?>
							</td>
						</tr>
					</tbody>
				</table>
		<!-- SOCIAL BOX -->	
			<br />				
				<table class="wp-list-table widefat">
					<thead>
						<tr>
							<th>GetResponse Social</th>
						</tr>
					</thead>
					<tbody id="the-list2">
						<tr class="active" id="">
							<td class="desc">
							  <ul>
								<li>
								  <a class="GR_ico sprite facebook-ico" href="http://www.facebook.com/getresponse" target="_blank" title="Facebook">Facebook</a>
								</li>
								<li>
								  <a class="GR_ico sprite twitter-ico" href="http://twitter.com/getresponse" target="_blank" title="Twitter">Twitter</a>
								</li>
								<li>
								  <a class="GR_ico sprite linkedin-ico" href="http://www.linkedin.com/company/implix" target="_blank" title="LinkedIn">LinkedIn</a>
								</li>
								<li>
								  <a class="GR_ico sprite blog-ico" href="http://blog.getresponse.com/" target="_blank" title="Blog">Blog</a>
								</li>
							  </ul>
							</td>
						</tr>
					</tbody>
				</table>
			</div>		
		<?php 
    }
    /**
     * Admin page settings
     */
    function AdminOptionsPage()
    {
        //Check if curl extension is set and curl_init method is callable
        $this->checkCurlExtension();
        $apikey = isset($_POST['api_key']) ? $_POST['api_key'] : get_option($this->GrOptionDbPrefix . 'api_key');
        if ($_SERVER['REQUEST_METHOD'] == 'POST') {
            $getresponse_360_account = isset($_POST['getresponse_360_account']) ? $_POST['getresponse_360_account'] : null;
        } else {
            $getresponse_360_account = get_option($this->GrOptionDbPrefix . 'getresponse_360_account');
        }
        if (isset($getresponse_360_account)) {
            $api_url = isset($_POST['api_url']) ? $_POST['api_url'] : get_option($this->GrOptionDbPrefix . 'api_url');
            $api_domain = isset($_POST['api_domain']) ? $_POST['api_domain'] : get_option($this->GrOptionDbPrefix . 'api_domain');
            if (!empty($api_domain)) {
                $url_data = parse_url($api_url);
                $this->traceroute_host = $url_data['host'];
            }
        }
        if (!empty($apikey) && !isset($_GET['error'])) {
            $api = new GetResponseIntegration($apikey, $api_url, $api_domain);
            // api errors
            $ping = $api->ping();
            $ping_to_array = (array) $ping;
            $invalid_apikey = empty($ping_to_array) || isset($ping->code) && $ping->code == $this->invalid_apikey_code ? true : false;
            if ($api->http_status != $this->success_api_code && $invalid_apikey == false) {
                ?>
				<div class="GR_config_box">
					<table class="wp-list-table widefat">
						<thead>
						<tr>
							<th>
								<span class="GR_header"><?php 
                _e('GetResponse Plugin - API Error', 'Gr_Integration');
                ?>
</span>
							</th>
						</tr>
						</thead>
						<tbody id="the-list">
						<tr class="active" id="">
							<td class="desc">
								<?php 
                _e('Oops there was a problem connecting to the GetResponse API server.', 'Gr_Integration');
                ?>
								<br/><br/>
								<?php 
                _e('Error code/message:', 'Gr_Integration');
                ?>
								<blockquote>
									<code><?php 
                echo !empty($ping->message) ? $ping->message : $api->http_status;
                ?>
</code>
								</blockquote>
								<?php 
                _e('Traceroute result:', 'Gr_Integration');
                ?>
								<blockquote>
									<div class="GR_traceroute" id="GrTraceroutResult">
										<img src="images/loading.gif"/>
										<?php 
                _e('Receiving data, please be patient...', 'Gr_Integration');
                ?>
									</div>
								</blockquote>
								<br/>
								<?php 
                _e('Please', 'Gr_Integration');
                ?>
								<?php 
                echo '<a href="' . $this->contact_form_url . '" target="_blank"><strong>' . __('CONTACT US', 'Gr_Integration') . '</strong></a>';
                ?>
								<?php 
                _e('and send error code/message and traceroute result.', 'Gr_Integration');
                ?>
								<br/><br/><br/>
								<a href="<?php 
                echo 'options-general.php?page=' . $this->PluginName();
                ?>
&error=1"><?php 
                _e('Back to GetResponse Plugin site', 'Gr_Integration');
                ?>
</a>
							</td>
						</tr>
						</tbody>
					</table>
				</div>
				<script>
					jQuery(document).ready(function ($) {
						$.ajax({
							url: 'admin-ajax.php',
							data: {
								'action': 'gr-traceroute-submit'
							},
							success: function (response) {
								$('#GrTraceroutResult').html(response.success);
							},
							error: function (errorThrown) {
								$('#GrTraceroutResult').html(errorThrown);
							}
						});
					});
				</script>
				<?php 
                return;
            }
            if ($invalid_apikey == false && isset($ping->accountId)) {
                update_option($this->GrOptionDbPrefix . 'api_key', $apikey);
                update_option($this->GrOptionDbPrefix . 'getresponse_360_account', $getresponse_360_account);
                if ($getresponse_360_account == 0) {
                    unset($api_url);
                    unset($api_domain);
                }
                update_option($this->GrOptionDbPrefix . 'api_url', $api_url);
                update_option($this->GrOptionDbPrefix . 'api_domain', $api_domain);
                $this->grApiInstance = $this->GetApiInstance();
                // admin page settings
                if (isset($_POST['comment_campaign']) || isset($_POST['checkout_campaign'])) {
                    $post_fields = array('comment_campaign', 'checkout_campaign', 'comment_on', 'comment_label', 'comment_checked', 'checkout_checked', 'sync_order_data', 'fields_prefix', 'registration_campaign', 'registration_on', 'registration_label', 'registration_checked', 'bp_registration_campaign', 'bp_registration_checked');
                    foreach ($post_fields as $field) {
                        $val = isset($_POST[$field]) ? $_POST[$field] : null;
                        update_option($this->GrOptionDbPrefix . $field, $val);
                    }
                    // woocommerce settings
                    if ($this->woocomerce_active === true and isset($_POST['checkout_on'])) {
                        update_option($this->GrOptionDbPrefix . 'checkout_on', $_POST['checkout_on']);
                        update_option($this->GrOptionDbPrefix . 'checkout_label', $_POST['checkout_label']);
                    }
                    // buddypress settings
                    if ($this->buddypress_active === true and isset($_POST['bp_registration_on'])) {
                        update_option($this->GrOptionDbPrefix . 'bp_registration_on', $_POST['bp_registration_on']);
                        update_option($this->GrOptionDbPrefix . 'bp_registration_label', $_POST['bp_registration_label']);
                    }
                    ?>
					<div id="message" class="updated fade" style="margin: 2px; 0px; 0px;">
						<p><strong><?php 
                    _e('Settings saved', 'Gr_Integration');
                    ?>
</strong></p>
					</div>
					<?php 
                    // sync order data - custom fields
                    if (isset($_POST['custom_field'])) {
                        foreach ($this->biling_fields as $value => $bf) {
                            if (in_array($value, array_keys($_POST['custom_field'])) == true && preg_match('/^[_a-zA-Z0-9]{2,32}$/m', stripslashes($_POST['custom_field'][$value])) == true) {
                                update_option($this->GrOptionDbPrefix . $value, $_POST['custom_field'][$value]);
                            } else {
                                delete_option($this->GrOptionDbPrefix . $value);
                            }
                        }
                    } else {
                        foreach (array_keys($this->biling_fields) as $value) {
                            delete_option($this->GrOptionDbPrefix . $value);
                        }
                    }
                }
            } else {
                ?>
				<div id="message" class="error " style="margin: 2px; 0px; 0px;">
					<p>
						<strong><?php 
                _e('Settings error', 'Gr_Integration');
                ?>
</strong> <?php 
                _e(' - Invalid API Key', 'Gr_Integration');
                ?>
					</p>
				</div>
				<?php 
            }
        }
        if (isset($_POST['api_key']) and $_POST['api_key'] == '') {
            ?>
			<div id="message" class="error " style="margin: 2px; 0px; 0px;">
				<p>
					<strong><?php 
            _e('Settings error', 'Gr_Integration');
            ?>
</strong> <?php 
            _e(' - API Key can\'t be empty.', 'Gr_Integration');
            ?>
				</p>
			</div>
			<?php 
            update_option($this->GrOptionDbPrefix . 'api_key', $apikey);
            update_option($this->GrOptionDbPrefix . 'getresponse_360_account', $getresponse_360_account);
            update_option($this->GrOptionDbPrefix . 'api_url', $api_url);
            update_option($this->GrOptionDbPrefix . 'api_domain', $api_domain);
        }
        ?>
		<!-- CONFIG BOX -->
		<div class="GR_config_box">
			<table class="wp-list-table widefat">
				<thead>
				<tr>
					<th><span class="GR_header"><?php 
        _e('GetResponse Plugin Settings', 'Gr_Integration');
        ?>
</span>
					</th>
				</tr>
				</thead>
				<tbody id="the-list">

				<tr>
					<td>
						<span style="margin-top: 0px; color: #b81c23;">
							<?php 
        _e('The new GetResponse Forms are now available! Enjoy a new era of growing your list, but be patient if any issues with the WordPress Plugin may occur during the BETA phase. We’re polishing it as we speak!');
        ?>
						</span>
					</td>
				</tr>

				<tr class="active" id="">
					<td class="desc">
						<form method="post"
						      action="<?php 
        echo admin_url('options-general.php?page=' . $this->PluginName());
        ?>
">

							<!-- API KEY -->
							<p>
								<label class="GR_label" for="api_key"><?php 
        _e('API Key:', 'Gr_Integration');
        ?>
</label>
								<input class="GR_api" type="text" name="api_key"
								       value="<?php 
        echo get_option($this->GrOptionDbPrefix . 'api_key');
        ?>
"/>

								<a class="gr-tooltip">
											<span class="gr-tip" style="width:178px">
												<span>
													<?php 
        _e('Enter your API key. You can find it on your GetResponse profile in Account Details -> GetResponse API', 'Gr_Integration');
        ?>
												</span>
											</span>
								</a>
							</p>

							<!-- GetResponse 360 -->
							<p>
								<label class="GR_label" for="api_key"><?php 
        _e('GetResponse 360:', 'Gr_Integration');
        ?>
</label>
								<input class="GR_checkbox" type="checkbox" name="getresponse_360_account" id="getresponse_360_account" value="1"
									   <?php 
        if (get_option($this->GrOptionDbPrefix . 'getresponse_360_account', '') == 1) {
            ?>
checked="checked"<?php 
        }
        ?>
/>

								<a class="gr-tooltip">
									<span class="gr-tip" style="width:278px">
										<span>
											<?php 
        _e('For GetResponse 360 accounts', 'Gr_Integration');
        ?>
										</span>
									</span>
								</a>
							</p>

							<div id="getresponse_360_account_options"
								 <?php 
        if (get_option($this->GrOptionDbPrefix . 'getresponse_360_account') == 0) {
            ?>
style="display: none;"<?php 
        }
        ?>
>

								<p style="font-style: italic;">*This data is available from your account manager.</p>

								<p>
									<label class="GR_label"
										   for="api_url"><?php 
        _e('Type:', 'Gr_Integration');
        ?>
</label>
									<select class="" name="api_url" id="api_url">
										<option
											value="<?php 
        echo $this->api_url_360_pl;
        ?>
" <?php 
        selected(get_option($this->GrOptionDbPrefix . 'api_url'), $this->api_url_360_pl);
        ?>
><?php 
        _e('GetResponse360 PL', 'Gr_Integration');
        ?>
</option>
										<option
											value="<?php 
        echo $this->api_url_360_com;
        ?>
" <?php 
        selected(get_option($this->GrOptionDbPrefix . 'api_url'), $this->api_url_360_com);
        ?>
><?php 
        _e('GetResponse360 COM', 'Gr_Integration');
        ?>
</option>
									</select>
								</p>

								<!-- Domain -->
								<p>
									<label class="GR_label" for="api_domain"><?php 
        _e('Domain:', 'Gr_Integration');
        ?>
</label>
									<input class="GR_api" type="text" name="api_domain"
										   value="<?php 
        echo get_option($this->GrOptionDbPrefix . 'api_domain');
        ?>
"/>

									<a class="gr-tooltip">
											<span class="gr-tip" style="width:178px">
												<span>
													<?php 
        _e('Enter your domain without protocol http:// eg: "yourdomainname.com"', 'Gr_Integration');
        ?>
												</span>
											</span>
									</a>
								</p>

							</div>

							<!-- SUBMIT -->
							<?php 
        if (get_option($this->GrOptionDbPrefix . 'api_key') == '') {
            ?>
								<input id="gr_primary_submit" type="submit" name="Submit"
								       value="<?php 
            _e('Save', 'Gr_Integration');
            ?>
" class="button-primary"/>
							<?php 
        }
        ?>
							<!-- WEBFORM SETTINGS -->
							<div id="settings" <?php 
        if (get_option($this->GrOptionDbPrefix . 'api_key') == '') {
            ?>
style="display: none;"<?php 
        }
        ?>
>
								<!-- SUBSCRIBE VIA WEB FORM -->
								<h3>
									<?php 
        _e('Subscribe via Web Form', 'Gr_Integration');
        ?>
								</h3>

								<p>
									<?php 
        _e('To activate a GetResponse Web Form widget drag it to a sidebar or click on it.', 'Gr_Integration');
        ?>
									<?php 
        echo '<a href="' . admin_url('widgets.php') . '"><strong>' . __('Go to Widgets site', 'Gr_Integration') . '</strong></a>';
        ?>
								</p>

								<!-- SUBSCRIPTION VIA COMMENT -->
								<h3>
									<?php 
        _e('Subscribe via Comment', 'Gr_Integration');
        ?>
								</h3>

								<!-- COMMENT INTEGRATION SWITCH ON/OFF -->
								<?php 
        $comment_type = get_option($this->GrOptionDbPrefix . 'comment_on');
        $registration_type = get_option($this->GrOptionDbPrefix . 'registration_on');
        $bp_registration_type = get_option($this->GrOptionDbPrefix . 'bp_registration_on');
        ?>
								<p>
									<label class="GR_label"
									       for="comment_on"><?php 
        _e('Comment integration:', 'Gr_Integration');
        ?>
</label>
									<select class="GR_select2" name="comment_on" id="comment_integration">
										<option
											value="0" <?php 
        selected($comment_type, 0);
        ?>
><?php 
        _e('Off', 'Gr_Integration');
        ?>
</option>
										<option
											value="1" <?php 
        selected($comment_type, 1);
        ?>
><?php 
        _e('On', 'Gr_Integration');
        ?>
</option>
									</select> <?php 
        _e('(allow subscriptions when visitors comment)', 'Gr_Integration');
        ?>
								</p>

								<?php 
        $comment_campaign = get_option($this->GrOptionDbPrefix . 'comment_campaign');
        $checkout_campaign = get_option($this->GrOptionDbPrefix . 'checkout_campaign');
        $registration_campaign = get_option($this->GrOptionDbPrefix . 'registration_campaign');
        $bp_registration_campaign = get_option($this->GrOptionDbPrefix . 'bp_registration_campaign');
        if ($this->grApiInstance) {
            $campaigns = $this->grApiInstance->getCampaigns(array('sort' => array('name' => 'asc')));
        }
        ?>

								<div id="comment_show"
								     <?php 
        if (get_option($this->GrOptionDbPrefix . 'comment_on') != 1) {
            ?>
style="display: none;"<?php 
        }
        ?>
>
									<!-- CAMPAIGN TARGET -->
									<p>
										<label class="GR_label"
										       for="comment_campaign"><?php 
        _e('Target Campaign:', 'Gr_Integration');
        ?>
</label>
										<?php 
        // check if no errors
        $this->returnCampaignSelector($campaigns, $comment_campaign, 'comment_campaign');
        ?>
									</p>

									<!-- ADDITIONAL TEXT - COMMENT SUBSCRIPTION-->
									<p>
										<label class="GR_label"
										       for="comment_label"><?php 
        _e('Additional text:', 'Gr_Integration');
        ?>
</label>
										<input class="GR_input2" type="text" name="comment_label"
										       value="<?php 
        echo get_option($this->GrOptionDbPrefix . 'comment_label', __('Sign up to our newsletter!', 'Gr_Integration'));
        ?>
"/>
									</p>

									<!-- DEFAULT CHECKED - COMMENT SUBSCRIPTION -->
									<p>
										<label class="GR_label"
										       for="comment_checked"><?php 
        _e('Subscribe checkbox checked by default', 'Gr_Integration');
        ?>
</label>
										<input class="GR_checkbox" type="checkbox" name="comment_checked" value="1"
										       <?php 
        if (get_option($this->GrOptionDbPrefix . 'comment_checked', '') == 1) {
            ?>
checked="checked"<?php 
        }
        ?>
/>
									</p>
								</div>

								<script>
									jQuery('#comment_integration').change(function () {
										var value = jQuery(this).val();
										if (value == '1') {
											jQuery('#comment_show').show('slow');
										}
										else {
											jQuery('#comment_show').hide('slow');
										}
									});
								</script>

								<!-- SUBSCRIBE VIA REGISTRATION PAGE-->
								<h3>
									<?php 
        _e('Subscribe via Registration Page', 'Gr_Integration');
        ?>
								</h3>

								<p>
									<label class="GR_label"
									       for="registration_on"><?php 
        _e('Registration integration:', 'Gr_Integration');
        ?>
</label>
									<select class="GR_select2" name="registration_on" id="registration_integration">
										<option
											value="0" <?php 
        selected($registration_type, 0);
        ?>
><?php 
        _e('Off', 'Gr_Integration');
        ?>
</option>
										<option
											value="1" <?php 
        selected($registration_type, 1);
        ?>
><?php 
        _e('On', 'Gr_Integration');
        ?>
</option>
									</select> <?php 
        _e('(allow subscriptions at the registration page)', 'Gr_Integration');
        ?>
								</p>

								<div id="registration_show"
								     <?php 
        if (get_option($this->GrOptionDbPrefix . 'registration_on') != 1) {
            ?>
style="display: none;"<?php 
        }
        ?>
>
									<!-- CAMPAIGN TARGET -->
									<p>
										<label class="GR_label"
										       for="registration_campaign"><?php 
        _e('Target Campaign:', 'Gr_Integration');
        ?>
</label>
										<?php 
        $this->returnCampaignSelector($campaigns, $registration_campaign, 'registration_campaign');
        ?>
									</p>

									<!-- ADDITIONAL TEXT - REGISTRATION SUBSCRIPTION-->
									<p>
										<label class="GR_label"
										       for="registration_label"><?php 
        _e('Additional text:', 'Gr_Integration');
        ?>
</label>
										<input class="GR_input2" type="text" name="registration_label"
										       value="<?php 
        echo get_option($this->GrOptionDbPrefix . 'registration_label', __('Sign up to our newsletter!', 'Gr_Integration'));
        ?>
"/>
									</p>

									<!-- DEFAULT CHECKED - REGISTRATION SUBSCRIPTION -->
									<p>
										<label class="GR_label"
										       for="registration_checked"><?php 
        _e('Subscribe checkbox checked by default', 'Gr_Integration');
        ?>
</label>
										<input class="GR_checkbox" type="checkbox" name="registration_checked" value="1"
										       <?php 
        if (get_option($this->GrOptionDbPrefix . 'registration_checked', '') == 1) {
            ?>
checked="checked"<?php 
        }
        ?>
/>
									</p>
								</div>

								<script>
									jQuery('#registration_integration').change(function () {
										var value = jQuery(this).val();
										if (value == '1') {
											jQuery('#registration_show').show('slow');
										}
										else {
											jQuery('#registration_show').hide('slow');
										}
									});
								</script>

								<!-- SUBSCRIBE VIA BUDDYPRESS REGISTRATION PAGE-->
								<?php 
        if ($this->buddypress_active === true) {
            ?>
									<h3>
										<?php 
            _e('Subscribe via BuddyPress Registration Page', 'Gr_Integration');
            ?>
									</h3>

									<p>
										<label class="GR_label"
										       for="bp_registration_integration"><?php 
            _e('Registration integration:', 'Gr_Integration');
            ?>
</label>
										<select class="GR_select2" name="bp_registration_on"
										        id="bp_registration_integration">
											<option
												value="0" <?php 
            selected($bp_registration_type, 0);
            ?>
><?php 
            _e('Off', 'Gr_Integration');
            ?>
</option>
											<option
												value="1" <?php 
            selected($bp_registration_type, 1);
            ?>
><?php 
            _e('On', 'Gr_Integration');
            ?>
</option>
										</select> <?php 
            _e('(allow subscriptions at the BuddyPress registration page)', 'Gr_Integration');
            ?>
									</p>

									<div id="bp_registration_show"
									     <?php 
            if (get_option($this->GrOptionDbPrefix . 'bp_registration_on') != 1) {
                ?>
style="display: none;"<?php 
            }
            ?>
>
										<!-- CAMPAIGN TARGET -->
										<p>
											<label class="GR_label"
											       for="bp_registration_campaign"><?php 
            _e('Target Campaign:', 'Gr_Integration');
            ?>
</label>
											<?php 
            $this->returnCampaignSelector($campaigns, $bp_registration_campaign, 'bp_registration_campaign');
            ?>
										</p>

										<!-- ADDITIONAL TEXT - REGISTRATION SUBSCRIPTION-->
										<p>
											<label class="GR_label"
											       for="bp_registration_label"><?php 
            _e('Additional text:', 'Gr_Integration');
            ?>
</label>
											<input class="GR_input2" type="text" name="bp_registration_label"
											       id="bp_registration_label"
											       value="<?php 
            echo get_option($this->GrOptionDbPrefix . 'bp_registration_label', __('Sign up to our newsletter!', 'Gr_Integration'));
            ?>
"/>
										</p>

										<!-- DEFAULT CHECKED - REGISTRATION SUBSCRIPTION -->
										<p>
											<label class="GR_label"
											       for="bp_registration_checked"><?php 
            _e('Subscribe checkbox checked by default', 'Gr_Integration');
            ?>
</label>
											<input class="GR_checkbox" type="checkbox" name="bp_registration_checked"
											       id="bp_registration_checked" value="1"
											       <?php 
            if (get_option($this->GrOptionDbPrefix . 'bp_registration_checked', '') == 1) {
                ?>
checked="checked"<?php 
            }
            ?>
/>
										</p>
									</div>

									<script>
										jQuery('#bp_registration_integration').change(function () {
											var value = jQuery(this).val();
											if (value == '1') {
												jQuery('#bp_registration_show').show('slow');
											}
											else {
												jQuery('#bp_registration_show').hide('slow');
											}
										});
									</script>
									<?php 
        }
        ?>

								<!-- SUBSCRIPTION VIA CHECKOUT PAGE -->
								<?php 
        if ($this->woocomerce_active === true) {
            $checkout_type = get_option($this->GrOptionDbPrefix . 'checkout_on');
            ?>
									<h3><?php 
            _e('Subscribe via Checkout Page (WooCommerce)', 'Gr_Integration');
            ?>
</h3>

									<!-- CHECKOUT INTEGRATION SWITCH ON/OFF -->
									<p>
										<label class="GR_label"
										       for="checkout_on"><?php 
            _e('Checkout integration:', 'Gr_Integration');
            ?>
</label>
										<select class="GR_select2" name="checkout_on" id="checkout_integration">
											<option
												value="0" <?php 
            selected($checkout_type, 0);
            ?>
><?php 
            _e('Off', 'Gr_Integration');
            ?>
</option>
											<option
												value="1" <?php 
            selected($checkout_type, 1);
            ?>
><?php 
            _e('On', 'Gr_Integration');
            ?>
</option>
										</select> <?php 
            _e('(allow subscriptions at the checkout stage)', 'Gr_Integration');
            ?>
										<br/>
									</p>

									<div id="checkout_show"
									     <?php 
            if (get_option($this->GrOptionDbPrefix . 'checkout_on') == 0) {
                ?>
style="display: none;"<?php 
            }
            ?>
>
										<!-- CAMPAIGN TARGET -->
										<p>
											<label class="GR_label"
											       for="checkout_campaign"><?php 
            _e('Target campaign:', 'Gr_Integration');
            ?>
</label>

											<?php 
            $this->returnCampaignSelector($campaigns, $checkout_campaign, 'checkout_campaign');
            ?>
										</p>

										<!-- ADDITIONAL TEXT - CHECKOUT SUBSCRIPTION -->
										<p>
											<label class="GR_label"
											       for="comment_label"><?php 
            _e('Additional text:', 'Gr_Integration');
            ?>
</label>
											<input class="GR_input2" type="text" name="checkout_label"
											       value="<?php 
            echo get_option($this->GrOptionDbPrefix . 'checkout_label', __('Sign up to our newsletter!', 'Gr_Integration'));
            ?>
"/>
										</p>

										<!-- DEFAULT CHECKED - CHECKOUT SUBSCRIPTION -->
										<p>
											<label class="GR_label"
											       for="checkout_checked"><?php 
            _e('Sign up box checked by default', 'Gr_Integration');
            ?>
</label>
											<input class="GR_checkbox" type="checkbox" name="checkout_checked" value="1"
											       <?php 
            if (get_option($this->GrOptionDbPrefix . 'checkout_checked', '') == 1) {
                ?>
checked="checked"<?php 
            }
            ?>
/>
										</p>

										<!-- SYNC ORDER DATA - CHECKOUT SUBSCRIPTION -->
										<p>
											<label class="GR_label"
											       for="sync_order_data"><?php 
            _e('Map custom fields:', 'Gr_Integration');
            ?>
</label>
											<input class="GR_checkbox" type="checkbox" name="sync_order_data"
											       id="sync_order_data" value="1"
											       <?php 
            if (get_option($this->GrOptionDbPrefix . 'sync_order_data', '') == 1) {
                ?>
checked="checked"<?php 
            }
            ?>
/>

											<a class="gr-tooltip">
														<span class="gr-tip" style="width:170px">
															<span>
																<?php 
            _e('Check to update customer details. Each input can be max. 32 characters and include lowercase, a-z letters, digits or underscores. Incorrect or empty entries won’t be added.', 'Gr_Integration');
            ?>
															</span>
														</span>
											</a>
										</p>

										<!-- CUSTOM FIELDS PREFIX - CHECKOUT SUBSCRIPTION -->
										<div id="customNameFields" style="display: none;">
											<div class="gr-custom-field" style="padding-left: 150px;">
												<select class="jsNarrowSelect" name="custom_field" multiple="multiple">
													<?php 
            foreach ($this->biling_fields as $value => $filed) {
                $custom = get_option($this->GrOptionDbPrefix . $value);
                $field_name = $custom ? $custom : $filed['name'];
                echo '<option data-inputvalue="' . $field_name . '" value="' . $value . '" id="' . $filed['value'] . '"', $filed['default'] == 'yes' || $custom ? ' selected="selected"' : '', $filed['default'] == 'yes' ? ' disabled="disabled"' : '', '>', $filed['name'], '</option>';
            }
            ?>
												</select>
											</div>
										</div>
									</div>

									<script>
										jQuery('#checkout_integration').change(function () {
											var value = jQuery(this).val();
											if (value == '1') {
												jQuery('#checkout_show').show();
											}
											else {
												jQuery('#checkout_show').hide();
											}
										});

										var sod = jQuery('#sync_order_data'), cfp = jQuery('#customNameFields');
										if (sod.prop('checked') == true) {
											cfp.show();
										}
										sod.change(function () {
											cfp.toggle('slow');
										});

										jQuery('.jsNarrowSelect').selectNarrowDown();
									</script>

									<?php 
        }
        ?>


								<!-- SUBMIT -->
								<input type="submit" name="Submit" value="<?php 
        _e('Save', 'Gr_Integration');
        ?>
"
								       class="button-primary"/>

								<!-- WEB FORM SHORTCODE -->
								<h3><?php 
        _e('Web Form Shortcode', 'Gr_Integration');
        ?>
</h3>

								<p><?php 
        _e('With the GetResponse Wordpress plugin, you can use shortcodes to place web forms in blog posts. Simply place the following tag in your post wherever you want the web form to appear:', 'Gr_Integration');
        ?>
									<br/><br/>
									<code>[grwebform url="PUT_WEBFORM_URL_HERE" css="on/off" center="on/off"
										center_margin="200"/]</code>
									<br/><br/>
									<b><?php 
        _e('Allowed attributes:', 'Gr_Integration');
        ?>
</b>
									<br/>
									<code>CSS</code>
									- <?php 
        _e('Set this parameter to ON, and the form will be displayed in a GetResponse format; set it to OFF, and the form will be displayed in a standard Wordpress format. Allowed only for old forms.', 'Gr_Integration');
        ?>
									<br/>
									<code>CENTER</code>
									- <?php 
        _e('Set this parameter to ON, and the form will be centralized; set it to OFF, and the form will be displayed in the standard left side without margin.', 'Gr_Integration');
        ?>
									<br/>
									<code>CENTER_MARGIN</code>
									- <?php 
        _e('Set this parameter to customize margin (element width) [Default is 200px] ', 'Gr_Integration');
        ?>
									<br/>
									<code>VARIANT</code>
									- <?php 
        _e('Set this parameter to customize form variant, allowed values: A-H. Variants can be set in your GetResponse panel. Allowed only for the new forms.', 'Gr_Integration');
        ?>
								</p>

								<div class="GR_img_webform_shortcode"></div>

								<br/>

								<h3><?php 
        _e('Having problems with the plugin?', 'Gr_Integration');
        ?>
</h3>
								<?php 
        _e('You can drop us a line including the following details and we\'ll do what we can. ', 'Gr_Integration');
        ?>
								<?php 
        echo '<a href="' . $this->contact_form_url . '" target="_blank"><strong>' . __('CONTACT US', 'Gr_Integration') . '</strong></a>';
        ?>
								<textarea id="GrDetails" onclick="copyText(this)"
								          style="width: 100%; height: 150px; resize:vertical ;"><?php 
        $this->getWpDetailsList();
        $this->getActivePluginsList();
        $this->getGrPluginDetailsList();
        $this->getWidgetsList();
        ?>
</textarea>
								<script>
									if (window.canRunAds === undefined) {
										jQuery('#GrDetails').append('\nAdBlock : active');
									}

									function copyText(element) {
										element.focus();
										element.select();
									}

									jQuery('#getresponse_360_account').change(function () {
										var value = jQuery('#getresponse_360_account:checked').val();
										if (value == '1')
										{
											jQuery('#getresponse_360_account_options').show();
										}
										else
										{
											jQuery('#getresponse_360_account_options').hide();
										}
									});
								</script>
							</div>
						</form>
					</td>
				</tr>
				</tbody>
			</table>
		</div>
		<!-- RSS BOX -->
		<div class="GR_rss_box">
			<table class="wp-list-table widefat">
				<thead>
				<tr>
					<th>GetResponse RSS</th>
				</tr>
				</thead>
				<tbody id="the-list2">
				<tr class="active" id="">
					<td class="desc">
						<?php 
        $this->GrRss();
        ?>
					</td>
				</tr>
				</tbody>
			</table>
			<!-- SOCIAL BOX -->
			<br/>
			<table class="wp-list-table widefat">
				<thead>
				<tr>
					<th>GetResponse Social</th>
				</tr>
				</thead>
				<tbody id="the-list2">
				<tr class="active" id="">
					<td class="desc">
						<ul>
							<li>
								<a class="GR_ico sprite facebook-ico" href="http://www.facebook.com/getresponse"
								   target="_blank" title="Facebook">Facebook</a>
							</li>
							<li>
								<a class="GR_ico sprite twitter-ico" href="http://twitter.com/getresponse"
								   target="_blank" title="Twitter">Twitter</a>
							</li>
							<li>
								<a class="GR_ico sprite linkedin-ico" href="http://www.linkedin.com/company/implix"
								   target="_blank" title="LinkedIn">LinkedIn</a>
							</li>
							<li>
								<a class="GR_ico sprite blog-ico" href="http://blog.getresponse.com/" target="_blank"
								   title="Blog">Blog</a>
							</li>
						</ul>
					</td>
				</tr>
				</tbody>
			</table>
		</div>
		<?php 
    }