<?php
////////////////////////////////////////////////////////////////////////
// Breeze Website Builder
// Copyright Silver Dolphin Solutions, LLC, Edward Lemmers, P.E.
// For licensing, see license.txt.
// Created: 10/20/2014	ELL
	
	include ("check_session.php");

	$custom_site_css_table = $_POST['custom_site_css_table'];
	
	$query = "DELETE FROM " . BWB_TABLE_PREFIX . "page_data_draft WHERE page_name='$custom_site_css_table' AND `source`=3";
	$cnt = $bwb_dbh->exec($query);

	if ($cnt > 0)
	{
		$query = "SELECT * FROM " . BWB_TABLE_PREFIX . $custom_site_css_table;
		$result = $bwb_dbh->query($query);
		$row = $result->fetch(PDO::FETCH_ASSOC);
		$custom_css = $row["custom_css"];
		echo stripslashes($custom_css);
	}
	else
		echo "No draft found";
?>