/[drupal]/contributions/modules/hotspot/coova_radius.module
ViewVC logotype

Diff of /contributions/modules/hotspot/coova_radius.module

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.4.2.5, Fri Jul 31 19:34:48 2009 UTC revision 1.4.2.6, Wed Aug 19 17:16:46 2009 UTC
# Line 254  function coova_radius_hotspot_dologin() Line 254  function coova_radius_hotspot_dologin()
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) {
# Line 439  function coova_radius_policy_loginurls() Line 439  function coova_radius_policy_loginurls()
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();
# Line 516  function coova_radius_hotspot_links() { Line 517  function coova_radius_hotspot_links() {
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    
# Line 531  function coova_radius_hotspot_links() { Line 541  function coova_radius_hotspot_links() {
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() {

Legend:
Removed from v.1.4.2.5  
changed lines
  Added in v.1.4.2.6

  ViewVC Help
Powered by ViewVC 1.1.2