Information prompt function php code
Function ShowMsg ($ msg, $ gourl, $ onlymsg = 0, $ limittime = 0) // system prompt information {/** $ msg content * $ gourl url to jump to * $ onlymsg 1 indicates that no automatic jump 0 indicates automatic jump * $ limittime jump time */global $ dsql, $ cmd_ver_lang; if (eregi ("^ gb", $ cmd_ver_lang) $ cmd_ver_lang = 'utf-8'; $ htmlhead ="\ R \ n\ R \ nSystem prompt\ R \ n
\ R \ n "; $ htmlhead. ="\ R \ n\ R \ n\ R \ n
\ R \ n script \ r \ n "; $ htmlfoot =" script "\ 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 =" script "alert (\"". str_replace ("\" "," ", $ msg ). "\"); script ";} else {$ func =" var pgo = 0; function JumpUrl () {if (pgo = 0) {location = '$ gourl'; pgo = 1 ;}\ r \ n "; $ rmsg = $ func; $ rmsg. = "document. write (\"
System prompt:
\ "); \ 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, 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 ;}