Subversion Repositories DevTools

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
119 ghuddy 1
<%@LANGUAGE="VBSCRIPT"%>
2
<%
3
'=====================================================
4
'|                                                   |
5
'|				    	SIGN UP					     |
6
'|                                      			 |
7
'=====================================================
8
%>
9
<%
10
Option explicit
11
' Good idea to set when using redirect
12
Response.Expires = 0	' always load the page, dont store
13
%>
14
<!--#include file="common/conf.asp"-->
15
<!--#include file="common/globals.asp"-->
16
<!--#include file="common/formating.asp"-->
17
<!--#include file="common/qstr.asp"-->
18
<!--#include file="common/common_subs.asp"-->
19
<!--#include file="sec/Crypt.asp"-->
20
<%
21
'------------ ACCESS CONTROL ------------------
22
%>
23
<!--#include file="_access_control_general.asp"-->
24
<%
25
'------------ Variable Definition -------------
26
'------------ Constants Declaration -----------
27
'------------ Variable Init -------------------
28
'----------------------------------------------
29
%>
30
<%
31
Sub Sign_Up_User ( SSfullname, SSemail, SSusername, SSpassword, SSdomainauth, SSdomain_name )
32
	Dim SEQ_user_id
33
 
34
	If User_Name_Exists ( SSusername ) Then
35
		' Username exists
36
		Session("AdditionalParams") = "$USERNAME$,"& SSusername
37
		Response.Redirect("message.asp?msg=202-14")
38
	End If
39
 
40
	SEQ_user_id = Get_From_DUAL("SEQ_USER_ID.nextval")
41
	If SSdomainauth = "" Then 
42
		SSdomainauth = "N"
43
		SSpassword = EnCrypt( SSpassword )
44
	End If
45
	SSfullname = Replace( SSfullname, "'", "''")
46
	SSemail = Replace( SSemail, "'", "''")
47
 
48
	OraSession.BeginTrans
49
	OraDatabase.ExecuteSQL " INSERT INTO users (user_id, full_name, user_name, user_password, user_email, domain_auth, domain_name, disabled)"&_
50
						   " VALUES ( "& SEQ_user_id &", '"& SSfullname &"', '"& SSusername &"', '"& SSpassword &"', '"& SSemail &"', '"& SSdomainauth &"', '"& SSdomain_name &"', 'Y' )"
51
  	OraSession.CommitTrans
52
 
53
 
54
End Sub
55
%>
56
<%
57
'--- Process submition ---
58
If CBool(QStrPar("action")) Then
59
	' All mendatory parameters FOUND
60
	Call Sign_Up_User ( Request("FRfullname"), Request("FRemail"), Request("FRusername"), Request("FRpassword"), Request("FRdomainauth"),  Request("FRdomain_name") )
61
	Call Send_Email ( Request("FRfullname"), Request("FRemail"), adminEmail, "Release Manager - New Member Signed Up", "Please enable this account for use.", NULL )
62
 
63
	Response.Redirect("message.asp?msg=200-6")
64
End If
65
%>
66
<html>
67
<head>
68
<title>Release Manager</title>
69
<meta HTTP-EQUIV="Pragma" CONTENT="no-cache">
70
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
71
<link rel="stylesheet" href="images/release_manager_style.css" type="text/css">
72
<link rel="stylesheet" href="images/navigation.css" type="text/css">
73
<script language="JavaScript" src="images/common.js"></script>
74
<!-- TIPS -->
75
<script language="JavaScript" src="images/tipster.js"></script>
76
<script language="JavaScript" src="images/_help_tips.js"></script>
77
<script language="JavaScript">
78
<!--
79
// Auto username
80
function AutoUsername() {
81
	var email,autouser,p;
82
	email=String(document.signup.FRemail.value);
83
	autouser=email.substring(0,email.indexOf('@')); 
84
	if (document.signup.FRusername.value=='') document.signup.FRusername.value = autouser;
85
}
86
 
87
function DisablePassword() {
88
	if (MM_findObj("FRdomainauth").checked) {
89
		MM_findObj("FRdomain_name").disabled=false;
90
		MM_findObj("FRstatus3").value='';
91
		MM_findObj("FRpassword").disabled=true;
92
		MM_findObj("FRpasswordc").disabled=true;
93
		MM_findObj("FRstatus1").value='Not Required!';
94
		MM_findObj("FRstatus2").value='Not Required!';
95
	} else {
96
		MM_findObj("FRdomain_name").disabled=true;
97
		MM_findObj("FRstatus3").value='Not Required!';
98
		MM_findObj("FRpassword").disabled=false;
99
		MM_findObj("FRpasswordc").disabled=false;
100
		MM_findObj("FRstatus1").value='';
101
		MM_findObj("FRstatus2").value='';
102
	}
103
}
104
 
105
//-->
106
</script>
107
</head>
108
<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" >
109
<!-- TIPS LAYERS -------------------------------------->
110
<div id="formTipsLayer" style="position: absolute; z-index: 1000; visibility: hidden; left:0; top: 0; width: 10">&nbsp;</div>
111
<!----------------------------------------------------->
112
<!-- HEADER -->
113
<%If objAccessControl.UserLogedIn Then%>
114
<div id="Layer1" style="position:absolute; left:2; top:2; width:1px; height:1px; z-index:1"><a href="#"><img src="images/i_logout.gif" width="14" height="14" border="0" alt="Logout from <%=objAccessControl.UserName%> disabled" title="Logout from <%=objAccessControl.UserName%> disabled"></a></div>
115
<%End If%>
116
<table width="100%" border="0" cellspacing="0" cellpadding="0">
117
  <tr> 
118
    <td><a href="index.asp"><img src="images/b_release_manager.jpg" width="467" height="50" border="0"></a></td>
119
    <td valign="bottom" align="right">&nbsp;</td>
120
  </tr>
121
  <tr> 
122
    <td align=left noWrap valign=center width=150 background="images/h_dot.gif" height="1"></td>
123
    <td background="images/h_dot.gif" height="1"></td>
124
  </tr>
125
</table>
126
<!-- BODY ---->
127
<table width="100%" border="0" cellspacing="0" cellpadding="0">
128
  <tr> 
129
    <td width="1%" background="images/bg_member_dark.gif" valign="top"> 
130
      <!-- MEMBERS MENU ---------------------------------------------->
131
      <!--  MEMBERS MENU END ------------------------------------------>
132
    </td>
133
    <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>
134
    <td rowspan="2" valign="top" width="1%" background="images/bg_member_light.gif" nowrap> 
135
      <!------------------------------------------->
136
      <br>
137
      <span class="mmb_ttl">Sign Up</span><br>
138
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
139
        <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">
140
          <tr> 
141
            <td width="1%">&nbsp;</td>
142
            <td><img src="images/h_trsp_dot.gif" width="500" height="30"></td>
143
            <td width="1%">&nbsp;</td>
144
          </tr>
145
          <tr> 
146
            <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>
147
            <td background="images/bg_member_dark.gif" align="left" class="wform_ttl">&nbsp;</td>
148
            <td align="right" valign="top" width="1%" background="images/bg_member_dark.gif">&nbsp;</td>
149
          </tr>
150
          <tr> 
151
            <td width="1%" bgcolor="#FFFFFF"><img src="images/h_trsp_dot.gif" width="10" height="100"></td>
152
            <td bgcolor="#FFFFFF" valign="top" class="form_item"> <br>
153
              <table width="100%" border="0" cellspacing="1" cellpadding="2">
154
                <tr> 
155
                  <td width="1%"><img src="images/h_trsp_dot.gif" width="1" height="1"></td>
156
                  <td width="1%" nowrap class="form_group" valign="bottom">PERSONAL 
157
                    DETAILS</td>
158
                  <td nowrap width="100%" align="right" class="form_step"><img src="images/h_trsp_dot.gif" width="350" height="10"></td>
159
                </tr>
160
                <tr> 
161
                  <td width="1%">&nbsp;</td>
162
                  <td width="1%" nowrap class="form_field" background="images/bg_form_lightbluedark.gif">Name 
163
                    and Surname</td>
164
                  <td nowrap width="100%" background="images/bg_form_lightbluedark.gif"> 
165
                    <input type="text" name="FRfullname" class="form_item">
166
                  </td>
167
                </tr>
168
                <tr> 
169
                  <td width="1%">&nbsp;</td>
170
                  <td width="1%" nowrap class="form_field" background="images/bg_form_lightbluedark.gif">Email</td>
171
                  <td nowrap width="100%" background="images/bg_form_lightbluedark.gif"> 
172
                    <input type="text" name="FRemail" value="@erggroup.com" class="form_item" onblur="AutoUsername()">
173
                  </td>
174
                </tr>
175
                <tr> 
176
                  <td width="1%"><img src="images/h_trsp_dot.gif" width="1" height="1"></td>
177
                  <td width="1%" nowrap class="form_group" valign="bottom"><br>
178
                    LOGIN DETAILS</td>
179
                  <td nowrap width="100%" align="right" class="form_step">&nbsp;</td>
180
                </tr>
181
                <tr> 
182
                  <td width="1%">&nbsp;</td>
183
                  <td width="1%" nowrap class="form_field" background="images/bg_form_lightbluedark.gif">Username</td>
184
                  <td nowrap width="100%" background="images/bg_form_lightbluedark.gif"> 
185
                    <input type="text" name="FRusername" class="form_item">
186
                    <!-- <input type="checkbox" name="FRdomainauth" value="Y" onClick="DisablePassword();"> -->
187
					<input type="checkbox" name="FRdomainauth" value="Y" onClick="DisablePassword();">
188
                    <span class="form_txt">Domain User</span><%=Quick_Help ( "domain_user" )%></td>
189
                </tr>
190
				<tr> 
191
                  <td width="1%">&nbsp;</td>
192
                  <td width="1%" nowrap class="form_field" background="images/bg_form_lightbluedark.gif">Domain Name</td>
193
                  <td nowrap width="100%" background="images/bg_form_lightbluedark.gif"> 
194
                    <input type="text" name="FRdomain_name" class="form_item" disabled><input type="text" name="FRstatus3" class="form_status" disabled value="Not Required!">
195
                  </td>
196
                </tr>
197
                <tr> 
198
                  <td width="1%">&nbsp;</td>
199
                  <td width="1%" nowrap class="form_field" background="images/bg_form_lightbluedark.gif">Password</td>
200
                  <td nowrap width="100%" background="images/bg_form_lightbluedark.gif"> 
201
                    <input type="password" name="FRpassword" class="form_item"><input type="text" name="FRstatus1" class="form_status" disabled>
202
                  </td>
203
                </tr>
204
                <tr> 
205
                  <td width="1%">&nbsp;</td>
206
                  <td width="1%" nowrap class="form_field" background="images/bg_form_lightbluedark.gif"> 
207
                    Password Confirm</td>
208
                  <td nowrap width="100%" background="images/bg_form_lightbluedark.gif"> 
209
                    <input type="password" name="FRpasswordc" class="form_item"><input type="text" name="FRstatus2" class="form_status" disabled>
210
                  </td>
211
                </tr>
212
                <tr> 
213
                  <td width="1%">&nbsp;</td>
214
                  <td width="1%" nowrap class="form_field"><img src="images/h_trsp_dot.gif" width="1" height="1"></td>
215
                  <td nowrap width="100%"> 
216
                    <input type="hidden" name="action" value="true">
217
                    <input type="submit" name="btn" value="Sign Up" class="form_item">
218
                    <input type="reset" name="btn" value="Cancel" class="form_item" onClick="history.back();">
219
                    <br>
220
                    <br>
221
                  </td>
222
                </tr>
223
              </table>
224
 
225
              <br>
226
              <br>
227
            </td>
228
            <td width="1%" background="images/lbox_bgside_white.gif">&nbsp;</td>
229
          </tr>
230
          <tr> 
231
            <td width="1%" background="images/bg_member_dark.gif" valign="bottom"><img src="images/h_trsp_dot.gif" width="13" height="13"></td>
232
            <td background="images/bg_member_dark.gif"></td>
233
            <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>
234
          </tr>
235
        </form>
236
      </table>
237
      <!-------------------------------------------------------->
238
      <br>
239
    </td>
240
    <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>
241
  </tr>
242
  <tr> 
243
    <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>
244
    <td background="images/bg_member_light.gif" valign="top"><img src="images/h_trsp_dot.gif" width="100" height="400"></td>
245
  </tr>
246
</table>
247
<!-- FOOTER -->
248
<!--#include file="_footer.asp"-->
249
</body>
250
</html>
251
<%
252
Call Destroy_All_Objects
253
%>