Subversion Repositories DevTools

Rev

Rev 1337 | Blame | Compare with Previous | Last modification | View Log | RSS feed

<%@LANGUAGE="VBSCRIPT"%>
<%
'=====================================================
'|                                                   |
'|                   SIGN UP                         |
'|                                                   |
'=====================================================
%>
<%
Option explicit
' Good idea to set when using redirect
Response.Expires = 0   ' always load the page, dont store
%>
<!--#include file="common/conf.asp"-->
<!--#include file="common/globals.asp"-->
<!--#include file="common/formating.asp"-->
<!--#include file="common/qstr.asp"-->
<!--#include file="common/common_subs.asp"-->
<!--#include file="sec/Crypt.asp"-->
<%
'------------ ACCESS CONTROL ------------------
%>
<!--#include file="_access_control_general.asp"-->
<%
'------------ Variable Definition -------------
'------------ Constants Declaration -----------
'------------ Variable Init -------------------
'----------------------------------------------
%>
<%
Sub Sign_Up_User ( SSfullname, SSemail, SSusername, SSpassword, SSdomainauth, SSdomain_name )
   Dim SEQ_user_id

   If User_Name_Exists ( SSusername ) Then
      ' Username exists
      Session("AdditionalParams") = "$USERNAME$,"& SSusername
      Response.Redirect("message.asp?msg=202-14")
   End If

   SEQ_user_id = Get_From_DUAL("SEQ_USER_ID.nextval")
   If SSdomainauth = "" Then
      SSdomainauth = "N"
      SSpassword = EnCrypt( SSpassword )
   End If
   SSfullname = Replace( SSfullname, "'", "''")
   SSemail = Replace( SSemail, "'", "''")

   objEH.TryORA ( OraSession )
   On Error Resume Next
   OraDatabase.ExecuteSQL " INSERT INTO users (user_id, full_name, user_name, user_password, user_email, domain_auth, domain_name, disabled)"&_
                     " VALUES ( "& SEQ_user_id &", '"& SSfullname &"', '"& SSusername &"', '"& SSpassword &"', '"& SSemail &"', '"& SSdomainauth &"', '"& SSdomain_name &"', 'Y' )"
   objEH.CatchORA ( OraSession )

End Sub
%>
<%
'--- Process submition ---
If CBool(QStrPar("action")) Then
   ' All mandatory parameters FOUND
   Call Sign_Up_User ( Request("FRfullname"), Request("FRemail"), Request("FRusername"), Request("FRpassword"), Request("FRdomainauth"),  Request("FRdomain_name") )
   Call Send_Email ( Request("FRfullname"), Request("FRemail"), adminEmail, "Release Manager - New Member Signed Up", "Please enable this account for use.", NULL )

   Response.Redirect("message.asp?msg=200-6")
End If
%>
<html>
<head>
<title>Release Manager</title>
<meta HTTP-EQUIV="Pragma" CONTENT="no-cache">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" href="images/release_manager_style.css" type="text/css">
<link rel="stylesheet" href="images/navigation.css" type="text/css">
<script language="JavaScript" src="images/common.js"></script>
<!-- TIPS -->
<script language="JavaScript" src="images/tipster.js"></script>
<script language="JavaScript" src="images/_help_tips.js"></script>
<script language="JavaScript">
<!--
// Auto username
function AutoUsername() {
   var email,autouser,p;
   email=String(document.signup.FRemail.value);
   autouser=email.substring(0,email.indexOf('@'));
   if (document.signup.FRusername.value=='') document.signup.FRusername.value = autouser;
}

function DisablePassword() {
   if (MM_findObj("FRdomainauth").checked) {
      MM_findObj("FRdomain_name").disabled=false;
      MM_findObj("FRstatus3").value='';
      MM_findObj("FRpassword").disabled=true;
      MM_findObj("FRpasswordc").disabled=true;
      MM_findObj("FRstatus1").value='Not Required!';
      MM_findObj("FRstatus2").value='Not Required!';
   } else {
      MM_findObj("FRdomain_name").disabled=true;
      MM_findObj("FRstatus3").value='Not Required!';
      MM_findObj("FRpassword").disabled=false;
      MM_findObj("FRpasswordc").disabled=false;
      MM_findObj("FRstatus1").value='';
      MM_findObj("FRstatus2").value='';
   }
}

//-->
</script>
</head>
<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" >
<!-- TIPS LAYERS -------------------------------------->
<div id="formTipsLayer" style="position: absolute; z-index: 1000; visibility: hidden; left:0; top: 0; width: 10">&nbsp;</div>
<!----------------------------------------------------->
<!-- HEADER -->
<!--#include file="_header.asp"-->
<!-- BODY ---->
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td width="1%" background="images/bg_member_dark.gif" valign="top">
      <!-- MEMBERS MENU ---------------------------------------------->
      <!--  MEMBERS MENU END ------------------------------------------>
    </td>
    <td width="1%" valign="top" background="images/bg_member_light.gif"><a href="index.asp" class="form_txt_link"><img src="images/i_home.gif" width="13" height="12" border="0" align="absmiddle">Exit</a></td>
    <td rowspan="2" valign="top" width="1%" background="images/bg_member_light.gif" nowrap>
      <!------------------------------------------->
      <br>
      <span class="mmb_ttl">Sign Up</span><br>
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <form name="signup" method="post" action="sign_up.asp" onSubmit="MM_validateForm('FRfullname','Name and Surname','R','FRemail','Email','RisEmail','FRusername','Username','RisCleanStrinLength2:','FRpassword','Password','isCleanStrisPasswordinLength6:');return document.MM_returnValue">
          <tr>
            <td width="1%">&nbsp;</td>
            <td><img src="images/h_trsp_dot.gif" width="500" height="30"></td>
            <td width="1%">&nbsp;</td>
          </tr>
          <tr>
            <td align="left" valign="top" width="1%" background="images/bg_member_dark.gif"><img src="images/h_trsp_dot.gif" width="13" height="13"></td>
            <td background="images/bg_member_dark.gif" align="left" class="wform_ttl">&nbsp;</td>
            <td align="right" valign="top" width="1%" background="images/bg_member_dark.gif">&nbsp;</td>
          </tr>
          <tr>
            <td width="1%" bgcolor="#FFFFFF"><img src="images/h_trsp_dot.gif" width="10" height="100"></td>
            <td bgcolor="#FFFFFF" valign="top" class="form_item"> <br>
              <table width="100%" border="0" cellspacing="1" cellpadding="2">
                <tr>
                  <td width="1%"><img src="images/h_trsp_dot.gif" width="1" height="1"></td>
                  <td width="1%" nowrap class="form_group" valign="bottom">PERSONAL
                    DETAILS</td>
                  <td nowrap width="100%" align="right" class="form_step"><img src="images/h_trsp_dot.gif" width="350" height="10"></td>
                </tr>
                <tr>
                  <td width="1%">&nbsp;</td>
                  <td width="1%" nowrap class="form_field" background="images/bg_form_lightbluedark.gif">Name
                    and Surname</td>
                  <td nowrap width="100%" background="images/bg_form_lightbluedark.gif">
                    <input type="text" name="FRfullname" class="form_item">
                  </td>
                </tr>
                <tr>
                  <td width="1%">&nbsp;</td>
                  <td width="1%" nowrap class="form_field" background="images/bg_form_lightbluedark.gif">Email</td>
                  <td nowrap width="100%" background="images/bg_form_lightbluedark.gif">
                    <input type="text" name="FRemail" value="@erggroup.com" class="form_item" onblur="AutoUsername()">
                  </td>
                </tr>
                <tr>
                  <td width="1%"><img src="images/h_trsp_dot.gif" width="1" height="1"></td>
                  <td width="1%" nowrap class="form_group" valign="bottom"><br>
                    LOGIN DETAILS</td>
                  <td nowrap width="100%" align="right" class="form_step">&nbsp;</td>
                </tr>
                <tr>
                  <td width="1%">&nbsp;</td>
                  <td width="1%" nowrap class="form_field" background="images/bg_form_lightbluedark.gif">Username</td>
                  <td nowrap width="100%" background="images/bg_form_lightbluedark.gif">
                    <input type="text" name="FRusername" class="form_item">
                    <!-- <input type="checkbox" name="FRdomainauth" value="Y" onClick="DisablePassword();"> -->
               <input type="checkbox" name="FRdomainauth" value="Y" onClick="DisablePassword();">
                    <span class="form_txt">Domain User</span><%=Quick_Help ( "domain_user" )%></td>
                </tr>
            <tr>
                  <td width="1%">&nbsp;</td>
                  <td width="1%" nowrap class="form_field" background="images/bg_form_lightbluedark.gif">Domain Name</td>
                  <td nowrap width="100%" background="images/bg_form_lightbluedark.gif">
                    <input type="text" name="FRdomain_name" class="form_item" disabled><input type="text" name="FRstatus3" class="form_status" disabled value="Not Required!">
                  </td>
                </tr>
                <tr>
                  <td width="1%">&nbsp;</td>
                  <td width="1%" nowrap class="form_field" background="images/bg_form_lightbluedark.gif">Password</td>
                  <td nowrap width="100%" background="images/bg_form_lightbluedark.gif">
                    <input type="password" name="FRpassword" class="form_item"><input type="text" name="FRstatus1" class="form_status" disabled>
                  </td>
                </tr>
                <tr>
                  <td width="1%">&nbsp;</td>
                  <td width="1%" nowrap class="form_field" background="images/bg_form_lightbluedark.gif">
                    Password Confirm</td>
                  <td nowrap width="100%" background="images/bg_form_lightbluedark.gif">
                    <input type="password" name="FRpasswordc" class="form_item"><input type="text" name="FRstatus2" class="form_status" disabled>
                  </td>
                </tr>
                <tr>
                  <td width="1%">&nbsp;</td>
                  <td width="1%" nowrap class="form_field"><img src="images/h_trsp_dot.gif" width="1" height="1"></td>
                  <td nowrap width="100%">
                    <input type="hidden" name="action" value="true">
                    <input type="submit" name="btn" value="Sign Up" class="form_item">
                    <input type="reset" name="btn" value="Cancel" class="form_item" onClick="history.back();">
                    <br>
                    <br>
                  </td>
                </tr>
              </table>

              <br>
              <br>
            </td>
            <td width="1%" background="images/lbox_bgside_white.gif">&nbsp;</td>
          </tr>
          <tr>
            <td width="1%" background="images/bg_member_dark.gif" valign="bottom"><img src="images/h_trsp_dot.gif" width="13" height="13"></td>
            <td background="images/bg_member_dark.gif"></td>
            <td width="1%" background="images/bg_member_dark.gif" valign="bottom" align="right"><img src="images/h_trsp_dot.gif" width="13" height="13"></td>
          </tr>
        </form>
      </table>
      <!-------------------------------------------------------->
      <br>
    </td>
    <td rowspan="2" valign="bottom" width="100%" background="images/bg_member_light.gif" align="right"><img src="images/bg_img_member.gif" width="160" height="230" vspace="10" hspace="10"></td>
  </tr>
  <tr>
    <td valign="bottom" align="center" background="images/bg_member_dark.gif"><img src="images/img_members.gif" width="81" height="57" vspace="20" hspace="30"></td>
    <td background="images/bg_member_light.gif" valign="top"><img src="images/h_trsp_dot.gif" width="100" height="400"></td>
  </tr>
</table>
<!-- FOOTER -->
<!--#include file="_footer.asp"-->
</body>
</html>
<%
Call Destroy_All_Objects
%>