function alert ($msg,$url=")
{
{
$str = '<script type="text/javascript">';$str.="alert('".$msg."');";if ($url != "){$str.="window.location.href='{$url}';";}else{$str.="window.history.back();";}echo $str.='</script>';
}