<?php
////////////////////////////////////////////////////////////////////////
// Breeze Website Builder
// Copyright Silver Dolphin Solutions, LLC, Edward Lemmers, P.E.
// For licensing, see license.txt.
// Created: 6/30/2012	ELL
// 
// 
//
//

	include ("check_session.php");

	$user_table = $_POST['user_table'];
	$_SESSION['last_user_table'] = $user_table;
	
	$query = "ALTER TABLE `" . $user_table . "` ADD `email` VARCHAR( 256 ) NULL;";
	$cnt = $bwb_dbh->exec($query);
	$query = "ALTER TABLE `" . $user_table . "`ADD `UserID` VARCHAR( 64 ) NULL;";
	$cnt = $bwb_dbh->exec($query);
	$query = "ALTER TABLE `" . $user_table . "` ADD `password` VARCHAR( 256 ) NULL;";
	$cnt = $bwb_dbh->exec($query);
	$query = "ALTER TABLE `" . $user_table . "` ADD `AccessLevel` VARCHAR( 64 ) NULL;";
	$cnt = $bwb_dbh->exec($query);
	$query = "ALTER TABLE `" . $user_table . "` ADD `Active` tinyint(4) NOT NULL default '0';";
	$cnt = $bwb_dbh->exec($query);
	$query = "ALTER TABLE `" . $user_table . "` ADD `Session` VARCHAR( 32 ) NULL;";
	$cnt = $bwb_dbh->exec($query);
	$query = "ALTER TABLE `" . $user_table . "` ADD `IP` VARCHAR( 16 ) NULL;";
	$cnt = $bwb_dbh->exec($query);
	$query = "ALTER TABLE `" . $user_table . "` ADD `welcome_message_page` VARCHAR( 255 ) NULL;";
	$cnt = $bwb_dbh->exec($query);
	
	echo "Fields added";

?>
