function ShowMsg($msg,$gourl,$onlymsg = 0,$limittime = 0) //系统提示信息
{
/*
*$msg 信息提示的内容
*$gourl 需要跳转的网址
*$onlymsg 1 表示不自动跳转 0表示自动跳转
*$limittime 跳转的时间
*/
global $dsql,$cfg_ver_lang;
if (eregi ( "^gb",$cfg_ver_lang ))
$cfg_ver_lang = 'utf-8';
$htmlhead = "rn
rn系统提示rn
content="text/html; charset=utf-8" />rn";
$htmlhead .= "rnrnrnrnrnrnrnrn";
if ($limittime == 0)
$litime = 3000;
else
$litime = $limittime;
if ($gourl == "-1") {
if ($limittime == 0)
$litime = 3000;
$gourl = "javascript:history.go(-1);";
}
if ($gourl == "" || $onlymsg == 1) {
$msg = "";
} else {
$func = " var pgo=0;
function JumpUrl(){
if(pgo==0){ location='$gourl'; pgo=1; }
}rn";
$rmsg = $func;
$rmsg .= "document.write("
";
$rmsg .= "
提示信息!
");rn";
$rmsg .= "document.write("
");rn";
$rmsg .= "document.write("".str_replace(""",$msg)."");rn";
$rmsg .= "document.write("";
if ($onlymsg == 0) {
if ($gourl != "javascript:;" && $gourl != "") {
$rmsg .= "
如果你的浏览器没反应,请点击这里...";
}
$rmsg .= "
");rn";
if ($gourl != "javascript:;" && $gourl != "") {
$rmsg .= "setTimeout('JumpUrl()',$litime);";
}
} else {
$rmsg .= "
");rn";
}
$msg = $htmlhead . $rmsg . $htmlfoot;
}
if (isset ( $dsql ) && is_object ( $dsql ))
@$dsql->Close ();
echo $msg;
}