<?
if(check_login("admin"))
{
 if(isset($_GET['jID']))
 {
  $session_array=array("sess_recruiterid"=>$_GET['rID'],"sess_recruiterlogin"=>"y");
  unset_session_value($session_array);
  if($row=getAnyTableWhereData(JOBSEEKER_LOGIN_TABLE,"jobseeker_id='".(int)tep_db_input($_GET['jID'])."'",'jobseeker_id'))
  {
   $session_array=array("sess_jobseekerid"=>$_GET['jID'],"sess_jobseekerlogin"=>"y");
   set_session_value($session_array);
  }
  else
  {
   $messageStack->add_session(MESSAGE_JOBSEEKER_ERROR, 'error');
   tep_redirect(tep_href_link(PATH_TO_ADMIN.FILENAME_ADMIN1_JOBSEEKERS,'selected_box=jobseekers'));
  }
 }
 else if($_GET['add']=='jobseeker')
 {
  $session_array=array("sess_jobseekerid"=>$_GET['jID'],"sess_jobseekerlogin"=>"y");
  unset_session_value($session_array);
 }
 else if(isset($_GET['rID']))
 {
  $session_array=array("sess_jobseekerid"=>$_GET['jID'],"sess_jobseekerlogin"=>"y");
  unset_session_value($session_array);
  if($row=getAnyTableWhereData(RECRUITER_TABLE,"recruiter_id='".(int)tep_db_input($_GET['rID'])."'",'recruiter_id'))
  {
   $session_array=array("sess_recruiterid"=>$_GET['rID'],"sess_recruiterlogin"=>"y");
   set_session_value($session_array);
  }
  else
  {
   $messageStack->add_session(MESSAGE_RECRUITER_ERROR, 'error');
   tep_redirect(tep_href_link(PATH_TO_ADMIN.FILENAME_ADMIN1_RECRUITERS,'selected_box=recruiters'));
  }
 }
 else if($_GET['add']=='recruiter')
 {
  $session_array=array("sess_recruiterid"=>$_GET['rID'],"sess_recruiterlogin"=>"y");
  unset_session_value($session_array);
 }
}
//////////////////////////////
$welcome_text='';
if(check_login('jobseeker')) 
{ 
 if($row_11=getAnyTableWhereData(JOBSEEKER_TABLE," jobseeker_id ='".$_SESSION['sess_jobseekerid']."'","jobseeker_first_name,jobseeker_middle_name,jobseeker_last_name"))
 {
  $welcome_text=tep_db_output('Welcome,'.$row_11['jobseeker_first_name'].' '.$row_11['jobseeker_last_name']);
 }
}
else if(check_login('recruiter'))
{   
 if($row_11=getAnyTableWhereData(RECRUITER_TABLE," recruiter_id ='".$_SESSION['sess_recruiterid']."'","recruiter_first_name,recruiter_last_name"))
 {
  $welcome_text=tep_db_output('Welcome,'.$row_11['recruiter_first_name'].' '.$row_11['recruiter_last_name']);
 }
}
else
{
 $welcome_text='Welcome,Guest';
}
if(strtolower($_SERVER['PHP_SELF'])=="/".PATH_TO_MAIN.FILENAME_JOB_DETAILS)
{
$job_name=getAnyTableWhereData(JOB_TABLE," job_id ='".$_GET['query_string']."'","job_title,job_short_description");
$meta_title=$job_name['job_title']."/".SITE_TITLE;
$meta_description="<META NAME='Keywords' CONTENT='".$job_name['job_title']."'>
<META NAME='Description' CONTENT='".strip_tags($job_name['job_short_description'], '<a><b><i><u><>')."'>";
}
else
{
//print_r($obj_title_metakeyword);
$meta_title   = $obj_title_metakeyword->title;
$meta_description = $obj_title_metakeyword->metakeywords;
}
///////////////////////////////
if($_SESSION['language']=='english')
 include_once(dirname(__FILE__).'/language/english.php');

$add_script='';
//autologin(); ///auto login
if(strtolower($_SERVER['PHP_SELF'])=="/".PATH_TO_MAIN.FILENAME_JOBSEEKER_RESUME2)
{
 $add_script=' set_current_emp();';
}
$add_script_file='';
if(strtolower($_SERVER['PHP_SELF'])=="/".PATH_TO_MAIN.FILENAME_INDEX)
{
	$add_script_file.='<script language="JavaScript">
<!--
function search_company(company_name)
{
 document.company_search.company_name.value=company_name;
 document.company_search.submit();
}
//-->
</script>';
}
else
{
 $add_script_file='<script src="'.tep_href_link(PATH_TO_LANGUAGE.$language."/jscript/optionlist.js").'"></script>';
 $add_script.='initOptionLists();'; 
}
$abs=strstr($_SERVER['REQUEST_URI'],'?');
$path1=(($abs)?(stristr($_SERVER['REQUEST_URI'],'language=')?substr($_SERVER['REQUEST_URI'],0,-2):$_SERVER['REQUEST_URI'].'&language='):$_SERVER['REQUEST_URI'].'?language=');
if(strtolower($_SERVER['PHP_SELF'])=="/".PATH_TO_MAIN.FILENAME_RECRUITER_POST_JOB)
{
 $add_script.='show_hide();'; 
}
$header_banner=banner_display("3",1,380);

//------------------------different header for internal page and for home page  begins-------------------
if(strtolower($_SERVER['PHP_SELF'])=="/".PATH_TO_MAIN.FILENAME_INDEX)
{
define('HEADER_HTML','<html lang="en">
    <head>
	<meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
	<title>'.$meta_title.'</title>
	<meta http-equiv="Content-Type" >
'.$meta_description.'
    <meta name="author" content="">
    <!-- Bootstrap Core CSS -->
    <link href="'.tep_href_link("themes/sample2/css/bootstrap.min.css").'" rel="stylesheet">

  <!-- Custom CSS -->
 <link rel="stylesheet" type="text/css" href="'.tep_href_link("themes/sample2/css/modern-business.css").'">
<link rel="stylesheet" type="text/css" href="'.tep_href_link("themes/sample2/css/font-awesome.min.css").'">

    <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn\'t work if you view the page via file:// -->
    <!--[if lt IE 9]>
        <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
        <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
	<link href="https://fonts.googleapis.com/css?family=Montserrat:400,700" rel="stylesheet" type="text/css">
	<link href="https://fonts.googleapis.com/css?family=Open+Sans:400,300,300italic,400italic,600,600italic,700,800,700italic,800italic" rel="stylesheet" type="text/css">
	 <link href="'.tep_href_link("themes/sample2/css/jobboard-bootstrap3.css").'" rel="stylesheet" type="text/css">
</head>

<body>
    <video controls autoplay loop muted poster="images/screenshot.jpg" id="background">
        <source src="'.tep_href_link("themes/sample2/jobboard.mp4").'" type="video/mp4">
    </video>

	 <!-- Navigation -->
    <nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">
        <div class="container">
            <!-- Brand and toggle get grouped for better mobile display -->
            <div class="navbar-header">
                <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
                    <span class="sr-only">Toggle navigation</span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                </button>
                <a class="navbar-brand" href="'.tep_href_link("").'"><img src="'.tep_href_link('img/'.DEFAULT_SITE_LOGO).'" alt="Jobboard Logo"></a>
            </div>
            <!-- Collect the nav links, forms, and other content for toggling -->
            <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
                <ul class="nav navbar-nav navbar-right">
                    <li>
                        <a href="'.tep_href_link(FILENAME_JOB_SEARCH).'">Jobs</a>
                    </li>
                    <li class="dropdown">
                        <a href="#" class="dropdown-toggle" data-toggle="dropdown">Job Seeker <b class="caret"></b></a>
                         <ul class="dropdown-menu">
                            <li>
                                <a href="'.tep_href_link(FILENAME_JOBSEEKER_RESUME1).'">Post Resume</a>
                            </li>
                            <li>
                                <a href="'.tep_href_link(FILENAME_JOB_SEARCH).'">Search Jobs</a>
                            </li>
                            <li>
                                '.(check_login("jobseeker")?'<a href="'.tep_href_link(FILENAME_LOGOUT).'">Logout</a>':'<a href="'.tep_href_link(FILENAME_JOBSEEKER_LOGIN).'">Login</a>').'
                            </li>
                            <li>
                                '.(check_login("jobseeker")?'<a href="'.tep_href_link(FILENAME_JOBSEEKER_CONTROL_PANEL).'">Control Panel</a>':'<a href="'.tep_href_link(FILENAME_JOBSEEKER_REGISTER1).'">Register</a>').'
                            </li>
                            <li>
                                <a href="'.tep_href_link("").'">View Applications</a>
                            </li>
                        </ul>
                    </li>
                    <li class="dropdown">
                        <a href="#" class="dropdown-toggle" data-toggle="dropdown">Employer <b class="caret"></b></a>
                        <ul class="dropdown-menu">
                            <li>
                                <a href="'.tep_href_link(FILENAME_RECRUITER_POST_JOB).'">Post Jobs</a>
                            </li>
                            <li>
                                <a href="'.tep_href_link(FILENAME_RECRUITER_SEARCH_RESUME).'">Search Resume</a>
                            </li>
                            <li>'.(check_login("jobseeker")?'<a href="'.tep_href_link(FILENAME_LOGOUT).'">Logout</a>':'<a href="'.tep_href_link(FILENAME_RECRUITER_LOGIN).'">Login</a>').'
                            </li>
                            <li>'.(check_login("jobseeker")?'<a href="'.tep_href_link(FILENAME_RECRUITER_CONTROL_PANEL).'">Control Panel</a>':'<a href="'.tep_href_link(FILENAME_RECRUITER_REGISTRATION).'">Register</a>').'
                            </li>
                            <li>
                                <a href="'.tep_href_link(FILENAME_RECRUITER_SEARCH_APPLICANT).'">Applicant Tracking</a>
                            </li>
                        </ul>
                    </li>
                    <li class="dropdown">
                        <a href="#" class="dropdown-toggle" data-toggle="dropdown">Resources <b class="caret"></b></a>
                        <ul class="dropdown-menu">
                            <li>
                                <a href="'.tep_href_link(FILENAME_FORUM_TOPICS).'">Forum</a>
                            </li>
                            <li>
                                <a href="'.tep_href_link(FILENAME_RESOURCES).'">Articles</a>
                            </li>
                        </ul>
                    </li>
                    <li>
                        <a href="'.tep_href_link(FILENAME_RECRUITER_POST_JOB).'">Post a Job</a>
                    </li>

                </ul>
            </div>
            <!-- /.navbar-collapse -->
        </div>
        <!-- /.container -->
    </nav>


	  <div class="app-content">
	    <!-- Page Content -->
	        <div class="container">
	      <!-- Job Section -->
	            <div class="row">
	                <div class="col-md-6"></div>
	          <div class="col-md-5">
	          <h1 class="page-header">The Fastest Way<br>to your Next Job</h1>
	          </div>
	          <div class="col-md-1"></div>
	        </div>
	            <!-- /.row -->
	        </div>

	      <br><br>

	        <div class="container">
	      <!-- Job Section -->
	            <div class="row">
	                <div class="col-md-6"></div>
	          <div class="col-md-4">

	        <div class="inner-addon right-addon">
	          <i class="glyphicon glyphicon-search"></i>
	          <input type="text" class="form-control" placeholder="Search jobs" />
	        </div>
	          </div>
	          <div class="col-md-2"></div>
	        </div>
	            <!-- /.row -->
	      </div>
		  
		  	        <div class="container">
	      <!-- Job Section -->
	            <div class="row">
	                <div class="col-md-6"></div>
	          <div class="col-md-5 ser-space">
	          <button class="btn btn-warning" onclick="location.href='.tep_href_link(FILENAME_JOBSEEKER_RESUME1).'" type="submit">Submit Resume</button>
				<button class="btn btn-default" onclick="location.href='.tep_href_link(FILENAME_JOBSEEKER_REGISTER1).'" type="submit">Register Now</button>
	          </div>
	          <div class="col-md-1"></div>
	        </div>
	            <!-- /.row -->
	        </div>
	  </div>



	<footer>
	 <div class="container">
	<!-- Job Section -->
        <div class="row">
            <div class="col-md-3 footer-item col-xs-3">
			<a href="'.tep_href_link(FILENAME_JOB_SEARCH).'"><img src="themes/sample2/images/icon-latest-jobs.png" alt="Latest Jobs">
			<h5 class="home-footer-icons-txt">Latest Jobs</h5></a>
			</div>

			<div class="col-md-3 footer-item col-xs-3">
			<a href="'.tep_href_link(FILENAME_JOB_SEARCH_BY_INDUSTRY).'"><img src="themes/sample2/images/icon-jobs-by-category.png" alt="Latest Jobs">
			<h5 class="home-footer-icons-txt">Jobs By Category</h5></a>
			</div>

			<div class="col-md-3 footer-item col-xs-3">
			<a href="'.tep_href_link(FILENAME_ARTICLE).'"><img src="themes/sample2/images/icon-career-tools.png" alt="Latest Jobs">
			<h5 class="home-footer-icons-txt">Career Tools</h5></a>
			</div>

			<div class="col-md-3 footer-item col-xs-3">
			<a href="#"><img src="themes/sample2/images/icon-featured-recruiter.png" alt="Latest Jobs">
			<h5 class="home-footer-icons-txt">Subscribe Job Alerts</h5></a>
			</div>
		</div>
        <!-- /.row -->
		</div>
	</footer>

	    <!-- jQuery -->
    <script src="js/jquery.js"></script>

    <!-- Bootstrap Core JavaScript -->
    <script src="themes/sample2/js/bootstrap.min.js"></script>

    <!-- Script to Activate the Carousel -->
    <script>
    $(\'.carousel\').carousel({
        interval: 5000 //changes the speed
    })
    </script>
');
}
else
{
	define('HEADER_HTML','<html lang="en">
    <head>
<meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
	<title>'.$meta_title.'</title>
	<meta http-equiv="Content-Type" >
'.$meta_description.'
    <meta name="author" content="">
<link href="'.tep_href_link("themes/sample2/css/bootstrap.min.css").'" rel="stylesheet">
	<link href="'.tep_href_link("themes/sample2/css/style-internal.css").'" rel="stylesheet" type="text/css">
	<link href="'.tep_href_link("themes/sample2/font-awesome/css/font-awesome.css").'" rel="stylesheet" type="text/css">
<script src="'.tep_href_link(PATH_TO_LANGUAGE.$language."/jscript/page.js").'"></script>
'.$add_script_file.'
<script language="JavaScript" type="text/JavaScript">
<!--
function body_load()
{
 '.$add_script.' 
}
//-->
</script>
</head>

<body onLoad="body_load();">
<table width="1140" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td class="header"><table width="1160" border="0" align="center" cellpadding="0" cellspacing="0">
          <tr>
            <td><a href="'.tep_href_link("").'"><img src="'.tep_href_link('img/'.DEFAULT_SITE_LOGO).'" alt="Logo"></a></td>
            <td align="right"><div class="dropdown">
                    <button class="dropbtn"><a href="'.tep_href_link("").'">Home</a></button>
                  </div>
                    <div class="dropdown">
                      <button class="dropbtn"><a href="'.tep_href_link(FILENAME_JOB_SEARCH).'">Jobs</a></button>
                    </div>
                    <div class="dropdown">
                      <button class="dropbtn">Job Seeker <img class="down" src="themes/sample2/images/icon-down.png"></button>
                      <div class="dropdown-content down"> <a href="'.tep_href_link(FILENAME_JOBSEEKER_RESUME1).'">Post Resume</a>
						<a href="'.tep_href_link(FILENAME_JOB_SEARCH).'">Search Jobs</a>
                        '.(check_login("jobseeker")?'<a href="'.tep_href_link(FILENAME_LOGOUT).'">Logout</a>':'<a href="'.tep_href_link(FILENAME_JOBSEEKER_LOGIN).'">Login</a>').'
                        '.(check_login("jobseeker")?'<a href="'.tep_href_link(FILENAME_JOBSEEKER_CONTROL_PANEL).'">Control Panel</a>':'<a href="'.tep_href_link(FILENAME_JOBSEEKER_REGISTER1).'">Register</a>').'
                      </div>
                    <div class="dropdown">
                      <button class="dropbtn">Employers <img class="down" src="themes/sample2/images/icon-down.png"></button>
                      <div class="dropdown-content"> <a href="'.tep_href_link(FILENAME_RECRUITER_POST_JOB).'">Post Jobs</a>
								<a href="'.tep_href_link(FILENAME_RECRUITER_SEARCH_RESUME).'">Search Resume</a>
								'.(check_login("jobseeker")?'<a href="'.tep_href_link(FILENAME_LOGOUT).'">Login</a>':'<a href="'.tep_href_link(FILENAME_RECRUITER_LOGIN).'">Logout</a>').'
								'.(check_login("jobseeker")?'<a href="'.tep_href_link(FILENAME_RECRUITER_CONTROL_PANEL).'">Control Panel</a>':'<a href="'.tep_href_link(FILENAME_RECRUITER_REGISTRATION).'">Register</a>').'
                              </div>
                    </div>
                    <div class="dropdown">
                      <button class="dropbtn">Resources <img class="down" src="themes/sample2/images/icon-down.png"></button>
                      <div class="dropdown-content"> <a href="'.tep_href_link(FILENAME_FORUM_TOPICS).'">Forum</a>
                                <a href="'.tep_href_link(FILENAME_RESOURCES).'">Articles</a></div>
                    </div>

                    <div class="dropdown">
                      <button class="dropbtn"><a href="'.tep_href_link(FILENAME_RECRUITER_POST_JOB).'">Post a Job</a></button>
                  </div></td>
          </tr>
        </table></td>
      </tr>
    </table></td>
  </tr>');
}
?>