data['baseUrl'] = ( )->APP_URL; $this->_session = ( "admin" ); if ( isset( $this->_session->user ) ) { return array( "/admin/auth/login", "internal" ); } $this->data['administrator'] = $this->_session->user; if ( $resource != "PublicController" ) { $this->data['header'] = ( )->getModule( "admin", "PublicController", "publicHeader" ); $this->data['sider'] = ( )->getModule( "admin", "PublicController", "publicSider" ); $this->data['footer'] = ( )->getModule( "admin", "PublicController", "publicFooter" ); } } public function isPost( ) { if ( $_SERVER['REQUEST_METHOD'] == "POST" ) { return TRUE; } return FALSE; } public function showMsg( $msg, $gourl, $onlymsg = 0, $limittime = 0 ) { $htmlhead = "\r\n\r\n\r\n提示信息\r\n\r\n"; $htmlhead .= "\r\n\r\n\r\n
\r\n\r\n
\r\n\r\n\r\n"; $litime = $limittime == 0 ? 1000 : $limittime; $func = ""; if ( $gourl == "-1" ) { if ( $limittime == 0 ) { $litime = 5000; } $gourl = "javascript:history.go(-1);"; } if ( $gourl == "" || $onlymsg == 1 ) { $msg = ""; } else { if ( preg_match( "/close::/", $gourl ) ) { $tgobj = trim( preg_replace( "/close::/", "", $gourl ) ); $gourl = "javascript:;"; $func .= "window.parent.document.getElementById('".$tgobj."').style.display='none';\r\n"; } $func .= " var pgo=0;\r\n function JumpUrl(){\r\n if(pgo==0){ location='".$gourl."'; pgo=1; }\r\n }\r\n"; $rmsg = $func; $rmsg .= "document.write(\"
"; $rmsg .= "
提示信息!
\");\r\n"; $rmsg .= "document.write(\"

\");\r\n"; $rmsg .= "document.write(\"".str_replace( "\"", "“", $msg )."\");\r\n"; $rmsg .= "document.write(\""; if ( $onlymsg == 0 ) { if ( $gourl != "javascript:;" && $gourl != "" ) { $rmsg .= "
如果你的浏览器没反应,请点击这里..."; $rmsg .= "
\");\r\n"; $rmsg .= "setTimeout('JumpUrl()',".$litime.");"; } else { $rmsg .= "
\");\r\n"; } } else { $rmsg .= "

\");\r\n"; } $msg = $htmlhead.$rmsg.$htmlfoot; } echo $msg; exit( ); } } ?>