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

/////////////////////////////////////////////////////////////////////////
// joerg 2005/09/11 ---> use change password instead of create password
	$ok = change_password( sb_stripslashes( $_POST[ 'user' ] ), sb_stripslashes( $_POST[ 'pass' ] ) );
/////////////////////////////////////////////////////////////////////////
//	$ok = create_password( sb_stripslashes( $_POST[ 'user' ] ), sb_stripslashes( $_POST[ 'pass' ] ) );
	$logged_in = $ok;
	
	read_config();
	
//	require_once('languages/' . $blog_config[ 'blog_language' ] . '/strings.php');
	sb_language( 'set_login' );

html_header();

	function page_content() {
		global $lang_string, $user_colors, $ok;
		sb_language( 'set_login' );
		
		if ( $ok === true ) {
			echo( $lang_string[ 'success' ] );
		} else {
			echo( $lang_string[ 'wrong_password' ] );
		}
		
		echo( '<div class="hr"><hr /></div>' );
		echo( '<a href="index.php">' . $lang_string[ 'home' ] . '</a><br /><br />' );
	}
theme_pagelayout();
html_footer();
?>
