⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 login.jsp

📁 Sun公司Dream项目
💻 JSP
字号:
<%//@ include file="common_imports.jsp" %>



<%@ page import="com.sun.dream.shop.*,

                    java.util.*" %>

<%@ page import="com.sun.sjc.idtv.vod.shared.data.*" %>

<%@ page import="com.sun.sjc.idtv.vod.server.subscriber.*" %>

<%@ page import="com.sun.sjc.idtv.vod.server.conductor.*" %>





<%

    String pageTitle = "Welcome to Project DReaM-Zone";

    String jspPath = request.getParameter("jsp_path");



    String homeTab = "off";

    String musicTab = "off";

    String videoTab = "off";

    String gameTab = "off";

    String ringtoneTab = "off";

    String screensaverTab = "off";

    String uploadTab = "off";



    boolean showSubMenu = false;

    boolean showFlashy = false;

    boolean showLeftNav = true;

    String sessionId = null;

    String userID = null;



    boolean isSignin = false;

    int totalItems = 0;

    SessionCache sessioncache = new SessionCache();



    pageTitle = "Login";

    //request.getRequestDispatcher(jspPath).forward(request, response);

    

    //String newCustomer = request.getParameter("new_customer");

    if (jspPath == null)

        jspPath = "/shop/index.jsp";

    

    String action = request.getParameter("action");

    String error = null;

    if (action == null)

        action = "NOOP";

    

    if (action.equals("user_login_submit")) {

        String userid = request.getParameter("userid");

        String passwd = request.getParameter("password");

        if (userid == null || userid.trim().equals("") || passwd == null ||

        passwd.trim().equals("")) {

            error = "You must fill in user ID and password fields.";

        } else {

            String actualPassword = DBUtil.getField(

            "SELECT password FROM OPERA_USER_INFO WHERE userid = '" + userid + "'",

            java.sql.Types.VARCHAR, null);

            if (actualPassword == null) {

                error = "Invalid user ID.";

            } else {

                if (actualPassword.equals(passwd)) {

                    session.setAttribute("userid", userid);

                    session.setAttribute("opera.signin", "true");

                    request.getRequestDispatcher(jspPath).forward(request, response);

                    return;

                } else {

                    error = "Invalid password.";

                }

            }

        }

    }

    /*

    else if ("register2".equals(action)) {

        String userID = request.getParameter("userid");

        String passwd1 = request.getParameter("password1");

        String passwd2 = request.getParameter("password2");

        String phone = request.getParameter("phone"):

        

        if (userID == null || userID.trim().equals("") || 

            passwd1 == null || passwd1.trim().equals("") ||

            passwd2 == null || passwd2.trim().equals("") ||

            phone == null || phone.trim().equals("")) {

            error = "All fields are required."; 

        } else if (! passwd1.equals(passwd2)) {

            error = "Both password and confirm password must be the same.";

        } else {

            String sql = "INSERT INTO OPERA_USER_INFO (

        

        

        

        }

    }

    */           

    

%>



<%@ include file="top_body.jsp" %>



            <td width="395" valign="top">

              <table width="375" border="0" cellspacing="0" cellpadding="0">

                <tr>

                  <td>&nbsp;</td>

                </tr>

                <tr>

                  <td align="center">

                    <form name="signinForm" method="post">

                      <INPUT type="hidden" name="action" value="user_login_submit">

                      <INPUT type="hidden" name="jsp_path" value="<%=jspPath%>">

                      <INPUT type="hidden" name="shop_action" value="user_signin">

                      <table width="375" border="0" cellspacing="0" cellpadding="4">

                        <tr>

                          <td class="body_text" width="187">&nbsp;User Name :</td>

                          <td width="187" ><input type="text" name="userid" value="<%=(userID == null?"":userID)%>"></td>

                        </tr>

                        <tr>

                          <td class="body_text">&nbsp;Password :</td>

                          <td><input type="password" name="password"></td>

                        </tr>

                        <tr>

                          <td colspan="2">&nbsp;</td>

                        </tr>

                        <tr>

                          <td colspan="2" align="center"><input type="submit" value="Login" /></td>

                        </tr>

                      </table>

                    </form>

                  </td>

                </tr>

              </table>

            </td>

<%@ include file = "right_content.jsp" %>

<%@ include file="footer.jsp" %>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -