Просмотр исходного кода

add hook for current billingcycle in upgrade form

andre 4 лет назад
Родитель
Сommit
8b6833e42c
1 измененных файлов с 22 добавлено и 0 удалено
  1. 22 0
      check_billing_cycle.php

+ 22 - 0
check_billing_cycle.php

@@ -0,0 +1,22 @@
+<?php
+
+/**
+* push current product billing cycle to upgrade form 
+* @author Thurdata
+*/
+
+use Illuminate\Database\Capsule\Manager as Capsule;
+
+function current_billingcycle_hook($vars)
+{
+   if ($vars['templatefile']=='upgrade'){
+
+       $id = $vars['id'];
+       $billingcycle = Capsule::table('tblhosting')
+               ->where('id',$id)
+               ->value('billingcycle');
+       return array("curbillingcycle" => $billingcycle);
+   }
+}
+add_hook("ClientAreaPageUpgrade", 1, "current_billingcycle_hook");
+