Ejemplo n.º 1
0
 /**
  * 设置页面参数
  */
 public function view_action($path)
 {
     $features = $this->model('mp\\mpaccount')->getFeatures($this->mpid);
     \TPL::assign('can_member_card', $features->can_member_card);
     \TPL::assign('can_member_checkin', $features->can_member_checkin);
     parent::view_action($path);
 }
Ejemplo n.º 2
0
 /**
  *
  */
 public function __construct()
 {
     parent::__construct();
     $mpa = $this->model('mp\\mpaccount')->byId($this->mpid);
     $prights = $this->model('mp\\permission')->hasMpRight($this->mpid, array('reply_text', 'reply_menu', 'reply_qrcode', 'reply_other'), 'read');
     $entries = array();
     (true === $prights || $prights['reply_text']['read_p'] === 'Y') && ($entries['text'] = array('title' => '文本消息'));
     (true === $prights || $prights['reply_menu']['read_p'] === 'Y') && ($entries['menu'] = array('title' => '菜单事件'));
     $mpa->asparent === 'N' && (true === $prights || $prights['reply_qrcode']['read_p'] === 'Y') && ($entries['qrcode'] = array('title' => '扫二维码'));
     (true === $prights || $prights['reply_other']['read_p'] === 'Y') && ($entries['other'] = array('title' => '其他事件'));
     $entries['timer'] = array('title' => '定时推送');
     \TPL::assign('reply_view_entries', $entries);
 }
Ejemplo n.º 3
0
 /**
  *
  */
 public function __construct()
 {
     parent::__construct();
     $prights = $this->model('mp\\permission')->hasMpRight($this->mpid, array('app_enroll', 'app_lottery', 'app_wall', 'app_addressbook', 'app_contribute', 'app_merchant'), 'read');
     $entries = array();
     (true === $prights || isset($prights['app_enroll']) && $prights['app_enroll']['read_p'] === 'Y') && ($entries[] = array('url' => '/mp/app/enroll', 'title' => '登记活动'));
     (true === $prights || isset($prights['app_lottery']) && $prights['app_lottery']['read_p'] === 'Y') && ($entries[] = array('url' => '/mp/app/lottery', 'title' => '抽奖活动'));
     (true === $prights || isset($prights['app_wall']) && $prights['app_wall']['read_p'] === 'Y') && ($entries[] = array('url' => '/mp/app/wall', 'title' => '信息墙'));
     (true === $prights || isset($prights['app_addressbook']) && $prights['app_addressbook']['read_p'] === 'Y') && ($entries[] = array('url' => '/mp/app/addressbook', 'title' => '通讯录'));
     (true === $prights || isset($prights['app_contribute']) && $prights['app_contribute']['read_p'] === 'Y') && ($entries[] = array('url' => '/mp/app/contribute', 'title' => '投稿'));
     (true === $prights || isset($prights['app_merchant']) && $prights['app_merchant']['read_p'] === 'Y') && ($entries[] = array('url' => '/mp/app/merchant', 'title' => '订购'));
     $this->prights = $prights;
     $this->entries = $entries;
     \TPL::assign('app_view_entries', $entries);
 }
Ejemplo n.º 4
0
 /**
  * 检查权限
  */
 public function __construct()
 {
     parent::__construct();
     $prights = $this->model('mp\\permission')->hasMpRight($this->mpid, array('matter_article', 'matter_text', 'matter_news', 'matter_channel', 'matter_link', 'matter_tmplmsg', 'matter_media'), 'read');
     $entries = array();
     (true === $prights || isset($prights['matter_article']) && $prights['matter_article']['read_p'] === 'Y') && ($entries[] = array('url' => '/mp/matter/articles', 'title' => '单图文'));
     (true === $prights || isset($prights['matter_text']) && $prights['matter_text']['read_p'] === 'Y') && ($entries[] = array('url' => '/mp/matter/texts', 'title' => '文本'));
     (true === $prights || isset($prights['matter_news']) && $prights['matter_news']['read_p'] === 'Y') && ($entries[] = array('url' => '/mp/matter/newses', 'title' => '多图文'));
     (true === $prights || isset($prights['matter_channel']) && $prights['matter_channel']['read_p'] === 'Y') && ($entries[] = array('url' => '/mp/matter/channels', 'title' => '频道'));
     (true === $prights || isset($prights['matter_link']) && $prights['matter_link']['read_p'] === 'Y') && ($entries[] = array('url' => '/mp/matter/links', 'title' => '链接'));
     (true === $prights || isset($prights['matter_tmplmsg']) && $prights['matter_tmplmsg']['read_p'] === 'Y') && ($entries[] = array('url' => '/mp/matter/tmplmsgs', 'title' => '模板消息'));
     (true === $prights || isset($prights['matter_media']) && $prights['matter_media']['read_p'] === 'Y') && ($entries[] = array('url' => '/mp/matter/media', 'title' => '图片'));
     $this->prights = $prights;
     $this->entries = $entries;
     \TPL::assign('matter_view_entries', $entries);
 }