<%@ page contentType= "text/html; charset=gb2312 " language= "java " import= "java.sql.* " errorPage= " " %>
<%@ include file= "conn.jsp "%>
<html>
<head>
<meta http-equiv= "Content-Type " content= "text/html; charset=gb2312 " />
<title> 冷锋论坛 </title>
</head>
<body>
<%
String p=request.getParameter( "past ");
if( "true ".equals(p))
{
if(session.getAttribute( "islogin ")==null)
{%> <%
String Uname=request.getParameter( "username ");
String pass=request.getParameter( "passwd ");%> <%
String sql= "select * from nembers where UserID= ' "+Uname+ " 'and userPass= ' "+pass+ " ' ";
ResultSet result=stmt.executeQuery(sql);%> <%
if (result.next())
{
request.getSession().setAttribute( "islogin ", "true ");
}
else
{%> <%
out.print( " <script language= 'JavaScript '> alert( '用户名称或密码不正确,请重新登陆 '); </script> ");
}%> <%
}
else
{
out.print( " <script language=\ "JavaScript\ "> alert(\ "您已经登陆了\ "); </script> ");
}
}
%>
<div align= "left ">
<table width= "756 " border= "0 " cellpadding= "0 " cellspacing= "0 ">
<!--网页头部-->
<tr>
<td width= "778 " height= "105 " valign= "top "> <img src= "lengfeng.gif " width= "771 " height= "105 " /> </td>
</tr>
</table>
</div>
<div align= "left ">
<table width= "1008 " border= "1 " cellpadding= "0 " cellspacing= "0 ">
<!--导航栏-->
<HR>
<tr bgcolor= "#CCCC33 ">
<td width= "500 " height= "30 " valign= "middle "> <font color= "#000000 " size= "2 " face= "宋体 "> 欢迎您:游客(登陆|注册) </font> </td>