<?php
////////////////////////////////////////////////////////////////////////
// Breeze Website Builder
// Copyright Silver Dolphin Solutions, LLC, Edward Lemmers, P.E.
// For licensing, see license.txt.
// Created: 10/15/09		ELL
// Revised: 10/7/2010	ELL
// Added code to allow top, bottom, left and right of border to be selected independantly in any combination when setting
// border styles.
// Revised: 5/16/2013	ELL
// Added 2nd and 3rd fonts, box shadow and border radius.
// Revised: 5/23/2013	ELL
// Added clear and min/max prefix for width and height.
// Revised: 12/30/2013	ELL
// Added cursor styles.
// Revised: 1/2/2014	ELL
// Added background-size styles.
//
	function BuildSQLString($table, $verb, $condition, $insert_key, $use_table_data, $font, $font2, $font3, $font_size, $text_color, $padding_top, $padding_right,
							$padding_bottom, $padding_left, $weight, $italic,
		$underline, $overline, $blink, $linethrough, $font_stretch, $oblique, $small_caps, $no_text_decoration, $shadow, $shadow_color, $shadow_x_offset,
		$shadow_y_offset, $shadow_blur, $line_height, $line_height_units, $align, $vertical_align, $bkgd_color, $bkgd_opacity, $border, $border_color,
		$border_style, $outline_style, $border_collapse, $border_sides, $margin_top, $margin_top_units, $margin_top_auto, $margin_right, $margin_right_units,
		$margin_right_auto, $margin_left, $margin_left_units, $margin_left_auto, $margin_bottom, $margin_bottom_units, $margin_bottom_auto,
		$display, $width, $width_units, $width_prefix, $height, $height_units, $height_prefix,
		$position, $position_left, $position_left_units, $position_top, $position_top_units,
		$position_right, $position_right_units, $position_bottom, $position_bottom_units, $z_index, $overflow,
		$clip_top, $clip_top_units, $clip_right, $clip_right_units, $clip_bottom, $clip_bottom_units, $clip_left, $clip_left_units,
		$background_image, $background_attachment, $background_repeat, $background_position, $background_position_x, $background_position_y,
		$background_position_units, $list_style_type, $list_style_position, $list_style_image, $float, $white_space, $table_layout, $clear,
		$box_shadow_horizontal, $box_shadow_vertical, $box_shadow_blur, $box_shadow_spread, $box_shadow_color, $box_shadow_inset, $radius_top_left,
		$radius_top_left_units, $radius_top_right, $radius_top_right_units, $radius_bottom_right, $radius_bottom_right_units, $radius_bottom_left, $radius_bottom_left_units, $cursor, $background_size, $background_width, $background_width_units, $background_height, $background_height_units)
	{
		$SQL = $verb . " " . $table . " SET " . $insert_key . "use_table_data=" . $use_table_data . ", font='" . $font . "', font2='" . $font2 . "', font3='" . $font3
		. "', font_size=" . $font_size 
		. ", text_color='" . $text_color . "', padding_top=" . $padding_top  . ", padding_right=" . $padding_right  . ", padding_bottom=" . $padding_bottom  . ", padding_left=" . $padding_left . ", weight='" . $weight . "', italic=" . $italic
		. ", underline=" . $underline . ", overline=" . $overline . ", blink=" . $blink . ", linethrough=" . $linethrough
		. ", font_stretch='" . $font_stretch . "', oblique=" . $oblique . ", small_caps=" . $small_caps . ", no_text_decoration=" . $no_text_decoration
		. ", shadow=" . $shadow . ", shadow_color='" . $shadow_color . "', shadow_x_offset=" . $shadow_x_offset
		. ", shadow_y_offset=" . $shadow_y_offset . ", shadow_blur=" . $shadow_blur . ", line_height=" . $line_height  . ", line_height_units=" . $line_height_units 
		. ", align='" . $align . "', vertical_align='" . $vertical_align
		. "', bkgd_color='". $bkgd_color . "', bkgd_opacity=" . $bkgd_opacity . ", border=" . $border . ", border_color='" . $border_color
		. "', border_style='" . $border_style . "', outline_style='" . $outline_style . "', border_collapse='" . $border_collapse  . "', border_sides=" . $border_sides
		. ", margin_top=" . $margin_top . ", margin_top_units=" . $margin_top_units . ", margin_top_auto=" . $margin_top_auto
		. ", margin_right=" . $margin_right . ", margin_right_units=" . $margin_right_units . ", margin_right_auto=" . $margin_right_auto
		. ", margin_left=" . $margin_left . ", margin_left_units=" . $margin_left_units . ", margin_left_auto=" . $margin_left_auto
		. ", margin_bottom=" . $margin_bottom . ", margin_bottom_units=" . $margin_bottom_units . ", margin_bottom_auto=" . $margin_bottom_auto
		. ", display='". $display . "', width=" . $width . ", width_units=" . $width_units . ", width_prefix='" . $width_prefix . "', height=" . $height
		. ", height_units=" . $height_units . ", height_prefix='" . $height_prefix . "', position='" . $position . "', position_left=" . $position_left
		. ", position_left_units=" . $position_left_units . ", position_top=" . $position_top . ", position_top_units=" . $position_top_units
		. ", position_right=" . $position_right . ", position_right_units=" . $position_right_units . ", position_bottom=" . $position_bottom
		. ", position_bottom_units=" . $position_bottom_units . ", z_index=" . $z_index . ", overflow='" . $overflow
		. "', clip_top=" . $clip_top . ", clip_top_units=" . $clip_top_units
		. ", clip_right=" . $clip_right . ", clip_right_units=" . $clip_right_units
		. ", clip_bottom=" . $clip_bottom . ", clip_bottom_units=" . $clip_bottom_units
		. ", clip_left=" . $clip_left . ", clip_left_units=" . $clip_left_units
		. ", background_image='" . $background_image . "', background_attachment='" . $background_attachment
		. "', background_repeat='" . $background_repeat . "', background_position='" . $background_position
		. "', background_position_x=" . $background_position_x . ", background_position_y=" . $background_position_y
		. ", background_position_units=" . $background_position_units . ", list_style_type='" . $list_style_type
		. "', list_style_position='" . $list_style_position . "', list_style_image='" . $list_style_image
		. "', `float`='" . $float . "', white_space='" . $white_space . "', table_layout='" . $table_layout . "', `clear`='" . $clear
		. "', box_shadow_horizontal=" . $box_shadow_horizontal . ", box_shadow_vertical=" . $box_shadow_vertical . ", box_shadow_blur=" . $box_shadow_blur
		. ", box_shadow_spread=" . $box_shadow_spread . ", box_shadow_color='" . $box_shadow_color . "', box_shadow_inset=" . $box_shadow_inset
		. ", radius_top_left=" .$radius_top_left
		. ", radius_top_left_units=" . $radius_top_left_units . ", radius_top_right=" . $radius_top_right . ", radius_top_right_units=" . $radius_top_right_units
		. ", radius_bottom_right=" . $radius_bottom_right . ", radius_bottom_right_units=" . $radius_bottom_right_units . ", radius_bottom_left=" . $radius_bottom_left
		. ", radius_bottom_left_units=" . $radius_bottom_left_units . ", `cursor`='" . $cursor . "', background_size='" . $background_size
		. "', background_width=" . $background_width . ", background_width_units=" . $background_width_units
		. ", background_height=" . $background_height . ", background_height_units=" . $background_height_units;
		
		if ($condition != "")
			$SQL .= " WHERE " . $condition;
		
		return $SQL;
	}
?>