<?php 
session_start(); //开着身份验证，以
include("../sql/conn.php"); /////写
header("Content-type: text/html; charset=utf-8"); 
$llym = $_SERVER["HTTP_REFERER"];
?>


<?php
if($_GET['dl']==dl)
{
$result = mysql_query("SELECT * FROM ".$b_qz."_user where user_1 ='".$_POST['user_1']."'");
while($row = mysql_fetch_array($result))
	  {
			if($row['pw']==$_POST['pw'])
			{
			    if($row['xing']==0)
				{
				echo "<script>alert('0星用户，禁止登陆');</script>";
				echo "<meta http-equiv=refresh content=0.1;url=".$llym." >";
				exit;
				}
			$_SESSION['user_1'] = $_POST['user_1'];
			$_SESSION['id'] = $row['id'];
			$_SESSION['xing'] = $row['xing'];
			$_SESSION['jf'] = $row['jf'];
			
if($_POST['user_1']==''){
}else{
		mysql_query("INSERT INTO ".$b_qz."_text (user, ip1, time1, dm, ting) VALUES 
		('".$_SESSION['user_1']."','".$iipp."','".$noww."', 'login','[".$_POST["user_1"]."]登陆')");
}

			echo "<script>alert('成功登陆！');</script>";
			echo "<meta http-equiv=refresh content=0.1;url=".$llym." >";
			exit;
			}else{
			echo "<script>alert('登陆失败！');</script>";
			echo "<meta http-equiv=refresh content=0.1;url=".$llym." >";
			exit;
			}
	  }
}
?>


<?php include("../sql/close.php"); /////写?>
