error() protected method

操作错误跳转的快捷方
protected error ( string $message, boolean $ajax = false ) : voi
$message string 错误信息
$ajax boolean 是否为Ajax方
return voi
コード例 #1
0
ファイル: BaseAction.class.php プロジェクト: xcdxcd/zhongchou
 protected function error($message, $ajax = 0)
 {
     if (!$this->get("jumpUrl")) {
         if ($_SERVER["HTTP_REFERER"]) {
             $default_jump = $_SERVER["HTTP_REFERER"];
         } else {
             $default_jump = u("Index/main");
         }
         $this->assign("jumpUrl", $default_jump);
     }
     parent::error($message, $ajax);
 }
コード例 #2
0
 protected function error($message, $url_forward = '', $ms = 3, $dialog = false, $ajax = false, $returnjs = '')
 {
     //$this->jumpUrl = $url_forward;
     $this->waitSecond = $ms;
     $this->assign('dialog', $dialog);
     $this->assign('returnjs', $returnjs);
     parent::error($message, $url_forward, $ajax);
 }
コード例 #3
0
 public function error($message, $jumpUrl = '', $ajax = false)
 {
     C("LAYOUT_NAME", "layout");
     parent::error($message, $jumpUrl, $ajax);
 }
コード例 #4
0
ファイル: baseAction.class.php プロジェクト: nexteee/php
 protected function error($message, $url_forward = '', $ms = 3, $ajax = false)
 {
     $this->jumpUrl = $url_forward;
     $this->waitSecond = $ms;
     parent::error($message, $ajax);
 }
コード例 #5
0
 protected function error($message, $ajax = false)
 {
     $this->mainTpl = null;
     parent::error($message, $ajax);
 }
コード例 #6
0
ファイル: BaseAction.class.php プロジェクト: noikiy/yisheji
 protected function error($message, $jumpUrl = '')
 {
     if (isset($this->retFunc['error'])) {
         $func = $this->retFunc['error'];
         return $this->{$func}($message, $jumpUrl);
     } else {
         return parent::error($message, $jumpUrl);
     }
 }
コード例 #7
0
 /**
 +----------------------------------------------------------
 * 操作错误跳转的快捷方法
 +----------------------------------------------------------
 * @access protected
 +----------------------------------------------------------
 * @param string $message 错误信息
 * @param string $jumpUrl 页面跳转地址
 * @param Boolean $ajax 是否为Ajax方式
 +----------------------------------------------------------
 * @return void
 +----------------------------------------------------------
 */
 protected function error($message, $jumpUrl = '', $ajax = false)
 {
     if (!$ajax) {
         $this->assign('page_title', '提示信息 - ');
     }
     parent::error($message, $jumpUrl, $ajax);
     exit;
 }