开发工具:
文件大小: 1mb
下载次数: 0
上传时间: 2009-08-15
详细说明: <%@ page contentType="text/html; charset=GB2312" %> login <% String strUserName=(String)request.getParameter("username"); String strPassword=(String)request.getParameter("password"); String strSelect=(String)request.getParameter("select"); int intT=0; if(strSelect!=null&&strSelect.equals("student")){ intT=data.getRowCount("tb_student WHERE sname='"+strUserName+"' AND password='"+strPassword+"'"); if(intT>0){ session.setAttribute("name",strUserName); session.setAttribute("use","student"); response.sendRedirect("student/login.jsp"); }else{ out.print(show.errorBox("检查你的用户名或密码!","验证错误")); return; } }else if(strSelect!=null&&strSelect.equals("company")){ intT=data.getRowCount("tb_company WHERE cname='"+strUserName+"' AND password='"+strPassword+"'"); if(intT>0){ session.setAttribute("name",strUserName); session.setAttribute("use","company"); response.sendRedirect("company/login.jsp"); }else{ out.print(show.errorBox("检查你的用户名或密码!","验证错误")); return; } }else{ out.print(show.errorBox("检查你的用户名或密码!","验证错误")); return; } %>