<?php
class
Tips{
private
$tips
;
static
private
$_instance
;
private
function
__construct(
$string
,
$url
)
{
$this
->tips = "
<meta http-equiv=refresh content=4;url=
$url
>
<div style=
'border:1px solid #B4D8F4; width:320px; height:120px; margin:0 auto; font-size:12px;'
>
<div style=
'background-color:#CDE6F9; height:20px;'
></div>
<div align=
'center'
style=
'font-size:14px; font-weight:bold; margin:20px 0 20px 0;'
>
$string
</div>
<div align=
'center'
><a href=
'$url'
>返回</a> (4秒后自动返回)</div>
</div>
";
return
$this
->tips;
}
public
function
__toString(){
return
$this
->tips;
}
private
function
__clone(){}
public
static
function
get_tips(
$string
,
$url
)
{
if
( FALSE == (self::
$_instance
instanceof
self) )
{
self::
$_instance
=
new
self(
$string
,
$url
);
}
return
self::
$_instance
;
}
}
?>