public function run() { $bp = new App_Majia_MajiaBandingBp($this->loginUser); $list = $bp->doGetBanded(); $num = intval(Wekit::C('app_majia', 'band.max.num')); $this->setOutput($list, 'list'); $this->setOutput($num, 'num'); $this->setOutput($num - count($list), 'hasNum'); $this->setTemplate('pop_run'); }
public function createHtml($left, $tab) { $config = Wekit::C('app_majia'); $list = array(); $method = !in_array($this->bp->user->gid, $config['band.allow.groups']) ? 'displayMajiaForbidden' : 'displayList'; if (!$config['isopen']) { $method = 'displayMajiaClose'; } else { Wind::import('EXT:majia.service.srv.App_Majia_MajiaBandingBp'); $bp = new App_Majia_MajiaBandingBp($this->bp->user); $list = $bp->doGetBanded(); } PwHook::template($method, 'EXT:majia.template.my_run', true, $this->bp->user, $list, intval($config['band.max.num'])); }