Esempio n. 1
0
 /**
  * 跳转到指定url
  * 运行后直接退出此次请求
  * @param string $url 客户端跳转的URL绝对路径或者控制器路径<br>根目录控制器请开头补“/”
  * @param mixed $data 带着数据跳转
  */
 public static function to($url, $data = null, $status = 'HTTP/1.1 301')
 {
     $url = yyuc::url($url);
     if (self::$renew) {
         $url = $url . '@YYUC_RENEW';
     }
     header($status);
     header("Location:{$url}");
     //echo '<meta http-equiv="Refresh" content="0"; url="'.$url.'" />';
     if ($data !== null) {
         Session::once('YYUC_REDIRECT_DATA', $data);
     }
     echo 'This page has moved to <a href="' . $url . '">' . $url . '</a>';
     die;
 }
Esempio n. 2
0
<?php

Page::ignore_view();
if ('renew' == Request::get(1)) {
    die('11');
    Session::clear();
    Cookie::clear();
}
$m = new SampleModel();
if ($m->try_post()) {
    if ($m->pwd == Conf::$management_center_password) {
        Auth::im_admin('YYUC_sys');
        Redirect::to('index');
    } else {
        Session::once('logerr', '登录失败!');
    }
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<title>YYUC开发管理中心</title>
		<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
		<script type="text/javascript">var yyuc_jspath = "/@system/";</script>
		<script type="text/javascript" src="/@system/js/jquery.js"></script>
		<script type="text/javascript" src="/@system/js/yyucadapter.js"></script>
		<!-- stylesheets -->
		<link rel="stylesheet" type="text/css" href="/@system/mg/reset.css" />
		<link rel="stylesheet" type="text/css" href="/@system/mg/style.css" media="screen" />
		<link id="color" rel="stylesheet" type="text/css" href="/@system/mg/colors/blue.css" />
		<style>