string user = this.Request["user"]+"";
user = cs.funBase.SqlRequest(user);
string password = this.Request["password"]+"";
password = cs.funBase.md5(password,32);
string commstr=String.Format("select AdminName from t_Admin where AdminName='{0}' and Password= '{1}' ",user,password);

//////////////////
SqlConnection myConnection = new SqlConnection();
myConnection.ConnectionString=strConn;
SqlCommand scAcco=new SqlCommand();
scAcco.Connection=myConnection;
scAcco.CommandText=commstr;
scAcco.Connection.Open();
SqlDataReader dr=scAcco.ExecuteReader();
string tt;
while(dr.Read()) //这里跳过了一次也没执行循环,但是我保证数据库中有记录,并且只有一条,
{  
tt=dr.GetValue(0).ToString();
if (tt!="")
t=true;
else
t=false;

}
dr.Close(); ////////////////////////
if(t)
{
Session["Admin"]=user;
Session["chrList"]=chrlist(Session["Admin"].ToString());
cs.funBase.Mess("登录成功","frameset1.htm","this");

}
else
{
//cs.funBase.Mess("该用户名不存在","index.html","this");
Response.Write("t="+t.ToString()+"  user="+user+"  password="+password+ " 连接字"+commstr);
}
}