JSP在线CD销售系统

ASP在线CD销售系统|计算机专业全套免费毕业设计论文网,因为源代码过多,我只粘贴部分源代码,需要全部代码的,可以联系站长QQ3249114,本毕业设计免费,谢谢支持

JSP登录系统源代码:login.jsp

<%@ page contentType="text/html;charset=gb2312" %>
<%@ page session="true" %>
<jsp:useBean id="login" scope="page" class="cdshop.run.login" />
<%
String mesg = "";

if( request.getParameter("username")!=null && !request.getParameter("username").equals("")){
 String username =request.getParameter("username");
 String passwd = request.getParameter("passwd");
 username = new String(username.getBytes("ISO8859-1"));
 passwd = new String(passwd.getBytes("ISO8859-1"));
 login.setUsername(username);
 login.setPasswd(passwd);
 out.print(username+passwd);
 if (login.excute()){
  session.setAttribute("username",username);
  String userid = Long.toString(login.getUserid());
  session.setAttribute("userid",userid);
  response.sendRedirect("cdlist.jsp");
  %>
<% 
 }else {
 mesg = "登录出错!" ;
 }
}
%>
<%@include file="inc/head.inc"%>

<script language="javascript">

 function checkform() {
 if (document.form1.username.value=="" || document.form1.passwd.value==""){
  alert("用户名或密码为空!");
  return false;
 }
 return true;

  }

</script>
<div align=center>用户登录 </div>
          <br>         
<% if (!mesg.equals("")){
      out.println("<p>" + mesg + "</p>");}%>
      
  <form name="form1" method="post" action="login.jsp">
    <table width="400" border="0" cellspacing="1" cellpadding="1" align="center">
    <tr>
      <td width="147" align="right">用户名:<br>
      </td>
      <td width="246" valign="top">
          <input type="text" name="username" size="16" maxlength="25">
        </td>
    </tr>
    <tr>
      <td width="147" align="right">密码:</td>
      <td width="246" valign="top">
          <input type="password" name="passwd" maxlength="20" size="16">
        </td>
    </tr>
    <tr>
      <td width="147" align="right">&nbsp;</td>
      <td width="246" valign="top">
          <input type="submit" name="Submit" value="登录" onclick="javascript:return(checkform());">
          <input type="reset" name="Submit2" value="取消">
        </td>
    </tr>
    <tr>    
      <td colspan="2" align="center">
        <p>&nbsp;</p>
        测试用户:1 密码:1
      </td>
    </tr>
    <tr>
   
      <td colspan="2" align="center">
        <p>&nbsp;</p>
        <p>如果你还不是本站用户,请在此<a href="reg.jsp">注册</a></p>
      </td>
    </tr>
  </table>
    </form>
 <%@include file="inc/tail.inc"%>

首页源代码:index.jps

<%@ page contentType="text/html;charset=gb2312" %>
<%@ page import="java.util.*" %>
<%@ page session="true" %>
<%@include file="inc/head.inc"%>
<br>

  <form name="form1" method="post" action="login.jsp">
          <div align=center>用户登录 </div>
          <br>         
          <table width="300" border="0" cellspacing="1" cellpadding="1" align="center"  bgcolor="#FFCC99">
          <br>
            <tr>
              <td align="right">用户名:</td>
              <td>
                <input type="text" name="username" size="15" maxlength="25">
              </td>
            </tr>
            <tr>
              <td align="right">密码:</td>
              <td>
                <input type="password" name="passwd" size="15" maxlength="20">
              </td>
            </tr>
            <tr>
              <td colspan="2" align="center">
                <input type="submit" name="Submit" value="登录">
             
                <input type="reset" name="Submit2" value="取消">
              </td>
            </tr>
             <tr>    
            <td colspan="2" align="center">
          <p>&nbsp;</p>
             测试用户:1 密码:1
        </td>
        </tr>
            <tr>
              <td colspan="2" align=center>如果不是本站会员,请在此<a href="reg.jsp">注册</a>。</td>             
            </tr>
         </table>
   </form>

<%@include file="inc/tail.inc"%>

[1] [2] [3] [4] [5] 下一页

Copyright © 2007-2012 www.chuibin.com 六维论文网 版权所有