Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 60 lines (50 sloc) 1.319 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60
<?php

/**
* dbox :: register.php
*
* Registration interface.
*
* @package dbox
* @copyright (C) 2006-2010, 2011-2012 Gordon P. Hemsley
* @license docs/LICENSE Mozilla Public License, v. 2.0
*/

/**
* 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/header.php' );

$dbox = new Base();

if( exists( $_POST['submit'] ) )
{
if( $User->register_user( $_POST['name'], $_POST['email_address'], $_POST['passphrase'], $_POST['passphrase_confirm'] ) )
{
// 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/footer.php' );

?>
Something went wrong with that request. Please try again.