<?php
if($_SESSION["M_login"]=="" || $_SESSION["M_pwd"]==""){
	die("<script>alert(\"请登录会员帐号！\");window.location.href=\"login.php\";</script>");
}else{
	$sql="select * from sl_member where M_login='".$_SESSION["M_login"]."' and M_pwd='".$_SESSION["M_pwd"]."'";
	$result = mysqli_query($conn, $sql);
	$row = mysqli_fetch_assoc($result);
	if(mysqli_num_rows($result) > 0) {
		$M_id=$row["M_id"];
		$M_login=$row["M_login"];
		$M_email=$row["M_email"];
		$M_money=$row["M_money"];
		$M_head=$row["M_head"];
		$M_key=$row["M_key"];
		$M_vip=$row["M_vip"];
		$M_emailrest=$row["M_emailrest"];
		$M_mobilerest=$row["M_mobilerest"];
	}else{
		die("<script>alert(\"请登录会员帐号！\");window.location.href=\"login.php\";</script>");
	}
}
?>