提示功能封装

 

 <?php

 $this->redirect('删除成功', PHP_SELF . '?m=line&page=' . $line_page . '');


 /**
     * 页面跳转 不受header限制
     *
     * @param string $msg      跳转时提示的文字
     * @param string $url      跳转到的URL(默认是返回上一级)
     * @param string $time     跳转时等待时间
     */
    public final function redirect($msg, $url = 'javascript:history.go(-1);', $time = '2')
    {
        $this->assign('msg', $msg);
        $this->assign('url', $url);
        $this->assign('time', $time);
        $this->V('redirect');
    }

?>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html xmlns="
http://www.w3.org/1999/xhtml">
<head>
<title>系统消息</title>
<meta http-equiv="content-type" content="text/html; charset=gb2312">
<style type="text/css">
body{
    font-size: 12px;
    background-color: #EAF8F9;
}
.alert {
 color: #FF9900;
 font-size: 14px;
 margin-bottom: 25px;
}
.box {
 border: #FF9900 1px solid;
 width: 460px;
 margin: 100px auto;
 background-color: #FEFBE2;
 text-align: center;
 padding: 30px;
}
.alertmsg {
 margin-top: 25px;
}
a{ text-decoration:none}
</style>

</head>
<body style="text-align:center; height:100%; width:98%;">
<div class="box">
  <h2 class="alert">$msg</h2>
  <div class="alertmsg"><a href="{$url}">将在<span id='backL'></span>秒以后将返回   如果你不想等待或浏览器没有自动跳转请点击这里跳转</a>
  </div>
</div>
<script language="JavaScript">
var url = "{$url}";
var t={$time};
function later_back(){
document.getElementById('backL').innerHTML=t;
t--;
if (t==0) location.href= url ;
setTimeout("later_back();",1000);
}
later_back();
</script>
</body>
</html>

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

wbandzlhgod

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值