class Myclass {
public function js_alert($str1,$str2='')
{
echo "<meta http-equiv=Content-Type content=text/html; charset=utf-8>";
if($str2=='')
{echo "<script>alert('$str1');history.go(-1);</script>";exit();}
else
{echo "<script>alert('$str1');location.href='$str2';</script>";exit();}
exit();
}
//後台帳號檢查
public function is_power_check()
{
@session_start();
if(empty($_SESSION['id']))
{$this->js_alert('請先登入','../manage/login');}
}
}
沒有留言:
張貼留言