~timwhite88/grase/trunk

« back to all changes in this revision

Viewing changes to files/usr/share/grase/www/radmin/classes/SettingsMySQL.class.php

  • Committer: Timothy White
  • Date: 2013-10-27 19:25:34 UTC
  • Revision ID: tim@purewhite.id.au-20131027192534-b4ybtss6d7hcnrnd
minor cleanup

Show diffs side-by-side

added added

removed removed

Lines of Context:
510
510
                MaxSeconds,
511
511
                Comment,
512
512
                lastupdated
513
 
                FROM groups";
 
513
                FROM groups
 
514
                ORDER BY GroupName";
514
515
        
515
516
        }
516
517
            
740
741
        AdminLog::getInstance()->log("Performing upgradeFromFiles on Settings");
741
742
        /* */
742
743
        $location_file = '/var/www/radmin/configs/site_settings/location'; // Hotspot location
743
 
        $pricemb_file = '/var/www/radmin/configs/site_settings/pricemb'; // Price per MB
744
 
        $pricetime_file = '/var/www/radmin/configs/site_settings/pricetime'; // Price permin
 
744
        //$pricemb_file = '/var/www/radmin/configs/site_settings/pricemb'; // Price per MB
 
745
        //$pricetime_file = '/var/www/radmin/configs/site_settings/pricetime'; // Price permin
745
746
        //$currency_file = '/var/www/radmin/configs/site_settings/currency'; // Currency, e.g. R or $
746
 
        $sellable_data_file = '/var/www/radmin/configs/site_settings/sellable_data'; // Sellable Data in Octets's
747
 
        $useable_data_file = '/var/www/radmin/configs/site_settings/useable_data'; // Useable Data in Octets's
 
747
        //$sellable_data_file = '/var/www/radmin/configs/site_settings/sellable_data'; // Sellable Data in Octets's
 
748
        //$useable_data_file = '/var/www/radmin/configs/site_settings/useable_data'; // Useable Data in Octets's
748
749
        $support_contact_file = '/var/www/radmin/configs/site_settings/support_contact'; // Support Contact
749
750
        $website_file = '/var/www/radmin/configs/site_settings/website'; // Support Contact
750
751
 
752
753
        /* */
753
754
 
754
755
        $location = trim(file_get_contents($location_file)); if($location == "") $location = "Default";
755
 
        $pricemb = trim(file_get_contents($pricemb_file)); if($pricemb == "") $pricemb = 0.6;
756
 
        $pricetime = trim(file_get_contents($pricetime_file)); if($pricetime == "") $pricetime = 0.1;
 
756
        //$pricemb = trim(file_get_contents($pricemb_file)); if($pricemb == "") $pricemb = 0.6;
 
757
        //$pricetime = trim(file_get_contents($pricetime_file)); if($pricetime == "") $pricetime = 0.1;
757
758
        //$currency = trim(file_get_contents($currency_file)); if($currency == "") $currency = "R";
758
 
        $sellable_data = trim(file_get_contents($sellable_data_file)); if($sellable_data == "") $sellable_data = "2147483648"; //2Gb
759
 
        $useable_data = trim(file_get_contents($useable_data_file)); if($useable_data == "") $useable_data = "3221225472"; //3Gb
 
759
        //$sellable_data = trim(file_get_contents($sellable_data_file)); if($sellable_data == "") $sellable_data = "2147483648"; //2Gb
 
760
        //$useable_data = trim(file_get_contents($useable_data_file)); if($useable_data == "") $useable_data = "3221225472"; //3Gb
760
761
        $support_contact = trim(file_get_contents($support_contact_file)); if($support_contact == "") $support_contact = "http://purewhite.id.au/ Tim White";
761
762
        list($support_link, $support_name) = explode(' ', $support_contact, 2);
762
763
 
765
766
        error_reporting($old_error_level);        
766
767
 
767
768
        $this->setSetting('locationName', $location);                
768
 
        $this->setSetting('priceMb', $pricemb);                        
769
 
        $this->setSetting('priceMinute', $pricetime);
 
769
        //$this->setSetting('priceMb', $pricemb);
 
770
        //$this->setSetting('priceMinute', $pricetime);
770
771
        //$this->setSetting('currency', $currency);
771
 
        $this->setSetting('sellableData', $sellable_data);
772
 
        $this->setSetting('useableData', $useable_data);
 
772
        //$this->setSetting('sellableData', $sellable_data);
 
773
        //$this->setSetting('useableData', $useable_data);
773
774
        $this->setSetting('supportContactName', $support_name);
774
775
        $this->setSetting('supportContactLink', $support_link);
775
776