Location: PHPKode > projects > SASHA > SASHA/register.php
<?php

/**
 * SASHA :: register.php
 *
 * Registration interface.
 *
 * @package SASHA
 * @copyright (C) 2006-2010 Gordon P. Hemsley
 * @license docs/LICENSE BSD License
 * @version $Id: register.php 85 2010-01-26 18:16:09Z gphemsley $
 */

/**
 * Define the path to the root directory, relative to this file.
 */
define( 'ROOT', './' );
define( 'THIS_FILE', 'register.php' );
define( 'OVERRIDE_LOGIN', TRUE );

/**
 * Specify the title of the page and the tab currently highlighted.
 */
$page_title = array( 'Register' );
$tab = 'register';

require( ROOT . 'inc/inc.main.php' );

/**
 * Include the style header, required for proper page output.
 */
include( ROOT . 'style/default/header.php' );

$SASHA = new Base();

if( exists( $_POST['submit'] ) )
{
	if( $User->register_user( $_POST['username'], $_POST['password'], $_POST['password_confirm'], $_POST['email'], $_POST['full_name'], $_POST['preferred_name'], $_POST['default_institution'] ) )
	{
		// Registration succeeded.
		print_message( 'good', 'You may now <a href="' . ROOT . 'login.php">log in</a>.', 'Registration successful.' );
	}
	else
	{
		// Registration failed.
		print_message( 'bad', 'Please note any errors above and try again.', 'Registration failed.' );

		$User->print_registration_form( $_POST );
	}
}
else
{
	$User->print_registration_form();
}

/**
 * Include the style footer, required for proper page output.
 */
include( ROOT . 'style/default/footer.php' );

?>
Return current item: SASHA