<?php
////////////////////////////////////////////////////////////////////////
// Breeze Website Builder
// Copyright EB Dynamics, Inc., Edward Lemmers, P.E.
// For licensing, see license.txt.
// Created: 8/18/09	ELL
// Revised: 2/8/2012	ELL
// Added table prefix handling.
// 
//
	include ("check_session.php");
		
	
	$query = "SELECT * FROM `" . BWB_TABLE_PREFIX . "custom_site_css`";
	$result = mysql_query($query, $bwb_link);
	$row = mysql_fetch_array($result);
	if ($row["custom_css"])
		$custom_css = $row["custom_css"];
	else
		$custom_css = "";
?>
<html>
<head>
<title>Breeze Website Builder</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" href="manager.css" type="text/css">
<link rel="shortcut icon" href="images/favicon.ico" type="image/x-icon">

<script language="javascript" type="text/javascript">
function OpenHelpWindow()
{
	window.open("http://breezewebsitebuilder.com/docs/cms/help.html#edit_custom_css", "Help", "scrollbars=1,resizable=1,status=0,toolbar=0,menubar=0,location=0,height=700,width=800");
}
</script>
</head>

<body>
<div align="center">
<table border="0" width="90%">
 <tr>
  <td width="80%" align="center">
	<span class="title">Custom Site Styles Editor</span>
  </td>
  <td>
	<input type="button" name="Back" value="Back to Main Menu" onClick="window.location.href='main.php?mode=css';" />
  </td>
 </tr>
</table>

<table width="90%" border="1" cellspacing="0" cellpadding="0">
  <tr>
    <td>
 
   <form action="save_custom_css.php" method="post" enctype="multipart/form-data" name="frm_site_styles">
	   <table width="100%" border="0" cellspacing="1" cellpadding="1"> 
	     <tr>
 
	       <td><span class="sub_title">Custom Styles not included above:</span> (This section requires programming
	           knowledge of CSS.)</td>
	     </tr>
	     <tr>
	       <td><textarea name="textarea_custom_css" id="textarea_custom_css" cols="115" rows="20"><?php echo $custom_css; ?></textarea></td>
	     </tr>
		 <tr><td><hr size="3" noshade /></td></tr>
       </table>
	 
       <table width="90%" border="0" cellspacing="0" cellpadding="0">
         <tr>
	       <td colspan="2">&nbsp;</td>
           <td align="center" valign="top" rowspan="2">
            <div id="help_button" onClick="OpenHelpWindow();">
            &nbsp;
            </div>
		   </td>
	     </tr>
         <tr>
		   <td align="center">
            <input type="submit" value="Update" name="submit" />
            <input type="hidden" name="style_sheet" value="custom" />
		   </td>
		   <td align="center">
             <input type="button" name="Back" value="Back to Main Menu" onClick="window.location.href='main.php?mode=css';" />
		   </td> 
	     </tr>
       </table>
       </form>
	 </td>
   </tr>
</table>
</div>

</body>
</html>