<?php session_start();
include("../confic.php");
if($_POST['admin']&&$_POST['password']){
$rs=mysql_query("SELECT * FROM `".$ad."sjadmin` WHERE `name` LIKE '{$_POST['admin']}'");
$rw=mysql_fetch_assoc($rs);
	if($_POST['check']==$_SESSION['check_pic']){
	if($rw['password']==md5($_POST['password'])){
	    $_SESSION['admin_name']="adminname";
            $_SESSION['name']=$rw['name'];
            $_SESSION['user_admin']=md5($rw['name'].$rw['password'].$md);
echo "<script language=javascript>  
alert( \"恭喜你，登陆成功\"  );
location.href = \"admin_index.php\"
</script>";

}else 
die("<script language=javascript>  
alert( \"密码错误，请重新输入密码!\"  );
location.href = \"admin_login.php\"
</script>");
}else 
die("<script language=javascript>  
alert( \"验证码错误，请重新输入验证码!\"  );
location.href = \"admin_login.php\"
</script>");
}
?>