<% Dim Cnn,strsql,rsnationality,rscat Set Cnn=Server.CreateObject("ADODB.Connection") Set rsnationality =Server.Createobject("Adodb.recordset") With cnn .Provider = "SQLOLEDB" .ConnectionString = Application("SqlConnectionString") .Open End With strsql="Select Distinct Countryname from countries Order by Countryname" rsnationality.open strsql,Cnn Set rscat =Server.Createobject("Adodb.recordset") strsql="Select distinct Category from Jobcategory Order by category" rscat.open strsql,Cnn dim musername,mpassword,mtitle,mfirstname,mlastname,msex,mnationality,mstayingin,memail Dim errmsg If request.querystring("Updt")="T" then musername=Request.form("username") mpassword=Request.form("pswd") mtitle=Request.form("Title") mFirstname=Request.form("Firstname") mLastname=Request.form("Lastname") mSex=Request.form("Sex") mNationality=Request.form("Nationality") mstayingin=Request.form("Stayingin") memail=Request.form("email") If len(musername) < 5 then errmsg="Username should have minimum 5 characters" If len(mpassword) < 5 then errmsg=errmsg +" Password should have minimum 5 characters" If mtitle ="" then errmsg=errmsg +" Title not selected" If len(mfirstname) < 2 then errmsg=errmsg +" Firstname not entered " If len(mLastname) < 2 then errmsg=errmsg +" Lastname not entered " If len(mnationality) < 2 then errmsg=errmsg +" Nationality not selected " If len(mstayingin) < 2 then errmsg=errmsg +" Stayingin not selected " If len(memail) < 6 then errmsg=errmsg +" Email not enetered " If errmsg="" then Dim rsmembers Set rsmembers =Server.Createobject("Adodb.recordset") strsql="Select * from members where username like '" & musername & "'" rsmembers.open strsql,Cnn,adopendynamic,adlockpessimistic,adcmdtext If not rsmembers.eof then errmsg="This userid is already exists" Else rsmembers.Addnew rsmembers("username") =musername rsmembers("Password")=mPassword rsmembers("Title")=mTitle rsmembers("Firstname")=mfirstname rsmembers("Lastname")=mLastname rsmembers("Sex")=mSex rsmembers("Nationality") =mNationality rsmembers("Stayingin")=mstayingin rsmembers("DOR")=date rsmembers("Lastlogindate")=date rsmembers("Usertype")="J" rsmembers("Email")=memail rsmembers.Update rsmembers.close session("Username")=mUsername session("Usertype")="J" ' Retrieve reg no******** Dim rssettings,rsapplicants Set rssettings =Server.Createobject("Adodb.recordset") strsql="Select regno from settings " rssettings.open strsql,Cnn,adopendynamic,adlockpessimistic,adcmdtext Dim mregno mregno=rssettings("regno") mregno=mregno+1 rssettings("regno")=mregno rssettings.Update rssettings.Close ' ************Update Applicant table mregno="I-" & mregno Set rsapplicants =Server.Createobject("Adodb.recordset") strsql="Select * from Applicants where regno='" & mregno & "'" rsapplicants.open strsql,Cnn,adopendynamic,adlockpessimistic,adcmdtext If rsapplicants.Eof then rsapplicants.Addnew rsapplicants("regno")=trim(mregno) rsapplicants("DOR")=Date End If rsapplicants("username") =musername rsapplicants("Password")=mPassword rsapplicants("Title")=mTitle rsapplicants("Firstname")=mfirstname rsapplicants("Lastname")=mLastname rsapplicants("Sex")=left(mSex,1) rsapplicants("Nationality") =mNationality rsapplicants("Stayingin")=mstayingin rsapplicants("Lastupdatedate")=date rsapplicants("Email")=memail rsapplicants.Update rsapplicants.Close Session("Regno")=mRegno '************ rsnationality.close cnn.close Set rsnationality = Nothing Set rsmembers = nothing Set rsapplicants = Nothing Set rssettings = Nothing Set cnn = Nothing 'Sending Mail************************ Dim strhtml strhtml="" strhtml=strhtml & "" strhtml=strhtml & "" strhtml=strhtml & "" strhtml=strhtml & "" strhtml=strhtml & "" strhtml=strhtml & "" strhtml=strhtml & "" strhtml=strhtml & "" strhtml=strhtml & "" strhtml=strhtml & "" strhtml=strhtml & "" strhtml=strhtml & "" strhtml=strhtml & "" strhtml=strhtml & "" strhtml=strhtml & "" strhtml=strhtml & "
 
Dear " & Mtitle &" " & mfirstname & " " & mlastname & ",
Thank you for visiting and registering your name in our site http://www.apthrd.com, " strhtml=strhtml & "
" strhtml=strhtml & "" strhtml=strhtml & "" strhtml=strhtml & "" strhtml=strhtml & "" strhtml=strhtml & "" strhtml=strhtml & "" strhtml=strhtml & "" strhtml=strhtml & "
Your User Id is   : " & musername &"
Your Password is:" & mpassword & "
" strhtml=strhtml & "" strhtml=strhtml & "" strhtml=strhtml & "with best wishes," strhtml=strhtml & "" strhtml=strhtml & "" strhtml=strhtml & "APT Recruitment" strhtml=strhtml & "" strhtml=strhtml & "" strhtml=strhtml & "" strhtml=strhtml & "" err.clear On error resume next Set mySmartMail = Server.CreateObject("aspSmartMail.SmartMail") mySmartMail.Server = "mail.webhost4life.com" mySmartMail.SenderName = "APT-Recruitment" mySmartMail.SenderAddress = "info@apthrd.com" mySmartMail.Recipients.Add memail mySmartMail.Subject = "Registration Details" mySmartMail.Body = strHTML mySmartMail.ContentType = "text/html" mySmartMail.SendMail Set mySmartMail = Nothing Response.Redirect("EditCv1.asp") Response.End End If End If End If %> Apt - Human Resource & Management Consultancy
">
NEW USER
If you are already registered....login here
 
  <% If errmsg<>"" then link="" Response.write(link) Response.write("") Response.write(errmsg) Response.write("") End if %>
Username*
Password* (Atleast 6 characters)
Confirm Password*
*First Name
*Last Name
*Sex
*Nationality
*Currently Staying in
*Email
 
 
About Us - Our Clients - Jobseeker - Feedback - Employer
All rights reserved (c) 2001- 2006

<% rscat.close rsnationality.close cnn.Close set rscat= nothing Set rsnationality = Nothing Set rsmembers = nothing Set cnn = Nothing %>