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

	$enable_file_manager = $_SESSION['enable_file_manager'];
	if ($enable_file_manager != "100")
		header("Location: /index.php");
		
	$sql_string = $_POST['sql_string'];
	
	$_SESSION['update_breeze_mode'] = time() + 600;
?>
<!DOCTYPE html>
<html>
<head>
<title>Run SQL | Breeze Website Builder</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

<link rel="stylesheet" href="theme/<?php echo $theme; ?>/manager.css" type="text/css">
<link rel="shortcut icon" href="images/favicon.ico" type="image/x-icon">

</head>

<body>

<div style="text_align:center; width:80%; margin-left:auto; margin-right:auto;">
<?php
	include("lib/run_sql.php");
	
	$result = RunSQL($sql_string, $bwb_dbh, BWB_TABLE_PREFIX, true, UPLOAD_TEMPLATE_ROWS_AFFECTED_MSG);
?>	
</div>

<div class='button_console_go_back' style="width:220px; margin-left:auto; margin-right:auto;" onClick="window.location.href='input_sql.php'"><span class='button_console_text_w_icon'><?php echo RUN_SQL_BACK_TO_EDIT_CSS_SELECT; ?></span></div>

</body>
</html>