if(!function_exists('ShowMsg')) { function ShowMsg($msg='', $gourl='-1') { if($gourl == '-1') echo '<script>alert("'.$msg.'");history.go(-1);</script>'; else if($gourl == '0') echo '<script>alert("'.$msg.'");location.reload();</script>'; else echo '<script>alert("'.$msg.'");location.href="'.$gourl.'";</script>'; } }