For Finding The Job You Need To Follow Several Steps
For Finding The Job You Need To Follow Several Steps
INTRODUCTION
With millions of resumes in job banks and unemployment rates at all time high, a
winning resume is a must, but is it enough?
The project “Online Resume Builder and registration for jobs” takes care of steps
1, 2, 3 and the “Successful Job Seeker” can explain step 4.
It also allows the Job Seeker to edit their resumes and personal information as and
when needed. They can also unsubscribe themselves if not satisfied.
Similarly Job Provider can also Post their jobs and can recruit an applicant based on
their skills and company’s requirements. They too, can unsubscribe if not satisfied.
PERL-CGI
SERVLETS
JAVA SERVER PAGES
ACTIVE SERVER PAGES
1
2.DATABASE DESIGN
In Online Resume builder and registration for jobs, following database needs to be designed.
1.Seeker
ATTRIBUTES CONTRAINTS
Uid Primary key
Fname
Lname
Gender
Uname
Password
Confirm password
Email
Qualification
2.Provider
ATTRIBUTES CONSTRAINTS
Pid Primary key
Fname
Lname
Uname
Password
Confirm password
Company
Post
Email
Website
Contact no
2
3.Resume
ATTRIBUTES CONSTRAINTS
Fname
Lname
Day
Mon
Year
Loc add
Perm add
City
Zip
State
Other state
Country
Other country
Code
Residence
Mobile
Email Primary key
Languages
Secondary
Degree
Stream
Academic
Tskill
Ntskill
Achievement
Experience
Company
Profile
3
4.Job
ATTRIBUTES CONSTRAINTS
Jid Primary key
Vacancy code
Company
Location
Post
Key skill
Contact person
Contact number
Email
Website
Exp requ.
Pid
5.Apply
ATTRIBUTES CONSTRAINTS
Jid Primary key
Email Primary key
4
3. UML CLASS DIAGRAM
SEEKER RESUME
-UID -FNAME
+FNAME -LNAME
+LNAME -DAY
+UNAME 1 -MON PROVIDER
+PASSWORD -YEAR +PID
+CPASSWORD -LOC -FNAME
+GENDER 0..* -PERM -LNAME
+EMAIL -CITY -UNAME
+QUALIFICATION -ZIP -PASSWORD
Get info () -STATE 0..* -CPASSWORD
Createresume() -COUNTRY -COMPANY
Editresume () -CODE -POST
Apply () -RES -EMAIL
-MOBILE -WEBSITE
0..*
+EMAIL -CONTACT NO
0..* -LAN 0..* Getinfo()
-SEC Postjob()
APPLY -DEGREE Recruit ()
+EMAIL -STREAM
+JID -ACADE
-TSKILL
-NTSKILL
* -ACHIEVE
0..* -EXP
-COMPANY
JOB *
-PROFILE +JID
Writeresume () -VACANCY CODE
-COMPANY
0..* -POST
-SKILL
-CPERSON
-CNUM
-EMAIL
-EXP
-WEBSITE
Postjob ()
5
4.DATAFLOW DIAGRAM
Seeker Resume
Job Success
Seeker Logins Create Logout
Resume
Invalid
Apply
Registration for job Apply
form
Provider Job
Success
Job Logins Post
Provider Logout
Job
Invalid Apply
Recruit an
applicant View
Registration Resume
form
6
5.IMPLEMENTATION
PERL_CGI
Database: PSQL
OS: Linux
SERVLETS
Database: Oracle
Server: Tomcat
OS: Windows
JSP
Database: Oracle
Server: Tomcat
OS: Windows
ASP
Database: Oracle
Server: IIS (Internet Information Services)
OS: Windows
Session Management
Session using Cookies
Forwarding data through hidden values
Server-Side Validation
File handling
URL Rewriting
7
6.PERL/CGI
Perl is the most popular language for writing CGI scripts. Perl contains some of the
most flexible and powerful text processing tools; it is also robust enough to support the
development of full-blown applications.
It point to the executable file that will be used to execute the program. The path where
Perl Interpreter is located on a machine.
Session Management:
use CGI;
$ob=Session->new ();
$ob->open_Session ();
$in=$ob->param (uname);
$ob->{SESSION}{uname}=$in;
$name={SESSION}{uname}
Cookies are used to save information so that the user doesn’t have to
enter it every time he/she visits the site.
$cookie = "uname=$uname";
$cookie1 ="pass=$pass";
print "Set-cookie: $cookie", "\n";
print "Set-cookie: $cookie1", "\n";
$cookie1 = $ENV{'HTTP_COOKIE'};
@cookies = split (/;/, $cookie1);
($key, $uname) = split (/=/, $cookies [0]);
($key, $pass) = split(/=/,$cookies[1]);
8
Forwarding data using hidden values:
The values can be retrieved from query string and can be used in that form.
File Handling
File is opened using open function in append mode and print is used to write
password in password.txt file.
open(PWD, ">>password.txt");
print PWD "$pass\n";
close(PWD);
URL Redirecting
$foo=new CGI;
print "$foo->redirect('z:/ITA/resume/register.htm')";
Following Files are used in implementing project and source code in PERL/CGI is as
below:
1. Insertseeker.cgi
2. Insertprovider.cgi
3. Validseeker.cgi
4. Validprovider.cgi
5. Writeresume.pl
6. Insertresume.cgi
7. Applyjob.pl
8. Application.pl
9. Postjob.pl
10. Inserjob.cgi
11. Recruit.pl
12. Select.pl
13. Sendmail.pl
14. Editresume.pl
15. Delete.pl
16. Details.pl
9
1.Insertseeker.cgi
#!/usr/bin/perl –w
use DBI;
#use CGI;
#$foo=new CGI;
$dbname="resumebuilder";
$dbh=DBI->connect("dbi:Pg:dbname=$dbname","","");
$in = $ENV{'QUERY_STRING'};
$in= ~ tr/\+/ /;
$in= ~ s/%(..)/pack("C",hex($1))/ge;
@pair = split(/&/,$in);
($key,$fname) = split(/=/,$pair[0]);
($key,$lname) = split(/=/,$pair[1]);
($key,$gender) = split(/=/,$pair[2]);
($key,$uname) = split(/=/,$pair[3]);
($key,$pass) = split(/=/,$pair[4]);
($key,$cpass) = split(/=/,$pair[5]);
($key,$email) = split(/=/,$pair[7]);
($key,$qual) = split(/=/,$pair[6]);
#$passwordfile= "password.txt";
#$encrypted= crypt ($pass, "");
open(PWD, ">>password.txt");
print PWD "$pass\n";
close(PWD);
$dbh->do($qu);
$dbh->disconnect;
print "<html>";
print "<head>";
print "<script language='Javascript'>";
print "location.href='z:/ITA/PERL/register.htm'";
print "</script>";
print "</head>";
print "</html>";
#print "$foo->redirect('z:/ITA/resume/register.htm')";
10
2.Insertprovider.cgi
#!/usr/bin/perl –w
use DBI;
#use CGI;
#$foo=new CGI;
$dbname="resumebuilder";
$dbh=DBI->connect("dbi:Pg:dbname=$dbname","","");
if ($ENV{'REQUEST_METHOD'} eq "GET")
{
$in = $ENV{'QUERY_STRING'};
}
elsif($ENV{'REQUEST_METHOD'} eq "POST")
{
$e=$ENV{'CONTENT_LENGTH'};
read(STDIN,$i,$e);
@pair = split(/&/,$i);
($key,$fname) = split(/=/,$pair[0]);
($key,$lname) = split(/=/,$pair[1]);
($key,$uname) = split(/=/,$pair[2]);
($key,$pass) = split(/=/,$pair[3]);
($key,$cpass) = split(/=/,$pair[4]);
($key,$company) = split(/=/,$pair[5]);
($key,$post) = split(/=/,$pair[6]);
($key,$email) = split(/=/,$pair[8]);
($key,$website) = split(/=/,$pair[9]);
($key,$contact) = split(/=/,$pair[7]);
$dbh->do($qu);
$dbh->disconnect;
print "<html>";
print "<head>";
print "<script language='Javascript'>";
print "location.href='z:/ITA/resume/register.htm'";
print "</script>";
print "</head>";
print "</html>";
11
3.Validseeker.cgi
Concept of Session
#!/usr/bin/perl –w
use CGI;
#use Session;
#$ob=Session->new();
#$ob->open_Session();
#$in=$ob->param(uname);
#$ob->{SESSION}{uname}=$in;
use DBI;
$dbname="resumebuilder";
$dbh=DBI->connect("dbi:Pg:dbname=$dbname","","");
if ($ENV{'REQUEST_METHOD'} eq "GET")
{
$in = $ENV{'QUERY_STRING'};
}
elsif($ENV{'REQUEST_METHOD'} eq "POST")
{
$e=$ENV{'CONTENT_LENGTH'};
read(STDIN,$i,$e);
# $i= ~ tr/\+/ /;
# $i= ~ s/%(..)/pack("C",hex($1))/ge;
}
@pair = split(/&/,$in);
($key,$uname) = split(/=/,$pair[0]);
($key,$pass) = split(/=/,$pair[1]);
$cookie = "uname=$uname";
$cookie1 ="pass=$pass";
print "Set-cookie: $cookie", "\n";
print "Set-cookie: $cookie1", "\n";
$temp=$dbh->prepare($iq);
$temp->execute();
$cnt=0;
while(@row=$temp->fetchrow_array)
{
$cnt=$cnt + 1;
($a,$email)=@row;
/* If valid seeker */
if($pass eq $a)
{
print "<body bgcolor='lightskyblue'>";
12
print "<font color='blue'><h2>Welcome,";
print "$uname</h2></font>";
print "<h3><font color='blue'>What would you like to
do</font></h3>";
print "<a href='writeresume.pl'><font color='blue'>Create
a
resume</font></a><br>";
print "<a href='applyjob.pl'><font color='blue'>Apply for
a
job</font></a><br>";
print "<a href='editresume.pl?email=$email'><font
color='blue'>Edit
your resume</font></a><br>";
print "<a href='delete.pl?email=$email'><font
color='blue'>Unsubscribe</font></a><br>";
}
/* Invalid user*/
else
{
print "<h4>Unauthorized user<h4><br>";
print "<a href='z:/ITA/resume/register.htm'>Back</a>";
}
}
if($cnt == 0)
{
print "No such user";
}
print "</body>";
print "</html>";
13
4.Validprovider.cgi
Concept of Cookies
#!/usr/bin/perl -w
use DBI;
$dbname="resumebuilder";
$dbh=DBI->connect("dbi:Pg:dbname=$dbname","","");
if ($ENV{'REQUEST_METHOD'} eq "GET")
{
$in = $ENV{'QUERY_STRING'};
}
elsif($ENV{'REQUEST_METHOD'} eq "POST")
{
$e=$ENV{'CONTENT_LENGTH'};
read(STDIN,$i,$e);
}
@pair = split(/&/,$in);
($key,$uname) = split(/=/,$pair[0]);
($key,$pass) = split(/=/,$pair[1]);
$cookie = "uname=$uname";
# $cookie1 ="pass=$pass";
print "Set-cookie: $cookie", "\n";
# print "Set-cookie: $cookie1", "\n";
while(@row=$temp->fetchrow_array)
{
($a)=@row;
/* if valid provider */
if($pass eq $a)
{
print "<body bgcolor='lightskyblue'>";
print "<font color='blue'><h2>Welcome,";
print "$uname</h2></font><br>";
print "<h3><font color='blue'>What would you like to
do?</font></h3>";
print "<a href='Postjob.pl'><font
color='blue'>Post a
job</font></a><br>";
14
print "<a href='recruit.pl'><font
color='blue'>Recruit an
applicant</font></a>";
}
/* if invalid provider */
else
{
print "Unauthorized user";
print "<a href='z:/ITA/resume/register.htm'><font
color='blue'>BACK";
}
}
5.Writeresume.pl
#!/usr/bin/perl –w
#use CGI;
#use Session;
#$ob=Session->new();
#$ob=open_session;
#$uname=$ob->{SESSION}{uname};
$cookie1 = $ENV{'HTTP_COOKIE'};
#print $cookie1;
@cookies = split( /;/,$cookie1);
($key,$uname) = split(/=/,$cookies[0]);
($key,$pass) = split(/=/,$cookies[1]);
#print $pass;
print "<html>";
print "<title>";
print $uname;
#print $pass;
print "</title>";
print "</html>";
print<<"start";
<html>
<head>
<script language="Javascript">
<!--function isEmpty(field)
{
if(field.value=="")
{
return true;
}
15
else
return false;
}
function isvalidemail(f1)
{
emailcheck=f1.value;
var cnt=emailcheck.length;
var n;
//alert(cnt);
for(var i=0;i<cnt;i++)
{
if(emailcheck.substring(i,i+1) == '@')
{
n=i;
i=cnt;
}
}
//alert(n);
//var test=emailcheck.substring(n,cnt)
//alert(test);
if((emailcheck.substring(n,cnt) ==
"@yahoo.com")|(emailcheck.substring(n,cnt) ==
"@rediffmail.com")|(emailcheck.substring(n,cnt) == "@yahoo.co.in"))
{
return true;
}
else
return false;
}
function isvalidphone(f1)
{
phonecheck=f1.value;
var cnt=phonecheck.length;
var n;
//alert(cnt);
for(var i=0;i<cnt;i++)
{
if(phonecheck.substring(i,i+1)<"0" ||
phonecheck.substring(i,i+1)>"9" )
{
return false;
}
else
return true;
}
}
function isrequired(form1)
{ var empty=false;
var email=false;
var phone=false;
if(isEmpty(form1.fname))
{
alert("The name field is required,Please fill it in");
empty=true;
//form1.firstname.focus();
}
if(isEmpty(form1.lname))
{
16
alert("The name field is required,Please fill it in last
name");
empty=true;
// form1.lastname.focus();
}
if(isEmpty(form1.day)|| isEmpty(form1.mon)||isEmpty(form1.year))
{
alert("Please enter proper bdate");
empty=true;
}
if(isEmpty(form1.locadd))
{
alert("Please fill local address");
empty=true;
}
if(isEmpty(form1.permadd))
{
alert("Please type the permanent address ");
empty=true;
}
if(isEmpty(form1.city))
{
alert("The city field is required,Please fill it in");
empty=true;
}
if(isEmpty(form1.state))
{
alert("Please fill your state");
empty=true;
}
if(isEmpty(form1.country))
{
alert("Please fill your country");
empty=true;
}if(isEmpty(form1.code))
{
alert("Please fill your code number");
empty=true;
}
if(isEmpty(form1.res))
{
alert("Please enter your Phone no");
empty=true;
}
else
phone=true;
if(phone==true && isvalidphone(form1.res))
{
phone=false;
}
else
{
alert("Enter proper phone number");
}
if(isEmpty(form1.email))
{
alert("The email field is required,Please fill it in");
empty=true;
17
}
else
email=true;
if(email==true && isvalidemail(form1.email))
{
email=false;
}
else
alert("Invlaid email");
if(isEmpty(form1.sec))
{
alert("Please fill your details for secondary education");
empty=true;
}if(isEmpty(form1.degree))
{
alert("Please fill your degree");
empty=true;
}if(isEmpty(form1.academic))
{
alert("Please fill your academic results");
empty=true;
}if(isEmpty(form1.tskill))
{
alert("Please enter atleast one technical skill");
empty=true;
}if(isEmpty(form1.ntskill))
{
alert("Please fill non technical skill");
empty=true;
}
if(empty==false && email==false && phone==false)
{
alert("Thank you for registering");
}
else
{
form1.action="writeresume.htm";
}
}
//-->
</script>
</head>
18
>Personal
Information: </FONT>
</H2>
</TD>
</TR>
<TR>
<TD><FONT
color="black"><STRONG>*FirstName:
&nb
sp;
</STRONG></FONT></TD>
<TD><FONT color="black"><STRONG><INPUT name="fname"
style="LEFT: 1px; TOP: 3px"></STRONG></FONT></TD>
</TR>
<TR>
<TD>
<P><FONT color="black"><STRONG>
</STRONG></FONT> </P>
<P><FONT color="black"><STRONG>*Last
Name:</STRONG>
</FONT>
</P>
</TD>
<TD>
<P><FONT
color="black"><STRONG></STRONG></FONT> </P>
<P><FONT color="black"><STRONG><INPUT
name="lname"
style="LEFT: 1px; TOP: 41px"></STRONG></FONT></P>
</TD>
</TR>
<TR>
<TD>
<P><FONT color="black"><STRONG>
</STRONG></FONT> </P>
<P><FONT color="black"><STRONG>*Date Of
Birth:</STRONG></FONT></P>
</TD>
<TD>
<P><STRONG> </P>
<SELECT
name="day">
<OPTION selected value="01">01</OPTION>
<OPTION value="02">02</OPTION>
<OPTION value="03">03</OPTION>
<OPTION value="04">04</OPTION>
<OPTION value="05">05</OPTION>
<OPTION value="06">06</OPTION>
<OPTION value="07">07</OPTION>
<OPTION value="08">08</OPTION>
<OPTION value="09">09</OPTION>
<OPTION value="10">10</OPTION>
<OPTION value="11">11</OPTION>
<OPTION value="12">12</OPTION>
<OPTION value="13">13</OPTION>
<OPTION value="14">14</OPTION>
<OPTION value="15">15</OPTION>
<OPTION value="16">16</OPTION>
<OPTION value="17">17</OPTION>
<OPTION value="18">18</OPTION>
<OPTION value="19">19</OPTION>
19
<OPTION value="20">20</OPTION>
<OPTION value="21">21</OPTION>
<OPTION value="22">22</OPTION>
<OPTION value="23">23</OPTION>
<OPTION value="24">24</OPTION>
<OPTION value="25">25</OPTION>
<OPTION value="26">26</OPTION>
<OPTION value="27">27</OPTION>
<OPTION value="28">28</OPTION>
<OPTION value="29">29</OPTION>
<OPTION value="30">30</OPTION>
<OPTION value="31">31</OPTION>
</SELECT></STRONG><FONT color="black"> -
</FONT>
<SELECT name="mon">
<OPTION selected
value="January">January</OPTION>
<OPTION
value="February">February</OPTION>
<OPTION value="March">March</OPTION>
<OPTION value="April">April</OPTION>
<OPTION value="May">May</OPTION>
<OPTION value="June">June</OPTION>
<OPTION value="July">July</OPTION>
<OPTION value="Aug">Aug</OPTION>
<OPTION value="Sept">Sept</OPTION>
<OPTION value="Oct">Oct</OPTION>
<OPTION value="Nov">Nov</OPTION>
<OPTION value="Dec">Dec</OPTION>
</SELECT><FONT color="white">- </FONT>
<SELECT name="year">
<OPTION selected
value="1984">1984</OPTION>
<OPTION value="1985">1985</OPTION>
<OPTION value="1986">1986</OPTION>
<OPTION value="1987">1987</OPTION>
<OPTION value="1988">1988</OPTION>
<OPTION value="1989">1989</OPTION>
<OPTION value="1990">1990</OPTION>
<OPTION value="1991">1991</OPTION>
<OPTION value="1992">1992</OPTION>
<OPTION value="1993">1993</OPTION>
<OPTION value="1994">1994</OPTION>
<OPTION value="1995">1995</OPTION>
<OPTION value="1996">1996</OPTION>
<OPTION value="1997">1997</OPTION>
<OPTION value="1998">1998</OPTION>
<OPTION value="1999">1999</OPTION>
<OPTION value="2000">2000</OPTION>
</SELECT></TD>
</TR>
<TR>
<TD>
<P><FONT color="black"><STRONG>
</STRONG></FONT>
</P>
<P><FONT color="black"><STRONG>*Local
Address:</STRONG> </FONT>
</P>
</TD>
<TD>
20
<P> </P><TEXTAREA
name=locadd></TEXTAREA></TD>
</TR>
<TR>
<TD>
<P><FONT color="black"><STRONG>
</STRONG></FONT> </P>
<P><FONT color="black"><STRONG>*Permanent
Address:</STRONG> </FONT>
</P>
</TD>
<TD>
<P> </P><TEXTAREA
name=permadd></TEXTAREA></TD>
</TR>
<TR>
<TD>
<P><FONT
color="black"><STRONG></STRONG></FONT> </P>
<P><FONT
color="black"><STRONG>*City:</STRONG></FONT></P>
</TD>
<TD>
<P><FONT
color="black"><STRONG></STRONG></FONT> </P>
<P><INPUT name="city"></P>
</TD>
</TR>
<TR>
<TD>
<P><FONT color="black"><STRONG>
</STRONG></FONT> </P>
<P><FONT color="black"><STRONG>Zip
Code:</STRONG>
</FONT>
</P>
</TD>
<TD>
<P><FONT
color="black"><STRONG></STRONG></FONT> </P>
<P><INPUT name="zip"></P>
</TD>
</TR>
<TR>
<TD>
<P><FONT
color="black"><STRONG></STRONG></FONT> </P>
<P><FONT
color="black"><STRONG>*State:</STRONG></FONT></P>
</TD>
<TD>
<P> </P>
<SELECT name="state" style="WIDTH: 169px;
HEIGHT:
22px">
<OPTION selected value="AP">Andhra
Pradesh</OPTION>
<OPTION value="ArP">Arunachal
Pradesh</OPTION>
<OPTION value="GU">Gujarat</OPTION>
21
<OPTION value="MP">Madhya
Pradesh</OPTION>
<OPTION value="RT">Rajasthan</OPTION>
<OPTION value="MH">Maharashtra</OPTION>
<OPTION value="KA">Karnataka</OPTION>
<OPTION value="TN">Tamil Nadu</OPTION>
<OPTION value="UP">Uttar
Pradesh</OPTION>
<OPTION value="JK">Jammu
Kashmir</OPTION>
<OPTION value="Assam">Assam</OPTION>
<OPTION value="punjab">Punjab</OPTION>
</SELECT><FONT color="black">
<STRONG>If Other: <INPUT name="ostate"
style="LEFT:
249px; WIDTH: 154px; TOP: 3px; HEIGHT: 22px"></STRONG></FONT></TD>
</TR>
<TR>
<TD>
<P><STRONG><FONT
color="black"></FONT></STRONG> </P>
<P><STRONG><FONT
color="black">*Country:</FONT></STRONG></P>
</TD>
<TD>
<P> </P>
<SELECT name="country">
<OPTION selected
value="America">America</OPTION>
<OPTION
value="Australia">Australia</OPTION>
<OPTION value="Africa">Africa</OPTION>
<OPTION
value="Antartica">Antartica</OPTION>
<OPTION value="Brazil">Brazil</OPTION>
<OPTION value="Bhutan">Bhutan</OPTION>
<OPTION
value="Bangladesh">Bangladesh</OPTION>
<OPTION
value="Germany">Germany</OPTION>
<OPTION value="India">India</OPTION>
</SELECT><FONT
color="black"><STRONG>  
;
If
Other: </STRONG> <INPUT name="ocountry"></FONT></TD>
</TR>
<TR>
<TD><FONT
color="black"><STRONG>*Phone:</STRONG></FONT></TD>
<TD>
<P><FONT color="black"></FONT> </P>
<P><FONT
color="black"> <STRONG>Residence:<INPUT id="" name="code"
style="WIDTH: 71px; HEIGHT:
22px"
> - <INPUT name="res"></STRONG></FONT></P>
<P><FONT
color="black"><STRONG> Mobile</STRONG>: &
nbsp;
<INPUT name="mobile"></FONT></P>
22
</TD>
</TR>
<TR>
<TD>
<P><FONT
color="black"><STRONG></STRONG></FONT> </P>
<P><FONT
color="black"><STRONG>*E-Mail</STRONG></FONT></P>
<P> </P>
</TD>
<TD>
<P><FONT color="black"><INPUT name="email"
style="WIDTH: 202px; HEIGHT: 22px"></FONT></P>
</TD>
</TR>
<TR>
<TD><FONT color="black"><STRONG>Languages
Known:</STRONG>
</FONT>
</TD>
<td><SELECT multiple name="language" size="2"
>
<OPTION value="Eng">English</OPTION>
<OPTION value="Hindi">Hindi</OPTION>
<OPTION
value="Gujarati">Gujarati</OPTION>
<OPTION value="Tamil">Tamil</OPTION>
<OPTION value="French">French</OPTION>
<OPTION
value="Spanish">Spanish</OPTION>
</SELECT></td>
</TR>
<TR>
<TD colSpan="2">
<H2><FONT color="fuchsia" size="6">
</FONT> </H2>
<H2><FONT color="fuchsia"
size="6">Educational
Qualification:</FONT></H2>
</TD>
</TR>
<tr>
<td><FONT color="black"><STRONG>*Secondary
Education:</STRONG></FONT></td>
<td>
<center><TABLE border="1" borderColor="gray"
cellPadding="0"
cellSpacing="0" width="75%" style="WIDTH: 740px; HEIGHT: 94px">
<TR>
<TD><FONT
color="black"><STRONG>Examination:</STRONG></FONT></TD>
<TD><FONT
color="black"><STRONG>Board/Istitute</STRONG></FONT></TD>
<TD><FONT
color="black"><STRONG>%Marks</STRONG></FONT></TD>
<TD><FONT color="black"><STRONG>Month-Year of
passing</STRONG></FONT></TD>
<TD><FONT color="black"><STRONG>Class
obtained</STRONG></FONT></TD>
<TD><FONT color="black"><STRONG>No. of
Attempts</STRONG></FONT></TD>
23
</TR>
<TR>
<td colspan=6><TEXTAREA style="WIDTH: 1098px;
HEIGHT: 109px" name=sec rows=10 cols=100></TEXTAREA>
</td>
</TR>
</TABLE></center>
</td>
</tr>
<tr>
<td>
<P><STRONG></STRONG> </P>
<P><STRONG> </STRONG> </P>
<P><FONT
color="black"><STRONG>*Higher Degree:</STRONG> </FONT>
</P>
<td>
<P> </P>
<P><FONT
color="black"></FONT> </P>
<SELECT
name="degree" style="WIDTH: 189px; HEIGHT: 34px">
<OPTION selected
value="BE">BE</OPTION>
<OPTION
value="ME">ME</OPTION>
<OPTION
value="MCA">MCA</OPTION>
<OPTION
value="BA">BA</OPTION>
<OPTION
value="MA">MA</OPTION>
<OPTION
value="BCom">BCom</OPTION>
<OPTION
value="MCom">MCom</OPTION>
</SELECT><FONT
color="black"> <STRONG> Stream:
<INPUT id="text15"
name="stream"></STRONG>
</FONT>
<P> </P>
</td>
</td>
</tr>
<tr>
<td><FONT color="black"> <strong>*Acamedic
Record:</strong> </FONT>
<td>
<CENTER><TABLE border="1" borderColor="gray" cellPadding="0"
cellSpacing="0"
width="75%">
<TR>
<TD><FONT
color="black"><STRONG>Examination:</STRONG></FONT></TD>
<TD><FONT
color="black"><STRONG>Board/Istitute</STRONG></FONT></TD>
<TD><FONT
color="black"><STRONG>%Marks</STRONG></FONT></TD>
<TD><FONT
color="black"><STRONG>Month-Year of passing</STRONG></FONT></TD>
24
<TD><FONT
color="black"><STRONG>Class obtained</STRONG></FONT></TD>
<TD><FONT
color="black"><STRONG>No. of Attempts</STRONG></FONT></TD>
</TR>
<tr>
<td colspan=6><TEXTAREA
style="WIDTH: 1094px; HEIGHT: 142px" name=academic rows=50
cols=10></TEXTAREA>
</td>
</tr>
</TABLE>
<FONT color="black"> </FONT><FONT
color="black"> &
nbsp; &nbs
p; &
nbsp; &nbs
p; &
nbsp; &nbs
p; &
nbsp; &nbs
p; &
nbsp; &nbs
p; &
nbsp; &nbs
p; &
nbsp; &nbs
p; &
nbsp; </FONT></CENTER>
</td>
</td>
</tr>
<tr>
<td><FONT color="black"><STRONG>*Technical Skill:
</STRONG></FONT>
</td>
<td>
<P><FONT color="black"> </FONT> </P>
<P><FONT color="black"><INPUT
name="tskill"
style="WIDTH: 226px; HEIGHT: 36px">
</FONT><FONT color="black">
</FONT>
</P>
</td>
</tr>
<tr>
<td>
<P><FONT color="black"><STRONG>*Non Technical
Skill:
</STRONG></FONT>
</P>
</td>
<td>
<P><FONT color="black"> </FONT> </P>
<P><FONT color="black"><INPUT
name="ntskill" style="WIDTH: 223px; HEIGHT: 35px">
</FONT>
</P>
<P><FONT color="black"> </FONT><FONT
color="black"> <FONT color="black"></P></FONT></FONT>
25
</td>
</tr>
<tr>
<td>
<P><FONT color="black"><STRONG>Achievements:
</STRONG></FONT>
</P>
</td>
<td>
<P><FONT color="black"><FONT
color="black"><TEXTAREA
id=TEXTAREA3 name=achieve></TEXTAREA>
</FONT></FONT> </P>
<P> </P>
</td>
</tr>
<tr>
<td>
<P><FONT color="black"><STRONG>Experience:
</STRONG></FONT>
</P>
<P> </P>
</td>
<td>
<P><FONT color="black"> Company
Name:<INPUT
id="text26" name="company" style="LEFT: 112px; WIDTH: 175px;
TOP: 2px; HEIGHT: 35px"> Years: <INPUT
id="text25" name="year"
style="WIDTH: 56px; HEIGHT: 31px">
</FONT>
</P>
<P><FONT color="#ffffff"></FONT> </P>
</td>
</tr>
<tr>
<td>
<P><STRONG><FONT
color="black">Profile:</FONT></STRONG></P>
</td>
<td><P><TEXTAREA style="LEFT: 9px; TOP: 1850px"
name=profile></TEXTAREA> </P>
<P> </P>
</td>
</tr>
</TABLE>
&nb
sp;
&nb
sp;
<INPUT id="submit1" type="submit" value="Submit"
onClick='javascript:return isrequired(form1)'>
<CENTER></CENTER></TR></TABLE>
</body>
</form>
</html>
start
26
6.Insertresume.cgi
#!/usr/bin/perl –w
$in = $ENV{'QUERY_STRING'};
# print @pair;
($key,$fname) = split(/=/,$pair[0]);
($key,$lname) = split(/=/,$pair[1]);
($key,$day) = split(/=/,$pair[2]);
($key,$mon) = split(/=/,$pair[3]);
($key,$year) = split(/=/,$pair[4]);
($key,$loc) = split(/=/,$pair[5]);
$loc=~s/\+/" "/eg;
# $loc= ~s/%([\dA-Fa-f][\dA-Fa-f])/pack("C",hex($1))/eg;
($key,$perm) = split(/=/,$pair[6]);
$perm=~s/\+/" "/eg;
# $perm= ~ s/%([\dA-Fa-f][\dA-Fa-f])/pack("C",hex($1))/eg;
($key,$city) = split(/=/,$pair[7]);
($key,$zip) = split(/=/,$pair[8]);
($key,$state) = split(/=/,$pair[9]);
($key,$otstate) = split(/=/,$pair[10]);
($key,$country) = split(/=/,$pair[11]);
($key,$ocountry) = split(/=/,$pair[12]);
($key,$code) = split(/=/,$pair[13]);
($key,$res) = split(/=/,$pair[14]);
($key,$mobile) = split(/=/,$pair[15]);
($key,$email) = split(/=/,$pair[16]);
($key,$lan) = split(/=/,$pair[17]);
($key,$sec) = split(/=/,$pair[18]);
$sec=~s/\+/" "/eg;
($key,$degree) = split(/=/,$pair[19]);
($key,$stream) = split(/=/,$pair[20]);
($key,$acade) = split(/=/,$pair[21]);
$acade=~s/\+/" "/eg;
($key,$tskill) = split(/=/,$pair[22]);
# $tskill= ~ s/%(..)/pack("C",hex($1))/ge;
$tskill=~s/\+/" "/eg;
($key,$ntskill) = split(/=/,$pair[23]);
$ntskill=~s/\+/" "/eg;
($key,$achieve) = split(/=/,$pair[24]);
27
$achieve=~s/\+/" "/eg;
($key,$comp) = split(/=/,$pair[25]);
($key,$yrs) = split(/=/,$pair[26]);
($key,$profile) = split(/=/,$pair[27]);
$profile=~s/\+/" "/eg;
$empty='';
}
}
@checkmail = split(//,$email);
foreach $letter (@checkmail)
{
if($letter eq "@")
{
$goodemail = 1;
#last;
}
}
$res = ~tr/0-9//dc;
$mobile = ~tr/0-9//dc;
if(!$flag | $goodemail)
{
$qu1="select
fname,lname,day,mon,year,loc,email,sec,degree,stream,academic,tskill,ntskil
l,
achieve,exp,yrs from resume where email='$email'";
$temp=$dbh->prepare($qu1);
$temp->execute();
while(@row=$temp->fetchrow_array)
{
($fname,$lname,$day,$mon,$year,$loc,$email,$sec,$degree,$stream,$academic,$
tskill,$ntskill,
$achieve,$exp,$yrs)=@row;
print "<html>";
print "<body bgcolor='lightskyblue'>";
print "<title>";
28
print $email;
print "</title>";
print "<center><h2><font color='black'>Your profile is as
under</font></h2></center>";
print "<TABLE bgColor='lightskyblue' border=0 width='70%' style=WIDTH:
420px>";
print "<tr>";
print "<td>";
print "First Name:";
print "</td>";
print "<td>";
print $fname;
print "</td>";
print "</tr>";
print "<tr>";
print "<td>";
print "Last Name:";
print "</td>";
print "<td>";
print $lname;
print "</td>";
print "</tr>";
print "<tr>";
print "<td>";
print "Date of Birth :";
print "</td>";
print "<td>";
print $day;
print $mon ;
print $year;
print "</td>";
print "</tr>";
print "<tr>";
print "<td>";
print "Local Address:";
print "</td>";
print "<td>";
print $loc;
print "</td>";
print "</tr>";
print "<tr>";
print "<td>";
print "Email Id:";
print "</td>";
print "<td>";
print $email;
print "</td>";
print "</tr>";
print "<tr>";
print "<td>";
print "Secondary Education:";
print "</td>";
print "<td>";
print $sec;
print "</td>";
29
print "</tr>";
print "<tr>";
print "<td>";
print "Degree:";
print "</td>";
print "<td>";
print $degree;
print "</td>";
print "</tr>";
print "<tr>";
print "<td>";
print "Stream:";
print "</td>";
print "<td>";
print $stream;
print "</td>";
print "</tr>";
print "<tr>";
print "<td>";
print "Academic Results";
print "</td>";
print "<td>";
print $academic;
print "</td>";
print "</tr>";
print "<tr>";
print "<td>";
print "Technical Skill:";
print "</td>";
print "<td>";
print $tskill;
print "</td>";
print "</tr>";
print "<tr>";
print "<td>";
print "Non Technical skills:";
print "</td>";
print "<td>";
print $ntskill;
print "</td>";
print "</tr>";
print "<tr>";
print "<td>";
print "Achievements:";
print "</td>";
print "<td>";
print $achieve;
print "</td>";
print "</tr>";
print "<tr>";
print "<td>";
print "Experience:Company";
print "</td>";
30
print "<td>";
print $exp;
print "</td>";
print "</tr>";
print "<tr>";
print "<td>";
print "Years of Experience:";
print "</td>";
print "<td>";
print $yrs;
print "</td>";
print "</tr>";
print "<tr>";
print "<td>";
print "<form name=form1 method=post action='z:/ITA/PERl/register.htm'>";
print "<input type=submit value=Back>";
print "</form>";
print "</td>";
print "<td>";
print "<form name=form2 method=post action='applyjob.pl'>";
print "<input type=hidden value=$email name=email>";
print "<input type=submit value=Apply>";
print "</form>";
print "</td>";
print "</tr>";
print "</body>";
}
$dbh->disconnect;
}
else
{
print "Your resume was not accepted,Please fill the form properly again";
print "<a href='writeresume.pl'>Back";
}
7.Applyjob.pl
#!/usr/bin/perl –w
$cookie1 = $ENV{'HTTP_COOKIE'};
#print $cookie1;
31
@cookies = split( /;/,$cookie1);
($key,$uname) = split(/=/,$cookies[0]);
if ($ENV{'REQUEST_METHOD'} eq "GET")
{
$in = $ENV{'QUERY_STRING'};
}
elsif($ENV{'REQUEST_METHOD'} eq "POST")
{
#print "<html><head><H1>sdfsdfsf</H1></head>";
$e=$ENV{'CONTENT_LENGTH'};
read(STDIN,$i,$e);
# $i= ~ tr/\+/ /;
# $i= ~ s/%(..)/pack("C",hex($1))/ge;
@pair = split(/&/,$i);
($key,$semail) = split(/=/,$pair[0]);
# print "<font color='red'>$semail</font>";
}
if($semail eq '')
{
$qu1="select email from seeker where uname='$uname'";
$temp1=$dbh->prepare($qu1);
$temp1->execute();
while(@row1=$temp1->fetchrow_array)
{
($semail)=@row1
}
}
$qu="select * from job";
$temp=$dbh->prepare($qu);
$temp->execute();
print "<TABLE bgColor=lightskyblue border=1 bordercolor=black cellPadding=0
cellSpacing=0
width='100%'
style='LEFT: 10px; TOP: 19px'>";
print "<TR><TD width='50%'><pre><STRONG><FONT color=blue size=6>Online
Resume
Builder</FONT></STRONG></pre></TD>";
print "<TD>";
print "<img src='z:/ITA/resume/images7.jpg' style='HEIGHT: 193px; WIDTH:
395px'>";
print "</TD>";
print "<TR>";
print "<TD colspan=2> <FONT
color=blue size=5>";
print "Home
Resume Creation Post Job
</FONT></TD></TR></TABLE> ";
print "<HTML>";
#print "<form name=form1 method=post action='application.pl'>";
print "<BODY bgcolor=lightskyblue>";
while(@row=$temp->fetchrow_array)
{
32
($jid,$vcode,$company,$loc,$post,$skill,$cperson,$cnum,$email,$web,$exp)=@r
ow;
print "<TABLE bgColor=lightskyblue border=0
cellPadding=1 cellSpacing=1
width='70%' style='WIDTH: 420px'>";
print "<TR>";
print "<TD colSpan=2>";
print "<H2> Job Description</H2></TD>";
print "</TR>";
print "<TR>";
print "<TD>Vacancy Code:</TD>";
print "<TD>$vcode</TD></TR>";
print "<TR>";
print "<TD> Company</TD>";
print "<TD>$company</TD></TR>";
print "<TR>";
print "<TD>Location:</TD>";
print "<TD>$loc</TD></TR>";
print "<TR>";
print "<TD>Post:</TD>";
print "<TD>$post</TD></TR>";
print "<TR>";
print "<TD>Key Skills:</TD>";
print "<TD>$skill</TD></TR>";
print "<TR>";
print "<TD>Contact Person:</TD>";
print "<TD>$cperson</TD></TR>";
print "<TR>";
print "<TD>Contact No.:</TD>";
print "<TD>$cnum</TD></TR>";
print "<TR>";
print "<TD>E-Mail:</TD>";
print "<TD>";
print "$email</TD></TR>";
print "<TR>";
print "<TD>Web Site:</TD>";
print "<TD>$web</TD>";
print "</TR>";
print "<TR>";
print "<TD>Exp Requ:</TD>";
print "<TD>$exp";
print "</TD>";
print "</TR>";
#print "<input type=hidden name=jid value=$jid>";
print "<tr>";
print "<td colspan=2>";
print "<center><a
href='application.pl?jid=$jid&semail=$semail'>Apply</center>";
print "</td>";
print "</tr>";
print "</TABLE>";
}
print "</BODY>";
#print "</form>";
print "</HTML>";
33
8.Application.pl
#!/usr/bin/perl –w
use DBI;
$dbname="resumebuilder";
$dbh=DBI->connect("dbi:Pg:dbname=$dbname","","");
#use CGI;
#$foo=new CGI;
print "Content-type: text/html","\n\n";
#$cookie1 = $ENV{'HTTP_COOKIE'};
#print $cookie1;
if ($ENV{'REQUEST_METHOD'} eq "GET")
{
$in = $ENV{'QUERY_STRING'};
@pair = split(/&/,$in);
($key,$jid) = split(/=/,$pair[0]);
($key,$email) = split(/=/,$pair[1]);
34
9. Postjob.pl
#!/usr/bin/perl –w
$cookie1 = $ENV{'HTTP_COOKIE'};
#print $cookie1;
@cookies = split( /;/,$cookie1);
($key,$uname) = split(/=/,$cookies[0]);
($key,$pass) = split(/=/,$cookies[1]);
print "<html>";
print "<title>";
print $uname;
#print $pass;
print "</title>";
print "</html>";
print <<"start";
<html>
<head>
<script language='Javascript'>
function isEmpty(field)
{
if(field.value=="")
{
return true;
}
else
return false;
}
function isvalidemail(f1)
{
emailcheck=f1.value; print "</html>";
var cnt=emailcheck.length;
var n;
//alert(cnt);
for(var i=0;i<cnt;i++)
{
if(emailcheck.substring(i,i+1) == '@')
{
n=i;
i=cnt;
}
}
//alert(n);
//var test=emailcheck.substring(n,cnt)
//alert(test);
if((emailcheck.substring(n,cnt) ==
"@yahoo.com")|(emailcheck.substring(n,cnt) ==
"@rediffmail.com")|(emailcheck.substring(n,cnt) == "@yahoo.co.in"))
{
return true;
}
else
return false;
}
35
function isvalidweb(f1)
{
webcheck=f1.value; // alert(webcheck);
var cnt=webcheck.length;
var n;
if(webcheck.substring(0,3) == 'www')
{
n=3;
}
// alert(n);
if(webcheck.substring(n,n+1)=='.')
{// alert("ok");
for(var j=4;j<cnt;j++)
{
if(webcheck.substring(j,j+1)== '.')
{ // alert("ok");
m=j;
m=m+1;
//alert(m);
}
//else
//return false;
}
//alert(m);
if((webcheck.substring(m,cnt) ==
'com')|(webcheck.substring(m,cnt) ==
'gov.in')|(webcheck.substring(m,cnt) == 'co.in'))
{
return true;
}
else
return false;
}
}
function isvalidphone(f1)
{
phonecheck=f1.value;
var cnt=phonecheck.length;
var n;
//alert(cnt);
for(var i=0;i<cnt;i++)
{
if(phonecheck.substring(i,i+1)<'0' ||
phonecheck.substring(i,i+1)>'9' )
{
return false;
}
else
return true;
}
}
function isrequired(form1)
{ var empty=false;
var pass=false;
var email=false;
var phone=false;
var web=false;
if(isEmpty(form1.vcode))
{
36
alert("The vacancy code field is required,Please fill it in");
empty=true;
//form1.firstname.focus();
}
if(isEmpty(form1.company))
{
alert("The company field is required,Please fill ");
empty=true;
// form1.lastname.focus();
}
if(isEmpty(form1.loc))
{
alert("The Location field is required,Please fill it in ");
empty=true;
// form1.lastname.focus();
}
if(isEmpty(form1.skill))
{
alert("Please enter skill requires");
empty=true;
// form1.lastname.focus();
}
if(isEmpty(form1.cperson))
{
alert("Please fill it in contact person name");
empty=true;
// form1.lastname.focus();
}
if(isEmpty(form1.post))
{
alert("Please fill your post");
empty=true;
}
if(isEmpty(form1.phone))
{
alert("Please enter your Phone no");
empty=true;
}
else
phone=true;
if(phone==true && isvalidphone(form1.phone))
{
phone=false;
}
else
{
alert("Enter proper phone number");
}
if(isEmpty(form1.email))
{
alert("The email field is required,Please fill it in");
empty=true;
}
else
email=true;
if(email==true && isvalidemail(form1.email))
{
email=false;
37
}
else
alert("Invlaid email");
if(isEmpty(form1.website))
{
alert("Please enter your company's website");
empty=true;
}
else
web=true;
if(web==true && isvalidweb(form1.website))
{
web=false;
}
else
alert("Please enter proper website");
}
}
</script>
</head>
<TR>
<TD colSpan=2>
<H2> Fill the
following details</H2> </TD>
</TR>
<TR>
<TD>Vacancy Code:</TD>
<TD><INPUT name=vcode style="HEIGHT: 22px; LEFT: 1px; TOP: 2px; WIDTH:
173px"
></TD></TR>
38
<TR>
<TD> Company</TD>
<TD><INPUT name=company
style="HEIGHT: 22px; WIDTH: 172px"></TD></TR>
<TR>
<TD>Location:</TD>
<TD><INPUT name=loc
style="HEIGHT: 22px; WIDTH: 169px"></TD></TR>
<TR>
<TD> Post:</TD>
<TD><INPUT name=post style="HEIGHT: 22px; LEFT: 1px; TOP: 2px; WIDTH:
173px"
></TD></TR>
<TR>
<TD>Key Skills:</TD>
<TD><INPUT name=skill
style="HEIGHT: 22px; WIDTH: 169px"></TD></TR>
<TR>
<TD>Contact Person:</TD>
<TD><INPUT name=cperson
style="HEIGHT: 22px; WIDTH: 172px"></TD></TR>
<TR>
<TD>Contact No.:</TD>
<TD><INPUT name=phone
style="FILTER: ; HEIGHT: 22px; WIDTH: 169px"></TD></TR>
<TR>
<TD>E-Mail:</TD>
<TD>
<P><INPUT name=email style="HEIGHT: 22px; WIDTH: 233px"
></P></TD></TR>
<TR>
<TD>
Web Site:
</TD>
<TD><INPUT id=text2 name=website
style="HEIGHT: 22px; WIDTH: 231px">
</TD>
</TR>
<TR>
<TD>Exp Requ:</TD><TD><INPUT name=exp
style="HEIGHT: 22px; WIDTH: 164px">
</TD>
</TR>
<TR>
<TD
colSpan=2>  
; &n
bsp;  
;
39
print "</form>";
print "</html>";
10 Insertjob.cgi
#!/usr/bin/perl –w
use DBI;
$dbname="resumebuilder";
$dbh=DBI->connect("dbi:Pg:dbname=$dbname","","");
if ($ENV{'REQUEST_METHOD'} eq "GET")
{
$in = $ENV{'QUERY_STRING'};
}
@pair = split(/&/,$in);
($key,$vcode) = split(/=/,$pair[0]);
($key,$company) = split(/=/,$pair[1]);
($key,$location) = split(/=/,$pair[2]);
($key,$post) = split(/=/,$pair[3]);
$post=~ s/\+/" "/eg;
($key,$skill) = split(/=/,$pair[4]);
$skill=~ s/\+/" "/eg;
#$skill= ~ s/%([\dA-Fa-f][\dA-Fa-f])/pack("c",hex($1))/eg;
($key,$cperson) = split(/=/,$pair[5]);
($key,$cnum) = split(/=/,$pair[6]);
($key,$email) = split(/=/,$pair[7]);
($key,$web) = split(/=/,$pair[8]);
($key,$exp) = split(/=/,$pair[9]);
($key,$pname) = split(/=/,$pair[10]);
$empty='';
}
}
@checkmail = split(//,$email);
foreach $letter (@checkmail)
40
{
if($letter eq "@")
{
$goodemail = 1;
#last;
}
}
@website = split(/\./,$web);
$goodweb = 1;
$cnum = ~tr/0-9//dc;
#@phone= splir(//,$cnum);
#$digit = 0;
#foreach $number (@phone)
#{
# if($number =~ /\d/)
# {
# $digit++;
# }
# }
# if($digit<10)
# {
# $phone = 0;
# }
print "<html>";
print "<head>";
print <<"start";
<form name=form1 method=get action='insertjob.cgi'>
start
print "<TR>\n";
print "<TD colspan=2> <FONT
color=blue size=5> Home
41
Resume Creation Post Job
</FONT></TD></TR></TABLE> \n";
print "<TR>\n";
print "<TD colspan=2>\n";
print "<H2> Fill the
following details</H2> </TD>\n";
print "</TR>\n";
print "<TR>\n";
print "<TD>Vacancy Code:</TD>\n";
print "<TD><INPUT type=text name=vcode value=\"$vcode\" style='HEIGHT:
22px; LEFT: 1px; TOP: 2px;
WIDTH: 173px'></TD></TR>\n";
print "<TR>\n";
print "<TD> Company</TD>\n";
print "<TD><INPUT type=text name=company value=\"$company\" style='HEIGHT:
22px;WIDTH:172px'>\n";
print "</TD></TR>\n";
print "<TR>\n";
print "<TD>Location:</TD>\n";
print "<TD><INPUT type=text name=loc value=\"$location\" style='HEIGHT:
22px; WIDTH:
169px'></TD></TR>\n";
print "<TR>\n";
print "<TD> Post:</TD>\n";
print "<TD><INPUT type=text name=post value=\"$post\"
style='HEIGHT:22px;LEFT:1px;TOP:2px;
WIDTH: 173px'>\n";
print "</TD></TR>\n";
print "<TR>\n";
print "<TD>Key Skills:</TD>\n";
print "<TD><INPUT type=text name=skill value='$skill' style='HEIGHT: 22px;
WIDTH:
169px'></TD></TR>\n";
print "<TR>\n";
print "<TD>Contact Person:</TD>\n";
print "<TD><INPUT type=text name=cperson value=\"$cperson\"></TD></TR>\n";
print "<TR>\n";
print "<TD>Contact No.:</font></TD>\n";
print "<TD><INPUT type=text name=phone value=\"$cnum\"></TD></TR>\n";
42
if(!$goodemail)
{
print "<TR>\n";
print "<TD><font color='red'>E-Mail:</font></TD>\n";
print "<TD>\n";
print "<P><INPUT type=text name=email
value=\"$email\"></P></TD></TR>\n";
}
else
{
print "<TR>\n";
print "<TD>E-Mail:</TD>\n";
print "<TD>\n";
print "<P><INPUT type=text name=email value=\"$email\">\n";
print "</P></TD></TR>\n";
}
if(!$goodweb)
{
print "<TR>\n";
print "<TD><font color='red'>Web Site:</font></TD>\n";
print "<TD><INPUT type=text name=website value=\"$web\">\n";
print "</TD></TR>";
}
else
{
print "<TR>\n";
print "<TD>Web Site:</TD>\n";
print "<TD><INPUT type=text name=website value=\"$web\">\n";
print "</TD></TR>";
print "</TR></TABLE>\n";
print "<input type=hidden name=pname value=$pname>";
print "</BODY>\n";
print "</form>\n";
print "</html>\n";
else
{
#print "Ok";
$qu1="select pid from provider where uname='$pname'";
$temp=$dbh->prepare($qu1);
$temp->execute();
while(@row=$temp->fetchrow_array)
{
($pid)=@row;
}
43
#print "<font color='red'>$pid</font>";
$qu="insert into job values
(nextval('seq_job'),'$vcode','$company','$location','$post','$skill',
'$cperson',$cnum,
'$email','$web','$exp',$pid)";
$dbh->do($qu);
$dbh->disconnect;
11.Recruit.pl
#!/usr/bin/perl –w
use DBI;
$dbname="resumebuilder";
$dbh=DBI->connect("dbi:Pg:dbname=$dbname","","");
$cookie1 = $ENV{'HTTP_COOKIE'};
#print $cookie1;
@cookies = split( /;/,$cookie1);
($key,$uname) = split(/=/,$cookies[0]);
($pid)=@row;
}
#print "<font color='red'>$pid</font>";
print "<html>";
print "<body bgcolor='lightskyblue'>";
print "<TABLE bgColor=lightskyblue border=3 cellPadding=0 cellSpacing=0
width='100%' borderColor=black
style='LEFT: 10px; TOP: 19px'>";
print "<TR><TD width='50%'><pre><STRONG><FONT color=blue size=6>Online
Resume
44
Builder</FONT></STRONG></pre></TD>";
print "<TD>";
print "<img src='z:/ITA/resume/images7.jpg' style='HEIGHT: 193px; WIDTH:
395px'>";
print "</TD>";
print "<TR>";
print "<TD colspan=2> <FONT
color=blue size=5>";
print "Home
Resume Creation Post Job
</FONT></TD></TR></TABLE> ";
while(@row1=$temp1->fetchrow_array)
{
($jid,$vcode,$company,$loc,$post)=@row1;
#print $jid;
print "<tr>";
print "<td>";
print "<a href='select.pl?jid=$jid&pid=$pid'>$vcode</a>";
print "</td>";
print "<td>";
print $company;
print "</td>";
print "<td>";
print $loc;
print "</td>";
print "<td>";
print $post;
print "</td>";
print "</tr>";
45
12.Select.pl
#!/usr/bin/perl –w
use DBI;
$dbname="resumebuilder";
$dbh=DBI->connect("dbi:Pg:dbname=$dbname","","");
$in = $ENV{'QUERY_STRING'};
print "<html>";
print "<body bgcolor='lightskyblue'>";
print "<TABLE bgColor=lightskyblue border=1 cellPadding=0 cellSpacing=0
width='100%' borderColor=black
style='LEFT: 10px; TOP: 19px'>";
print "<TR><TD width='50%'><pre><STRONG><FONT color=blue size=6>Online
Resume
Builder</FONT></STRONG></pre></TD>";
print "<TD>";
print "<img src='z:/ITA/resume/images7.jpg' style='HEIGHT: 193px; WIDTH:
395px'>";
print "</TD>";
print "<TR>";
print "<TD colspan=2> <FONT
color=blue size=5>";
print "Home
Resume Creation Post Job
</FONT></TD></TR></TABLE> ";
while(@row=$temp->fetchrow_array)
{
($email)=@row;
46
print "<center><TABLE bgColor=lightskyblue border=0 borderColor=fuchsia
borderColorLight=deeppink cellPadding=1 cellSpacing=1
width='70%' style='WIDTH: 420px'></center>";
print "<TR>";
print "<TD colSpan=6>";
#print "<H3><center>Select an applicant</center></H3></TD>";
print "</TR>";
print "<TR>";
print "<TD>First name:</TD>";
print "<TD>Last name:</TD>";
print "<TD>Degree:</TD>";
print "<TD>Stream:</TD>";
print "<TD>Technical Skill:</TD>";
print "<TD>Mail To:</TD>";
print "</tr>";
while(@row1=$temp1->fetchrow_array)
{
#print "<font color='red'>OK</font>";
($fname,$lname,$degree,$stream,$tskill)=@row1;
print "<tr>";
print "<td>";
print "$fname";
print "<a href='details.cgi?email=$email'>view
details</a>";
print "</td>";
print "<td>";
print $lname;
print "</td>";
print "<td>";
print $degree;
print "</td>";
print "<td>";
print $stream;
print "</td>";
# print "</tr>";
print "<td>";
print $tskill;
print "</td>";
print "<td>";
print "<a href='sendmail.cgi?send=$email'>Send
Mail</a>";
print "</td>";
print "</tr>";
47
}
}
else
{
$flag1=1;
print "<center><TABLE bgColor=lightskyblue border=0 borderColor=fuchsia
borderColorLight=deeppink cellPadding=1 cellSpacing=1 width='70%'
style='WIDTH:
420px'></center>";
print "<TR>";
print "<TD colspan=6>";
print "<H3><center>select an applicant</center></H3></TD>";
print "</TR>";
print "<TR>";
print "<TD>First name:</TD>";
print "<TD>Last name:</TD>";
print "<TD>Qualification:</TD>";
print "<td>";
print "Mail To:";
print "</td>";
print "</tr>";
while(@row2=$temp2->fetchrow_array)
{
($fname,$lname,$qual)=@row2;
print "<tr>";
print "<td>";
print "$fname</a>";
print "</td>";
print "<td>";
print $lname;
print "</td>";
print "<td>";
print $qual;
print "</td>";
print "<td>";
print "<a href='sendmail.cgi?send=$email'>Send
mail</a>";
print "</td>";
print "</tr>";
}
print "</table>";
48
}
13.Sendmail.cgi
#!/usr/bin/perl -w
use DBI;
$dbname="resumebuilder";
$dbh=DBI->connect("dbi:Pg:dbname=$dbname","","");
$in = $ENV{'QUERY_STRING'};
print <<"start";
<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
<TITLE></TITLE>
</HEAD>
<BODY>
<P style="BACKGROUND-COLOR:
white">To:  
;
start
print <<"end";
<P style="BACKGROUND-COLOR:
white">From: <INPUT
id=text2 name=text2></P>
<P>Subject: <INPUT id=text3 name=text3></P>
<P>Message <TEXTAREA id=TEXTAREA1 style="WIDTH:
253px; HEIGHT: 68px"
name=TEXTAREA1 rows=3 cols=27>
</TEXTAREA> </P>
<P>
&nb
sp;
<INPUT id=submit1 type=submit value=Submit name=submit1></P>
</BODY>
</HTML> end
49
14.Editresume.cgi
#!/usr/bin/perl -w
use DBI;
$dbname="resumebuilder";
$dbh=DBI->connect("dbi:Pg:dbname=$dbname","","");
$in = $ENV{'QUERY_STRING'};
#print $email;
while(@row=$temp->fetchrow_array)
{
$flag=1;
($fname,$lname,$day,$mon,$year,$loc,$perm,$city,$zip,$state,$country,$code,
$res,
$mobile,$email,$lan,$sec,$degree,$stream,$acade,$tskill,$ntskill,$achieve,
$comp,$profile,$yrs,$ostate,$ocountry)=@row;
print "<html>";
print <<"start";
<form method=get action=edit.cgi>
start
print "<body bgcolor='lightskyblue'>";
print "<title>";
print $email;
print "</title>";
print "<h2><font color='blue'>Your profile is as under</font></h2>";
print "<TABLE bgColor=lightskyblue border=0 borderColor=fuchsia
borderColorLight=deeppink width='70%' style=WIDTH: 420px>";
print "<tr>";
print "<td>";
print "First Name:";
print "</td>";
print "<td>";
print "<input type=text name=fname value='$fname'>";
print "</td>";
print "</tr>";
print "<tr>";
print "<td>";
print "Last Name:";
print "</td>";
print "<td>";
print "<input type=text name=lname value='$lname'>";
print "</td>";
50
print "</tr>";
print "<tr>";
print "<td>";
print "Date of Birth :";
print "</td>";
print "<td>";
print "<input type=text name=day value=$day>";
print "<input type=text name=mon value='$mon'>";
print "<input type=text name=year value=$year>";
print "</td>";
print "</tr>";
print "<tr>";
print "<td>";
print "Local Address:";
print "</td>";
print "<td>";
print "<input type=text name=loc value='$loc'>";
print "</td>";
print "</tr>";
print "<tr>";
print "<td>";
print "Permanent Address:";
print "</td>";
print "<td>";
print "<input type=text name=perm value='$perm'>";
print "</td>";
print "</tr>";
print "<tr>";
print "<td>";
print "City:";
print "</td>";
print "<td>";
print "<input type=text name=city value='$city'>";
print "</td>";
print "</tr>";
print "<tr>";
print "<td>";
print "Zip Code:";
print "</td>";
print "<td>";
print "<input type=text name=zip value=$zip>";
print "</td>";
print "</tr>";
print "<tr>";
print "<td>";
print "State:";
print "</td>";
print "<td>";
print "<input type=text name=state value='$state'>";
print "</td>";
print "</tr>";
print "<tr>";
print "<td>";
print "Other state:";
51
print "</td>";
print "<td>";
print "<input type=text name=ostate value='$ostate'>";
print "</td>";
print "</tr>";
print "<tr>";
print "<td>";
print "Country:";
print "</td>";
print "<td>";
print "<input type=text name=country value='$country'>";
print "</td>";
print "</tr>";
print "<tr>";
print "<td>";
print "Other Country:";
print "</td>";
print "<td>";
print "<input type=text name=ocountry value='$ocountry'>";
print "</td>";
print "</tr>";
print "<tr>";
print "<td>";
print "Code:";
print "</td>";
print "<td>";
print "<input type=text name=code value=$code>";
print "</td>";
print "</tr>";
print "<tr>";
print "<td>";
print "Res No:";
print "</td>";
print "<td>";
print "<input type=text name=res value=$res>";
print "</td>";
print "</tr>";
print "<tr>";
print "<td>";
print "Mobile:";
print "</td>";
print "<td>";
print "<input type=text name=mob value=$mobile>";
print "</td>";
print "</tr>";
print "<tr>";
print "<td>";
print "Email Id:";
print "</td>";
print "<td>";
print "<input type=text name=email value='$email'>";
print "</td>";
print "</tr>";
52
print "<tr>";
print "<td>";
print "Languages:";
print "</td>";
print "<td>";
print "<input type=text name=lan value='$lan'>";
print "</td>";
print "</tr>";
print "<tr>";
print "<td>";
print "Secondary Education:";
print "</td>";
print "<td>";
print "<input type=text name=sec value='$sec'>";
print "</td>";
print "</tr>";
print "<tr>";
print "<td>";
print "Degree:";
print "</td>";
print "<td>";
print "<input type=text name=degree value='$degree'>";
print "</td>";
print "</tr>";
print "<tr>";
print "<td>";
print "Stream:";
print "</td>";
print "<td>";
print "<input type=text name=stream value='$stream'>";
print "</td>";
print "</tr>";
print "<tr>";
print "<td>";
print "Academic Results";
print "</td>";
print "<td>";
print "<input type=text name=academic value=$academic>";
print "</td>";
print "</tr>";
print "<tr>";
print "<td>";
print "Technical Skill:";
print "</td>";
print "<td>";
print "<input type=text name=tskill value='$tskill'>";
print "</td>";
print "</tr>";
print "<tr>";
print "<td>";
print "Non Technical skills:";
print "</td>";
print "<td>";
53
print "<input type=text name=ntskill value='$ntskill'>";
print "</td>";
print "</tr>";
print "<tr>";
print "<td>";
print "Achievements:";
print "</td>";
print "<td>";
print "<input type=text name=achieve value='$achieve'>";
print "</td>";
print "</tr>";
print "<tr>";
print "<td>";
print "Experience:Company";
print "</td>";
print "<td>";
print "<input type=text name=company value='$comp'>";
print "</td>";
print "</tr>";
print "<tr>";
print "<td>";
print "Years of Experience:";
print "</td>";
print "<td>";
print "<input type=text name=year value='$yrs'>";
print "</td>";
print "</tr>";
print "<tr>";
print "<td>";
print "Profile:";
print "</td>";
print "<td>";
print "<input type=text name=pro value='$profile'>";
print "</td>";
print "</tr>";
print "<tr>";
print "<td colspan=2>";
print "<center><input type=submit value=Set></center>";
print "</td>";
print "</tr>";
print "</body>";
$dbh->disconnect;
if($flag != 1)
{
print "You have not created your resume yet ";
print "<a href='writeresume.pl'>Create Now</a>";
}
54
15.Delete.pl
#!/usr/bin/perl –w
use DBI;
$dbname="resumebuilder";
$dbh=DBI->connect("dbi:Pg:dbname=$dbname","","");
$in = $ENV{'QUERY_STRING'};
#print $email;
$dbh->disconnect;
16.Details.cgi
#!/usr/bin/perl –w
use DBI;
$dbname="resumebuilder";
$dbh=DBI->connect("dbi:Pg:dbname=$dbname","","");
$in = $ENV{'QUERY_STRING'};
$qu1="select
fname,lname,day,mon,year,loc,email,sec,degree,stream,academic,tskill,ntskil
l,
achieve,exp,yrs from resume where email='$email'";
$temp=$dbh->prepare($qu1);
$temp->execute();
55
while(@row=$temp->fetchrow_array)
{
($fname,$lname,$day,$mon,$year,$loc,$email,$sec,$degree,$stream,$academic,$
tskill,$ntskill,
$achieve,$exp,$yrs)=@row;
print "<html>";
print "<body bgcolor='lightskyblue'>";
print "<title>";
print $email;
print "</title>";
print "<center><h2><font color='blue'>Your profile is as
under</font></h2></center>";
print "<TABLE bgColor=lightskyblue border=0 borderColor=fuchsia
borderColorLight=deeppink width='70%' style=WIDTH: 420px>";
print "<tr>";
print "<td>";
print "First Name:";
print "</td>";
print "<td>";
print $fname;
print "</td>";
print "<tr>";
print "<td>";
print "Last Name:";
print "</td>";
print "<td>";
print $lname;
print "</td>";
print "</tr>";
print "<tr>";
print "<td>";
print "Date of Birth :";
print "</td>";
print "<td>";
print $day;
print $mon ;
print $year;
print "</td>";
print "</tr>";
print "<tr>";
print "<td>";
print "Local Address:";
print "</td>";
print "<td>";
print $loc;
print "</td>";
print "</tr>";
print "<tr>";
print "<td>";
print "Email Id:";
print "</td>";
print "<td>";
print $email;
print "</td>";
print "</tr>";
56
print "<tr>";
print "<td>";
print "Secondary Education:";
print "</td>";
print "<td>";
print $sec;
print "</td>";
print "</tr>";
print "<tr>";
print "<td>";
print "Degree:";
print "</td>";
print "<td>";
print $degree;
print "</td>";
print "</tr>";
print "<tr>";
print "<td>";
print "Stream:";
print "</td>";
print "<td>";
print $stream;
print "</td>";
print "</tr>";
print "<tr>";
print "<td>";
print "Academic Results";
print "</td>";
print "<td>";
print $academic;
print "</td>";
print "</tr>";
print "<tr>";
print "<td>";
print "Technical Skill:";
print "</td>";
print "<td>";
print $tskill;
print "</td>";
print "</tr>";
print "<tr>";
print "<td>";
print "<tr>";
print "<td>";
print "Achievements:";
print "</td>";
57
print "<td>";
print $achieve;
print "</td>";
print "</tr>";
print "<tr>";
print "<td>";
print "Experience:Company";
print "</td>";
print "<td>";
print $exp;
print "</td>";
print "</tr>";
print "<tr>";
print "<td>";
print "Years of Experience:";
print "</td>";
print "<td>";
print $yrs;
print "</td>";
print "</tr>";
print "<tr>";
print "<td>";
print "<form name=form1 method=post action='z:/ITA/PERL/register.htm'>";
print "<input type=submit value=Back>";
print "</form>";
print "</td>";
print "<td>";
print "<form name=form2 method=post action='applyjob.pl'>";
print "<input type=hidden value=$email name=email>";
print "<input type=submit value=Apply>";
print "</form>";
print "</td>";
print "</tr>";
print "</body>";
}
$dbh->disconnect;
58
7.SERVLETS
A servlet is a Java class that dynamically extends the function of a web server. A
servlet runs in Java Virtual machine managed by virtual machine.
Session Management:
Session.putValue(name,value)
Session.invalidate()
Cookies are used to save information so that the user doesn’t have to
enter it every time he/she visits the site.
Cookie coo=request.getCookies()
String name=coo.getValue();
59
Forwarding data using hidden values:
The values can be retrieved from query string and can be used in that form.
File Handling
long len=br.length();
br.seek(len);
br.writeChars(uname);
URL Redirecting
response.sendRedirect("logout" +"?email="+response.encodeRedirectUrl(email));
Following Files are used in implementing project and source code in SERVLETS is as
below:
1. Insertseeker
2. Insertprovider
3. Validseeker
4. Insertresume
5. Applyjob
6. Application
7. Inserjob
8. Recruit
9. Select
10. Sendmail
11. Editresume
12. Edit
13. Delete
14. Viewresume
15. Unsubscribe
16. Search
17. Logout
60
1.Insertseeker
Concept of File handling
/*
* insertseeker.java
*
* Created on March 17, 2006, 4:33 PM
*/
import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
import java.sql.*;
import java.lang.*;
/**
*
* @author fco22
* @version
*/
public class insertseeker extends HttpServlet {
int flag=0;
RandomAccessFile br = new RandomAccessFile("z:/ITA/user.txt","rw");
long len=br.length();
br.seek(len);
br.writeChars(uname);
br.writeChars(" ");
61
try
{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver”);
Connection con = DriverManager.getConnection("jdbc:odbc:resume","scott","tiger");
Statement st = con.createStatement();
String iq = "insert into seeker
values(seq_seeker.nextval,'"+fname+"','"+lname+"','"+gender+"','"+uname+"','"+upasswo
rd+"','"+cpassword+"','"+email+"','"+qual+"')";
st.execute(iq);
response.sendRedirect("z:/ITA/resume/register.htm");
}
catch(Exception e)
{
}
}
2. Insertprovider
/*
* insertprovider.java
*
* Created on March 21, 2006, 4:47 PM
*/
import javax.servlet.*;
import javax.servlet.http.*;
import java.sql.*;
import java.lang.*;
/**
*
* @author fco22
* @version
*/
public class insertprovider extends HttpServlet {
62
//String gender= request.getParameter("radio1");
String uname= request.getParameter("uname");
String upassword=request.getParameter("password");
String cpassword=request.getParameter("confpassword");
String company=request.getParameter("company");
String post=request.getParameter("post");
String phone=request.getParameter("phone");
String email= request.getParameter("email");
String website= request.getParameter("website");
//out.println(fname);
try
{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection con =
DriverManager.getConnection("jdbc:odbc:resume","scott","tiger");
Statement st = con.createStatement();
String iq = "insert into provider
values(seq_provider.nextval,'"+fname+"','"+lname+"','"+uname+"','"+upassword+"','"+cpass
word+"','"+company+"','"+post+"',"+phone+",'"+email+"','"+website+"')";
st.execute(iq);
response.sendRedirect("z:/ITA/resume/register.htm");
}
catch(Exception e)
{
}
}
3.Validseeker
Concept of Session
/*
* validseeker.java
*
* Created on March 17, 2006, 5:17 PM
*/
import javax.servlet.*;
import javax.servlet.http.*;
import java.sql.*;
import java.lang.*;
import java.io.*;
/**
*
* @author fco22
63
* @version
*/
protected void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, java.io.IOException {
// processRequest(request, response);
response.setContentType("text/html");
java.io.PrintWriter out = response.getWriter();
HttpSession session=request.getSession(true);
try
{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection con =
DriverManager.getConnection("jdbc:odbc:resume","scott","tiger");
Statement st = co n.createStatement();
if(uname.equals("")||upassword.equals(""))
{
out.println("Please enter user name and password");
}
while(rs.next())
{
String pass=rs.getString("upassword");
String email=rs.getString("email");
//out.println(email);
64
if(pass.compareTo(upassword)==0)
{
//out.println("hi");
//out.println(uname);
session.putValue("uname",uname);
session.putValue("email",email);
//session.putValue("upassword",upassword);
out.println("<body bgcolor='lightskyblue'>");
out.println("<b>Welcome</b>"+uname+"<br>");
out.println("<b>What would you like to do?<br>");
out.println("<a href='z:/ITA/resume/writeresume.htm'>Create a
resume</a><br>");
out.println("<a href=applyjob?email="+email+">Apply for a job</a><br>");
out.println("<a href=servlet/editresume?email="+email+">Edit your
resume</a><br>");
out.println("<a href=delete?email="+email+">Unsubscribe</a>");
}
else
{
out.println("Unauthorized user <a href='z:/ITA/resume/register.htm'>Back");
}
}
}
catch(Exception e)
{
65
4.Validprovider
Concept of Cookies
/*
* validprovider.java
*
* Created on March 21, 2006, 5:07 PM
*/
import javax.servlet.*;
import javax.servlet.http.*;
import java.sql.*;
import java.lang.*;
/**
*
* @author fco22
* @version
*/
public class validprovider extends HttpServlet {
66
out.println("<body>");
out.println("</body>");
out.println("</html>");
*/
out.close();
}
If (pass.compareTo (upassword)==0)
{
Cookie coo=new Cookie ("uname", uname);
Response.addCookie (coo);
Out.println ("<body bgcolor='lightskyblue'>");
Out.println ("Welcome "+uname+"<br>");
Out.println ("What would you like to do? <Br>");
67
//out.println ("<a href='editresume.pl? Email=$email'>Edit your
resume<br>");
Out.println ("<a href=unsubscribe? Email="+email+">Unsubscribe</a>");
}
Else
{
Out.println ("Unauthorized user <a
href='z:/ITA/resume/register.htm'>Back");
}
}
}
catch(Exception e)
{
5. Applyjob
Concept of Retriving values through Session
/*
* applyjob.java
*
* Created on March 28, 2006, 3:30 PM
*/
import javax.servlet.*;
import javax.servlet.http.*;
import java.sql.*;
68
import java.lang.*;
/**
*
* @author fco22
* @version
*/
protected void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, java.io.IOException {
//processRequest(request, response);
response.setContentType("text/html");
java.io.PrintWriter out = response.getWriter();
HttpSession session=request.getSession(true);
try
{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection con =
DriverManager.getConnection("jdbc:odbc:resume","scott","tiger");
Statement st = con.createStatement();
String uname=(String)session.getValue("uname");
String email=(String)session.getValue("email");
//ResultSet rs = st.executeQuery("select
fname,lname,day,mon,year,loc,email,sec,degree,stream,acad,tskill,achieve,comp,yrs from
resume where email='"+email+"'");
ResultSet rs=st.executeQuery("select * from job");
// String iq = "insert into seeker
values('seq_seeker.nextval','"+fname+"','"+lname+"','"+gender+"','"+uname+"','"+upassword+
"','"+cpassword+"','"+email+"','"+qual+"')";
//st.execute(iq);
while(rs.next())
{
String jid =rs.getString("jid");
String vcode =rs.getString("vcode");
String company=rs.getString("company");
String loc=rs.getString("loc");
String post=rs.getString("post");
69
String skill=rs.getString("skill");
String cperson=rs.getString("person");
String cnum=rs.getString("phone");
String email1=rs.getString("email");
String exp=rs.getString("exp");
String web=rs.getString("website");
//out.println("HI");
//out.println(uname);
out.println("<html>");
out.println("<head>");
out.println("<title>");
out.println(uname);
out.println("</title>");
out.println("</head>");
out.println("<body bgcolor='lightskyblue'>");
out.println("<table border=1 cellPadding=0 cellSpacing=0
bordercolor='black'><tr><td colspan=2>Apply for the following jobs</td></tr>");
out.println("<tr><td><b>Vcode</b></td>");
out.println("<td>");
out.println(vcode);
//out.println(lname1);
out.println("</td></tr>");
out.println("<tr><td><b>Compnay</b></td>");
out.println("<td>");
out.println(company);
//out.println(mon1);
//out.println(year1);
out.println("</td></tr>");
out.println("<tr><td><b>Location</b></td>");
out.println("<td>");
out.println(loc);
//out.println(lname1);
out.println("</td></tr>");
out.println("<tr><td><b>Email</b></td>");
out.println("<td>");
out.println(email1);
//out.println(lname1);
out.println("</td></tr>");
out.println("<tr><td><b>Key skill:</b></td>");
out.println("<td>");
out.println(skill);
//out.println(lname1);
out.println("</td></tr>");
//out.println("/td></tr>");
out.println("<tr><td><b>Contact Person</b></td>");
out.println("<td>");
70
out.println(cperson);
//out.println(lname1);
out.println("</td></tr>");
//out.println("/td></tr>");
out.println("<tr><td><b>Contact No:</b></td>");
out.println("<td>");
out.println(cnum);
//out.println(lname1);
out.println("</td></tr>");
out.println("<tr><td><b>Website:</b></td>");
out.println("<td>");
out.println(web);
//out.println(lname1);
out.println("</td></tr>");
out.println("<tr><td><b>Exp required</b></td>");
out.println("<td>");
out.println(exp);
//out.println(lname1);
out.println("</td></tr>");
out.println("<tr>");
out.println("<td colspan=2>");
out.println("<a href=application?email="+email+"&jid="+jid+">Apply for
job");
out.println("</td></tr>");
out.println("</table>");
out.println("</body>");
out.println("</html>");
}
}
catch(Exception e)
{
}
/** Handles the HTTP <code>POST</code> method.
* @param request servlet request
* @param response servlet response
*/
}
protected void doPost(HttpServletRequest request, HttpServletResponse response)
throws ServletException, java.io.IOException {
// processRequest(request, response);
doGet(request,response);
}
71
}
6.Application
/*
* application.java
*
* Created on March 28, 2006, 4:28 PM
*/
import javax.servlet.*;
import javax.servlet.http.*;
import java.sql.*;
import java.lang.*;
/**
*
* @author fco22
* @version
*/
public class application extends HttpServlet {
72
out.println("<title>Servlet</title>");
out.println("</head>");
out.println("<body>");
out.println("</body>");
out.println("</html>");
*/
out.close();
}
try
{
//out.println(email);
//out.println(jid);
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection con =
DriverManager.getConnection("jdbc:odbc:resume","scott","tiger");
Statement st = con.createStatement();
String iq = "insert into apply values('"+email+"','"+jid+"')";
st.execute(iq);
out.println("Thanks for applying");
out.println("<a href='z:/ITA/resume/register.htm'>logout");
//response.sendRedirect("z:/ITA/resume/register.htm");
}
catch(Exception e)
{
73
7.Insertjob
Concept of Server side validation
/*
* insertjob.java
*
* Created on March 21, 2006, 5:48 PM
*/
import javax.servlet.*;
import javax.servlet.http.*;
import java.sql.*;
import java.lang.*;
/**
*
* @author fco22
* @version
*/
public class insertjob extends HttpServlet {
74
out.println("<body>");
out.println("</body>");
out.println("</html>");
*/
//out.close();
}
//int n=Integer.parseInt(phone);
int len=vcode.length();
int len1=email.length();
int len2=website.length();
int len3=company.length();
int len4=phone.length();
int empty=0;
int bademail=0;
int badphone=0;
int badweb=0;
String char1="abcdefghijklmnopqrstuvwxyz";
String domain="@yahoo.com";
String www="www.";
String com=".com";
//out.println(len);
if(len==0||len1==0||len2==0||len3==0||len4==0)
{
empty=1;
75
}
if(len1>0)
{
if((email.startsWith(char1)) || (email.endsWith(domain)))
{
bademail=1;
}
}
if(len2>0)
{
}
if(empty==1 || bademail==0 || badphone==0 || badweb==0)
{
//if(vcode.length()==0)
out.println("<html>");
out.println("<head>");
out.println("<title>Servlet</title>");
out.println("</head>");
out.println("<body>");
if(empty==1)
{
76
if(bademail==0)
{
out.println("<font color=red>Please enter proper email</font><br>");
}
if(badweb==0)
{
out.println("<font color=red>Please enter proper website</font><br>");
}
if(badphone==0)
{
out.println("<font color=red>Please enter proper phone</font><br>");
}
out.println("<form name=form1 method=get action=insertjob>");
out.println("<BODY bgcolor=lightskyblue>");
out.println("<TABLE bgColor=lightskyblue border=1 cellPadding=0
cellSpacing=0 width=100% background= borderColor=black borderColorLight=black
style=LEFT: 10px; TOP: 19px>");
out.println("<TR><TD width=50%><pre><STRONG><FONT color=blue
size=6>Online Resume Builder</FONT></STRONG></pre></TD>");
out.println("<TR>" +
"<TD colSpan=2>" +
"<H2><FONT color=balck" +
"style=BACKGROUND-COLOR:dogerblue >Fill the following " +
"details</FONT>" +
"</H2> </TD>" +
"</TR>" +
"<TR>" +
"<TD>Vacancy Code:</TD>"+
"<TD><INPUT name=vcode value='"+vcode+"' style=HEIGHT: 22px; LEFT: 1px; TOP:
2px; WIDTH: 173px></TD></TR>"+
"<TR>"+
"<TD> Company</TD>" +
"<TD><INPUT name=company value='"+company+"' style=HEIGHT: 22px; WIDTH:
172px></TD></TR>"+
"<TR>"+
"<TD>Location:</TD>" +
77
"<TD><INPUT name=loc value='"+loc+"' style=HEIGHT: 22px; WIDTH:
169px></TD></TR>"+
"<TR>"+
"<TD> Post:</TD>"+
"<TD><INPUT name=post value='"+post+"' style=HEIGHT: 22px; LEFT: 1px; TOP:
2px; WIDTH: 173px></TD></TR>"+
"<TR>"+
"<TD>Key Skills:</TD>"+
"<TD><INPUT name=skill value='"+skill+"' style=HEIGHT: 22px; WIDTH:
169px></TD></TR>"+
"<TR>"+
"<TD>Contact Person:</TD>"+
"<TD><INPUT name=cperson value='"+cperson+"' style=HEIGHT: 22px; WIDTH:
172px></TD></TR>"+
"<TR>"+
"<TD>Contact No.:</TD>"+
"<TD><INPUT name=phone value='"+phone+"' style=FILTER: ; HEIGHT: 22px;
WIDTH: 169px></TD></TR>"+
"<TR>"+
"<TD>E-Mail:</TD>"+
"<TD>"+
"<P><INPUT name=email value='"+email+"'style=HEIGHT: 22px; WIDTH:
233px></P></TD></TR>"+
"<TR>"+
"<TD>Web Site:</TD>"+
"<TD><INPUT id=text2 name=website value='"+website+"' style=HEIGHT: 22px;
WIDTH: 231px>"+
"</TD>"+
"</TR>" +
"<TR>"+
"<TD>Exp Requ:</TD><TD><INPUT name=exp value='"+exp+"' style=HEIGHT: 22px;
WIDTH: 164px>"+
"</TD>"+
"</TR>"+
"<TR>"+
"<TD
colSpan=2>
&nbs
p; &n
bsp; "+
"<INPUT align=absMiddle id=submit1 style=LEFT: 165px; TOP: 4px type=submit
value=Submit ></TD>"+
"</TR></TABLE>"+
"</BODY>"+
"</form>"+
"</html>");
78
}
else
{
Cookie[] cook=request.getCookies();
String uname=cook[0].getValue();
//out.println(uname);
//int phone1=Integer.parseInt(phone);
//int exp1=Integer.parseInt(exp);
//out.println(post);
//out.println(website);
//out.println(email);
try
{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection con =
DriverManager.getConnection("jdbc:odbc:resume","scott","tiger");
Statement st = con.createStatement();
String iq = "insert into job
values(seq_job.nextval,'"+vcode+"','"+company+"','"+loc+"','"+post+"','"+skill+"','"+cperson
+"',"+phone+",'"+email+"','"+website+"',"+exp+",'"+uname+"')";
st.execute(iq);
out.println("<a href='recruit'>Recruit an applicant<br>");
out.println("<a href='logout'>logout");
//response.sendRedirect("/servlet/recruit");
//response.sendRedirect("z:/ITA/resume/register.htm");
}
catch(Exception e)
{
}
// processRequest(request, response);
}
79
return "Short description";
}}
8 Recruit
/*
* recruit.java
*
* Created on March 28, 2006, 5:23 PM
*/
import javax.servlet.*;
import javax.servlet.http.*;
import java.sql.*;
import java.lang.*;
/**
*
* @author fco22
* @version
*/
public class recruit extends HttpServlet {
80
out.println("<body>");
out.println("</body>");
out.println("</html>");
*/
out.close();
}
out.println("<tr><td>");
out.println("Job ID:");
out.println("</td>");
out.println("<td>");
out.println(jid);
out.println("</td></tr>");
81
out.println("<tr><td>");
out.println("Email:");
out.println("</td>");
out.println("<td>");
out.println("<a href=sendmail?email="+email+">'"+email+"'</a>");
//out.println(mon);
//out.println(year);
out.println("</td></tr>");
out.println("</table>");
// out.println(email);
// out.println(jid);
}
}
catch(Exception e)
{
}
9.Select
/*
* select.java
*
* Created on April 15, 2006, 12:57 PM
*/
import javax.servlet.*;
import javax.servlet.http.*;
import java.sql.*;
import java.io.*;
/**
*
* @author fco22
* @version
*/
public class select extends HttpServlet {
try
{
82
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection con =
DriverManager.getConnection("jdbc:odbc:resume","scott","tiger");
Statement st = con.createStatement();
String jid=request.getParameter("jid");
out.println("<tr><td>");
out.println("Job ID:");
out.println("</td>");
out.println("<td>");
out.println(jid1);
//out.println(jid);
out.println("<tr><td>");
out.println("Email:");
out.println("</td>");
out.println("<td>");
out.println("<a href=sendmail?email="+email+">'"+email+"'</a>");
//out.println(mon);
//out.println(year);
out.println("</td></tr>");
// out.println(email);
// out.println(jid);
}
out.println("</table>");
}
catch(Exception e)
{
83
}
}
}
10.Sendmail
/*
* sendmail.java
*
* Created on March 31, 2006, 1:52 PM
*/
import javax.servlet.*;
import javax.servlet.http.*;
/**
*
* @author fco22
* @version
*/
public class sendmail extends HttpServlet {
84
}
}
11.Editresume
Concept of Retriving values through Session
/*
* editresume.java
*
* Created on March 31, 2006, 3:44 PM
*/
import javax.servlet.*;
import javax.servlet.http.*;
import java.sql.*;
import java.lang.*;
/**
*
* @author fco22
* @version
*/
public class editresume extends HttpServlet {
while(rs.next())
{
String fname =rs.getString(1);
String lname=rs.getString(2);
String day=rs.getString(3);
String mon=rs.getString(4);
String year=rs.getString(5);
85
String loc=rs.getString(6);
String perm=rs.getString(7);
String city=rs.getString(8);
String zip=rs.getString(9);
String state=rs.getString(10);
String ostate=rs.getString(11);
String country=rs.getString(12);
String ocountry=rs.getString(13);
String code=rs.getString(14);
String res=rs.getString(15);
String mobile=rs.getString(16);
// String email=rs.getString(17);
String lan=rs.getString(18);
String sec=rs.getString(19);
String stream=rs.getString(20);
String academic=rs.getString(21);
String tskill=rs.getString(22);
String ntskill=rs.getString(23);
String achieve=rs.getString(24);
String company=rs.getString(25);
String profile=rs.getString(27);
String degree=rs.getString(28);
String yrs=rs.getString(26);
out.println("<tr><td>");
out.println("Last Name:");
out.println("</td>");
out.println("<td>");
out.println("<input type=text name=lname value="+lname+">");
out.println("</td></tr>");
out.println("<tr><td>");
out.println("Day:");
out.println("</td>");
out.println("<td>");
86
out.println("<input type=text name=day value="+day+">");
out.println("</td></tr>");
out.println("<tr><td>");
out.println("Month:");
out.println("</td>");
out.println("<td>");
out.println("<input type=text name=month value="+mon+">");
out.println("</td></tr>");
out.println("<tr><td>");
out.println("Year:");
out.println("</td>");
out.println("<td>");
out.println("<input type=text name=year value="+year+">");
out.println("</td></tr>");
out.println("<tr><td>");
out.println("Local Address:");
out.println("</td>");
out.println("<td>");
out.println("<input type=text name=loc value="+loc+">");
//out.println(lname);
out.println("</td></tr>");
out.println("<tr><td>");
out.println("Permanent Address:");
out.println("</td>");
out.println("<td>");
out.println("<input type=text name=perm value="+perm+">");
//out.println(lname);
out.println("</td></tr>");
out.println("<tr><td>");
out.println("City:");
out.println("</td>");
out.println("<td>");
out.println("<input type=text name=city value="+city+">");
//out.println(lname);
out.println("</td></tr>");
out.println("<tr><td>");
out.println("Zip:");
out.println("</td>");
out.println("<td>");
out.println("<input type=text name=zip value="+zip+">");
//out.println(lname);
out.println("</td></tr>");
87
out.println("<tr><td>");
out.println("State:");
out.println("</td>");
out.println("<td>");
out.println("<input type=text name=state value="+state+">");
//out.println(lname);
out.println("</td></tr>");
out.println("<tr><td>");
out.println("Other state:");
out.println("</td>");
out.println("<td>");
out.println("<input type=text name=ostate value='"+ostate+"'>");
//out.println(lname);
out.println("</td></tr>");
out.println("<tr><td>");
out.println("Country:");
out.println("</td>");
out.println("<td>");
out.println("<input type=text name=country value="+country+">");
//out.println(lname);
out.println("</td></tr>");
out.println("<tr><td>");
out.println("Other Country:");
out.println("</td>");
out.println("<td>");
out.println("<input type=text name=ocountry value="+ocountry+">");
//out.println(lname);
out.println("</td></tr>");
out.println("<tr><td>");
out.println("Code:");
out.println("</td>");
out.println("<td>");
out.println("<input type=text name=code value="+code+">");
//out.println(lname);
out.println("</td></tr>");
out.println("<tr><td>");
out.println("Residence:");
out.println("</td>");
out.println("<td>");
out.println("<input type=text name=res value="+res+">");
//out.println(lname);
out.println("</td></tr>");
out.println("<tr><td>");
out.println("Mobile:");
88
out.println("</td>");
out.println("<td>");
out.println("<input type=text name=mobile value="+mobile+">");
//out.println(lname);
out.println("</td></tr>");
out.println("<tr><td>");
out.println("Languages:");
out.println("</td>");
out.println("<td>");
out.println("<input type=text name=lan value="+lan+">");
//out.println(lname);
out.println("</td></tr>");
out.println("<tr><td>");
out.println("Secondary Education:");
out.println("</td>");
out.println("<td>");
out.println("<input type=text name=sec value="+sec+">");
//out.println(lname);
out.println("</td></tr>");
out.println("<tr><td>");
out.println("Degree");
out.println("</td>");
out.println("<td>");
out.println("<input type=text name=degree value="+degree+">");
//out.println(lname);
out.println("</td></tr>");
out.println("<tr><td>");
out.println("Stream");
out.println("</td>");
out.println("<td>");
out.println("<input type=text name=stream value="+stream+">");
//out.println(lname);
out.println("</td></tr>");
out.println("<tr><td>");
out.println("Academic");
out.println("</td>");
out.println("<td>");
out.println("<input type=text name=academic value="+academic+">");
//out.println(lname);
out.println("</td></tr>");
out.println("<tr><td>");
out.println("Technical skill");
out.println("</td>");
89
out.println("<td>");
out.println("<input type=text name=tskill value="+tskill+">");
//out.println(lname);
out.println("</td></tr>");
out.println("<tr><td>");
out.println("Non Technical Skill:");
out.println("</td>");
out.println("<td>");
out.println("<input type=text name=ntskill value="+ntskill+">");
//out.println(lname);
out.println("</td></tr>");
out.println("<tr><td>");
out.println("Achievements");
out.println("</td>");
out.println("<td>");
out.println("<input type=text name=achieve value="+achieve+">");
//out.println(lname);
out.println("</td></tr>");
out.println("<tr><td>");
out.println("Company");
out.println("</td>");
out.println("<td>");
out.println("<input type=text name=company value="+company+">");
//out.println(lname);
out.println("</td></tr>");
out.println("<tr><td>");
out.println("Years");
out.println("</td>");
out.println("<td>");
out.println("<input type=text name=yrs value="+yrs+">");
//out.println(lname);
out.println("</td></tr>");
out.println("<tr><td>");
out.println("Profile:");
out.println("</td>");
out.println("<td>");
out.println("<input type=text name=profile value="+profile+">");
//out.println(lname);
out.println("</td></tr>");
90
out.println("</table></center>");
out.println("</body>");
out.println("</form>");
out.println("</html>");
out.close();
}
}
catch(Exception e)
{
}
}
}
12 Edit
/*
* edit.java
*
* Created on April 1, 2006, 11:38 AM
*/
import javax.servlet.*;
import javax.servlet.http.*;
import java.sql.*;
import java.lang.*;
import java.io.*;
/**
*
* @author fco22
* @version
*/
public class edit extends HttpServlet {
91
String mon=request.getParameter("mon");
String year=request.getParameter("year");
String loc=request.getParameter("loc");
String perm=request.getParameter("perm");
String city=request.getParameter("city");
String zip=request.getParameter("zip");
String state=request.getParameter("state");
String ostate= request.getParameter("ostate");
String country= request.getParameter("country");
String ocountry=request.getParameter("ocountry");
String code=request.getParameter("code");
String res=request.getParameter("res");
String mobile=request.getParameter("mobile");
// String email=request.getParameter("email");
String lan = request.getParameter("lan");
String sec = request.getParameter("sec");
String degree = request.getParameter("degree");
String stream = request.getParameter("stream");
String acad = request.getParameter("academic");
String tskill = request.getParameter("tskill");
String ntskill = request.getParameter("ntskill");
String company = request.getParameter("company");
String yrs = request.getParameter("yrs");
String achieve = request.getParameter("achieve");
String profile = request.getParameter("profile");
String email=request.getParameter("mail");
// out.println(email);
try
{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection con =
DriverManager.getConnection("jdbc:odbc:resume","scott","tiger");
Statement st = con.createStatement();
92
catch(Exception e)
{
}
}}
12 Delete
Concept of URL Rewriting
/*
* delete.java
*
* Created on April 1, 2006, 8:03 AM
*/
import javax.servlet.*;
import javax.servlet.http.*;
import java.sql.*;
import java.lang.*;
import java.io.*;
/**
*
* @author fco22
* @version
*/
public class delete extends HttpServlet {
}
catch(Exception e)
{
}
93
}
14 Viewresume
/*
* viewresume.java
*
* Created on March 28, 2006, 5:44 PM
*/
import javax.servlet.*;
import javax.servlet.http.*;
import java.sql.*;
import java.lang.*;
/**
*
* @author fco22
* @version
*/
public class viewresume extends HttpServlet {
while(rs.next())
{
String fname =rs.getString(1);
94
String lname=rs.getString(2);
String day=rs.getString(3);
String mon=rs.getString(4);
String year=rs.getString(5);
String loc=rs.getString(6);
//String email=rs.getString("email");
String sec=rs.getString(19);
String degree=rs.getString(28);
String stream=rs.getString(20);
String academic=rs.getString(21);
String tskill=rs.getString(22);
String achieve=rs.getString(24);
String company=rs.getString(25);
String yrs=rs.getString(26);
out.println("<tr><td>");
out.println("Date of Birth:");
out.println("</td>");
out.println("<td>");
out.println(day);
out.println(mon);
out.println(year);
out.println("</td></tr>");
out.println("<tr><td>");
out.println("Address:");
out.println("</td>");
out.println("<td>");
out.println(loc);
//out.println(lname);
out.println("</td></tr>");
out.println("<tr><td>");
95
out.println("Secondary Education:");
out.println("</td>");
out.println("<td>");
out.println(sec);
//out.println(lname);
out.println("</td></tr>");
out.println("<tr><td>");
out.println("Degree");
out.println("</td>");
out.println("<td>");
out.println(degree);
//out.println(lname);
out.println("</td></tr>");
out.println("<tr><td>");
out.println("Stream");
out.println("</td>");
out.println("<td>");
out.println(stream);
//out.println(lname);
out.println("</td></tr>");
out.println("<tr><td>");
out.println("Academic");
out.println("</td>");
out.println("<td>");
out.println(academic);
//out.println(lname);
out.println("</td></tr>");
out.println("<tr><td>");
out.println("Technical skill");
out.println("</td>");
out.println("<td>");
out.println(tskill);
//out.println(lname);
out.println("</td></tr>");
out.println("<tr><td>");
out.println("Achievements");
out.println("</td>");
out.println("<td>");
out.println(achieve);
//out.println(lname);
out.println("</td></tr>");
out.println("<tr><td>");
out.println("Company");
96
out.println("</td>");
out.println("<td>");
out.println(company);
//out.println(lname);
out.println("</td></tr>");
out.println("<tr><td>");
out.println("Years");
out.println("</td>");
out.println("<td>");
out.println(yrs);
//out.println(lname);
out.println("</td></tr>");
out.println("<input type=hidden name=mail value="+email+">");
out.println("<tr><td colspan=2>");
out.println("<input type=submit value=Apply>");
out.println("</td></tr>");
out.println("</table></center>");
out.println("</body>");
out.println("</form>");
out.println("</html>");
out.close();
}
}
catch(Exception e)
{
}
}
15.Unsubscribe
/*
* unsubscribe.java
*
* Created on April 1, 2006, 8:09 AM
*/
import javax.servlet.*;
import javax.servlet.http.*;
import java.sql.*;
import java.lang.*;
import java.io.*;
/**
*
* @author fco22
* @version
*/
97
public class unsubscribe extends HttpServlet {
protected void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, java.io.IOException {
//processRequest(request, response);
response.setContentType("text/html");
HttpSession session=request.getSession(true);
java.io.PrintWriter out = response.getWriter();
String email=request.getParameter("email");
try
{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection con =
DriverManager.getConnection("jdbc:odbc:resume","scott","tiger");
Statement st = con.createStatement();
st.execute("delete from provider where email='"+email+"'");
//ResultSet rs = st.executeQuery("select email,upassword from seeker where
uname='"+uname+"'");
}
catch(Exception e)
{
}
}
16.Search
/*
* search.java
*
* Created on April 4, 2006, 5:08 PM
*/
import javax.servlet.*;
import javax.servlet.http.*;
import java.sql.*;
import java.lang.*;
/**
*
* @author fco22
* @version
*/
public class search extends HttpServlet {
98
*/
public void init(ServletConfig config) throws ServletException {
super.init(config);
out.println("</body>");
out.println("</html>");
*/
out.close();
}
99
Connection con =
DriverManager.getConnection("jdbc:odbc:resume","scott","tiger");
Statement st = con.createStatement();
ResultSet rs = st.executeQuery("select * from job where
"+searchby+"='"+title+"'");
while(rs.next())
{//out.println("hi");
String jid =rs.getString("jid");
String vcode =rs.getString("vcode");
String company=rs.getString("company");
String loc=rs.getString("loc");
String post=rs.getString("post");
String skill=rs.getString("skill");
String cperson=rs.getString("person");
String cnum=rs.getString("phone");
String email1=rs.getString("email");
String exp=rs.getString("exp");
String web=rs.getString("website");
out.println("<table border=0 cellPadding=1 cellSpacing=1 bordercolor='black'>");
out.println("<tr><td><b>Vcode</b></td>");
out.println("<td>");
out.println(vcode);
//out.println(lname1);
out.println("</td></tr>");
out.println("<tr><td><b>Compnay</b></td>");
out.println("<td>");
out.println(company);
//out.println(mon1);
//out.println(year1);
out.println("</td></tr>");
out.println("<tr><td><b>Location</b></td>");
out.println("<td>");
out.println(loc);
//out.println(lname1);
out.println("</td></tr>");
out.println("<tr><td><b>Email</b></td>");
100
out.println("<td>");
out.println(email1);
//out.println(lname1);
out.println("</td></tr>");
out.println("<tr><td><b>Key skill:</b></td>");
out.println("<td>");
out.println(skill);
//out.println(lname1);
out.println("</td></tr>");
//out.println("/td></tr>");
out.println("<tr><td><b>Contact Person</b></td>");
out.println("<td>");
out.println(cperson);
//out.println(lname1);
out.println("</td></tr>");
//out.println("/td></tr>");
out.println("<tr><td><b>Contact No:</b></td>");
out.println("<td>");
out.println(cnum);
//out.println(lname1);
out.println("</td></tr>");
out.println("<tr><td><b>Website:</b></td>");
out.println("<td>");
out.println(web);
//out.println(lname1);
out.println("</td></tr>");
out.println("<tr><td><b>Exp required</b></td>");
out.println("<td>");
out.println(exp);
//out.println(lname1);
out.println("</td></tr>");
out.println("</table>");
out.println("</body>");
out.println("</html>");
//out.println("</table>");
// out.println(email);
// out.println(jid);
out.println("<br>");
}
}
catch(Exception e)
{
}
}}
101
17.Logout
/*
* logout.java
*
* Created on March 28, 2006, 5:14 PM
*/
import javax.servlet.*;
import javax.servlet.http.*;
/**
*
* @author fco22
* @version
*/
public class logout extends HttpServlet {
protected void processRequest(HttpServletRequest request, HttpServletResponse response)
throws ServletException, java.io.IOException {
response.setContentType("text/html");
java.io.PrintWriter out = response.getWriter();
HttpSession session=request.getSession(true);
String email=request.getParameter("email");
//session.removeValue("uname");
session.removeValue("email");
//session.invalidate();
response.sendRedirect("z:/ITA/resume/register.htm");
/* output your page here
out.println("<html>");
out.println("<head>");
out.println("<title>Servlet</title>");
out.println("</head>");
out.println("<body>");
out.println("</body>");
out.println("</html>");
*/
out.close();
}
102
8.JSP
A Java Server Pages are translated into servlets and execute in sevlet engine.
Session Management:
Session.putValue(name,value)
Session.invalidate()
Cookies are used to save information so that the user doesn’t have to
enter it every time he/she visits the site.
Cookie coo=request.getCookies()
String name=coo.getValue();
103
Forwarding data using hidden values:
The values can be retrieved from query string and can be used in that form.
File Handling
long len=br.length();
br.seek(len);
br.writeChars(uname);
URL Redirecting
response.sendRedirect("logout" +"?email="+response.encodeRedirectUrl(email));
Following Files are used in implementing project and source code in JSP is as below:
1. Insertseeker.jsp
2. Insertprovider.jsp
3. Validseeker.jsp
4. Insertresume.jsp
5. Applyjob.jsp
6. Application.jsp
7. Inserjob.jsp
8. Recruit.jsp
9. Select.jsp
10. Sendmail.jsp
11. Editresume.jsp
12. Edit.jsp
13. Delete.jsp
14. Viewresume.jsp
15. Unsubscribe.jsp
16. Search.jsp
17. Logout.jsp
104
1.Insertseeker.jsp
}%>
<%-- <jsp:useBean id="beanInstanceName" scope="session" class="package.class" /> --%>
<%-- <jsp:getProperty name="beanInstanceName" property="propertyName" /> --%>
</body>
</html>
105
2.Insertprovider.jsp
}
%>
</body>
</html>
106
3.Validseeker.jsp
Concept of Session
try
{
//
HttpSession session=request.getSession(true);
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection con =
DriverManager.getConnection("jdbc:odbc:resume","scott","tiger");
Statement st = con.createStatement();
ResultSet rs = st.executeQuery("select email,upassword from seeker where
uname='"+uname+"'");
while(rs.next())
{
String pass=rs.getString("upassword");
String email=rs.getString("email");
//out.println(email);
if(pass.compareTo(upassword)==0)
{
107
//out.println("hi");
//out.println(uname);
session.putValue("uname",uname);
session.putValue("email",email);
//session.putValue("upassword",upassword);
out.println("<body bgcolor='lightskyblue'>");
out.println("<b>Welcome,"+uname+"<br>");
out.println("<b>What would you like to do?<br>");
out.println("<a href='z:/ITA/JSP/writeresume.htm'>Create a
resume</a><br>");
out.println("<a href=applyjob.jsp?email="+email+">Apply for a
job</a><br>");
out.println("<a href=editresume.jsp?email="+email+">Edit your
resume</a><br>");
out.println("<a href=delete.jsp?email="+email+">Unsubscribe</a></b>");
}
else
{
out.println("Unauthorized user <a href='z:/ITA/resume/register.htm'>Back");
}
}
}
catch(Exception e)
{
out.println("Try error");
}
%>
</body>
</html>
4.Validprovider.jsp
Concept of Cookies
108
Connection con =
DriverManager.getConnection("jdbc:odbc:resume","scott","tiger");
Statement st = con.createStatement();
ResultSet rs = st.executeQuery("select email,upassword from provider where
uname='"+uname+"'");
while(rs.next())
{
String pass=rs.getString("upassword");
String email=rs.getString("email");
// out.println(pass);
if(pass.compareTo(upassword)==0)
{
Cookie coo=new Cookie("uname",uname);
response.addCookie(coo);
out.println("<body bgcolor='lightskyblue'>");
out.println("<b>Welcome,"+uname+"<br>");
out.println("What would you like to do?<br>");
%>
</body>
</html>
109
5.Applyjob.jsp
//ResultSet rs = st.executeQuery("select
fname,lname,day,mon,year,loc,email,sec,degree,stream,acad,tskill,achieve,comp,yrs from
resume where email='"+email+"'");
ResultSet rs=st.executeQuery("select * from job");
// String iq = "insert into seeker
values('seq_seeker.nextval','"+fname+"','"+lname+"','"+gender+"','"+uname+"','"+upassword+
"','"+cpassword+"','"+email+"','"+qual+"')";
//st.execute(iq);
while(rs.next())
{
String jid =rs.getString("jid");
String vcode =rs.getString("vcode");
String company=rs.getString("company");
String loc=rs.getString("loc");
String post=rs.getString("post");
String skill=rs.getString("skill");
String cperson=rs.getString("person");
110
String cnum=rs.getString("phone");
String email1=rs.getString("email");
String exp=rs.getString("exp");
String web=rs.getString("website")
out.println("<html>");
out.println("<head>");
out.println("<title>");
out.println(uname);
out.println("</title>");
out.println("</head>");
out.println("<body bgcolor='lightskyblue'>");
out.println("<table border=0 cellPadding=0 cellSpacing=0
bordercolor='black'><tr><td colspan=2>Apply for the following jobs</td></tr>");
out.println("<tr><td><b>Vcode</b></td>");
out.println("<td>");
out.println(vcode);
//out.println(lname1);
out.println("</td></tr>");
out.println("<tr><td><b>Compnay</b></td>");
out.println("<td>");
out.println(company);
//out.println(mon1);
//out.println(year1);
out.println("</td></tr>");
out.println("<tr><td><b>Location</b></td>");
out.println("<td>");
out.println(loc);
//out.println(lname1);
out.println("</td></tr>");
out.println("<tr><td><b>Email</b></td>");
out.println("<td>");
out.println(email1);
//out.println(lname1);
out.println("</td></tr>");
out.println("<tr><td><b>Key skill:</b></td>");
out.println("<td>");
out.println(skill);
//out.println(lname1);
out.println("</td></tr>");
//out.println("/td></tr>");
out.println("<tr><td><b>Contact Person</b></td>");
out.println("<td>");
out.println(cperson);
//out.println(lname1);
out.println("</td></tr>");
//out.println("/td></tr>");
out.println("<tr><td><b>Contact No:</b></td>");
out.println("<td>");
out.println(cnum);
//out.println(lname1);
111
out.println("</td></tr>");
out.println("<tr><td><b>Website:</b></td>");
out.println("<td>");
out.println(web);
//out.println(lname1);
out.println("</td></tr>");
out.println("<tr><td><b>Exp required</b></td>");
out.println("<td>");
out.println(exp);
//out.println(lname1);
out.println("</td></tr>");
out.println("<tr>");
out.println("<td colspan=2>");
out.println("<a href=application.jsp?email="+email+"&jid="+jid+">Apply for
job");
out.println("</td></tr>");
out.println("</table><br>");
out.println("</body>");
out.println("</html>");
}
}
catch(Exception e)
{
}
%>
</body>
</html>
6.Application.jsp
112
String iq = "insert into apply values('"+email+"',"+jid+")";
st.execute(iq);
out.println("<b>Thanks for applying</b><br>");
out.println("<a href=logout.jsp>logout");
//response.sendRedirect("z:/ITA/resume/register.htm");
}
catch(Exception e)
{
}%>
</body>
</html>
7.Insertjob.jsp
Concept of Server side validation
int len=vcode.length();
int len1=email.length();
int len2=website.length();
int len3=company.length();
int len4=phone.length();
int empty=0;
int bademail=0;
113
int badphone=0;
int badweb=0;
String char1="abcdefghijklmnopqrstuvwxyz";
String domain="@yahoo.com";
String www="www.";
String com=".com";
//out.println(len);
if(len==0||len1==0||len2==0||len3==0||len4==0)
{
empty=1;
}
if(len1>0)
{
if((email.startsWith(char1)) || (email.endsWith(domain)))
{
bademail=1;
}
}
if(len2>0)
{
}
if(empty==1 || bademail==0 || badphone==0 || badweb==0)
{
//if(vcode.length()==0)
114
out.println("<html>");
out.println("<head>");
out.println("<title>email</title>");
out.println("</head>");
out.println("<body>");
if(empty==1)
{
if(badphone==0)
{
out.println("<font color=red>Please enter proper phone</font><br>");
}
out.println("<form name=form1 method=get action=insertjob.jsp>");
out.println("<BODY bgcolor=lightskyblue>");
out.println("<TABLE bgColor=lightskyblue border=1 cellPadding=0
cellSpacing=0 width=100% background= borderColor=black borderColorLight=black
style=LEFT: 10px; TOP: 19px>");
out.println("<TR><TD width='50%'><pre><STRONG><FONT color=blue
size=6>Online Resume Builder</FONT></STRONG></pre></TD>");
out.println("<TD><IMG src =z:/ITA/resume/images.jpg style=HEIGHT: 129px;
WIDTH: 357px width=100></TD> <TR>");
out.println("<TD colspan=2> <FONT
color=lime size=5> <FONT color=black style=BACKGROUND-COLOR:
dodgerblue>Home
Resume Creation Post Job </FONT>");
out.println("</FONT></TD></TR></TABLE> ");
out.println("<TABLE align=left bgColor=lightskyblue border=0
borderColor=black borderColorLight=black cellPadding=1 cellSpacing=1 background=
width=70% style=HEIGHT: 346px; WIDTH: 460px>");
out.println("<TR>" +
"<TD colSpan=2>" +
"<H2><FONT color=balck" +
"style=BACKGROUND-COLOR:dogerblue >Fill the following " +
"details</FONT>" +
"</H2> </TD>" +
"</TR>" +
"<TR>" +
"<TD>Vacancy Code:</TD>"+
115
"<TD><INPUT name=vcode value='"+vcode+"' style=HEIGHT: 22px; LEFT: 1px; TOP:
2px; WIDTH: 173px></TD></TR>"+
"<TR>"+
"<TD> Company</TD>" +
"<TD><INPUT name=company value='"+company+"' style=HEIGHT: 22px; WIDTH:
172px></TD></TR>"+
"<TR>"+
"<TD>Location:</TD>" +
"<TD><INPUT name=loc value='"+loc+"' style=HEIGHT: 22px; WIDTH:
169px></TD></TR>"+
"<TR>"+
"<TD> Post:</TD>"+
"<TD><INPUT name=post value='"+post+"' style=HEIGHT: 22px; LEFT: 1px; TOP:
2px; WIDTH: 173px></TD></TR>"+
"<TR>"+
"<TD>Key Skills:</TD>"+
"<TD><INPUT name=skill value='"+skill+"' style=HEIGHT: 22px; WIDTH:
169px></TD></TR>"+
"<TR>"+
"<TD>Contact Person:</TD>"+
"<TD><INPUT name=cperson value='"+cperson+"' style=HEIGHT: 22px; WIDTH:
172px></TD></TR>"+
"<TR>"+
"<TD>Contact No.:</TD>"+
"<TD><INPUT name=phone value='"+phone+"' style=FILTER: ; HEIGHT: 22px;
WIDTH: 169px></TD></TR>"+
"<TR>"+
"<TD>E-Mail:</TD>"+
"<TD>"+
"<P><INPUT name=email value='"+email+"'style=HEIGHT: 22px; WIDTH:
233px></P></TD></TR>"+
"<TR>"+
"<TD>Web Site:</TD>"+
"<TD><INPUT id=text2 name=website value='"+website+"' style=HEIGHT: 22px;
WIDTH: 231px>"+
"</TD>"+
"</TR>" +
"<TR>"+
"<TD>Exp Requ:</TD><TD><INPUT name=exp value='"+exp+"' style=HEIGHT: 22px;
WIDTH: 164px>"+
"</TD>"+
"<TR>"+
"<TD>Last Date:</TD><TD><INPUT name=last value='"+lastdate+"' style=HEIGHT:
22px; WIDTH: 164px>"+
"</TD>"+
"</TR>"+
116
"<TR>"+
"<TD
colSpan=2>
&nbs
p; &n
bsp; "+
"<INPUT align=absMiddle id=submit1 style=LEFT: 165px; TOP: 4px type=submit
value=Submit ></TD>"+
"</TR></TABLE>"+
"</BODY>"+
"</form>"+
"</html>");
}
else
{
Cookie[] cook=request.getCookies();
String uname=cook[0].getValue();
//out.println(uname);
//int phone1=Integer.parseInt(phone);
//int exp1=Integer.parseInt(exp);
//out.println(post);
//out.println(website);
//out.println(email);
try
{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection con =
DriverManager.getConnection("jdbc:odbc:resume","scott","tiger");
Statement st = con.createStatement();
String iq = "insert into job
values(seq_job.nextval,'"+vcode+"','"+company+"','"+loc+"','"+post+"','"+skill+"','"+cperson
+"',"+phone+",'"+email+"','"+website+"',"+exp+",'"+uname+"',sysdate,'"+lastdate+"')";
st.execute(iq);
out.println("<a href='recruit.jsp'><b>Recruit an applicant<br>");
out.println("<a href='logout.jsp'>logout</b>");
//response.sendRedirect("/servlet/recruit");
//response.sendRedirect("z:/ITA/resume/register.htm");
}
catch(Exception e)
{
}
}
%>
</body>
</html>
117
8.Recruit.jsp
out.println("<tr><td>");
out.println("Job ID:");
out.println("</td>");
out.println("<td>");
out.println("<a href=select.jsp?jid="+jid+">"+jid+"</a>");
//out.println(jid);
out.println("</td></tr>");
out.println("<tr><td>");
out.println("Vacancy code");
118
out.println("</td>");
out.println("<td>");
out.println(vcode);
out.println("</td></tr>");
out.println("<tr><td>");
out.println("Company");
out.println("</td>");
out.println("<td>");
out.println(company);
out.println("</td></tr>");
/*out.println("<tr><td>");
out.println("Email:");
out.println("</td>");
out.println("<td>");
out.println("<a href=sendmail.jsp?email="+email+">'"+email+"'</a>");
//out.println(mon);
//out.println(year);
out.println("</td></tr>");*/
// out.println(email);
// out.println(jid);
}
out.println("</table>");
}
catch(Exception e)
{
}
%>
</body>
</html>
9.Select.jsp
<%@page contentType="text/html" import="java.sql.*"%>
<html>
<head><title>JSP Page</title></head>
<body>
119
// ResultSet rs=st.executeQuery("select * from job where pname='"+pname+"'");
ResultSet rs = st.executeQuery("select * from apply where jid="+jid+"");
out.println("<tr><td>");
out.println("Job ID:");
out.println("</td>");
out.println("<td>");
out.println(jid1);
//out.println(jid);
out.println("<tr><td>");
out.println("Email:");
out.println("</td>");
out.println("<td>");
out.println("<a href=sendmail.jsp?email="+email+">'"+email+"'</a>");
//out.println(mon);
//out.println(year);
out.println("</td></tr>");
// out.println(email);
// out.println(jid);
}
out.println("</table>");
}
catch(Exception e)
{
}
%>
</body>
</html>
120
10. SendMail.jsp
<%@page contentType="text/html"%>
<html>
<head><title>JSP Page</title></head>
<body>
121
11. Editresume.jsp
while(rs.next())
{
String fname =rs.getString(1);
String lname=rs.getString(2);
String day=rs.getString(3);
String mon=rs.getString(4);
String year=rs.getString(5);
String loc=rs.getString(6);
String perm=rs.getString(7);
String city=rs.getString(8);
String zip=rs.getString(9);
String state=rs.getString(10);
String ostate=rs.getString(11);
String country=rs.getString(12);
String ocountry=rs.getString(13);
String code=rs.getString(14);
String res=rs.getString(15);
String mobile=rs.getString(16);
// String email=rs.getString(17);
String lan=rs.getString(18);
String sec=rs.getString(19);
String stream=rs.getString(20);
String academic=rs.getString(21);
String tskill=rs.getString(22);
String ntskill=rs.getString(23);
String achieve=rs.getString(24);
122
String company=rs.getString(25);
String profile=rs.getString(27);
String degree=rs.getString(28);
String yrs=rs.getString(26);
out.println("<tr><td>");
out.println("Last Name:");
out.println("</td>");
out.println("<td>");
out.println("<input type=text name=lname value="+lname+">");
out.println("</td></tr>");
out.println("<tr><td>");
out.println("Day:");
out.println("</td>");
out.println("<td>");
out.println("<input type=text name=day value="+day+">");
out.println("</td></tr>");
out.println("<tr><td>");
out.println("Month:");
out.println("</td>");
out.println("<td>");
out.println("<input type=text name=month value="+mon+">");
out.println("</td></tr>");
out.println("<tr><td>");
out.println("Year:");
out.println("</td>");
out.println("<td>");
out.println("<input type=text name=year value="+year+">");
out.println("</td></tr>");
out.println("<tr><td>");
123
out.println("Local Address:");
out.println("</td>");
out.println("<td>");
out.println("<input type=text name=loc value="+loc+">");
//out.println(lname);
out.println("</td></tr>");
out.println("<tr><td>");
out.println("Permanent Address:");
out.println("</td>");
out.println("<td>");
out.println("<input type=text name=perm value="+perm+">");
//out.println(lname);
out.println("</td></tr>");
out.println("<tr><td>");
out.println("City:");
out.println("</td>");
out.println("<td>");
out.println("<input type=text name=city value="+city+">");
//out.println(lname);
out.println("</td></tr>");
out.println("<tr><td>");
out.println("Zip:");
out.println("</td>");
out.println("<td>");
out.println("<input type=text name=zip value="+zip+">");
//out.println(lname);
out.println("</td></tr>");
out.println("<tr><td>");
out.println("State:");
out.println("</td>");
out.println("<td>");
out.println("<input type=text name=state value="+state+">");
//out.println(lname);
out.println("</td></tr>");
out.println("<tr><td>");
out.println("Other state:");
out.println("</td>");
out.println("<td>");
out.println("<input type=text name=ostate value='"+ostate+"'>");
//out.println(lname);
out.println("</td></tr>");
out.println("<tr><td>");
out.println("Country:");
out.println("</td>");
124
out.println("<td>");
out.println("<input type=text name=country value="+country+">");
//out.println(lname);
out.println("</td></tr>");
out.println("<tr><td>");
out.println("Other Country:");
out.println("</td>");
out.println("<td>");
out.println("<input type=text name=ocountry value="+ocountry+">");
//out.println(lname);
out.println("</td></tr>");
out.println("<tr><td>");
out.println("Code:");
out.println("</td>");
out.println("<td>");
out.println("<input type=text name=code value="+code+">");
//out.println(lname);
out.println("</td></tr>");
out.println("<tr><td>");
out.println("Residence:");
out.println("</td>");
out.println("<td>");
out.println("<input type=text name=res value="+res+">");
//out.println(lname);
out.println("</td></tr>");
out.println("<tr><td>");
out.println("Mobile:");
out.println("</td>");
out.println("<td>");
out.println("<input type=text name=mobile value="+mobile+">");
//out.println(lname);
out.println("</td></tr>");
out.println("<tr><td>");
out.println("Languages:");
out.println("</td>");
out.println("<td>");
out.println("<input type=text name=lan value="+lan+">");
//out.println(lname);
out.println("</td></tr>");
out.println("<tr><td>");
out.println("Secondary Education:");
out.println("</td>");
out.println("<td>");
out.println("<input type=text name=sec value="+sec+">");
125
//out.println(lname);
out.println("</td></tr>");
out.println("<tr><td>");
out.println("Degree");
out.println("</td>");
out.println("<td>");
out.println("<input type=text name=degree value="+degree+">");
//out.println(lname);
out.println("</td></tr>");
out.println("<tr><td>");
out.println("Stream");
out.println("</td>");
out.println("<td>");
out.println("<input type=text name=stream value="+stream+">");
//out.println(lname);
out.println("</td></tr>");
out.println("<tr><td>");
out.println("Academic");
out.println("</td>");
out.println("<td>");
out.println("<input type=text name=academic value="+academic+">");
//out.println(lname);
out.println("</td></tr>");
out.println("<tr><td>");
out.println("Technical skill");
out.println("</td>");
out.println("<td>");
out.println("<input type=text name=tskill value="+tskill+">");
//out.println(lname);
out.println("</td></tr>");
out.println("<tr><td>");
out.println("Non Technical Skill:");
out.println("</td>");
out.println("<td>");
out.println("<input type=text name=ntskill value="+ntskill+">");
//out.println(lname);
out.println("</td></tr>");
out.println("<tr><td>");
out.println("Achievements");
out.println("</td>");
out.println("<td>");
out.println("<input type=text name=achieve value="+achieve+">");
126
//out.println(lname);
out.println("</td></tr>");
out.println("<tr><td>");
out.println("Company");
out.println("</td>");
out.println("<td>");
out.println("<input type=text name=company value="+company+">");
//out.println(lname);
out.println("</td></tr>");
out.println("<tr><td>");
out.println("Years");
out.println("</td>");
out.println("<td>");
out.println("<input type=text name=yrs value="+yrs+">");
//out.println(lname);
out.println("</td></tr>");
out.println("<tr><td>");
out.println("Profile:");
out.println("</td>");
out.println("<td>");
out.println("<input type=text name=profile value="+profile+">");
//out.println(lname);
out.println("</td></tr>");
127
12.Edit.jsp
String email=request.getParameter("mail");
// out.println(email);
try
{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection con =
DriverManager.getConnection("jdbc:odbc:resume","scott","tiger");
Statement st = con.createStatement();
128
st.execute("delete from resume where email='"+email+"'");
//st.close();
//Statement st1 = con.createStatement();
String iq = "insert into resume
values('"+fname+"','"+lname+"',"+day+",'"+mon+"',"+year+",'"+loc+"','"+perm+"','"+city+"',
"+zip+",'"+state+"','"+ostate+"','"+country+"','"+ocountry+"',"+code+","+res+","+mobile+",'"
+email+"','"+lan+"','"+sec+"','"+stream+"','"+acad+"','"+tskill+"','"+ntskill+"','"+achieve+"','"
+company+"',"+yrs+",'"+profile+"','"+degree+"')";
st.execute(iq);
out.println("<b>Your resume has been edited</b><br>");
out.println("<a href=viewresume.jsp?email="+email+">View resume</a>");
//out.println("<a href=logout>logout</a>");
//ResultSet rs = st.executeQuery("select email,upassword from seeker where
uname='"+uname+"'");
}
catch(Exception e)
{
}
%>
</body>
</html>
13.Delete.jsp
Concept of URL Rewriting
}
catch(Exception e)
{
129
}
%>
</body>
</html>
14 Viewresume.jsp
while(rs.next())
{
String fname =rs.getString(1);
String lname=rs.getString(2);
String day=rs.getString(3);
String mon=rs.getString(4);
String year=rs.getString(5);
String loc=rs.getString(6);
//String email=rs.getString("email");
String sec=rs.getString(19);
String degree=rs.getString(28);
String stream=rs.getString(20);
String academic=rs.getString(21);
String tskill=rs.getString(22);
String achieve=rs.getString(24);
String company=rs.getString(25);
String yrs=rs.getString(26);
130
out.println("<title>'"+email+"'</title>");
out.println("</head>");
out.println("<form method=post action=applyjob.jsp>");
out.println("<body bgcolor=lightskyblue>");
out.println("<center>Your profile is as under</center>");
out.println("<center><table border=1 bordercolor=black>");
out.println("<tr><td>");
out.println("Name:");
out.println("</td>");
out.println("<td>");
out.println(fname);
out.println(lname);
out.println("</td></tr>");
out.println("<tr><td>");
out.println("Date of Birth:");
out.println("</td>");
out.println("<td>");
out.println(day);
out.println(mon);
out.println(year);
out.println("</td></tr>");
out.println("<tr><td>");
out.println("Address:");
out.println("</td>");
out.println("<td>");
out.println(loc);
//out.println(lname);
out.println("</td></tr>");
out.println("<tr><td>");
out.println("Secondary Education:");
out.println("</td>");
out.println("<td>");
out.println(sec);
//out.println(lname);
out.println("</td></tr>");
out.println("<tr><td>");
out.println("Degree");
out.println("</td>");
out.println("<td>");
out.println(degree);
//out.println(lname);
out.println("</td></tr>");
out.println("<tr><td>");
out.println("Stream");
out.println("</td>");
131
out.println("<td>");
out.println(stream);
//out.println(lname);
out.println("</td></tr>");
out.println("<tr><td>");
out.println("Academic");
out.println("</td>");
out.println("<td>");
out.println(academic);
//out.println(lname);
out.println("</td></tr>");
out.println("<tr><td>");
out.println("Technical skill");
out.println("</td>");
out.println("<td>");
out.println(tskill);
//out.println(lname);
out.println("</td></tr>");
out.println("<tr><td>");
out.println("Achievements");
out.println("</td>");
out.println("<td>");
out.println(achieve);
//out.println(lname);
out.println("</td></tr>");
out.println("<tr><td>");
out.println("Company");
out.println("</td>");
out.println("<td>");
out.println(company);
//out.println(lname);
out.println("</td></tr>");
out.println("<tr><td>");
out.println("Years");
out.println("</td>");
out.println("<td>");
out.println(yrs);
//out.println(lname);
out.println("</td></tr>");
out.println("<input type=hidden name=mail value="+email+">");
out.println("<tr><td colspan=2>");
out.println("<center><input type=submit value=Apply></center>");
out.println("</td></tr>");
out.println("</table></center>");
132
out.println("</body>");
out.println("</form>");
out.println("</html>");
out.close();
}
}
catch(Exception e)
{
}
%>
</body>
</html>
15. Unsubscribe.jsp
<%@page contentType="text/html" import="java.sql.*"%>
<html>
<head><title>JSP Page</title></head>
<body>
}
catch(Exception e)
{
}%>
</body>
</html>
133
16.Search.jsp
<%@page contentType="text/html" import="java.sql.*"%>
<html>
<head><title>JSP Page</title></head>
<body>
while(rs.next())
{//out.println("hi");
String jid =rs.getString("jid");
String vcode =rs.getString("vcode");
String company=rs.getString("company");
String loc=rs.getString("loc");
String post=rs.getString("post");
String skill=rs.getString("skill");
String cperson=rs.getString("person");
String cnum=rs.getString("phone");
String email1=rs.getString("email");
String exp=rs.getString("exp");
134
String web=rs.getString("website");
//out.println("HI");
//out.println(uname);
out.println("<table border=0 cellPadding=1 cellSpacing=1
bordercolor='black'>");
out.println("<tr><td><b>Vcode</b></td>");
out.println("<td>");
out.println(vcode);
//out.println(lname1);
out.println("</td></tr>");
out.println("<tr><td><b>Compnay</b></td>");
out.println("<td>");
out.println(company);
//out.println(mon1);
//out.println(year1);
out.println("</td></tr>");
out.println("<tr><td><b>Location</b></td>");
out.println("<td>");
out.println(loc);
//out.println(lname1);
out.println("</td></tr>");
out.println("<tr><td><b>Email</b></td>");
out.println("<td>");
out.println(email1);
//out.println(lname1);
out.println("</td></tr>");
out.println("<tr><td><b>Key skill:</b></td>");
out.println("<td>");
out.println(skill);
//out.println(lname1);
out.println("</td></tr>");
//out.println("/td></tr>");
out.println("<tr><td><b>Contact Person</b></td>");
out.println("<td>");
out.println(cperson);
//out.println(lname1);
out.println("</td></tr>");
//out.println("/td></tr>");
out.println("<tr><td><b>Contact No:</b></td>");
out.println("<td>");
out.println(cnum);
//out.println(lname1);
out.println("</td></tr>");
out.println("<tr><td><b>Website:</b></td>");
out.println("<td>");
out.println(web);
135
//out.println(lname1);
out.println("</td></tr>");
out.println("<tr><td><b>Exp required</b></td>");
out.println("<td>");
out.println(exp);
//out.println(lname1);
out.println("</td></tr>");
out.println("</table>");
out.println("</body>");
out.println("</html>");
//out.println("</table>");
// out.println(email);
// out.println(jid);
out.println("<br>");
}
if(cnt==0)
out.println("Sorry no results were found");
}
catch(Exception e)
{
}
%>
</body>
</html>
17. Logout.jsp
<%@page contentType="text/html"%>
<html>
<head><title>JSP Page</title></head>
<body>
136
9.ASP
A Active Server Pages is standard HTML file that is extended with additional
features.ASP enables IIS to serve dynamic contents.The easiest way to add a script to an ASP
is by the script delimiters <% %>.
Session Management:
Session(“Name”)=”abc”
Value=Session(“Name”)
Cookies are used to save information so that the user doesn’t have to
enter it every time he/she visits the site.
Response.Cookies(“Uname”)=”abc”
Response.Cookies(“Uname”).Expires=”jan 1, 2007”
name=request.Cookies(“Uname”)
137
Forwarding data using hidden values:
The values can be retrieved from query string and can be used in that form.
File Handling
Set MyFileObject=Server.CreateObject("Scripting.FilesystemObject")
Set Myfile=MyFileObject.OpenTextFile("c:\user.txt")
Myfile.Writeline(pass)
URL Redirecting
Response.Redirect(“url”)
Following Files are used in implementing project and source code in ASP is as below:
1. Insertseeker.asp
2. Insertprovider.asp
3. Validseeker.asp
4. Insertresume.asp
5. Applyjob.asp
6. Application.asp
7. Inserjob.asp
8. Recruit.asp
9. Select.asp
10. Sendmail.asp
11. Editresume.asp
12. Edit.asp
13. Delete.asp
14. Viewresume.asp
15. Unsubscribe.asp
16. Search.asp
17. Logout.asp
138
1.Insertseeker.asp
Concept of Server side validation
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<html>
<head>
<%
function isAlpha(val)
isNot= "0123456789`~!@#$$%^&*()-_+=[{]}\|;:'',<.>/?"
invalid =false
if instr(val,chr(34))>0 then
invalid=true
else
for i=1 to len(val)
for x=1 to len(isNot)
if mid(val,i,1)=mid(isNot,x,1) then
invalid=true
end if
next
next
end if
%>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<%
fname= Request.QueryString("fname")
lname=request.QueryString("lname")
gender= request.QueryString("radio1")
uname= request.QueryString("uname")
upassword=request.QueryString("password")
cpassword=request.QueryString("confpassword")
email= request.QueryString("email")
139
qual= request.QueryString("qual")
/* Server side validation */
if len(fname)>0 then
isLength = true
isAlpha(fname)
else
'Msgbox "This value can't be empty"
response.Write("fname value cant be empty")
isLength = false
end if
if len(uname)>0 then
isLength = true
isAlpha(uname)
else
'Msgbox "This value can't be empty"
response.Write("uname value cant be empty")
isLength = false
end if
if len(lname)>0 then
isLength = true
isAlpha(lname)
else
'Msgbox "This value can't be empty"
response.Write("lname value cant be empty")
isLength = false
end if
if len(email)>0 then
isLength = true
if instr(email,"@")>0 and instr(email,".")>0 and len(email)>5
then
isEmail =true
else
response.Write("Please enter proper email")
isEmail=false
end if
else
'Msgbox "This value can't be empty"
response.Write("Email value cant be empty")
isLength = false
end if
%>
<% If not isLength or not isEmail Then %>
<form name="form1" action="http://localhost/ASP/insertseeker.asp" method="get">
<BODY bgcolor=lightskyblue>
<TABLE bgColor=lightskyblue border=1 cellPadding=0 cellSpacing=0
width="100%" background="" borderColor=black borderColorLight=black style="LEFT:
10px; TOP: 19px">
<TR><TD width="50%"><pre><STRONG><FONT color=blue size=6>Online
140
Resume
Builder</FONT></STRONG></pre></TD>
<TD><IMG src ="images7.jpg" style="HEIGHT: 129px; WIDTH: 357px" width=100
></TD>
<TR>
<TD colspan=2> <FONT
color=lime size=5> <FONT color=black
style="BACKGROUND-COLOR: dodgerblue">Home
Resume
Creation Post Job
</FONT>
</FONT></TD></TR></TABLE>
<TABLE align=left bgColor=#ffccff border=0 borderColor=mediumblue
borderColorLight=black cellPadding=1 cellSpacing=1 background="" width="70%"
style="BACKGROUND-COLOR: lightskyblue; HEIGHT: 350px; WIDTH: 418px">
<TR>
<TD colSpan=2>
<H2 style="BACKGROUND-COLOR: dodgerblue; COLOR: darkblue"
> Job
SeekerRegistration Form</H2> </TD>
</TR>
<TR>
<TD>First Name:</TD>
<TD><INPUT type="text" name="fname" value="<%response.Write(fname)%>"
style="HEIGHT: 22px; LEFT: 1px; TOP: 2px; WIDTH: 173px"
></TD></TR>
<TR>
<TD>Last Name:</TD>
<TD><INPUT name=lname value="<%response.Write(lname)%>"
style="HEIGHT: 22px; WIDTH: 172px"></TD></TR>
<TR>
<TD>Gender:</TD>
<TD><INPUT name="radio1" style="HEIGHT: 20px; WIDTH: 20px"
type=radio value=Male
> Male <INPUT name="radio1"
141
<TR>
<TD>Confirm Password:</TD>
<TD><INPUT name=confpassword type=password style="HEIGHT: 22px; WIDTH:
172px"></TD></TR>
<TR>
<TD>Qualification</TD>
<TD><INPUT name=qual value="<%response.Write(qual)%>"
style="FILTER: ; HEIGHT: 22px; WIDTH: 169px"></TD></TR>
<TR>
<% if not isEmail then %>
<td><font color="#CC0000">E-Mail</font></td>
<% else %>
<TD>E-Mail</TD>
<% end if %>
<TD>
<P><INPUT name="email" style="HEIGHT: 22px; WIDTH: 233px"
value="<%response.Write(email)%>"
></P></TD></TR>
<TR>
<TD
colSpan=2>
&nbs
p; &n
bsp;
<INPUT align="absMiddle" style="LEFT: 165px; TOP: 4px" type="submit"
value="Submit"></TD>
</TR></TABLE>
</BODY>
</form>
<% Else
Set Con = Server.CreateObject("ADODB.Connection")
'Con.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" &
Server.MapPath("resume.mdb")
Con.Open "Data Source=resume;User Id=scott;Password=tiger"
Con.Execute "insert into seeker values(seq_seeker.nextval,'"&fname&"',
'"&lname&"','"&gender&"',
'"&uname&"','"&upassword&"','"&cpassword&"','"&email&"','"&qual&"')"
Con.Close()
response.Redirect("register.htm")
end if
%>
</html>
142
2.Insertprovider.asp
Concept of Server side validation
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<%
function isAlpha(val)
if instr(val,chr(34))>0 then
invalid=true
else
for i=1 to len(val)
for x=1 to len(isNot)
if mid(val,i,1)=mid(isNot,x,1) then
invalid=true
end if
next
next
end if
%>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<%
fname= Request.QueryString("fname")
lname=request.QueryString("lname")
company= request.QueryString("company")
143
uname= request.QueryString("uname")
upassword=request.QueryString("password")
cpassword=request.QueryString("confpassword")
email= request.QueryString("email")
post= request.QueryString("post")
phone= request.QueryString("phone")
web= request.QueryString("website")
if len(fname)>0 then
isLength = true
isAlpha(fname)
else
'Msgbox "This value can't be empty"
response.Write("First name value can't be empty")
isLength = false
end if
if len(uname)>0 then
isLength = true
isAlpha(uname)
else
'Msgbox "This value can't be empty"
response.Write("user name value can't be empty")
isLength = false
end if
if len(lname)>0 then
isLength = true
isAlpha(lname)
else
'Msgbox "This value can't be empty"
response.Write(" last name value can't be empty")
isLength = false
end if
if len(email)>0 then
isLength = true
if instr(email,"@")>0 and instr(email,".")>0 and len(email)>5
then
isEmail =true
else
response.Write("Please enter proper email")
isEmail=false
end if
else
'Msgbox "This value can't be empty"
response.Write("Email value cant be empty")
isLength = false
end if
144
if len(phone)>0 and len(phone)<=12 then
isLength = true
if isNumeric(phone) then
isNumber =true
else
response.Write("Please enter proper phone number")
end if
else
'Msgbox "This value can't be empty"
response.Write(" Phone value can't be empty")
isLength = false
end if
if len(web)>0 then
isLength = true
if instr(web,"www")>0 and instr(email,".com")>0 and
len(web)>7 then
isWeb =true
else
response.Write("Please enter proper website")
isWeb=false
end if
else
'Msgbox "This value can't be empty"
response.Write("Website value can't be empty")
isLength = false
end if
%>
<% If not isLength or not isEmail or not isWeb or not isNumber Then %>
<form name="form1" action="http://localhost/ASP/insertprovider.asp" method="get">
<BODY bgcolor=lightskyblue>
<TABLE bgColor=lightskyblue border=1 cellPadding=0 cellSpacing=0
width="100%" background="" borderColor=black borderColorLight=black style="LEFT:
10px; TOP: 20px; WIDTH: 100%">
<TR><TD width="50%"><pre><STRONG><FONT color=blue size=6>Online
Resume
Builder</FONT></STRONG></pre></TD>
<TD><IMG src ="images.jpg" style="HEIGHT: 129px; WIDTH: 357px"
width=100></TD>
<TR>
<TD colspan=2> <FONT
color=black size=5 style="BACKGROUND-COLOR: dodgerblue"
> Home
Resume Creation Post Job
</FONT></TD></TR></TABLE>
<TABLE align=left bgColor=lightskyblue border=0 borderColor=black
borderColorLight=black cellPadding=1 cellSpacing=1 background="" width="70%"
style="HEIGHT: 346px; WIDTH: 438px">
145
<TR>
<TD colSpan=2><h2 style="BACKGROUND-COLOR: dodgerblue"> Job Provider
Registration Form</h2> </TD>
</TR>
<TR>
<TD>First Name:</TD>
<TD><INPUT name="fname" value="<% response.Write(fname)%>" style="HEIGHT:
22px; LEFT: 1px; TOP: 2px; WIDTH: 176px"
></TD></TR>
<TR>
<TD>Last Name:</TD>
<TD><INPUT name="lname" value="<% response.Write(lname)%>" style="HEIGHT:
22px; WIDTH: 175px" ></TD></TR>
<TR>
<TD>User Name:</TD>
<TD><INPUT name="uname" value="<% response.Write(uname)%>" style="HEIGHT:
22px; LEFT: 1px; TOP: 2px; WIDTH: 174px"
></TD></TR>
<TR>
<TD>Password:</TD>
<TD><INPUT name="password" type="password" style="HEIGHT: 22px; WIDTH:
175px" ></TD></TR>
<TR>
<TD>Confirm Password:</TD>
<TD><INPUT name="confpassword" type="password" style="HEIGHT: 22px; WIDTH:
175px" ></TD></TR>
<TR>
<TD>Company Name:</TD>
<TD><INPUT name="company" value="<% response.Write(company)%>"
style="HEIGHT: 22px; WIDTH: 176px" ></TD></TR>
<TR>
<TD>Post:</TD>
<TD><INPUT id=text1 name="post" value="<% response.Write(post)%>"
style="HEIGHT: 22px; WIDTH: 176px"></TD></TR>
<TR>
<% if not isNumber then %>
<TD><font color="#CC0000">Contact No:</font></TD>
<% else %>
<TD>Contact No:</TD>
<% end if %>
146
<% else %>
<TD>E-Mail:</TD>
<% end if %>
<TD>
<P><INPUT name="email" value="<% response.Write(email)%>" style="HEIGHT:
22px; WIDTH: 212px" >
</P></TD></TR>
<TR>
<% if not isWeb then %>
<TD><font color="#CC0000">Website</font></TD>
<% else %>
<TD>Website</TD>
<% end if %>
<td><INPUT name="website" value="<% response.Write(web)%>" style="HEIGHT:
22px; LEFT: 1px; TOP: 2px; WIDTH: 210px"
></td>
<TR>
<TD
colSpan=2>
&nbs
p; &n
bsp;
<% Else
Set Con = Server.CreateObject("ADODB.Connection")
'Con.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" &
Server.MapPath("resume.mdb")
Con.Open "Data Source=resume;User Id=scott;Password=tiger"
Con.Execute "insert into provider values(seq_provider.nextval,'"&fname&"',
'"&lname&"',
'"&uname&"','"&upassword&"','"&cpassword&"','"&company&"','"&post&"',"&phone&",'"
&email&"','"&web&"')"
response.Redirect("register.htm")
end if
%>
</html>
3. Validseeker.asp
Concept of Session and File handling
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<html>
147
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<%
name1=Request.QueryString("uname")
pass=Request.QueryString("upassword")
'response.Write(name)
Set Con = Server.CreateObject("ADODB.Connection")
'set r=Server.CreateObject("ADODB.Recordset")
Con.Open "Data Source=resume;User ID=scott;Password=tiger"
sql="select email,upassword from seeker where uname='" & name1 & "'"
Set r=Con.Execute(sql)
Set MyFileObject=Server.CreateObject("Scripting.FilesystemObject")
Set Myfile=MyFileObject.OpenTextFile("c:\try.txt",8,true)
'while Myfile.AtEndOfStream
Myfile.Writeline(pass)
'wend
sql1="select count(*) as count from resume"
Set rs=Con.Execute(sql1)
<body bgcolor='lightskyblue'>
<b>Welcome, </b><strong><% response.Write(name1)%></strong><br><br>
<b><font color="#FF0099"><%response.Write(count1)%> Resume
created</b><br></font><br>
<b>What would you like to do?<br>
<a href=writeresume.htm>Create a resume</a><br>
<a href=applyjob.asp?email=<%response.Write(email)%>>Apply for a
job</a><br>
<a href=editresume.asp?email=<%response.Write(email)%>>Edit your
resume</a><br>
<a href=delete.asp?email=<%response.Write(email)%>>Unsubscribe</a>
<%
else
response.Write("Unauthorized user")%>
<br><a href=register.htm>Back</a>
148
<% End If
%>
</body></html>
4.Validprovider.asp
Concept of Cookies
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<%
name1=Request.QueryString("uname")
pass=Request.QueryString("upassword")
'response.Write(name)
Set Con = Server.CreateObject("ADODB.Connection")
'set r=Server.CreateObject("ADODB.Recordset")
Con.Open "Data Source=resume;User ID=scott;Password=tiger"
sql="select email,upassword from proivder where uname='" & name1 & "'"
Set r=Con.Execute(sql)
Set MyFileObject=Server.CreateObject("Scripting.FilesystemObject")
Set Myfile=MyFileObject.OpenTextFile("c:\try.txt",8,true)
'while Myfile.AtEndOfStream
Myfile.Writeline(pass)
'wend
sql1="select count(*) as count from job"
Set rs=Con.Execute(sql1)
%>
<body bgcolor='lightskyblue'>
<b>Welcome, </b><strong><% response.Write(name1)%></strong><br><br>
<b><font color="#FF0099"><%response.Write(count1)%> Resume
created</b><br></font><br>
149
<b>What would you like to do?<br>
<a href=Postjob.htm>Post a job</a><br>
<a href=recruit.asp>Recruit an applicant</a><br>
<a href=unsubscribe.asp?email=<%response.Write(email)%>>Unsubscribe</a>
<%
else
response.Write("Unauthorized user")%>
<br><a href=register.htm>Back</a>
<% End If
%>
</body>
</html>
5.Applyjob.asp
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Untitled Document</title>
</head>
<%
email=request.QueryString("email")
Set Con = Server.CreateObject("ADODB.Connection")
'Con.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" &
Server.MapPath("resume.mdb")
Con.Open "Data Source=resume;User Id=scott;Password=tiger"
sql="select * from job"
Set rs=Con.Execute(sql)
jid =rs("jid")
vode =rs("vcode")
company=rs("company")
loc=rs("loc")
post=rs("post")
skill=rs("skill")
cperson=rs("person")
cnum=rs("phone")
email1=rs("email")
exp1=rs("exp")
web=rs("website")
%>
<html>
150
<body bgcolor=lightskyblue>
<table border=0 bordercolor=black>
<tr><td>
Vacancy code:
</td>
<td>
<%response.Write(vcode)%>
</td></tr>
<tr><td>
Company:
</td>
<td>
<%response.Write(company)%>
</td></tr>
<tr><td>
Location
</td>
<td>
<%response.Write(loc)%>
</td></tr>
<tr><td>
Post
</td>
<td><%response.Write(post)%>
</td></tr>
<tr><td>
Skill
</td>
<td><%response.Write(skill)%>
</td></tr>
<tr><td>
Contact person
</td>
<td>
<%response.Write(cperson)%>
</td></tr>
<tr><td>
Contact Number:
</td>
<td>
<%response.Write(cnum)%>
</td></tr>
<tr><td>
Email
</td>
<td>
<%response.Write(email1)%>
</td></tr>
<tr><td>
151
Experience:
</td>
<td>
<%response.Write(exp1)%>
</td></tr>
<tr><td>
Website
</td>
<td>
<%response.Write(web)%>
</td></tr>
<tr><td colspan="2"><a
href="application.asp?mail=<%response.Write(email)%>&jid=<%response.Write(jid)%>">
Apply</a></td></tr>
</table>
<% rs.MoveNext
Wend %>
</body>
</html>
6.Application.asp
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Untitled Document</title>
</head>
<body>
<% email= request.QueryString("mail")
jid=request.QueryString("jid")
Set Con = Server.CreateObject("ADODB.Connection")
'Con.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" &
Server.MapPath("resume.mdb")
Con.Open "Data Source=resume;User Id=scott;Password=tiger"
Con.Execute "insert into apply values('"&email&"',"&jid&")"
Con.Close()
%>
Thanks for applying
<a href=logout.asp>logout
</body>
</html>
152
7.Insertjob.asp
Concept of Server side validation
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<html>
<head>
<%function isAlpha(val)
if instr(val,chr(34))>0 then
invalid=true
else
for i=1 to len(val)
for x=1 to len(isNot)
if mid(val,i,1)=mid(isNot,x,1) then
invalid=true
end if
next
next
end if
%>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<%
vcode= request.Form("vcode")
company=request.Form("company")
post=request.Form("post")
loc=request.Form("loc")
skill=request.Form("skill")
cperson=request.Form("cperson")
phone=request.Form("phone")
email= request.Form("email")
web= request.Form("website")
exp1= request.Form("exp")
153
/* Server side Validation */
if len(vcode)>0 then
isLength = true
isAlpha(vcode)
else
'Msgbox "This value can't be empty"
response.Write("vcode value cant be empty")
isLength = false
end if
if len(company)>0 then
isLength = true
isAlpha(company)
else
'Msgbox "This value can't be empty"
response.Write("company value cant be empty")
isLength = false
end if
if len(loc)>0 then
isLength = true
isAlpha(degree)
else
'Msgbox "This value can't be empty"
response.Write("location value cant be empty")
isLength = false
end if
if len(email)>0 then
isLength = true
if instr(email,"@")>0 and instr(email,".")>0 and len(email)>5
then
isEmail =true
else
response.Write("Please enter proper email")
isEmail=false
end if
else
'Msgbox "This value can't be empty"
response.Write("Email value cant be empty")
isLength = false
end if
154
else
'Msgbox "This value can't be empty"
response.Write(" Phone value can't be empty")
isLength = false
end if
if len(web)>0 then
isLength = true
if instr(web,"www")>0 and instr(email,".com")>0 and
len(web)>7 then
isWeb =true
else
response.Write("Please enter proper website")
isWeb=false
end if
else
'Msgbox "This value can't be empty"
response.Write("Website value can't be empty")
isLength = false
end if
%>
<% If not isLength or not isEmail or not isWeb or not isNumber Then %>
%>
<form name="form1" method="post" action="http://tarak/god/insertjob.asp">
<BODY bgcolor=lightskyblue>
<TABLE bgColor=lightskyblue border=1 cellPadding=0 cellSpacing=0
width="100%" background="" borderColor=black borderColorLight=black style="LEFT:
10px; TOP: 19px">
<TR><TD width="50%"><pre><STRONG><FONT color=blue size=6>Online
Resume
Builder</FONT></STRONG></pre></TD>
<TD><IMG src ="../images.jpg" style="HEIGHT: 129px; WIDTH: 357px"
width=100></TD>
<TR>
<TD colspan=2> <FONT
color=lime size=5> <FONT color=black
style="BACKGROUND-COLOR: dodgerblue">Home
Resume
Creation Post Job
</FONT>
</FONT></TD></TR></TABLE>
<TABLE align=left bgColor=lightskyblue border=0 borderColor=black
borderColorLight=black cellPadding=1 cellSpacing=1 background="" width="70%"
style="HEIGHT: 346px; WIDTH: 460px">
<TR>
<TD colSpan=2>
<H2><FONT color=mediumblue
style="BACKGROUND-COLOR: dodgerblue">Fill the following
155
details</FONT>
</H2> </TD>
</TR>
<TR>
<TD>Vacancy Code:</TD>
<TD><INPUT name="vcode" value="<%=vcode%>" style="HEIGHT: 22px; LEFT: 1px;
TOP: 2px; WIDTH: 173px"
></TD></TR>
<TR>
<TD> Company</TD>
<TD><INPUT name=company value="<%=company%>"
style="HEIGHT: 22px; WIDTH: 172px"></TD></TR>
<TR>
<TD>Location:</TD>
<TD><INPUT name=loc value="<%=loc%>"
style="HEIGHT: 22px; WIDTH: 169px"></TD></TR>
<TR>
<TD> Post:</TD>
<TD><INPUT name=post value="<%=post%>" style="HEIGHT: 22px; LEFT: 1px;
TOP: 2px; WIDTH: 173px"
></TD></TR>
<TR>
<TD>Key Skills:</TD>
<TD><INPUT name=skill value="<%=skill%>"
style="HEIGHT: 22px; WIDTH: 169px"></TD></TR>
<TR>
<TD>Contact Person:</TD>
<TD><INPUT name=cperson value="<%=cperson%>"
style="HEIGHT: 22px; WIDTH: 172px"></TD></TR>
<TR>
<% if not isNumber then%>
<TD><font color="#FF0000">Contact No.:</font></TD>
<% else %>
<TD>Contact No.:</TD>
<% end if%>
<TD><INPUT name=phone value="<%=phone%>"
style="FILTER: ; HEIGHT: 22px; WIDTH: 169px"></TD></TR>
<TR>
<% if not isEmail then%>
<TD><font color="#FF0000">E-Mail:</font></TD>
<% else %>
<TD>E-Mail:</TD><% end if%>
<TD>
<P><INPUT name=email value="<%=email%>" style="HEIGHT: 22px; WIDTH:
233px"
></P></TD></TR>
<TR>
<% if not isWeb then%>
156
<TD><font color="#FF0000">Web Site:</font></td>
<% else %>
<td>
Web Site:
</TD>
<% end if%>
<TD><INPUT id=text2 name=website value="<%=web%>"
style="HEIGHT: 22px; WIDTH: 231px">
</TD>
</TR>
<TR>
<TD>Exp Requ:</TD><TD><INPUT name=exp value="<%=exp1%>"
style="HEIGHT: 22px; WIDTH: 164px">
</TD>
</TR>
<TR>
<TD
colSpan=2>
&nbs
p; &n
bsp;
<INPUT align=absMiddle id="submit1" name="submit1" style="LEFT: 165px; TOP: 4px"
type=submit value=Submit></TD>
</TR></TABLE>
</BODY>
</form>
<% else
uname=Session.Contents("uname")
Set Con = Server.CreateObject("ADODB.Connection")
'Con.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" &
Server.MapPath("resume.mdb")
Con.Open "Data Source=resume;User Id=scott;Password=tiger"
Con.Execute "insert into job
values('','"&vcode&"','"&company&"','"&loc&"','"&post&"','"&skill&"','"&cperson&"',"&ph
one&",'"&email&"','"&web&"',"&exp1&",'"&uname&"')"
' response.Redirect("register.asp")
end if
%>
<a href='http://localhost/ASP/recruit.asp'>Recruit an applicant
<br>
<a href='http://localhost/ASP/logout.asp'>logout
</html>
157
8.Recruit.asp
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Untitled Document</title>
</head>
<body>
<%
pname=request.QueryString("uname")
Set Con = Server.CreateObject("ADODB.Connection")
'Con.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" &
Server.MapPath("resume.mdb")
Con.Open "Data Source=resume;User Id=scott;Password=tiger"
sql="select * from job where pname='"&pname&+"'"
Set rs=Con.Execute(sql)
%>
<html>
<head>
<title>Recruit an applicant</title>
</head>
<body bgcolor=lightskyblue>
<b>Recruit an applicant</b>
<table border=0 bordercolor=black>
<%
While not rs.EOF
jid =rs("jid")
company =rs("company")
vcode =rs("vcode")
%>
<tr><td>
Job ID:
</td>
<td>
<a href="select.asp?jid=<%response.Write(jid)%>"><%response.Write(jid)%></a>
</td></tr>
<tr><td>
Company
</td>
<td>
158
<%response.Write(company)%>
<tr><td>
Vcode
</td>
<td>
<%response.Write(vcode)%>
</td></tr>
</td></tr>
</table>
<% rs.Movenext
Wend %>
</body>
</html>
9.Select.asp
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Untitled Document</title>
</head>
<body>
<%
jid=request.QueryString("jid")
Set Con = Server.CreateObject("ADODB.Connection")
'Con.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" &
Server.MapPath("resume.mdb")
Con.Open "Data Source=resume;User Id=scott;Password=tiger"
sql="select * from apply where jid="&jid&""
Set rs=Con.Execute(sql)
%>
<html>
<head>
<title>Recruit an applicant</title>
</head>
<body bgcolor=lightskyblue>
<b>Recruit an applicant</b>
<table border=0 bordercolor=black>
159
<%
While not rs.EOF
jid1 =rs("jid")
'company =rs("company")
'vcode =rs("vcode")
email=rs("email")
%>
<tr><td>
Job ID:
</td>
<td>
<%response.Write(jid1)%>
</td></tr>
<tr><td>
Email:
</td>
<td>
<a
href='sendmail.asp?email=<%response.Write(email)%>'><%response.Write(email)%></a>
</td></tr>
</table>
<% rs.Movenext
Wend %>
</body>
</html>
10.Sendmail.asp
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Untitled Document</title>
</head>
160
<tr><td>
Send To:
</td>
<td>
<input type=text value="<%=email%>">
</td></tr>
<tr><td>
Message
<td>
<textarea cols=20 rows=10></textarea>
</td></tr>
<tr><td colspan=2>
<center><input type=submit value=send></center>
</tr></td>
</table>
</body>
</html>
11.Editresume.asp
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Untitled Document</title>
</head>
<%
email=request.QueryString("email")
Set Con = Server.CreateObject("ADODB.Connection")
'Con.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" &
Server.MapPath("resume.mdb")
Con.Open "Data Source=resume;User Id=scott;Password=tiger"
sql="select * from resume where email='"&email&"'"
Set rs=Con.Execute(sql)
fname =rs("fname")
lname=rs("lname")
day1=rs("day")
mon=rs("mon")
year1=rs("year")
loc=rs("loc")
email=rs("email")
sec=rs("sec")
degree=rs("degree")
161
stream=rs("stream")
academic=rs("acade")
tskill=rs("tskill")
achieve=rs("achieve")
company=rs("comp")
perm=rs("perm")
lan=rs("lan")
ntskill=rs("ntskill")
profile=rs("profile")
city=rs("city")
zip=rs("zip")
state=rs("state")
ostate=rs("ostate")
country=rs("country")
ocountry=rs("ocountry")
rs.MoveNext
WEND%>
<form name="form1" method="get" action="http://localhost/ASP/edit.asp">
<body bgcolor="lightskyblue">
<h1><FONT color=blue>Fill the following details:</FONT></h1>
<TABLE align=left bgColor=lightskyblue border=0 borderColor=black
borderColorLight=black cellPadding=1 cellSpacing=1 background="" style="HEIGHT:
2213px; WIDTH: 1067px" width="1082">
<TR>
<TD colSpan=2>
<H2><FONT color=black><FONT size=6 style="BACKGROUND-COLOR:
dodgerblue; COLOR: mediumblue"
><U>Personal Information:</U>
</FONT></FONT></H2></TD></TR>
<TR>
<TD width="119">
<P><FONT color=black><STRONG>*First Name:</STRONG> </FONT></P> </TD>
<TD width="838">
<P><FONT color=black><STRONG>
<INPUT name="fname" value="<%response.Write(fname)%>"
style="LEFT: 1px; TOP: 41px"
>
</STRONG></FONT><FONT
color=black><STRONG> </STRONG></FONT></P>
</TD></TR>
<TR>
<TD>
<P><STRONG> </STRONG><FONT
color=black> <IMG
src="file://C:\Program Files\Microsoft Visual
Studio\Common\Graphics\Icons\Misc\Face02.ico"></FONT></P>
<P><FONT color=black><STRONG>*Last Name:</STRONG>
</FONT></P>
162
</TD>
<TD>
<P><STRONG></STRONG><FONT
color=black></FONT> </P>
<P> <FONT color=black><STRONG>
<INPUT name="lname" value="<%response.Write(lname)%>" style="LEFT: 1px;
TOP: 41px">
</STRONG></FONT></P>
</TD></TR>
<TR>
<TD>
<P><STRONG> </STRONG><FONT
color=black> </FONT></P>
<P><FONT color=black><STRONG>*Date Of Birth:</STRONG></FONT></P></TD>
<TD>
<P><STRONG><FONT
color=black> </FONT></P><SELECT
name=day>
<OPTION selected
value="01">01</OPTION><OPTION value="02"
>02</OPTION><OPTION
value="">03</OPTION><OPTION value="">04</OPTION><OPTION
value="">05</OPTION><OPTION value="">06</OPTION><OPTION
value="">07</OPTION><OPTION value="">08</OPTION><OPTION
value="">09</OPTION><OPTION value="">10</OPTION><OPTION
value="">11</OPTION><OPTION value="">12</OPTION><OPTION
value="">13</OPTION><OPTION value="">14</OPTION><OPTION
value="">15</OPTION><OPTION value="">16</OPTION><OPTION
value="">17</OPTION><OPTION value="">18</OPTION><OPTION
value="">19</OPTION><OPTION value="">20</OPTION><OPTION
value="">21</OPTION><OPTION value="">22</OPTION><OPTION
value="">23</OPTION><OPTION value="">24</OPTION><OPTION
value="">25</OPTION><OPTION value="">26</OPTION><OPTION
value="">27</OPTION><OPTION value="">28</OPTION><OPTION
value="">29</OPTION><OPTION value="">30</OPTION><OPTION
value="">31</OPTION></SELECT><FONT color=black> -
</FONT> <SELECT
name=mon> <OPTION selected
value="January">January</OPTION><OPTION
value="">February</OPTION><OPTION
value="">March</OPTION><OPTION value="">April</OPTION><OPTION
value="">May</OPTION><OPTION value="">June</OPTION><OPTION
value="">July</OPTION><OPTION value="">Aug</OPTION><OPTION
value="">Sept</OPTION><OPTION value="">Oct</OPTION><OPTION
value="">Nov</OPTION><OPTION value="">Dec</OPTION></SELECT><FONT
color=black>-
</FONT> <SELECT
name=year>
<OPTION
163
selected value="1984">1984</OPTION><OPTION
value="">1985</OPTION><OPTION
value="">1986</OPTION><OPTION value="">1987</OPTION><OPTION
value="">1988</OPTION><OPTION value="">1989</OPTION><OPTION
value="">1990</OPTION><OPTION value="">1991</OPTION><OPTION
value="">1992</OPTION><OPTION value="">1993</OPTION><OPTION
value="">1994</OPTION><OPTION value="">1995</OPTION><OPTION
value="">1996</OPTION><OPTION value="">1997</OPTION><OPTION
value="">1998</OPTION><OPTION value="">1999</OPTION><OPTION
value="">2000</OPTION></SELECT></TD></TR>
<TR>
<TD>
<P><STRONG> </STRONG><FONT
color=black> </FONT> </P>
<P><FONT color=black><STRONG>*Local Address:</STRONG> </FONT>
</P></TD>
<TD>
<P> </P><TEXTAREA
name="locadd"><%response.Write(loc)%></TEXTAREA></TD></TR>
<TR>
<TD>
<P><STRONG><IMG src="file://C:\Program Files\Microsoft Visual
Studio\Common\Graphics\Icons\Misc\House.ico" > </STRONG><FONT
color=black> </FONT></P>
<P><FONT color=black><STRONG>*Permanent Address:</STRONG> </FONT></P>
</TD>
<TD>
<P> </P><TEXTAREA
name="permadd"><%response.Write(perm)%></TEXTAREA></TD></TR>
<TR>
<TD>
<P><STRONG></STRONG><FONT
color=black> </FONT></P>
<P><FONT color=black><STRONG>*City:</STRONG></FONT></P></TD>
<TD>
<P><STRONG></STRONG><FONT
color=black> </FONT></P>
<P><FONT color=black><INPUT name="city"
value="<%response.Write(city)%>"></FONT></P></TD></TR>
<TR>
<TD>
<P><STRONG> </STRONG><FONT
color=black> </FONT></P>
<P><FONT color=black><STRONG>Zip Code:</STRONG> </FONT></P> </TD>
<TD>
<P><STRONG></STRONG><FONT
color=black> </FONT></P>
<P><FONT color=black><INPUT name="zip" value="<%response.Write(zip)%>"
></FONT></P></TD></TR>
<TR>
164
<TD>
<P><STRONG></STRONG><FONT
color=black> </FONT></P>
<P><FONT color=black><STRONG>*State:</STRONG></FONT></P></TD>
<TD>
<P> </P><SELECT name="state" style="HEIGHT: 22px; WIDTH: 169px">
<OPTION selected value="">Andhra Pradesh</OPTION><OPTION
value="AP">Arunachal Pradesh</OPTION><OPTION
value="GUJ">Gujarat</OPTION><OPTION value="MP">Madhya
Pradesh</OPTION><OPTION
value="Rajasthan">Rajasthan</OPTION><OPTION
value="MAH">Maharashtra</OPTION><OPTION
value="Karnataka">Karnataka</OPTION><OPTION value="TN">Tamil
Nadu</OPTION><OPTION
value="UP">Uttar Pradesh</OPTION><OPTION value="JK">Jammu
Kashmir</OPTION><OPTION value="">Assam</OPTION><OPTION
value="">Punjab</OPTION></SELECT><FONT color=black>
<STRONG>If Other: <INPUT
name="ostate" value="<%response.Write(ostate)%>"
style="HEIGHT: 22px; LEFT: 249px; TOP: 3px; WIDTH: 154px"
></STRONG></FONT></TD></TR>
<TR>
<TD>
<P><STRONG></STRONG><FONT
color=black> </FONT></P>
<P><FONT color=black><STRONG>*Country:</STRONG></FONT></P></TD>
<TD>
<P> </P><SELECT name="country">
<OPTION selected value="">America</OPTION><OPTION
value="AUS">Australia</OPTION><OPTION
value="Africa">Africa</OPTION><OPTION
value="ANT">Antartica</OPTION><OPTION
value="Brazil">Brazil</OPTION><OPTION
value="Bhutan">Bhutan</OPTION><OPTION
value="Bangladesh">Bangladesh</OPTION><OPTION
value="Germany">Germany</OPTION><OPTION
value="India">India</OPTION></SELECT><FONT
color=black><STRONG>
If Other: </STRONG>
<INPUT name="ocountry" value="<%response.Write(ocountry)%>"
></FONT></TD></TR>
<TR>
<TD>
<P><IMG src="../Phone16.ico" style="HEIGHT: 33px; WIDTH: 32px" ><FONT
color=black><STRONG>*Phone:(Specify
atleast one)</STRONG></FONT></P></TD>
<TD>
<P><FONT color=black> </FONT></P>
165
<P><FONT color=black> <STRONG>Residence:<INPUT name="code"
value="<%response.Write(code)%>"
style="HEIGHT: 22px; WIDTH: 98px"
> - <INPUT
name="res" value="<%response.Write(res)%>"
style="HEIGHT: 22px; LEFT: 191px;
TOP: 41px; WIDTH: 140px"
></STRONG></FONT></P>
<P><FONT
color=black><STRONG> Mobile</STRONG>: &
nbsp; <INPUT
name="mobile" value="<%response.Write(mobile)%>" ></FONT></P></TD></TR>
<TR>
<TD>
<P><STRONG></STRONG><FONT
color=black> </FONT></P>
<P><IMG src="file://C:\Program Files\Microsoft Visual
Studio\Common\Graphics\Icons\Mail\Mail01b.ico" style="LEFT: 1px; TOP: 45px" ><FONT
color=black><STRONG>*E-Mail</STRONG></FONT></P>
<P> </P></TD>
<TD>
<P><FONT color=black><INPUT name="email" value="<%response.Write(email)%>"
style="HEIGHT: 22px; WIDTH: 202px"
></FONT></P></TD></TR>
<TR>
<TD><FONT color=black><STRONG>Languages Known:</STRONG> </FONT>
</TD><td><SELECT id=select7 multiple name="lan" size=2
> <OPTION
value="Eng">English</OPTION><OPTION
value="Hindi">Hindi</OPTION><OPTION
value="Guj">Gujarati</OPTION><OPTION
value="Tamil">Tamil</OPTION><OPTION
value="French">French</OPTION><OPTION
value="Spanish">Spanish</OPTION></SELECT></td></TR>
<TR>
<TD colSpan=2>
<H2> </H2>
<H2><FONT color=black><FONT size=6 style="BACKGROUND-COLOR:
dodgerblue; COLOR: mediumblue"
><U>Educational Qualification:</U>
</FONT></FONT></H2></TD></TR>
<tr>
<td>
<P><FONT color=black><STRONG> *Se</STRONG> </FONT><FONT
color=black><STRONG>condary
Education: </STRONG> <FONT color=black><STRONG><IMG
src="file://C:\Program Files\Microsoft Visual
Studio\Common\Graphics\Icons\Writing\Note03.ico"></STRONG></FONT></FONT></P>
<td><center><TABLE border=1 borderColor=gray cellPadding=0 cellSpacing=0
style="HEIGHT: 106px; WIDTH: 774px">
166
<TR>
<TD><FONT color=black><STRONG>Examination:</STRONG></FONT></TD>
<TD><FONT color=black><STRONG>Board/Istitute</STRONG></FONT></TD>
<TD><FONT color=black><STRONG>%Marks</STRONG></FONT></TD>
<TD>
<P><FONT color=black><STRONG>Month of
passing</STRONG></FONT></P></TD>
<TD><FONT color=black><STRONG>Class obtained</STRONG></FONT></TD>
<TD><FONT color=black><STRONG>No. of
Attempts</STRONG></FONT></TD></TR>
<tr>
<td colspan=6><FONT
color=black> <TEXTAREA cols=50 name="sec" rows=5 style="HEIGHT:
86px; WIDTH: 782px"><%response.Write(sec)%></TEXTAREA> </FONT>
</td>
</tr>
</TABLE></center>
</td>
<td width="10"></td>
</tr>
<tr>
<td>
<P><STRONG> </STRONG><FONT
color=black> </FONT></P>
<P><STRONG> </STRONG><FONT
color=black> </FONT></P>
<P><FONT color=black><STRONG>*Higher Degree:</STRONG> </FONT></P>
<td>
<P> </P>
<P><FONT
color=black> </FONT></P> <SELECT
name=degree style="HEIGHT: 34px; LEFT: 1px; TOP: 75px; WIDTH: 189px">
<OPTION selected value="">BE</OPTION><OPTION
value="">ME</OPTION><OPTION
value="">MCA</OPTION><OPTION value="">BA</OPTION><OPTION
value="">MA</OPTION><OPTION value="">BCom</OPTION><OPTION
value=MCom>MCom</OPTION></SELECT> <
FONT
color=black><STRONG>
Stream: <INPUT
name=stream value="<%response.Write(stream)%>"></STRONG> </FONT>
</td>
</td>
</tr>
<tr>
<td><FONT color=black>
<strong>*Academic Record:</strong> </FONT>
<td>
<center> </center>
167
<CENTER> </CENTER>
<CENTER><TABLE border=1 borderColor=gray cellPadding=0 cellSpacing=0
width="75%" style="HEIGHT: 158px; WIDTH: 799px">
<TR>
<TD><FONT color=black><STRONG>Examination:</STRONG></FONT></TD>
<TD><FONT color=black><STRONG>Board/Istitute</STRONG></FONT></TD>
<TD><FONT color=black><STRONG>%Marks</STRONG></FONT></TD>
<TD><FONT color=black><STRONG>Month-Year of
passing</STRONG></FONT></TD>
<TD><FONT color=black><STRONG>Class obtained</STRONG></FONT></TD>
<TD><FONT color=black><STRONG>No. of
Attempts</STRONG></FONT></TD></TR>
<TR><td colspan=6><TEXTAREA cols=50 name="academic" rows=5
style="HEIGHT: 132px; WIDTH:
793px"><%response.Write(academic)%></TEXTAREA><FONT
color=black> </FONT>
</td></TR></TABLE><FONT
color=black>  
; &nb
sp; &
nbsp;
&nbs
p; &n
bsp;
&nbs
p; &n
bsp;
&nbs
p; &n
bsp;
&nbs
p; &n
bsp; </FONT></CENTER>
</td>
</td>
</tr>
<tr>
<td><FONT color=black><STRONG>*Technical Skill: </STRONG></FONT>
</td>
<td>
<P><FONT color=black> </FONT></P>
<P><FONT
color=black>  
; &nb
sp; &
nbsp; <INPUT id=text24 name=tskill style="HEIGHT: 38px;
WIDTH: 226px" value="<%response.Write(tskill)%>"
> </FONT></P>
168
</td>
</tr>
<tr>
<td>
<P><FONT color=black><STRONG>*Non Technical Skill: </STRONG></FONT></P>
</td>
<td>
<P><FONT color=black> </FONT></P>
<P><FONT
color=black>  
; &nb
sp; &
nbsp;
<INPUT name="ntskill" style="HEIGHT: 35px; WIDTH: 223px"
value="<%response.Write(ntskill)%>"
</td>
<td>
<P><FONT
color=black>  
; &nb
sp; &
nbsp;
Company Name
169
: &nb
sp; &
nbsp;
Years </FONT></P>
<P><FONT
color=black>  
; &nb
sp; &
nbsp;
<INPUT name="company" value="<%response.Write(company)%>"style="HEIGHT:
52px; LEFT: -26px;
TOP: 40px; WIDTH: 202px"
> <INPUT name="exp"
value="<%response.Write(yrs)%>"style="HEIGHT: 49px; WIDTH: 71px"> </FONT></P>
<P> </P>
</td>
</tr><FONT color=black>Fields marked with
* are compulsory
<br></FONT>
<tr>
<td>
<P><FONT color=black><STRONG>Profile:</STRONG></FONT></P></td>
<td><P> &n
bsp;
&nbs
p;
<TEXTAREA name=TEXTAREA4 style="HEIGHT: 62px; LEFT: 1px; TOP: 2px; WIDTH:
180px"></TEXTAREA><FONT
color=black> </FONT></P><P> </P></td>
</tr>
<tr><td colspan="2"><center><input type="submit" value="submit"></center></td></tr>
</TABLE><FONT
color=black>  
; &nb
sp; &
nbsp;
</FONT>
</form>
</body>
</html>
170
12.Edit.asp
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<% uname=session("uname")%>
<html>
<head>
<title><%=uname%></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<%
function isAlpha(val)
if instr(val,chr(34))>0 then
invalid=true
else
for i=1 to len(val)
for x=1 to len(isNot)
if mid(val,i,1)=mid(isNot,x,1) then
invalid=true
end if
next
next
end if
%>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<%
fname= Request.QueryString("fname")
lname=request.QueryString("lname")
day1= request.QueryString("day")
mon= request.QueryString("mon")
year1= request.QueryString("year")
171
loc= request.QueryString("locadd")
perm=request.QueryString("permadd")
city=request.QueryString("city")
zip= request.QueryString("zip")
state1= request.QueryString("state")
ostate= request.QueryString("ostate")
country= request.QueryString("country")
ocountry= request.QueryString("ocountry")
code= request.QueryString("code")
res= request.QueryString("res")
mobile= request.QueryString("mobile")
email= request.QueryString("email")
lan= request.QueryString("lan")
sec= request.QueryString("sec")
degree= request.QueryString("degree")
stream= request.QueryString("stream")
academic= request.QueryString("academic")
tskill= request.QueryString("tskill")
ntskill= request.QueryString("ntskill")
achieve= request.QueryString("achieve")
comp= request.QueryString("company")
yrs= request.QueryString("exp")
profile= request.QueryString("profile")
if len(fname)>0 then
isLength = true
isAlpha(fname)
else
'Msgbox "This value can't be empty"
response.Write("fname value cant be empty")
isLength = false
end if
if len(lname)>0 then
isLength = true
isAlpha(uname)
else
'Msgbox "This value can't be empty"
response.Write("uname value cant be empty")
isLength = false
end if
if len(degree)>0 then
isLength = true
isAlpha(degree)
else
'Msgbox "This value can't be empty"
response.Write("degree value cant be empty")
isLength = false
end if
if len(email)>0 then
isLength = true
172
if instr(email,"@")>0 and instr(email,".")>0 and len(email)>5
then
isEmail =true
else
response.Write("Please enter proper email")
isEmail=false
end if
else
'Msgbox "This value can't be empty"
response.Write("Email value cant be empty")
isLength = false
end if
%>
<% If not isLength or not isEmail Then %>
<form name="form1" method="get" action="http://localhost/ASP/insertresume.asp">
<body bgcolor="lightskyblue">
<h1><FONT color=blue>Fill the following details:</FONT></h1>
<TABLE align=left bgColor=lightskyblue border=0 borderColor=black
borderColorLight=black cellPadding=1 cellSpacing=1 background="" style="HEIGHT:
2213px; WIDTH: 1067px" width="1082">
<TR>
<TD colSpan=2>
<H2><FONT color=black><FONT size=6 style="BACKGROUND-COLOR:
dodgerblue; COLOR: mediumblue"
><U>Personal Information:</U>
</FONT></FONT></H2></TD></TR>
<TR>
<TD width="119">
<P><FONT color=black><STRONG>*First Name:</STRONG> </FONT></P> </TD>
<TD width="838">
<P><FONT color=black><STRONG>
<INPUT name="fname" value="<%response.Write(fname)%>"
style="LEFT: 1px; TOP: 41px"
>
</STRONG></FONT><FONT
color=black><STRONG> </STRONG></FONT></P>
</TD></TR>
<TR>
<TD>
<P><STRONG> </STRONG><FONT
color=black> <IMG
src="file://C:\Program Files\Microsoft Visual
Studio\Common\Graphics\Icons\Misc\Face02.ico"></FONT></P>
<P><FONT color=black><STRONG>*Last Name:</STRONG>
</FONT></P>
</TD>
173
<TD>
<P><STRONG></STRONG><FONT
color=black></FONT> </P>
<P> <FONT color=black><STRONG>
<INPUT name="lname" value="<%response.Write(lname)%>" style="LEFT: 1px;
TOP: 41px">
</STRONG></FONT></P>
</TD></TR>
<TR>
<TD>
<P><STRONG> </STRONG><FONT
color=black> </FONT></P>
<P><FONT color=black><STRONG>*Date Of Birth:</STRONG></FONT></P></TD>
<TD>
<P><STRONG><FONT
color=black> </FONT></P><SELECT
name=day>
<OPTION selected
value="01">01</OPTION><OPTION value="02"
>02</OPTION><OPTION
value="">03</OPTION><OPTION value="">04</OPTION><OPTION
value="">05</OPTION><OPTION value="">06</OPTION><OPTION
value="">07</OPTION><OPTION value="">08</OPTION><OPTION
value="">09</OPTION><OPTION value="">10</OPTION><OPTION
value="">11</OPTION><OPTION value="">12</OPTION><OPTION
value="">13</OPTION><OPTION value="">14</OPTION><OPTION
value="">15</OPTION><OPTION value="">16</OPTION><OPTION
value="">17</OPTION><OPTION value="">18</OPTION><OPTION
value="">19</OPTION><OPTION value="">20</OPTION><OPTION
value="">21</OPTION><OPTION value="">22</OPTION><OPTION
value="">23</OPTION><OPTION value="">24</OPTION><OPTION
value="">25</OPTION><OPTION value="">26</OPTION><OPTION
value="">27</OPTION><OPTION value="">28</OPTION><OPTION
value="">29</OPTION><OPTION value="">30</OPTION><OPTION
value="">31</OPTION></SELECT><FONT color=black> -
</FONT> <SELECT
name=mon> <OPTION selected
value="January">January</OPTION><OPTION
value="">February</OPTION><OPTION
value="">March</OPTION><OPTION value="">April</OPTION><OPTION
value="">May</OPTION><OPTION value="">June</OPTION><OPTION
value="">July</OPTION><OPTION value="">Aug</OPTION><OPTION
value="">Sept</OPTION><OPTION value="">Oct</OPTION><OPTION
value="">Nov</OPTION><OPTION value="">Dec</OPTION></SELECT><FONT
color=black>-
</FONT> <SELECT
name=year>
<OPTION
selected value="1984">1984</OPTION><OPTION
value="">1985</OPTION><OPTION
174
value="">1986</OPTION><OPTION value="">1987</OPTION><OPTION
value="">1988</OPTION><OPTION value="">1989</OPTION><OPTION
value="">1990</OPTION><OPTION value="">1991</OPTION><OPTION
value="">1992</OPTION><OPTION value="">1993</OPTION><OPTION
value="">1994</OPTION><OPTION value="">1995</OPTION><OPTION
value="">1996</OPTION><OPTION value="">1997</OPTION><OPTION
value="">1998</OPTION><OPTION value="">1999</OPTION><OPTION
value="">2000</OPTION></SELECT></TD></TR>
<TR>
<TD>
<P><STRONG> </STRONG><FONT
color=black> </FONT> </P>
<P><FONT color=black><STRONG>*Local Address:</STRONG> </FONT>
</P></TD>
<TD>
<P> </P><TEXTAREA
name="locadd"><%response.Write(loc)%></TEXTAREA></TD></TR>
<TR>
<TD>
<P><STRONG><IMG src="file://C:\Program Files\Microsoft Visual
Studio\Common\Graphics\Icons\Misc\House.ico" > </STRONG><FONT
color=black> </FONT></P>
<P><FONT color=black><STRONG>*Permanent Address:</STRONG> </FONT></P>
</TD>
<TD>
<P> </P><TEXTAREA
name="permadd"><%response.Write(perm)%></TEXTAREA></TD></TR>
<TR>
<TD>
<P><STRONG></STRONG><FONT
color=black> </FONT></P>
<P><FONT color=black><STRONG>*City:</STRONG></FONT></P></TD>
<TD>
<P><STRONG></STRONG><FONT
color=black> </FONT></P>
<P><FONT color=black><INPUT name="city"
value="<%response.Write(city)%>"></FONT></P></TD></TR>
<TR>
<TD>
<P><STRONG> </STRONG><FONT
color=black> </FONT></P>
<P><FONT color=black><STRONG>Zip Code:</STRONG> </FONT></P> </TD>
<TD>
<P><STRONG></STRONG><FONT
color=black> </FONT></P>
<P><FONT color=black><INPUT name="zip" value="<%response.Write(zip)%>"
></FONT></P></TD></TR>
<TR>
<TD>
<P><STRONG></STRONG><FONT
175
color=black> </FONT></P>
<P><FONT color=black><STRONG>*State:</STRONG></FONT></P></TD>
<TD>
<P> </P><SELECT name="state" style="HEIGHT: 22px; WIDTH: 169px">
<OPTION selected value="">Andhra Pradesh</OPTION><OPTION
value="AP">Arunachal Pradesh</OPTION><OPTION
value="GUJ">Gujarat</OPTION><OPTION value="MP">Madhya
Pradesh</OPTION><OPTION
value="Rajasthan">Rajasthan</OPTION><OPTION
value="MAH">Maharashtra</OPTION><OPTION
value="Karnataka">Karnataka</OPTION><OPTION value="TN">Tamil
Nadu</OPTION><OPTION
value="UP">Uttar Pradesh</OPTION><OPTION value="JK">Jammu
Kashmir</OPTION><OPTION value="">Assam</OPTION><OPTION
value="">Punjab</OPTION></SELECT><FONT color=black>
<STRONG>If Other: <INPUT
name="ostate" value="<%response.Write(ostate)%>"
style="HEIGHT: 22px; LEFT: 249px; TOP: 3px; WIDTH: 154px"
></STRONG></FONT></TD></TR>
<TR>
<TD>
<P><STRONG></STRONG><FONT
color=black> </FONT></P>
<P><FONT color=black><STRONG>*Country:</STRONG></FONT></P></TD>
<TD>
<P> </P><SELECT name="country">
<OPTION selected value="">America</OPTION><OPTION
value="AUS">Australia</OPTION><OPTION
value="Africa">Africa</OPTION><OPTION
value="ANT">Antartica</OPTION><OPTION
value="Brazil">Brazil</OPTION><OPTION
value="Bhutan">Bhutan</OPTION><OPTION
value="Bangladesh">Bangladesh</OPTION><OPTION
value="Germany">Germany</OPTION><OPTION
value="India">India</OPTION></SELECT><FONT
color=black><STRONG>
If Other: </STRONG>
<INPUT name="ocountry" value="<%response.Write(ocountry)%>"
></FONT></TD></TR>
<TR>
<TD>
<P><IMG src="../Phone16.ico" style="HEIGHT: 33px; WIDTH: 32px" ><FONT
color=black><STRONG>*Phone:(Specify
atleast one)</STRONG></FONT></P></TD>
<TD>
<P><FONT color=black> </FONT></P>
<P><FONT color=black> <STRONG>Residence:<INPUT name="code"
value="<%response.Write(code)%>"
style="HEIGHT: 22px; WIDTH: 98px"
176
> - <INPUT
name="res" value="<%response.Write(res)%>"
style="HEIGHT: 22px; LEFT: 191px;
TOP: 41px; WIDTH: 140px"
></STRONG></FONT></P>
<P><FONT
color=black><STRONG> Mobile</STRONG>: &
nbsp; <INPUT
name="mobile" value="<%response.Write(mobile)%>" ></FONT></P></TD></TR>
<TR>
<TD>
<P><STRONG></STRONG><FONT
color=black> </FONT></P>
<P><IMG src="file://C:\Program Files\Microsoft Visual
Studio\Common\Graphics\Icons\Mail\Mail01b.ico" style="LEFT: 1px; TOP: 45px" ><FONT
color=black><STRONG>*E-Mail</STRONG></FONT></P>
<P> </P></TD>
<TD>
<P><FONT color=black><INPUT name="email" value="<%response.Write(email)%>"
style="HEIGHT: 22px; WIDTH: 202px"
></FONT></P></TD></TR>
<TR>
<TD><FONT color=black><STRONG>Languages Known:</STRONG> </FONT>
</TD><td><SELECT id=select7 multiple name="lan" size=2
> <OPTION
value="Eng">English</OPTION><OPTION
value="Hindi">Hindi</OPTION><OPTION
value="Guj">Gujarati</OPTION><OPTION
value="Tamil">Tamil</OPTION><OPTION
value="French">French</OPTION><OPTION
value="Spanish">Spanish</OPTION></SELECT></td></TR>
<TR>
<TD colSpan=2>
<H2> </H2>
<H2><FONT color=black><FONT size=6 style="BACKGROUND-COLOR:
dodgerblue; COLOR: mediumblue"
><U>Educational Qualification:</U>
</FONT></FONT></H2></TD></TR>
<tr>
<td>
<P><FONT color=black><STRONG> *Se</STRONG> </FONT><FONT
color=black><STRONG>condary
Education: </STRONG> <FONT color=black><STRONG><IMG
src="file://C:\Program Files\Microsoft Visual
Studio\Common\Graphics\Icons\Writing\Note03.ico"></STRONG></FONT></FONT></P>
<td><center><TABLE border=1 borderColor=gray cellPadding=0 cellSpacing=0
style="HEIGHT: 106px; WIDTH: 774px">
<TR>
<TD><FONT color=black><STRONG>Examination:</STRONG></FONT></TD>
<TD><FONT color=black><STRONG>Board/Istitute</STRONG></FONT></TD>
177
<TD><FONT color=black><STRONG>%Marks</STRONG></FONT></TD>
<TD>
<P><FONT color=black><STRONG>Month of
passing</STRONG></FONT></P></TD>
<TD><FONT color=black><STRONG>Class obtained</STRONG></FONT></TD>
<TD><FONT color=black><STRONG>No. of
Attempts</STRONG></FONT></TD></TR>
<tr>
<td colspan=6><FONT
color=black> <TEXTAREA cols=50 name="sec" rows=5 style="HEIGHT:
86px; WIDTH: 782px"><%response.Write(sec)%></TEXTAREA> </FONT>
</td>
</tr>
</TABLE></center>
</td>
<td width="10"></td>
</tr>
<tr>
<td>
<P><STRONG> </STRONG><FONT
color=black> </FONT></P>
<P><STRONG> </STRONG><FONT
color=black> </FONT></P>
<P><FONT color=black><STRONG>*Higher Degree:</STRONG> </FONT></P>
<td>
<P> </P>
<P><FONT
color=black> </FONT></P> <SELECT
name=degree style="HEIGHT: 34px; LEFT: 1px; TOP: 75px; WIDTH: 189px">
<OPTION selected value="">BE</OPTION><OPTION
value="">ME</OPTION><OPTION
value="">MCA</OPTION><OPTION value="">BA</OPTION><OPTION
value="">MA</OPTION><OPTION value="">BCom</OPTION><OPTION
value=MCom>MCom</OPTION></SELECT> <
FONT
color=black><STRONG>
Stream: <INPUT
name=stream value="<%response.Write(stream)%>"></STRONG> </FONT>
</td>
</td>
</tr>
<tr>
<td><FONT color=black>
<strong>*Academic Record:</strong> </FONT>
<td>
<center> </center>
<CENTER> </CENTER>
<CENTER><TABLE border=1 borderColor=gray cellPadding=0 cellSpacing=0
width="75%" style="HEIGHT: 158px; WIDTH: 799px">
178
<TR>
<TD><FONT color=black><STRONG>Examination:</STRONG></FONT></TD>
<TD><FONT color=black><STRONG>Board/Istitute</STRONG></FONT></TD>
<TD><FONT color=black><STRONG>%Marks</STRONG></FONT></TD>
<TD><FONT color=black><STRONG>Month-Year of
passing</STRONG></FONT></TD>
<TD><FONT color=black><STRONG>Class obtained</STRONG></FONT></TD>
<TD><FONT color=black><STRONG>No. of
Attempts</STRONG></FONT></TD></TR>
<TR><td colspan=6><TEXTAREA cols=50 name="academic" rows=5
style="HEIGHT: 132px; WIDTH:
793px"><%response.Write(academic)%></TEXTAREA><FONT
color=black> </FONT>
</td></TR></TABLE><FONT
color=black>  
; &nb
sp; &
nbsp;
&nbs
p; &n
bsp;
&nbs
p; &n
bsp;
&nbs
p; &n
bsp;
&nbs
p; &n
bsp; </FONT></CENTER>
</td>
</td>
</tr>
<tr>
<td><FONT color=black><STRONG>*Technical Skill: </STRONG></FONT>
</td>
<td>
<P><FONT color=black> </FONT></P>
<P><FONT
color=black>  
; &nb
sp; &
nbsp; <INPUT id=text24 name=tskill style="HEIGHT: 38px;
WIDTH: 226px" value="<%response.Write(tskill)%>"
> </FONT></P>
</td>
</tr>
<tr>
179
<td>
<P><FONT color=black><STRONG>*Non Technical Skill: </STRONG></FONT></P>
</td>
<td>
<P><FONT color=black> </FONT></P>
<P><FONT
color=black>  
; &nb
sp; &
nbsp;
<INPUT name="ntskill" style="HEIGHT: 35px; WIDTH: 223px"
value="<%response.Write(ntskill)%>"
</td>
<td>
<P><FONT
color=black>  
; &nb
sp; &
nbsp;
Company Name
: &nb
sp; &
nbsp;
180
Years </FONT></P>
<P><FONT
color=black>  
; &nb
sp; &
nbsp;
<INPUT name="company" value="<%response.Write(company)%>"style="HEIGHT:
52px; LEFT: -26px;
TOP: 40px; WIDTH: 202px"
> <INPUT name="exp"
value="<%response.Write(yrs)%>"style="HEIGHT: 49px; WIDTH: 71px"> </FONT></P>
<P> </P>
</td>
</tr><FONT color=black>Fields marked with
* are compulsory
<br></FONT>
<tr>
<td>
<P><FONT color=black><STRONG>Profile:</STRONG></FONT></P></td>
<td><P> &n
bsp;
&nbs
p;
<TEXTAREA name=TEXTAREA4 style="HEIGHT: 62px; LEFT: 1px; TOP: 2px; WIDTH:
180px"></TEXTAREA><FONT
color=black> </FONT></P><P> </P></td>
</tr>
<tr><td colspan="2"><center><input type="submit" value="submit"></center></td></tr>
</TABLE><FONT
color=black>  
; &nb
sp; &
nbsp;
</FONT>
</body>
</form>
<% Else
181
' response.Redirect("register.htm")
%>
<a href='http://localhost/ASP/viewresume.asp?email=<%=request("email")%>'>View
resume
<br>
<a href='http://localhost/ASP/logout.asp'>logout
<%
end if
%>
</body>
</html>
13.Delete.asp
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Untitled Document</title>
</head>
<body>
<% email=request.QueryString("email")
Set Con = Server.CreateObject("ADODB.Connection")
'Con.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" &
Server.MapPath("resume.mdb")
Con.Open "Data Source=resume;User Id=scott;Password=tiger"
Con.Execute("delete from seeker where email='"&email&"'")
response.Redirect("logout.asp")%>
</body>
</html>
14.Viewresume.asp
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<% email=session("email")%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
182
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title><%=email%></title>
</head>
<%
email=request.QueryString("email")
Set Con = Server.CreateObject("ADODB.Connection")
'Con.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" &
Server.MapPath("resume.mdb")
Con.Open "Data Source=resume;User Id=scott;Password=tiger"
sql="select * from resume where email='"&email&"'"
Set rs=Con.Execute(sql)
fname =rs("fname")
lname=rs("lname")
day1=rs("day")
mon=rs("mon")
year1=rs("year")
loc=rs("loc")
email=rs("email")
sec=rs("sec")
degree=rs("degree")
stream=rs("stream")
academic=rs("acade")
tskill=rs("tskill")
achieve=rs("achieve")
company=rs("comp")
yrs=rs("yrs")
rs.MoveNext
WEND
%>
<tr><td>
Date of Birth:
183
</td>
<td>
<%response.Write(day1)%>
<%response.Write(mon)%>
<%response.Write(year1)%>
</td></tr>
<tr><td>
Address
</td>
<td>
<%response.Write(loc)%>
</td></tr>
<tr><td>
Email
</td>
<td><%response.Write(email)%>
</td></tr>
<tr><td>
Secondary education
</td>
<td><%response.Write(sec)%>
</td></tr>
<tr><td>
Degree:
</td>
<td>
<%response.Write(degree)%>
</td></tr>
<tr><td>
Stream:
</td>
<td>
<%response.Write(stream)%>
</td></tr>
<tr><td>
Academic
</td>
<td>
<%response.Write(academic)%>
</td></tr>
<tr><td>
Achievements
</td>
<td>
<%response.Write(achieve)%>
</td></tr>
<tr><td>
Technical skill
</td>
<td>
184
<%response.Write(tskill)%>
</td></tr>
<tr><td>
Company:
</td>
<td>
<%response.Write(company)%>
</td></tr>
<tr><td>
Years
</td>
<td>
<%response.Write(yrs)%>
</td></tr>
</form>
</body>
</html>
15.Unsubscribe.asp
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Untitled Document</title>
</head>
<body>
<% email=request.QueryString("email")
Set Con = Server.CreateObject("ADODB.Connection")
'Con.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" &
Server.MapPath("resume.mdb")
Con.Open "Data Source=resume;User Id=scott;Password=tiger"
Con.Execute("delete from provider where email='"&email&"'")
response.Redirect("logout.asp")%>
</body></html>
185
16.Search.asp
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Untitled Document</title>
</head>
<% searchby= request.QueryString("search")
title=request.QueryString("title")
Set Con = Server.CreateObject("ADODB.Connection")
'Con.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" &
Server.MapPath("resume.mdb")
Con.Open "Data Source=resume;User Id=scott;Password=tiger"
sql="select * from job where "+searchby+"='"+title+"'"
Set rs=Con.Execute(sql)
cnt=0
While not rs.EOF
cnt=cnt+1
jid =rs("jid")
vcode =rs("vcode")
company=rs("company")
loc=rs("loc")
post=rs("post")
skill=rs("skill")
cperson=rs("person")
cnum=rs("phone")
email1=rs("email")
exp1=rs("exp")
web=rs("website")
%>
<html>
<body bgcolor=lightskyblue>
<table border=0 bordercolor=black>
<tr><td>
Vacancy code:
</td>
<td>
<%response.Write(vcode)%>
</td></tr>
<tr><td>
Company:
</td>
<td>
<%response.Write(company)%>
186
</td></tr>
<tr><td>
Location
</td>
<td>
<%response.Write(loc)%>
</td></tr>
<tr><td>
Post
</td>
<td><%response.Write(post)%>
</td></tr>
<tr><td>
Skill
</td>
<td><%response.Write(skill)%>
</td></tr>
<tr><td>
Contact person
</td>
<td>
<%response.Write(cperson)%>
</td></tr>
<tr><td>
Contact Number:
</td>
<td>
<%response.Write(cnum)%>
</td></tr>
<tr><td>
Email
</td>
<td>
<%response.Write(email1)%>
</td></tr>
<tr><td>
Experience:
</td>
<td>
<%response.Write(exp1)%>
</td></tr>
<tr><td>
Website
</td>
<td>
<%response.Write(web)%>
</td></tr>
<% rs.MoveNext
Wend
187
if cnt = 0 then
response.Write("Sorry ,no results were found")%>
<a href="register.htm">Try again</a>
<% end if
%>
</body>
</html>
16. Logout.asp
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Untitled Document</title>
</head>
<body>
<% session.Contents.Remove("uname")
session.Contents.Remove("email")
%>
you are successfully logout<a href="register.htm">Home</a>
</body>
</html>
188
10.JAVASCRIPT
Java Script is used as client side validation scripting language.The source code
for HTML pages with client side validation are as below:
1.Register.htm
2.JobSeeker.htm
3.JobProvider.htm
4.Writeresume.htm
5.PostJob.htm
1. Register.htm
<HTML><HEAD>
<BODY bgcolor=lightskyblue>
<TABLE bgColor=white border=1 cellPadding=0 cellSpacing=0
background="" borderColor=black borderColorLight=black style="WIDTH: 752px;
HEIGHT: 162px">
<TR><TD width="50%" style="BACKGROUND-COLOR:
lightskyblue"><pre><STRONG><FONT color=yellow size=6><marquee direction=right
style="COLOR: blue">Online</marquee>
<marquee style="COLOR: blue"> Resume</marquee>
<marquee direction=right style="COLOR: blue">
Builder</marquee></FONT></STRONG></pre></TD>
<TD bgColor=lightskyblue><IMG style ="WIDTH: 173px; HEIGHT: 129px" src
="images.jpg" width=100 ><IMG style="WIDTH:
225px; HEIGHT: 130px" src="images7.jpg" ></TD>
<TR>
<TD colspan=2 style="COLOR: lightskyblue; BACKGROUND-COLOR:
lightskyblue"
>
<P> <FONT
color=lime size=5
style="COLOR: black; BACKGROUND-COLOR: dodgerblue"> Home
<A style="COLOR: black" href ="resumecreation.htm" >Resume
Creation</A> <A style="COLOR: black" href
="jobcreation.htm" >Post
Job</A>
</FONT></P>
<P><FONT
color=lime size=5
style="COLOR: black">
189
<form method=get action="http://localhost:8081/servlet/search"
name=form3><FONT style="BACKGROUND-COLOR:
lightskyblue"> Search : <SELECT
id=select1 style="WIDTH: 107px" name=search> <OPTION value=loc
selected>Location</OPTION><OPTION value=post>Post</OPTION><OPTION
value=company>Compnay</OPTION><OPTION
value=""></OPTION></SELECT> Keyword:
</FONT><INPUT id=""
style="WIDTH: 111px; HEIGHT: 24px" size=12 name=title> <INPUT
id="" style="WIDTH: 38px; HEIGHT: 24px" type=submit size=12 value=Go!></form>
</FONT></P></TD></TR></TABLE>
<table width="100%" border="1" cellspacing="0" cellpadding="0" background=""
borderColor=black borderColorLight=black bgColor=lightskyblue>
<tr>
<td width="36%" height="108"><font color="#ff00cc" size=5
><h1 style="FONT-SIZE: large; COLOR: mediumblue">Job seeker
Login</h1></font>
<form method=get action="http://localhost:8081/servlet/validseeker" name=form1>
<table bgColor=lightskyblue borderColor=lightskyblue borderColorLight=red
style="COLOR: lightskyblue">
<TBODY style="COLOR: black">
<tr><td><font color="#ffff00" style="COLOR: black"
>Name:</font></td>
<td><input name="uname"
></td></tr>
<tr><td><font color="#ffff00" style="COLOR: black"
>Password:</font></td>
<td><input type="password" name="upassword"></td></tr>
<tr><td colspan="2"><center><input type="submit"
value="login"></center></td></tr>
</form>
<tr><td colspan="2"><A style="COLOR: black" href ="jobseeker.htm" >New
User</A></td></tr>
</table></TD>
<td width="33%"><IMG style="LEFT: 0px; WIDTH: 258px; TOP: 5px; HEIGHT:
210px" height =166 src="images5.jpg" width=177 ></td>
<td width="31%"><font color="#ff00cc"><h1 style="FONT-SIZE: large; COLOR:
blue">Job Provider Login</h1></font>
<form method=get action="http://localhost:8081/servlet/validprovider" name=form2>
190
<td><input type="password" name="upassword"></td></tr>
<tr><td colspan="2"><center><input type="submit"
value="login"></center></td></tr>
</form>
<tr><td colspan="2"><A style="COLOR: black" href ="jobprovider.htm" >New
User</A></td></tr></TBODY></TABLE></td></TD></TR></TBODY></TABLE>
</BODY></HTML>
2. Jobseeker.htm
<html>
<head>
<script language="javascript">
function isEmpty(field)
{
if(field.value=="")
{
return true;
}
else
return false;
}
function ismatchpassword(f1,f2)
{
if(f1.value == f2.value)
{
return true;
}
else
return false;
}
function isvalidemail(f1)
{
emailcheck=f1.value;
var cnt=emailcheck.length;
var n;
//alert(cnt);
for(var i=0;i<cnt;i++)
{
if(emailcheck.substring(i,i+1) == '@')
{
n=i;
i=cnt;
}
}
//alert(n);
//var test=emailcheck.substring(n,cnt)
191
//alert(test);
if((emailcheck.substring(n,cnt) == "@yahoo.com")|(emailcheck.substring(n,cnt) ==
"@rediffmail.com")|(emailcheck.substring(n,cnt) == "@yahoo.co.in"))
{
return true;
}
else
return false;
}
function isrequired(form1)
{ var empty=false;
var pass=false;
var email=false;
if(isEmpty(form1.fname))
{
alert("The name field is required,Please fill it in");
empty=true;
//form1.firstname.focus();
}
if(isEmpty(form1.lname))
{
alert("The name field is required,Please fill it in last name");
empty=true;
// form1.lastname.focus();
}
if(isEmpty(form1.uname))
{
alert("Please enter user name");
empty=true;
}
if(isEmpty(form1.password))
{
alert("The password field is required,Please fill it in");
empty=true;
}
else
pass=true;
if(isEmpty(form1.confpassword))
{
alert("Please retype the password ");
empty=true;
}
else
pass=true;
if(pass==true && ismatchpassword(form1.password,form1.confpassword))
{
pass=false;
}
192
else
alert("Please confirm your password again");
if(isEmpty(form1.qual))
{
alert("Please enter your qualifications");
empty=true;
}
if(isEmpty(form1.email))
{
alert("The email field is required,Please fill it in");
empty=true;
}
else
email=true;
if(email==true && isvalidemail(form1.email))
{
email=false;
}
else
alert("Invlaid email");
</script>
</head>
<form name=form1 method=get action="http://localhost:8081/servlet/insertseeker"
onSubmit="return isrequired(form1)">
<BODY bgcolor=lightskyblue>
<TABLE bgColor=lightskyblue border=1 cellPadding=0 cellSpacing=0
width="100%" background="" borderColor=black borderColorLight=black style="LEFT:
10px; TOP: 19px">
<TR><TD width="50%"><pre><STRONG><FONT color=blue size=6>Online
Resume
Builder</FONT></STRONG></pre></TD>
193
<TD><IMG style ="WIDTH: 357px; HEIGHT: 129px" src ="images.jpg" width=100
></TD>
<TR>
<TD colspan=2> <FONT
color=lime size=5> <FONT color=black
style="BACKGROUND-COLOR: dodgerblue">Home
Resume
Creation Post Job
</FONT>
</FONT></TD></TR></TABLE>
<TABLE align=left bgColor=#ffccff border=0 borderColor=mediumblue
borderColorLight=black cellPadding=1 cellSpacing=1 background="" width="70%"
style="WIDTH: 418px; HEIGHT: 350px; BACKGROUND-COLOR: lightskyblue">
<TR>
<TD colSpan=2>
<H2 style="COLOR: darkblue; BACKGROUND-COLOR: dodgerblue"
> Job
SeekerRegistration Form</H2> </TD>
</TR>
<TR>
<TD>First Name:</TD>
<TD><INPUT name=fname style="LEFT: 1px; WIDTH: 173px; TOP: 3px; HEIGHT:
22px"
></TD></TR>
<TR>
<TD>Last Name:</TD>
<TD><INPUT name=lname
style="WIDTH: 172px; HEIGHT: 22px"></TD></TR>
<TR>
<TD>Gender:</TD>
<TD><INPUT name=radio1 style="WIDTH: 20px; HEIGHT: 20px"
type=radio value=Male> Male <INPUT name=radio1
style="WIDTH: 54px; HEIGHT: 20px" type=radio value=Female>Female</TD></TR>
<TR>
<TD>User Name:</TD>
<TD><INPUT
name=uname
style="LEFT: 1px; WIDTH: 173px; TOP: 2px; HEIGHT: 22px"></TD></TR>
<TR>
<TD>Password:</TD>
<TD><INPUT name=password type=password style="WIDTH: 172px; HEIGHT:
22px"></TD></TR>
<TR>
<TD>Confirm Password:</TD>
<TD><INPUT name=confpassword type=password style="WIDTH: 172px; HEIGHT:
22px"></TD></TR>
<TR>
<TD>Qualification</TD>
194
<TD><INPUT
name=qual style ="FILTER: ; WIDTH: 169px; HEIGHT: 22px"></TD></TR>
<TR>
<TD>E-Mail</TD>
<TD>
<P><INPUT name=email style="WIDTH: 233px; HEIGHT: 22px"
></P></TD></TR>
<TR>
<TD
colSpan=2>
&nbs
p; &n
bsp;
<INPUT align=absMiddle style="LEFT: 165px; TOP: 4px" type=submit value=Submit
onClick="javascript:isrequired(this.form)"></TD>
</TR></TABLE>
</BODY>
</form>
</html>
3.Jobprovider.htm
<html>
<head>
<script language="javascript">
function isEmpty(field)
{
if(field.value=="")
{
return true;
}
else
return false;
}
function isvalidemail(f1)
{
emailcheck=f1.value;
var cnt=emailcheck.length;
var n;
//alert(cnt);
for(var i=0;i<cnt;i++)
{
if(emailcheck.substring(i,i+1) == '@')
{
n=i;
i=cnt;
}
195
}
//alert(n);
//var test=emailcheck.substring(n,cnt)
//alert(test);
if((emailcheck.substring(n,cnt) == "@yahoo.com")|(emailcheck.substring(n,cnt) ==
"@rediffmail.com")|(emailcheck.substring(n,cnt) == "@yahoo.co.in"))
{
return true;
}
else
return false;
}
function isvalidweb(f1)
{
webcheck=f1.value;
// alert(webcheck);
var cnt=webcheck.length;
var n;
if(webcheck.substring(0,3) == 'www')
{
n=3;
}
// alert(n);
if(webcheck.substring(n,n+1)=='.')
{// alert("ok");
for(var j=4;j<cnt;j++)
{
if(webcheck.substring(j,j+1)== '.')
{ // alert("ok");
m=j;
m=m+1;
//alert(m);
}
//else
//return false;
}
//alert(m);
if((webcheck.substring(m,cnt) == 'com')|(webcheck.substring(m,cnt) ==
'gov.in')|(webcheck.substring(m,cnt) == 'co.in'))
{
return true;
}
else
return false;
}
}
function isvalidphone(f1)
196
{
phonecheck=f1.value;
var cnt=phonecheck.length;
var n;
//alert(cnt);
for(var i=0;i<cnt;i++)
{
if(phonecheck.substring(i,i+1)<'0' || phonecheck.substring(i,i+1)>'9' )
{
return false;
}
else
return true;
}
}
function isrequired(form1)
{ var empty=false;
var pass=false;
var email=false;
var phone=false;
var web=false;
if(isEmpty(form1.vcode))
{
alert("The vacancy code field is required,Please fill it in");
empty=true;
//form1.firstname.focus();
}
if(isEmpty(form1.company))
{
alert("The company field is required,Please fill ");
empty=true;
// form1.lastname.focus();
}
if(isEmpty(form1.loc))
{
alert("The Location field is required,Please fill it in ");
empty=true;
// form1.lastname.focus();
}
if(isEmpty(form1.skill))
{
alert("Please enter skill requires");
empty=true;
// form1.lastname.focus();
}
if(isEmpty(form1.cperson))
{
alert("Please fill it in contact person name");
empty=true;
// form1.lastname.focus();
197
}
if(isEmpty(form1.post))
{
alert("Please fill your post");
empty=true;
}
if(isEmpty(form1.phone))
{
alert("Please enter your Phone no");
empty=true;
}
else
phone=true;
if(phone==true && isvalidphone(form1.phone))
{
phone=false;
}
else
{
alert("Enter proper phone number");
}
if(isEmpty(form1.email))
{
alert("The email field is required,Please fill it in");
empty=true;
}
else
email=true;
if(email==true && isvalidemail(form1.email))
{
email=false;
}
else
alert("Invlaid email");
if(isEmpty(form1.website))
{
alert("Please enter your company's website");
empty=true;
}
else
web=true;
if(web==true && isvalidweb(form1.website))
{
web=false;
}
else
198
alert("Please enter proper website");
</script>
</head>
<form name=form1 method="get" action="http://localhost:8081/servlet/insertjob" >
<BODY bgcolor=lightskyblue>
<TABLE bgColor=lightskyblue border=1 cellPadding=0 cellSpacing=0
width="100%" background="" borderColor=black borderColorLight=black style="LEFT:
10px; TOP: 19px">
<TR><TD width="50%"><pre><STRONG><FONT color=blue size=6>Online
Resume
Builder</FONT></STRONG></pre></TD>
<TD><IMG src ="images.jpg" style="HEIGHT: 129px; WIDTH: 357px"
width=100></TD>
<TR>
<TD colspan=2> <FONT
color=lime size=5> <FONT color=black
style="BACKGROUND-COLOR: dodgerblue">Home
Resume
Creation Post Job
</FONT>
</FONT></TD></TR></TABLE>
<TABLE align=left bgColor=lightskyblue border=0 borderColor=black
borderColorLight=black cellPadding=1 cellSpacing=1 background="" width="70%"
style="HEIGHT: 346px; WIDTH: 460px">
<TR>
<TD colSpan=2>
<H2><FONT color=mediumblue
style="BACKGROUND-COLOR: dodgerblue">Fill the following
details</FONT>
</H2> </TD>
</TR>
<TR>
<TD>Vacancy Code:</TD>
199
<TD><INPUT name=vcode style="HEIGHT: 22px; LEFT: 1px; TOP: 2px; WIDTH:
173px"
></TD></TR>
<TR>
<TD> Company</TD>
<TD><INPUT name=company
style="HEIGHT: 22px; WIDTH: 172px"></TD></TR>
<TR>
<TD>Location:</TD>
<TD><INPUT name=loc
style="HEIGHT: 22px; WIDTH: 169px"></TD></TR>
<TR>
<TD> Post:</TD>
<TD><INPUT name=post style="HEIGHT: 22px; LEFT: 1px; TOP: 2px; WIDTH:
173px"
></TD></TR>
<TR>
<TD>Key Skills:</TD>
<TD><INPUT name=skill
style="HEIGHT: 22px; WIDTH: 169px"></TD></TR>
<TR>
<TD>Contact Person:</TD>
<TD><INPUT name=cperson
style="HEIGHT: 22px; WIDTH: 172px"></TD></TR>
<TR>
<TD>Contact No.:</TD>
<TD><INPUT name=phone
style="FILTER: ; HEIGHT: 22px; WIDTH: 169px"></TD></TR>
<TR>
<TD>E-Mail:</TD>
<TD>
<P><INPUT name=email style="HEIGHT: 22px; WIDTH: 233px"
></P></TD></TR>
<TR>
<TD>
Web Site:
</TD>
<TD><INPUT id=text2 name=website
style="HEIGHT: 22px; WIDTH: 231px">
</TD>
</TR>
<TR>
<TD>Exp Requ:</TD><TD><INPUT name=exp
style="HEIGHT: 22px; WIDTH: 164px">
</TD>
200
</TR>
<TR>
<TD
colSpan=2>
&nbs
p; &n
bsp;
<INPUT align=absMiddle id=submit1 style="LEFT: 165px; TOP: 4px" type=submit
value=Submit onClick="javascript:isrequired(this.form)"></TD>
</TR></TABLE>
</BODY>
</form>
</html>
4.Writeresume.htm
<html>
<head>
<script language="javascript">
function isEmpty(field)
{
if(field.value=="")
{
return true;
}
else
return false;
}
function isvalidemail(f1)
{
emailcheck=f1.value;
var cnt=emailcheck.length;
var n;
//alert(cnt);
for(var i=0;i<cnt;i++)
{
if(emailcheck.substring(i,i+1) == '@')
{
n=i;
i=cnt;
}
}
//alert(n);
//var test=emailcheck.substring(n,cnt)
201
//alert(test);
if((emailcheck.substring(n,cnt) == "@yahoo.com")|(emailcheck.substring(n,cnt) ==
"@rediffmail.com")|(emailcheck.substring(n,cnt) == "@yahoo.co.in"))
{
return true;
}
else
return false;
}
function isvalidphone(f1)
{
phonecheck=f1.value;
var cnt=phonecheck.length;
var n;
//alert(cnt);
for(var i=0;i<cnt;i++)
{
if(phonecheck.substring(i,i+1)<"0" || phonecheck.substring(i,i+1)>"9" )
{
return false;
}
else
return true;
}
}
function isrequired(form1)
{ var empty=false;
var email=false;
var phone=false;
if(isEmpty(form1.fname))
{
alert("The name field is required,Please fill it in");
empty=true;
//form1.firstname.focus();
}
if(isEmpty(form1.lname))
{
alert("The name field is required,Please fill it in last name");
empty=true;
// form1.lastname.focus();
}
if(isEmpty(form1.day)|| isEmpty(form1.mon)||isEmpty(form1.year))
{
alert("Please enter proper bdate");
empty=true;
}
if(isEmpty(form1.locadd))
{
202
alert("Please fill local address");
empty=true;
}
if(isEmpty(form1.permadd))
{
alert("Please type the permanent address ");
empty=true;
}
if(isEmpty(form1.city))
{
alert("The city field is required,Please fill it in");
empty=true;
}
if(isEmpty(form1.state))
{
alert("Please fill your state");
empty=true;
}
if(isEmpty(form1.country))
{
alert("Please fill your country");
empty=true;
}if(isEmpty(form1.code))
{
alert("Please fill your code number");
empty=true;
}
if(isEmpty(form1.res))
{
alert("Please enter your Phone no");
empty=true;
}
else
phone=true;
if(phone==true && isvalidphone(form1.res))
{
phone=false;
}
else
{
alert("Enter proper phone number");
}
if(isEmpty(form1.email))
{
alert("The email field is required,Please fill it in");
empty=true;
}
203
else
email=true;
if(email==true && isvalidemail(form1.email))
{
email=false;
}
else
alert("Invlaid email");
if(isEmpty(form1.sec))
{
alert("Please fill your details for secondary education");
empty=true;
}if(isEmpty(form1.degree))
{
alert("Please fill your degree");
empty=true;
}if(isEmpty(form1.academic))
{
alert("Please fill your academic results");
empty=true;
}if(isEmpty(form1.tskill))
{
alert("Please enter atleast one technical skill");
empty=true;
}if(isEmpty(form1.ntskill))
{
alert("Please fill non technical skill");
empty=true;
}
if(empty==false && email==false && phone==false)
{
alert("Thank you for registering");
return true;
}
else
{
return false;
}
}
</script>
</head>
<form method=get name=form1 action="http://localhost:8081/servlet/insertresume"
onSubmit="return isrequired(form1)">
<body bgcolor="lightskyblue"><FONT color=red>Fields marked with * are
compulsory</FONT>
<marquee direction="right">
<h1><FONT color=black>Fill the following
details:</FONT></h1>
</marquee>
204
<TABLE align="center" border="0" cellPadding="1" cellSpacing="1"
background="" style ="WIDTH: 75%; BACKGROUND-COLOR: lightskyblue"
width="75%">
<TR>
<TD colSpan="2">
<H2><FONT color="mediumblue" size="6"
style="BACKGROUND-COLOR: dodgerblue"
>Personal
Information: </FONT>
</H2>
</TD>
</TR>
<TR>
<TD><FONT color="white"><STRONG>*<FONT
color=black>FirstName: &
nbsp;
&nbs
p;</FONT></STRONG></FONT></TD>
<TD><STRONG><INPUT name="fname" style="LEFT: 1px;
TOP: 3px"><FONT
color=black></FONT></STRONG></TD>
</TR>
<TR>
<TD>
<P><STRONG><FONT
color=black></FONT> </STRONG> </P>
<P><FONT color=black><STRONG>*Last
Name:</STRONG> </FONT>
</P>
</TD>
<TD>
<P><STRONG><FONT
color=black></FONT></STRONG> </P>
<P><STRONG><INPUT name="lname" style="LEFT:
1px; TOP: 41px"><FONT
color=black></FONT></STRONG></P>
</TD>
</TR>
<TR>
<TD>
<P><STRONG><FONT
color=black></FONT> </STRONG> </P>
<P><STRONG><FONT
color=black>*Date Of Birth:</FONT> </STRONG></P>
</TD>
<TD>
<P><FONT
color=black></FONT><STRONG> </P>
<SELECT name="day">
205
<OPTION selected value="01">01</OPTION>
<OPTION value="02">02</OPTION>
<OPTION value="03">03</OPTION>
<OPTION value="04">04</OPTION>
<OPTION value="05">05</OPTION>
<OPTION value="06">06</OPTION>
<OPTION value="07">07</OPTION>
<OPTION value="08">08</OPTION>
<OPTION value="09">09</OPTION>
<OPTION value="10">10</OPTION>
<OPTION value="11">11</OPTION>
<OPTION value="12">12</OPTION>
<OPTION value="13">13</OPTION>
<OPTION value="14">14</OPTION>
<OPTION value="15">15</OPTION>
<OPTION value="16">16</OPTION>
<OPTION value="17">17</OPTION>
<OPTION value="18">18</OPTION>
<OPTION value="19">19</OPTION>
<OPTION value="20">20</OPTION>
<OPTION value="21">21</OPTION>
<OPTION value="22">22</OPTION>
<OPTION value="23">23</OPTION>
<OPTION value="24">24</OPTION>
<OPTION value="25">25</OPTION>
<OPTION value="26">26</OPTION>
<OPTION value="27">27</OPTION>
<OPTION value="28">28</OPTION>
<OPTION value="29">29</OPTION>
<OPTION value="30">30</OPTION>
<OPTION value="31">31</OPTION>
</SELECT></STRONG><FONT
color=black> - </FONT>
<SELECT name="mon">
<OPTION selected
value="January">January</OPTION>
<OPTION
value="February">February</OPTION>
<OPTION value="March">March</OPTION>
<OPTION value="April">April</OPTION>
<OPTION value="May">May</OPTION>
<OPTION value="June">June</OPTION>
<OPTION value="July">July</OPTION>
<OPTION value="Aug">Aug</OPTION>
<OPTION value="Sept">Sept</OPTION>
<OPTION value="Oct">Oct</OPTION>
<OPTION value="Nov">Nov</OPTION>
<OPTION value="Dec">Dec</OPTION>
</SELECT><FONT color=black>-
</FONT>
206
<SELECT name="year">
<OPTION selected
value="1984">1984</OPTION>
<OPTION value="1985">1985</OPTION>
<OPTION value="1986">1986</OPTION>
<OPTION value="1987">1987</OPTION>
<OPTION value="1988">1988</OPTION>
<OPTION value="1989">1989</OPTION>
<OPTION value="1990">1990</OPTION>
<OPTION value="1991">1991</OPTION>
<OPTION value="1992">1992</OPTION>
<OPTION value="1993">1993</OPTION>
<OPTION value="1994">1994</OPTION>
<OPTION value="1995">1995</OPTION>
<OPTION value="1996">1996</OPTION>
<OPTION value="1997">1997</OPTION>
<OPTION value="1998">1998</OPTION>
<OPTION value="1999">1999</OPTION>
<OPTION value="2000">2000</OPTION>
</SELECT></TD>
</TR>
<TR>
<TD>
<P><STRONG><FONT
color=black></FONT> </STRONG>
</P>
<P><FONT color=black><STRONG>*Local
Address:</STRONG> </FONT>
</P>
</TD>
<TD>
<P><FONT
color=black></FONT> </P><TEXTAREA name=loc></TEXTAREA><FONT
color=black></FONT></TD>
</TR>
<TR>
<TD>
<P><STRONG><FONT
color=black></FONT> </STRONG> </P>
<P><FONT color=black><STRONG>*Permanent
Address:</STRONG> </FONT>
</P>
</TD>
<TD>
<P><FONT
color=black></FONT> </P><TEXTAREA name=perm></TEXTAREA><FONT
color=black></FONT></TD>
</TR>
<TR>
<TD>
207
<P><STRONG><FONT
color=black></FONT></STRONG> </P>
<P><STRONG><FONT
color=black>*City:</FONT></STRONG></P>
</TD>
<TD>
<P><STRONG><FONT
color=black></FONT></STRONG> </P>
<P><INPUT name="city"><FONT
color=black></FONT></P>
</TD>
</TR>
<TR>
<TD>
<P><STRONG><FONT
color=black></FONT> </STRONG> </P>
<P><FONT color=black><STRONG>Zip
Code:</STRONG> </FONT>
</P>
</TD>
<TD>
<P><STRONG><FONT
color=black></FONT></STRONG> </P>
<P><INPUT name="zip"><FONT
color=black></FONT></P>
</TD>
</TR>
<TR>
<TD>
<P><STRONG><FONT
color=black></FONT></STRONG> </P>
<P><STRONG><FONT
color=black>*State:</FONT></STRONG></P>
</TD>
<TD>
<P><FONT color=black></FONT> </P>
<SELECT name="state" style="WIDTH: 169px;
HEIGHT: 22px">
<OPTION selected value="AP">Andhra
Pradesh</OPTION>
<OPTION value="ArP">Arunachal
Pradesh</OPTION>
<OPTION value="GU">Gujarat</OPTION>
<OPTION value="MP">Madhya
Pradesh</OPTION>
<OPTION value="RT">Rajasthan</OPTION>
<OPTION
value="MH">Maharashtra</OPTION>
<OPTION value="KA">Karnataka</OPTION>
208
<OPTION value="TN">Tamil
Nadu</OPTION>
<OPTION value="UP">Uttar
Pradesh</OPTION>
<OPTION value="JK">Jammu
Kashmir</OPTION>
<OPTION value="Assam">Assam</OPTION>
<OPTION value="punjab">Punjab</OPTION>
</SELECT><FONT color=black>
</FONT> <STRONG><FONT color=black>If
Other: </FONT> <INPUT id="" name="ostate" style="LEFT: 249px;
WIDTH: 154px; TOP: 3px; HEIGHT: 22px"></STRONG></TD>
</TR>
<TR>
<TD>
<P><STRONG><FONT
color=black></FONT></STRONG> </P>
<P><STRONG><FONT
color=black>*Country:</FONT></STRONG></P>
</TD>
<TD>
<P><FONT color=black></FONT> </P>
<SELECT
name="country">
<OPTION selected
value="America">America</OPTION>
<OPTION
value="Australia">Australia</OPTION>
<OPTION value="Africa">Africa</OPTION>
<OPTION
value="Antartica">Antartica</OPTION>
<OPTION value="Brazil">Brazil</OPTION>
<OPTION value="Bhutan">Bhutan</OPTION>
<OPTION
value="Bangladesh">Bangladesh</OPTION>
<OPTION
value="Germany">Germany</OPTION>
<OPTION value="India">India</OPTION>
</SELECT><FONT
color=black><STRONG>
If
Other: </STRONG>
</FONT> <INPUT id="" name="ocountry"></TD>
</TR>
<TR>
<TD><STRONG><FONT
color=black>*Phone:</FONT></STRONG></TD>
<TD>
<P><FONT color=black></FONT> </P>
209
<P><FONT
color=black> </FONT><STRONG><FONT
color=black>Residence:</FONT><INPUT id="" name="code" style="WIDTH: 71px;
HEIGHT: 22px"
><FONT
color=black> - </FONT><INPUT name="res"></STRONG></P>
<P><FONT
color=black><STRONG> Mobile</STRONG>: &
nbsp;
</FONT>
<INPUT name="mobile"></P>
</TD>
</TR>
<TR>
<TD>
<P><STRONG><FONT
color=black></FONT></STRONG> </P>
<P><STRONG><FONT
color=black>*E-Mail</FONT></STRONG></P>
<P><FONT color=black></FONT> </P>
</TD>
<TD>
<P><INPUT name="email" style="WIDTH: 202px;
HEIGHT: 22px"><FONT color=black></FONT></P>
</TD>
</TR>
<TR>
<TD><FONT color=black><STRONG>Languages
Known:</STRONG> </FONT>
</TD>
<td><SELECT multiple name="lan" size="2"
>
<OPTION value="Eng">English</OPTION>
<OPTION value="Hindi">Hindi</OPTION>
<OPTION
value="Gujarati">Gujarati</OPTION>
<OPTION value="Tamil">Tamil</OPTION>
<OPTION value="French">French</OPTION>
<OPTION
value="Spanish">Spanish</OPTION>
</SELECT><FONT
color=black></FONT></td>
</TR>
<TR>
<TD colSpan="2">
<H2><FONT color="black" size="6">
</FONT> </H2>
<H2><FONT color="blue" size="6"
style="BACKGROUND-COLOR: dodgerblue"
>Educational Qualification:</FONT></H2>
210
</TD>
</TR>
<tr>
<td><STRONG><FONT
color=black><FONT color=blue>*</FONT>Secondary
Education:</FONT> </STRONG></td>
<td>
<center><TABLE border="1" borderColor="gray"
cellPadding="0" cellSpacing="0" width="75%" style="WIDTH: 740px; HEIGHT: 94px">
<TR>
<TD><STRONG><FONT
color=black>Examination:</FONT></STRONG></TD>
<TD><STRONG><FONT
color=black>Board/Istitute</FONT></STRONG></TD>
<TD><STRONG><FONT
color=black>%Marks</FONT></STRONG></TD>
<TD><STRONG><FONT
color=black>Month-Year of passing</FONT> </STRONG></TD>
<TD><STRONG><FONT
color=black>Class obtained</FONT> </STRONG></TD>
<TD><STRONG><FONT
color=black>No. of Attempts</FONT> </STRONG></TD>
</TR>
<TR>
<td colspan=6><TEXTAREA style="WIDTH: 1098px;
HEIGHT: 109px" name=sec rows=10 cols=100></TEXTAREA><FONT
color=black> </FONT>
</td>
</TR>
</TABLE></center>
</td>
</tr>
<tr>
<td>
<P><STRONG><FONT
color=black></FONT></STRONG> </P>
<P><STRONG><FONT
color=black></FONT> </STRONG> </P>
<P><FONT
color=black><STRONG>*Higher Degree:</STRONG> </FONT>
</P>
<td>
<P><FONT
color=black></FONT> </P>
<P><FONT
color=black></FONT> </P>
<SELECT
name="degree" style="WIDTH: 189px; HEIGHT: 34px">
<OPTION selected
value="BE">BE</OPTION>
211
<OPTION
value="ME">ME</OPTION>
<OPTION
value="MCA">MCA</OPTION>
<OPTION
value="BA">BA</OPTION>
<OPTION
value="MA">MA</OPTION>
<OPTION
value="BCom">BCom</OPTION>
<OPTION
value="MCom">MCom</OPTION>
</SELECT><FONT
color=black> </FONT><STRONG><FONT
color=black> Stream:
</FONT> <INPUT id="text15" name="stream"></STRONG><FONT
color=black> </FONT>
<P> </P>
</td>
</td>
</tr>
<tr>
<td><FONT color=black> <strong>*Acamedic Record:</strong>
</FONT>
<td>
<CENTER><TABLE border="1" borderColor="gray" cellPadding="0"
cellSpacing="0" width="75%">
<TR>
<TD><STRONG><FONT
color=black>Examination:</FONT></STRONG></TD>
<TD><STRONG><FONT
color=black>Board/Istitute</FONT></STRONG></TD>
<TD><STRONG><FONT
color=black>%Marks</FONT></STRONG></TD>
<TD><STRONG><FONT
color=black>Month-Year of passing</FONT> </STRONG></TD>
<TD><STRONG><FONT
color=black>Class obtained</FONT> </STRONG></TD>
<TD><STRONG><FONT
color=black>No. of Attempts</FONT> </STRONG></TD>
</TR>
<tr>
<td colspan=6><TEXTAREA
style="WIDTH: 1094px; HEIGHT: 142px" name=academic rows=50
cols=10></TEXTAREA><FONT
color=black> </FONT>
</td>
</tr>
</TABLE><FONT
212
color=black>  
; &nb
sp; &
nbsp;
&nbs
p; &n
bsp;
&nbs
p; &n
bsp;
&nbs
p; &n
bsp;
&nbs
p; &n
bsp; </FONT></CENTER>
</td>
</td>
</tr>
<tr>
<td><STRONG><FONT
color=black>*Technical Skill: </FONT> </STRONG>
</td>
<td>
<P><FONT color=black></FONT> </P>
<P><INPUT
name="tskill"
style="WIDTH: 226px; HEIGHT: 36px"><FONT
color=black> </FONT>
</P>
</td>
</tr>
<tr>
<td>
<P><STRONG><FONT
color=black>*Non Technical Skill: </FONT> </STRONG>
</P>
</td>
<td>
<P><FONT color=black></FONT> </P>
<P><INPUT
name="ntskill" style="WIDTH: 223px; HEIGHT: 35px"><FONT color=black>
</FONT>
</P>
<P><FONT color=black> </FONT></P>
</td>
</tr>
<tr>
<td>
213
<P><STRONG><FONT
color=black>Achievements: </FONT> </STRONG>
</P>
</td>
<td>
<P><TEXTAREA id=TEXTAREA3
name=achieve></TEXTAREA><FONT
color=black> </FONT></P>
<P><FONT color=black></FONT> </P>
</td>
</tr>
<tr>
<td>
<P><STRONG><FONT
color=black>Experience: </FONT> </STRONG>
</P>
<P><FONT color=black></FONT> </P>
</td>
<td>
<P><FONT color=black> Company
Name:</FONT> <INPUT id="text26" name="company" style="LEFT: 112px; WIDTH:
175px;
TOP: 2px; HEIGHT: 35px"><FONT color=black> Years:
</FONT> <INPUT id="text25" name="yrs" style="WIDTH: 56px; HEIGHT:
31px"><FONT color=black> </FONT>
</P>
<P><FONT color=black></FONT> </P>
</td>
</tr>
<tr>
<td>
<P><STRONG><FONT
color=black>Profile:</FONT></STRONG></P>
</td>
<td><P><TEXTAREA style="LEFT: 9px; TOP: 1850px"
name=profile></TEXTAREA><FONT
color=black> </FONT></P>
<P><FONT
color=black></FONT> </P>
</td>
</tr>
</TABLE>
&nbs
p; &n
bsp;
<INPUT id="submit1" type="submit" value="Submit"
onClick="javascript:return isrequired(form1)">
<CENTER></CENTER></TR></TABLE>
214
</body>
</form>
</html>
3. Postjob.htm
<html>
<head>
<script language="javascript">
function isEmpty(field)
{
if(field.value=="")
{
return true;
}
else
return false;
}
function isvalidemail(f1)
{
emailcheck=f1.value;
var cnt=emailcheck.length;
var n;
//alert(cnt);
for(var i=0;i<cnt;i++)
{
if(emailcheck.substring(i,i+1) == '@')
{
n=i;
i=cnt;
}
}
//alert(n);
//var test=emailcheck.substring(n,cnt)
//alert(test);
if((emailcheck.substring(n,cnt) == "@yahoo.com")|(emailcheck.substring(n,cnt) ==
"@rediffmail.com")|(emailcheck.substring(n,cnt) == "@yahoo.co.in"))
{
return true;
}
else
return false;
}
function isvalidweb(f1)
{
webcheck=f1.value;
// alert(webcheck);
var cnt=webcheck.length;
var n;
215
if(webcheck.substring(0,3) == 'www')
{
n=3;
}
// alert(n);
if(webcheck.substring(n,n+1)=='.')
{// alert("ok");
for(var j=4;j<cnt;j++)
{
if(webcheck.substring(j,j+1)== '.')
{ // alert("ok");
m=j;
m=m+1;
//alert(m);
}
//else
//return false;
}
//alert(m);
if((webcheck.substring(m,cnt) == 'com')|(webcheck.substring(m,cnt) ==
'gov.in')|(webcheck.substring(m,cnt) == 'co.in'))
{
return true;
}
else
return false;
}
}
function isvalidphone(f1)
{
phonecheck=f1.value;
var cnt=phonecheck.length;
var n;
//alert(cnt);
for(var i=0;i<cnt;i++)
{
if(phonecheck.substring(i,i+1)<'0' || phonecheck.substring(i,i+1)>'9' )
{
return false;
}
else
return true;
}
}
function isrequired(form1)
{ var empty=false;
var pass=false;
var email=false;
216
var phone=false;
var web=false;
if(isEmpty(form1.vcode))
{
alert("The vacancy code field is required,Please fill it in");
empty=true;
//form1.firstname.focus();
}
if(isEmpty(form1.company))
{
alert("The company field is required,Please fill ");
empty=true;
// form1.lastname.focus();
}
if(isEmpty(form1.loc))
{
alert("The Location field is required,Please fill it in ");
empty=true;
// form1.lastname.focus();
}
if(isEmpty(form1.skill))
{
alert("Please enter skill requires");
empty=true;
// form1.lastname.focus();
}
if(isEmpty(form1.cperson))
{
alert("Please fill it in contact person name");
empty=true;
// form1.lastname.focus();
}
if(isEmpty(form1.post))
{
alert("Please fill your post");
empty=true;
}
if(isEmpty(form1.phone))
{
alert("Please enter your Phone no");
empty=true;
}
else
phone=true;
if(phone==true && isvalidphone(form1.phone))
{
phone=false;
}
217
else
{
alert("Enter proper phone number");
}
if(isEmpty(form1.email))
{
alert("The email field is required,Please fill it in");
empty=true;
}
else
email=true;
if(email==true && isvalidemail(form1.email))
{
email=false;
}
else
alert("Invlaid email");
if(isEmpty(form1.website))
{
alert("Please enter your company's website");
empty=true;
}
else
web=true;
if(web==true && isvalidweb(form1.website))
{
web=false;
}
else
alert("Please enter proper website");
</script>
</head>
<form name=form1 method="get" action="http://localhost:8081/servlet/insertjob" >
<BODY bgcolor=lightskyblue>
218
<TABLE bgColor=lightskyblue border=1 cellPadding=0 cellSpacing=0
width="100%" background="" borderColor=black borderColorLight=black style="LEFT:
10px; TOP: 19px">
<TR><TD width="50%"><pre><STRONG><FONT color=blue size=6>Online
Resume
Builder</FONT></STRONG></pre></TD>
<TD><IMG src ="images.jpg" style="HEIGHT: 129px; WIDTH: 357px"
width=100></TD>
<TR>
<TD colspan=2> <FONT
color=lime size=5> <FONT color=black
style="BACKGROUND-COLOR: dodgerblue">Home
Resume
Creation Post Job
</FONT>
</FONT></TD></TR></TABLE>
<TABLE align=left bgColor=lightskyblue border=0 borderColor=black
borderColorLight=black cellPadding=1 cellSpacing=1 background="" width="70%"
style="HEIGHT: 346px; WIDTH: 460px">
<TR>
<TD colSpan=2>
<H2><FONT color=mediumblue
style="BACKGROUND-COLOR: dodgerblue">Fill the following
details</FONT>
</H2> </TD>
</TR>
<TR>
<TD>Vacancy Code:</TD>
<TD><INPUT name=vcode style="HEIGHT: 22px; LEFT: 1px; TOP: 2px; WIDTH:
173px"
></TD></TR>
<TR>
<TD> Company</TD>
<TD><INPUT name=company
style="HEIGHT: 22px; WIDTH: 172px"></TD></TR>
<TR>
<TD>Location:</TD>
<TD><INPUT name=loc
style="HEIGHT: 22px; WIDTH: 169px"></TD></TR>
<TR>
<TD> Post:</TD>
<TD><INPUT name=post style="HEIGHT: 22px; LEFT: 1px; TOP: 2px; WIDTH:
173px"
></TD></TR>
<TR>
<TD>Key Skills:</TD>
<TD><INPUT name=skill
style="HEIGHT: 22px; WIDTH: 169px"></TD></TR>
219
<TR>
<TD>Contact Person:</TD>
<TD><INPUT name=cperson
style="HEIGHT: 22px; WIDTH: 172px"></TD></TR>
<TR>
<TD>Contact No.:</TD>
<TD><INPUT name=phone
style="FILTER: ; HEIGHT: 22px; WIDTH: 169px"></TD></TR>
<TR>
<TD>E-Mail:</TD>
<TD>
<P><INPUT name=email style="HEIGHT: 22px; WIDTH: 233px"
></P></TD></TR>
<TR>
<TD>
Web Site:
</TD>
<TD><INPUT id=text2 name=website
style="HEIGHT: 22px; WIDTH: 231px">
</TD>
</TR>
<TR>
<TD>Exp Requ:</TD><TD><INPUT name=exp
style="HEIGHT: 22px; WIDTH: 164px">
</TD>
</TR>
<TR>
<TD
colSpan=2>
&nbs
p; &n
bsp;
<INPUT align=absMiddle id=submit1 style="LEFT: 165px; TOP: 4px" type=submit
value=Submit onClick="javascript:isrequired(this.form)"></TD>
</TR></TABLE>
</BODY>
</form>
</html>
220
11.QUICK REFERENCE
JSP
Session.getValue() Same as servlets Same as servlet
Session.putValue()
ASP
Session(“name”,value) Response.Cookies(“name”,val) Response.redirect(url)
Value=Session.(“name”) Val=Request.Cookies(“name”)
221
12.COMPARISON
It can be concluded from above comparison that it completely depends on type of web
application you are designing,if you desire to use Microsoft technology,implement it in ASP
else if it has to be both platform and server independent,use JSP/SERVLET
222
SCREEN SHOTS
Home Page (Register.htm)
New User -This link will display registration form for a jobseeker.
New User -This link will display registration form for a jobprovider.
223
Job Seeker Registration Form (Jobseeker.htm)
The students have to first register themselves giving their personal information so
they can maintain an account in the system. Once registered, they can login and choose any
of the task mentioned below
224
Job Provider Registration Form (Jobproivder.htm)
Job providers also have to register into the system in the same way as job seekers and
maintain account with system to be able to post jobs and do some similar tasks
225
Resume Creation Form
Registered users can create their resumes by filling the form and once their resume is
created,they can either
Edit Reume
View Resume
226
227
228
Posting Job Form (Postjob.htm)
Job provider can post by giving its details like Vacancy code,Company,Location,Last date for
applying etc.
229
If unregistered users try to create resume or post a job by clicking on links Resume Creation
or Post Job from Home Page, he will be redirected to below shown web pages.
230
BIBILIOGRAPHY
PERL/CGI
JAVA SERVLETS
JSP
JSP in 24 hours
ASP
231