| 254 |
|
|
| 255 |
$ewt = coova_radius_client(); |
$ewt = coova_radius_client(); |
| 256 |
|
|
| 257 |
if ($_REQUEST['res'] == 'notyet') { |
if (hotspot_get_param('res') == 'notyet') { |
| 258 |
if (coova_radius_setting('provisioning', '') == 'users') { |
if (coova_radius_setting('provisioning', '') == 'users') { |
| 259 |
|
|
| 260 |
if (!$user->uid) { |
if (!$user->uid) { |
| 439 |
foreach ($p as $n => $r) { |
foreach ($p as $n => $r) { |
| 440 |
if ($r['buyOnline'] == true) { |
if ($r['buyOnline'] == true) { |
| 441 |
|
|
| 442 |
if (!$pp) |
if (!$pp) { |
| 443 |
$pp = $ewt->getPaymentProfilesForOwner($_SESSION['networkOwnerId'], |
$pp = $ewt->getPaymentProfilesForOwner($_SESSION['networkOwnerId'], |
| 444 |
$_SESSION['networkId'], 1); |
$_SESSION['networkId'], 1); |
| 445 |
|
} |
| 446 |
|
|
| 447 |
if ($pp && $r['price'] > 0) { |
if ($pp && $r['price'] > 0) { |
| 448 |
$o = array(); |
$o = array(); |
| 517 |
if ($urls = coova_radius_policy_loginurls()) { |
if ($urls = coova_radius_policy_loginurls()) { |
| 518 |
|
|
| 519 |
if (coova_radius_payment_policies()) { |
if (coova_radius_payment_policies()) { |
| 520 |
|
|
| 521 |
foreach ($urls['list'] as $o) { |
foreach ($urls['list'] as $o) { |
| 522 |
$content .= '<div id="'.$o['name'].'" class="paypal">'.$o['name'].'<a href="'.$o['url'].'"><input type="image" src="https://www.paypal.com/en_US/i/btn/btn_paynow_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!"></a></p>'; |
|
| 523 |
|
if (strpos($o['type'], 'paypal') === 0) { |
| 524 |
|
$image = 'https://www.paypal.com/en_US/i/btn/btn_paynow_LG.gif'; |
| 525 |
|
} else if ($o['type'] == 'checkout') { |
| 526 |
|
$image = '/'.drupal_get_path('theme', 'openmesh').'/images/google_buy.gif'; |
| 527 |
|
} |
| 528 |
|
|
| 529 |
|
$content .= '<div class="payment"><a class="payment" href="'.$o['url'].'">'.$o['name'].'<input class="payment" type="image" src="'.$image.'" border="0" name="submit"></a></div>'; |
| 530 |
|
|
| 531 |
} |
} |
| 532 |
} |
} |
| 533 |
|
|
| 541 |
} |
} |
| 542 |
|
|
| 543 |
function coova_radius_policies() { |
function coova_radius_policies() { |
| 544 |
return true; |
return coova_radius_setting('use_policies', 'true') == 'true'; |
| 545 |
} |
} |
| 546 |
|
|
| 547 |
function coova_radius_payment_policies() { |
function coova_radius_payment_policies() { |
| 548 |
return false; |
return coova_radius_setting('use_payment_policies', 'false') == 'true'; |
| 549 |
} |
} |
| 550 |
|
|
| 551 |
function coova_radius_autologin_policy() { |
function coova_radius_autologin_policy() { |
| 552 |
return true; |
return coova_radius_setting('autologin_policies', 'true') == 'true'; |
| 553 |
} |
} |
| 554 |
|
|
| 555 |
function coova_radius_network_options() { |
function coova_radius_network_options() { |