<?php
/////////////////////////////////////////////
// Upload Favicon /////
////////////////////////////////////////////////////////////////////////
// Breeze Website Builder
// Copyright EB Dynamics, Inc., Edward Lemmers, P.E.
// For licensing, see license.txt.
// Created: 11/13/2009	ELL
// 
//
	include ("check_session.php");
?>
<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#upload_template", "Help", "scrollbars=1,resizable=1,status=0,toolbar=0,menubar=0,location=0,height=700,width=800");
}

function DeleteConfirm()
{
	if (document.getElementById("delete_all_pages").checked == true)
	{
		document.getElementById("delete_confirm").style.display = "block";
		document.getElementById("delete_confirm").style.position = "absolute";
		document.getElementById("delete_confirm").style.top = "100px";
		document.getElementById("delete_confirm").style.left = "300px";
		document.getElementById("delete_confirm").style.width = "450px";
		document.getElementById("delete_confirm").style.backgroundColor = "#FFF";
		document.getElementById("delete_confirm").style.borderStyle = "solid";
		document.getElementById("delete_confirm").style.borderWidth = "2px";
		document.getElementById("delete_confirm").style.borderColor = "#000";
	}
	else
		HideDelete();
}

function HideDelete()
{
	document.getElementById("delete_confirm").style.display = "none";
}

function UncheckDelete()
{
	document.getElementById("delete_all_pages").checked = false;
	HideDelete();
}

function ShowUploadingMsg()
{
	document.getElementById("uploading_msg").style.display = "inline";
}

</script>

<style>
#uploading_msg	{
	display:none;
}
</style>
</head>

<body>

<form name="frmUploadTemplate" enctype="multipart/form-data" method="post" action="upload_template.php">
<table border="0" cellspacing="0" cellpadding="2" align="center">
  <tr>
    <td><b>Upload Template</b></td>
    <td>&nbsp;</td>
  </tr>
  <tr>
  	<td align="center">Delete all pages:&nbsp;
    <input name="delete_all_pages" id="delete_all_pages" type="checkbox" value="1" onClick="DeleteConfirm();"></td>
    <td>&nbsp;</td>
  </tr>
  <tr>
	<td align="center"><input name="template_file" type="file"></td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td align="center"><input name="submit" type="submit" value="Upload" onClick="ShowUploadingMsg();"></td>
    <td>&nbsp;</td>
  </tr>
  <tr>
  	<td colspan="2">&nbsp;</td>
  </tr>
  <tr>
  	<td align="center"><input type="button" name="Back" value="Back to Main Menu" onClick="window.location.href='main.php?mode=head';" /></td>
    <td valign="top" align="right" width="10%">
      <div id="help_button" onClick="OpenHelpWindow();">
        &nbsp;
      </div>
    </td>
  </tr>
</table>
</form>

<div id="delete_confirm">
<table border="0" cellspacing="0" cellpadding="5" align="center">
  <tr>
    <td colspan="2">Are your sure you want to delete all of your page content?</td>
  </tr>
  <tr>
	<td align="center"><input type="button" name="delete" id="delete" value="Yes" onClick="HideDelete();" /></td>
	<td align="center"><input type="button" name="hide_delete" value="No" onClick="UncheckDelete();" />
    </td>
  </tr>
</table>
</div>
<div id="uploading_msg">
<p>&nbsp;</p>
<p align="center">Uploading template, please wait...</p>
</div>
</body>
</html>