<%@ page contentType="text/html; charset=GBK"%>
<jsp:useBean id="myEnv" scope="application" class="com.jdon.web.UserEnvFront"/>
<jsp:setProperty name="myEnv" property="*"/>

<%@ page import="java.util.*,gbase.init.*,
                 com.jivesoftware.util.*,
                 com.jivesoftware.forum.*,
                 com.jivesoftware.forum.util.*"
%>
<%
String web_account= request.getParameter("web_account")==null?"":request.getParameter("web_account");
String username="";
boolean isGuest = false;
Authorization authToken = SkinUtils.getUserAuthorization(request, response);
if (authToken == null) {
  authToken = AuthorizationFactory.getAnonymousAuthorization();
  isGuest=true;
}
myEnv.registeUserInit(authToken);
User pageUser = myEnv.getPageUser();
if(!isGuest)
username=pageUser.getUsername();
%>

<HTML>
<HEAD>
<TITLE>会员登录</TITLE>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<LINK href="css/gdtel.css" type=text/css rel=stylesheet>
<LINK href="css/other.css" type=text/css rel=stylesheet>
<script type="text/javascript" src="js/md5.js"></script>
<META content="MSHTML 6.00.2900.3059" name=GENERATOR></HEAD>
<BODY>
<%
if(isGuest){
%>
<FORM name="form" action="login_save.jsp?web_account=<%=web_account%>" method=post target="_top">
  <input name="web_account" type="hidden" value="<%=web_account%>">
  <TABLE  width="100%" border=0 align=center>
              <TBODY>
              <TR>
                <TD align=right  height="22" width="60">用户名:</TD>
                <TD>
                 <SPAN class=text7>
                  <INPUT class=input_l id=username style="WIDTH: 90px"  name=username> 
                 </SPAN>
                </TD>
              </TR>
              <TR>
                <TD align=right  height="22" width="60">密　码:</TD>
                <TD>
                 <SPAN class=text7>
                  <INPUT type=password class=input_l id=password style="WIDTH: 90px"  name=password> 
                 </SPAN>
                </TD>
              </TR>
              <TR>
                <TD colSpan=2>
                    &nbsp;<INPUT class=button type=button value=登录 name=logon onclick="check_validate(this.form)">
                    &nbsp;<INPUT class=button_bold4 onclick="check_validate1(this.form)" type=button value=会员注册 name=reg>
                </TD>
              </TR>
            </TBODY></TABLE>
           
</FORM>
<%} else {%>
<TABLE  width="100%" border=0 align=center>
  <TBODY>
     <TR>
       <TD align=center>
         <%=username%><BR>
         欢迎您的到来<BR>
         <A class=y id=lbtnLoginOut href="work.jsp?web_account=<%=web_account%>" target="_top">会员信息管理</A><BR>
         <A class=y id=lbtnLoginOut href="logout.jsp"  target="_top">注销退出</A>
       </TD>
     </TR>
  </TBODY>
</TABLE>
<%}%>
<Script Language="javaScript">
function isSpace(str){
      var len = str.length;
      for(var i=0; i< len; i++) {
        temp = str.substring(i,i+1);
        if (temp != " ") {
            return false;
        }
      }
      return true;
    }
function  check_validate(theForm) {
        if (isSpace(theForm.username.value)) {
            alert("用户名不能为空！");
            theForm.username.focus();
            return false;
        }
        if (isSpace(theForm.password.value)) {
            alert("密码不能为空！");
            theForm.password.focus();
            return false;
        }
        theForm.submit();
        
      }
function  check_validate1(theForm) {
        theForm.action="/pub/member_register.html"
        theForm.submit();
      }
</Script>
</BODY></HTML>