<!-- #include file="../../common/includes/i_header.asp" -->
<!-- #include file="../../common/includes/email.asp" -->
<%
if request("proccess") = 1 then
sqlcheckuname = "select username from users where username="& to_sql(request("email"),"text") &""
set checkrs = cn.execute(sqlcheckuname)
if checkrs.eof then
'response.write "no user like this"
dsql="select downloadid from siteoptions where active=1"
set rs = cn.execute(dsql)
sql = "INSERT INTO users([Group_id], [Access_level], [Username], [Password], [Firstname], [Lastname], [Email], [Postal_address], [Physical_address], [Country_code], [Phone], [Mobile], [Fax], [Notes], [Signature], [URL], [Date_added], [Mail_list], [Active]) VALUES(2,2,"& to_sql(request("email"),"text") &", '"& EnCrypt(Replace(Request("password"), "'", "''")) &"', "& to_sql(request("firstname"),"text") &", "& to_sql(request("lastname"),"text") &", "& to_sql(request("email"),"text") &", "& to_sql(request("postal"),"text") &", "& to_sql(request("physical"),"text") &", "& to_sql(request("country"),"number") &", "& to_sql(request("phone"),"text") &", "& to_sql(request("mobile"),"text") &", "& to_sql(request("fax"),"text") &", "& to_sql(request("notes"),"text") &", "& to_sql(request("signature"),"text") &", "& to_sql(request("url"),"text") &", "& to_sql(date,"date") &", "& to_sql(request("maillist"),"number") &",1)"
cn.execute(sql)
'response.write sql
Dim strContent
strContent = strContent & "<html><center><font face=verdana size=2>"
strContent = strContent & "<br><b>"&Application("Site_Name")&"</b><br>"
strContent = strContent & "<br>"
strContent = strContent & "<b>Your Login Details.</b><br>"
strContent = strContent & "<b>Username:</b> "& request("email") &" <br>"
strContent = strContent & "<b>Password:</b> "& request("password") &" <br>"
if rs("downloadid") <= 0 then
strContent = strContent & "<br>"
else
strContent = strContent & "<br><b>*Please use your user details to login and download the file related to the link below.</b>"
strContent = strContent & "<br><b>Download link:<br></b><a href=http://"&Request.ServerVariables("HTTP_HOST")&"/content/downloads/download_click.asp?downloadid="& rs("downloadid") &"&mirror=asia>
http://"&Request.ServerVariables("HTTP_HOST")&"/content/downloads/download_click.asp?downloadid="& rs("downloadid") &"&mirror=asia</a><br>"
end if
strContent = strContent & "<br><b>This is an automated email please do not reply.</b><br><br><br>This Email was sent using <a href=http://www.aspportal.net>ASPPortal</a> - the free asp portal application."
strContent = strContent & "</font></center></html>"
sTo = request("email")
bCC = siteoptions_fromemail
sCC = ""
sFrom = siteoptions_fromemail
sSubject = "User Login information" & Application("Site_Name")
sTextBody = strContent
'Call common email function
call SendMail("",sTo,sFrom,sSubject,sTextBody,sCC,bCC)
%>
<div align=center>
<table class='HomeTable'>
<tr height=20>
<td width=20></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td>Thank you for registering with <b><%=Application("Site_Name")%></b></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td>You application is being processed and you should receive a confirmation email with in the following few
minutes.</td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td>A confirmation will be sent to the following email address: <b><%=request("email")%></b></td>
<td></td>
<td></td>
</tr>
<tr height=10>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td><b><a href="../../default.asp" target="_self">Click here to go to the home page.</a></b></td>
<td></td>
<td></td>
</tr>
<tr height="80%">
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
</table>
</div>
<%
else
response.write "<br><br><br><b>The Email address you entered has already been registered on our site.</b><br><br>"
%>
<a href="#" onClick="history.go(-1)"><b>Click here</b> to go Back and try another Email.</a>
<br><br>
<a href="getdetails.asp?getemail=<%=request("email")%>">If you forgot your password simply click here to retrieve your password.</a>
<%
end if
else%>
<!--#include file='registration_keygen.asp'-->
<%regkey = rKeyGen(7, true)%>
<head>
<script language="JavaScript">
function SubmitCheck() {
document.registration.register.disabled=true
document.registration.register.value='processing'
if (document.registration.firstname.value == 0) {
alert ("First name is required.");
document.registration.firstname.focus();
document.registration.register.disabled=false;
document.registration.register.value='Register'
return false;
}
if (document.registration.lastname.value == 0) {
alert ("Last name is required.");
document.registration.lastname.focus();
document.registration.register.disabled=false;
document.registration.register.value='Register'
return false;
}
if (document.registration.email.value == 0) {
alert ("email is required.");
document.registration.email.focus();
document.registration.register.disabled=false;
document.registration.register.value='Register'
return false;
}
if (document.registration.password.value == 0) {
alert ("password is required.");
document.registration.password.focus();
document.registration.register.disabled=false;
document.registration.register.value='Register'
return false;
}
if (document.registration.password.value != document.registration.password1.value) {
alert ("Password and confirmation password do not match.\nPlease try again by retyping both.");
document.registration.password1.focus();
document.registration.register.disabled=false;
document.registration.register.value='Register'
return false;
}
if (document.registration.email.value != document.registration.email1.value) {
alert ("Email and confirmation Email do not match.\nPlease try again by retyping both.");
document.registration.email1.focus();
document.registration.register.disabled=false;
document.registration.register.value='Register'
return false;
}
if (document.registration.country.value == "Please select...") {
alert ("Please select your country.");
document.registration.country.focus();
document.registration.register.disabled=false;
document.registration.register.value='Register'
return false;
}
if (document.registration.key.value != document.registration.key1.value) {
alert ("Registration key and Generated key do not match.\nPlease check and try again.");
document.registration.key.focus();
document.registration.register.disabled=false;
document.registration.register.value='Register'
return false;
}
}
</script>
</head>
<form name="registration" action="user_registration_page.asp" method="post" OnSubmit="return SubmitCheck();">
<input type=hidden name="proccess" value="1">
<div align="center">
<table class='HomeTable'>
<tr>
<td colspan=7 align="center" class="headingTD"><%=Application("Site_Name")%> New User Registration</td>
</tr>
<tr>
<td colspan=7 align="center"><hr></td>
</tr>
<tr>
<td colspan=7 align="center"></td>
</tr>
<tr>
<td width=20> </td>
<td> </td>
<td> </td>
<td> </td>
<td colspan="3"> </td>
</tr>
<tr>
<td> </td>
<td>First name</td>
<td><input type="text" name="firstname" size="20" tabindex="1"> *</td>
<td>Last name</td>
<td colspan="3"><input type="text" name="lastname" size="20" tabindex="2">
*</td>
</tr>
<tr>
<td> </td>
<td>email (username)</td>
<td><input type="text" name="email" size="30" tabindex="3"> *</td>
<td>Password</td>
<td colspan="3"><input type="password" name="password" size="20" tabindex="5">
*</td>
</tr>
<tr>
<td> </td>
<td>email (confirm)</td>
<td><input type="text" name="email1" size="30" tabindex="4"> *</td>
<td>Password (confirm)</td>
<td colspan="3"><input type="password" name="password1" size="20" tabindex="6">
*</td>
</tr>
<tr>
<td> </td>
<td>Mobile</td>
<td><input type="text" name="mobile" size="20" tabindex="7"></td>
<td>Fax</td>
<td colspan="3">
<input type="text" name="fax" size="20" tabindex="7"></td>
</tr>
<tr>
<td> </td>
<td>Phone</td>
<td><input type="text" name="phone" size="20" tabindex="7"></td>
<td>Country</td>
<td colspan="3">
<select size="1" name="country" tabindex="8">
<option value="Please select..." selected>Please select...</option>
<%
sql = "select * from countries where active=1 order by country_name"
set rs = cn.Execute(sql)
%>
<% Do While not rs.Eof %>
<option value="<%=rs("country_id")%>"><%=rs("country_name")%></option>
<%
rs.movenext
Loop
%>
</select>
<%
rs.close
%>
*</td>
</tr>
<tr>
<td> </td>
<td>Address</td>
<td rowspan="2">
<textarea rows="4" name="postal" cols="25" tabindex="9"></textarea></td>
<td>Notes</td>
<td rowspan="2" colspan="3"><textarea rows="4" name="notes" cols="25" tabindex="10"></textarea></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td>URL</td>
<td><input type="text" name="url" size="30" tabindex="11"></td>
<td>Image</td>
<td align="center"> </td>
<td align="center"> </td>
<td align="center"> </td>
</tr>
<tr>
<td> </td>
<td>Signature</td>
<td rowspan="2">
<textarea rows="2" name="signature" cols="20" tabindex="12"></textarea></td>
<td> </td>
<td align="center" colspan="3"> </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td>Join Mailing list</td>
<td align="left" colspan="3">
Yes<input type="radio" title="Yes" alt="Yes" value="1" name="maillist" tabindex="13" >
No<input type="radio" title="No" alt="No" value="0" name="maillist" tabindex="14" ></td>
</tr>
<tr>
<td> </td>
<td>Registration key</td>
<td><input type="text" name="key" size="20" tabindex="15">
<input type=hidden name="key1" value="<%=regkey%>">
*</td>
<td> </td>
<td colspan="3"> </td>
</tr>
<tr>
<td> </td>
<td>Generated key</td>
<td>
<!--<input type=text name=key3 id="KEY33" value="<%=regkey%>">-->
<b><%=regkey%></b>
</td>
<td> </td>
<td colspan="3"> </td>
</tr>
<tr>
<td> </td>
<td colspan="2"> </td>
<td> </td>
<td colspan="3"> </td>
</tr>
<tr>
<td> </td>
<td colspan="2">Please enter the generated key in the registration key
field.</td>
<td> </td>
<td colspan="3"> </td>
</tr>
<tr>
<td> </td>
<td colspan="2">* indicates required fields.<br>
* your password MUST be alphanumeric.<br>
* you email will also be your username</td>
<td> </td>
<td colspan="3"> </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td colspan="3"> </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td><input type="submit" value="Register" name="register"></td>
<td> </td>
<td colspan="3"> </td>
</tr>
</table>
</div>
</form>
<%end if%><!-- #include file="../../common/includes/i_footer.asp" -->