<?php

	include "library.php";

	include forms_library;

	include ad_forms_library;


	$cxn = start_code();

    exit_if_search_bot();

    exit_if_session_expired( $cxn );



		// *****************************************************************
		// NOTE: don't put ads on the login page it's against Adsense policies



    if (val( $_GET, "mainmenulogin" ) == "true")
    {
    		$is_main_login = true;
    		
    		$_SESSION['nextpage'] = "/";
    }
    else
    {
//        if (strpos( val( $_SESSION, 'nextpage' ), "index.php" ) === false)

    		$is_main_login = false;
    		
//    	else
//    		$is_main_login = true;
    }
    
    
	page_header( "Jobseeker Login", $cxn );


	if (! $is_main_login)
	{
		echo red( "<br>You must have an account on this site to access this screen.<br><br>" );

		echo black( "To join the site please click on " );

        if (! low_res_screen())	
        {
    		echo show_link( "Create a Jobseeker Profile", "edit_jobseeker_profile.php", "newprofile", "true" );
        }
        else
    		echo show_link( "Create a Jobseeker Profile", "edit_jobseeker_profile.php", "newprofile", "true" );

		echo black( "<br><br>If you are already a member please type in your handle name and password and click 'Login'." );
	}

	echo "<br><br><br>";

	echo "<table width='100%'><tr><td width='10%'></td><td>";
	
	form_start( "jobseeker_accept_login.php" );

	write_yellow_input_boxes();
	
//	echo "<tr></tr><tr><td>&nbsp;</td></tr>";

	form_textz( "Username&nbsp;&nbsp;", "username", 14, "", "true" );

	form_password( "Password", "password", 14, "" );


	echo "<tr><td>&nbsp;</td></tr>";

    if (! low_res_screen())	
    {
    	echo "<tr><td>".show_link( "Forgotten password", "jobseeker_forgotten_password.php" )."</td></tr>";
    }
    else
    {
    	echo "<tr><td>".show_link( "Forgotten password", "jobseeker_forgotten_password.php" )."</td></tr>";
    }
    
	form_submit_new( "Login", 82 );
	

//	echo "<br><br><tr><td></td><td><br><br><a href='".url_encode( "display_profile.php", "returnpoint", "main", "sample", "true" )."'>".red( "Example Profile" )."</a></td></tr>";

	form_end();

	echo "</td></tr></table>";
	
	echo "<br><br><br><br><br><br><br><br><br><br><br><br><br><br>";



    echo "</body>";
	
    echo "</html>";


?>