diff --git a/application/classes/Site.php b/application/classes/Site.php index 59254222..67efc269 100644 --- a/application/classes/Site.php +++ b/application/classes/Site.php @@ -13,8 +13,8 @@ class Site extends lnApp_Site { /** * Show a date using a site configured format */ - public static function Date($date) { - return (is_null($date) OR ! $date) ? '' : date(Company::instance()->date_format(),$date); + public static function Date($date,$format='') { + return (is_null($date) OR ! $date) ? '' : date(($format ? $format : Company::instance()->date_format()),$date); } /** diff --git a/includes/tcpdf/fonts/README.TXT b/includes/tcpdf/fonts/README.TXT old mode 100755 new mode 100644 diff --git a/includes/tcpdf/fonts/ZarBold.ctg.z b/includes/tcpdf/fonts/ZarBold.ctg.z old mode 100755 new mode 100644 diff --git a/includes/tcpdf/fonts/ZarBold.z b/includes/tcpdf/fonts/ZarBold.z old mode 100755 new mode 100644 diff --git a/includes/tcpdf/fonts/almohanad.ctg.z b/includes/tcpdf/fonts/almohanad.ctg.z old mode 100755 new mode 100644 diff --git a/includes/tcpdf/fonts/almohanad.php b/includes/tcpdf/fonts/almohanad.php old mode 100755 new mode 100644 diff --git a/includes/tcpdf/fonts/almohanad.z b/includes/tcpdf/fonts/almohanad.z old mode 100755 new mode 100644 diff --git a/includes/tcpdf/fonts/arialunicid0.php b/includes/tcpdf/fonts/arialunicid0.php old mode 100755 new mode 100644 diff --git a/includes/tcpdf/fonts/courier.php b/includes/tcpdf/fonts/courier.php old mode 100755 new mode 100644 diff --git a/includes/tcpdf/fonts/helvetica.php b/includes/tcpdf/fonts/helvetica.php old mode 100755 new mode 100644 diff --git a/includes/tcpdf/fonts/helveticab.php b/includes/tcpdf/fonts/helveticab.php old mode 100755 new mode 100644 diff --git a/includes/tcpdf/fonts/helveticabi.php b/includes/tcpdf/fonts/helveticabi.php old mode 100755 new mode 100644 diff --git a/includes/tcpdf/fonts/helveticai.php b/includes/tcpdf/fonts/helveticai.php old mode 100755 new mode 100644 diff --git a/includes/tcpdf/fonts/hysmyeongjostdmedium.php b/includes/tcpdf/fonts/hysmyeongjostdmedium.php old mode 100755 new mode 100644 diff --git a/includes/tcpdf/fonts/kozgopromedium.php b/includes/tcpdf/fonts/kozgopromedium.php old mode 100755 new mode 100644 diff --git a/includes/tcpdf/fonts/kozminproregular.php b/includes/tcpdf/fonts/kozminproregular.php old mode 100755 new mode 100644 diff --git a/includes/tcpdf/fonts/msungstdlight.php b/includes/tcpdf/fonts/msungstdlight.php old mode 100755 new mode 100644 diff --git a/includes/tcpdf/fonts/stsongstdlight.php b/includes/tcpdf/fonts/stsongstdlight.php old mode 100755 new mode 100644 diff --git a/includes/tcpdf/fonts/symbol.php b/includes/tcpdf/fonts/symbol.php old mode 100755 new mode 100644 diff --git a/includes/tcpdf/fonts/times.php b/includes/tcpdf/fonts/times.php old mode 100755 new mode 100644 diff --git a/includes/tcpdf/fonts/timesb.php b/includes/tcpdf/fonts/timesb.php old mode 100755 new mode 100644 diff --git a/includes/tcpdf/fonts/timesbi.php b/includes/tcpdf/fonts/timesbi.php old mode 100755 new mode 100644 diff --git a/includes/tcpdf/fonts/timesi.php b/includes/tcpdf/fonts/timesi.php old mode 100755 new mode 100644 diff --git a/includes/tcpdf/fonts/uni2cid_ac15.php b/includes/tcpdf/fonts/uni2cid_ac15.php old mode 100755 new mode 100644 diff --git a/includes/tcpdf/fonts/uni2cid_ag15.php b/includes/tcpdf/fonts/uni2cid_ag15.php old mode 100755 new mode 100644 diff --git a/includes/tcpdf/fonts/uni2cid_aj16.php b/includes/tcpdf/fonts/uni2cid_aj16.php old mode 100755 new mode 100644 diff --git a/includes/tcpdf/fonts/uni2cid_ak12.php b/includes/tcpdf/fonts/uni2cid_ak12.php old mode 100755 new mode 100644 diff --git a/includes/tcpdf/fonts/utils/README.TXT b/includes/tcpdf/fonts/utils/README.TXT old mode 100755 new mode 100644 diff --git a/includes/tcpdf/fonts/utils/enc/cp1250.map b/includes/tcpdf/fonts/utils/enc/cp1250.map old mode 100755 new mode 100644 diff --git a/includes/tcpdf/fonts/utils/enc/cp1251.map b/includes/tcpdf/fonts/utils/enc/cp1251.map old mode 100755 new mode 100644 diff --git a/includes/tcpdf/fonts/utils/enc/cp1252.map b/includes/tcpdf/fonts/utils/enc/cp1252.map old mode 100755 new mode 100644 diff --git a/includes/tcpdf/fonts/utils/enc/cp1253.map b/includes/tcpdf/fonts/utils/enc/cp1253.map old mode 100755 new mode 100644 diff --git a/includes/tcpdf/fonts/utils/enc/cp1254.map b/includes/tcpdf/fonts/utils/enc/cp1254.map old mode 100755 new mode 100644 diff --git a/includes/tcpdf/fonts/utils/enc/cp1255.map b/includes/tcpdf/fonts/utils/enc/cp1255.map old mode 100755 new mode 100644 diff --git a/includes/tcpdf/fonts/utils/enc/cp1257.map b/includes/tcpdf/fonts/utils/enc/cp1257.map old mode 100755 new mode 100644 diff --git a/includes/tcpdf/fonts/utils/enc/cp1258.map b/includes/tcpdf/fonts/utils/enc/cp1258.map old mode 100755 new mode 100644 diff --git a/includes/tcpdf/fonts/utils/enc/cp874.map b/includes/tcpdf/fonts/utils/enc/cp874.map old mode 100755 new mode 100644 diff --git a/includes/tcpdf/fonts/utils/enc/iso-8859-1.map b/includes/tcpdf/fonts/utils/enc/iso-8859-1.map old mode 100755 new mode 100644 diff --git a/includes/tcpdf/fonts/utils/enc/iso-8859-11.map b/includes/tcpdf/fonts/utils/enc/iso-8859-11.map old mode 100755 new mode 100644 diff --git a/includes/tcpdf/fonts/utils/enc/iso-8859-15.map b/includes/tcpdf/fonts/utils/enc/iso-8859-15.map old mode 100755 new mode 100644 diff --git a/includes/tcpdf/fonts/utils/enc/iso-8859-16.map b/includes/tcpdf/fonts/utils/enc/iso-8859-16.map old mode 100755 new mode 100644 diff --git a/includes/tcpdf/fonts/utils/enc/iso-8859-2.map b/includes/tcpdf/fonts/utils/enc/iso-8859-2.map old mode 100755 new mode 100644 diff --git a/includes/tcpdf/fonts/utils/enc/iso-8859-4.map b/includes/tcpdf/fonts/utils/enc/iso-8859-4.map old mode 100755 new mode 100644 diff --git a/includes/tcpdf/fonts/utils/enc/iso-8859-5.map b/includes/tcpdf/fonts/utils/enc/iso-8859-5.map old mode 100755 new mode 100644 diff --git a/includes/tcpdf/fonts/utils/enc/iso-8859-7.map b/includes/tcpdf/fonts/utils/enc/iso-8859-7.map old mode 100755 new mode 100644 diff --git a/includes/tcpdf/fonts/utils/enc/iso-8859-9.map b/includes/tcpdf/fonts/utils/enc/iso-8859-9.map old mode 100755 new mode 100644 diff --git a/includes/tcpdf/fonts/utils/enc/koi8-r.map b/includes/tcpdf/fonts/utils/enc/koi8-r.map old mode 100755 new mode 100644 diff --git a/includes/tcpdf/fonts/utils/enc/koi8-u.map b/includes/tcpdf/fonts/utils/enc/koi8-u.map old mode 100755 new mode 100644 diff --git a/includes/tcpdf/fonts/utils/freetype6.dll b/includes/tcpdf/fonts/utils/freetype6.dll old mode 100755 new mode 100644 diff --git a/includes/tcpdf/fonts/utils/makeallttffonts.php b/includes/tcpdf/fonts/utils/makeallttffonts.php old mode 100755 new mode 100644 diff --git a/includes/tcpdf/fonts/utils/makefont.php b/includes/tcpdf/fonts/utils/makefont.php old mode 100755 new mode 100644 diff --git a/includes/tcpdf/fonts/utils/pfm2afm b/includes/tcpdf/fonts/utils/pfm2afm old mode 100755 new mode 100644 diff --git a/includes/tcpdf/fonts/utils/pfm2afm.exe b/includes/tcpdf/fonts/utils/pfm2afm.exe deleted file mode 100755 index 25c21fa1..00000000 Binary files a/includes/tcpdf/fonts/utils/pfm2afm.exe and /dev/null differ diff --git a/includes/tcpdf/fonts/utils/src/pfm2afm-src.tar.gz b/includes/tcpdf/fonts/utils/src/pfm2afm-src.tar.gz old mode 100755 new mode 100644 diff --git a/includes/tcpdf/fonts/utils/src/readme.txt b/includes/tcpdf/fonts/utils/src/readme.txt old mode 100755 new mode 100644 diff --git a/includes/tcpdf/fonts/utils/src/ttf2ufm-src.tar.gz b/includes/tcpdf/fonts/utils/src/ttf2ufm-src.tar.gz old mode 100755 new mode 100644 diff --git a/includes/tcpdf/fonts/utils/ttf2ufm b/includes/tcpdf/fonts/utils/ttf2ufm old mode 100755 new mode 100644 diff --git a/includes/tcpdf/fonts/utils/ttf2ufm.exe b/includes/tcpdf/fonts/utils/ttf2ufm.exe deleted file mode 100755 index 07751055..00000000 Binary files a/includes/tcpdf/fonts/utils/ttf2ufm.exe and /dev/null differ diff --git a/includes/tcpdf/fonts/utils/zlib1.dll b/includes/tcpdf/fonts/utils/zlib1.dll old mode 100755 new mode 100644 diff --git a/includes/tcpdf/fonts/zapfdingbats.php b/includes/tcpdf/fonts/zapfdingbats.php old mode 100755 new mode 100644 diff --git a/includes/tcpdf/fonts/zarbold.php b/includes/tcpdf/fonts/zarbold.php old mode 100755 new mode 100644 diff --git a/modules/adsl/classes/Model/ADSL/Plan.php b/modules/adsl/classes/Model/ADSL/Plan.php new file mode 100644 index 00000000..2cc597cc --- /dev/null +++ b/modules/adsl/classes/Model/ADSL/Plan.php @@ -0,0 +1,64 @@ + array('model'=>'ADSL_Supplier_Plan','foreign_key'=>'adsl_supplier_plan_id'), + ); + + protected $_sorting = array( + ); + + protected $_form = array('id'=>'id','value'=>'name()'); + + /** + * Filters used to format the display of values into friendlier values + */ + protected $_display_filters = array( + 'extra_down_peak'=>array( + array('Tax::add',array(':value')), + array('Currency::display',array(':value')), + ), + 'extra_down_offpeak'=>array( + array('Tax::add',array(':value')), + array('Currency::display',array(':value')), + ), + 'extra_up_peak'=>array( + array('Tax::add',array(':value')), + array('Currency::display',array(':value')), + ), + 'extra_up_offpeak'=>array( + array('Tax::add',array(':value')), + array('Currency::display',array(':value')), + ), + ); + + // Map the table fields + private $_map = array( + ); + + private $_metrics = array( + ); + + /** + * ADSL Plan Name + */ + public function name($variable=NULL) { + } + + /** + * Collapse our traffic data into an array as per $this->_metric + */ + public function traffic_data() { + } +} +?> diff --git a/modules/adsl/classes/Task/Adsl/Trafficcharge.php b/modules/adsl/classes/Task/Adsl/Trafficcharge.php index b8605c54..87884140 100644 --- a/modules/adsl/classes/Task/Adsl/Trafficcharge.php +++ b/modules/adsl/classes/Task/Adsl/Trafficcharge.php @@ -37,6 +37,7 @@ class Task_Adsl_Trafficcharge extends Minion_Task { $co->sweep_type = 6; $co->account_id = $so->account_id; + $co->active = TRUE; $co->service_id = $so->id; $co->amount = $cost[$k]; $co->taxable = $so->product->taxable; diff --git a/modules/adsl/classes/Task/Adsl/Trafficget.php b/modules/adsl/classes/Task/Adsl/Trafficget.php index df08b4a4..4255ef3d 100644 --- a/modules/adsl/classes/Task/Adsl/Trafficget.php +++ b/modules/adsl/classes/Task/Adsl/Trafficget.php @@ -14,7 +14,7 @@ class Task_Adsl_Trafficget extends Minion_Task { 'verbose'=>FALSE, ); - protected function _traffic_suppliers($active=FALSE) { + protected function _traffic_suppliers($active=TRUE) { $suppliers = ORM::factory('ADSL_Supplier'); return $active ? $suppliers->list_active() : $suppliers->find_all(); diff --git a/modules/charge/classes/Controller/Reseller/Charge.php b/modules/charge/classes/Controller/Reseller/Charge.php index ffb0a11a..2d02b358 100644 --- a/modules/charge/classes/Controller/Reseller/Charge.php +++ b/modules/charge/classes/Controller/Reseller/Charge.php @@ -56,6 +56,10 @@ class Controller_Reseller_Charge extends Controller_Charge { $this->meta->title = $co->loaded() ? sprintf('Charge: %s (%s)',$co->name(),$co->account->name()) : 'New Charge'; + // New charges + if (! $co->loaded()) + $co->active = TRUE; + if ($this->request->post() AND $co->values($this->request->post())->changed() AND (! $this->save($co))) $co->reload(); diff --git a/modules/domain/views/service/user/plugin/domain/view.php b/modules/domain/views/service/user/plugin/domain/view.php index fd61b6fd..ea266174 100644 --- a/modules/domain/views/service/user/plugin/domain/view.php +++ b/modules/domain/views/service/user/plugin/domain/view.php @@ -6,11 +6,13 @@
Domain Name
name(); ?>
-
Domain Expire
-
display('domain_expire'); ?>
+ service->external_billing) : ?> +
Domain Expire
+
display('domain_expire'); ?>
-
Domain Auth Password
-
service->expiring() ? $o->display('registrar_auth_password') : 'EXPIRED'; ?>
+
Domain Auth Password
+
service->expiring() ? $o->display('registrar_auth_password') : 'EXPIRED'; ?>
+ manage_button()) : ?>
Registrar
diff --git a/modules/host/views/service/user/plugin/host/view.php b/modules/host/views/service/user/plugin/host/view.php index c522d40c..55ad5f30 100644 --- a/modules/host/views/service/user/plugin/host/view.php +++ b/modules/host/views/service/user/plugin/host/view.php @@ -6,8 +6,10 @@
Domain Name
name(); ?>
-
Hosting Expire
-
display('host_expire'); ?>
+ service->external_billing) : ?> +
Hosting Expire
+
display('host_expire'); ?>
+ manage_button()) : ?>
Panel
diff --git a/modules/product/views/product/admin/edit.php b/modules/product/views/product/admin/edit.php index d37b6560..64b38703 100644 --- a/modules/product/views/product/admin/edit.php +++ b/modules/product/views/product/admin/edit.php @@ -41,7 +41,7 @@ is_price_shown($k),array('nocg'=>TRUE)); ?> -  SetupBase +  BaseSetup list_pricegroups() as $go) : ?> diff --git a/modules/service/classes/Model/Service.php b/modules/service/classes/Model/Service.php index e2eb9ef8..8a351dd0 100644 --- a/modules/service/classes/Model/Service.php +++ b/modules/service/classes/Model/Service.php @@ -78,6 +78,7 @@ class Model_Service extends ORM { ); protected $_nullifempty = array( + 'price', 'price_override', ); diff --git a/modules/service/views/service/admin/add.php b/modules/service/views/service/admin/add.php index 5731f866..fcd661ca 100644 --- a/modules/service/views/service/admin/add.php +++ b/modules/service/views/service/admin/add.php @@ -5,7 +5,7 @@ echo View::factory('field/account')->set('data',['field'=>'account_id','value'=>$o->account_id,'text'=>'Account','name'=>'','ajaxurl'=>URL::link('admin','payment/ajaxlist')]); echo View::factory('field/select')->set('data',['field'=>'active','value'=>StaticList_YesNo::table(),'text'=>'Active','default'=>$o->active,'class'=>'col-md-1']); echo View::factory('field/select')->set('data',['field'=>'recur_schedule','value'=>StaticList_RecurSchedule::table(),'text'=>'Billing Period','default'=>$o->recur_schedule,'class'=>'col-md-2']); - echo View::factory('field/date')->set('data',['field'=>'data_next_invoice','value'=>$o->date_next_invoice ? $o->date_next_invoice : time(),'text'=>'Date Next Invoice','enddate'=>NULL]); + echo View::factory('field/date')->set('data',['field'=>'date_next_invoice','value'=>$o->date_next_invoice ? $o->date_next_invoice : time(),'text'=>'Date Next Invoice','enddate'=>NULL]); echo View::factory('field/select')->set('data',['field'=>'taxable','value'=>StaticList_YesNo::table(),'text'=>'Taxable','default'=>is_null($o->taxable) ? TRUE : $o->taxable,'class'=>'col-md-1']); echo View::factory('field/select')->set('data',['field'=>'suspend_billing','value'=>StaticList_YesNo::table(),'text'=>'Suspend Billing','default'=>$o->suspend_billing,'class'=>'col-md-1']); echo View::factory('field/money')->set('data',['field'=>'price','value'=>$o->price,'text'=>'Price']); diff --git a/modules/service/views/service/admin/edit.php b/modules/service/views/service/admin/edit.php index c9a6ae15..2c05bb3d 100644 --- a/modules/service/views/service/admin/edit.php +++ b/modules/service/views/service/admin/edit.php @@ -4,9 +4,10 @@ set('data',['field'=>'active','value'=>StaticList_YesNo::table(),'text'=>'Active','default'=>$o->active,'class'=>'col-md-1']); echo View::factory('field/select')->set('data',['field'=>'recur_schedule','value'=>StaticList_RecurSchedule::table(),'text'=>'Billing Period','default'=>$o->recur_schedule,'class'=>'col-md-2']); - echo View::factory('field/date')->set('data',['field'=>'data_next_invoice','value'=>$o->date_next_invoice,'text'=>'Date Next Invoice','enddate'=>NULL]); + echo View::factory('field/date')->set('data',['field'=>'date_next_invoice','value'=>is_null($o->date_next_invoice) ? time() : $o->date_next_invoice,'text'=>'Date Next Invoice','enddate'=>NULL]); echo View::factory('field/select')->set('data',['field'=>'taxable','value'=>StaticList_YesNo::table(),'text'=>'Taxable','default'=>$o->taxable,'class'=>'col-md-1']); echo View::factory('field/select')->set('data',['field'=>'suspend_billing','value'=>StaticList_YesNo::table(),'text'=>'Suspend Billing','default'=>$o->suspend_billing,'class'=>'col-md-1']); + echo View::factory('field/money')->set('data',['field'=>'price','value'=>$o->price,'text'=>'Price']); echo View::factory('field/money')->set('data',['field'=>'price_override','value'=>$o->price_override,'text'=>'Override Price']); ?> diff --git a/modules/ssl/classes/SSL.php b/modules/ssl/classes/SSL.php index 8e184667..723eadb1 100644 --- a/modules/ssl/classes/SSL.php +++ b/modules/ssl/classes/SSL.php @@ -174,10 +174,18 @@ class SSL { return $this->_dn($this->_details('issuer')); } + public function get_ian() { + return $this->_extensions('issuerAltName'); + } + public function get_serial() { return $this->_dec_to_hex($this->_details('serialNumber')); } + public function get_san() { + return $this->_extensions('subjectAltName'); + } + public function get_subject() { $k = $this->_details('subject'); @@ -191,13 +199,13 @@ class SSL { public function get_valid_to($format=FALSE) { $k = $this->_details('validTo_time_t'); - return $format ? Site::Date($k) : $k; + return $format ? Site::Date($k,'d-M-Y H:i:s') : $k; } public function get_valid_from($format=FALSE) { $k = $this->_details('validFrom_time_t'); - return $format ? Site::Date($k) : $k; + return $format ? Site::Date($k,'d-M-Y H:i:s') : $k; } public function get_version() { diff --git a/modules/ssl/views/service/user/plugin/ssl/view/details.php b/modules/ssl/views/service/user/plugin/ssl/view/details.php index 97200713..337c92a5 100644 --- a/modules/ssl/views/service/user/plugin/ssl/view/details.php +++ b/modules/ssl/views/service/user/plugin/ssl/view/details.php @@ -12,6 +12,9 @@
Subject Key Id
ski(); ?>
+
Subject Alt name
+
san(); ?>
+
Issuer
validCA() AND $o->authorised($o->ca)) : ?> @@ -24,6 +27,9 @@
Issuer Serial
aki_keyid(), $o->aki_serial()); ?>
+
Issuer Alt Name
+
ian(); ?>
+
Valid From
valid_from(TRUE); ?>