<?php 
require_once('scripts/sb_functions.php');
global $logged_in;
$logged_in = logged_in( true, true );
	
read_config();
sb_language( 'set_login' );

$extra_header = '
	<script type="text/javascript">
	<!--
	function validate(theform) {
		if (theform.user.value=="" || theform.pass.value=="") {
			alert("<?php echo( $lang_string[ "form_error" ] ); ?>");
			return false;
		} else {
			return true;
		}
	}
	//-->
	</script>
';

html_header($extra_header,false);

function page_content() {
    global $lang_string, $user_colors;
    sb_language( 'set_login' );
		
?>
		
<h2><?php echo( $lang_string[ 'title' ] ); ?></h2>
<?php echo( $lang_string[ 'instructions' ] ); ?><p />
		
<div class="hr"><hr /></div>
		
<form accept-charset="<?php echo( $lang_string[ 'html_charset' ] ); ?>,iso-8859-1,utf-8" action="set_login_cgi.php" method="post" onsubmit="return validate(this)">
<label for="user"><?php echo( $lang_string[ 'username' ] ); ?></label><br />
<input type="text" name="user" size="40" /><br /><br />

<label for="pass"><?php echo( $lang_string[ 'password' ] ); ?></label><br />
<input type="password" name="pass" size="40" /><br />
			
<div class="hr"><hr /></div>
			
<input type="submit" name="submit" value="<?php echo( $lang_string[ 'submit_btn' ] ); ?>" />
</form>
		
<?php 


}
theme_pagelayout();
html_footer();

?>
