<?php

	include "library.php";

	$cxn = start_code();
	

	page_header( "Login", $cxn );


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


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

    	echo black( "If you have an account please type in your user name and password and click 'Login'.<br><br>" );

    	echo black( "If you would create an account please select " );

	    echo show_link( "create an account", "edit_account.php", "newaccount", "true" );
    }
    
    
	echo black( "<br><br>If you have forgotton your user name or password click " );

	echo show_link( "forgotten password", "forgotten_password.php" );

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

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

	write_yellow_input_boxes();
	
	form_text( "Username&nbsp;", "username", 14, "", "true" );

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

	form_hidden( "screen_width" );
	form_hidden( "screen_height" );
	

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

	show_green_button_submit( "Login", 88 );

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

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

	form_end();

?>

