/**
  * 显示错误
  * 
  * @param array $error array('',array())
  */
 protected function showError($error = '', $referer = '', $refresh = false)
 {
     $referer && ($referer = WindUrlHelper::createUrl($referer));
     $this->addMessage($referer, 'referer');
     $this->addMessage($refresh, 'refresh');
     parent::showMessage($error);
 }
 public function beforeAction($handlerAdapter)
 {
     parent::beforeAction($handlerAdapter);
     $this->setLayout('layout');
     $this->setOutput('utf8', 'charset');
     $this->setGlobal($this->getRequest()->getBaseUrl(true) . '/template/images', 'images');
     $this->setGlobal($this->getRequest()->getBaseUrl(true) . '/template/images', 'css');
 }
 /**
  * 风格设置
  *
  * 设置当前页面风格,需要两个参数,$type风格类型,$theme该类型下风格
  *
  * @see WindSimpleController::setTheme()
  * @param string $type 风格类型(site,space,area...)
  * @param string $theme 风格别名
  */
 protected function setTheme($type, $theme)
 {
     $config = Wekit::C('site');
     $themePack = $config['theme.' . $type . '.pack'];
     $themePack = 'THEMES:' . $themePack;
     // 风格预览,管理员权限
     if ($style = Pw::getCookie('style_preview')) {
         list($s_theme, $s_type) = explode('|', $style, 2);
         if ($s_type == $type) {
             $theme = $s_theme;
             Wekit::C()->site->set('theme.' . $type . '.default', $theme);
         }
     }
     if (!$theme) {
         $theme = $config['theme.' . $type . '.default'];
     }
     parent::setTheme($theme, $themePack);
 }
 /**
  * 显示错误
  *
  * @param array $error array('',array())
  */
 protected function showError($error = '', $lang = true, $referer = '', $refresh = false)
 {
     // 		$referer && $referer = WindUrlHelper::createUrl($referer);
     $this->addMessage('up87to90.php?step=init&action=end&seprator=1&token=' . $this->getInput('token', 'get'), 'referer');
     $this->addMessage($refresh, 'refresh');
     if ($lang) {
         $lang = Wind::getComponent('i18n');
         $error = $lang->getMessage($error);
     }
     parent::showMessage($error);
 }
 public function resolveActionFilter($filters)
 {
     return parent::resolveActionFilter($filters);
 }
 /**
  * 显示错误
  *
  * @param array $error array('',array())
  */
 protected function showError($error = '', $lang = true, $referer = '', $refresh = false)
 {
     $referer && ($referer = WindUrlHelper::createUrl($referer));
     $this->addMessage($referer, 'referer');
     $this->addMessage($refresh, 'refresh');
     if ($lang) {
         $lang = Wind::getComponent('i18n');
         $error = $lang->getMessage($error);
     }
     parent::showMessage($error);
 }