$responseDetection = erLhcoreClassModelChatOnlineUser::getUserData('locatorhq', erLhcoreClassIPDetect::getServerAddress(), array('ip' => $data['locatorhqip'], 'username' => $data['locatorhqusername'], 'api_key' => $data['locatorhq_api_key']));
                 if ($responseDetection == false || !isset($responseDetection->country_code)) {
                     $Errors[] = erTranslationClassLhTranslation::getInstance()->getTranslation('chat/onlineusers', 'Setting service provider failed, please check that your service provider allows you to make requests to remote pages and your API key and username is correct!');
                 }
             }
         } elseif ($form->UseGeoIP == 'ipinfodbcom') {
             $data['geo_service_identifier'] = 'ipinfodbcom';
             $filledAPIData = true;
             if ($form->hasValidData('ipinfodbAPIKey') && $form->ipinfodbAPIKey != '') {
                 $data['ipinfodbcom_api_key'] = $form->ipinfodbAPIKey;
             } else {
                 $filledAPIData = false;
                 $Errors[] = erTranslationClassLhTranslation::getInstance()->getTranslation('chat/onlineusers', 'Please enter the API key!');
             }
             if ($filledAPIData == true) {
                 $responseDetection = erLhcoreClassModelChatOnlineUser::getUserData('ipinfodbcom', erLhcoreClassIPDetect::getServerAddress(), array('api_key' => $data['ipinfodbcom_api_key']));
                 if ($responseDetection == false || !isset($responseDetection->country_code)) {
                     $Errors[] = erTranslationClassLhTranslation::getInstance()->getTranslation('chat/onlineusers', 'Setting service provider failed, please check that your service provider allows you to make requests to remote pages and your API key is correct!');
                 }
             }
         } elseif ($form->UseGeoIP == 'php_geoip') {
             $data['geo_service_identifier'] = 'php_geoip';
             $responseDetection = erLhcoreClassModelChatOnlineUser::getUserData('php_geoip', '94.23.200.91');
             if ($responseDetection == false || !isset($responseDetection->country_code)) {
                 $Errors[] = erTranslationClassLhTranslation::getInstance()->getTranslation('chat/onlineusers', 'Setting service provider failed, please check that you have installed php-GeoIP module and GeoIPCity.dat file is available!');
             }
         }
     } else {
         $Errors[] = erTranslationClassLhTranslation::getInstance()->getTranslation('chat/onlineusers', 'Please choose a service provider!');
     }
 }
echo erTranslationClassLhTranslation::getInstance()->getTranslation('chat/onlineusers', 'Username');
?>
</label> 
								    <input class="form-control" type="text" name="locatorhqUsername" value="<?php 
isset($geo_data['locatorhqusername']) ? print htmlspecialchars($geo_data['locatorhqusername']) : (print '');
?>
"> 
								</div>
								
								<div class="form-group">
								    <label><?php 
echo erTranslationClassLhTranslation::getInstance()->getTranslation('chat/onlineusers', 'IP, if your site remote IP is different from detected one, please provide correct remote IP address');
?>
</label> 
								    <input class="form-control" type="text" name="locatorhqIP" value="<?php 
isset($geo_data['locatorhqip']) ? print htmlspecialchars($geo_data['locatorhqip']) : (print erLhcoreClassIPDetect::getServerAddress());
?>
"> 
                                </div>
								
						      </div>
						</div>
												
					</div>
				</div>
				
				<input type="submit" class="btn btn-default" name="StoreGeoIPConfiguration" value="<?php 
echo erTranslationClassLhTranslation::getInstance()->getTranslation('chat/onlineusers', 'Save');
?>
" />