Example #1
0
 public function doMobileCenter()
 {
     global $_W, $_GPC;
     if (empty($_GPC['openid'])) {
         $from_user = $_W['fans']['from_user'];
     } else {
         $from_user = $_GPC['openid'];
     }
     $this->tryLink();
     yload()->classs('quick_center', 'fans');
     $_fans = new Fans();
     $fans = $_fans->refresh($_W['weid'], $from_user);
     $uplevelfans = $_fans->getUplevelFans($_W['weid'], $from_user);
     $groupid = empty($_GPC['groupid']) ? 1 : intval($_GPC['groupid']);
     $list = pdo_fetchall("SELECT * FROM " . tablename(self::$t_bind) . " WHERE weid=:weid AND enable=1 ORDER BY groupid, displayorder", array(':weid' => $_W['weid']));
     $list = $this->buildCallbackParam($list);
     yload()->classs('quick_center', 'menubuilder');
     $menus = MenuBuilder::build($list);
     $title = empty($this->module['config']['title']) ? $_W['account']['name'] : $this->module['config']['title'];
     $share = array();
     $share['disable'] = true;
     $vip_kv = unserialize($this->module['config']['vip']);
     $fans['vipname'] = $vip_kv[$fans['vip']];
     yload()->classs('quick_center', 'template');
     $_template = new Template($this->module['name']);
     $_W['account']['template'] = $this->getTemplateName();
     include $_template->template('center');
 }