<?php
////////////////////////////////////////////////////////////////////////
// Breeze Website Builder
// Copyright EB Dynamics, Inc., Edward Lemmers, P.E.
// For licensing, see license.txt.
// Created: 7/1/2012	ELL
// 
// 
// 
	include ("check_session.php");

	$action = $_POST['action'];
	$access_level = $_POST['access_level'];
	
	if ($action == "add")
	{
		$query = "INSERT INTO `" . BWB_TABLE_PREFIX . "access_levels` SET `access_level` = '" . $access_level . "'";
		$_SESSION['last_access_level'] = $access_level;
	}
	elseif ($action == "remove")
		$query = "DELETE FROM `" . BWB_TABLE_PREFIX . "access_levels` WHERE `access_level` = '" . $access_level . "'";
	else	{
		echo "No action given.  Don't know what to do.";
		exit;
	}
	$result = mysql_query($query, $bwb_link);
	echo "Query complete.";
	
?>
