Exemple #1
0
 public function getRichlist()
 {
     $paycoin = new PaycoinDb();
     $richList = $paycoin->getRichList();
     $this->outputJsonResponse($richList);
 }
 public function richlist()
 {
     $this->setData('activeTab', 'Rich List');
     $this->setData('enableLimitSelector', true);
     $this->addJs('/js/market_info.js');
     $this->addJs('/js/update_outstanding.js');
     $this->addJs('/js/richlist.js');
     $this->addJs('/js/charts/theme.js');
     $this->addJs('/highcharts/js/highcharts.js');
     $this->addJs('/highcharts/js/highcharts-3d.js');
     $this->addJs('/highcharts/js/modules/exporting.js');
     $limit = $this->getLimit(25);
     $paycoin = new PaycoinDb();
     $richList = $paycoin->getRichList($limit);
     $addresses = array();
     $addressTagMap = array();
     foreach ($richList as $rich) {
         $addresses[] = $rich['address'];
     }
     if (count($addresses) > 0) {
         $addressTagMap = $paycoin->getAddressTagMap($addresses);
     }
     $this->setData('addressTagMap', $addressTagMap);
     $distribution = $paycoin->getRichListDistribution();
     $this->setData('cacheTime', 60);
     $this->setData('distribution', $distribution);
     $this->setData('richList', $richList);
     $this->setData('pageTitle', 'Paycoin Rich List');
     $this->render('header');
     $this->render('richlist');
     $this->render('footer');
 }