Esempio n. 1
0
 function display($tpl = null)
 {
     $jxConfig = new JXConfig();
     $doc = JFactory::getDocument();
     $doc->setTitle(JText::_("COM_ACCOUNT_LABEL_BILLING"));
     $total = 0;
     /*$payments = JModel::getInstance('payments', 'AccountModel');
     		$total	 = $payments->getTotal();
     		$payments->getList(null, $jxConfig->get('list_limit'), JRequest::getVar('limitstart', 0));		
     		*/
     $pagination = new JPagination($total, JRequest::getVar('limitstart', 0), $jxConfig->get('list_limit'));
     $this->assignRef('availablePlans', $jxConfig->getAvailablePlans());
     $this->assignRef('plan', $jxConfig->getCurrentPlan());
     $this->assignRef('jxConfig', $jxConfig);
     $this->assignRef('payments', $payments);
     $this->assignRef('pagination', $pagination);
     parent::display($tpl);
 }
Esempio n. 2
0
 /**
  * 
  */
 public function getStorageStatsHTML()
 {
     $jxConfig = new JXConfig();
     $current_plan = $jxConfig->getCurrentPlan();
     $planPackage = $jxConfig->getAvailablePlans($current_plan);
     // Change from Gb to bytes
     $packSize = isset($planPackage[2]) && (int) $planPackage[2] > 0 ? $planPackage[2] : 0;
     $total = $packSize * 1000 * 1000 * 1000;
     $fileModel = StreamFactory::getModel('files');
     $used = $fileModel->getTotalStorage(JRequest::getVar('user_id', null));
     $tmpl = new StreamTemplate();
     $tmpl->set('title', JText::_('COM_STREAM_LABEL_STORAGE_USAGE'));
     $tmpl->set('used', $used)->set('total', $total);
     $html = $tmpl->fetch('file.module.storagestats');
     return $html;
 }