PHP Quick generate a variety of Information prompt box method, PHP generated information
This article explains how PHP quickly generates various informational cue boxes. Share to everyone for your reference, as follows:
function ShowMsg ($msg, $gourl, $onlymsg = 0, $limittime = 0)//system hint information {/** $msg the content of the message * $gourl the URL to jump to * $onlymsg 1 means not automatically jump 0 table * * $limittime Jump Time * * * global $dsql, $cfg _ver_lang; if (eregi ("^GB", $cfg _ver_lang)) $cfg _ver_lang = ' utf-8 '; $htmlhead = "\ r \ n\ r \ n<title>System Tips</title>\ r \ n
\ r \ n "; $htmlhead. = "\ r \ n\ r \ n\ r \ n
\r\n\r\n
\ r \ n\ r \ n\ r \ n "; if ($limittime = = 0) $litime = 5000; else $litime = $limittime; if ($gourl = = "-1") {if ($limittime = = 0) $litime = 5000; $gourl = "Javascript:history.go (-1);"; if ($gourl = = "" | | $onlymsg = = 1) {$msg = ""; } else {$func = "var pgo=0; function Jumpurl () {if (pgo==0) {location= ' $gourl '; pgo=1;} }\r\n "; $rmsg = $func; $rmsg. = "document.write (\")
System prompt information: \ "); \ 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. = "
If your browser does not respond, please click here ... "; } $rmsg. = "
\ "); \ r \ n"; if ($gourl! = "javascript:;" && $gourl! = "") {$rmsg. = "SetTimeout (' Jumpurl () ', $litime);";}} else {$rmsg. = "
\ "); \ r \ n"; } $msg = $htmlhead. $rmsg. $htmlfoot; } if (Isset ($dsql) && is_object ($dsql)) @ $dsql->close (); echo $msg;}
More interested in PHP related content readers can view the topic: "PHP Basic Grammar Introductory Tutorial", "PHP common functions and skills summary" and "PHP Object-oriented Programming primer tutorial"
I hope this article is helpful to you in PHP programming.
Articles you may be interested in:
- PHP implementation similar to JS in alert () Prompt box
- PHP pop-up popup and jump to new page to redirect to New page
- Two ways to implement pop-up message prompt with PHP
- Php+ajax do imitation Baidu search dropdown automatic prompt box (there are instances)
- PHP Simple alert box alert Package function
http://www.bkjia.com/PHPjc/1098690.html www.bkjia.com true http://www.bkjia.com/PHPjc/1098690.html techarticle PHP quickly generate a variety of Information prompt box method, PHP generated information in this paper, a quick example of PHP to generate a variety of Information prompt box method. Share to everyone for your reference, as follows: ...