%@Language="VBscript"%><%
on error resume next
const job_applictaion_email="manager@net-campus.com"
function htm(txt)
htm=replace(txt,"<","<")
htm=replace(txt,"""",""")
end function
function OptionList(byref ar,byval value)
OptionList=""
x=0
x=clng(value)
for i=lbound(ar) to ubound(ar)
OptionList=OptionList & ""
next
end function
function GetOptionList(byref ar, byval value)
on error resume next
GetOptionList=""
tt=split(value,",")
for i=lbound(tt) to ubound(tt)
GetOptionList=GetOptionList & ar(tt(i)) & vbcr
next
end function
function readextfile(filename)
dim filesys,txtfile
readextfile=""
set filesys = createobject("Scripting.FileSystemObject")
set txtfile = filesys.opentextfile(filename,1,0)
readextfile = txtfile.readall()
txtfile.close
set txtfile=nothing
set filesys=nothing
end function
sub SendSMTPsvgMail(mFrom, mTo, mSubject,mBody,mReply)
on error resume next
dim Mail,x,zTemp
Set Mail = Server.CreateObject("SMTPsvg.Mailer")
'//change this RemoteHost to a valid SMTP address before testing
if trim(mFrom)="" then mFrom=job_applictaion_email
Mail.RemoteHost = "mail.net-campus.com"
Mail.FromName = mFrom
Mail.FromAddress = mFrom
Mail.AddRecipient mTo, mTo
Mail.Subject = "Online Job Application"
Mail.BodyText = mBody
Mailer.CharSet = 1 '//US Ascii
Mail.Priority = 1 'High
Mail.Urgent = true
'//Mail.ClearAttachments
'//Mail.AddAttachment
Mail.SendMail
set Mail=nothing
end sub
sub SendPersitsMail(mFrom, mTo, mSubject,mBody,mReply)
on error resume next
dim Mail, zTemp
Set Mail = Server.CreateObject("Persits.MailSender")
Mail.Host = "mail.net-campus.com"
'Mail.Port = 25 ' Optional. Port is 25 by default
if trim(mFrom)="" then mFrom=""
Mail.From = mFrom
Mail.AddAddress mTo, mTo
Mail.AddReplyTo mReply
Mail.Username="ASPmail"
Mail.Password="ASPmail"
Mail.Priority=3 'Normal
zTemp=ucase(left(mBody,255))
if instr(zTemp, "")>0 then
Mail.IsHTML = True
end if
Mail.Subject = mSubject
Mail.Body = mBody
Mail.Send
set Mail=Nothing
end sub
function PrepairMail(byval mBody)
on error resume next
dim Mail, IsHtlm, Temp, buf , x
dim MaxChar
PrepairMail=""
IsHtml = false
MaxChar = 255
temp = lcase(mBody)
if (instr(temp,"")>0) then
IsHtml = True
else
IsHtml = False
end if
'//Specify character per line in mail
if isHtml=true then
buf = ""
do while mBody <> ""
temp = left(mBody, Maxchar)
i = instrrev(temp,">")
if i > 0 then
buf = buf & left(temp,i) & vbcrlf
mBody = mid(mBody,i+1)
else
buf = buf & temp & vbcrLf
mBody = mid(mBody,Maxchar+1)
end if
loop
mBody = buf
end if
PrepairMail=mBody
end function
Sub SendEMail(byval mFrom,byval mTo,byval mSubject,byval mBody,byval mReply)
mBody=PrepairMail(mBody)
call SendPersitsMail(mFrom, mTo, mSubject,mBody,mReply)
end sub
Position_Applied=request.form("Position_Applied")
Expected_Salary=request.form("Expected_Salary")
Date_Available=request.form("Date_Available")
Name=request.form("Name")
Email=request.form("Email")
Web_Page=request.form("Web_Page")
Address1=request.form("Address1")
City=request.form("City")
home_phone=request.form("home_phone")
mobile_phone=request.form("mobile_phone")
Age=request.form("Age")
Sex=request.form("Sex")
Status=request.form("Status")
Transportation=request.form("Transportation")
Military=request.form("Military")
English_Skill=request.form("English_Skill")
Computer_Skill=request.form("Computer_Skill")
Program_skill=request.form("Program_skill")
Program_Skill2=request.form("Program_Skill2")
Years_Computers=request.form("Years_Computers")
typing_Speed=request.form("typing_Speed")
textareaName=request.form("textareaName")
Company=request.form("Company")
Supervisor=request.form("Supervisor")
Start_Salary=request.form("Start_Salary")
End_Salary=request.form("End_Salary")
start_date=request.form("start_date")
end_date=request.form("end_date")
Company_Duty=request.form("Company_Duty")
Company_Phone=request.form("Company_Phone")
Why_Leaving=request.form("Why_Leaving")
Company2=request.form("Company2")
Supervisor2=request.form("Supervisor2")
Start_Salary2=request.form("Start_Salary2")
End_Salary2=request.form("End_Salary2")
start_date2=request.form("start_date2")
end_date2=request.form("end_date2")
Company_Duty2=request.form("Company_Duty2")
Company_Phone2=request.form("Company_Phone2")
Why_Leaving2=request.form("Why_Leaving2")
University=request.form("University")
University_Years=request.form("University_Years")
Degree=request.form("Degree")
GPA=request.form("GPA")
University_Graduated=request.form("University_Graduated")
Education_Experience=request.form("Education_Experience")
Other_Information=request.form("Other_Information")
str="3D Animator;Flash Animator;Graphic Artist;Programmer;Technical/Script Writer;Sound Editing;Translator;Telephone Reception;Video Editing"
Position_Applied_List=split(str,";")
str="Male;Female"
Sex_List=split(str,";")
str="Single;Married"
Status_List=split(str,";")
str="None;Motorcycle;Car"
Transportation_List=split(str,";")
str="Not Yet Completed;Not Required;Completed"
Military_List=split(str,";")
str="None;Basic;Medium;Understand but don't speak;Good writting;Very good writting;Very good writting and speaking;Native Speaker"
English_Skill_List=split(str,";")
str="Never Used;Sometimes Use;Often Use;Very Familiar;Very Good;Power User;Expert"
Computer_Skill_List=split(str,";")
str="3D Program;Adobe After FX;Adobe Photoshop;Adobe Premiere;ASP;C++;Microsoft Access;Microsoft Word;Macromedia Authorware;Macromedia Director;Macromedia Flash;Sound Editing;SQL;Visual Basic;Web Design"
Program_skill_List=split(str,";")
st=(request.form("submitMail")<>"") or (request.form("Printform")<>"")
if st=true then
xpath=request.servervariables("PATH_TRANSLATED")
xpath=replace(xpath,"/","\")
xpath=left(xpath,instrrev(xpath,"\"))
txt_mail=readextfile(xpath & "job_application.txt")
txt_mail=replace(txt_mail,"{$POSITION_APPLIED}",POSITION_APPLIED_LIST(POSITION_APPLIED))
txt_mail=replace(txt_mail,"{$EXPECTED_SALARY}",EXPECTED_SALARY)
txt_mail=replace(txt_mail,"{$DATE_AVAILABLE}",DATE_AVAILABLE)
txt_mail=replace(txt_mail,"{$NAME}",NAME)
txt_mail=replace(txt_mail,"{$EMAIL}",EMAIL)
txt_mail=replace(txt_mail,"{$WEB_PAGE}",WEB_PAGE)
txt_mail=replace(txt_mail,"{$ADDRESS1}",ADDRESS1)
txt_mail=replace(txt_mail,"{$CITY}",CITY)
txt_mail=replace(txt_mail,"{$HOME_PHONE}",HOME_PHONE)
txt_mail=replace(txt_mail,"{$MOBILE_PHONE}",MOBILE_PHONE)
txt_mail=replace(txt_mail,"{$AGE}",AGE)
txt_mail=replace(txt_mail,"{$SEX}",SEX_LIST(SEX))
txt_mail=replace(txt_mail,"{$STATUS}",STATUS_LIST(STATUS))
txt_mail=replace(txt_mail,"{$TRANSPORTATION}",TRANSPORTATION_LIST(TRANSPORTATION))
txt_mail=replace(txt_mail,"{$MILITARY}",MILITARY_LIST(MILITARY))
txt_mail=replace(txt_mail,"{$ENGLISH_SKILL}",ENGLISH_SKILL_LIST(ENGLISH_SKILL))
txt_mail=replace(txt_mail,"{$COMPUTER_SKILL}",COMPUTER_SKILL_LIST(COMPUTER_SKILL))
txt_mail=replace(txt_mail,"{$PROGRAM_SKILL}",GetOptionList(PROGRAM_SKILL_LIST,PROGRAM_SKILL))
txt_mail=replace(txt_mail,"{$PROGRAM_SKILL2}",PROGRAM_SKILL2)
txt_mail=replace(txt_mail,"{$YEARS_COMPUTERS}",YEARS_COMPUTERS)
txt_mail=replace(txt_mail,"{$TYPING_SPEED}",TYPING_SPEED)
txt_mail=replace(txt_mail,"{$TEXTAREANAME}",TEXTAREANAME)
txt_mail=replace(txt_mail,"{$COMPANY}",COMPANY)
txt_mail=replace(txt_mail,"{$SUPERVISOR}",SUPERVISOR)
txt_mail=replace(txt_mail,"{$START_SALARY}",START_SALARY)
txt_mail=replace(txt_mail,"{$END_SALARY}",END_SALARY)
txt_mail=replace(txt_mail,"{$START_DATE}",START_DATE)
txt_mail=replace(txt_mail,"{$END_DATE}",END_DATE)
txt_mail=replace(txt_mail,"{$COMPANY_DUTY}",COMPANY_DUTY)
txt_mail=replace(txt_mail,"{$COMPANY_PHONE}",COMPANY_PHONE)
txt_mail=replace(txt_mail,"{$WHY_LEAVING}",WHY_LEAVING)
txt_mail=replace(txt_mail,"{$COMPANY2}",COMPANY2)
txt_mail=replace(txt_mail,"{$SUPERVISOR2}",SUPERVISOR2)
txt_mail=replace(txt_mail,"{$START_SALARY2}",START_SALARY2)
txt_mail=replace(txt_mail,"{$END_SALARY2}",END_SALARY2)
txt_mail=replace(txt_mail,"{$START_DATE2}",START_DATE2)
txt_mail=replace(txt_mail,"{$END_DATE2}",END_DATE2)
txt_mail=replace(txt_mail,"{$COMPANY_DUTY2}",COMPANY_DUTY2)
txt_mail=replace(txt_mail,"{$COMPANY_PHONE2}",COMPANY_PHONE2)
txt_mail=replace(txt_mail,"{$WHY_LEAVING2}",WHY_LEAVING2)
txt_mail=replace(txt_mail,"{$UNIVERSITY}",UNIVERSITY)
txt_mail=replace(txt_mail,"{$UNIVERSITY_YEARS}",UNIVERSITY_YEARS)
txt_mail=replace(txt_mail,"{$DEGREE}",DEGREE)
txt_mail=replace(txt_mail,"{$GPA}",GPA)
txt_mail=replace(txt_mail,"{$UNIVERSITY_GRADUATED}",UNIVERSITY_GRADUATED)
txt_mail=replace(txt_mail,"{$EDUCATION_EXPERIENCE}",EDUCATION_EXPERIENCE)
txt_mail=replace(txt_mail,"{$OTHER_INFORMATION}",OTHER_INFORMATION)
if request.form("submitMail")<>"" then
SendEMail EMAIL,job_applictaion_email,"Job Application",txt_mail,EMAIL
response.redirect "thanks.html"
end if
if request.form("Printform")<>"" then
response.write txt_mail
response.write ""
response.end
end if
end if
%>