<?php
////////////////////////////////////////////////////////////////////////
// Breeze Website Builder
// Copyright Silver Dolphin Solutions, LLC, Edward Lemmers, P.E.
// For licensing, see license.txt.
// Created: 5/29/2012	ELL
// Modified: 12/2/2016	ELL
// Consolidated all class tables into site_classes table indexed by style_sheet field.
// Consolidated all CSS tables into site_css table indexed by style_sheet field.
// 
// 
// 
	
	include ("check_session.php");
	
	$class = $_POST['class'];
	$description = addslashes($_POST['description']);
	$style_sheet = $_POST['style_sheet'];
	
	$replace = array(".", "#", " ", ",", ">", "&gt;", "+", "~");
	$search = array("PERIOD", "POUND", "SPACE", "COMMA", "GREATERTHAN", "GREATERTHAN", "PLUS", "TILDA");
	$class = str_replace($search, $replace, $class);
	
	$query = "UPDATE `" . BWB_TABLE_PREFIX . "site_classes` SET `description`='" . $description. "' WHERE `style_sheet` = '$style_sheet' AND `class`='" . $class . "'";
	$cnt = $bwb_dbh->exec($query);
	
	if ($cnt < 0)
		echo "-no data-";
	else
		echo $cnt;

?>