<?php 
// Template layers to use
$ssi_layers = array('main'); 
// Enable gzip compression of page
$ssi_gzip true
// Disable banned users from being able to access site
$ssi_ban true

// Page title
$context['page_title'] = "Account creation";
// Load forum SSI functions, and print out forum header
include("forum/SSI.php");


// If user is a guest
if ($context['user']['is_guest']) {
    echo 
"Sorry, you can't access this page. Please log in!";
// If they are logged in
} else {
    
$result db_query("SELECT money FROM smf_members WHERE ID_MEMBER = {$ID_MEMBER}"__FILE____LINE__);
    
$row mysql_fetch_assoc($result);
    
    
// Check if member has at least 1000 credits
    
if ($row['money'] < 1000) {
        echo 
"ERROR: You must have at least 1000 credits!";
    } else {
        if (!isset(
$_GET['step'] || $_GET['step'] == 1) {
            
// Show account creation form
            // <form action="test.php?step=2" method="POST">
        
} else {
            
// Process account creation
            
db_query("UPDATE smf_members SET money = money - 1000 WHERE ID_MEMBER = {$ID_MEMBER}"__FILE____LINE__);
        }
    }
}    

// SSI shutdown, print out footer, etc.
ssi_shutdown();
?>