Project on Online Job Portal by Anujak124

VIEWS: 7,418 PAGES: 222

More Info
									                                                  Findsjob.com



                                             Table of Contents

   Chapter 1 INTRODUCTION ............................................................................... 4

  OBJECTIVE ............................................................................................................. 5

  1.1 The Title of the Project ................................................................................... 7

   Chapter 2: SYSTEM ANALYSIS ............................ Error! Bookmark not defined.

  2.1 Problem Definition: .......................................... Error! Bookmark not defined.

  2.2 Preliminary Investigation: ............................... Error! Bookmark not defined.

  2.2 Feasibility Study: .......................................... Error! Bookmark not defined.

  2.3 Project Planning & Scheduling ...................... Error! Bookmark not defined.

       2.3.1 Project Planning
…………………………………………………….Error! Bookmark not defined.2.3.2
Project Scheduling …………………………………………… ………30

  2.4 Requirement Specifications ............................ Error! Bookmark not defined.


  2.5 SOFTWARE REQUIREMENT SPECIFICATION .. Error! Bookmark not

  defined.


     2.5.1         Data Flow Diagram ............................. Error! Bookmark not defined.

     2.5.2          Entity Relationship Diagram ........................................................ 50


  Chapter 3:Module Description ................................. Error! Bookmark not defined.

  Chapeter 4: DATA STRUCTURE/TABLE DESIGN…………………………….55

        4.1 USER INTERFACE DESIGN ………………………………………62
   Chapter 5: CODING ................................................. Error! Bookmark not defined.


Vaibhav Arora (073210170)                  Nitin Kumar (073702732) Pawan Kumar(073701271)                                     1
                                            Findsjob.com


   Chapter 6: Testing ...................................................... Error! Bookmark not defined.

   6.1 System Security .................................................... Error! Bookmark not defined.

   6.2 Report ………………………………………………………………………..214

Chapter 7 Future Scope : ……………………………………………………..221

Chapter 8: Bibliography............................................. Error! Bookmark not defined.




                                   INTRODUCTION


Vaibhav Arora (073210170)             Nitin Kumar (073702732) Pawan Kumar(073701271)                        2
                               Findsjob.com



      The Project Entitled “Findsjob.com”” is the proposed system to
provide help to the job seeker and employers. It provides full support to
the job finding in India. The job seeker and employers both face a lot of
problem in their finding matching jobs due to lack of knowledge about
concerned area. As     the name suggest this acts as finds job for those
user who are going to a find job in particular area and want some initial
knowledge about the different companies. The difference between those
of manual job search and this job search is that it is in electronic form
and quite interactive than the manual searching of jobs. Another
difference is that it is cheaper and full-supportive than that manual job
search.
       “Findsjob.com”” is an automated web based Computerized
System which can gives full knowledge about each type of jobs and
companies. This Information may be about jobs type, company name and
details information about it, and particular employers. It provides the
guidance in the electronic form to the job seeker who is confused initially
about their interested jobs.
  As the Help given to the job seeker and employer in India by this
system is concerned, It provides complete detail about all the popular
companies in India.
      In this portal the job seeder and employers both register with this
portal and after that can see the details information regarding their
areas. The job seeker firstly signup your self with the portal and then
they get username and password by which he fill up all the details in the
portal. And also insert his resume which provides all details about the
job seeker and his area. And whenever his resume matches with any job
the admin send the email or contact by phone with the job seeker.


      And employer also register with the portal and they are look for the
resume of job seeker. And the portal administrator set the particular

Vaibhav Arora (073210170)   Nitin Kumar (073702732) Pawan Kumar(073701271)    3
                                   Findsjob.com


amount of many for resume on the number of resume. Before the looking
of resume he contact to the admin that I have need of how many resume.
       In this portal, we can also search for the job according the given
criteria and can apply for the job. And the job seeker get the email of the
job when match the resume with the jobs.
       This job portal have good security and good service of the job
because user have only access the portal not can change any thing only
can change information about your and update resume. And I giving
facility of login with the help of username & password.




                            OBJECTIVE


   The system named “Findsjob.com”” works like automated job
searching which help in searching of good job to the job seeker and
searching for a good resume to the employers. The main goal of the
system is to motivate and give good service of the job seeker so that the
employer and job seeker access this portal and find out the well service
in India. so that no one could face the problem while searching of job in
any where in India. Additionally this project following set of objective:
      This system aims to provide complete information about all the
       jobs and company related your profile in the country.
      This system provides all the detail about each and every jobs in
       every   areas   like     call   centre,   IT   software   and   hardware,
       management, export/ import and so on.
      This portal gives the good service for the job seeker. He can find job
       according his profile.


Vaibhav Arora (073210170)     Nitin Kumar (073702732) Pawan Kumar(073701271)       4
                                 Findsjob.com


      Employer can also find the resume according his profile in very
       less amount of money.
       All the job details will be sending in the email address of the job
       seeker.
      Job seeker can update your details when ever he want and can
       save new details.
      This portal has good security and service.


      This system provides the facilities of the advertisement so that the
       interested person /company can give there advertisement in this
       website.
      The    administrator     handles   all   the   works     regarding   the
       advertisement. Different type of Report will be generated like no of
       job and how many resume give to the particular company and so
       on.


      This system has provided the search facilities so that a user, if
       wants to find quick information then he will get desired
       information quickly.


      As this system is in the category of public system but to make it
       safe   and   secure    from   unauthorized     changes    administrator
       passwords are provided. Any one who wants to access the site
       through administrator has to be authenticated properly.




Vaibhav Arora (073210170)     Nitin Kumar (073702732) Pawan Kumar(073701271)      5
                               Findsjob.com




                    1.1 The Title of the Project




            FINDSJOB.COM




Vaibhav Arora (073210170)   Nitin Kumar (073702732) Pawan Kumar(073701271)   6
                               Findsjob.com




                   Problem Definition
                   Preliminary Investigation
                   Feasibility Study
                   Project Planning & Scheduling
                   Requirement Specifications




Vaibhav Arora (073210170)   Nitin Kumar (073702732) Pawan Kumar(073701271)   7
                                Findsjob.com




                                Problem Definition


Now a day, we know that searching of jobs is so difficult in proficient
areas. The website “Findsjob.com”” developed for the providing the
simple and good job searching by this portal. With the help of this portal
easily the job seeker can submit their resume and get the lot of
opportunity of the job related to their profile. And by this website the
companies or employer can also find the good and well profiled resume.
       Finding all of this initial and useful information manually has
following difficulties:
      It is quite difficult to find information about the job offered by the
       company. Manually it is very difficult.
      Manual information is not so interactive and common to every one.
       Manual information varies from one man to other.
      Computerized system provides information about every jobs in full
       details interactively.
      Most of the manual information may go wrong and useless thus
       not reliable.
      Computerized system will provide exact and useful thus reliable
       information.
      Information in computerized system is updated time to time thus it
       contains current information every time.
      Manual system cannot have huge information about a particular
       area like type of job, about the company, about vacancy, about
       employers etc.

Vaibhav Arora (073210170)   Nitin Kumar (073702732) Pawan Kumar(073701271)      8
                                 Findsjob.com



Problem identification is very first step of system analysis. The analyst
meets with the customer and the end user. Here in our case both
customers are the companies and user of their products. In this step, we
are interested to understand the product’s objective and defined the
goals required to meet the objective. After identifying overall goals, we
moved    towards    evaluation    of   supplementary   information   during
preliminary investigation. We also focused on “does the technology exit to
build the system?” and “what bounds have been placed on costs and
schedule”. To perform it we scanned followings:
                   The performance of the system
                   The information being supplied and its form
                   The economy of processing
                   The control of the information processing
                   The efficiency of the existing system
                   The security of the data & software




Identification of Need:-Each of the past three centuries has been
dominated by a single technology. The eighteenth century was the time of
the great mechanical systems accompanying the Industrial Revolution.
The nineteenth century was the age of system engine. During the
twentieth century, the key technology has been information gathering,
processing and distribution. We have seen the birth and surprising
growth of Computer Industry.
           As we more towards the final years of this century, the
differences between collecting transporting, storing and processing
information are quickly disappearing. Computers have played a major
role in all these areas.



Vaibhav Arora (073210170)   Nitin Kumar (073702732) Pawan Kumar(073701271)    9
                                 Findsjob.com


              In    twentieth   century     which   was   the   era   of   major
development work in computer industries; it was told that a computer
can do all the tasks that have not been done ever. There were great
problems to be faced without computer in any application area. When
computer’s involvement came in those applications, it created the great
working environment for the users to make efficient effort to solve any
sorts of problems.
             In    the   past   twentieth   century;   although   there    were
applications working with the help of computers but these but the
communication between people was manual in that sense. Now the
major concern was how to make the communication between the people
fast. People thought that computers had made every task fast by
converting them from manual to computerized. They thought to make the
involvement of computers in communication. It took the revolution of
communication and went through industry wise.
Then, there came another type of industry world-wide. It was named IT
(Information Technology) industry. In the last decade of twentieth
century there happened a surprising growth in IT industry. And the new
coming era (that is twenty first century) is known as Information
Technology Era.
            In the twenty first century there have been come an era of
Computer oriented communication that is also known as Internet.
Earlier, there were a lot of problem in the world-wide communication and
sending large amount of data through other communication-model. Now
a day we can communicate with any one in any area of the world with no
confusion of inter-language changing.
For example, this project named “Findsjob.com”which is a web-based
application can run through Internet and any one in the world can
access it through its URL.




Vaibhav Arora (073210170)    Nitin Kumar (073702732) Pawan Kumar(073701271)        10
                               Findsjob.com


           Do we know that what is the difference between the task
performed through manual system and the task performed through a
computerized system?




Yes, the major difference is the speed through which the task has been
performed. We can perform the task through computerized system so
fast.
               Let I list the main problem associated with manual system
as follows:


       Manual system is a time consuming process and it may or may not
        be feasible.
       It is not possible to find the services of a manual system in low
        cost. It means a manual system is too expensive also.
       It is quite difficult to handle the task manually and it is not
        possible to handle multiple users in the sense if they want the
        services at the same time.




Preliminary Investigation:-This is the first phase of a brief survey of the
areas involved and will result in taking the project into next phase,
postponing development for a period or recommending that no further
action be taken. Sometimes it is subdivided into a preliminary
investigation followed by a more detailed feasibility study. The phase


Vaibhav Arora (073210170)   Nitin Kumar (073702732) Pawan Kumar(073701271)    11
                               Findsjob.com


initiated by management, who perceives the need because of changes or
expected changes in the business environment, limitations or failure of
existing systems or the awareness of technological advances relating to
the particular area involved in particular systems, which competitors are
developing.
       The project entitled “Findsjob.com”is a web based application so
the survey involved for this application is not in the common manner.
The survey for this project has been done in something different manner
as follows:
      First of all many websites have been accessed and the actions are
       taken according to those survey.


          Information systems projects’ originate for many reasons: to
achieve greater speed in processing data, better accuracy and improved
consistency, faster information retrieval, investigation of business areas,
reduced cost and better security. The sources also vary. Project
proposals originate with the department manager, senior executive and
system analysts. Sometimes the real origin is an outside source, such as
a government agency, which stipulates a systems requirement the
organization must meet. When the request is made, the first systems
activity, the preliminary investigation, begins. The activity has three
parts: request clarification, feasibility study and request approval.




Vaibhav Arora (073210170)   Nitin Kumar (073702732) Pawan Kumar(073701271)    12
                               Findsjob.com


Clarification of Project: -This phase involves estimating whether or not
a development project is worthwhile. Problems with the current
automated or manual system are identified, as well as the benefits and
costs of an alternative system. If the benefits seem to outweigh the costs,
a green signal may be given to continue the project, and detailed plans
and schedules are drafted for making the system a reality.


The proposed solution to the user’s problem may involve something
between dramatic change and slight change to the present system. If the
present system is manual and a computer system is proposed, the
development project will probably be very large. At the other extreme are
small development projects that represent slight changes to existing,
such as sorting information in a different way or inserting subtotals or
adding new columns to a report.
Preliminary investigation is done as the very first step of the analysis
phase after problem defining the problem.
The problem takes place when the present system is going to be changed.
But there is much difference between dramatic change and slight change
to the present system. If the present system is manual and a computer
system is proposed, the development project will probably be very large.
At the other extreme are small development projects that represent slight
changes to existing, such as sorting information in a different way or
inserting subtotals or adding new columns to a report.
   As this project entitled “Findsjob.com”is a web application and
there are no dramatic changes or big changes from manual system
to computerized system because with the help of this project the
job seeker submit the resume in this website and employer visit the
resume and payment to administrator.
The objectives of this phase are:




Vaibhav Arora (073210170)   Nitin Kumar (073702732) Pawan Kumar(073701271)    13
                                 Findsjob.com


      To determine the feasibility of computerization of a particular
       system or area of operation. As this project has been made
       computerized to motivate the customer and provide the facility to
       use internet to purchase the item from the market to save the time
       and efforts. So it is quite difficult to make decision for it.


      To define clearly the objectives, scope and limitation of the project.
            It is the most important task to know; that what are the
   expectations of the user from the proposed system. Taking the
   example of this project; the users want to get more and more
   information from this project about the particular customer place.
      To establish a good working relationship between the user
       department and the data processing department.
                            The above set of statements is mainly focusing
   on the user interfaces. So in this project I have created good interface
   of user with the system so that the user could not face any problems
   due to any bad interface.
      To acquaint user management with the approach and method of
       work system development. User management is concerned with the
       security of the system. Accidental data loss could not happen; for
       this the project is secured to its best possibility.
      To estimate the resources required for system development, live
       running and maintenance. Looking up the resources required for
       the project is very important thing to concern about. So, proper
       project planning has been done for this project.
      To identify the likely benefits which should accrue from the
       introduction of the system? For this the cost benefit analysis are
       done to rectify the benefits of the project.
   During this phase, which should be as short as possible, the systems
   analyst will be concerned with:


Vaibhav Arora (073210170)     Nitin Kumar (073702732) Pawan Kumar(073701271)    14
                                Findsjob.com




   1. How the present system works?
   2. The staffing levels involved their grades and duties.
   3. The volume of work: statistics on the various types of transaction,
      level of overtime working, employment of casual staff, etc.
   4. Any current backlog of work and any seasonal influences on the
      workload.
   5. The time taken to process data through the system, delay in
      issuing management report etc.
   6. Lists of all documents, files and reports associated with the
      system.
   7. Interfaces with other systems.


   An initial study calls for learning as much as possible about the
   proposed project. At this early point in the project, rough estimates
   are made of the following:
            Expected outputs of the system.
            Available/present inputs for the system.
            Time required completing the changes.
            Major Feasibility study of such changes.


                    During      the   preparation   of   the   initial   study
   information must be gathered from many sources. Within the
   organization, information is gathered from users, managers and
   system developers. Users and managers must be interviewed to find
   out what they need from the system. System developers have a wealth
   of knowledge of the organization’s current capabilities and operations
   in terms of providing inputs to the system. External information is
   also critical for determining what new possibilities are offered by
   vendors in terms of systems available and programs for providing


Vaibhav Arora (073210170)   Nitin Kumar (073702732) Pawan Kumar(073701271)       15
                               Findsjob.com


   specific types of output. New technologies and developments any allow
   faster processing, more storage, and than ever before.




               For    the    project   entitled    “Findsjob.com”I      have
   gathered information from the following sources:
         Accessing the Internet to gather the information about the
          system mainly the function implementation.
         Searching the similar websites to watch there structure and
          make the same with extended and improved functionality.


   At this point in the project, it is usually very difficult and expensive to
   specify system characteristics accurately. Often it is impossible to be
   precise without actually doing, much of the proposed work – including
   extensive interviewing of users and very detailed studding of
   procedures. A quick guess about the system’s characteristics is all
   that is needed at this point.


   To develop a rough plan of the outputs of the proposed system, brief
   interviews are held with the intended users. These interviews result in
   short descriptions of how the outputs with are displayed or printed on
   video displays or printed in reports. The inputs required to produce
   the required outputs must be listed and the sources of these inputs
   determined. It is important to discover if new files will have to be
   created or sources of information developed, or if the inputs are
   already gathered and stored in the current system.


Vaibhav Arora (073210170)   Nitin Kumar (073702732) Pawan Kumar(073701271)       16
                                  Findsjob.com


   A tentative, general schedule for developing the system should be
   described. It is determined by the users and the developers and must
   take into account the urgency of the business need and limited
   scheduling resources of the developers.




   Feasibility Study: - Once, a preliminary part of application has been
   identified it may then e subjected to a more rigorous phase of analysis
   is started. This part is known as feasibility study. This is the step to
   determine exactly what the proposed system is to do by defining its
   expected performances.
      The proposed system named “Findsjob.com” is a web based
   application which is feasible or not is subject of matter. In real sense
   let us first understand that what feasibility study is?
                 Feasibility study is to determine that the proposed system
   is feasible or not. The term feasible is to determine the worthiness of
   the project. The process followed in making this determination is
   called a feasibility study. This type of study determines if a project can
   and should be taken. Once it has been determined that a project is
   feasible,   the   analyst    can   go   ahead and     prepare     the project
   specification     which     finalizes   project   requirements.    Generally,
   feasibility studies are undertaken within tight time constraints and
   normally culminate in written and oral feasibility report. The contents
   and recommendation of such a study will be used and as a sound
   basis for deciding whether to proceed postpone or cancel the project.
   Thus, since the feasibility study may lead to the commitment of large
Vaibhav Arora (073210170)      Nitin Kumar (073702732) Pawan Kumar(073701271)      17
                                Findsjob.com


   resources, it becomes necessary that it should be conducted
   competently and that no fundamental error of judgment is made.
          This system which is a job based system is going to motivate
   the job seeker and employer. Every one wants to know that the
   system to be made will be worthy or not. By determining there worthy
   ness and need we decide that the proposed system is worth-doing.
            Now, let us see what are the basic steps involved to
   determine the worthiness of the system.




   Different Type of Feasibility: -


   To determine that a particular project is feasible or not we have to
   follow mainly seven steps. It means there are seven types of feasibility
   study. In the conduct of the feasibility study, the analyst will usually
   consider seven distinct, but inter- related types of feasibility. They are
   as follow:


   1. Technical Feasibility
   2. Operational Feasibility
   3. Economic Feasibility
   4. Social Feasibility
   5. Management Feasibility
   6. Legal Feasibility
   7. Time Feasibility


      Let I explain every one of these seven feasibility study regarding my
      project.


Vaibhav Arora (073210170)   Nitin Kumar (073702732) Pawan Kumar(073701271)      18
                               Findsjob.com




                     1. Technical Feasibility :-


      Technical feasibility study is concerned with specifying equipment
      and software that will successfully satisfy the user requirement;
      the technical needs of the system may vary considerably, but
      might include:


       The facility to produce outputs in a given time.
            My project is a web based application which is based on
      client-server based application. In this application every page as
      output is render from server to client so it is necessary that the
      page should be rendered in time. For this I have avoided more and
      more code in the page- load event.
       Response time under certain conditions.
              The certain conditions are to determine by which the
      system can be slow and the response time of the system may be
      too poor. To improve the response time of the system I have used
      the AJAX control which can modify the content without sending
      the request page to the server.
       Ability to process a certain volume of transaction at a particular
         speed.
                  “Findsjob.com”is having such feature to improve the
      speed-up for large volume of transacted data.


       Facility to communicate data to distant location.
               “Findsjob.com”is the web based application hence can be
      easily deployed on Internet and can be accessed any where trough-
      out the world.
Vaibhav Arora (073210170)   Nitin Kumar (073702732) Pawan Kumar(073701271)   19
                                Findsjob.com




      In examine technical feasibility; configuration of the system is
      given more importance than the actual make of hardware. The
      configuration should give the complete picture about the system’s
      requirement: How many workstations are required, how these
      units   are   interconnected    so   that   they   could   operate   and
      communicate smoothly. What speeds of input and output should
      be achieved at particular quality of printing. This can be used as a
      basis for the tender document against which dealers and
      manufacturers can later make their equipment bids. Specific
      hardware and software products can then be evaluated keeping in
      view with the logical needs.


      As the feasibility stage, it is desired that two or three different
      configurations will be pursued that specify the key technical
      requirements but which represent different levels of ambition and
      cost. Investigation of these technical alternatives can be aided by
      approaching a range of suppliers for preliminary discussions. Out
      of all types of feasibility, technical feasibility generally is the most
      difficult to determine.




      2. Operational Feasibility: -


      Operation feasibility is used to check whether the project is
      operationally feasible or not. My project is mainly different from the
      other system because of its web-support feature. So the measure
      for operational feasibility is something different from other system.
      Generally the operational feasibility is related to organization
      aspects. The points to be considered for operational are:


Vaibhav Arora (073210170)   Nitin Kumar (073702732) Pawan Kumar(073701271)       20
                               Findsjob.com


       Which type’s alternation, we may bring with the system?
             The change determination is as such that early product were
      either a man or group of men or the jobs based manual but now a
      day with the advent of Internet technology.       We can access the
      Internet and can know about any new product or order product in
      the market.
      What organizational structures are distributed?
       What new skills will be required? Do the existing staff members
         have these skills? If not, can they be trained in due course of
         time?
      “Findsjob.com” is a Networked based application so easily
      distributed but there is quite important difference between
      networked and distributed application. But now it is not the term
      to differentiate between them.


                            Generally project will not be rejected simply
      because of operational infeasibility but such considerations are
      likely to critically affect the nature and scope of the eventual
      recommendations. This feasibility study is carried out by a small
      group of people who are familiar with information system
      techniques, who understand the parts of the business that are
      relevant to the project and are skilled in the system analysis and
      design process.




         3. Economical Feasibility:-


      Economical feasibility is the measure to determine the cost and
      benefit of the proposed system. A project is economical feasible
      which is under the estimated cost for its development. These
      benefits and costs may be tangible or intangible. Because of
Vaibhav Arora (073210170)   Nitin Kumar (073702732) Pawan Kumar(073701271)   21
                               Findsjob.com


      between the types of costs, it is sometimes very difficult to decide if
      the benefits outweigh the costs.
      Tangible benefits may include decreasing salary costs, preventing
      costly but frequent errors, and sending bills earlier in the month
      and increasing control over inventory levels. Such benefits may be
      directly estimated in rupees without much trouble. Intangible
      benefits may include increasing quality of goods produced,
      upgrading or creating new customer services, reducing repetitive or
      monotonous     work    for   employees,   and    developing    a   better
      understanding of the market. Such benefits may be much more
      important than tangible benefits, but they may be ignored because
      estimating their rupee values involves pure guesswork.
                    Tangible costs are easily estimated. They include the
      one-time cost of developing the system and the continuous costs of
      operating the system. The intangible costs are not easily estimated
      thus to determine them we have to make extra effort.
                   “Findsjob.com”is the cost-effective project in which
      there is less possibility of intangible cost so there is no difficulty to
      determine the cost of the project.
                 The economic and financial questions raised by analysts
      during the preliminary investigation seek estimates of:


       The cost to spent or estimated for the conduction the
         investigation process of system.
               To determine the cost of investigation of this project we
      can estimate the cost of accessing the Internet to get information.
       The cost of hardware and software for the class of application
         being considered.
            “Findsjob.com”is made-up on .Net framework and in the
      presence of Windows-XP (service pack 3) and in the availability of 2
      GB RAM. So the cost is easily determinable.
Vaibhav Arora (073210170)   Nitin Kumar (073702732) Pawan Kumar(073701271)        22
                               Findsjob.com


       The benefits in the form of reduced costs or fewer costly errors.
       The cost if nothing changes that mean system is not developed.


      Cost and benefits estimates on each provide a basis for
      determining which projects are most worthy of consideration. Each
      estimate can be analyzed to determine how rapidly costs are
      recovered by benefits, to calculate both the ratio of benefits to
      costs. All of these factors are considered when developing an
      overall sense of the project’s economic feasibility.




         4. Social Feasibility:-


      Social feasibility is a determination of whether a proposed project
      will be acceptable to the people or not. This determination typically
      examines the probability of the project accepted by the group
      directly affected by the proposed system change.
      The project entitled “Findsjob.com”may be told as people service
      website so there is no interruption for the social harassment. The
      people will appreciate it because of its social work.


       5. Management Feasibility:-
      It is told that a system is manageable then it cannot be
      disadvantageous because of good management for it. Management
      feasibility is a determination of whether a proposed project will be
      acceptable to management .if does not accept a project or gives a
      negligible support to it; the analyst will tend to view the project as
      a non-feasible one. “Findsjob.com”is the well-managed project
      and can be managed in any situation.


Vaibhav Arora (073210170)   Nitin Kumar (073702732) Pawan Kumar(073701271)     23
                                Findsjob.com


      6. Legal Feasibility:-
      Legal feasibility is a determination of whether a proposed project
      infringes on known Acts Statutes, as well as any pending
      legislation. Although in some instances the project might appear
      sound, on closer investigation it may be found to infringe on
      several legal areas.


       7. Time Feasibility:-
      Time feasibility is a determination of whether a proposed project
      can be implemented fully within a stipulated time frame. If a
      project takes too much time it is likely to be rejected.
                     In the large organization the time for every project is
      determined first by considering the resources available for the
      project and then milestones are estimated. I have done the same in
      my project which will be discussed in later unit named scheduling
      technique.
         To be judged feasible, a project proposal must pass all the
      above tests. Otherwise, it is not a feasible project. For example,
      personnel    record    system    that   is   financially   feasible   and
      operationally attractive, is not feasible if the necessary technology
      does not exist.




   Feasibility Study Report:-


   The output from this phase is a formal report called a feasibility
   report or System Study Report. This report may contain:


    An introduction, which puts the report in perspective and perhaps
      quotes the terms of reference.
    The objectives for the system.
Vaibhav Arora (073210170)    Nitin Kumar (073702732) Pawan Kumar(073701271)       24
                                 Findsjob.com


    A commentary on how the present system achieves or fails to
      achieve those objectives.
    Interface with other system and the implications of these
      interfaces.
    Present operating costs and conditions including organization
      structure and staffing levels.
    A first estimate of system development time and a related draft
      implementation timetable.
    A schedule of the hardware and other requirement, e.g. availability
      of system at weekends.
    Expected benefits, which will accrue from the use of a new system.
    A cost benefits projections.
    Conclusions and recommendations.


   The study report also covers the following four areas for management:
   1. Recommendations for changing the present system: After analyzing
      all the pros and cons of each project proposal, recommendations
      for changes are made.
   2. Effects on operations: If it is recommended to develop of change a
      system, the report must describe how the system or the changes
      will affect current operations.




   3. Effect on personnel: The effect of the new or changed system on
      people’s   jobs   should    be    carefully   described.   This   includes
      everything from possible resistance to the new technology or
      differences in how employees enjoy their work.
   4. Details of the changes: All of the detailed information from
      interview, preliminary cost and benefits estimations and other
      analysis should be include.


Vaibhav Arora (073210170)   Nitin Kumar (073702732) Pawan Kumar(073701271)         25
                               Findsjob.com


   Working paper and flow charts normally supports the report. It is
   then up to senior management to decide whether the system should
   advance to the next stage of the systems development life cycle.




                                            Project Planning
                                            Project Scheduling




Vaibhav Arora (073210170)   Nitin Kumar (073702732) Pawan Kumar(073701271)   26
                               Findsjob.com


Project Planning and Controlling: - project planning and controlling is
performed basically in the large organization where it requires effective
management to control and to find the desired result.
               Project planning for an organization has following steps:
    Acquiring and organizing the tools and resources for the project
    Preparation of well-defined schedule for events of the project
    Proper evaluation of progress of project development.
    Establishing various standards for the project by which we can
      find the standard output.


This Project named “Findsjob.com” has been going through this type of
project plan. Let us understand it in brief.
  We had the time of two month for the project preparation thus within
this duration I had to estimate every thing to prepare this project.
According to the first step I acquired the resources and organize them in
well-defined manner so that there I should not face any problem.
         The second thing is distributing the time stamp into small time
unit according to the module of the project. This is the term as schedule
the task according to the event happened in the project. I distributed the
time into different module of the whole part of project development.
Evaluating the progress of project development is to measure the
functionality of the project by comparing with the requirement criteria. It
is told that you can not do anything if you have not properly measure the
task which you are going to do.
             “Findsjob.com” is a project which has every thing in it so
the proper project plan is much necessary. Initially, the project must
establish the objectives of each phase of development. Each phase must
be of a controllable size, and every task within the project must be
performed with responsibility. I first established the objectives of each
phase and at last I guessed that the objectives that have been
established are met in the proper time.
Vaibhav Arora (073210170)   Nitin Kumar (073702732) Pawan Kumar(073701271)    27
                               Findsjob.com




Software Project Plan:- Planning is very important in every aspect of
development work. Well versed person carefully monitor developments at
various phases. Improper planning leads to failure.
         If you want to make your project successful, you should plan
the things for your project in more proper manner.
   There are the following steps involved in project plan which would be
discussed regarding my project.


Select the project:- Do we know that what are the things by looking up
them we decide to develop the project. First the problem comes in front of
us and then we consider the things for our convenience. For example I
considered about the s that help the user in their jobs. I thought if the
thing is implemented computerized then it will be looking up something
different. And, because every one wants to be comfortable I decided to do
the project which help to the job seeker and employer and also to the
owner of the web site. Although it
Was limited to the difficulties to searching matching jobs and interview
information’s; I named it “Findsjob.com”.
                    Once I decided to do the project on this topic I called
my project to gather complete requirement and specification. Once every
thing got feasible and we gathered the information to start the project
development; I started to do project.
I fixed the milestones and deliverables to estimate the time scheduling.


Estimation of project: - when we are going to start the project
development process, you have to estimate the cost, time, and size of
project. Project estimation involves estimating the following:
            Time


Vaibhav Arora (073210170)   Nitin Kumar (073702732) Pawan Kumar(073701271)    28
                               Findsjob.com


            Cost
            Size
We can also measure and estimate the labor for the project. This is
another thing that every one is not properly estimated then may create
the problems. Estimating time is to estimate the full duration required
for project development. In my project I decided to fit the milestone once
after design of the pages of the project and the creating the data layer.
Second is the cost estimation. Cost estimation is to measure of the cost
required for acquiring and organizing the resources for the project
development.
Resource Allocation: - The resources required for the software project
are first need before starting the project.
      Allocating hardware for the proposed project. For example in this
       project which networked based project so all the network
       supporting hardware are needed for the project. As a primary
       memory At least 2GB RAM is required to give better throughput.


      Most of the web-based applications are client-server model. This
       project named “Findsjob.com”is a web-based application so it
       needs server software and software in client side. This project is
       made-up using .Net so there is a need for the client-server model.
       .Net provides server software to give response. This Server
       software is called Internet Information Server (IIS). The browsers
       like Microsoft Internet Explorer and Netscape Navigator etc. are
       used as client-software. I have used Microsoft Internet Explorer
       6.0


      To develop a project the relevant Information of previous projects
       are very necessary as for as the project to be newly developed is




Vaibhav Arora (073210170)   Nitin Kumar (073702732) Pawan Kumar(073701271)   29
                                Findsjob.com


       concerned. So it is very necessary to know that which type of
       information you need from previous project.


   Risk Management: - whenever one go to develop the project it is
   very necessary that which type of risk may arise with this project,
   what are the main regulations to be followed by which we can get
   away from the risk. Most of the big organizations follow mainly four
   steps in the case of risk management. These four steps are listed as
   follow:
          Risk Avoidance
          Risk Detection
          Risk Control
          Risk Recovery




       As far as my project is concerned I have included these steps in
       my own way. Let us understand that which types of risks can
       come in my project. These risks may be loss of data, expose of
       secret information, security breaks, etc.
       To make the security I have used the password in the admin side
       so that no can access the information that are made secret from
       outside.
                  Thus, to achieve the goal, there should be a strong
       determination and it should always be in one’s mind.
       Consequently, defining the objectives is the first action taken in
       any project. Taking the example of my project, when I selected this
       project entitled “Findsjob.com”with the suggestion of my project-;
       I first finalized the objectives to be achieved with this project. Then
       the other works were performed. This is very necessary to no that
       this project not having the all the features that a jobs based
Vaibhav Arora (073210170)   Nitin Kumar (073702732) Pawan Kumar(073701271)       30
                                Findsjob.com


        project should be but I have done to my best to include all the
        necessary features in this project.




Project Scheduling: - Scheduling of a software project is very necessary
can be correlated to prioritizing the tasks and making the final date of
completion of various tasks with respect to there cost, time and duration.
Scheduling can be done with resource constraint or time constraint in
mind. Depending upon the project, scheduling method can be static or
dynamic. As far as my project is concerned I have something to do better
for my project and as I have the linear approach to develop my project so
I have to scheduling techniques in my project.
.
    This project is an academic project so every thing is to be tested in
the project. For this I have used various scheduling techniques for the
practice purpose we can say.


Scheduling Techniques: - there are various scheduling techniques used
in software engineering for project scheduling. These all are implemented
in my project.
These are as follow:


       Work-Break Down Structure: - this is the scheduling technique
        where the project is scheduled in various phase following the top-

Vaibhav Arora (073210170)   Nitin Kumar (073702732) Pawan Kumar(073701271)   31
                                                                               Findsjob.com


                                  down or bottom-up approach. The tree like structure is followed
                                  without any loop. At each phase or step, milestones and
                                  deliverables are mentioned with respect to requirements. The work
                                  break-down structure shows the overall breakup flow of the project
                                  and does not indicate any parallel flow. The parallel flow of
                                  development can be possible when we need to maintain the
                                  parallelism. This scheduling technique is something like parallel
                                  processing of task but can be done in sequence.
                                                                               As far as my project “Findsjob.com”is
                             concerned I have implement the phases through scheduling technique
                             vary care fully. Let us understand through the diagram as below:



                                                                  Findsjob.com



                                                                                                                                            Maintenance
                                                                                                                 Security
                           Analysis                                                                              Implementation
                                                                                                                                          Functional
                                                                                                                                          Maintenance

Requirement                                                                                                                         Presentatio
Specification                                                                                                                       n Logic
                                                    Design                        Coding               Testing
                                                                                                                               Business            System
     Problem                   Feasibilit                                                                                      Logic               Maintenance
     Definition                y Study
                                                                                                       Unit               System
                                                                                        Presentation   Testing            Testing
           Preliminary                Modular                 User Interface            Logic
           Investigation              Design                  Design

                                                                                                            Integration
                                                                       Business Logic                       Testing
                                                Data Design




                       Fig.                 Work Breakdown Structure:-


                      Vaibhav Arora (073210170)                      Nitin Kumar (073702732) Pawan Kumar(073701271)                                       32
                                 Findsjob.com




Gantt Chart or Time Line Chart:- A Gantt Chart can be developed for
entire project or a separate chart can be developed for each function. A
tabular form is maintained where:
      A Row Indicate the tasks with milestones and,
      A Column indicates the duration in months or weeks.
      The horizontal bar that spans across columns indicate the
       duration of the task.
I have developed here a Gantt Chart only for the analysis part. In the last
of the project documentation a Gantt Chart is shown to indicate the
scheduling of entire project.




GNATT CHART

  Work Tasks                    Week 1          Week 2        Week3
Week4
1.1 Identifying Necessity
Meeting with
Register.dept gov.
identifying Details &
needs
1.2 Defining desired
output/input/control
Defining Validations
Define the functionality
Behavior
Describe modes of
Vaibhav Arora (073210170)   Nitin Kumar (073702732) Pawan Kumar(073701271)    33
                               Findsjob.com


interaction
Research on file
management
Milestone : Software
elements defined
Define Technical
feasibility
Milestone: Technical
feasibility achieved
Creating DFD
Coding
Documentation
Testing

                       Fig. Gantt Chart




              Hardware and software Requirement of the System
              Software Development Paradigm Applied

Vaibhav Arora (073210170)   Nitin Kumar (073702732) Pawan Kumar(073701271)   34
                                 Findsjob.com


              Software Requirement Specification Document for the
               Project.
              Requirement Modeling Techniques
                            Data-flow Diagrams
                          E-R Diagram




 Hardware and Software Requirement of the System


This System i.e. “Findsjob.com”is a web based application software
which perform the activities like Administering, providing information to
job seeker and employer to get information by this system and give better
result to the jobs. The nature of this software to handle a particular task
that’s why it is the category of application software.


                          Client Side Requirements


Software Requirement:-
Browser                          : Any Browser


Vaibhav Arora (073210170)    Nitin Kumar (073702732) Pawan Kumar(073701271)   35
                                Findsjob.com


                          Server side Requirements

Software Requirement:-
Front-End Tool                  : PHP
Back- End Tool                  : MYSQL
Server                          : Apache / IIS


Hardware Requirement:-
Storage                         : 10 MB




                    Software Engineering Paradigm



Problem Solving Approach

      The problem solving approach, which is used for this project, is
“Linear Sequential Model”. This is the simplest model in which each
other an activity starts only when the precious activity has been
completed follow all steps.



The Linear Sequential Model

      The Linear Sequential Model sometimes called the classic life cycle
or the waterfall model; the linear sequential model suggests a systematic,
sequential approach to software development that begins at the system
level and progresses through analysis, design, coding, testing, and
support.
Findsjob.com


     System/Information
     engineering
Vaibhav Arora (073210170) Nitin Kumar (073702732) Pawan Kumar(073701271)
                       Design                                                36
                               Findsjob.com


      Analysis
                                      Code           Test              Implementation




System Information Engineering and Modeling:

      Because software is always part of a larger system, work begins by
establishing requirements for all systems elements and then allocating
some subset of these requirements to software. This system view is
essential when software must interact with other element such as
hardware, software, databases etc.
The analysis encompasses requirements gathering at the system level
with a small amount of top-level design and analysis. Information
engineering      encompasses   requirements   gathering     at   the    strategic
business level and at the business area level.



Software Requirements Analysis:
      The requirements gathering process is intensified and focused
specifically on software. To understand the nature of the program(s) to be
built, the software engineer must understand the information domain for
the software, as well as required function, behavior, performance, and
interface. Requirements for both the system and the software are
documented and reviewed with the customer.


Design:
Software design is actually a multi step process that focuses on four
distinct attributes of a program: data structure, software architecture,
interface representation, and procedural detail. The design process
translates requirements into a representation of the software that can be



Vaibhav Arora (073210170)   Nitin Kumar (073702732) Pawan Kumar(073701271)              37
                                Findsjob.com


assessed for quality before coding begins. Like requirements, the design
is documented and becomes part of the software configuration.


Code Generation:
      The design must be translated into a machine-readable form. The
code generation step performs this task. If design is performed in a
detailed manner, code generation can be accomplishing mechanistically.


Testing:
      Once code has been generated, program testing begins. The testing
process focuses on the logical internals of the software, ensuring that all
statements have been tested, and on the functional externals; that is,
conducting tests to uncover errors and ensure that defined input will
produce actual results that agree with required results.


Support:
      Software will be undoubtedly undergoing change after it is
delivered to the customer. Change will be occur because error have been
encountered, because the software must be adapted to accommodate
changes in its external environments, or because the customer requires
functional   or   performance     enhancements.     Software   support   /
maintenance replies each of the preceding phases to an existing program
rather than a new one.




Vaibhav Arora (073210170)   Nitin Kumar (073702732) Pawan Kumar(073701271)    38
                                 Findsjob.com



        Software Requirement Specification

Software    requirement       specification:    -     we   know   that   software
requirement specification (SRS) is the very important part of the software
development process. This describes the actual or real user level
requirement from technical point of view. I.e. what is the users exactly
wanting. It means that what is the main target or expectation of users
from this project. The objective of preparing the SRS is to represent and
describes all the requirements of the user. It is the main task of system
analysts. The main goal of a system analyst is to prepare the SRS in
such a manner that ultimately leads to successful software specification
      Actually, Software Requirement Specification (SRS) is the outcome
of System Analysis. This is the result of this phase which describes all
the requirements of user in complete and most understandable format.
 The SRS outlines the following information about the project.


         1. Introduction: this is the first section which introduces the
            project with there objective and scope. This section includes
            following sub-section to introduce the project in more
            enhanced manner.
               Purpose: describes the main goal/objectives of the
                project.
               Scope: what is the scope and chances of future
                enhancement of the project are described in this section
               Definition,    Acronyms:       this    sub-section   makes   the
                project more comprehensive.
               Overview: this sub-section summarizes the introduction.
         2. Overall Description:- this section completely describes the
            project. This section also contains sub-sections as follow:



Vaibhav Arora (073210170)   Nitin Kumar (073702732) Pawan Kumar(073701271)          39
                                  Findsjob.com


                  Product Perspective: - this sub-section describes the
                   concerned product.
                  Product Function:- The functionality of the project is
                   described in this part of overall description.




                  User Characteristics: -        this sub-section recognizes the
                   type of user to use the system. What is the main
                   characteristic of user, how they should be interacted
                   through system.
                  Constraints:- Every project have some constraints which
                   should be highlighted otherwise this may create a long-
                   lasted problem in future. This sub-section throws the
                   light on the main constraints of the project.
                  Assumptions and Dependencies: - This sub-section
                   describes the dependency of the system.


            3. .Specific    Requirement:      -     this   section   specifies   the
               requirements of the system/user. The system utilizes the
               overall description to specifies the constraints. This section
               has the following the sub-section.


           Let I prepare a Software Requirement Specification (SRS) for my
project.




Vaibhav Arora (073210170)     Nitin Kumar (073702732) Pawan Kumar(073701271)           40
                                   Findsjob.com




Software Requirement Specification (SRS) Document


Author         :-       Vaibhav Arora.
Application    :-       Findsjob.com
Address        :-       B-342 sec-1 Rohini avantika
                        Delhi - 110085
Introduction: - The project entitled “Findsjob.com” is the a job portal
that keep the jobs details according to the job seeker and employer. This
is a web-based application which can be accessed by the users or any
people through Internet.


                    Purpose: - The main purpose of this project to help the
people who are eager to finds job or the employee want appoint the
employee according to the preferable resume and according to the area..
This project aims to fulfill their all the requirement for tour.


                    Scope:-   By    this   website   we   can   providing   the
information to the user and employer. And find out the better the
performance and smooth working by this website.


Overall Description: - this section of the SRS provides a over all
description of all the related information of the project.


Vaibhav Arora (073210170)     Nitin Kumar (073702732) Pawan Kumar(073701271)      41
                                Findsjob.com


Project Perspective: - this project is a web-based application which can
connect the people all over the world. The main advantage of the project
is that this project supports the advanced network technology like web-
services and ASAX.


Functionality:-    this system performs the function of showing all the
information to the user. It stores the information about the job seeker
which submit the resume by this portal and job employer visit the
resume of the job seeker to appointment the jobs.


User Characteristics: - The user of the system may be novice for the
computers so we have provided him an easy and interactive user-
interface. It is quite interesting to tell that the user can know by looking
up the icons and menus written in English that what has to do.


Database Requirements: - The database requirement of the system is
very important thing. Every system needs data for their process to
produce information. For this, they need an on-line storage to store data
and can retrieve the data as per need.
  To make a physical storage it is very necessary to design the
databases logically. We can implement the database by looking-up the
logical Design of data base.


Design Constraints:-        The system is designed in such a way that it
would be:
            User-friendly
            Interactive
            Easy Maintainable
            Easy to Handle etc.




Vaibhav Arora (073210170)    Nitin Kumar (073702732) Pawan Kumar(073701271)    42
                               Findsjob.com


My project is following every thing listed above in the designed
constraint.


Comments: - This system works as a jobs finder by which you get the
information of the jobs in electronic form that can be accessed any
where, any time, and in any condition through Internet.




              DATA FLOW DIAGRAM (DFD)


   An information moves through software, it is modified by a series of
   transformations. Data flow diagram is a graphical technique that
   depicts information flow and the transforms are as data move from
   input to output. The basic form of a DFD is also known as data flow
   graph or a bubble chart. The DFD serve two purposes:


    a. to provide and indication of how data are transform as they move
         through the system
    b. to depict the functions that transform that data flow
   The DFD provides additional information that is used during the
   analysis of information domain and serve as a basis for the modeling
   of function.
   Basic notations, which used to create DFD, are as follows:
   RECTANGLE




Vaibhav Arora (073210170)   Nitin Kumar (073702732) Pawan Kumar(073701271)   43
                                    Findsjob.com


         It is used to represent an external entity or another system element

         that produces information for transformation or receive information.

         CIRCLE

         It used to represent any process or transform which applied on data

         ARROW

         Arrow represents one or more data items or data objects.

         PARRALEL LINE

         The parallel line used to represent any database


         The DFD may be used to represent a system or software at any level
         of abstraction. In fact DFD may be partitioned in levels that represent
         increasing information flow and functional detail. Therefore that DFD
         provide a mechanism for functional modeling as well as information
         flow modeling.




                                 DFD at 0 Level




                                 Admin Control
                                   (Super User)




                                   FINDSJOBS.COM                     Output
User Vaibhav Arora (073210170)   Nitin Kumar (073702732) Pawan Kumar(073701271)
                                       (Management)                                44
                               Findsjob.com




Vaibhav Arora (073210170)   Nitin Kumar (073702732) Pawan Kumar(073701271)   45
                                   Findsjob.com



                              DFD at 1 Level:-


                User Id/password                              Database
                                        User Process
  User




           New user          Database
         Query Process
                                                                  Existing User
         (Registration)




    Registration Process                                   Any Process of
                                                           Findsjobs.com




                                                         Output

    Output




Vaibhav Arora (073210170)    Nitin Kumar (073702732) Pawan Kumar(073701271)       46
                               Findsjob.com



                        DFD at 2 Level: -

                                                                      Database

User                                    Existing User
                                        Process




        New Updation
                                                                       New Event
                                                                       entry



                        Jobs Matching                   User
                                                        Application
                        For user                        Forwarded




         Output
                                                                         Output
                            Output
                                                        Output

             Employee
             Management

                                                              Output




Vaibhav Arora (073210170)   Nitin Kumar (073702732) Pawan Kumar(073701271)         47
                               Findsjob.com


                                   B) DFD at 3 Level: -



                                     Checks User’s                     Database
User                                 ID




        Invalid                   Valid user                    Candidates
        User                                                    Status




                        Management                   Job Application
                        Query                        Issue Date




                                                                       Feed back up
                                                                       Date
       Quit




                                                                          Output
                      Output
                                                 Output




Vaibhav Arora (073210170)   Nitin Kumar (073702732) Pawan Kumar(073701271)            48
                                                  Findsjob.com




           Entity - Relationship Diagram:-                                  .Category
                                                                                                 Name

                                                           Nationality
            E.ID            Name                                                C.ID #                   Address
            #


                 Employee                                  Enquiry                                   Candidates


                                        E.ID
                                        #
         Addre           Phone                                                           Phone No.
         ss              No.                                                             No.
                            Category
                                                                                   R. No. #

                                                                                                 Services
Salary             Job           Type


                                              Fj. ID #                             Authorized
                                                                Location           Class


                                                          Findsjob.com
                                                             Center
                                                  Phone                  Name
                     Type                         No.


                                                                                  Auth. person
                                 Collection                 B. ID #

           C. Code

           Vaibhav Arora (073210170)          Nitin Kumar (073702732) Pawan Kumar(073701271)                      49
                                     Findsjob.com




                                              Billing Counter


                                   Location
                                                       Phone
Collections slip No.
                                                       No.


                              MODULE DESCRIPTION

    We know that it is quite difficult to do any thing of its whole part at a
    time.
    So it is the task of the programmer to break/split the whole set of task
    into various small module so that one can handle them effectively. But it
    depends upon the software system that in which Extent it will be broken
    so that there is no inter-dependency among them.
                       This project developed for “Findsjob.com” is broken into
    following module.

                                  1. Admin Module
                                  2. User Module
                                  3. Resume Service Module
                                  4. Advertisement Module
                                  5. Employer Module
                                  6. job Seeker Module
                                  7. General Information
                                  8. Search
                                  9. Report Module
                                  10. Security




    Vaibhav Arora (073210170)     Nitin Kumar (073702732) Pawan Kumar(073701271)   50
                               Findsjob.com




 1. ADMIN MODULE: - Admin module is mainly for the owner of the
   system. This module performs the work of regular checking process.
   Every one needs current information about any thing. So, this module
   is responsible for updating the information continuously if any, in the
   system so that one can find timely information. But the main function
   of this module is to handle security of this system. Different types of
   authentication and authorization process is performed for this
   purpose. This module is also responsible for advertisement bid. Any
   organizations that are eager for advertisement can contact us for their
   ad. This module handles the entire task related to advertisement like
   specifying and allocating the space and related cost.


 2. USER PAGE MODULE:-         User page module is for front page of this
    system. It is the main page of the system in which all the links of
    this system are kept. Now the main thing is how to make the home
    page interactive and user friendly so that there should not be any
    problem for the user. This is the task of the system administrator to
    make the home page Interactive.


 3. RESUME SERVICE MODULE:- In the resume service module, all
    the resume of job seeker will be stored and managed and categorized
    for sending to the employer on the basis of areas of jobs and
    employer will see the resume by this module. If they deposit the
    fixed amount of money for the fixed about of resume.


Vaibhav Arora (073210170)   Nitin Kumar (073702732) Pawan Kumar(073701271)   51
                                 Findsjob.com


 4. ADVERTISEMENT MODULE:- In any web based application
      advertisement is main thing. Any organization wants to give their
      advertisement on Internet. This module handle information about
      the advertisement related task. Interested Organization can contact
      us for their advertisement. This module also calculates the cost of
      advertisement corresponding to their acquired space. The place for
      advertisement can be categorized into to parts i.e. the space on the
      home page and the space on other pages. The cost of the
      advertisement is also varied according to place of advertisement.


 5. EMPLOYER MODULE:-            In employer module, all the employer
      related information stored and managed in this module. All the
      details of employer and how much resume they are looking and how
      much money deposit for the resume. And employer see the resume
      of the related areas.


 6. JOB SEEKER MODULE:- In the job seeker module, all the details of
      job seeker will be stored in this module. In this module job seeker
      will register and give all details information about his details. And
      will update his resume and can search the match job profile and
      also can apply for that jobs.


 7. GENERAL INFORMATION:- These module provides some initial               but
      useful information about the jobs and their location. This general
      information may be how to provide better service to the user.


 8.   SEARCH MODULE:- Search module provides search facilities to the
      job seeker that they could search various related information about
      concerned profile. And search job and also can apply for that jobs.


Vaibhav Arora (073210170)     Nitin Kumar (073702732) Pawan Kumar(073701271)     52
                               Findsjob.com


 9. REPORT MODULE:- This module generates various reports to
    higher authorities of the system. As we know that this system has
    additional functionality to act as a important for the website and
    also for the admin which may help in future.

 10.SECURITY MODULE:-          security module is concerned with security
    of the system. As this system is public website but it has provided
    security to the admin module only because this module can update
    information of the system so to make sure that no any unauthorized
    user could change information. This module has various
    mechanisms to check the validity of the user.




Vaibhav Arora (073210170)   Nitin Kumar (073702732) Pawan Kumar(073701271)   53
                               Findsjob.com


            DATA STRUCTURE/TABLE DESIGN



      Database is collection of data that can be treated as single unit.
This Single or individual unit is called table. In relational database
system Table is combination of rows and columns which show records
and fields Respectively. After great efforts we determine the main entities,
there attribute and relationship among them. After determining all these
entities, we design the table structure as follows:



Login Table:

S.R    Field Name              Data Type       Size           Validation
1.     S.No (auto-             Integer         5
       increment)
2.     U_name                  Varchar         20             Primary Key
3.     Password                Varchar         20




Employee Details Table:

S.R    Field Name              Data Type       Size           Validation
1.     E_Id                    Varchar         20             Primary key
2.     E_Name                  Varchar         20
3.     J_date                  Date
4.     Sex                     varchar         6
5.     Address                 Varchar         50
6.     Phone No                Integer         10
7.     DOB                     Date
8.     Salary                  Integer         10
9.     Specialization          Varchar         20




Vaibhav Arora (073210170)   Nitin Kumar (073702732) Pawan Kumar(073701271)     54
                               Findsjob.com



Employer Details Table:

S.R    Field Name              Data Type      Size           Validation
1.     Emp_id                  Varchar        10             Primary key
2.     Emp_name                Varchar        25
3.     Comp_name               Varchar        30
4.     Job_profile             Varchar        30
5.     Address                 Varchar        30
6.     Need_resume             Int            4
7.     Contact_no              Varchar        12
8.     Email                   Varchar        56



Job Seeker Details Table:

S.R    Field Name              Data type      Size           Validation
1.     User_id                 Varchar        10             Primary key
2.     Name                    Varchar        30
3.     Qualification           Varchar        101
4.     Key_skill               Varchar        300
5.     Address                 Varchar        78
6.     Resume                  Varchar        500
7.     Contact_no              Varchar        12
8.     Email                   Varchar        45
9.     Experience              Varchar        45



Resume Service Table:

S.R    Field Name              Data type      Size           Validation
1.     R_sno                   Varchar        10             Primary key
2.     R_headline              Varchar        300
3.     Total_exp               Varchar        100            Foreign key
4.     R_category              Varchar        300
5.     Charges                 Integer        5




Advertisement Table:


Vaibhav Arora (073210170)   Nitin Kumar (073702732) Pawan Kumar(073701271)   55
                               Findsjob.com


S.R    Field Name              Data type      Size           Validation
1.     Ad_id                   Varchar        10             Primary key
2.     Ad_name                 Varchar        30
3.     Image                   Varchar        79
4.     Ad_start_date           dateTime
5.     ad_end_date             dateTime
6.     Comp_name               Varchar        89
7.     Address                 Varchar        78
8.     Contact_no              Varchar        12
9.     Email                   Varchar        78




Vaibhav Arora (073210170)   Nitin Kumar (073702732) Pawan Kumar(073701271)   56
                               Findsjob.com




Vaibhav Arora (073210170)   Nitin Kumar (073702732) Pawan Kumar(073701271)   57
                                 Findsjob.com


             Data Integrity and Constraints



Integrity Constraints:

Data integrity constraints provide a means of ensuring that change made
to the database by authorized users don’t result in loss of data
consistency. Thus      integrity constraints guards against accidental
damage to the database.
      In relational database the integrity constraints ate of follows

Key declaration –

This is the field for which we have no two rows with the same value. It
lets the database with legal insertion and updates.
This is the concept of creating primary key. For example in my project
named “Findsjob.com” I have the tables like jobseeker, employer,
resume service, advertisements etc. each one with a primary key


Form of Relationship – The relation ship between two entities in
database. These relationships are of the form.
                 One-to-One
                 One-to-Many
                 Many-to-One
                 Many-to-Many


Referential Integrity

It is often seen that a value which appears in one relation for a given set
of attributes also appears for certain set of attributes in another relation.
This is called referential integrity.
 The term referential integrity is concerned with the concept of foreign
key declaration

Vaibhav Arora (073210170)   Nitin Kumar (073702732) Pawan Kumar(073701271)      58
                               Findsjob.com




Basic Concept of Relational Integrity
Consider a pair of relations r(R) and r(S), and the natural join RS.
There may be tuple tr and r that does not join with any tuple in s. That’s
there is no ts in s such that [R union S]=tr[R union S] such tuple ate
called dangling tuples. Taking the example of my project entitled
“Findsjob.com”. Let us take two tables


Referential Integrity in SQL


Primary Key -
The primary key clause of the create tuple student is the attribute which
contains its uniqueness. We can access any other field using primary
key. I have defined The primary key in every table of my project database.


Foreign key –
Foreign key is the concept to relate two tuple in such a way that their
integrity and constraints could not be lost.
Some item we see that a primary key of one tuple is candidate key of
another tuple.
For example, taking my project database the seeker_id of customer table
is foreign key in the Receipt table which is the primary key of jobseeker
table.


Unique Key –
It same as primary key except that unique key can contain a null value
which is not possible in the case of primary key.




Vaibhav Arora (073210170)   Nitin Kumar (073702732) Pawan Kumar(073701271)   59
                                Findsjob.com


Referential Integrity in Relational Database:

Referential Integrity constraint arises frequently. If we derive our
relational-database schema by constructing tables from E-R Diagrams,
as we have seen that every relation arising from a relationship set has
referential-Integrity Constraint.
    Another source of referential –integrity constraint is week entity sets.
The relational schema of entity set must include the primary key of the
entity set on which the weak entity set depends. Thus, the relation
schema for each weak entity set includes a foreign key that leads to
referential- integrity constraint.


Database Modification :- database modifications can cause violations of
referential integrity. We list here the test that test we must make for each
type of database modification to preserve the following referential
integrity constraint.
                   Π (r2) = Π (s2)


Let us understand it trough example diagram:




                        E1


                                      E2




                                        E3

                        E4




Vaibhav Arora (073210170)    Nitin Kumar (073702732) Pawan Kumar(073701271)    60
                               Findsjob.com




Vaibhav Arora (073210170)   Nitin Kumar (073702732) Pawan Kumar(073701271)   61
                               Findsjob.com



User Interface Design: - User-Interface design is the most crucial and
important part of System design. User- Interface design is concerned
with the making the way of interaction between user and the
computerized system
    In real sense user-interface design deals with the personnel issues if
the software. Interface design is the one of the most important part of
the system software design. It is the crucial in the sense that user
interaction with the system takes place through various interfaces
provided by the software product.
         Earlier the interaction between the user and the computerized
based system were command based. For this the user had to remember
the command to perform the task in the system which quite difficult in
the sense.


       Modern user interfaces are Graphical User Interfaces (GUI ) based
which are easy to navigate. The interaction between the user and the
system is simply the best interface made ever.


                The following are the advantages of the Graphical user
Interfaces (GUI).


      Various information can be displayed and allow user to switch to
       different task directly from the present screen.
      Useful graphical icons and pull down menu reduces typing effort
       by the user
      Provide key –board shortcut to perform frequently performed tasks.
      Simultaneous operations of various tasks without loosing the
       present content.




Vaibhav Arora (073210170)   Nitin Kumar (073702732) Pawan Kumar(073701271)   62
                               Findsjob.com




Home Page




Vaibhav Arora (073210170)   Nitin Kumar (073702732) Pawan Kumar(073701271)   63
                               Findsjob.com



Job Seeker Registration Forms




Employer Registration Forms


Vaibhav Arora (073210170)   Nitin Kumar (073702732) Pawan Kumar(073701271)   64
                               Findsjob.com




Job Seeker Sign In Forms




Vaibhav Arora (073210170)   Nitin Kumar (073702732) Pawan Kumar(073701271)   65
                               Findsjob.com




Employer Sign In Forms




Vaibhav Arora (073210170)   Nitin Kumar (073702732) Pawan Kumar(073701271)   66
                               Findsjob.com




Admin Login Forms




Vaibhav Arora (073210170)   Nitin Kumar (073702732) Pawan Kumar(073701271)   67
                               Findsjob.com




Admin Home Page




Vaibhav Arora (073210170)   Nitin Kumar (073702732) Pawan Kumar(073701271)   68
                               Findsjob.com




Country List Forms




Vaibhav Arora (073210170)   Nitin Kumar (073702732) Pawan Kumar(073701271)   69
                               Findsjob.com




Department List Forms




Vaibhav Arora (073210170)   Nitin Kumar (073702732) Pawan Kumar(073701271)   70
                               Findsjob.com




ADD NEW EMPLOYER




Vaibhav Arora (073210170)   Nitin Kumar (073702732) Pawan Kumar(073701271)   71
                               Findsjob.com




MANAGE JOB SEEKERS




Vaibhav Arora (073210170)   Nitin Kumar (073702732) Pawan Kumar(073701271)   72
                               Findsjob.com




ADD NEW JOB SEEKER




Vaibhav Arora (073210170)   Nitin Kumar (073702732) Pawan Kumar(073701271)   73
                               Findsjob.com




VIEW ALL RESUMES




Vaibhav Arora (073210170)   Nitin Kumar (073702732) Pawan Kumar(073701271)   74
                               Findsjob.com




Vaibhav Arora (073210170)   Nitin Kumar (073702732) Pawan Kumar(073701271)   75
                               Findsjob.com




Myconnect.php


<?php
//include_once "session.php";
define("SBCURRENCY","$");
// YOU NEED TO CHANGE THE CONTENTS OF THE values of variables
given in single quotes

//CONFIGURATION SECTION STARTS ///

$servername='localhost' ; // Replace this 'localhost' with your server
name

Vaibhav Arora (073210170)   Nitin Kumar (073702732) Pawan Kumar(073701271)   76
                               Findsjob.com


$database_username='root'; // Replace this with your username
$database_password=''; // Replace this with your password
$database_name='jobs'; // Replace this 'db' with your database name

// CONFIGURATION SECTION ENDS ////

mysql_connect($servername,$database_username,$database_password);
mysql_select_db($database_name);

$to_secs=200;
$t_stamp = date("YmdHis",time());
$timeout = $t_stamp - $to_secs;
$ip=$_SERVER['REMOTE_ADDR'];
$uid=-1;
if(isset($_SESSION["sbjbs_userid"]))
{
$uid=$_SESSION["sbjbs_userid"];
$to_secs=500;
$timeout = $t_stamp - $to_secs;
}
//==========================online visitors
mysql_query( "DELETE FROM sbjbs_online WHERE
UNIX_TIMESTAMP(NOW())-UNIX_TIMESTAMP(sb_ontime) >$to_secs") ;
$online=mysql_fetch_array(mysql_query("select * from sbjbs_online where
sb_ip='$ip'"));
  if($online)
  {
  mysql_query("update sbjbs_online set sb_ontime=$t_stamp,sb_uid=$uid
where sb_ip='$ip'");
  }
  else
  {
  mysql_query("insert into sbjbs_online (sb_ontime,sb_ip,sb_uid)
values($t_stamp,'$ip',$uid)");
  }
/* $num=mysql_num_rows(mysql_query("select * from sbjbs_online"));
  echo $num;*/

?>


Session.php

<?php
session_start();
session_register("sbjbs_username");
Vaibhav Arora (073210170)   Nitin Kumar (073702732) Pawan Kumar(073701271)   77
                               Findsjob.com


session_register("sbjbs_userid");
session_register("sbjbs_memtype");
session_register("sbjbs_emp_username");
session_register("sbjbs_emp_userid");
//session_register("sbjbs_emp_username");
//session_register("sbjbs_emp_userid");
session_register("softbiz_jbs_provided");
//session_register("ID");
//session_register("ID");
?>



Login.php


<?php

include_once "session.php";
include_once "myconnect.php";

if(isset($_SESSION["sbjbs_userid"])&&($_SESSION["sbjbs_userid"]<>""))
{
        header("Location: gen_confirm.php?errmsg=".urlencode('You are
already logged in as '.$_SESSION["sbjbs_username"]));
        die();
}
function main()
{
?>
<table width="90%" border="0" align="center" cellpadding="5"
cellspacing="0" class="msgstyle">
  <tr align="left">
    <td colspan="2"><strong>Welcome to the member's area<?php //echo
$_SESSION["sbjbs_username"];?>, you have successfully logged-
in.</strong></td>
  </tr>
  <?
        if(isset($_REQUEST["return_path"]) &&
($_REQUEST["return_path"]<>""))
        {

        $return_path=$_REQUEST["return_path"]."?sb_id=".$_REQUEST["i
d"];
 ?>
 <tr>
Vaibhav Arora (073210170)   Nitin Kumar (073702732) Pawan Kumar(073701271)   78
                               Findsjob.com


  <td width="2%" align="center">&nbsp;</td>
  <td width="100%" align="left"> Click <a href="<?php echo
$return_path;?>">here</a>
    <?php

      if(preg_match("/\/apply_now.php/",$_REQUEST["return_path"]))
             {    echo " to apply for the job.";}
             else
             {    echo " to continue";}
    ?>
    </td>
  </tr>
  <?
  }?>
  <tr>
    <td align="center">&nbsp;</td>
    <td align="left">Click <a href="userhome.php">here</a> to go to
member stats.
    </td>
  </tr>
  <tr>
    <td align="center">&nbsp;</td>
    <td align="left">Click <a href="logout.php">here</a> to logout. </td>
  </tr>
</table>
<?
}

if(!isset($_REQUEST['username']) || ($_REQUEST['username']=="") ||
!isset($_REQUEST['pwd']) || ($_REQUEST['pwd']=="") )
{
        header("Location: signin.php?errmsg=".urlencode("Please enter
login information."));
        die();
}

if (!get_magic_quotes_gpc())
{
        $username=str_replace('$',
'\$',addslashes($_REQUEST["username"]));
        $pwd=str_replace('$', '\$',addslashes($_REQUEST["pwd"]));
}
else
{
        $username=str_replace('$', '\$',$_REQUEST["username"]);
        $pwd=str_replace('$', '\$',$_REQUEST["pwd"]);
Vaibhav Arora (073210170)   Nitin Kumar (073702732) Pawan Kumar(073701271)   79
                               Findsjob.com


}


$sql = "SELECT * FROM sbjbs_seekers WHERE sb_username =
'$username' AND sb_password = '$pwd'" ;

$rs_query=mysql_query($sql);
if ( $rs=mysql_fetch_array($rs_query) )
{
        if($rs["sb_suspended"]=="no")
        {
                if($rs["sb_password"]===$_REQUEST['pwd'])
                {
                        $_SESSION["sbjbs_username"]=$rs["sb_username"] ;
                        $_SESSION["sbjbs_userid"]=$rs["sb_id"] ;

                    mysql_query("update sbjbs_seekers set
sb_last_login='".date("YmdHis",time())."' where sb_id=".$rs["sb_id"]);
                    include_once "template.php";
                    die();
             }
      }//not suspended
      else
      {
             header("Location: gen_confirm.php?errmsg=".
urlencode("Your Account has been suspended by Admin.") );
             die();
      }
}

header("Location: signin.php?errmsg=". urlencode("Please enter correct
login information.") );
die();
?>


Logout.php


<?php
// if session exists, unregister all variables that exist and destroy session
include_once("myconnect.php");
session_start();

mysql_query( "DELETE FROM sbjbs_online WHERE
sb_uid=".$_SESSION["sbjbs_userid"]) ;
Vaibhav Arora (073210170)   Nitin Kumar (073702732) Pawan Kumar(073701271)      80
                               Findsjob.com



session_unregister("sbjbs_username");
session_unregister("sbjbs_userid");

header("Location: ". "gen_confirm.php?errmsg=" . urlencode("You have
been successfully logged out.") );
die();
?>


Lostpassword.php

<?
function main()
{
?>
<script language="JavaScript">
       //=======
       function emailCheck (emailStr)
       {
             var emailPat=/^(.+)@(.+)$/;
             var specialChars="\\(\\)<>@,;:\\\\\\\"\\.\\[\\]";
             var validChars="\[^\\s" + specialChars + "\]";
             var quotedUser="(\"[^\"]*\")";
             var
ipDomainPat=/^\[(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})\]$/;
             var atom=validChars + '+';
             var word="(" + atom + "|" + quotedUser + ")";
             var userPat=new RegExp("^" + word + "(\\." + word + ")*$");
             var domainPat=new RegExp("^" + atom + "(\\." + atom
+")*$");
             var matchArray=emailStr.match(emailPat);
             if (matchArray==null)
                    {
             alert("Please verify Email Address (check @ and .'s)");
             //form.email.focus();

             return(false);
             }
      var user=matchArray[1];
      var domain=matchArray[2];
      if (user.match(userPat)==null)
      {
      alert("Please Specify a valid username in Email Address!");
      return(false);
      }
Vaibhav Arora (073210170)   Nitin Kumar (073702732) Pawan Kumar(073701271)   81
                               Findsjob.com


       var IPArray=domain.match(ipDomainPat);
       if (IPArray!=null)
       {
   // this is an IP address
              for (var i=1;i<=4;i++)
              {
              if (IPArray[i]>255)
                     {
              alert("Destination IP address is invalid!");
                            return(false);
              }
       }
       return(true);
       }
       var domainArray=domain.match(domainPat);
       if (domainArray==null)
       {
              alert("Please Specify a valid domain name!");
       return(false);
       }
       var atomPat=new RegExp(atom,"g");
       var domArr=domain.match(atomPat);
       var len=domArr.length;
       if (domArr[domArr.length-1].length<2 || domArr[domArr.length-
1].length>4)
       {
              alert("The address must end in a valid domain, or two letter
country.");
              return(false);
       }
       if (len<2)
       {
              var errStr="This address is missing a hostname!";
              alert(errStr);
              return(false);
       }
       return true;
}

      function validate(form)
      {
            if(form.email.value=='')
            {
                   alert("Please Specify Email Address!");
                   form.email.focus();
                   return(false);
Vaibhav Arora (073210170)   Nitin Kumar (073702732) Pawan Kumar(073701271)   82
                               Findsjob.com


            }
            else
            {     //==============
                  if(!form.email.value.match(/[a-zA-Z\.\@\d\_]/))
                  {
                  alert('Please Specify a valid Email Address.');
                          form.email.focus();
            return false;
            }

                   if (!emailCheck (form.email.value) )
                   {
                          form.email.focus();
                          return (false);
                   }

            }     //=================
            return(true);
       }
</script>
<form name="frm1" method="post" action="sendpassword.php"
onSubmit="return validate(this);" >
  <table width="80%" border="0" align="center" cellpadding="0"
cellspacing="0" class="onepxtable">
   <tr>
     <td height="25" class="titlestyle"><b>&nbsp; Forgot
Password</b></td>
   </tr>
   <tr>
     <td><table width="100%" border="0" align="center" cellpadding="0"
cellspacing="0" >
        <tr>
         <td width="100%" valign="top"> <div align="center">
            <table width="100%" border="0" cellpadding="2"
cellspacing="5">
             <tr valign="top">
               <td width="36%" height="27" class="innertablestyle"> <div
align="right"><strong><font class='normal'>Email
                 ID </font></strong></div></td>
               <td width="6"><font class="red">*</font></td>
               <td width="64%"> <input name="email" type="text"
id="email">
                <br> <font class='smalltext'>Please provide your email id.
                We will send your password in email </font></td>
             </tr>
             <tr>
Vaibhav Arora (073210170)   Nitin Kumar (073702732) Pawan Kumar(073701271)   83
                               Findsjob.com


             <td height="27" class="innertablestyle">&nbsp;</td>
             <td width="10">&nbsp;</td>
             <td><input type="submit" name="Submit" value="Send
Request">
              </td>
             </tr>
            </table>
          </div></td>
        </tr>
      </table></td>
    </tr>
  </table>
  <strong><font color="#000000"> </font></strong>
</form>
  <?
  }// end sub
include "template.php";?>


search.php

<?php
include_once "myconnect.php";
function main()
{
$config=mysql_fetch_array(mysql_query("select * from sbjbs_config"));
$recperpage=$config["sb_recperpage"];
$alpha_pass="A";
$strpass="";

if(isset($_REQUEST["alpha"])&&($_REQUEST["alpha"]<>""))
{
$strpass.="&alpha=".$_REQUEST["alpha"];
$alpha_pass=$_REQUEST["alpha"];
}
        $suspended_list="-1";
        $mem_q=mysql_query("select * from sbjbs_employers where
sb_suspended='yes'");
        while($mem=mysql_fetch_array($mem_q))
        { $suspended_list.=",".$mem["sb_id"];}


$sql="select * from sbjbs_companies where sb_approved='yes' and sb_uid
not in ($suspended_list)";
$sql.=" and (sb_name like '$alpha_pass%')";
$sql.=" order by sb_name";
Vaibhav Arora (073210170)   Nitin Kumar (073702732) Pawan Kumar(073701271)   84
                               Findsjob.com


//echo $sql;
$comp_q=mysql_query($sql);
?>
<table width="100%" border="0" cellpadding="0" cellspacing="0" >
 <tr>
   <td valign="top"><table width="100%" border="0" cellspacing="0"
cellpadding="0">
      <tr>
       <td><table width="90%" border="0" align="center" cellpadding="0"
cellspacing="0">
          <tr>
           <td align="center">&nbsp;&nbsp;<?
               $alpha=65;
               while($alpha<91)
               {
               if(chr($alpha)<>$alpha_pass)
               {
               ?><a href="search_companies.php?alpha=<?
printf("%c",$alpha);?>"><? printf("%c",$alpha);?></a>&nbsp;&nbsp;<?
               }
               else
               {
               ?><font class="red"><strong><?
printf("%c",$alpha);?></strong></font>&nbsp;&nbsp;<?
               }
               $alpha++;
               }
               ?></td>
          </tr>
         </table>

       </td>
      </tr>
      <tr>
       <td valign="top"> <div align="center">
          <table width="90%" border="0" cellpadding="1" cellspacing="0">
            <tr>
             <td align="center" valign="top">
               <table width="100%" border="0" cellspacing="2"
cellpadding="0" class="onepxtable">
                <tr align="center" class="titlestyle">
                  <td width="70%" height="25"
align="left">&nbsp;Company
                  </td>
                  <td align="left">&nbsp;Positions [Vacancies]</td>
                </tr>
Vaibhav Arora (073210170)   Nitin Kumar (073702732) Pawan Kumar(073701271)   85
                               Findsjob.com


               <?
                                   $cnt=0;
               while($comp=mysql_fetch_array($comp_q))
                                   {
                                   ?>
               <tr align="center">
                <td align="left" class="<? if($cnt%2<>0){echo
"innertablestyle"; }else{echo "alternatecolor";}?>"><font class="smalltext">
                  &nbsp;
                  <?
                                         if($comp["sb_show_profile"]=="yes")
                                         {
                                         echo "<a
href='view_profile.php?id=".$comp["sb_id"]."' title='View company
profile'>".$comp["sb_name"]."</a>";
                                         }
                                         else
                                         {
                                           echo $comp["sb_name"];
                                         }
                                   ?>
                  </font></td>
                <td align="left" class="<? if($cnt%2<>0){echo
"innertablestyle"; }else{echo "alternatecolor";}?>"><font
class="smalltext">&nbsp;<?

       $jobs=mysql_fetch_array(mysql_query("select sum(sb_vacancies) as
total, count(*) as jobs from sbjbs_jobs where sb_approved='yes' and
sb_company_id=".$comp["sb_id"]));
                                      if($jobs["jobs"]>0)
                                      {
                                             echo "<a
href='search_result.php?company=".$comp["sb_id"]."' title=\"View all jobs
of ".$comp["sb_name"]."\">".$jobs["jobs"]."</a>&nbsp;[";
                                             if($jobs["total"]<>"")
                                             {
                                             echo $jobs["total"];
                                             }
                                             else
                                             {
                                             echo $config["sb_null_char"];
                                             }
                                             echo "]&nbsp;";
                                      }
                                      else
                                      {
Vaibhav Arora (073210170)   Nitin Kumar (073702732) Pawan Kumar(073701271)     86
                               Findsjob.com


                                            echo $config["sb_null_char"];
                                      }
                                      ?></font></td>
               </tr>
               <?
                    $cnt++;
                                }// end while
                                if($cnt==0)
                                {
                                  ?><tr><td colspan="2" align="center"
height="25">
                                 <font class="normal">No companies
found satisfying your search criteria</font>
                                 </td></tr><?php
                               }
                               ?>
              </table>
            </td>
           </tr>
           <tr>
            <td align="center">&nbsp; </td>
           </tr>
          </table>
         </div></td>
      </tr>
     </table></td>
  </tr>
  <tr>
   <td valign="top">&nbsp;</td>
  </tr>
</table>
<?
}// end main
include "template.php";
?>


search_result.php

<?
//include "logincheck.php";
include_once "myconnect.php";
include_once "date_time_format.php";

function main()
{
Vaibhav Arora (073210170)   Nitin Kumar (073702732) Pawan Kumar(073701271)   87
                               Findsjob.com


      $config=mysql_fetch_array(mysql_query("select * from
sbjbs_config"));
      $recperpage=$config["sb_recperpage"];
      $sb_null_char=$config["sb_null_char"];
      $strpass="";
      $keyword="";
      $catpath="";
      $searchkeyword="";
      $cid_list="";
      $loc_id_list="";
      $view="desc";

     $suspended_list="-1";
     $mem_q=mysql_query("select * from sbjbs_employers where
sb_suspended='yes'");
     while($mem=mysql_fetch_array($mem_q))
     { $suspended_list.=",".$mem["sb_id"];}

      $disapproved_list="-1";
      $comp_q=mysql_query("select * from sbjbs_companies where
      (sb_approved='no' OR sb_uid in ($suspended_list))");

       while($comp=mysql_fetch_array($comp_q))
       { $disapproved_list.=",".$comp["sb_id"];}
       if(isset($_REQUEST["keyword"])&&($_REQUEST["keyword"]<>""))
       {
               $keyword=$_REQUEST["keyword"];
               $strpass.="&keyword=".$_REQUEST["keyword"];
               if (!get_magic_quotes_gpc())
               {
               $searchkeyword=str_replace('$',
'\$',addslashes($_REQUEST["keyword"]));
               }
               else
               {
               $searchkeyword=str_replace('$',
'\$',$_REQUEST["keyword"]);
               }
               $searchkeyword=trim($searchkeyword);
       }
       if(isset($_REQUEST["cid_list"])&&($_REQUEST["cid_list"]<>""))
       {
       $strpass.="&cid_list=".$_REQUEST["cid_list"];
       $cid_list=str_replace(";",",",$_REQUEST["cid_list"]);
       //$cid_list=explode(";",$_REQUEST["cid_list"]);
       }
Vaibhav Arora (073210170)   Nitin Kumar (073702732) Pawan Kumar(073701271)   88
                                    Findsjob.com


     $cid=0;
     if(isset($_REQUEST["cid"])&&($_REQUEST["cid"]<>""))
     {
     $strpass.="&cid=".$_REQUEST["cid"];
                  $cid=$_REQUEST["cid"];
                  $c_list=$_REQUEST["cid"];
                  $child_cat=mysql_query("select * from sbjbs_categories
where sb_pid=".$_REQUEST["cid"]);

                       while ( $child=mysql_fetch_array($child_cat) )
                       {
                             $c_list.="," . $child["sb_id"];
                             while (
$child=mysql_fetch_array($child_cat) )
                             {
                                    $c_list.="," . $child["sb_id"];
                             }

                            $child_cat=mysql_query("Select * from
sbjbs_categories where
                            sb_pid IN (" . $c_list . ") and sb_id not in ( ".
$c_list . ")") ;
                           }
               $cid_list=$c_list;
               }

       //=================================catpath code
       $catname="";
       $category=0;

      $cat_query=mysql_query("Select * from sbjbs_categories where
sb_id=" . $cid );
      if ($cat=mysql_fetch_array($cat_query))
      {
      $catname=$cat["sb_cat_name"];
      $category=$cat["sb_id"];
      }

       $catpath="";
       $cat_query=mysql_query("Select * from sbjbs_categories where
sb_id=" . $cid );
       while ($rs=mysql_fetch_array($cat_query))
   {
   $catpath =" > <a href=\"browsecats.php?cid=" . $rs["sb_id"] . "\">"
.$rs["sb_cat_name"]."</a>".$catpath;


Vaibhav Arora (073210170)     Nitin Kumar (073702732) Pawan Kumar(073701271)    89
                                   Findsjob.com


      $cat_query=mysql_query("Select * from sbjbs_categories where
sb_id=" . $rs["sb_pid"] );

      }
//================================== LOC SEARCH [MULTI
LOCATION CODE] ====================================
      if(isset($_REQUEST["loc_id"])&&($_REQUEST["loc_id"]<>""))
      {
              $strpass.="&loc_id=".$_REQUEST["loc_id"];
              $loc_id_list=str_replace(";",",",$_REQUEST["loc_id"]);
              $loc_q=mysql_query("select * from sbjbs_locations where
sb_id in ($loc_id_list)");
              while($loc=mysql_fetch_array($loc_q))
               {
                    $clist=$loc["sb_id"];
                    $child_loc=mysql_query("select * from sbjbs_locations
where sb_pid=".$loc["sb_id"]);

                       while ( $child=mysql_fetch_array($child_loc) )
                       {
                             $clist.="," . $child["sb_id"];
                             while (
$child=mysql_fetch_array($child_loc) )
                             {
                                    $clist.="," . $child["sb_id"];
                             }

                            $child_loc=mysql_query("Select * from
sbjbs_locations where
                            sb_pid IN (" . $clist . ") and sb_id not in ( ". $clist
. ")") ;
                            }

                }
               $loc_id_list.=",".$clist;
               //$loc_id_list=explode(",",$loc_id_list);
           }

      $sbq_job="select *,UNIX_TIMESTAMP(sb_posted_on) as sbposted
from sbjbs_jobs where sb_approved='yes' and sb_company_id not in
($disapproved_list) ";
//===================================== keyword search
==================================================
      if($searchkeyword<>"")
      {


Vaibhav Arora (073210170)       Nitin Kumar (073702732) Pawan Kumar(073701271)        90
                               Findsjob.com


      if(isset($_REQUEST["search_method"])&&(($_REQUEST["search_me
thod"]==2)||($_REQUEST["search_method"]==3)))
              {
                   $log_operator="OR";
                   if($_REQUEST["search_method"]==2)
                   $log_operator="AND";

                     $search_str="";
                     $keyword_arr=explode(" ",$searchkeyword);
                     foreach($keyword_arr as $key)
                     {
                           if($search_str=="")
                           {
                           $search_str="(sb_title like '%$key%' or
sb_description like '%$key%'
                           or sb_role like '%$key%') ";
                           }
                           else
                           {
                           $search_str.=" $log_operator (sb_title like
'%$key%' or sb_description like '%$key%'
                           or sb_role like '%$key%') ";
                           }
                     }
                     $sbq_job.=" and ($search_str)";
              }// end if AND/ OR keywords
              else
              {
              $sbq_job.=" and (sb_title like '%$searchkeyword%' or
sb_description like '%$searchkeyword%'
              or sb_role like '%$searchkeyword%') ";
              }
}
       //====================================================
========
//=======================category
search==========================
if((count($cid_list)>0)&&($cid_list<>""))
{
       $cat_str="-1";
       $job_cat_q=mysql_query("select * from sbjbs_job_cats where sb_cid
in ($cid_list)");
       while($job_cat=mysql_fetch_array($job_cat_q))
       {
              $cat_str.=",".$job_cat["sb_job_id"];
       }
Vaibhav Arora (073210170)   Nitin Kumar (073702732) Pawan Kumar(073701271)   91
                               Findsjob.com



       $sbq_job.=" and sb_id in ($cat_str)";
}
//=========================================================
=======
//=======================Location
search==========================
if((count($loc_id_list)>0)&&($loc_id_list<>""))
{
       $loc_str="-1";
       $job_loc_q=mysql_query("select * from sbjbs_job_locs where sb_lid
in ($loc_id_list)");
       while($job_loc=mysql_fetch_array($job_loc_q))
       {
              $loc_str.=",".$job_loc["sb_job_id"];
       }

      $sbq_job.=" and sb_id in ($loc_str)";
}
//=========================================================
=======
//===================================== Experience Search
=================================
if(isset($_REQUEST["work_exp"])&&($_REQUEST["work_exp"]<>""))
{
        $strpass.="&work_exp=".$_REQUEST["work_exp"];
        $sbq_job.=" and (sb_experience=".$_REQUEST["work_exp"]." or
sb_experience=-1)";
}
//===================================Company
Search===========================================
if(isset($_REQUEST["company"]) &&($_REQUEST["company"]<>""))
{
        $strpass.="&company=".$_REQUEST["company"];
        $sbq_job.=" and sb_company_id=".$_REQUEST["company"];
}
//=========================================================
================================
        $sbq_job.=" order by sb_featured desc, sb_id desc";
        //echo $sbq_job;
        $sbq_job=mysql_query($sbq_job);
        $num_job=mysql_num_rows($sbq_job);
        $strpass1=$strpass;
        if(isset($_REQUEST["view"])&&($_REQUEST["view"]<>""))
        {
        $strpass.="&view=".$_REQUEST["view"];
Vaibhav Arora (073210170)   Nitin Kumar (073702732) Pawan Kumar(073701271)   92
                               Findsjob.com


      $view=$_REQUEST["view"];
      }

///////////////////////////////////PAGINATION /////////
     if(!isset($_REQUEST["pg"]))
     {
                   $pg=1;
     }
     else
     {
     $pg=$_REQUEST["pg"];
     }

$rcount=mysql_num_rows($sbq_job);
if ($rcount==0 )
{
       $pages=0;
}
else
{
       $pages=floor($rcount / $recperpage);
       if (($rcount%$recperpage) > 0 )
       {
              $pages=$pages+1;
       }
}
$jmpcnt=1;
while ( $jmpcnt<=($pg-1)*$recperpage && $row =
mysql_fetch_array($sbq_job) )
    {
              $jmpcnt = $jmpcnt + 1;
       }

///////////////////////////////////////////////////////////
/////////////

      $label=1;
      $featured_label=1;

?>
<script language="JavaScript">
function submit_form()
{
      document.save_search.action="save_search_popup.php";
      window.open("","win","top=5,left=30,toolbars=no,maximize=yes,resi
ze=yes,width=530,height=220,location=no,directories=no,scrollbars=no");
Vaibhav Arora (073210170)   Nitin Kumar (073702732) Pawan Kumar(073701271)   93
                               Findsjob.com


      document.save_search.method="post";
      document.save_search.target="win";
      document.save_search.submit();
}
</script>
<table width="100%" border="0" cellspacing="10" cellpadding="2"
class="maintablestyle">
<tr>
   <td valign="top">
       <table width="90%" border="0" align="center" cellpadding="0"
cellspacing="0" class="onepxtable">
      <tr>
       <form name="form1" method="post" action="search_result.php">
         <td align="center" valign="middle" class="innertablestyle"><br>
         <input name="keyword" type="text" value="<? echo $keyword;?>"
size="40">
          &nbsp;&nbsp; <select name="loc_id">
            <option value="" selected>Any Location</option>
            <?php
                          $loc_query=mysql_query("select * from
sbjbs_locations where sb_pid=0 order by sb_default desc,sb_loc_name");
                          while($loc=mysql_fetch_array($loc_query))
                          {
            ?>
            <option value="<?php echo $loc["sb_id"];?>"><?php echo
$loc["sb_loc_name"];
                          ?></option>
            <?php
                          }
                          ?>
          </select> &nbsp;<font class='normal'>
          <input name="show_save" type="hidden" id="show_save"
value="yes">
          </font>&nbsp; <input type="submit" name="Submit"
value="Search">
         &nbsp;<a href="advance_search.php">Advanced Search</a>
<br> &nbsp;
         </td>
       </form>
      </tr>
      <tr>
       <td height="25" valign="middle" class="alternatecolor">&nbsp;<a
href="index.php">Home</a><?php echo $catpath;?></td>
      </tr>
     </table></td>
  </tr>
Vaibhav Arora (073210170)   Nitin Kumar (073702732) Pawan Kumar(073701271)   94
                               Findsjob.com


 <tr>
        <td >
   <table width="90%" align="center" cellpadding="0" cellspacing="0">
      <tr>
        <td><font class="normal">Total <font class="red"><b><?php echo
$rcount;?></b></font> Job(s) Found</font></td><?php
               if(isset($_SESSION["sbjbs_userid"]) &&
isset($_REQUEST["show_save"]) &&($rcount > 0))
               {
        ?><form name="save_search" id="save_search"
method="post"><td> <div align="right">
          <input name="view" type="hidden" id="view" value="<?php echo
(isset($_REQUEST["view"]))?$_REQUEST["view"]:''; ?>">
          <input name="cid_list" type="hidden" id="cid_list" value="<?php
echo (isset($_REQUEST["cid_list"]))?$_REQUEST["cid_list"]:''; ?>">
          <input name="loc_id" type="hidden" id="loc_id" value="<?php
echo (isset($_REQUEST["loc_id"]))?$_REQUEST["loc_id"]:''; ?>">
          <input name="work_exp" type="hidden" id="work_exp"
value="<?php echo
(isset($_REQUEST["work_exp"]))?$_REQUEST["work_exp"]:''; ?>">
          <input name="search_method" type="hidden"
id="search_method" value="<?php echo
(isset($_REQUEST["search_method"]))?$_REQUEST["search_method"]:'0';
?>">
          <input name="keyword" type="hidden" id="keyword"
value="<?php echo $keyword; ?>">
          <input type="button" name="Submit2" value="Save Search
Result" onClick="submit_form()">
         </div></td></form><?
                     }
      ?></tr>

  </table>
  </td>
                    </tr>
             <tr>
   <td valign="top">
       <table width="90%" border="0" align="center" cellpadding="0"
cellspacing="0">
      <?php
                              $cnt=0;

        while(($job=mysql_fetch_array($sbq_job))&&($cnt<$recperpage))
                                      {
                                      $cnt++;


Vaibhav Arora (073210170)   Nitin Kumar (073702732) Pawan Kumar(073701271)   95
                               Findsjob.com


                                      $rec_class="innertablestyle";
                                      if($cnt%2==0)
                                      { $rec_class="alternatecolor"; }
                                      if($job["sb_highlight"]=="yes")
                                      {
                                      $rec_class="highlighted";
                                      if($cnt%2==0)
                                      { $rec_class="highlighted1"; }
                                      }


                                      if(($job["sb_featured"]=="yes") &&
($featured_label==1))
                                      {
                                      ?>
      <tr >
       <td colspan="2" valign="top" class="onepxtable"> <table
width="100%" border="0" align="center" cellpadding="2" cellspacing="0"
class="innertablestyle">
          <tr>
            <td height="25" class="titlestyle"><table width="100%"
border="0" cellspacing="0" cellpadding="0" class="titlestyle">
             <tr>
              <td>&nbsp;Featured Jobs</td><?php
                                  if($view=="brief")
              {
                                  ?><td width="40%">&nbsp;Company</td>
              <td width="20%">&nbsp;Experience</td><?php
                                  }
             ?></tr>
            </table></td>
          </tr>
          <tr>
            <td align="left" valign="top"> <table width="100%" border="0"
cellpadding="2" cellspacing="0">
              <?
                                         $featured_label=0;
                                         }
                                         if(($job["sb_featured"]=="no")
&&($label==1))
                                         {
                                                       if($featured_label==0)
                                                       { ?>
             </table></td>
          </tr>
         </table></td>
Vaibhav Arora (073210170)   Nitin Kumar (073702732) Pawan Kumar(073701271)      96
                               Findsjob.com


     </tr>
     <tr>
      <td colspan="2">&nbsp;</td>
     </tr>
     <?     }

                                      ?>
      <tr >
       <td colspan="2" valign="top" class="onepxtable"> <table
width="100%" border="0" align="center" cellpadding="2" cellspacing="0"
class="innertablestyle">
          <tr>
            <td height="25" class="titlestyle"><table width="100%"
border="0" cellspacing="0" cellpadding="0" class="titlestyle">
             <tr>
              <td>&nbsp;All Jobs</td>
              <?php
                                  if($view=="brief")
              {
                                  ?>
              <td width="40%">&nbsp;Company</td>
              <td width="20%">&nbsp;Experience</td>
              <?php
                                  }
             ?>
             </tr>
            </table></td>
          </tr>
          <tr>
            <td align="left" valign="top"> <table width="100%" border="0"
cellpadding="2" cellspacing="0">
              <?
                                         $label=0;
                                         }
                                                 ?>
              <tr valign="top">
                <td><?
                                           if($view=="desc")
                                           {
                   ?>
                <table width="100%" border="0" cellspacing="1"
cellpadding="1" class="<? echo $rec_class;?>">
                 <tr>
                   <td><a href="view_job.php?sb_id=<?php echo
$job["sb_id"]; ?>">
                    <?php
Vaibhav Arora (073210170)   Nitin Kumar (073702732) Pawan Kumar(073701271)   97
                               Findsjob.com


                                            if($job["sb_bold"]=="yes")
                                            { echo "<strong>";}
                                             echo $job["sb_title"];
                                            if($job["sb_bold"]=="yes")
                                            { echo "</strong>";}
                                            ?>
                    </a></td>
                 </tr>
                 <tr>
                  <td><table width="100%" border="0" cellspacing="2"
cellpadding="0">
                     <tr valign="top">
                      <td ><font
class="smalltext"><strong>Role</strong></font></td>
                      <td ><font class="normal"><? echo
$job["sb_role"];?></font></td>
                     </tr>
                     <tr valign="top">
                      <td width="25%" ><font
class="smalltext"><strong>Experience
                        Level</strong></font></td>
                      <td width="75%" ><font class="normal">
                        <?php
      switch($job["sb_experience"])
             {
                    case -1:     echo 'No preference'; break;
                    case 0:            echo 'Fresher'; break;
                    case 1:            echo 'Less than 1 Year'; break;
                    case 2:            echo '1 to 2 Years'; break;
                    case 3:            echo '2 to 5 Years'; break;
                    case 4:            echo '5 to 7 Years'; break;
                    case 5:            echo '7 to 10 Years'; break;
                    case 6:            echo '10 to 15 Years'; break;
                    case 7:            echo 'More than 15 Years'; break;
             }      //end switch ?>
                        </font> </td>
                     </tr>
                     <tr valign="top">
                      <td width="25%" ><font
class="smalltext"><strong>Educational
                        Qualification</strong></font></td>
                      <td ><font class="normal">
                        <?php
                                 $sbq_cur="select * from sbjbs_degrees
where sb_id=".$job["sb_education"];
                                 //echo $sbq_cur;
Vaibhav Arora (073210170)   Nitin Kumar (073702732) Pawan Kumar(073701271)   98
                                 Findsjob.com



       $sbrow_cur=mysql_fetch_array(mysql_query($sbq_cur));
                                if($sbrow_cur)
                                       echo $sbrow_cur['sb_degree'];
                                else
                                       echo 'No preference';     ?>
                        </font></td>
                     </tr>
                     <tr valign="top">
                      <td width="25%" ><font
class="smalltext"><strong>Salary</strong></font></td>
                      <td ><font class="normal">
                        <?php if( ($job["sb_min_salary"] > 0) ||
($job["sb_max_salary"] > 0) )
                   {
                          $sbq_cur='select * from sbjbs_currencies where
sbcur_id='.$job["sb_currency"];

       $sbrow_cur=mysql_fetch_array(mysql_query($sbq_cur));
                        echo ($job["sb_min_salary"]>0)?"Minimum -
".number_format($job["sb_min_salary"],2):'';
                        echo ( ($job["sb_min_salary"]>0) &&
($job["sb_max_salary"]>0) )?', ':'';
                        echo ($job["sb_max_salary"]>0)?"Maximum -
".number_format($job["sb_max_salary"],2).' ':' ';
                        echo $sbrow_cur["sbcur_name"].' ';
                        switch($job["sb_salary_type"])
                        {
            case 0: echo $sb_null_char; break;
                                 case 1: echo "Per Year"; break;
                                 case 2: echo "Per Month"; break;
                                 case 3: echo "Per Week"; break;
                                 case 4: echo "Fortnightly"; break;
                                 case 5: echo "Per Hour"; break;
                        }        //end switch

                   }        //end if job["sb_min_salary"]
                   else
                         echo $sb_null_char;    ?>
                      </font></td>
                   </tr>
                   <tr valign="top">
                     <td ><font
class="smalltext"><strong>Description</strong></font></td>
                     <td ><font class="normal"><font class="smalltext">
                      <?php
Vaibhav Arora (073210170)    Nitin Kumar (073702732) Pawan Kumar(073701271)   99
                                Findsjob.com



                                             if (strlen
($job["sb_description"])>150)
                                             {
                                              echo
substr($job["sb_description"], 0, strrpos( substr($job["sb_description"], 0,
150),' ' ))." ...";
                                            }
                                            else
                                            {
                                              echo $job["sb_description"];
                                            }
                                            ?>
                       </font></font></td>
                    </tr>
                    <tr valign="top">
                     <td ><font
class="smalltext"><strong>Company</strong></font></td>
                     <td ><font class="normal">
                       <?

      $comp=mysql_fetch_array(mysql_query("select * from
sbjbs_companies
                                       where
sb_id=".$job["sb_company_id"]));

                                           echo $comp["sb_name"];?>
                         </font>,&nbsp;&nbsp;<font class="smalltext">
                         <?php
                                           echo "Vacancies <font
class='red'>[ ";
                                             if($job["sb_vacancies"]>0)
                                             echo $job["sb_vacancies"];
                                             else
                                             echo $config["sb_null_char"];
                                             echo " ]</font>";

                                             echo "&nbsp;&nbsp;Posted
on:&nbsp;".sb_date($job["sbposted"]);
                                                 ?>
                          </font></td>
                       </tr>
                      </table></td>
                   </tr>
                   <tr>
                    <td></td>
Vaibhav Arora (073210170)    Nitin Kumar (073702732) Pawan Kumar(073701271)    100
                               Findsjob.com


                </tr>
               </table>
               <?php
                                       }//if descriptive view
                                       else
                                       {
                 ?>
              <table width="100%" border="0" cellspacing="1"
cellpadding="1" class="<? echo $rec_class;?>">
                <tr>
                 <td width="40%"><a href="view_job.php?sb_id=<?php
echo $job["sb_id"]; ?>">
                   <?php
                                           if($job["sb_bold"]=="yes")
                                           { echo "<strong>";}
                                            echo $job["sb_title"];
                                           if($job["sb_bold"]=="yes")
                                           { echo "</strong>";}
                                           ?>
                   </a></td>
                 <td width="40%"><font class="normal">
                   <?

      $comp=mysql_fetch_array(mysql_query("select * from
sbjbs_companies
                                       where
sb_id=".$job["sb_company_id"]));

                                            if($job["sb_bold"]=="yes")
                                            { echo "<strong>";}
                                            echo $comp["sb_name"];

                                            if($job["sb_bold"]=="yes")
                                            { echo "</strong>";}
                                            ?>
                  </font></td>
                 <td><font class="normal">
                  <?php
                                          if($job["sb_bold"]=="yes")
                                          { echo "<strong>";}
      switch($job["sb_experience"])
            {
                  case -1:    echo 'No preference'; break;
                  case 0:           echo 'Fresher'; break;
                  case 1:           echo 'Less than 1 Year'; break;
                  case 2:           echo '1 to 2 Years'; break;
Vaibhav Arora (073210170)   Nitin Kumar (073702732) Pawan Kumar(073701271)   101
                               Findsjob.com


                    case 3:           echo   '2 to 5 Years'; break;
                    case 4:           echo   '5 to 7 Years'; break;
                    case 5:           echo   '7 to 10 Years'; break;
                    case 6:           echo   '10 to 15 Years'; break;
                    case 7:           echo   'More than 15 Years'; break;
            }       //end switch
                                             if($job["sb_bold"]=="yes")
                                             { echo "</strong>";}
                                             ?>
                     </font></td>
                  </tr>
                  <tr>
                   <td></td>
                   <td></td>
                   <td></td>
                  </tr>
                 </table>
                 <?php
                                       }// end if brief view
                                       ?>
                </td>
                </tr>
                <?php
                                      }           //end while
                                      if($cnt==0)
                                      {?><tr>
                                      <td colspan="2" valign="top"
class="onepxtable">
                                            <table width="100%"
border="0" align="center" cellpadding="2" cellspacing="0"
class="innertablestyle">
         <tr>
          <td height="25" class="titlestyle">&nbsp;All Jobs<font
class="smalltext">&nbsp;
            </font></td>
         </tr>
         <tr>
          <td align="center" height="25">
                         <font class='normal'>No jobs found satisfying
your search criteria</font></td></tr><?php
                         }
            ?>
            </table></td>
         </tr>
        </table></td>
     </tr>
Vaibhav Arora (073210170)   Nitin Kumar (073702732) Pawan Kumar(073701271)   102
                               Findsjob.com


    </table>

     <table width="90%" border="0" align="center" cellpadding="0"
cellspacing="0">
      <tr ></tr>
      <?PHP
              if($pages>0)
              {
      ?>
      <tr valign="top">
        <td><font class="normal">
         <?php
                      if($pages>1)
                      {
                      echo "Page $pg of $pages<br>";
                      }
                      ?>
         </font></td>
        <td width="40%" align="right"><font class="normal">
         <?php
                if($view=="desc")
                {
                echo "<a
href='".$_SERVER['PHP_SELF']."?view=brief&pg=$pg".$strpass1."'>Brief<
/a>";
                echo "&nbsp;|&nbsp;Descriptive";
                }
                else
                {
                echo "Brief&nbsp;|&nbsp;";
                echo "<a
href='".$_SERVER['PHP_SELF']."?view=desc&pg=$pg".$strpass1."'>Descri
ptive</a>";
                }
                ?>
         </font></td>
      </tr>
      <tr valign="top">
        <td colspan="2"> <TABLE border=0 cellPadding=0 cellSpacing=0>
          <TBODY>
            <TR>
             <TD> <font class="normal">
                <?
                      if($pages>1)
                      {
                      //echo "Page $pg of $pages<br>";
Vaibhav Arora (073210170)   Nitin Kumar (073702732) Pawan Kumar(073701271)   103
                               Findsjob.com


                  if ($pg!=1)
                  {
                  ?>
             <a href="<? echo $_SERVER['PHP_SELF'];?>?pg=<?php
echo ($pg-1).$strpass; ?>" >
             <?
                    }
                  ?>
             Prev
             <?
                  if ($pg!=1)
                  {
                  ?>
             </a>
             <?php
                  }
                  ?>
             <B>&nbsp;
             <?
                  if ($pages>1)
                  {
                          ?>
             </B>
             <?php
                  if ($pg<=5)
                  {
                          $jmpcnt=1;
                  }
                  else
                  {
                      $jmpcnt=$pg-5;
                  }
                  $cnt=0;

                   while ( $jmpcnt<=$pages && ($cnt<=5) )
                   {
                   $cnt++;
             if ($jmpcnt!=$pg)
             {
             ?>
            <a href="<? echo $_SERVER['PHP_SELF'];?>?pg=<?php echo
"$jmpcnt$strpass"; ?>" >
            <?
                   }
                   else
                   {
Vaibhav Arora (073210170)   Nitin Kumar (073702732) Pawan Kumar(073701271)   104
                               Findsjob.com


                    echo "<b>";
                    }
                    echo $jmpcnt;
        if ($jmpcnt!=$pg)
               {
               ?>
              </a>
              <?php
                    }else{
                    echo "</b>";
                    }
                    if ($jmpcnt<$pages)
        echo " &nbsp; ";
        ?>
              <?php
                 $jmpcnt = $jmpcnt + 1;
         }
                    ?>
              &nbsp;</font> <font class="normal">
              <?
                           }

                     if ( $pg!=$pages && $pages<>0)
                     {
                     ?>
              <a href="<? echo $_SERVER['PHP_SELF'];?>?pg=<?php
echo ($pg+1); ?><?php echo "$strpass"; ?>" >
              <?
                       }
                     ?>
              Next
              <? if ($pg!=$pages && $pages<>0)
                     {
                     ?>
              </a>
              <?
                       }
                     }
                     ?>
              </font> </TD>
          </TR>
         </TBODY>
        </TABLE></td>
     </tr>
     <?php
            }
Vaibhav Arora (073210170)   Nitin Kumar (073702732) Pawan Kumar(073701271)   105
                               Findsjob.com


     ?>
     </table></td>
  </tr>
  <tr>
   <td align="center"></td>
  </tr>
  <tr>
   <td valign="top">&nbsp;</td>
  </tr>
</table>
<?
}// end main
include "template.php";
?>


Index.php

<?php
function main()
{
$config=mysql_fetch_array(mysql_query("select * from sbjbs_config"));
$policies=mysql_fetch_array(mysql_query("select * from sbjbs_policies"));
$cid=0;

     $suspended_list="-1";
     $mem_q=mysql_query("select * from sbjbs_employers where
sb_suspended='yes'");
     while($mem=mysql_fetch_array($mem_q))
     { $suspended_list.=",".$mem["sb_id"];}

      $disapproved_list="-1";
      $comp_q=mysql_query("select * from sbjbs_companies where
      (sb_approved='no' OR sb_uid in ($suspended_list))");
      while($comp=mysql_fetch_array($comp_q))
      { $disapproved_list.=",".$comp["sb_id"];}

?>

<table width="100%" border="0" cellspacing="10" cellpadding="2"
class="maintablestyle">
 <tr>
   <td valign="top"><table width="90%" border="0" align="center"
cellpadding="0" cellspacing="0" class="onepxtable">
      <tr>

Vaibhav Arora (073210170)   Nitin Kumar (073702732) Pawan Kumar(073701271)   106
                               Findsjob.com


       <form name="form1" method="post" action="search_result.php">
         <td align="center" valign="middle" class="innertablestyle"><br>
          <input name="keyword" type="text" size="40">
          &nbsp;&nbsp;
          <select name="loc_id">
           <option value="" selected>Any Location</option>
           <?php
                          $loc_query=mysql_query("select * from
sbjbs_locations where sb_pid=0 order by sb_default desc,sb_loc_name");
                          while($loc=mysql_fetch_array($loc_query))
                          {
           ?>
           <option value="<?php echo $loc["sb_id"];?>"><?php echo
$loc["sb_loc_name"];
                          ?></option>
           <?php
                          }
                          ?>
          </select>
          &nbsp;<font class='normal'>
          <input name="show_save" type="hidden" id="show_save"
value="yes">
          </font>&nbsp;
          <input type="submit" name="Submit" value="Search">
          &nbsp;<a href="advance_search.php">Advanced Search</a>
<br>
          &nbsp; </td>
       </form>
      </tr>
    </table></td>
 </tr>
 <tr>
   <td valign="top"><table width="90%" border="0" align="center"
cellpadding="2" cellspacing="0" class="onepxtable">
      <tr>
       <td align="justify" class="innertablestyle"><?php
                    echo $policies["sb_welcome_msg"];
         ?></td>
      </tr>
    </table></td>
 </tr>
 <tr>
   <td valign="top"><table width="90%" border="0" align="center"
cellpadding="0" cellspacing="0" >
      <tr>
       <td><font class="normal"><b>Browse Jobs</b></font></td>
Vaibhav Arora (073210170)   Nitin Kumar (073702732) Pawan Kumar(073701271)   107
                                Findsjob.com


      </tr>
      <tr >
        <td class="onepxtable"><table width="100%" border="0"
cellspacing="1" cellpadding="2" class="innertablestyle">
           <?
       $cats_sql="select * from sbjbs_categories where sb_pid=$cid ";
       if($config["sb_cat_listing"]=="alpha")
       {
       $cats_sql.=" order by sb_cat_name";
       }
       else
       {
       $cats_sql.=" order by sb_order_index";
       }

      $cats_query=mysql_query($cats_sql);
      $cnt=1;
      while($cats=mysql_fetch_array($cats_query))
      {

           $rst_query=mysql_query("Select * from sbjbs_categories
where sb_pid=".$cats["sb_id"] );
           $clist=$cats["sb_id"];
           while ( $rst=mysql_fetch_array($rst_query) )
           {
                          $clist.="," . $rst["sb_id"];
                          $thislist="-1," . $rst["sb_id"];
                          while ( $rst=mysql_fetch_array($rst_query) )
                          {
                                  $clist.="," . $rst["sb_id"];
                                  $thislist.="," . $rst["sb_id"];
                          //echo $rst["sbcat_id"];
                          }
           $rst_query=mysql_query("Select * from sbjbs_categories
where sb_pid in (" . $thislist . ")" );
           }

      $sbcat_str= " and sb_cid IN (" .$clist . ")" ;

     $sbq_job_cat="select * from sbjbs_job_cats, sbjbs_jobs where
sb_approved='yes' and sbjbs_jobs.sb_id=sbjbs_job_cats.sb_job_id and
sb_company_id not in ($disapproved_list) $sbcat_str";

      $sbtotal=mysql_num_rows(mysql_query($sbq_job_cat));

//die();
Vaibhav Arora (073210170)   Nitin Kumar (073702732) Pawan Kumar(073701271)   108
                               Findsjob.com


      if($cnt%3==1)
      {
 ?>
         <tr>
          <td width="20">&nbsp;</td>
          <?
 }
 ?>
             <td align="left"><font class='normal'> <a
href="browsecats.php?cid=<? echo $cats["sb_id"];?>"> <? echo
$cats["sb_cat_name"]; ?></a>(<? echo $sbtotal; ?>)</font></td>
             <?
  if($cnt%3==0)
  {
  ?>
            </tr>
            <?
  }
        $cnt++;
}
?>
          </table></td>
       </tr>
      </table></td>
  </tr>
  <tr>
    <td valign="top"><table width="90%" border="0" align="center"
cellpadding="0" cellspacing="1" class="onepxtable">
       <tr class="titlestyle">
        <td width="40%">&nbsp;Featured Jobs</td>
        <td width="40%">&nbsp;Company</td>
        <td>&nbsp;Experience</td>
        <!--td>&nbsp;</td-->
       </tr>
       <?php
       $ff_jobs_q=mysql_query("select * from sbjbs_jobs where
sb_approved='yes' and
               sb_front_featured='yes' and sb_company_id not in
($disapproved_list)");
                $num_rows=mysql_num_rows($ff_jobs_q);
                $max_allowed=$config["sb_featured_cnt"];
                      unset($number);
                      $number[0]=-1;
                      if($num_rows>$max_allowed)
                      {
                            for($i=0;$i<$max_allowed;$i++)
Vaibhav Arora (073210170)   Nitin Kumar (073702732) Pawan Kumar(073701271)   109
                                   Findsjob.com


                            {
                                    $unique=0;
                                    while($unique==0)
                                    {
                                          $j=rand(0,$num_rows-1);
                                          for($k=0;$k<count($number);$k++)
                                          {
                                                 //echo $j;
                                                 if($number[$k]==$j)
                                                 break;
                                          }
                                          if($k>(count($number)-1))
                                          {
                                                 $unique=1;
                                          }
                                    }
                                    $number[$i]=$j;

                         }
                   }// end if num > no_allowed
                                /*for($k=0;$k<count($number);$k++)
                                            {
                                                 echo $number[$k]." ";
                                            }*/

            $row=0;
            $cnt=0;
            $ff_jobs=mysql_fetch_array($ff_jobs_q);
            while (($ff_jobs)&&($cnt<$max_allowed))
            {
                   $display=0;
                   if($num_rows>$max_allowed)
                   {
                          for($k=0;$k<count($number);$k++)
                          {
                                if($number[$k]==$row)
                                {
                                      $display=1;
                                }
                          }
                   }
                   else
                   {
                          $display=1;
                   }
                   if($display==1)
Vaibhav Arora (073210170)       Nitin Kumar (073702732) Pawan Kumar(073701271)   110
                               Findsjob.com


                   {
                   $comp=mysql_fetch_array(mysql_query("select * from
sbjbs_companies
                   where sb_id=".$ff_jobs["sb_company_id"]));

                                      $rec_class="innertablestyle";
                                      if($cnt%2==0)
                                      { $rec_class="alternatecolor"; }
                                      if($ff_jobs["sb_highlight"]=="yes")
                                      {
                                      $rec_class="highlighted";
                                      if($cnt%2==0)
                                      { $rec_class="highlighted1"; }
                                      }

             ?>
     <tr class="<?php echo $rec_class;?>" height="25">
       <td>&nbsp;<font class="normal"><a
href="view_job.php?sb_id=<?php echo $ff_jobs["sb_id"];?>">
        <?php
               if($ff_jobs["sb_bold"]=="yes")
               { echo "<b>";}
               echo $ff_jobs["sb_title"];
               if($ff_jobs["sb_bold"]=="yes")
               { echo "</b>";}
               ?>
        </a> </font></td>
       <td>&nbsp;<font class="normal">
        <?php
                     if($comp["sb_show_profile"]=="yes")
                     { echo "<a
href='view_profile.php?id=".$comp["sb_id"]."'>";}
               if($ff_jobs["sb_bold"]=="yes")
               { echo "<b>";}
              echo $comp["sb_name"];
               if($ff_jobs["sb_bold"]=="yes")
               { echo "</b>";}
                     if($comp["sb_show_profile"]=="yes")
                     { echo "</a>";}
              ?>
        </font></td>
       <td>&nbsp;<font class="normal">
        <?php
               if($ff_jobs["sb_bold"]=="yes")
               { echo "<b>";}
      switch($ff_jobs["sb_experience"])
Vaibhav Arora (073210170)   Nitin Kumar (073702732) Pawan Kumar(073701271)   111
                               Findsjob.com


            {
                   case -1:   echo   'No preference'; break;
                   case 0:            echo 'Fresher'; break;
                   case 1:            echo 'Less than 1 Year'; break;
                   case 2:            echo '1 to 2 Years'; break;
                   case 3:            echo '2 to 5 Years'; break;
                   case 4:            echo '5 to 7 Years'; break;
                   case 5:            echo '7 to 10 Years'; break;
                   case 6:            echo '10 to 15 Years'; break;
                   case 7:            echo 'More than 15 Years'; break;
            }      //end switch

                if($ff_jobs["sb_bold"]=="yes")
                { echo "</b>";}
              ?>
         </font></td>
        <!--td>&nbsp;</td-->
      </tr>
      <?php
                      $cnt++;
                      }//if display
              $ff_jobs=mysql_fetch_array($ff_jobs_q);
                      $row++;
              }// end while
     ?>
     </table></td>
  </tr>
  <tr>
   <td valign="top"><table width="90%" border="0" align="center"
cellpadding="0" cellspacing="1" class="onepxtable">
      <tr class="titlestyle">
        <td width="40%">&nbsp;Latest Jobs</td>
        <td width="40%">&nbsp;Company</td>
        <td>&nbsp;Experience</td>
        <!--td>&nbsp;</td-->
      </tr>
      <?php
      $jobs_q=mysql_query("select * from sbjbs_jobs where
sb_approved='yes' and sb_company_id not in ($disapproved_list) order by
sb_id desc");
          $num_rows=mysql_num_rows($ff_jobs_q);
              $cnt=0;
              while
(($jobs=mysql_fetch_array($jobs_q))&&($cnt<$max_allowed))
              {


Vaibhav Arora (073210170)   Nitin Kumar (073702732) Pawan Kumar(073701271)   112
                               Findsjob.com


                   $comp=mysql_fetch_array(mysql_query("select * from
sbjbs_companies
                   where sb_id=".$jobs["sb_company_id"]));

                                      $rec_class="innertablestyle";
                                      if($cnt%2==0)
                                      { $rec_class="alternatecolor"; }
                                      if($jobs["sb_highlight"]=="yes")
                                      {
                                      $rec_class="highlighted";
                                      if($cnt%2==0)
                                      { $rec_class="highlighted1"; }
                                      }

             ?>
     <tr class="<?php echo $rec_class;?>" height="25">
       <td>&nbsp;<font class="normal"><a
href="view_job.php?sb_id=<?php echo $jobs["sb_id"];?>">
        <?php
                if($jobs["sb_bold"]=="yes")
                { echo "<b>";}
                echo $jobs["sb_title"];
                if($jobs["sb_bold"]=="yes")
                { echo "</b>";}
                ?>
        </a> </font></td>
       <td>&nbsp;<font class="normal">
        <?php
                     if($comp["sb_show_profile"]=="yes")
                     { echo "<a
href='view_profile.php?id=".$comp["sb_id"]."'>";}
                if($jobs["sb_bold"]=="yes")
                { echo "<b>";}
               echo $comp["sb_name"];
                if($jobs["sb_bold"]=="yes")
                { echo "</b>";}
                     if($comp["sb_show_profile"]=="yes")
                     { echo "</a>";}
               ?>
        </font></td>
       <td>&nbsp;<font class="normal">
        <?php
                if($jobs["sb_bold"]=="yes")
                { echo "<b>";}
      switch($jobs["sb_experience"])
             {
Vaibhav Arora (073210170)   Nitin Kumar (073702732) Pawan Kumar(073701271)   113
                               Findsjob.com


                   case -1:   echo   'No preference'; break;
                   case 0:            echo 'Fresher'; break;
                   case 1:            echo 'Less than 1 Year'; break;
                   case 2:            echo '1 to 2 Years'; break;
                   case 3:            echo '2 to 5 Years'; break;
                   case 4:            echo '5 to 7 Years'; break;
                   case 5:            echo '7 to 10 Years'; break;
                   case 6:            echo '10 to 15 Years'; break;
                   case 7:            echo 'More than 15 Years'; break;
            }      //end switch

               if($jobs["sb_bold"]=="yes")
               { echo "</b>";}
             ?>
        </font></td>
       <!--td>&nbsp;</td-->
      </tr>
      <?php
                    $cnt++;
             }// end while
    ?>
    </table></td>
  </tr>
</table>
<?php
}
include_once'template.php';
?>


Addmember.php

<?
include_once("myconnect.php");

$errcnt=0;
if(count($_POST)<>0)        //IF SOME FORM WAS POSTED DO
VALIDATION
{
      $sb_dob_day=(int)$_REQUEST['sb_dob_day'];
      $sb_dob_month=(int)$_REQUEST['sb_dob_month'];
      $sb_dob_year=(int)$_REQUEST['sb_dob_year'];

            if(!get_magic_quotes_gpc())
            {


Vaibhav Arora (073210170)   Nitin Kumar (073702732) Pawan Kumar(073701271)   114
                                 Findsjob.com



         $username=str_replace("$","\$",addslashes($_REQUEST["usernam
e"]));

         $sb_title=str_replace("$","\$",addslashes($_REQUEST["sb_title"]));

         $password=str_replace("$","\$",addslashes($_REQUEST["password
"]));

         $firstname=str_replace("$","\$",addslashes($_REQUEST["firstname
"]));

         $lastname=str_replace("$","\$",addslashes($_REQUEST["lastname"
]));

         $email=str_replace("$","\$",addslashes($_REQUEST["email"]));

         $street=str_replace("$","\$",addslashes($_REQUEST["street"]));

         $city=str_replace("$","\$",addslashes($_REQUEST["city"]));

         $state=str_replace("$","\$",addslashes($_REQUEST["state"]));

        $other_state=str_replace("$","\$",addslashes($_REQUEST["other_st
ate"]));

         $phone=str_replace("$","\$",addslashes($_REQUEST["phone"]));

         $phone1=str_replace("$","\$",addslashes($_REQUEST["phone1"]));

         $phone2=str_replace("$","\$",addslashes($_REQUEST["phone2"]));

         $mobile=str_replace("$","\$",addslashes($_REQUEST["mobile"]));

         $zip_code=str_replace("$","\$",addslashes($_REQUEST["zip_code"]))
;
               }
               else
               {

         $username=str_replace("$","\$",$_REQUEST["username"]);
                   $sb_title=str_replace("$","\$",$_REQUEST["sb_title"]);

         $password=str_replace("$","\$",$_REQUEST["password"]);

         $firstname=str_replace("$","\$",$_REQUEST["firstname"]);
Vaibhav Arora (073210170)    Nitin Kumar (073702732) Pawan Kumar(073701271)   115
                               Findsjob.com



      $lastname=str_replace("$","\$",$_REQUEST["lastname"]);
                 $email=str_replace("$","\$",$_REQUEST["email"]);
                 $street=str_replace("$","\$",$_REQUEST["street"]);
                 $city=str_replace("$","\$",$_REQUEST["city"]);
                 $state=str_replace("$","\$",$_REQUEST["state"]);

      $other_state=str_replace("$","\$",$_REQUEST["other_state"]);
                  $phone=str_replace("$","\$",$_REQUEST["phone"]);
                  $phone1=str_replace("$","\$",$_REQUEST["phone1"]);
                  $phone2=str_replace("$","\$",$_REQUEST["phone2"]);
                  $mobile=str_replace("$","\$",$_REQUEST["mobile"]);

      $zip_code=str_replace("$","\$",$_REQUEST["zip_code"]);
      }
      if($state=="")
      { $state=$other_state; }

      $phone_no="";
      if(strlen(trim($phone))<>0)
      {$phone_no.=$phone;}
      $phone_no.="-";
      if(strlen(trim($phone1))<>0)
      {$phone_no.=$phone1;}
      $phone_no.="-";
      if(strlen(trim($phone2))<>0)
      {$phone_no.=$phone2;}

     if ( strlen(trim($username)) == 0 )
     {
             $errs[$errcnt]="Username must be provided";
             $errcnt++;
     }
     elseif(preg_match ("/[^a-zA-Z0-9_]/", $_REQUEST["username"]))
     {
             $errs[$errcnt]="Username can contain only Alpha-Numeric
and Underscore character";
             $errcnt++;
     }
     elseif(mysql_num_rows(mysql_query("select * from sbjbs_seekers
where sb_username='$username' or sb_email_addr='$email'"))!= 0)
     {
                    $errs[$errcnt]="Some Member with same Username or
Email Address already exists";
             $errcnt++;
     }
Vaibhav Arora (073210170)   Nitin Kumar (073702732) Pawan Kumar(073701271)   116
                               Findsjob.com



       if ( !isset( $_REQUEST["password"] ) ||
(strlen(trim($_REQUEST["password"])) == 0) )
       {
                $errs[$errcnt]="Password must be provided";
                $errcnt++;
       }
       elseif( strcmp($_REQUEST["password"],$_REQUEST["pwd2"]) != 0)
       {
                $errs[$errcnt]="Retyped Password does not match the
Password";
                $errcnt++;
       }

     if ( strlen(trim($firstname)) == 0 )
     {
             $errs[$errcnt]="Firstname must be provided";
             $errcnt++;
     }
     elseif(preg_match ("/[;<>&]/", $_REQUEST["firstname"]))
     {
             $errs[$errcnt]="Firstname can not have any special
character (e.g. & ; < >)";
             $errcnt++;
     }

       if ( strlen(trim($lastname)) == 0 )
       {
               $errs[$errcnt]="Lastname must be provided";
               $errcnt++;
       }
       elseif(preg_match ("/[;<>&]/", $_REQUEST["lastname"]))
       {
               $errs[$errcnt]="Lastname can not have any special character
(e.g. & ; < >)";
               $errcnt++;
       }

      if(!checkdate($sb_dob_month, $sb_dob_day, $sb_dob_year))
      {
              $errs[$errcnt]="Date of Birth must be a valid date";
              $errcnt++;
      }
      elseif( ($sb_dob_year< date("Y",time())-100 ) ||
($sb_dob_year>=date("Y",time())) )
      {
Vaibhav Arora (073210170)   Nitin Kumar (073702732) Pawan Kumar(073701271)   117
                               Findsjob.com


            $errs[$errcnt]="Date of Birth has suspecious year value";
            $errcnt++;
      }


             if ( !isset( $_REQUEST["email"] ) ||
(strlen(trim($_REQUEST["email"] )) == 0) )
             {
                      $errs[$errcnt]="Email Address must be provided";
                      $errcnt++;
             }
             elseif(preg_match ("/[;<>&]/", $_REQUEST["email"]))
             {
                      $errs[$errcnt]="Email can not have any special
character (e.g. & ; < >)";
                      $errcnt++;
             }

       if ( strlen(trim($street)) == 0 )
       {
               $errs[$errcnt]="Street must be provided";
               $errcnt++;
       }
       elseif(preg_match ("/[;<>&]/", $_REQUEST["street"]))
       {
               $errs[$errcnt]="Street can not have any special character
(e.g. & ; < >)";
               $errcnt++;
       }

       if ( strlen(trim($city)) == 0 )
       {
               $errs[$errcnt]="City must be provided";
               $errcnt++;
       }
       elseif(preg_match ("/[;<>&]/", $_REQUEST["city"]))
       {
               $errs[$errcnt]="City can not have any special character (e.g.
& ; < >)";
               $errcnt++;
       }

      if ( strlen(trim($state)) == 0 )
      {
              $errs[$errcnt]="State must be provided";
              $errcnt++;
Vaibhav Arora (073210170)   Nitin Kumar (073702732) Pawan Kumar(073701271)     118
                               Findsjob.com


       }
       elseif(preg_match ("/[;<>&]/", $_REQUEST["state"]))
       {
              $errs[$errcnt]="State can not have any special character (e.g.
& ; < >)";
              $errcnt++;
       }

     if ( strlen(trim($zip_code)) == 0 )
     {
             $errs[$errcnt]="Zip/Postal Code must be provided";
             $errcnt++;
     }
     elseif(preg_match ("/[;<>&]/", $_REQUEST["zip_code"]))
     {
             $errs[$errcnt]="Zip/Postal Code can not have any special
character (e.g. & ; < >)";
             $errcnt++;
     }

      if ( $_REQUEST["country"]== 0 )
      {
             $errs[$errcnt]="Country must be choosen";
             $errcnt++;
      }

       if(preg_match ("/[;<>&]/", $phone_no))
       {
              $errs[$errcnt]="Phone No. can not have any special character
(e.g. & ; < >)";
              $errcnt++;
       }

       if(preg_match ("/[;<>&]/", $mobile))
       {
              $errs[$errcnt]="Mobile can not have any special character
(e.g. & ; < >)";
              $errcnt++;
       }
       if($errcnt==0)
       {
//            $sb_dob=date("YmdHis", mktime
(0,0,0,$sb_dob_month,$sb_dob_day,$sb_dob_year));
//     echo mktime
(0,0,0,$sb_dob_month,$sb_dob_day,$sb_dob_year).'<br>';
//     echo "$sb_dob_month,$sb_dob_day,$sb_dob_year";
Vaibhav Arora (073210170)   Nitin Kumar (073702732) Pawan Kumar(073701271)     119
                               Findsjob.com



            if($sb_dob_month<10)
                   $sb_dob_month="0".$sb_dob_month;
            if($sb_dob_day<10)
                   $sb_dob_day="0".$sb_dob_day;

       $sb_dob=$sb_dob_year.$sb_dob_month.$sb_dob_day."000000";

      $suspended="no";
      $config=mysql_fetch_array(mysql_query("select * from
sbjbs_config"));

       if($config["sb_mem_approval"]=="admin")
       {$suspended="yes";}


       $query_insert="Insert into `sbjbs_seekers`
       ( sb_username ,sb_password ,sb_last_login, sb_signup_on
,sb_suspended, sb_title, sb_firstname , sb_lastname , sb_dob,
sb_email_addr , sb_addr1 , sb_city , sb_state , sb_zip , sb_country ,
sb_telephone, sb_mobile)
VALUES        ( '$username'
,'$password',0,'".date("YmdHis",time())."','$suspended', '$sb_title',
'$firstname' , '$lastname', '$sb_dob',
'$email','$street','$city','$state','$zip_code'
,".$_REQUEST["country"].",'$phone_no', '$mobile')";
//echo $query_insert;
//die();
              $rs_insert=mysql_query($query_insert);
              if(mysql_affected_rows()>0)
              {

       if(isset($_REQUEST["subscribe"])&&($_REQUEST["subscribe"]=="ye
s"))
            {
                $check_prev=mysql_fetch_array(mysql_query("select * from
sbjbs_newsletter where sb_email='$email'"));
                if(!$check_prev)
                {
                mysql_query("insert into sbjbs_newsletter (sb_email) values
('$email')");
                }
              }
              mysql_query ("delete from sbjbs_signups where
sb_email='$email'");
      if($config["sb_mem_approval"]=="auto")
Vaibhav Arora (073210170)   Nitin Kumar (073702732) Pawan Kumar(073701271)    120
                               Findsjob.com


      {
            //sending welcome mail
            $sbrow_con=mysql_fetch_array(mysql_query("select * from
sbjbs_config"));
            $sb_null_char=$sbrow_con["sb_null_char"];
            $sb_site_root=$sbrow_con["sb_site_root"];

           $rs0= mysql_fetch_array(mysql_query("SELECT * FROM
sbjbs_seekers WHERE sb_email_addr='$email'"));
           if($rs0)
           {
           //Reads email to be sebt
           $sql = "SELECT * FROM sbjbs_mails where sb_mailid=1" ;
           $rs_query=mysql_query($sql);
           $login_url=$sb_site_root."/signin.php";

            if ( $rs=mysql_fetch_array($rs_query) )// if mail
            {
              if($rs["sb_status"]=="yes")
               {
                                  $from =$rs["sb_fromid"];
                                  $to = $rs0["sb_email_addr"];
                                  $subject =$rs["sb_subject"];

             $body=str_replace("%title%",
$rs0["sb_title"],str_replace("%email%",
$rs0["sb_email_addr"],str_replace("%password%",$rs0["sb_password"],str
_replace("%lname%", $rs0["sb_lastname"],str_replace("%fname%",
$rs0["sb_firstname"],str_replace("%username%", $rs0["sb_username"],
$rs["sb_mail"]) )))));


      $body=str_replace("%signup_url%",$sb_null_char,str_replace("%log
in_url%",$login_url,$body));

            $header="From:" . $from . "\r\n" ."Reply-To:". $from ;

     if(isset($rs["sb_html_format"])&&($rs["sb_html_format"]=="yes"))
             {
                    $header .= "\r\nMIME-Version: 1.0";
                    $header .= "\r\nContent-type: text/html; charset=iso-
8859-1\r\n";
//                  $body=str_replace("\n","<br>",$body);
             }



Vaibhav Arora (073210170)   Nitin Kumar (073702732) Pawan Kumar(073701271)   121
                               Findsjob.com


 //   echo "--from:-$from----to:-$to---sub:-$subject----head:-$header----
";
//    echo "<pre>$body</pre>";
//    die();
                    if( $rs["sb_status"]=='yes')
                             mail($to,$subject,$body,$header);
               }// end if status is on
               }// end if mail
             }
      }      //if approval==auto
             //mail ends here
             header ("Location: signin.php?errmsg=".urlencode("You are
successfully registered with us"));
             die();
             }
             else
             {
                    header("Location:
gen_confirm.php?errmsg=".urlencode("Some Error Occurred, Please try
again."));
                    die();
             }
      }                     //end if-errcnt==0
}                   //end if count-post


function main()
{
global $errs, $errcnt;

$config=mysql_fetch_array(mysql_query("select * from sbjbs_config"));

$invalidaccess="No";
if( !isset($_REQUEST["rnum"]) || !isset($_REQUEST["email"] ) )
{
$invalidaccess="Yes";
}
else
{
        if(!get_magic_quotes_gpc())
        {

      $email=str_replace("$","\$",addslashes($_REQUEST["email"]));

      $rnum=str_replace("$","\$",addslashes($_REQUEST["rnum"]));
      }
Vaibhav Arora (073210170)   Nitin Kumar (073702732) Pawan Kumar(073701271)   122
                               Findsjob.com


      else
      {
             $email=str_replace("$","\$",$_REQUEST["email"]);
             $rnum=str_replace("$","\$",$_REQUEST["rnum"]);
        }
        $rs0_query=mysql_query ("select * from sbjbs_signups where
sb_email='$email' and sb_rnum='$rnum' ");
        if (!($rs0=mysql_fetch_array($rs0_query)))
        {
        $invalidaccess="Yes";
        }
}
if (($invalidaccess=="Yes")&&($config["sb_signup_verification"]=="yes"))
{
?>

<table width="90%" border="0" align="center" cellpadding="2"
cellspacing="0" class="errorstyle">
  <tr>
   <td><strong>&nbsp;Invalid
     Access</strong></td>
  </tr>
</table>
<?
return;
}

$showform="";
$sb_title='';
$username="";
$password="";
$firstname="";
$lastname="";

$email="";
if(isset($_REQUEST["email"]))
{ $email=$_REQUEST["email"]; }

$street="";
$city="";
$state="";
$country="";
$zip_code="";
$phone="";
$phone1="";
$phone2="";
Vaibhav Arora (073210170)   Nitin Kumar (073702732) Pawan Kumar(073701271)   123
                               Findsjob.com


$fax="";
$fax1="";
$fax2="";
$mobile="";
$subscribe="";
$other_state="";
$sb_dob_day='';
$sb_dob_month='';
$sb_dob_year='';

//IF SOME FORM WAS POSTED DO VALIDATION
if ( count($_POST)>0 )
{
$username=$_REQUEST["username"];
$sb_title=$_REQUEST["sb_title"];
$firstname=$_REQUEST["firstname"];
$lastname=$_REQUEST["lastname"];
$email=$_REQUEST["email"];
$street=$_REQUEST["street"];
$city=$_REQUEST["city"];
$state=$_REQUEST["state"];
$country=$_REQUEST["country"];
$zip_code=$_REQUEST["zip_code"];
$phone=$_REQUEST["phone"];
$phone1=$_REQUEST["phone1"];
$phone2=$_REQUEST["phone2"];
$mobile=$_REQUEST["mobile"];
if(isset($_REQUEST["subscribe"]))
$subscribe=$_REQUEST["subscribe"];
$other_state=$_REQUEST["other_state"];
$sb_dob_day=$_REQUEST['sb_dob_day'];
$sb_dob_month=$_REQUEST['sb_dob_month'];
$sb_dob_year=$_REQUEST['sb_dob_year'];
}


if (count($_POST)>0)
{

if ( $errcnt<>0 )
{
?>
<table width="90%" border="0" align="center" cellpadding="2"
cellspacing="0" class="errorstyle">
  <tr>


Vaibhav Arora (073210170)   Nitin Kumar (073702732) Pawan Kumar(073701271)   124
                               Findsjob.com


  <td colspan="2"><strong>&nbsp;Your request cannot be processed
due to following
    reasons</strong></td>
 </tr>
 <tr height="10">
  <td colspan="2"></td>
 </tr>
 <?

for ($i=0;$i<$errcnt;$i++)
{
?>
  <tr valign="top">
   <td width="6%">&nbsp;<?php echo $i+1;?></td>
   <td width="94%"><?php echo $errs[$i]; ?></td>
  </tr>
  <?
}
?>
</table>
<?

}

}

?>
<SCRIPT language=javascript>
//<!--
       function emailCheck (emailStr) {
       var emailPat=/^(.+)@(.+)$/
       var specialChars="\\(\\)<>@,;:\\\\\\\"\\.\\[\\]"
       var validChars="\[^\\s" + specialChars + "\]"
       var quotedUser="(\"[^\"]*\")"
       var ipDomainPat=/^\[(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})\]$/
       var atom=validChars + '+'
       var word="(" + atom + "|" + quotedUser + ")"
       var userPat=new RegExp("^" + word + "(\\." + word + ")*$")
       var domainPat=new RegExp("^" + atom + "(\\." + atom +")*$")
       var matchArray=emailStr.match(emailPat)
       if (matchArray==null) {
              alert("Email address seems incorrect (check @ and .'s)")
              return false
       }
       var user=matchArray[1]
       var domain=matchArray[2]
Vaibhav Arora (073210170)   Nitin Kumar (073702732) Pawan Kumar(073701271)   125
                               Findsjob.com


     if (user.match(userPat)==null) {
             alert("The username doesn't seem to be valid.")
             return false
     }
     var IPArray=domain.match(ipDomainPat)
     if (IPArray!=null) {
             // this is an IP address
               for (var i=1;i<=4;i++) {
                     if (IPArray[i]>255) {
                            alert("Destination IP address is invalid!")
                     return false
                     }
             }
             return true
     }
     var domainArray=domain.match(domainPat)
     if (domainArray==null) {
             alert("The domain name doesn't seem to be valid.")
             return false
     }
     var atomPat=new RegExp(atom,"g")
     var domArr=domain.match(atomPat)
     var len=domArr.length
     if (domArr[domArr.length-1].length<2 ||
             domArr[domArr.length-1].length>4) {
        alert("The address must end in a valid domain, or two letter
country.")
        return false
     }
     if (len<2) {
        var errStr="This address is missing a hostname!"
        alert(errStr)
        return false
     }
     return true;
     }



  function validate(form)
  {
  //var day_var=
// var date_var= new
Date(form.sb_dob_year.value,(form.sb_dob_month.value-
1),form.sb_dob_day.value,0,0,0);
 // alert(date_var.toString());
Vaibhav Arora (073210170)   Nitin Kumar (073702732) Pawan Kumar(073701271)   126
                               Findsjob.com



     if ( (form.username.value == "")) {
        alert('Please Specify Username!');
                form.username.focus();
        return false;
        }
     if((form.username.value.match(/[^a-zA-Z0-9_]/)))
              {
                    alert("Username can contain only alphanumeric and
underscore character");
                    form.username.focus();
                    return(false);
              }

     if(form.password.value == "")
             {
                alert('Please Specify Password.');
        form.password.focus();
                return false;
     }
             if (form.password.value != form.pwd2.value)
             {
                     alert('Passwords do not match.');
                     form.pwd2.value="";
                     form.password.focus();
                     form.password.select();
                     return false;
             }

       if ( form.firstname.value == "" ) {
          alert('Please Specify Firstname!');
                 form.firstname.focus();
          return false;
          }
       if(form.firstname.value.match(/[&<>]+/))
               {
                      alert("Please remove Invalid characters from Firstname
(e.g. & < >)");
                      form.firstname.focus();
                      return(false);
               }
       if ( form.lastname.value == "" ) {
          alert('Please Specify Lastname!');
                 form.lastname.focus();
          return false;
          }
Vaibhav Arora (073210170)   Nitin Kumar (073702732) Pawan Kumar(073701271)     127
                                 Findsjob.com


       if(form.lastname.value.match(/[&<>]+/))
              {
                    alert("Please remove Invalid characters from Lastname
(e.g. & < >)");
                    form.lastname.focus();
                    return(false);
              }

             if ( isNaN(form.sb_dob_year.value) || form.sb_dob_year.value
== "" || form.sb_dob_year.value <= 0 ) // ||
form.sb_dob_year.value<1900 || form.sb_dob_year.value>2000 )
             {
             alert('Please Specify valid Year in Date of Birth!');
                     form.sb_dob_year.focus();
                     return false;
             }

  if(!form.email.value.match(/[a-zA-Z\.\@\d\_]/))
              {
        alert('Invalid e-mail address.');
        form.email.focus();
                 return false;
      }

      if (!emailCheck (form.email.value) )
             {
                   form.email.focus();
                   return (false);
             }

       if ( form.street.value == "" ) {
          alert('Please Specify Street!');
                 form.street.focus();
          return false;
          }
       if(form.street.value.match(/[&<>]+/))
               {
                      alert("Please remove Invalid characters from Street
(e.g. & < >)");
                      form.street.focus();
                      return(false);
               }

      if ( form.city.value == "" ) {
         alert('Please Specify City!');
                form.city.focus();
Vaibhav Arora (073210170)    Nitin Kumar (073702732) Pawan Kumar(073701271)   128
                                  Findsjob.com


            return false;
            }
                if(form.city.value.match(/[&<>]+/))
                {
                       alert("Please remove Invalid characters from City(e.g. &
< >)");
                      form.city.focus();
                      return(false);
                   }
          if ( (form.state.selectedIndex == 0 ) && (form.other_state.value ==
"") ) {
           alert('Please Specify State!');
                   form.state.focus();
           return false;
           }
                if(form.other_state.value.match(/[&<>]+/))
                {
                        alert("Please remove Invalid characters from State(e.g.
& < >)");
                        form.other_state.focus();
                        return(false);
                }
                if ( form.zip_code.value == "" ) {
           alert('Please Specify Zip/Postal Code!');
                   form.zip_code.focus();
           return false;
           }
        if(form.zip_code.value.match(/[&<>]+/))
                {
                        alert("Please remove Invalid characters from Zip/Postal
Code (e.g. & < >)");
                        form.zip_code.focus();
                        return(false);
                }
if ( form.country.selectedIndex == 0 ) {
           alert('Please Choose a Country!');
                   form.country.focus();
           return false;
           }
        return true;
  }
// -->
</SCRIPT>
<form name="form1" method="post" action="addmember.php"
onSubmit="return validate(this);">


Vaibhav Arora (073210170)     Nitin Kumar (073702732) Pawan Kumar(073701271)      129
                               Findsjob.com


 <table width="90%" border="0" align="center" cellpadding="0"
cellspacing="0" class="onepxtable">
   <tr class="titlestyle">
     <td>&nbsp;Signup Process</td>
   </tr>
   <tr>
     <td><table width="100%" border="0" align="center" cellpadding="2"
cellspacing="5">
       <tr valign="top">
         <td width="40%" align="right" class="innertablestyle"><font
class="normal"><strong>Username</strong></font></td>
         <td width="6"><font class="red">*</font></td>
         <td width="60%"><input name="username" type="text"
value="<?php echo $username ; ?>" size="30" maxlength="30">
          <br>
          <font class="smalltext">can not be changed Later</font></td>
       </tr>
       <tr valign="top">
         <td align="right" class="innertablestyle"><font
class="normal"><strong>Password</strong></font></td>
         <td><font class="red">*</font></td>
         <td><font face="Arial, Helvetica, sans-serif" size="2">
          <input name="password" type="password" value="<?php echo
$password; ?>" size="30" maxlength="30">
          </font></td>
       </tr>
       <tr valign="top">
         <td align="right" class="innertablestyle"><font
class="normal"><strong>Retype
          Password </strong></font></td>
         <td><font class="red">*</font></td>
         <td><font face="Arial, Helvetica, sans-serif" size="2">
          <input name="pwd2" type="password" id="pwd2" value="<?php
echo $password; ?>" size="30" maxlength="30">
          </font></td>
       </tr>
       <tr valign="top">
         <td align="right" class="innertablestyle"><font
class="normal"><strong>Title</strong></font></td>
         <td><font class="red">*</font></td>
         <td><font face="Verdana, Arial" size=2>
          <select name=sb_title id="sb_title">
           <option value="Mr." <?php echo ($sb_title=='Mr.')?'selected':'';
?>>Mr.</option>
           <option value="Ms." <?php echo ($sb_title=='Ms.')?'selected':'';
?>>Ms.</option>
Vaibhav Arora (073210170)   Nitin Kumar (073702732) Pawan Kumar(073701271)    130
                               Findsjob.com


           <option value="Mrs." <?php echo
($sb_title=='Mrs.')?'selected':''; ?>>Mrs.</option>
           <!--OPTION value="Dr." <?php echo
($sb_title=='Dr.')?'selected':''; ?>>Dr.</OPTION-->
          </select>
          </font><font face="Arial, Helvetica, sans-serif" size="2">&nbsp;
</font></td>
       </tr>
       <tr valign="top">
         <td align="right" class="innertablestyle"><font
class="normal"><strong>Firstname</strong></font></td>
         <td><font class="red">*</font></td>
         <td><font face="Arial, Helvetica, sans-serif" size="2">
          <input name="firstname" type="text" value="<?php echo
$firstname; ?>" size="30" maxlength="30">
          </font></td>
       </tr>
       <tr valign="top">
         <td align="right" class="innertablestyle"><font
class="normal"><strong>Lastname</strong></font></td>
         <td><font class="red">*</font></td>
         <td><font face="Arial, Helvetica, sans-serif" size="2">
          <input name="lastname" type="text" value="<?php echo
$lastname ; ?>" size="30" maxlength="30">
          </font></td>
       </tr>
       <tr valign="top">
         <td align="right" class="innertablestyle"><font
class="normal"><strong>Date
          of Birth</strong></font></td>
         <td><font class="red">*</font></td>
         <td><table border="0" align="left" cellpadding="0"
cellspacing="0">
           <tr>
             <td width="100"><font class="smalltext">Month</font></td>
             <td width="50"><font class="smalltext">Day</font></td>
             <td><font class="smalltext">Year</font></td>
           </tr>
           <tr>
             <td><font face="Arial, Helvetica, sans-serif" size="2">
              <select name="sb_dob_month">
                <option value="1" <?php
echo($sb_dob_month==1)?'selected':''; ?>>January</option>
                <option value="2" <?php
echo($sb_dob_month==2)?'selected':''; ?>>February</option>


Vaibhav Arora (073210170)   Nitin Kumar (073702732) Pawan Kumar(073701271)   131
                               Findsjob.com


               <option           value="3" <?php
echo($sb_dob_month==3)?'selected':''; ?>>March</option>
               <option           value="4" <?php
echo($sb_dob_month==4)?'selected':''; ?>>April</option>
               <option           value="5" <?php
echo($sb_dob_month==5)?'selected':''; ?>>May</option>
               <option           value="6" <?php
echo($sb_dob_month==6)?'selected':''; ?>>June</option>
               <option           value="7" <?php
echo($sb_dob_month==7)?'selected':''; ?>>July</option>
               <option           value="8" <?php
echo($sb_dob_month==8)?'selected':''; ?>>August</option>
               <option           value="9" <?php
echo($sb_dob_month==9)?'selected':''; ?>>September</option>
               <option           value="10" <?php
echo($sb_dob_month==10)?'selected':''; ?>>October</option>
               <option           value="11" <?php
echo($sb_dob_month==11)?'selected':''; ?>>November</option>
               <option           value="12" <?php
echo($sb_dob_month==12)?'selected':''; ?>>December</option>
              </select>
              </font></td>
             <td><font face="Arial, Helvetica, sans-serif" size="2">
              <select name="sb_dob_day">
               <?php      for($sbi=1;$sbi<=31;$sbi++)
                          {
                                echo '<option value="'.$sbi.'" ';
                                echo ($sb_dob_day==$sbi)?'selected':'';
                                echo '>'.$sbi.'</option>';
                          }?>
              </select>
              </font></td>
             <td><font face="Arial, Helvetica, sans-serif" size="2">
              <input type="text" name="sb_dob_year" value="<?php echo
$sb_dob_year; ?>" size="8"
                     maxlength="4">
              </font></td>
           </tr>
          </table>
          <font face="Arial, Helvetica, sans-serif"
size="2">&nbsp;</font></td>
       </tr>
       <?php
      if($config["sb_signup_verification"]=="no")
      {
   ?>
Vaibhav Arora (073210170)   Nitin Kumar (073702732) Pawan Kumar(073701271)   132
                               Findsjob.com


        <tr valign="top">
          <td align="right" class="innertablestyle"><font
class="normal"><strong>Email</strong></font></td>
          <td><font class="red">*</font></td>
          <td><font face="Arial, Helvetica, sans-serif" size="2">
            <input name="email" type="text" value="<?php echo $email; ?>"
size="30" maxlength="40">
            </font></td>
        </tr>
        <?php
       }
       else
       {
         ?>
        <input name="email" type="hidden" value="<?php echo $email;
?>" size="30" maxlength="40">
        <input name="rnum" type="hidden" value="<?php echo
$_REQUEST["rnum"]; ?>" >
        <?
       }
   ?>
        <tr valign="top">
          <td align="right" class="innertablestyle"><font
class="normal"><strong>Street</strong></font></td>
          <td><font class="red">*</font></td>
          <td><font face="Arial, Helvetica, sans-serif" size="2">
            <input type="text" size="30" maxlength="30" name="street"
value="<?php echo $street; ?>" >
            </font></td>
        </tr>
        <tr valign="top">
          <td align="right" class="innertablestyle"><font
class="normal"><strong>City</strong></font></td>
          <td><font class="red">*</font></td>
          <td><font face="Arial, Helvetica, sans-serif" size="2">
            <input type="text" size="30" maxlength="30" name="city"
value="<?php echo $city; ?>" >
            </font></td>
        </tr>
        <tr valign="top">
          <td align="right" class="innertablestyle"><font
class="normal"><strong>State</strong></font></td>
          <td><font class="red">*</font></td>
          <td><table width="100%" border="0" cellspacing="0"
cellpadding="0">
             <tr>
Vaibhav Arora (073210170)   Nitin Kumar (073702732) Pawan Kumar(073701271)   133
                               Findsjob.com


              <td><font class='normal'>US</font></td>
              <td><select name="state" >
                 <option value="" selected >Select State</option>
                 <?
                                         $state1=mysql_query("select * from
sbjbs_us_states order by sb_state");
                                         while($rst=
mysql_fetch_array($state1))
                                         {
                                         ?>
                 <option value=<? echo $rst["sb_state"];?> <?
if($rst["sb_state"]==$state) {echo " selected ";}?>><? echo
$rst["sb_state"];?></option>
                 <?
                                                 } // wend
                                                 ?>
               </select></td>
            </tr>
            <tr>
              <td><font class='normal'>Non US</font></td>
              <td><input name="other_state" type="text" id="other_state"
value="<? echo $other_state;?>"></td>
            </tr>
           </table></td>
        </tr>
        <tr valign="top">
          <td height="24" align="right" class="innertablestyle"><font
class="normal"><strong>Zip/Postal
           Code </strong></font></td>
          <td><font class="red">*</font></td>
          <td><font face="Arial, Helvetica, sans-serif" size="2">
           <input name="zip_code" type="text" id="zip_code"
value="<?php echo $zip_code; ?>" size="30" maxlength="30" >
           </font></td>
        </tr>
        <tr valign="top">
          <td align="right" class="innertablestyle"><font
class="normal"><strong>Country</strong></font></td>
          <td><font class="red">*</font></td>
          <td><font face="Arial, Helvetica, sans-serif"
size="2"><strong><font color="#004566">
           <select name="country" >
            <option selected value="">Select Country</option>
            <?
$rs_t_query=mysql_query ("select * from sbjbs_country order by
country");
Vaibhav Arora (073210170)   Nitin Kumar (073702732) Pawan Kumar(073701271)    134
                                Findsjob.com


while ($rs_t=mysql_fetch_array($rs_t_query))
{
?>
           <option value="<? echo $rs_t["id"] ?>"
              <?php
                        if ($country== $rs_t["id"] )
                        {
                        echo " selected ";
                        }
                        ?>

                ><? echo $rs_t["country"] ; ?></option>
           <?
                }
                           ?>
          </select>
          </font></strong></font></td>
       </tr>
       <tr valign="top">
        <td height="24" align="right" class="innertablestyle"><font
class="normal"><strong>Phone</strong></font></td>
        <td>&nbsp;</td>
        <td><table border="0" align="left" cellpadding="0"
cellspacing="0">
           <tr>
             <td><font class="smalltext">Country Code </font></td>
             <td><font class="smalltext">Area Code </font></td>
             <td><font class="smalltext">Phone Number</font></td>
           </tr>
           <tr>
             <td width="90"><font face="Arial, Helvetica, sans-serif"
size="2">
              <input name="phone" type="text" id="phone" value="<?php
echo $phone; ?>" size="5" maxlength="5" >
              </font></td>
             <td width="77"><font face="Arial, Helvetica, sans-serif"
size="2">
              <input name="phone1" type="text" id="phone1"
value="<?php echo $phone1; ?>" size="8" maxlength="8" >
              </font></td>
             <td width="148"><font face="Arial, Helvetica, sans-serif"
size="2">
              <input name="phone2" type="text" id="phone2"
value="<?php echo $phone2; ?>" size="20" maxlength="20" >
              </font></td>
           </tr>
Vaibhav Arora (073210170)   Nitin Kumar (073702732) Pawan Kumar(073701271)   135
                               Findsjob.com


          </table>
          <font face="Arial, Helvetica, sans-serif" size="2">&nbsp;
</font></td>
       </tr>
       <tr valign="top">
        <td height="24" align="right" class="innertablestyle"><font
class="normal"><strong>Mobile</strong></font></td>
        <td>&nbsp;</td>
        <td><font face="Arial, Helvetica, sans-serif" size="2">
          <input type="text" name="mobile" size="30" maxlength="30"
value="<?php echo $mobile; ?>" >
          </font></td>
       </tr>
       <tr valign="top">
        <td height="24" align="right"
class="innertablestyle">&nbsp;</td>
        <td>&nbsp;</td>
        <td><font class='normal'>
          <input name="subscribe" type="checkbox" id="subscribe"
value="yes" <?php
                                                     if($subscribe == "yes")
                                                           echo "checked";
?>>
          Subscribe Newsletter</font></td>
       </tr>
       <tr valign="top">
        <td align="right" class="innertablestyle">&nbsp;</td>
        <td>&nbsp;</td>
        <td><input name="submit" type="submit" value="Signup"></td>
       </tr>
      </table></td>
   </tr>
  </table>
</form>
<?
}
include_once("template.php");

?>


view_job.php

<?
include "session.php";
include_once "myconnect.php";
Vaibhav Arora (073210170)   Nitin Kumar (073702732) Pawan Kumar(073701271)     136
                               Findsjob.com


include_once "date_time_format.php";

if(!isset($_REQUEST["sb_id"]) || !is_numeric($_REQUEST["sb_id"]) ||
($_REQUEST["sb_id"] < 1))
{
        header("Location: gen_confirm.php?errmsg=".urlencode("Invalid
access, denied"));
        die();
}

/////-----------
     $suspended_list="-1";
     $mem_q=mysql_query("select * from sbjbs_employers where
sb_suspended='yes'");
     while($mem=mysql_fetch_array($mem_q))
     { $suspended_list.=",".$mem["sb_id"];}

      $disapproved_list="-1";
      $comp_q=mysql_query("select * from sbjbs_companies where
      (sb_approved='no' OR sb_uid in ($suspended_list))");

      while($comp=mysql_fetch_array($comp_q))
      { $disapproved_list.=",".$comp["sb_id"];}


///////---------


       $sbq_job="select *,UNIX_TIMESTAMP(sb_posted_on) as sbposted
from sbjbs_jobs where sb_approved='yes' and
sb_id=".$_REQUEST["sb_id"]." and sb_company_id not in
($disapproved_list)";
       $sbrs_job=mysql_query($sbq_job);
       $sbrow_job=mysql_fetch_array($sbrs_job);
if(!$sbrow_job)
{
       header("Location: gen_confirm.php?errmsg=".urlencode("Invalid
access, denied"));
       die();
}


function main()
{
///////just for icons


Vaibhav Arora (073210170)   Nitin Kumar (073702732) Pawan Kumar(073701271)   137
                               Findsjob.com


      global $sbico_apply_user, $sbico_apply_new, $sbico_refer_friend,
$sbico_view_profile, $sbrow_job ;
/////////////////////
      $sbq_con="select * from sbjbs_config where sb_id=1";
      $sbrow_con=mysql_fetch_array(mysql_query($sbq_con));
      $sb_null_char=$sbrow_con["sb_null_char"];
//    $sb_icon_scheme=$sbrow_con["sb_icon_list"];

?>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
 <tr>
   <td valign="top" ><div align="center"><font class='red'> </font> </div>
    <table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
       <td valign="top"><table width="90%" border="0" align="center"
cellpadding="0" cellspacing="0" class="onepxtable">
          <tr >
           <td valign="top"><table width="100%" border="0"
align="center" cellpadding="1" cellspacing="0">
              <tr>
                <td height="25" class="titlestyle">&nbsp;Job
Requirements</td>
              </tr>
              <tr>
                <td align="left" valign="top"><table width="100%"
border="0" cellspacing="1" cellpadding="2">
                  <tr valign="top">
                    <td width="150" class="subtitle">Title</td>
                    <td class="innertablestyle"><font
class="normal"><?php echo $sbrow_job["sb_title"]; ?></font></td>
                  </tr>
                  <tr valign="top">
                    <td class="subtitle">Role</td>
                    <td class="innertablestyle"><font
class="normal"><strong><?php echo $sbrow_job["sb_role"];
?></strong></font></td>
                  </tr>
                  <tr valign="top">
                    <td class="subtitle">Category</td>
                    <td class="innertablestyle"><font class="smalltext">
                     <?php
                    $sbq_cat_jobs="select * from sbjbs_job_cats where
sb_job_id=".$sbrow_job["sb_id"];
                    $sbrs_cat_jobs=mysql_query($sbq_cat_jobs);
                    $sb_cat_list="-1";


Vaibhav Arora (073210170)   Nitin Kumar (073702732) Pawan Kumar(073701271)   138
                               Findsjob.com


                while(
$sbrow_cat_jobs=mysql_fetch_array($sbrs_cat_jobs) )
                       $sb_cat_list.=",".$sbrow_cat_jobs["sb_cid"];

                                 $cat_q=mysql_query("select * from
sbjbs_categories where
                                 sb_id in (".$sb_cat_list.")");

      while($cat=mysql_fetch_array($cat_q))
                                     {
                                     $cat_path='<a
href="search_result.php?cid='.$cat["sb_id"].'">'.$cat["sb_cat_name"].'</a>'
;
                                     $par_q=mysql_query("select * from
sbjbs_categories where sb_id=".$cat["sb_pid"]);

while($par=mysql_fetch_array($par_q))
                                    {
                                            $cat_path='<a
href="search_result.php?cid='.$par["sb_id"].'">'.$par["sb_cat_name"].'</a>
'." - ".$cat_path;
                                            $par_q=mysql_query("select * from
sbjbs_categories where sb_id=".$par["sb_pid"]);
                                          }
                                        echo $cat_path."<br>";
                                        }
                                                       ?>
                      </font></td>
                   </tr>
                   <tr valign="top">
                    <td class="subtitle">Location</td>
                    <td class="innertablestyle"><font class="smalltext">
                      <?php
                    $sbq_cat_jobs="select * from sbjbs_job_locs where
sb_job_id=".$sbrow_job["sb_id"];
                    $sbrs_cat_jobs=mysql_query($sbq_cat_jobs);
                    $sb_loc_list="-1";
                    while(
$sbrow_cat_jobs=mysql_fetch_array($sbrs_cat_jobs) )
                           $sb_loc_list.=",".$sbrow_cat_jobs["sb_lid"];

                                 $loc_q=mysql_query("select * from
sbjbs_locations where
                                 sb_id in (".$sb_loc_list.")");

      while($loc=mysql_fetch_array($loc_q))
Vaibhav Arora (073210170)   Nitin Kumar (073702732) Pawan Kumar(073701271)      139
                               Findsjob.com


                                     {
                                     $loc_path='<a
href="search_result.php?loc_id='.$loc["sb_id"].'">'.$loc["sb_loc_name"].'</
a>';
                                     $par_q=mysql_query("select * from
sbjbs_locations where sb_id=".$loc["sb_pid"]);

while($par=mysql_fetch_array($par_q))
                                    {
                                           $loc_path='<a
href="search_result.php?loc_id='.$par["sb_id"].'">'.$par["sb_loc_name"].'<
/a>'." - ".$loc_path;
                                           $par_q=mysql_query("select * from
sbjbs_locations where sb_id=".$par["sb_pid"]);
                                         }
                                               echo $loc_path."<br>";
                                       }
                                                      ?>
                      </font></td>
                  </tr>
                  <tr valign="top">
                    <td class="subtitle">Company</td>
                    <td class="innertablestyle"><font
class="normal"><strong>
                      <?

      $comp=mysql_fetch_array(mysql_query("select * from
sbjbs_companies
                                       where
sb_id=".$sbrow_job["sb_company_id"]));

                                           echo $comp["sb_name"];?>
                    </strong></font>,&nbsp;&nbsp;<font
class="smalltext">Vacancies <font class='red'>[
                    <?php
                                           echo
($sbrow_job["sb_vacancies"])?$sbrow_job["sb_vacancies"]:$sb_null_char;
?>
                    ]</font> (Posted on <?php echo
sb_date($sbrow_job["sbposted"]); ?>)</font></td>
                 </tr>
                 <tr valign="top">
                  <td class="subtitle">Experience</td>
                  <td class="innertablestyle"><font class="normal">
                    <?php
      switch($sbrow_job["sb_experience"])
Vaibhav Arora (073210170)   Nitin Kumar (073702732) Pawan Kumar(073701271)     140
                               Findsjob.com


            {
                 case -1:     echo 'No preference'; break;
                 case 0:            echo 'Fresher'; break;
                 case 1:            echo 'Less than 1 Year'; break;
                 case 2:            echo '1 to 2 Years'; break;
                 case 3:            echo '2 to 5 Years'; break;
                 case 4:            echo '5 to 7 Years'; break;
                 case 5:            echo '7 to 10 Years'; break;
                 case 6:            echo '10 to 15 Years'; break;
                 case 7:            echo 'More than 15 Years'; break;
           }     //end switch ?>
                   </font></td>
                </tr>
                <tr valign="top">
                 <td class="subtitle">Educational Qualification</td>
                 <td class="innertablestyle"><font class="normal">
                   <?php
                              $sbq_cur="select * from sbjbs_degrees
where sb_id=".$sbrow_job["sb_education"];
                              //echo $sbq_cur;

      $sbrow_cur=mysql_fetch_array(mysql_query($sbq_cur));
                               if($sbrow_cur)
                                      echo $sbrow_cur['sb_degree'];
                               else
                                      echo 'No preference';   ?>
                   </font></td>
                </tr>
                <tr valign="top">
                 <td class="subtitle">Skills</td>
                 <td class="innertablestyle"><font class="normal">
                   <?php
                  $sbq_cat_jobs="select * from sbjbs_job_skls where
sb_job_id=".$sbrow_job["sb_id"];
                  $sbrs_cat_jobs=mysql_query($sbq_cat_jobs);
                  $sb_loc_list="-1";
                  while(
$sbrow_cat_jobs=mysql_fetch_array($sbrs_cat_jobs) )
                         $sb_loc_list.=",".$sbrow_cat_jobs["sb_sid"];

                                 $cat_q=mysql_query("select * from
sbjbs_skills where
                                 sb_id in (".$sb_loc_list.")");

      while($cat=mysql_fetch_array($cat_q))
                                   {
Vaibhav Arora (073210170)   Nitin Kumar (073702732) Pawan Kumar(073701271)   141
                                 Findsjob.com


                                     $cat_path= $cat["sb_name"];
//                                   $par_q=mysql_query("select * from
sbjbs_categories where sb_id=".$cat["sb_pid"]);
//
while($par=mysql_fetch_array($par_q))
//                                     {
//                                       $cat_path=$par["sb_cat_name"]." -
".$cat_path;
//                                       $par_q=mysql_query("select * from
sbjbs_categories where sb_id=".$par["sb_pid"]);
//                                     }
                                     echo $cat_path."<br>";
                                     }
                                                   ?>
                    </font></td>
                 </tr>
                 <tr valign="top">
                  <td class="subtitle">Salary</td>
                  <td class="innertablestyle"><font class="normal">
                    <?php if( ($sbrow_job["sb_min_salary"] > 0) ||
($sbrow_job["sb_max_salary"] > 0) )
                  {
                         $sbq_cur='select * from sbjbs_currencies where
sbcur_id='.$sbrow_job["sb_currency"];

      $sbrow_cur=mysql_fetch_array(mysql_query($sbq_cur));
                        echo ($sbrow_job["sb_min_salary"]>0)?"Minimum
- ".number_format($sbrow_job["sb_min_salary"],2):'';
                        echo ( ($sbrow_job["sb_min_salary"]>0) &&
($sbrow_job["sb_max_salary"]>0) )?', ':'';
                        echo
($sbrow_job["sb_max_salary"]>0)?"Maximum -
".number_format($sbrow_job["sb_max_salary"],2).' ':' ';
                        echo $sbrow_cur["sbcur_name"].' ';
                        switch($sbrow_job["sb_salary_type"])
                        {
            case 0: echo $sb_null_char; break;
                              case 1: echo "Per Year"; break;
                              case 2: echo "Per Month"; break;
                              case 3: echo "Per Week"; break;
                              case 4: echo "Fortnightly"; break;
                              case 5: echo "Per Hour"; break;
                        }     //end switch

                   }        //end if sbrow_job["sb_min_salary"]
                   else
Vaibhav Arora (073210170)    Nitin Kumar (073702732) Pawan Kumar(073701271)   142
                                Findsjob.com


                           echo $sb_null_char;     ?>
                      </font></td>
                   </tr>
                   <tr valign="top">
                    <td class="subtitle">Career Level</td>
                    <td class="innertablestyle"><font class="normal">
                      <?php

      switch($sbrow_job["sb_career_level"])
                                              {
                                                  case 1: echo "Student";
break;
                                                  case 2: echo "Student (High
School)"; break;
                                                  case 3: echo "Entry Level (less
than 2 years experience)"; break;
                                                  case 4: echo "Mid Career (2+
years of experience)"; break;
                                                  case 5: echo "Management
(Manager/Director of Staff)"; break;
                                                  case 6: echo "Executive (SVP,
EVP, VP)"; break;
                                                  case 7: echo "Senior
Executive (President, CEO)"; break;
                                              }
                                              ?>
                   </font></td>
               </tr>
               <tr valign="top">
                 <td class="subtitle">Job Type</td>
                 <td class="innertablestyle"><font class="normal">
                   <?php
                 if(($sbrow_job["sb_job_type"]&1)==1) echo
"Permanent<br>";
                 if(($sbrow_job["sb_job_type"]&2)==2) echo "Intern /
Work Experience<br>";
                 if(($sbrow_job["sb_job_type"]&4)==4) echo
"Temporary/Contract/Project";       ?>
                   </font></td>
               </tr>
               <tr valign="top">
                 <td class="subtitle">Job Status</td>
                 <td class="innertablestyle"><font class="normal">
                   <?php
                 if(($sbrow_job["sb_job_status"]&1)==1) echo "Full
Time<br>";
Vaibhav Arora (073210170)   Nitin Kumar (073702732) Pawan Kumar(073701271)          143
                               Findsjob.com


                   if(($sbrow_job["sb_job_status"]&2)==2) echo "Part
Time";?>
                      </font></td>
                   </tr>
                   <tr valign="top" class="innertablestyle">
                     <td colspan="2" valign="bottom"><table width="100%"
border="0" cellspacing="1" cellpadding="0">
                       <tr valign="bottom">
                         <td class="innertablestyle"><a
href="apply_now.php?sb_id=<?php echo $sbrow_job["sb_id"]; ?>"
title="Existing users apply now" ><img src="<?php echo
$sbico_apply_user; ?>" border="0"></a></td>
                         <td class="innertablestyle"><a href="signup.php"
title="New users signup now" ><img src="<?php echo $sbico_apply_new;
?>" border="0"></a></td>
                         <td class="innertablestyle"><a
href="refer_friend.php?sb_id=<?php echo $sbrow_job["sb_id"];?>"
title="Refer to a friend" ><img src="<?php echo $sbico_refer_friend; ?>"
border="0"></a></td>
                         <?php $sbq_com="select * from sbjbs_companies
where sb_uid=".$sbrow_job["sb_uid"]." and sb_show_profile='yes'";

       $sbrow_com=mysql_fetch_array(mysql_query($sbq_com));
                   if($sbrow_com)
                   {      ?>
                        <td class="innertablestyle"><a
href="view_profile.php?id=<?php echo $sbrow_com["sb_id"]; ?>"
title="View company profile" ><img src="<?php echo $sbico_view_profile;
?>" border="0"></a></td>
                        <?php                          }
       //end if sb_show_profile==yes?>
                       </tr>
                     </table></td>
                  </tr>
                 </table></td>
              </tr>
             </table></td>
          </tr>
         </table></td>
      </tr>
      <tr>
       <td align="center"></td>
      </tr>
      <tr>
       <td valign="top">&nbsp;</td>
      </tr>
Vaibhav Arora (073210170)   Nitin Kumar (073702732) Pawan Kumar(073701271)   144
                               Findsjob.com


      <tr>
       <td valign="top"><table width="90%" border="0" align="center"
cellpadding="0" cellspacing="0" class="onepxtable">
          <tr >
           <td valign="top"><table width="100%" border="0"
align="center" cellpadding="1" cellspacing="0">
               <tr>
                <td height="25" class="titlestyle">&nbsp;Description</td>
               </tr>
               <tr>
                <td align="left" valign="top"><table width="100%"
border="0" cellspacing="1" cellpadding="2">
                   <tr valign="top">
                     <td class="innertablestyle"><font class="normal">
                       <?php
                                              echo
str_replace("\n","<br>",$sbrow_job["sb_description"]); ?>
                       </font></td>
                   </tr>
                   <tr valign="top" class="innertablestyle">
                     <td valign="bottom"><table width="100%" border="0"
cellspacing="1" cellpadding="0">
                        <tr valign="bottom">
                         <td class="innertablestyle"><a
href="apply_now.php?sb_id=<?php echo $sbrow_job["sb_id"]; ?>"
title="Existing users apply now" ><img src="<?php echo
$sbico_apply_user; ?>" border="0"></a></td>
                         <td class="innertablestyle"><a href="signup.php"
title="New users signup now" ><img src="<?php echo $sbico_apply_new;
?>" border="0"></a></td>
                         <td class="innertablestyle"><a
href="refer_friend.php?sb_id=<?php echo $sbrow_job["sb_id"];?>"
title="Refer to a friend" ><img src="<?php echo $sbico_refer_friend; ?>"
border="0"></a></td>
                         <?php if($sbrow_com)
                     {      ?>
                         <td class="innertablestyle"><a
href="view_profile?id=<?php echo $sbrow_com["sb_id"]; ?>" title="View
company profile" ><img src="<?php echo $sbico_view_profile; ?>"
border="0"></a></td>
                         <?php                            }
       //end if sb_show_profile==yes?>
                        </tr>
                       </table></td>
                   </tr>
                  </table></td>
Vaibhav Arora (073210170)   Nitin Kumar (073702732) Pawan Kumar(073701271)   145
                               Findsjob.com


              </tr>
             </table></td>
          </tr>
         </table></td>
      </tr>
      <tr>
       <td valign="top">&nbsp;</td>
      </tr>
    </table></td>
  </tr>
</table>
<?
}// end main
include "template.php";
?>



view_profile .php


<?php
include_once "myconnect.php";
include_once "session.php";
include_once "date_time_format.php";


if(!isset($_REQUEST['id']) || !is_numeric($_REQUEST['id']) ||
($_REQUEST['id'] == 0) )
{
        header("Location: gen_confirm.php?errmsg=".urlencode("Invalid
access, denied"));
        die();
}

$id=$_REQUEST['id'];

$sbstr='';
if( isset($_SESSION["sbjbs_emp_userid"]) )
        $sbstr="or (sb_uid=".$_SESSION["sbjbs_emp_userid"].")";

$sbq_off="select * from sbjbs_companies where sb_id=$id and
((sb_approved='yes' and sb_show_profile='yes') $sbstr )";
//echo($sbq_off);
$sbrow_off=mysql_fetch_array(mysql_query($sbq_off));
if(!$sbrow_off)
Vaibhav Arora (073210170)   Nitin Kumar (073702732) Pawan Kumar(073701271)   146
                                Findsjob.com


{
       header("Location: gen_confirm.php?errmsg=".urlencode("No such
profile exists or disabled by admin"));
       die();
}
///////////------updating view count
$sbqu_off="update sbjbs_companyprofiles set sb_viewed=sb_viewed+1
where sb_id=$id";
mysql_query($sbqu_off);

//////////---------
function main()
{
      global $sbrow_off, $id;

       $config=mysql_fetch_array(mysql_query("select * from
sbjbs_config"));
       $sb_null_char=$config["sb_null_char"];
/*     $icons=mysql_fetch_array(mysql_query("select * from sbjbs_icons
where sb_id=".$config["sb_icon_list"]));
       $send_inquiry_icon="admin/sbjbs_icons/".$icons["sb_send_inquiry
"];
       $inquiry_basket_icon="admin/sbjbs_icons/".$icons["sb_inquiry_ba
sket"];
       $contact_list_icon="admin/sbjbs_icons/".$icons["sb_contact_list"];
       $block_list_icon="admin/sbjbs_icons/".$icons["sb_block_list"];
       $add_fav_icon="admin/sbjbs_icons/".$icons["sb_add_fav"];
       $company_profile_icon="admin/sbjbs_icons/".$icons["sb_profile"];
*/
$cid=0;
$keyword="";

      if(isset($_REQUEST["cid"])&&($_REQUEST["cid"]<>""))
      {
      $cid=$_REQUEST["cid"];
      }

      if(isset($_REQUEST["keyword"])&&($_REQUEST["keyword"]<>""))
      {
              $keyword=$_REQUEST["keyword"];
      }


      $catname="";
      $category=0;


Vaibhav Arora (073210170)   Nitin Kumar (073702732) Pawan Kumar(073701271)   147
                               Findsjob.com


      $cat_query=mysql_query("Select * from sbjbs_categories where
sb_id=" . $cid );
      if ($cat=mysql_fetch_array($cat_query))
      {
      $catname=$cat["sb_cat_name"];
      $category=$cat["sb_id"];
      }

       $catpath="";
       $cat_query=mysql_query("Select * from sbjbs_categories where
sb_id=" . $cid );
       while ($rs=mysql_fetch_array($cat_query))
   {
   $catpath =" > <a href=\"cat_sell.php?cid=" . $rs["sb_id"] . "\">"
.$rs["sb_cat_name"]."</a>".$catpath;
       $cat_query=mysql_query("Select * from sbjbs_categories where
sb_id=" . $rs["sb_pid"] );

      }

$mem=mysql_fetch_array(mysql_query("select * from sbjbs_employers
where sb_id=".$sbrow_off["sb_uid"]));


?>
<script language="JavaScript">
function win(box)
{
str="addcontact_popup.php?" + box;

window.open(str,"Allot","top=5,left=30,toolbars=no,maximize=yes,resize=y
es,width=350,height=150,location=no,directories=no,scrollbars=yes");
return false;
}

function win1(box)
{
str="addblock_popup.php?" + box;

window.open(str,"Allot","top=5,left=30,toolbars=no,maximize=yes,resize=y
es,width=350,height=150,location=no,directories=no,scrollbars=yes");
return false;
}
</script>



Vaibhav Arora (073210170)   Nitin Kumar (073702732) Pawan Kumar(073701271)   148
                               Findsjob.com


<table width="100%" border="0" cellspacing="10" cellpadding="2"
class="maintablestyle">
  <tr>
   <td valign="top"><table width="90%" border="0" align="center"
cellpadding="0" cellspacing="0" >
      <tr>
       <td><!--font class="normal">&nbsp;<a
href="index.php">Home</a><? echo $catpath;?></font--></td>
      </tr>
      <tr>
       <td><table width="100%" border="0" align="center"
cellpadding="0" cellspacing="1">
          <tr>
           <td valign="middle" class="titlestyle">&nbsp;&nbsp;<?php
echo $sbrow_off["sb_name"]; ?> posted by
             <?php
               echo $mem["sb_username"];
 ?>
             <!--font class="smalltext"><font class="red"><strong>[ <font
class="smalltext"><font class="red"><strong>
             <?php
//                  $level_query=mysql_query("select * from sbjbs_levels
where sb_levelid=" .$mem["sb_memtype"]);
 //        $level= mysql_fetch_array($level_query);
//                  echo $level["sb_levelname"];
                    ?>
             </strong></font></font>]</strong></font></font></strong -
-></td>
          </tr>
         </table></td>
      </tr>
     </table></td>
  </tr>
  <tr>
   <td valign="top"><table width="90%" border="0" align="center"
cellpadding="0" cellspacing="0">
      <tr>
       <td><div align="center">
          <?php
               if($sbrow_off["sb_logo"]<>"")
               {
               ?>
          <img src="uploadedimages/<?php echo $sbrow_off["sb_logo"];
?>" border="0">
          <?php
               }
Vaibhav Arora (073210170)   Nitin Kumar (073702732) Pawan Kumar(073701271)   149
                               Findsjob.com


               ?>
         </div></td>
      </tr>
    </table></td>
 </tr>
 <tr>
   <td valign="top"><table width="90%" border="0" align="center"
cellpadding="0" cellspacing="1" class="onepxtable">
      <tr valign="top">
       <td><table width="100%" border="0" cellspacing="1"
cellpadding="1">
          <tr valign="top">
            <td width="50%" height="100%"><table width="100%"
height="100%" border="0" cellpadding="2" cellspacing="1">
               <tr valign="top" class="onepxtable">
                <td width="40%" height="25" class="subtitle"><div
align="left">Industry</div></td>
                <td width="60%" height="25" class="innertablestyle"><font
class="normal">
                  <?php
               $sbq_pro_fo="select * from sbjbs_industries where
sb_id=".$sbrow_off["sb_industry"];

$sbrow_pro_fo=mysql_fetch_array(mysql_query($sbq_pro_fo));
              echo $sbrow_pro_fo["sb_name"];
               ?>
                 </font></td>
              </tr>
              <tr valign="top" class="onepxtable">
               <td height="25" class="subtitle"><div
align="left">Bussiness
                  Type</div></td>
               <td height="25" class="innertablestyle" ><font
class="normal">
                 <?php
              $sbq_pro_fo="select * from sbjbs_businesstypes where
sb_id=".$sbrow_off["sb_type"];

$sbrow_pro_fo=mysql_fetch_array(mysql_query($sbq_pro_fo));
            echo $sbrow_pro_fo["sb_businesstype"];
           ?>
               </font></td>
            </tr>
            <tr valign="top" class="onepxtable">
             <td height="25" class="subtitle">Number of
Employees</td>
Vaibhav Arora (073210170)   Nitin Kumar (073702732) Pawan Kumar(073701271)   150
                               Findsjob.com


                <td height="25" class="innertablestyle" ><font
class="normal"><?php echo $sbrow_off["sb_no_of_emps"];
?></font></td>
              </tr>
             </table></td>
            <td height="100%"><table width="100%" height="100%"
border="0" cellpadding="2" cellspacing="1">
              <tr valign="top" class="onepxtable">
                <td width="40%" height="25" class="subtitle"><div
align="left">Location</div></td>
                <td width="60%" height="25" class="innertablestyle" ><font
class='normal'><?php echo $sbrow_off["sb_location"];?>,
                 <?php
               $sbq_pro_fo="select * from sbjbs_country where
id=".$sbrow_off["sb_country"];

$sbrow_pro_fo=mysql_fetch_array(mysql_query($sbq_pro_fo));
              echo $sbrow_pro_fo["country"];       ?>
                 </font></td>
              </tr>
              <tr valign="top" class="onepxtable">
               <td height="25" class="subtitle"><div align="left">Sales
                  Turnover </div></td>
               <td height="25" class="innertablestyle" ><font
class="normal">
                 <?php
                          echo $sbrow_off["sb_sales"].'
'.$sbrow_off["sb_multiplier"];
                          $sbq_cur="select * from sbjbs_currencies where
sbcur_id=".$sbrow_off["sb_currency"];

      $sbrow_cur=mysql_fetch_array(mysql_query($sbq_cur));
                          echo ' '.$sbrow_cur["sbcur_name"];
            ?>
                </font></td>
             </tr>
             <tr valign="top" class="onepxtable">
               <td height="25" class="subtitle"><div align="left">Number
                  of Offices</div></td>
               <td height="25" class="innertablestyle" ><font
class="normal"><?php echo $sbrow_off["sb_no_of_officies"]; ?>
</font></td>
             </tr>
            </table></td>
         </tr>
         <tr valign="top">
Vaibhav Arora (073210170)   Nitin Kumar (073702732) Pawan Kumar(073701271)   151
                               Findsjob.com


            <td colspan="2"><table width="100%" border="0"
cellspacing="1" cellpadding="1">
              <tr valign="top" class="onepxtable">
                <td width="20%" height="25" class="subtitle">Website
Address</td>
                <td height="25" class="innertablestyle" ><font
class="normal">
                 <?php
                                   if($sbrow_off["sb_website"]<>"")
                                   {echo $sbrow_off["sb_website"]; }
                                   else
                                   {echo $config["sb_null_char"];}
                                   ?>
                 </font></td>
              </tr>
              <tr valign="top" class="onepxtable">
                <td height="25" class="subtitle"><div
align="left">Categories</div></td>
                <td height="25" class="innertablestyle"><?php
                    $sbq_cat_jobs="select * from sbjbs_profile_cats where
sb_company_id=".$sbrow_off["sb_id"];
                    $sbrs_cat_jobs=mysql_query($sbq_cat_jobs);
                    $sb_cat_list="-1";
                    while(
$sbrow_cat_jobs=mysql_fetch_array($sbrs_cat_jobs) )
                           $sb_cat_list.=",".$sbrow_cat_jobs["sb_cid"];

                                 $cat_q=mysql_query("select * from
sbjbs_categories where
                                 sb_id in (".$sb_cat_list.")");

      while($cat=mysql_fetch_array($cat_q))
                                     {
                                     $cat_path='<a
href="search_result.php?cid='.$cat["sb_id"].'">'.$cat["sb_cat_name"].'</a>'
;
                                     $par_q=mysql_query("select * from
sbjbs_categories where sb_id=".$cat["sb_pid"]);

while($par=mysql_fetch_array($par_q))
                                    {
                                      $cat_path='<a
href="search_result.php?cid='.$par["sb_id"].'">'.$par["sb_cat_name"].'</a>
'." - ".$cat_path;
                                      $par_q=mysql_query("select * from
sbjbs_categories where sb_id=".$par["sb_pid"]);
Vaibhav Arora (073210170)   Nitin Kumar (073702732) Pawan Kumar(073701271)    152
                               Findsjob.com


                                        }
                                      echo $cat_path."<br>";
                                      }
                                                   ?></td>
               </tr>
             </table></td>
          </tr>
          <!--tr valign="top">
           <td colspan="2"><table width="100%" border="0"
cellspacing="1" cellpadding="2" class="innertablestyle">
               <tr valign="bottom">
                <td align="center"><a
href="contactuser.php?sb_type=4&sb_id=<?php echo $id; ?>"><img
src="<?php echo $send_inquiry_icon;?>" border="0" alt="Send
Inquires"></a></td>
                <td align="center"> <a href="dummy.htm" onClick="return
win('<?php echo
"sb_type=1&sb_id=$id&username=".$mem["sb_username"]; ?>');" ><img
src="<?php echo $contact_list_icon;?>" border="0" alt="Add to Partner
List"></a>
                </td>
                <td align="center"><a href="dummy.htm" onClick="return
win1('<?php echo
"sb_type=1&sb_id=$id&username=".$mem["sb_username"]; ?>');"><img
src="<?php echo $block_list_icon;?>" border="0" alt="Add to Block
List"></a></td>
                <td align="center"> <a
href="add_favorites.php?sb_type=4&sb_id=<?php echo $id; ?>"><img
src="<?php echo $add_fav_icon;?>" border="0" alt="Add to
Favourites"></a></td>
               </tr>
             </table></td>
          </tr -->
         </table></td>
      </tr>
     </table></td>
  </tr>
  <tr>
   <td valign="top"><table width="90%" border="0" align="center"
cellpadding="2" cellspacing="1" class="onepxtable">
      <tr>
       <td class="titlestyle">&nbsp;Company Profile</td>
      </tr>
      <tr>
       <td height="25" valign="top" class="innertablestyle"><font
class="normal"><?php echo $sbrow_off["sb_profile"]; ?></font></td>
Vaibhav Arora (073210170)   Nitin Kumar (073702732) Pawan Kumar(073701271)   153
                               Findsjob.com


      </tr>
    </table></td>
  </tr>
</table>
<?
}// end main
include "template.php";
?>

Template.php

<?php
include_once   "myconnect.php";
include_once   "session.php";
include_once   "styles.php";
include_once   "left_panel.php";
include_once   "date_time_format.php";
include_once   "send_alerts.php";

//include_once "check_msg_function.php";
//=========================================================
====
function loc_order($pid)
{
      $rs_query=mysql_query("select * from sbjbs_locations where
sb_pid=$pid order by sb_loc_name");
      while($rst=mysql_fetch_array($rs_query))
      {
        $cat_path="";
        $cat_path.=$rst["sb_loc_name"];
        $par=mysql_query("select * from sbjbs_locations where
sb_id=".$rst["sb_pid"]);
        while($parent=mysql_fetch_array($par))
        {
             $cat_path=$parent["sb_loc_name"]."-".$cat_path;
             $par=mysql_query("select * from sbjbs_locations where
sb_id=".$parent["sb_pid"]);
        }
    echo "<option value='".$rst["sb_id"]."' >$cat_path</option>";
        $child=mysql_fetch_array(mysql_query("select * from
sbjbs_locations where
        sb_pid=".$rst["sb_id"]));
        if($child)
        {
             loc_order($child["sb_pid"]);
        }
Vaibhav Arora (073210170)   Nitin Kumar (073702732) Pawan Kumar(073701271)   154
                               Findsjob.com


      }
}
//=========================================================
====


///////////////////////////////////////////////////////////
////////////////////
///    THE CODE OF THIS SCRIPT HAS BEEN DEVELOPED BY
SOFTBIZ SOLUTIONS /////
///    AND IS MEANT TO BE USED ON THIS SITE ONLY AND IS NOT
FOR REUSE, /////
///    RESALE OR REDISTRIBUTION.                                    /////
///    IF YOU NOTICE ANY VIOLATION OF ABOVE PLEASE REPORT
AT:        /////
///    admin@softbizscripts.com                               /////
///    http://www.softbizscripts.com                           /////
///    http://www.softbizsolutions.com                          /////
///////////////////////////////////////////////////////////
////////////////////
/*$mail_q=mysql_query("select * from sbjbs_mails");
while($mail=mysql_fetch_array($mail_q))
{
mysql_query("update sbjbs_mails set
sb_mail='".str_replace("<","%",str_replace(">","%",$mail["sb_mail"]))."'
where sb_id=".$mail["sb_id"]);
}*/
//======================code here is equivalent to chron file
code=============================
$config=mysql_fetch_array(mysql_query("select * from sbjbs_config "));

if(date("Ymd",time())>$config["last_sent"])
{
//echo "working";
send_mail_alerts();
mysql_query("update sbjbs_config set last_sent=".date("Ymd",time())."
where 1");
}

// LOAD style number from the config file

define("HELP_LINK","Tips");
//-------------------default icons
$sbico_apply_user='admin/sbjbs_default_icons/sbico_apply_user.gif';
$sbico_apply_new='admin/sbjbs_default_icons/sbico_apply_new.gif';
$sbico_refer_friend='admin/sbjbs_default_icons/sbico_refer_friend.gif';
Vaibhav Arora (073210170)   Nitin Kumar (073702732) Pawan Kumar(073701271)   155
                               Findsjob.com


$sbico_view_profile='admin/sbjbs_default_icons/sbico_view_profile.gif';
///////--------end default icons
$icons=mysql_fetch_array(mysql_query("select * from sbjbs_icons where
sb_id=".$config["sb_icon_list"]));
//----read icons here from database
if($icons)
{
       $sbico_apply_user='admin/sbjbs_icons/'.$icons["sb_apply_now"];
       $sbico_apply_new='admin/sbjbs_icons/'.$icons["sb_join_now"];
       $sbico_refer_friend='admin/sbjbs_icons/'.$icons["sb_refer_friend"];
       $sbico_view_profile='admin/sbjbs_icons/'.$icons["sb_profile"];
}
//----end read icons here from database
$keyword="";
$title_str="";
$site_keywords="";

if(isset($_REQUEST["keyword"])&&($_REQUEST["keyword"]<>""))
{
$keyword=$_REQUEST["keyword"];
$title_str=$keyword." : ";
$site_keywords=$keyword.",";
}

      if(preg_match("/\/resumes.php/",$_SERVER['PHP_SELF']))
      {
      $title_str.="Resumes : ";
      $site_keywords.="Resumes,";
      }
      elseif(preg_match("/\/search_result.php/",$_SERVER['PHP_SELF'])
)
      {
      $title_str.="Jobs : ";
      $site_keywords.="Jobs,";
      }
      elseif(preg_match("/\/profiles.php/",$_SERVER['PHP_SELF']))
      {
      $title_str.="Companies : ";
      $site_keywords.="Companies,";
      }


if(isset($_REQUEST["sb_id"])&&($_REQUEST["sb_id"]<>"")&&($_REQUES
T["sb_id"]<>0))
{
        $id=$_REQUEST["sb_id"];
Vaibhav Arora (073210170)   Nitin Kumar (073702732) Pawan Kumar(073701271)   156
                               Findsjob.com


        if(preg_match("/\/view_job.php/",$_SERVER['PHP_SELF']))
        {
        $job=mysql_fetch_array(mysql_query("select * from sbjbs_jobs
where sb_id=$id"));
        $title_str.=$job["sb_title"]." : Jobs : ";
        $site_keywords.=$job["sb_title"].",Jobs,";
        }
}
if(isset($_REQUEST["resume_id"])&&($_REQUEST["resume_id"]<>"")&&($
_REQUEST["resume_id"]<>0))
{
        $id=$_REQUEST["resume_id"];
        if(preg_match("/\/view_resume.php/",$_SERVER['PHP_SELF']))
        {
        $offer=mysql_fetch_array(mysql_query("select * from sbjbs_resumes
where sb_id=$id"));
        $title_str.=$offer["sb_target_job"]." : Resume : ";
        $site_keywords.=$offer["sb_target_job"].",";
        }
}
if(isset($_REQUEST["id"])&&($_REQUEST["id"]<>"")&&($_REQUEST["id"]<
>0))
{
        $id=$_REQUEST["id"];
        if(preg_match("/\/view_profile.php/",$_SERVER['PHP_SELF']))
        {
        $offer=mysql_fetch_array(mysql_query("select * from
sbjbs_companies where sb_id=$id"));
        $title_str.=$offer["sb_name"]." : Companies : ";
        $site_keywords.=$offer["sb_name"].",";
        }
}

if(isset($_REQUEST["cid"])&&($_REQUEST["cid"]<>"")&&($_REQUEST["cid
"]<>0))
{
        $cid=$_REQUEST["cid"];
        $catpath="";
        $catpath2="";
        $cat_query=mysql_query("Select * from sbjbs_categories where
sb_id=" . $cid );
        while ($rs=mysql_fetch_array($cat_query))
    {
    $catpath .=$rs["sb_cat_name"]." : ";
        $catpath2 .=$rs["sb_cat_name"].",";


Vaibhav Arora (073210170)   Nitin Kumar (073702732) Pawan Kumar(073701271)   157
                               Findsjob.com


       $cat_query=mysql_query("Select * from sbjbs_categories where
sb_id=" . $rs["sb_pid"] );
       }
$title_str.=$catpath;
$site_keywords.=$catpath2;
}
$title_str.=$config["sb_site_name"];
$site_keywords.=$config["sb_site_keywords"];

?><html>
<head>
<title><? echo $title_str;?></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-
1">
<meta http-equiv="keywords" content="<?php echo $site_keywords;?>">
<script language="JavaScript" type="text/JavaScript">
<!--
function sb_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}
//-->
</script>
</head>
<body bgcolor="<?php echo $softbiz_page_bg; ?>" leftmargin="1"
topmargin="1" rightmargin="1">
<script language="JavaScript">
function help_popup(form,context)
{
var file="help_popup.php?form=" + form+"&context="+context;
window.open(file,"Help","top=5,left=30,toolbars=no,maximize=yes,resize=
yes,width=550,height=200,location=no,directories=no,scrollbars=yes");
}
</script>
<table width="100%" border="0" align="center" cellpadding="0"
cellspacing="0">
  <tr align="left">
    <td valign="top" ><div align="center">
       <table width="100%" border="0" cellspacing="0" cellpadding="0">
         <tr>
          <td><h1 style="margin:0 0 20px
20px;">FINDSJOB.COM</h1></td>
          <td align="center">
            <?php

      mt_srand( (double)microtime() * 1000000);
Vaibhav Arora (073210170)   Nitin Kumar (073702732) Pawan Kumar(073701271)   158
                               Findsjob.com



       $rs_t_query=mysql_query("select * from sbjbs_ads where approved=
'yes' and credits > displays");
//die($rs_t_query);
       $cnt= mysql_num_rows($rs_t_query);

      $rs_t_query1=mysql_query("select * from sbjbs_affiliate_banner
where sbaff_active= 'yes'");
//die($rs_t_query);
      $cnt2 = mysql_num_rows($rs_t_query1);
      $sbdowhat=0;                //stands for do nothing
      if ( ($cnt == 0) && ($cnt2 > 0) )
      {              //no banner but affiliate exists
              $sbdowhat=1;        /// stands for "affiliate";
      }
      elseif( ($cnt > 0) && ($cnt2 == 0) )
      {              //no affiliate but banner exists
              $sbdowhat=2;               //   stands for "banner";
      }
      elseif( ($cnt > 0) && ($cnt2 > 0) )
      {              //
              $sbrandon=mt_rand(1,2);
              if($sbrandon == 1)
                     $sbdowhat=1;
              else
                     $sbdowhat=2;
      }
      if($sbdowhat == 1)
      {
              $rnum= mt_rand(1,$cnt2);
              for ($i=0;$i<$rnum;$i++)
                     $rs_t=mysql_fetch_array($rs_t_query1);
              echo $rs_t["sbaff_text"];
      }
      elseif($sbdowhat == 2)
      {
              $rnum= mt_rand(1,$cnt);
              for ($i=0;$i<$rnum;$i++)
                     $rs_t=mysql_fetch_array($rs_t_query);
              $id=$rs_t["id"];
              $sbtitle=$rs_t["sbtitle"];
              $url=$rs_t["url"];
              $bannerurl=$rs_t["bannerurl"];
              echo "<a href='$url' target=\"_blank\"><img src='$bannerurl'
width=468 height=60 border=0 alt=\"$sbtitle\"></a>";


Vaibhav Arora (073210170)   Nitin Kumar (073702732) Pawan Kumar(073701271)   159
                               Findsjob.com


              mysql_query("update sbjbs_ads set displays=displays+1
where id=$id");
       }
                    ?>
         </td>
        </tr>
      </table>
     </div></td>
 </tr>
 <tr>
   <td width="100%" height="100%" align="center" valign="top" > <table
width="100%" border="0" cellspacing="0" cellpadding="0">
      <form action="index.php" method="get">
      </form>
      <tr>
        <td height="25" align="center" valign="bottom"> <table
width="90%" height="100%" border="0" align="center" cellpadding="0"
cellspacing="0">
          <tr align="center">
            <td height="25" class="<?php

      if(!preg_match("/\/index.php/",$_SERVER['SCRIPT_NAME']))
                        { echo "inactivetab";}
                        else
                        { echo "activetab"; }
                        ?>
                        ">
             <?php


      if(!preg_match("/\/index.php/",$_SERVER['SCRIPT_NAME']))
                         {
                         ?>
             <a href="index.php" >Home</a>
             <?php
                         }
                         else
                         {
                         echo "HOME";
                         }
                         ?>
            </td>
            <td width="7" >&nbsp;</td>
            <td height="25" class="<?php



Vaibhav Arora (073210170)   Nitin Kumar (073702732) Pawan Kumar(073701271)   160
                                 Findsjob.com



         if(!preg_match("/\/advance_search.php/",$_SERVER['SCRIPT_NA
ME']))
                            { echo "inactivetab";}
                            else
                            { echo "activetab"; }
                            ?>
                            ">
              <?php

         if(!preg_match("/\/advance_search.php/",$_SERVER['SCRIPT_NA
ME']))
                         {
                         ?>
             <a href="advance_search.php" >Search Jobs</a>
             <?php
                         }
                         else
                         {
                         echo "SEARCH JOBS";
                         }
                         ?>
            </td>
            <td width="7" >&nbsp;</td>
            <td height="25" class="<?php

      if(!preg_match("/\/search_companies.php/",$_SERVER['SCRIPT_N
AME']))
                        { echo "inactivetab";}
                        else
                        { echo "activetab"; }
                        ?>
                        ">
             <?php

      if(!preg_match("/\/search_companies.php/",$_SERVER['SCRIPT_N
AME']))
                         {
                         ?>
             <a href="search_companies.php" >Browse Companies</a>
             <?php
                         }
                         else
                         {
                         echo "BROWSE COMPANIES";
                         }
Vaibhav Arora (073210170)    Nitin Kumar (073702732) Pawan Kumar(073701271)   161
                                 Findsjob.com


                            ?>
           </td>
           <td width="7" >&nbsp;</td>
           <td class="<?php
                         if(isset($_SESSION["sbjbs_userid"]))
                         {

      if(!preg_match("/\/userhome.php/",$_SERVER['SCRIPT_NAME']))
                              { echo "inactivetab"; }
                              else
                              { echo "activetab"; }
                        }
                        else
                        {

     if(!preg_match("/\/signup.php/",$_SERVER['SCRIPT_NAME'])&&!p
reg_match("/\/addmember.php/",$_SERVER['SCRIPT_NAME']))
                             { echo "inactivetab"; }
                             else
                             { echo "activetab"; }

                            }
                            ?>
                            ">
            <?php
                    if(isset($_SESSION["sbjbs_userid"]))
                    {

      if(!preg_match("/\/userhome.php/",$_SERVER['SCRIPT_NAME']))
                         {
                         ?>
             <a href="userhome.php" >Member Home</a>
             <?php
                         }
                         else
                         {
                         echo "MEMBER HOME";
                         }
                   }
                   else
                   {

     if(!preg_match("/\/signup.php/",$_SERVER['SCRIPT_NAME'])&&!p
reg_match("/\/addmember.php/",$_SERVER['SCRIPT_NAME']))
                       {
                       ?>
Vaibhav Arora (073210170)    Nitin Kumar (073702732) Pawan Kumar(073701271)   162
                                 Findsjob.com


            <a href="signup.php" >Register</a>
            <?php
                         }
                         else
                         {
                         echo "REGISTER";
                         }
                         }
                         ?>
           </td>
           <td width="7" >&nbsp;</td>
           <td class="<?php
                         if(isset($_SESSION["sbjbs_userid"]))
                         {

      if(!preg_match("/\/logout.php/",$_SERVER['SCRIPT_NAME']))
                              { echo "inactivetab"; }
                              else
                              { echo "activetab"; }
                        }
                        else
                        {

      if(!preg_match("/\/signin.php/",$_SERVER['SCRIPT_NAME']))
                              { echo "inactivetab"; }
                              else
                              { echo "activetab"; }

                            }
                            ?>
                            ">
            <?php
                    if(isset($_SESSION["sbjbs_userid"]))
                    {

      if(!preg_match("/\/logout.php/",$_SERVER['SCRIPT_NAME']))
                          {
                          ?>
             <a href="logout.php" >Logout</a>
             <?php
                          }
                          else
                          {
                          echo "LOGOUT";
                          }
                   }
Vaibhav Arora (073210170)    Nitin Kumar (073702732) Pawan Kumar(073701271)   163
                               Findsjob.com


                   else
                   {

      if(!preg_match("/\/signin.php/",$_SERVER['SCRIPT_NAME']))
                          {
                          ?>
             <a href="signin.php" >Login</a>
             <?php
                          }
                          else
                          {
                          echo "LOGIN";
                          }
                          }
                          ?>
            </td>
            <td width="7" >&nbsp;</td>
            <td width="80" class="<?php

      if(!preg_match("/\/employer/",$_SERVER['SCRIPT_NAME']))
                        { echo "inactivetab";}
                        else
                        { echo "activetab"; }
                        ?>
                        ">
             <?php

      if(!preg_match("/\/employer/",$_SERVER['SCRIPT_NAME']))
                         {
                         ?>
             <a href="employer/emp_home.php" >Employers</a>
             <?php
                         }
                         else
                         {
                         echo "EMPLOYERS";
                         }
                         ?>
            </td>
            <td width="7" >&nbsp;</td>
            <td class="<?php

      if(!preg_match("/\/contactus.php/",$_SERVER['SCRIPT_NAME']))
                        { echo "inactivetab";}
                        else
                        { echo "activetab"; }
Vaibhav Arora (073210170)   Nitin Kumar (073702732) Pawan Kumar(073701271)   164
                                 Findsjob.com


                            ?>
                            " width="80">
            <?php

      if(!preg_match("/\/contactus.php/",$_SERVER['SCRIPT_NAME']))
                           {
                           ?>
             <a href="contactus.php" >Contact Us</a>
             <?php
                           }
                           else
                           {
                           echo "CONTACT US";
                           }
                           ?>
            </td>
          </tr>
         </table></td>
     </tr>
     <tr>
       <td align="center" valign="top"><table width="100%" border="0"
align="center" cellpadding="0" cellspacing="0">
          <tr>
            <td align="center" valign="top"><table width="100%"
border="0" align="center" cellpadding="2" cellspacing="0">
              <tr height=20>
                <td colspan="3" align="right" class="sidetitle" ><table
width="100%" border="0" cellspacing="0" cellpadding="0" class="sidetitle"
>
                   <tr>
                    <td>&nbsp;<? echo sb_date(time());?></td>
                    <td align="right">
                      <?

                              if(isset($_SESSION["sbjbs_userid"])) {
                              echo "Logged in as <b>" .
$_SESSION["sbjbs_username"] . "</b>" ;
                   ?>
                    &nbsp;| &nbsp;&nbsp;<a href="logout.php"
class="titlelink">LOGOUT</a>
                    <?
                              }
                              else
                              {
                              ?>


Vaibhav Arora (073210170)    Nitin Kumar (073702732) Pawan Kumar(073701271)   165
                               Findsjob.com


                      <font class="smalltext">Welcome
<strong>Guest</strong>,
                      Please <a href="signin.php"
class="titlelink">LOGIN</a>
                      to your account or <a
href="signup.php"class="titlelink">SIGNUP</a>
                      with us for career opportunities</font>
                      <?
                                      }
                                      ?>
                     </td>
                   </tr>
                  </table></td>
               </tr>
               <tr class="mainbgcolor" >
                <td align="center" valign="middle"> <font face="verdana,
arial" size="1" class='red'>&nbsp;
                  <?
                                    if (
isset($_REQUEST["msg"])&&$_REQUEST['msg']<>"")
                                    {
                                    print($_REQUEST['msg']);
                                    }
                                    //end if
                                    ?>
                  </font> </td>
               </tr>
               <tr valign="top" width=100%>
                <td class="mainbgcolor" > <div align="center">
                   <table width="100%" border="0" cellspacing="0"
cellpadding="0">
                     <tr valign="top">
                      <td width="150" align="left">
                        <? left();?>
                      </td>
                      <td align="center">
                        <?php main();?>
                      </td>
                     </tr>
                     <tr valign="top">
                      <td align="left">&nbsp;</td>
                      <td align="center">&nbsp;</td>
                     </tr>
                   </table>
                  </div></td>
               </tr>
Vaibhav Arora (073210170)   Nitin Kumar (073702732) Pawan Kumar(073701271)   166
                               Findsjob.com


                <!-- <tr height=2>
                 <td colspan="3" class="seperatorstyle" ></td>
                </tr>-->
              </table></td>
            </tr>
          </table></td>
      </tr>
     </table></td>
  </tr>
  <tr>
   <td align="center" valign="top" > <table align="center" width="100%"
cellpadding="2" cellspacing="0" class="bottomstyle">
      <tr>
        <td align="center">&nbsp;<a href="index.php"
class="bottomlink">HOME</a>
          | <a href="search_result.php" class="bottomlink">ALL JOBS</a>
| <a href="search_companies.php" class="bottomlink">BROWSE
          COMPANIES</a> | <a href="employer/emp_home.php"
class="bottomlink">EMPLOYERS</a>
          |
          <?php
       if(!isset($_SESSION["sbjbs_userid"]))
       {?>
          <a href="signin.php" class="bottomlink">LOGIN</a> |
          <?php
       }?>
          <a href="contactus.php" class="bottomlink">CONTACT US</a>
<br> <a href="terms.php" target="_blank" class="bottomlink">TERMS
          OF USE</a> | <a href="privacy.php" target="_blank"
class="bottomlink">PRIVACY
          POLICY</a> | <a href="legal.php" target="_blank"
class="bottomlink">LEGAL
          POLICY</a> </td>
      </tr>
     </table></td>
  </tr>
  <tr>
   <td valign="top" ><div align="center"><font color="#003366" size="3"
face="Verdana, Arial, Helvetica, sans-serif">
      <? //echo $config["sb_html_footer"];?>
      </font></div></td>
  </tr>
  <tr>
   <td valign="top" ><div align="right"><font size="2" face="Verdana,
Arial, Helvetica, sans-serif"><font size="1"></font></font></div></td>
  </tr>
Vaibhav Arora (073210170)   Nitin Kumar (073702732) Pawan Kumar(073701271)   167
                                 Findsjob.com


</table>
</body>
</html>



Addemployer.php


<?
include_once("../myconnect.php");

$errcnt=0;
if(count($_POST)<>0)          //IF SOME FORM WAS POSTED DO
VALIDATION
{
      if(!get_magic_quotes_gpc())
      {

         $username=str_replace("$","\$",addslashes($_REQUEST["usernam
e"]));

         $sb_title=str_replace("$","\$",addslashes($_REQUEST["sb_title"]));

         $password=str_replace("$","\$",addslashes($_REQUEST["password
"]));

         $firstname=str_replace("$","\$",addslashes($_REQUEST["firstname
"]));

         $lastname=str_replace("$","\$",addslashes($_REQUEST["lastname"
]));

         $email=str_replace("$","\$",addslashes($_REQUEST["email"]));

         $street=str_replace("$","\$",addslashes($_REQUEST["street"]));
               $city=str_replace("$","\$",addslashes($_REQUEST["city"]));
               $state=str_replace("$","\$",addslashes($_REQUEST["state"]));

        $other_state=str_replace("$","\$",addslashes($_REQUEST["other_st
ate"]));

         $phone=str_replace("$","\$",addslashes($_REQUEST["phone"]));

         $phone1=str_replace("$","\$",addslashes($_REQUEST["phone1"]));


Vaibhav Arora (073210170)    Nitin Kumar (073702732) Pawan Kumar(073701271)   168
                               Findsjob.com



      $phone2=str_replace("$","\$",addslashes($_REQUEST["phone2"]));

      $mobile=str_replace("$","\$",addslashes($_REQUEST["mobile"]));

      $zip_code=str_replace("$","\$",addslashes($_REQUEST["zip_code"]))
;
      }
      else
      {
             $username=str_replace("$","\$",$_REQUEST["username"]);
             $sb_title=str_replace("$","\$",$_REQUEST["sb_title"]);
             $password=str_replace("$","\$",$_REQUEST["password"]);
             $firstname=str_replace("$","\$",$_REQUEST["firstname"]);
             $lastname=str_replace("$","\$",$_REQUEST["lastname"]);
             $email=str_replace("$","\$",$_REQUEST["email"]);
             $street=str_replace("$","\$",$_REQUEST["street"]);
             $city=str_replace("$","\$",$_REQUEST["city"]);
             $state=str_replace("$","\$",$_REQUEST["state"]);
             $other_state=str_replace("$","\$",$_REQUEST["other_state"]);
             $phone=str_replace("$","\$",$_REQUEST["phone"]);
             $phone1=str_replace("$","\$",$_REQUEST["phone1"]);
             $phone2=str_replace("$","\$",$_REQUEST["phone2"]);
             $mobile=str_replace("$","\$",$_REQUEST["mobile"]);
             $zip_code=str_replace("$","\$",$_REQUEST["zip_code"]);
}
if($state=="")
{ $state=$other_state; }

$phone_no="";
if(strlen(trim($phone))<>0)
{$phone_no.=$phone;}
$phone_no.="-";
if(strlen(trim($phone1))<>0)
{$phone_no.=$phone1;}
$phone_no.="-";
if(strlen(trim($phone2))<>0)
{$phone_no.=$phone2;}

if ( strlen(trim($username)) == 0 )
{
        $errs[$errcnt]="Username must be provided";
        $errcnt++;
}
elseif(preg_match ("/[^a-zA-Z0-9_]/", $_REQUEST["username"]))
{
Vaibhav Arora (073210170)   Nitin Kumar (073702732) Pawan Kumar(073701271)   169
                               Findsjob.com


       $errs[$errcnt]="Username can contain only Alpha-Numeric and
Underscore character";
       $errcnt++;
}
elseif(mysql_num_rows(mysql_query("select * from sbjbs_employers
where sb_username='$username' or sb_email_addr='$email'"))!= 0)
{
             $errs[$errcnt]="Some employer with same Username or
Email Address already exists";
             $errcnt++;
}

if ( !isset( $_REQUEST["password"] ) ||
(strlen(trim($_REQUEST["password"])) == 0) )
{
         $errs[$errcnt]="Password must be provided";
         $errcnt++;
}
elseif( strcmp($_REQUEST["password"],$_REQUEST["pwd2"]) != 0)
{
         $errs[$errcnt]="Retyped Password does not match the Password";
         $errcnt++;
}
if ( strlen(trim($firstname)) == 0 )
{
         $errs[$errcnt]="Firstname must be provided";
         $errcnt++;
}
elseif(preg_match ("/[;<>&]/", $_REQUEST["firstname"]))
{
         $errs[$errcnt]="Firstname can not have any special character (e.g.
& ; < >)";
         $errcnt++;
}

if ( strlen(trim($lastname)) == 0 )
{
        $errs[$errcnt]="Lastname must be provided";
        $errcnt++;
}
elseif(preg_match ("/[;<>&]/", $_REQUEST["lastname"]))
{
        $errs[$errcnt]="Lastname can not have any special character (e.g.
& ; < >)";
        $errcnt++;
}
Vaibhav Arora (073210170)   Nitin Kumar (073702732) Pawan Kumar(073701271)    170
                               Findsjob.com



       if ( !isset( $_REQUEST["email"] ) ||
(strlen(trim($_REQUEST["email"] )) == 0) )
       {
                $errs[$errcnt]="Email Address must be provided";
                $errcnt++;
       }
       elseif(preg_match ("/[;<>&]/", $_REQUEST["email"]))
       {
                $errs[$errcnt]="Email can not have any special character
(e.g. & ; < >)";
                $errcnt++;
       }

if ( strlen(trim($street)) == 0 )
{
        $errs[$errcnt]="Street must be provided";
        $errcnt++;
}
elseif(preg_match ("/[;<>&]/", $_REQUEST["street"]))
{
        $errs[$errcnt]="Street can not have any special character (e.g. & ; <
>)";
        $errcnt++;
}

if ( strlen(trim($city)) == 0 )
{
        $errs[$errcnt]="City must be provided";
        $errcnt++;
}
elseif(preg_match ("/[;<>&]/", $_REQUEST["city"]))
{
        $errs[$errcnt]="City can not have any special character (e.g. & ; <
>)";
        $errcnt++;
}

if ( strlen(trim($state)) == 0 )
{
        $errs[$errcnt]="State must be provided";
        $errcnt++;
}
elseif(preg_match ("/[;<>&]/", $_REQUEST["state"]))
{


Vaibhav Arora (073210170)   Nitin Kumar (073702732) Pawan Kumar(073701271)      171
                               Findsjob.com


       $errs[$errcnt]="State can not have any special character (e.g. & ; <
>)";
       $errcnt++;
}

if ( strlen(trim($zip_code)) == 0 )
{
        $errs[$errcnt]="Zip/Postal Code must be provided";
        $errcnt++;
}
elseif(preg_match ("/[;<>&]/", $_REQUEST["zip_code"]))
{
        $errs[$errcnt]="Zip/Postal Code can not have any special character
(e.g. & ; < >)";
        $errcnt++;
}

if ( $_REQUEST["country"]== 0 )
{
       $errs[$errcnt]="Country must be choosen";
       $errcnt++;
}

if(preg_match ("/[;<>&]/", $phone_no))
{
       $errs[$errcnt]="Phone No. can not have any special character (e.g.
& ; < >)";
       $errcnt++;
}

if(preg_match ("/[;<>&]/", $mobile))
{
       $errs[$errcnt]="Mobile can not have any special character (e.g. & ;
< >)";
       $errcnt++;
}

if($errcnt==0)
{
//           $sb_dob=date("YmdHis", mktime
(0,0,0,$sb_dob_month,$sb_dob_day,$sb_dob_year));
//     echo mktime
(0,0,0,$sb_dob_month,$sb_dob_day,$sb_dob_year).'<br>';
//     echo "$sb_dob_month,$sb_dob_day,$sb_dob_year";

$suspended="no";
Vaibhav Arora (073210170)   Nitin Kumar (073702732) Pawan Kumar(073701271)    172
                               Findsjob.com


//    $mem_type=0;
$config=mysql_fetch_array(mysql_query("select * from sbjbs_config"));

if($config["sb_mem_approval"]=="admin")
{$suspended="yes";}
//     if($config["sb_memtype"]<>"")
//     { $mem_type=$config["sb_memtype"];}
$query_insert="Insert into `sbjbs_employers`
( sb_username ,sb_password ,sb_last_login, sb_signup_on
,sb_suspended, sb_title, sb_firstname , sb_lastname, sb_email_addr ,
sb_addr1 , sb_city , sb_state , sb_zip , sb_country , sb_telephone,
sb_mobile)
VALUES         ( '$username'
,'$password',0,'".date("YmdHis",time())."','$suspended', '$sb_title',
'$firstname' , '$lastname', '$email','$street','$city','$state','$zip_code'
,".$_REQUEST["country"].",'$phone_no', '$mobile')
";
//echo $query_insert;
//die();
       $rs_insert=mysql_query($query_insert);
       if(mysql_affected_rows()>0)
       {
       if(isset($_REQUEST["subscribe"])&&($_REQUEST["subscribe"]=="ye
s"))
       {
         $check_prev=mysql_fetch_array(mysql_query("select * from
sbjbs_newsletter where sb_email='$email'"));
         if(!$check_prev)
         {
         mysql_query("insert into sbjbs_newsletter (sb_email) values
('$email')");
         }
       }
       mysql_query ("delete from sbjbs_emp_signups where
sb_email='$email'");
if($config["sb_mem_approval"]=="auto")
{
       //sending welcome mail
       $sbrow_con=mysql_fetch_array(mysql_query("select * from
sbjbs_config"));
       $sb_null_char=$sbrow_con["sb_null_char"];
       $sb_site_root=$sbrow_con["sb_site_root"];

      $rs0= mysql_fetch_array(mysql_query("SELECT * FROM
sbjbs_employers WHERE sb_email_addr='$email'"));
      if($rs0)
Vaibhav Arora (073210170)   Nitin Kumar (073702732) Pawan Kumar(073701271)    173
                               Findsjob.com


      {
      //Reads email to be sebt
      $sql = "SELECT * FROM sbjbs_mails where sb_mailid=1" ;
      $rs_query=mysql_query($sql);
      $login_url=$sb_site_root."/employer/signin_emp.php";

      if ( $rs=mysql_fetch_array($rs_query) )// if mail
      {
        if($rs["sb_status"]=="yes")
         {
                            $from =$rs["sb_fromid"];
                            $to = $rs0["sb_email_addr"];
                            $subject =$rs["sb_subject"];

      $body=str_replace("%title%", $rs0["sb_title"],str_replace("%email%",
$rs0["sb_email_addr"],str_replace("%password%",$rs0["sb_password"],str
_replace("%lname%", $rs0["sb_lastname"],str_replace("%fname%",
$rs0["sb_firstname"],str_replace("%username%", $rs0["sb_username"],
$rs["sb_mail"]) )))));

      $body=str_replace("%signup_url%",$sb_null_char,str_replace("%log
in_url%",$login_url,$body));

     $header="From:" . $from . "\r\n" ."Reply-To:". $from ;
     if(isset($rs["sb_html_format"])&&($rs["sb_html_format"]=="yes"))
     {
             $header .= "\r\nMIME-Version: 1.0";
             $header .= "\r\nContent-type: text/html; charset=iso-8859-
1\r\n";
             //$body=str_replace("\n","<br>",$body);
     }

//    echo "--from:-$from----to:-$to---sub:-$subject----head:-$header----
";
//   echo "<pre>$body</pre>";
//   die();
                    mail($to,$subject,$body,$header);
       }// end if status is on
       }// end if mail
     }
}    //if approval==auto
     //mail ends here
     header("Location: signin_emp.php?errmsg=".urlencode("You are
successfully registered with us"));
     die();
     }
Vaibhav Arora (073210170)   Nitin Kumar (073702732) Pawan Kumar(073701271)   174
                               Findsjob.com


      else
      {
           header("Location:
gen_confirm.php?errmsg=".urlencode("Some error occurred, please try
again."));
           die();
      }
}                 //end if-errcnt==0
}                 //end if count-post


function main()
{
global $errs, $errcnt;

$config=mysql_fetch_array(mysql_query("select * from sbjbs_config"));

$invalidaccess="No";
if( !isset($_REQUEST["rnum"]) || !isset($_REQUEST["email"] ) )
{
$invalidaccess="Yes";
}
else
{
if(!get_magic_quotes_gpc())
{
        $email=str_replace("$","\$",addslashes($_REQUEST["email"]));
        $rnum=str_replace("$","\$",addslashes($_REQUEST["rnum"]));
}
else
{
        $email=str_replace("$","\$",$_REQUEST["email"]);
        $rnum=str_replace("$","\$",$_REQUEST["rnum"]);
}
$rs0_query=mysql_query ("select * from sbjbs_emp_signups where
sb_email='$email' and sb_rnum='$rnum' ");
if (!($rs0=mysql_fetch_array($rs0_query)))
{
$invalidaccess="Yes";
}
}
if (($invalidaccess=="Yes")&&($config["sb_signup_verification"]=="yes"))
{
?>



Vaibhav Arora (073210170)   Nitin Kumar (073702732) Pawan Kumar(073701271)   175
                               Findsjob.com


<table width="80%" border="0" align="center" cellpadding="2"
cellspacing="0" class="errorstyle">
  <tr>
   <td><strong>&nbsp;Invalid
     Access</strong></td>
  </tr>
</table>
<?
return;
}

$showform="";
$sb_title='';
$username="";
$password="";
$firstname="";
$lastname="";

$email="";
if(isset($_REQUEST["email"]))
{ $email=$_REQUEST["email"]; }

$street="";
$city="";
$state="";
$country="";
$zip_code="";
$phone="";
$phone1="";
$phone2="";
$fax="";
$fax1="";
$fax2="";
$mobile="";
$subscribe="";
$other_state="";
//$sb_dob_day='';
//$sb_dob_month='';
//$sb_dob_year='';

//IF SOME FORM WAS POSTED DO VALIDATION
if ( count($_POST)>0 )
{
$username=$_REQUEST["username"];
$sb_title=$_REQUEST["sb_title"];
$firstname=$_REQUEST["firstname"];
Vaibhav Arora (073210170)   Nitin Kumar (073702732) Pawan Kumar(073701271)   176
                               Findsjob.com


$lastname=$_REQUEST["lastname"];
$email=$_REQUEST["email"];
$street=$_REQUEST["street"];
$city=$_REQUEST["city"];
$state=$_REQUEST["state"];
$country=$_REQUEST["country"];
$zip_code=$_REQUEST["zip_code"];
$phone=$_REQUEST["phone"];
$phone1=$_REQUEST["phone1"];
$phone2=$_REQUEST["phone2"];
$mobile=$_REQUEST["mobile"];
if(isset($_REQUEST["subscribe"]))
$subscribe=$_REQUEST["subscribe"];
$other_state=$_REQUEST["other_state"];
//$sb_dob_day=$_REQUEST['sb_dob_day'];
//$sb_dob_month=$_REQUEST['sb_dob_month'];
//$sb_dob_year=$_REQUEST['sb_dob_year'];
}
if (count($_POST)>0)
{

if ( $errcnt<>0 )
{
?>
<table width="80%" border="0" align="center" cellpadding="2"
cellspacing="0" class="errorstyle">
  <tr>
    <td colspan="2"><strong>&nbsp;Your request cannot be processed
due to following
      reasons</strong></td>
  </tr>
  <tr height="10">
    <td colspan="2"></td>
  </tr>
  <?

for ($i=0;$i<$errcnt;$i++)
{
?>
  <tr valign="top">
   <td width="6%">&nbsp;<?php echo $i+1;?></td>
   <td width="94%"><?php echo $errs[$i]; ?></td>
  </tr>
  <?
}
?>
Vaibhav Arora (073210170)   Nitin Kumar (073702732) Pawan Kumar(073701271)   177
                               Findsjob.com


</table>
<?

}

}

?>
<SCRIPT language=javascript>
//<!--
function emailCheck (emailStr) {
var emailPat=/^(.+)@(.+)$/
var specialChars="\\(\\)<>@,;:\\\\\\\"\\.\\[\\]"
var validChars="\[^\\s" + specialChars + "\]"
var quotedUser="(\"[^\"]*\")"
var ipDomainPat=/^\[(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})\]$/
var atom=validChars + '+'
var word="(" + atom + "|" + quotedUser + ")"
var userPat=new RegExp("^" + word + "(\\." + word + ")*$")
var domainPat=new RegExp("^" + atom + "(\\." + atom +")*$")
var matchArray=emailStr.match(emailPat)
if (matchArray==null) {
       alert("Email address seems incorrect (check @ and .'s)")
       return false
}
var user=matchArray[1]
var domain=matchArray[2]
if (user.match(userPat)==null) {
       alert("The username doesn't seem to be valid.")
       return false
}
var IPArray=domain.match(ipDomainPat)
if (IPArray!=null) {
       // this is an IP address
         for (var i=1;i<=4;i++) {
               if (IPArray[i]>255) {
                      alert("Destination IP address is invalid!")
               return false
               }
       }
       return true
}
var domainArray=domain.match(domainPat)
if (domainArray==null) {
       alert("The domain name doesn't seem to be valid.")
       return false
Vaibhav Arora (073210170)   Nitin Kumar (073702732) Pawan Kumar(073701271)   178
                               Findsjob.com


}
var atomPat=new RegExp(atom,"g")
var domArr=domain.match(atomPat)
var len=domArr.length
if (domArr[domArr.length-1].length<2 ||
        domArr[domArr.length-1].length>4) {
   alert("The address must end in a valid domain, or two letter country.")
   return false
}
if (len<2) {
   var errStr="This address is missing a hostname!"
   alert(errStr)
   return false
}
return true;
}



function validate(form)
{
if ( (form.username.value == "")) {
           alert('Please Specify Username!');
           form.username.focus();
   return false;
   }
if((form.username.value.match(/[^a-zA-Z0-9_]/)))
         {
                alert("Username can contain only alphanumeric and
underscore character");
                form.username.focus();
                return(false);
         }

      if(form.password.value == "")
      {
         alert('Please Specify Password.');
         form.password.focus();
         return false;
      }
      if (form.password.value != form.pwd2.value)
      {
              alert('Passwords do not match.');
              form.pwd2.value="";
              form.password.focus();
              form.password.select();
Vaibhav Arora (073210170)   Nitin Kumar (073702732) Pawan Kumar(073701271)   179
                                 Findsjob.com


             return false;
      }

if ( form.firstname.value == "" ) {
          alert('Please Specify Firstname!');
          form.firstname.focus();
   return false;
   }
if(form.firstname.value.match(/[&<>]+/))
        {
               alert("Please remove Invalid characters from Firstname (e.g.
& < >)");
               form.firstname.focus();
               return(false);
        }
if ( form.lastname.value == "" ) {
          alert('Please Specify Lastname!');
          form.lastname.focus();
   return false;
   }

if(form.lastname.value.match(/[&<>]+/))
       {
             alert("Please remove Invalid characters from Lastname (e.g.
& < >)");
             form.lastname.focus();
             return(false);
       }

if(!form.email.value.match(/[a-zA-Z\.\@\d\_]/))
       {
         alert('Invalid e-mail address.');
         form.email.focus();
         return false;
       }

if (!emailCheck (form.email.value) )
       {
             form.email.focus();
             return (false);
       }

if ( form.street.value == "" ) {
         alert('Please Specify Street!');
         form.street.focus();
   return false;
Vaibhav Arora (073210170)    Nitin Kumar (073702732) Pawan Kumar(073701271)   180
                               Findsjob.com


   }
if(form.street.value.match(/[&<>]+/))
       {
             alert("Please remove Invalid characters from Street (e.g. & <
>)");
             form.street.focus();
             return(false);
       }

if ( form.city.value == "" ) {
            alert('Please Specify City!');
            form.city.focus();
   return false;
   }
         if(form.city.value.match(/[&<>]+/))
         {
                 alert("Please remove Invalid characters from City(e.g. & <
>)");
                 form.city.focus();
                 return(false);
         }
if ( (form.state.selectedIndex == 0 ) && (form.other_state.value == "") ) {
            alert('Please Specify State!');
            form.state.focus();
   return false;
   }
         if(form.other_state.value.match(/[&<>]+/))
         {
                 alert("Please remove Invalid characters from State(e.g. & <
>)");
                 form.other_state.focus();
                 return(false);
         }
         if ( form.zip_code.value == "" ) {
            alert('Please Specify Zip/Postal Code!');
            form.zip_code.focus();
   return false;
   }
if(form.zip_code.value.match(/[&<>]+/))
         {
                 alert("Please remove Invalid characters from Zip/Postal Code
(e.g. & < >)");
                 form.zip_code.focus();
                 return(false);
         }
if ( form.country.selectedIndex == 0 ) {
Vaibhav Arora (073210170)   Nitin Kumar (073702732) Pawan Kumar(073701271)      181
                               Findsjob.com


           alert('Please Choose a Country!');
           form.country.focus();
   return false;
   }
return true;
}
// -->
</SCRIPT>
<form name="form1" method="post" action="addemployer.php"
onSubmit="return validate(this);">
  <table width="80%" border="0" align="center" cellpadding="0"
cellspacing="0" class="onepxtable">
     <tr class="titlestyle">
      <td>&nbsp;Employer Signup Process</td>
     </tr>
     <tr>
      <td valign="top"><table width="100%" border="0" align="center"
cellpadding="2" cellspacing="5">
         <tr valign="top">
           <td width="40%" align="right" class="innertablestyle"><font
class="normal"><strong>Username</strong></font></td>
           <td width="6"><font class="red">*</font></td>
           <td width="60%"><input name="username" type="text"
value="<?php echo $username ; ?>" size="30" maxlength="30">
            <br>
            <font class="smalltext">can not be changed Later</font></td>
         </tr>
         <tr valign="top">
           <td align="right" class="innertablestyle"><font
class="normal"><strong>Password</strong></font></td>
           <td><font class="red">*</font></td>
           <td><font face="Arial, Helvetica, sans-serif" size="2">
            <input name="password" type="password" value="<?php echo
$password; ?>" size="30" maxlength="30">
            </font></td>
         </tr>
         <tr valign="top">
           <td align="right" class="innertablestyle"><font
class="normal"><strong>Retype
            Password </strong></font></td>
           <td><font class="red">*</font></td>
           <td><font face="Arial, Helvetica, sans-serif" size="2">
            <input name="pwd2" type="password" id="pwd2" value="<?php
echo $password; ?>" size="30" maxlength="30">
            </font></td>
         </tr>
Vaibhav Arora (073210170)   Nitin Kumar (073702732) Pawan Kumar(073701271)   182
                               Findsjob.com


       <tr valign="top">
         <td align="right" class="innertablestyle"><font
class="normal"><strong>Title</strong></font></td>
         <td><font class="red">*</font></td>
         <td><SELECT name=sb_title id="sb_title">
            <OPTION value="Mr." <?php echo ($sb_title=='Mr.')?'selected':'';
?>>Mr.</OPTION>
            <OPTION value="Ms." <?php echo
($sb_title=='Ms.')?'selected':''; ?>>Ms.</OPTION>
            <OPTION value="Mrs." <?php echo
($sb_title=='Mrs.')?'selected':''; ?>>Mrs.</OPTION>
          </SELECT></td>
       </tr>
       <tr valign="top">
         <td align="right" class="innertablestyle"><font
class="normal"><strong>Firstname</strong></font></td>
         <td><font class="red">*</font></td>
         <td><font face="Arial, Helvetica, sans-serif" size="2">
          <input name="firstname" type="text" value="<?php echo
$firstname; ?>" size="30" maxlength="30">
          </font></td>
       </tr>
       <tr valign="top">
         <td align="right" class="innertablestyle"><font
class="normal"><strong>Lastname</strong></font></td>
         <td><font class="red">*</font></td>
         <td><font face="Arial, Helvetica, sans-serif" size="2">
          <input name="lastname" type="text" value="<?php echo
$lastname ; ?>" size="30" maxlength="30">
          </font></td>
       </tr>
       <?php
if($config["sb_signup_verification"]=="no")
{
?>
       <tr valign="top">
         <td align="right" class="innertablestyle"><font
class="normal"><strong>Email</strong></font></td>
         <td><font class="red">*</font></td>
         <td><font face="Arial, Helvetica, sans-serif" size="2">
          <input name="email" type="text" value="<?php echo $email; ?>"
size="30" maxlength="40">
          </font></td>
       </tr>
       <?php
}
Vaibhav Arora (073210170)   Nitin Kumar (073702732) Pawan Kumar(073701271)     183
                               Findsjob.com


else
{
  ?>
       <input name="email" type="hidden" value="<?php echo $email;
?>" size="30" maxlength="40">
       <input name="rnum" type="hidden" value="<?php echo
$_REQUEST["rnum"]; ?>" >
       <?
}
?>
       <tr valign="top">
        <td align="right" class="innertablestyle"><font
class="normal"><strong>Street</strong></font></td>
        <td><font class="red">*</font></td>
        <td><font face="Arial, Helvetica, sans-serif" size="2">
          <input type="text" size="30" maxlength="30" name="street"
value="<?php echo $street; ?>" >
          </font></td>
       </tr>
       <tr valign="top">
        <td align="right" class="innertablestyle"><font
class="normal"><strong>City</strong></font></td>
        <td><font class="red">*</font></td>
        <td><font face="Arial, Helvetica, sans-serif" size="2">
          <input type="text" size="30" maxlength="30" name="city"
value="<?php echo $city; ?>" >
          </font></td>
       </tr>
       <tr valign="top">
        <td align="right" class="innertablestyle"><font
class="normal"><strong>State</strong></font></td>
        <td><font class="red">*</font></td>
        <td><table width="100%" border="0" cellspacing="0"
cellpadding="0">
           <tr>
             <td><font class='normal'>US</font></td>
             <td><select name="state" >
                <option value="" selected >Select State</option>
                <?
                                  $state1=mysql_query("select * from
sbjbs_us_states order by sb_state");
                                  while($rst= mysql_fetch_array($state1))
                                  {
                                  ?>



Vaibhav Arora (073210170)   Nitin Kumar (073702732) Pawan Kumar(073701271)   184
                               Findsjob.com


                 <option value=<? echo $rst["sb_state"];?> <?
if($rst["sb_state"]==$state) {echo " selected ";}?>><? echo
$rst["sb_state"];?></option>
                 <?
                                          } // wend
                                          ?>
               </select></td>
            </tr>
            <tr>
              <td><font class='normal'>Non US</font></td>
              <td><input name="other_state" type="text" id="other_state"
value="<? echo $other_state;?>"></td>
            </tr>
           </table></td>
        </tr>
        <tr valign="top">
          <td height="24" align="right" class="innertablestyle"><font
class="normal"><strong>Zip/Postal
           Code </strong></font></td>
          <td><font class="red">*</font></td>
          <td><font face="Arial, Helvetica, sans-serif" size="2">
           <input name="zip_code" type="text" id="zip_code"
value="<?php echo $zip_code; ?>" size="30" maxlength="30" >
           </font></td>
        </tr>
        <tr valign="top">
          <td align="right" class="innertablestyle"><font
class="normal"><strong>Country</strong></font></td>
          <td><font class="red">*</font></td>
          <td><font face="Arial, Helvetica, sans-serif"
size="2"><strong><font color="#004566">
           <select name="country" >
            <option selected value="">Select Country</option>
            <?
$rs_t_query=mysql_query ("select * from sbjbs_country order by
country");
while ($rs_t=mysql_fetch_array($rs_t_query))
{
?>
            <option value="<? echo $rs_t["id"] ?>"
         <?php
                     if ($country== $rs_t["id"] )
                     {
                     echo " selected ";
                     }
                     ?>
Vaibhav Arora (073210170)   Nitin Kumar (073702732) Pawan Kumar(073701271)   185
                               Findsjob.com



        ><? echo $rs_t["country"] ; ?></option>
           <?
        }
                     ?>
          </select>
          </font></strong></font></td>
       </tr>
       <tr valign="top">
         <td height="24" align="right" class="innertablestyle"><font
class="normal"><strong>Phone</strong></font></td>
         <td>&nbsp;</td>
         <td><table border="0" align="left" cellpadding="0"
cellspacing="0">
           <tr>
             <td><font class="smalltext">Country Code </font></td>
             <td><font class="smalltext">Area Code </font></td>
             <td><font class="smalltext">Phone Number</font></td>
           </tr>
           <tr>
             <td width="90"><font face="Arial, Helvetica, sans-serif"
size="2">
              <input name="phone" type="text" id="phone" value="<?php
echo $phone; ?>" size="5" maxlength="5" >
              </font></td>
             <td width="77"><font face="Arial, Helvetica, sans-serif"
size="2">
              <input name="phone1" type="text" id="phone1"
value="<?php echo $phone1; ?>" size="8" maxlength="8" >
              </font></td>
             <td width="148"><font face="Arial, Helvetica, sans-serif"
size="2">
              <input name="phone2" type="text" id="phone2"
value="<?php echo $phone2; ?>" size="20" maxlength="20" >
              </font></td>
           </tr>
          </table>
          <font face="Arial, Helvetica, sans-serif" size="2">&nbsp;
</font></td>
       </tr>
       <tr valign="top">
         <td height="24" align="right" class="innertablestyle"><font
class="normal"><strong>Mobile</strong></font></td>
         <td>&nbsp;</td>
         <td><font face="Arial, Helvetica, sans-serif" size="2">


Vaibhav Arora (073210170)   Nitin Kumar (073702732) Pawan Kumar(073701271)   186
                                Findsjob.com


          <input type="text" name="mobile" size="30" maxlength="30"
value="<?php echo $mobile; ?>" >
          </font></td>
       </tr>
       <tr valign="top">
        <td height="24" align="right"
class="innertablestyle">&nbsp;</td>
        <td>&nbsp;</td>
        <td><font class='normal'>
          <input name="subscribe" type="checkbox" id="subscribe"
value="yes" <?php
                                            if($subscribe == "yes")
                                                  echo "checked"; ?>>
          Subscribe Newsletter</font></td>
       </tr>
       <tr valign="top">
        <td align="right" class="innertablestyle">&nbsp;</td>
        <td>&nbsp;</td>
        <td><input name="submit" type="submit" value="Signup"></td>
       </tr>
     </table></td>
   </tr>
 </table>
</form>
<?

}
include_once("template.php");

?>


Editemployer.php

<?php
include_once "logincheck.php";
include_once("../myconnect.php");

$errcnt=0;
if(count($_POST)<>0)           //IF SOME FORM WAS POSTED DO
VALIDATION
{
//          ob_start();
            if(!get_magic_quotes_gpc())
            {


Vaibhav Arora (073210170)   Nitin Kumar (073702732) Pawan Kumar(073701271)   187
                                Findsjob.com



        $sb_title=str_replace("$","\$",addslashes($_REQUEST["sb_title"]));

        $firstname=str_replace("$","\$",addslashes($_REQUEST["firstname
"]));

        $lastname=str_replace("$","\$",addslashes($_REQUEST["lastname"
]));

        $street=str_replace("$","\$",addslashes($_REQUEST["street"]));

        $city=str_replace("$","\$",addslashes($_REQUEST["city"]));

        $state=str_replace("$","\$",addslashes($_REQUEST["state"]));

        $other_state=str_replace("$","\$",addslashes($_REQUEST["other_st
ate"]));

        $phone=str_replace("$","\$",addslashes($_REQUEST["phone"]));

        $phone1=str_replace("$","\$",addslashes($_REQUEST["phone1"]));

        $phone2=str_replace("$","\$",addslashes($_REQUEST["phone2"]));

        $mobile=str_replace("$","\$",addslashes($_REQUEST["mobile"]));

        $zip_code=str_replace("$","\$",addslashes($_REQUEST["zip_code"]))
;
              }
              else
              {
                     $sb_title=str_replace("$","\$",$_REQUEST["sb_title"]);

        $firstname=str_replace("$","\$",$_REQUEST["firstname"]);

        $lastname=str_replace("$","\$",$_REQUEST["lastname"]);
                   $street=str_replace("$","\$",$_REQUEST["street"]);
                   $city=str_replace("$","\$",$_REQUEST["city"]);
                   $state=str_replace("$","\$",$_REQUEST["state"]);

        $other_state=str_replace("$","\$",$_REQUEST["other_state"]);
                    $phone=str_replace("$","\$",$_REQUEST["phone"]);
                    $phone1=str_replace("$","\$",$_REQUEST["phone1"]);
                    $phone2=str_replace("$","\$",$_REQUEST["phone2"]);
                    $mobile=str_replace("$","\$",$_REQUEST["mobile"]);


Vaibhav Arora (073210170)   Nitin Kumar (073702732) Pawan Kumar(073701271)    188
                                 Findsjob.com



      $zip_code=str_replace("$","\$",$_REQUEST["zip_code"]);
      }

      if($state=="")
      { $state=$other_state; }

      $phone_no="";
      if(strlen(trim($phone))<>0)
      {$phone_no.=$phone;}
      $phone_no.="-";
      if(strlen(trim($phone1))<>0)
      {$phone_no.=$phone1;}
      $phone_no.="-";
      if(strlen(trim($phone2))<>0)
      {$phone_no.=$phone2;}

     if ( strlen(trim($firstname)) == 0 )
     {
             $errs[$errcnt]="Firstname must be provided";
             $errcnt++;
     }
     elseif(preg_match ("/[;<>&]/", $_REQUEST["firstname"]))
     {
             $errs[$errcnt]="Firstname can not have any special
character (e.g. & ; < >)";
             $errcnt++;
     }

       if ( strlen(trim($lastname)) == 0 )
       {
               $errs[$errcnt]="Lastname must be provided";
               $errcnt++;
       }
       elseif(preg_match ("/[;<>&]/", $_REQUEST["lastname"]))
       {
               $errs[$errcnt]="Lastname can not have any special character
(e.g. & ; < >)";
               $errcnt++;
       }

      if ( strlen(trim($street)) == 0 )
      {
              $errs[$errcnt]="Street must be provided";
              $errcnt++;
      }
Vaibhav Arora (073210170)   Nitin Kumar (073702732) Pawan Kumar(073701271)   189
                               Findsjob.com


       elseif(preg_match ("/[;<>&]/", $_REQUEST["street"]))
       {
               $errs[$errcnt]="Street can not have any special character
(e.g. & ; < >)";
               $errcnt++;
       }
       if ( strlen(trim($city)) == 0 )
       {
               $errs[$errcnt]="City must be provided";
               $errcnt++;
       }
       elseif(preg_match ("/[;<>&]/", $_REQUEST["city"]))
       {
               $errs[$errcnt]="City can not have any special character (e.g.
& ; < >)";
               $errcnt++;
       }

       if ( strlen(trim($state)) == 0 )
       {
               $errs[$errcnt]="State must be provided";
               $errcnt++;
       }
       elseif(preg_match ("/[;<>&]/", $_REQUEST["state"]))
       {
               $errs[$errcnt]="State can not have any special character (e.g.
& ; < >)";
               $errcnt++;
       }

     if ( strlen(trim($zip_code)) == 0 )
     {
             $errs[$errcnt]="Zip/Postal Code must be provided";
             $errcnt++;
     }
     elseif(preg_match ("/[;<>&]/", $_REQUEST["zip_code"]))
     {
             $errs[$errcnt]="Zip/Postal Code can not have any special
character (e.g. & ; < >)";
             $errcnt++;
     }

      if ( $_REQUEST["country"]== 0 )
      {
             $errs[$errcnt]="Country must be choosen";
             $errcnt++;
Vaibhav Arora (073210170)   Nitin Kumar (073702732) Pawan Kumar(073701271)      190
                               Findsjob.com


      }

       if(preg_match ("/[;<>&]/", $phone_no))
       {
              $errs[$errcnt]="Phone No. can not have any special character
(e.g. & ; < >)";
              $errcnt++;
       }

       if(preg_match ("/[;<>&]/", $mobile))
       {
              $errs[$errcnt]="Mobile can not have any special character
(e.g. & ; < >)";
              $errcnt++;
       }
       if($errcnt==0)
       {
       $suspended="no";
       $config=mysql_fetch_array(mysql_query("select * from
sbjbs_config"));

      if($config["sb_mem_approval"]=="admin")
      {$suspended="no";}
      $query_update="update `sbjbs_employers` set
      sb_suspended='$suspended',
      sb_title='$sb_title',
      sb_firstname='$firstname' ,
      sb_lastname='$lastname' ,
      sb_addr1='$street' ,
      sb_city='$city' ,
      sb_state='$state' ,
      sb_zip='$zip_code' ,
      sb_country=".$_REQUEST["country"]." ,
      sb_telephone='$phone_no',
      sb_mobile='$mobile'
      where sb_id=".$_SESSION["sbjbs_emp_userid"];
//echo $query_update;
//die();
      $rs_update=mysql_query($query_update);

      if(mysql_affected_rows()>0)
      {
            header("Location:
personal_confirm_mem.php?errmsg=".urlencode("Your personal profile
has been updated."));
            die();
Vaibhav Arora (073210170)   Nitin Kumar (073702732) Pawan Kumar(073701271)   191
                               Findsjob.com


      }
      else
      {
            header("Location:
personal_confirm_mem.php?err=editemployer&errmsg=".urlencode("Sorry
, no updations carried out."));
            die();
      }
  }                //end if-errcnt==0
}                  //end if count-post


function main()
{
global $errs, $errcnt;

$mem=mysql_fetch_array(mysql_query("select * from sbjbs_employers
where sb_id=".$_SESSION["sbjbs_emp_userid"]));

//IF SOME FORM WAS POSTED DO VALIDATION
if ( $mem )
{
$sb_title=$mem["sb_title"];
$firstname=$mem["sb_firstname"];
$lastname=$mem["sb_lastname"];
$street=$mem["sb_addr1"];
$city=$mem["sb_city"];
$state=$mem["sb_state"];
$country=$mem["sb_country"];
$zip_code=$mem["sb_zip"];

$phone_arr=explode("-",$mem["sb_telephone"]);
//if(count
$phone=$phone_arr[0];
$phone1=$phone_arr[1];
$phone2=$phone_arr[2];

$mobile=$mem["sb_mobile"];
$other_state=$mem["sb_state"];
}
else
{
echo "<p>&nbsp;</p><p>&nbsp;</p><br><br><br><div
align='center'><font class='normal'>Member Not Found. Click <a
href='index.php' >here</a> to


Vaibhav Arora (073210170)   Nitin Kumar (073702732) Pawan Kumar(073701271)   192
                                Findsjob.com


continue</font></div><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p
>&nbsp;</p><p>&nbsp;</p>";
return;
}
if (count($_POST)>0)
{

if ( $errcnt<>0 )
{
?>
<table width="90%" border="0" align="center" cellpadding="2"
cellspacing="0" class="errorstyle">
  <tr>
    <td colspan="2"><strong>&nbsp;Your Request cannot be processed
due
      to following Reasons</strong></td>
  </tr>
  <tr height="10">
    <td colspan="2"></td>
  </tr>
  <?

for ($i=0;$i<$errcnt;$i++)
{
?>
  <tr valign="top">
   <td width="6%">&nbsp;<?php echo $i+1;?></td>
   <td width="94%"><?php echo $errs[$i]; ?></td>
  </tr>
  <?
}
?>
</table>
<?

}

}

?>
<SCRIPT language=javascript>
//<!--
 function validate(form)
 {

      if ( form.firstname.value == "" ) {
Vaibhav Arora (073210170)   Nitin Kumar (073702732) Pawan Kumar(073701271)   193
                                   Findsjob.com


          alert('Please Specify Firstname!');
                 form.firstname.focus();
          return false;
          }
       if(form.firstname.value.match(/[&<>]+/))
               {
                      alert("Please remove Invalid characters from Firstname
(e.g. & < >)");
                      form.firstname.focus();
                      return(false);
               }
       if ( form.lastname.value == "" ) {
          alert('Please Specify Lastname!');
                 form.lastname.focus();
          return false;
          }
       if(form.lastname.value.match(/[&<>]+/))
               {
                      alert("Please remove Invalid characters from Lastname
(e.g. & < >)");
                      form.lastname.focus();
                      return(false);
               }

       if ( form.street.value == "" ) {
          alert('Please Specify Street!');
                 form.street.focus();
          return false;
          }
       if(form.street.value.match(/[&<>]+/))
               {
                      alert("Please remove Invalid characters from Street
(e.g. & < >)");
                      form.street.focus();
                      return(false);
               }

          if ( form.city.value == "" ) {
             alert('Please Specify City!');
                     form.city.focus();
             return false;
             }
                  if(form.city.value.match(/[&<>]+/))
                  {
                         alert("Please remove Invalid characters from City(e.g. &
< >)");
Vaibhav Arora (073210170)      Nitin Kumar (073702732) Pawan Kumar(073701271)       194
                                  Findsjob.com


                      form.city.focus();
                      return(false);
                   }
          if ( (form.state.selectedIndex == 0 ) && (form.other_state.value ==
"") ) {
           alert('Please Specify State!');
                     form.state.focus();
           return false;
           }
             if(form.other_state.value.match(/[&<>]+/))
                  {
                          alert("Please remove Invalid characters from State(e.g.
& < >)");
                          form.other_state.focus();
                          return(false);
                  }
                  if ( form.zip_code.value == "" ) {
           alert('Please Specify Zip/Postal Code!');
                     form.zip_code.focus();
           return false;
           }
        if(form.zip_code.value.match(/[&<>]+/))
                  {
                          alert("Please remove Invalid characters from Zip/Postal
Code (e.g. & < >)");
                          form.zip_code.focus();
                          return(false);
                  }
if ( form.country.selectedIndex == 0 ) {
           alert('Please Choose a Country!');
                     form.country.focus();
           return false;
           }
        return true;
  }
// -->
</SCRIPT>

<form name="form1" method="post" action="editemployer.php"
onSubmit="return validate(this);">
 <table width="90%" border="0" align="center" cellpadding="0"
cellspacing="0" class="onepxtable">
       <tr class="titlestyle">
        <td >&nbsp;Edit Personal Profile</td>
       </tr>
   <tr>
Vaibhav Arora (073210170)     Nitin Kumar (073702732) Pawan Kumar(073701271)        195
                               Findsjob.com


     <td><table width="100%" border="0" align="center" cellpadding="2"
cellspacing="5">
       <tr valign="top">
         <td align="right" class="innertablestyle"><font
class="normal"><strong>Title</strong></font></td>
         <td><font class="red">*</font></td>
         <td> <SELECT name=sb_title id="sb_title">
           <OPTION value="Mr." <?php echo ($sb_title=='Mr.')?'selected':'';
?>>Mr.</OPTION>
           <OPTION value="Ms." <?php echo
($sb_title=='Ms.')?'selected':''; ?>>Ms.</OPTION>
           <OPTION value="Mrs." <?php echo
($sb_title=='Mrs.')?'selected':''; ?>>Mrs.</OPTION>
          </SELECT></td>
       </tr>
       <tr valign="top">
         <td width="40%" align="right" class="innertablestyle"><font
class="normal"><strong>Firstname</strong></font></td>
         <td width="6"><font class="red">*</font></td>
         <td width="60%"><font face="Arial, Helvetica, sans-serif"
size="2">
          <input name="firstname" type="text" value="<?php echo
$firstname; ?>" size="30" maxlength="30">
          </font></td>
       </tr>
       <tr valign="top">
         <td align="right" class="innertablestyle"><font
class="normal"><strong>Lastname</strong></font></td>
         <td><font class="red">*</font></td>
         <td><font face="Arial, Helvetica, sans-serif" size="2">
          <input name="lastname" type="text" value="<?php echo
$lastname ; ?>" size="30" maxlength="30">
          </font></td>
       </tr>
       <tr valign="top">
         <td align="right" class="innertablestyle"><font
class="normal"><strong>Street</strong></font></td>
         <td><font class="red">*</font></td>
         <td><font face="Arial, Helvetica, sans-serif" size="2">
          <input type="text" size="30" maxlength="30" name="street"
value="<?php echo $street; ?>" >
          </font></td>
       </tr>
       <tr valign="top">
         <td align="right" class="innertablestyle"><font
class="normal"><strong>City</strong></font></td>
Vaibhav Arora (073210170)   Nitin Kumar (073702732) Pawan Kumar(073701271)    196
                               Findsjob.com


          <td><font class="red">*</font></td>
          <td><font face="Arial, Helvetica, sans-serif" size="2">
           <input type="text" size="30" maxlength="30" name="city"
value="<?php echo $city; ?>" >
           </font></td>
        </tr>
        <tr valign="top">
          <td align="right" class="innertablestyle"><font
class="normal"><strong>State</strong></font></td>
          <td><font class="red">*</font></td>
          <td><table width="100%" border="0" cellspacing="0"
cellpadding="0">
            <tr>
              <td><font class='normal'>US</font></td>
              <td> <select name="state" >
                 <option value="" selected >Select State</option>
                 <?
                                         $state1=mysql_query("select * from
sbjbs_us_states order by sb_state");
                                         while($rst=
mysql_fetch_array($state1))
                                         {
                                         ?>
                 <option value="<? echo $rst["sb_state"];?>" <?
if($rst["sb_state"]==$state) {echo " selected ";}?>><? echo
$rst["sb_state"];?></option>
                 <?
                                                 } // wend
                                                 ?>
               </select> </td>
            </tr>
            <tr>
              <td><font class='normal'>Non US</font></td>
              <td><input name="other_state" type="text" id="other_state"
value="<? echo $other_state;?>"></td>
            </tr>
           </table></td>
        </tr>
        <tr valign="top">
          <td height="24" align="right" class="innertablestyle"><font
class="normal"><strong>Zip/Postal
           Code </strong></font></td>
          <td><font class="red">*</font></td>
          <td><font face="Arial, Helvetica, sans-serif" size="2">
           <input name="zip_code" type="text" id="zip_code"
value="<?php echo $zip_code; ?>" size="30" maxlength="30" >
Vaibhav Arora (073210170)   Nitin Kumar (073702732) Pawan Kumar(073701271)    197
                                 Findsjob.com


          </font></td>
       </tr>
       <tr valign="top">
        <td align="right" class="innertablestyle"><font
class="normal"><strong>Country</strong></font></td>
        <td><font class="red">*</font></td>
        <td><font face="Arial, Helvetica, sans-serif"
size="2"><strong><font color="#004566">
          <select name="country" >
           <option selected value="">Select Country</option>
           <?
$rs_t_query=mysql_query ("select * from sbjbs_country order by
country");
while ($rs_t=mysql_fetch_array($rs_t_query))
{
?>
           <option value="<? echo $rs_t["id"] ?>"
               <?php
                          if ($country== $rs_t["id"] )
                          {
                          echo " selected ";
                          }
                          ?>

                ><? echo $rs_t["country"] ; ?></option>
           <?
                }
                            ?>
          </select>
          </font></strong></font></td>
       </tr>
       <tr valign="top">
        <td height="24" align="right" class="innertablestyle"><font
class="normal"><strong>Phone</strong></font></td>
        <td>&nbsp;</td>
        <td><table border="0" align="left" cellpadding="0"
cellspacing="0">
           <tr>
             <td><font class="smalltext">Country Code </font></td>
             <td><font class="smalltext">Area Code </font></td>
             <td><font class="smalltext">Phone Number</font></td>
           </tr>
           <tr>
             <td width="90"><font face="Arial, Helvetica, sans-serif"
size="2">


Vaibhav Arora (073210170)   Nitin Kumar (073702732) Pawan Kumar(073701271)   198
                                Findsjob.com


              <input name="phone" type="text" id="phone" value="<?php
echo $phone; ?>" size="5" maxlength="5" >
              </font></td>
             <td width="77"><font face="Arial, Helvetica, sans-serif"
size="2">
              <input name="phone1" type="text" id="phone1"
value="<?php echo $phone1; ?>" size="8" maxlength="8" >
              </font></td>
             <td width="148"><font face="Arial, Helvetica, sans-serif"
size="2">
              <input name="phone2" type="text" id="phone2"
value="<?php echo $phone2; ?>" size="20" maxlength="20" >
              </font></td>
           </tr>
          </table>
          <font face="Arial, Helvetica, sans-serif" size="2">&nbsp;
</font></td>
       </tr>
       <tr valign="top">
        <td height="24" align="right" class="innertablestyle"><font
class="normal"><strong>Mobile</strong></font></td>
        <td>&nbsp;</td>
        <td><font face="Arial, Helvetica, sans-serif" size="2">
          <input type="text" name="mobile" size="30" maxlength="30"
value="<?php echo $mobile; ?>" >
          </font></td>
       </tr>
       <tr valign="top">
        <td align="right" class="innertablestyle">&nbsp;</td>
        <td>&nbsp;</td>
        <td><input name="submit" type="submit" value="Update"></td>
       </tr>
     </table></td>
   </tr>
 </table>
 </form>
<?

}
include_once("template.php");

?>


Login.php


Vaibhav Arora (073210170)   Nitin Kumar (073702732) Pawan Kumar(073701271)   199
                               Findsjob.com


<?php

include_once "session.php";
include_once "myconnect.php";

if(!isset($_REQUEST['UserName']) || ($_REQUEST['UserName']=="") ||
!isset($_REQUEST['Password']) || ($_REQUEST['Password']=="") )
{
        header("Location: index.php?msg=".urlencode("Please enter login
information!"));
        die();
}

if (!get_magic_quotes_gpc())
{
        $username=str_replace('$',
'\$',addslashes($_REQUEST["UserName"]));
        $Password=str_replace('$',
'\$',addslashes($_REQUEST["Password"]));
}
else
{
        $username=str_replace('$', '\$',$_REQUEST["UserName"]);
        $Password=str_replace('$', '\$',$_REQUEST["Password"]);
}

$sql="SELECT * FROM sbjbs_admin WHERE
sb_admin_name='$username' AND sb_pwd='$Password'";
$rs_query=mysql_query($sql);
if ( $rs=mysql_fetch_array($rs_query) )
{
        if($rs["sb_pwd"]===$_REQUEST['Password'])
        {

      $_SESSION["softbiz_jbs_adminname"]=$rs["sb_admin_name"];
            $_SESSION["softbiz_jbs_adminid"]=$rs["sb_id"];
            header("Location:
login_process.php?msg=".urlencode("Welcome ".$rs["sb_admin_name"]));
            die();
      }
}

header("Location: index.php?msg=". urlencode("Please enter correct login
information!") );
die();
?>
Vaibhav Arora (073210170)   Nitin Kumar (073702732) Pawan Kumar(073701271)   200
                               Findsjob.com



Logout.php

<?
include "logincheck.php";
session_destroy();
header("Location:"."index.php");
die();
?>




Software Testing


Vaibhav Arora (073210170)   Nitin Kumar (073702732) Pawan Kumar(073701271)   201
                                 Findsjob.com


Software testing is the process of showing the errors on the project.
Testing means; executing a program in order to understand its behaviors
that are whether or not the program exhibits a failure.
       To be more specific, software testing means executing a program in
order to assure.
      The correctness of software with respect to software to requirement
       of intent.
      The performance of various conditions.
      The robustness software that is its ability to handle correct input.
      The usability, reliability of software.
      Install ability of software various condition.


The purpose of testing is to show that the program some errors. The aim
of the most testing method is to systematically and actively locate the
faults in the program and repair them.


Test Case
The contents required to test a program is included in test cases
ultimately; testing comes down to selecting and executing essential
pieces of information.
      A set of inputs.
      The expected results when the inputs are expected.
      The conditions for execution of code.


The component of test cases can be different or they will be behaved
differently in web based application from the component of test cases in
a arithmetical project.
       For instance, taking the example of employee entry form of my
project is generating exception by giving wrong input to it (the concept of
robustness).


Vaibhav Arora (073210170)   Nitin Kumar (073702732) Pawan Kumar(073701271)    202
                                Findsjob.com


      In a web based application we can handle the exceptions (Run-time
errors) generated by inputting wrong value in two ways.
   1. By putting the code in try block to throw the exception.
   2. By using client side validation. So in the client machine so that the
      user could not enter wrong input and he could know that which
      type of value should be input.


In my project entitled “Findsjob.com” which is a web based application.
I have used the second one technique to handle the conditions generated
by giving wrong input. Yes, I have used client side validation in my
project.


Testing Laws –
There are rules (laws) to be followed while performing the testing process.
These are as follows.
   1. Testing can only be used to show the presence of error not absence
      of error.
   2. A combination of different verification and validation method out
      perform a single method alone.
   3. Developers are unsuited to test their own code.
   4. Approximately 80% of errors are found in 20% of code.
   5. Partition testing, which is new test criteria is well suited for long
      project testing.
   6. The adequacy of a test suite for the coverage criterion can only be
      defined intuitively.




Black Box and White Box Testing Strategies




Vaibhav Arora (073210170)    Nitin Kumar (073702732) Pawan Kumar(073701271)   203
                               Findsjob.com


Black box testing are not a testing technique but a method for test cases
selection from the system.
Let us briefly description them.




Black Box Testing


In this method, where test cases are derived from the functional
specification of the system
      Black box test case selection can be done without any reference to
program code. Test case selection in only concerned with the functionally
and feature of the system but with its external operation.


Advantage: The real advantage of black box test case selection is that it
can be done the design and coding of program. Black box test case can
also help to get the design and coding correct with respect to
specification.


Disadvantage: The main disadvantage of black box testing is that black
test cases con not detect addition functions or feature that has been
added to the code.


White Box Testing
In this method, where the test cases are derived from internal design
specifications or actual code (it is some time referred to glass box
testing).
      White box test cases are selected using specification. Design and
code for the program of function under test.




Vaibhav Arora (073210170)   Nitin Kumar (073702732) Pawan Kumar(073701271)   204
                               Findsjob.com


Advantage; The chief advantage of white box testing is that it tests the
maternal details of the paths that a program can execute to determine if
the problem occurs.


Disadvantage: The main disadvantage of whit box testing is that you
must wait until after design and coding of the programs of function
under test have been completed in order to select the test criteria.




Level of Testing

There are three main level of testing which given below.

Unit Testing
In unit testing different modules are tested against the specification
produced during design for the module like testing Add, Show module
whether these modules adding and then show the record correctly or not.
This phase is essentially for verification of code produced during the
coding phase and to test the internal logic of the modules.



Integration Testing
Integration testing in this many unit testing modules are combined into
subsystems, which are then tested the goal here is to see if the modules
are integrated properly or not like after adding records show perfectly
showing the added record and perform the other task like transaction
and instalment payment etc. on the record added.

System Testing

In system and acceptance testing the entire system is tested the
reference document for this process is the requirement document and
the goal is to see if the software meets its requirement. The following
format given below is dummy data. In which total amount are 15129,
Vaibhav Arora (073210170)   Nitin Kumar (073702732) Pawan Kumar(073701271)   205
                               Findsjob.com


this is the correct format. In case if we add record of the same company
again, it will give an error message that company is already present
would like to add for the same company or not.


Cyclomatic Complexity : - cyclmatic complexity is the part of system
testing/ program testing . in this type of testing we make the control flow
graph(CFG) for the program logic. We can make the control flow graph of
the following controls
      Sequence flow
      If-else flow
      While loop
      Case




Fig. control flow graph(if-else,while,sequence)




Vaibhav Arora (073210170)   Nitin Kumar (073702732) Pawan Kumar(073701271)    206
                                 Findsjob.com




                                Data Security
                                Rights and Permission
                                Window Authetication




Vaibhav Arora (073210170)   Nitin Kumar (073702732) Pawan Kumar(073701271)   207
                               Findsjob.com


System Security Measures

Data Security:


Data security is protection of data in the database or any storage. In the
case of database the term data integrity and data security confuse the
users some time. They understand both terms the same but these both
term have a main difference.


Security means protecting data against authorized.


Rights and Permissions:


The more you trusted, the more access you will get for example of you
are fully trusted them you will find the permission to access the network
as well as the database (an case of web-based Application).
       The word permission is not same as right in the case of data
base(SQL Server). Permission is what you have been given by other to do.
But right is what you have your own. So we can say that one has a list of
permission to access and manipulate object.
       The permission on the projects may of following type.
      Read Permission.
      Write Permission
      Delete Permission
      Behead Permission


I have used two mode of security in my project.


   1. Authentication
   2. Authorization



Vaibhav Arora (073210170)   Nitin Kumar (073702732) Pawan Kumar(073701271)   208
                                Findsjob.com


Authentication:


Authentication is the process of checking valid user. One can not claim
to be an owner of database that is under authority of other. You have to
first prove your ownership that you are owner
You ownership can only be contested, however after identity is verified.
The process of verifying your identity is called authentication.
      My project “Findsjob.com”I have User_Id and Password to verify
the identity i.e. for authentication process. The user’s once entering valid
user_id and password. User can access select (Admin) process.


Authorization:


Authorization is the process of specifying the permission for authorized
user whether they can modify data or not.
I have implemented it in my project by specifying membership.
I have done its all in web.config file
Actually web.config file is a XML file which is used to perform the
application setting.
Any thing changed in this file affect all the user.




Security Criteria in My Project:- I have used both authentication and
autherisation process in my project. In ASP.Net there are three types of
authentication process these are
Vaibhav Arora (073210170)   Nitin Kumar (073702732) Pawan Kumar(073701271)     209
                               Findsjob.com


      Form Authentication
      Window Authentication
      Passport Authentication


   In the form authentication we protect the particular form accessed
   from the un autherised user.
   In Window authentication we protect the particular application from
   the unautherised user.
   Passport authentication is provied by microsoft to its user for some
   charges.


For Autherisation for autherisation process I have defined the




Vaibhav Arora (073210170)   Nitin Kumar (073702732) Pawan Kumar(073701271)   210
                               Findsjob.com




Cost Estimation




Vaibhav Arora (073210170)   Nitin Kumar (073702732) Pawan Kumar(073701271)   211
                                Findsjob.com


       Cost estimation is one very important activity. Today, Software is
the most expensive element in many computer-based systems. Large cost
estimation errors can make the difference between profit and loss. Cost
overrun can be disastrous for the developers.

       Software cost and effort estimation will never be an exact science.
To many variables such as human, technical, environmental can affect
the ultimate cost of software and effort applied to develop it.

To achieve reliable cost estimation a number of options are there:

   Delay estimation until late in project.
   Use relatively simple decomposition techniques to generate project
    cost and effort estimations.
   Develop an empirical model for software cost and effort.



       LOC and FP can be the basic data from which productivity metrics
can be computed. LOC, Line of code and FP, Function Point are distinct
estimation techniques. The LOC and FP techniques differ in the level of
details required for decomposition. When LOC is used as the estimation
variable, function decomposition is absolutely essential. The expected
value for LOC and FP is computed. The expected value for the estimation
variable E can be computed as weighted average of the optimistic (a),
most likely (m) and pessimistic (b) LOC or FP estimation.

                            E=(A+4M+B)/6

Gives highest credence to the most likely estimation




Vaibhav Arora (073210170)    Nitin Kumar (073702732) Pawan Kumar(073701271)   212
                               Findsjob.com




      Employee Salary Report
      Advertisement
      Receipt




Vaibhav Arora (073210170)   Nitin Kumar (073702732) Pawan Kumar(073701271)   213
                                     Findsjob.com




Employee Salary Report


Emp_id   Emp_Name     Emp_add       Salary   Total_Leave    Deduct_Salary   Incentive   Total_Salary
1        Amit Singh   A-234,goal    20000    3              2000            900         18100
                      market
2        Shena        f-123,        14500    2              1000            500         14000
         Panday       Mukharji
                      Nagar
3        Atmakumar    A-            9000     1              300             300         9000
         sharma       234,Ashok
                      Vihar Delhi
4        Bipin        B-            12000    0              0               900         12900
         Dubey        34,Prashant
                      Vihar Delhi




Reservation Receipt



Receipt id        Tourist id         From city             Tocity            cost
123               Fsstr              Patna                 Nalanda           4551
124               Fsttr1             Lucknow               Agra              4000
125               Fstr2              Agra                  Shimla            4555
126               Fsstr3             Bangalore             Patna             8000
127               Wwn1               Chenney               Jaipur            10221
234               Fsde               Gorakhpur             Amritishar        7000
235               Seee               Kanpur                Dehra doon        4500
127               Fsstr5             Manglore              Kullu             7122
128               Fstr6              Mumbai                Delhi             10000
128               Fsttr7             Nashik                Allahabad         10021




Advertisement Reports
Vaibhav Arora (073210170)      Nitin Kumar (073702732) Pawan Kumar(073701271)                          214
                                               Findsjob.com




SR_No   Ad_Name      Ad_guide   Ad_Cname       Ad_contact   Ad_Email                     Ad_Start_time   Ad_End_time

1       Ad for       Manish     Shushil rai    9811653245   manish @gmail.com            12/5/2004       12/5/2008
        ICICI        singh
        insurance
        policy
2       Ad for       Priya      Rohit          9856231475   Priya23@rediff.com           5/06/2005       5/2/2006
        priya        Panday     Dubey
        cosmetics
3       Ad for       Sumit      Rahu           9873562314   Sumit343@gmail               5/04/2005       35/25/2006
        reyan        Patel
        Iteniries
4       Shyam        Shyam      Ad for         9658324561   shyam12@gmail.com            6/5/2006        18/6/2007
        Electronic   Malhotra   electronic
                                articals
5       Vishal       Ramesh     Ad for a       9873568941   vishalmegamart@hotmail.com   9/22/2008       6/27/2009
        Mega         Lal        city mart in
        Mart                    Delhi




Vaibhav Arora (073210170)                Nitin Kumar (073702732) Pawan Kumar(073701271)                                215
                               Findsjob.com




Vaibhav Arora (073210170)   Nitin Kumar (073702732) Pawan Kumar(073701271)   216
                                 Findsjob.com


16.. PERT CHART FOR THE PROJECT
16 PERT CHART FOR THE PROJECT



It is very important for any multi-people project to time estimation. It
insures best recourse and manpower utilization. In case of this project,
there is only one man is involve and takes very few resources. But
according to program structure and available time, there are a schedule
must be follow. And it was achieved by PERT and Timeline Chart.
PERT( program evaluation and review technique) – PERT provides
quantitative tools that allow the software planner to
   1. Determine the critical path
   2. established the “most likely” time estimation

   3. Calculate boundary time that define a time windows for a

      particular task

Major Tasks of the Project are:

      Task                                        time(in week)

      1. Requirement analysis                     3

      2. System Design                            4

      3. Interface design                         3

      4. Animation file design                    2

      5 C source code development and testing 1

      6 Authoring                                 2

      7. Integration and testing                  2

      8. Implementation                           1




Vaibhav Arora (073210170)   Nitin Kumar (073702732) Pawan Kumar(073701271)   217
                                   Findsjob.com




         Start

              3
                                                          Critical Path = 16
         Require
         ment                        Server
         an.                         module
                                                      3
             4
                            3


         Design                                               coding

                                                3
                            1                                          2

                                     Server
                                     Setting              Integration
                                                          & testing

                                                                       1



                                                              Implementati
                                                              on




In above graph bold line show the critical and their value= 16 week




16.1 Time Line Chart (Gantt Chart)

Vaibhav Arora (073210170)       Nitin Kumar (073702732) Pawan Kumar(073701271)   218
                                   Findsjob.com


    In timeline chart tasks taken as input and start date, effort, finished date

    When creating a software project schedule set of tasks are encountered;

    are computed.

    Task

    Timeline chart of the project is follow-


A                    Analysis

B          Feasibility Study

C          Requirement Specification

D          Installation and testing of
           Software and hardware

E          System Design

F          Write Program

G          Test Program

H          Test Software

I          Convert System

J          Implement Follow Up

K          Accept




    Vaibhav Arora (073210170)   Nitin Kumar (073702732) Pawan Kumar(073701271)     219
                               Findsjob.com




       Future Scope of the Project


      “Findsjob.com” which is going to be developed, has been designed
to work on large scale. As we have seen the difficulties in the manual
system which is inconvenient and time consuming process well –
organized computerized implementation of job portal will remove all the
limitations that arise in manual system and it will provide speedy
retrieval of information despite having large size of database.


We know that now a days every one want to do work very smoothly and
fast because a lock of time. In the future I would like to extend this
portal and try to give service very less time and smoothly.


Vaibhav Arora (073210170)   Nitin Kumar (073702732) Pawan Kumar(073701271)   220
                               Findsjob.com


Some person are interested to no the cultures and other tradition of they
place where they have to go; so we should take care of those thing and
this facilities to them. I have to use flash and extended use of multimedia
animation so that we could provide information to the customer in
attractive manner.




Vaibhav Arora (073210170)   Nitin Kumar (073702732) Pawan Kumar(073701271)    221
                               Findsjob.com




                        Bibliography
Books
      Software engineering by Roger s. Pressman
      An Introduction To Database Systems by Bipin C Desai
      Practical PHP Programming
      PHP 5 Power Programming
      A Programmer's Introduction to PHP 4.0Developing
      PHP Applications for IBM Data Servers
      A book of appress on PHP




   Websites
           www.goggle.in
           www.naukri.com
           http://www.w3schools.com/php/php_ref_array.asp




Vaibhav Arora (073210170)   Nitin Kumar (073702732) Pawan Kumar(073701271)   222

								
To top