Esempio n. 1
0
 public function findApartments($place, $divid)
 {
     $AF = new ApartmentFinder();
     $GL = new GeoLocator();
     $GM = new GoogleMap();
     $apartments = $AF->locateApartments($place);
     foreach ($apartments as $apartment) {
         $locations[] = $GL->getLocations($apartment);
     }
     $GM->initialize();
     $GM->drawLocations($locations);
     $GM->dispatch($divid);
 }
Esempio n. 2
0
$_SESSION['signatureVersion'] = 2;
require_once 'pw/utils/bootstrap.php';
include 'provider.php';
// Fetch the authorization URL from the provider; this returns the
// urlAuthorize option and generates and applies any necessary parameters
// (e.g. state).
$authorizationUrl = $provider->getAuthorizationUrl();
// Get the state generated for you and store it to the session.
$_SESSION['oauth2state'] = urlencode($provider->getState());
if (isset($_SERVER['HTTP_X_FORWARDED_FOR'])) {
    $ipAddresses = explode(',', $_SERVER['HTTP_X_FORWARDED_FOR']);
    $ip = trim(end($ipAddresses));
} else {
    $ip = $_SERVER['REMOTE_ADDR'];
}
$locator = new GeoLocator();
$country = $locator->locate($ip);
/* 
	Pulls list of payment system options available for this country via Payment Systems API
*/
try {
    $paymentSystems = new PaymentSystem();
    $list = $paymentSystems->getPaymentSystemsFor($country);
} catch (Exception $e) {
    exit($e->getMessage());
}
?>


<html>
	<head>