<%@ page language="java" buffer="100kb" errorPage="/common/error.jsp"%>

<%@ page import="org.apache.struts.Globals" %>
<%@ page import="vkc.view.WebShare" %>
<%@ page import="vkc.db.serializer.VKCSysParameterSerializer"%>

<%@ taglib uri="struts-bean"  prefix="bean"  %>
<%@ taglib uri="struts-html"  prefix="html"  %>
<%@ taglib uri="struts-logic" prefix="logic" %>
<%@ taglib uri="vkc-taglib"   prefix="vkc"   %>

<% String ctxPath = request.getContextPath();%>

<html:html locale="true">
<head>

    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <meta http-equiv="cache"        content="no-cache">
    <meta http-equiv="expires"      content="0">

    <vkc:cssinclude />

    <title>VKC Login</title>
    <script type="text/javascript" src="<vkc:rewrite page='/common/utils.js'/>"></script>

    <script type="text/javascript">
	if (<%=VKCSysParameterSerializer.retrieveIntValue("LOGIN", "StandaloneModus", 1)%> != 0) {
	    if (top != self) {
	        top.location = self.location;
	    }
	}

    function init() {
        document.forms[0].username.focus();
    }

    </script>

</head>
<body onload="init();" id="default" marginwidth="0" marginheight="0">
<table width="100%" cellspacing="0" cellpadding="0" border="0">
  <html:form action="/registerNewUser" method="post">

  <tr><td><vkc:img page="/templates/${template.name}/gfx/trans.gif" alt="" height="100" width="20" border="0"/></td></tr>

  <vkc:hline lineHeight="1" lineClass="hline" colspan="1" bottomSpace="0" topSpace="0" />

  <tr><td align="center" class="loginMiddle"><vkc:img page="/templates/${template.name}/gfx/trans.gif" alt="" height="20" border="0"/></td></tr>

  <tr>
    <td align="center" class="loginMiddle">
      <table cellspacing="0" cellpadding="0" border="0">
        <tr>
          <td align="center"><vkc:img page="/templates/${template.name}/gfx/vkc-logo-large.gif" alt="VKC" border="0"/></td>
          <td width="20"><vkc:img page="/templates/${template.name}/gfx/trans.gif" alt="" width="20" border="0"/></td>
          <td width="1" class="hline"><vkc:img page="/templates/${template.name}/gfx/trans.gif" alt="" width="1" height="1" border="0"/></td>
          <td width="25"><vkc:img page="/templates/${template.name}/gfx/trans.gif" alt="" width="25" border="0"/></td>
          
          <td align="center" valign="middle">
            <table align="left" cellspacing="1" cellpadding="0" border="0">
              <tr>
                <td align="center">
                  <table cellspacing="0" cellpadding="0" border="0">
                    <tr>
                      <td align="center">
                        <table cellspacing="0" cellpadding="0" border="0">
						  <logic:present name="<%=Globals.ERROR_KEY%>">
						  <tr><td align="left" colspan="2"><vkc:errors/></td></tr>
                          <tr><td height="1" colspan="2"><vkc:img page="/templates/${template.name}/gfx/trans.gif" alt="" width="1" height="5" border="0"/></td></tr>
						  </logic:present>

						  <tr>
					        <td width="0" align="left" nowrap="nowrap" colspan="2"><b><vkc:message key="vkc.administration.usercreate"/></b></td>
					      </tr>
					
                          <vkc:hline colspan="2" lineClass="hline" lineHeight="1" topSpace="5" bottomSpace="5"/>
					
						  <tr>
							<td nowrap="nowrap"><b><vkc:message key="vkc.administration.username" />:</b></td>
							<td>&nbsp;<vkc:text property="username" style="width:300px;" size="35" maxlengthProperty="user.username"/></td>
						  </tr>
					
						  <tr>
							<td nowrap="nowrap"><b><vkc:message key="vkc.administration.firstname" />:</b></td>
							<td>&nbsp;<vkc:text property="firstname" style="width:300px;" size="35" maxlengthProperty="user.firstname"/></td>
						  </tr>
					
					      <tr>
					        <td nowrap="nowrap"><b><vkc:message key="vkc.administration.lastname" />:</b></td>
					        <td>&nbsp;<vkc:text property="lastname" style="width:300px;" size="35" maxlengthProperty="user.lastname"/></td>
					      </tr>
					
					      <tr>
					        <td nowrap="nowrap"><b><vkc:message key="vkc.administration.email" />:</b></td>
					        <td>&nbsp;<vkc:text property="email" style="width:300px;" size="35" maxlengthProperty="user.email"/></td>
					      </tr>

                          <vkc:hline colspan="2" lineClass="hline" lineHeight="1" topSpace="5" bottomSpace="5"/>

                          <tr>
                            <td align="center" colspan="2">
							  <vkc:button property="action.create.user" onclick="javascript:disableAllButtonsAndSubmit(this);"><vkc:message key="vkc.administration.button.createUser"/></vkc:button>
							  <vkc:button property="action.back" onclick="javascript:disableAllButtonsAndSubmit(this);"><vkc:message key="button.back"/></vkc:button>
                            </td>
                          </tr>
                        </table>
                      </td>
                    </tr>
                  </table>
                </td>
              </tr>
            </table>
          </td>
        </tr>
      </table>
    </td>
  </tr>
  <tr><td align="center" class="loginMiddle"><vkc:img page="/templates/${template.name}/gfx/trans.gif" alt="" height="20" border="0"/></td></tr>

  <tr><td align="center" class="loginMiddle"><vkc:img page="/templates/${template.name}/gfx/trans.gif" alt="" height="20" border="0"/></td></tr>
  <logic:present name="<%=WebShare.INFO_KEY%>" scope="request">
  <bean:define id="message" type="java.lang.String" scope="request" name="<%=WebShare.INFO_KEY%>"/>
  <tr><td align="center" nowrap="nowrap" bgcolor="#f2f2f2"><b><vkc:message key="<%=message%>"/></b></td></tr>
  </logic:present>

  <tr><td align="center" class="loginMiddle"><vkc:img page="/templates/${template.name}/gfx/trans.gif" alt="" height="20" border="0"/></td></tr>
  <vkc:hline lineHeight="1" lineClass="hline" colspan="1" bottomSpace="0" topSpace="0" />
  </html:form>
</table>
</body>
</html:html>
