<? include ("../settings.php"); ?>
<? include ("session.php"); ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Spark Planners Admin Panel</title>
	<meta name="description" content="" />
    <meta name="keywords" content="" />
    <meta name="robots" content="noindex, nofollow" />
	<link href="/ckeditor/_samples/sample.css" rel="stylesheet" type="text/css" />	
    <link rel="stylesheet" type="text/css" media="all" href="css/style.css" />
	<link rel="Stylesheet" type="text/css" href="css/smoothness/jquery-ui-1.7.1.custom.css"  />	
	<!--[if IE 7]><link rel="stylesheet" href="css/ie.css" type="text/css" media="screen, projection" /><![endif]-->
	<!--[if IE 6]><link rel="stylesheet" href="css/ie6.css" type="text/css" media="screen, projection" /><![endif]-->
	<link rel="stylesheet" type="text/css" href="markitup/skins/markitup/style.css" />
	<link rel="stylesheet" type="text/css" href="markitup/sets/default/style.css" />
	<link rel="stylesheet" type="text/css" href="css/superfish.css" media="screen">
	<link rel="stylesheet" type="text/css" href="css/thickbox.css" media="screen" />
	<!--[if IE]>
		<style type="text/css">
		  .clearfix {
		    zoom: 1;     /* triggers hasLayout */
		    display: block;     /* resets display for IE/Win */
		    }  /* Only IE can see inside the conditional comment
		    and read this CSS rule. Don't ever use a normal HTML
		    comment inside the CC or it will close prematurely. */
		</style>
	<![endif]-->
	<!-- JavaScript -->
    <script type="text/javascript" src="js/jquery-1.3.2.min.js"></script>
	<script type="text/javascript" src="js/jquery-ui-1.7.1.custom.min.js"></script>
	<script type="text/javascript" src="js/hoverIntent.js"></script>
	<script type="text/javascript" src="js/superfish.js"></script>
	<script type="text/javascript" src="js/thickbox-compressed.js"></script>
	<script type="text/javascript" src="ckeditor/ckeditor.js"></script>
	<script type="text/javascript">
		// initialise plugins
		jQuery(function(){
			jQuery('ul.sf-menu').superfish();
		});

		function thickBoxDone(){
			tb_remove();
			document.confirm.submit();
		}
	</script>
	<script type="text/javascript" src="js/excanvas.pack.js"></script>
	<script type="text/javascript" src="js/jquery.flot.pack.js"></script>
    <script type="text/javascript" src="markitup/jquery.markitup.pack.js"></script>
	<script type="text/javascript" src="markitup/sets/default/set.js"></script>
  	<script type="text/javascript" src="js/custom2.js"></script>

	 <!--[if IE]><script language="javascript" type="text/javascript" src="excanvas.pack.js"></script><![endif]-->
</head>
<body>
<form name="email" method='POST' action="">
<div class="container" id="container">
	<div  id="header">
    	<div id="profile_info">
			<img src="img/avatar.jpg" id="avatar" alt="avatar" />
			<p>Welcome</p>
			<p><strong><?=$_SESSION['user_email'];?></strong>. <a href="logout.php">Log out?</a></p>
		</div>
		<div id="logo"><h1><a href="/">AdmintTheme</a></h1></div>
		
    </div><!-- end header -->
	    <div id="content" >
			<? include ("nav_menu.php"); ?>
	    </div>
		<div id="tabledata" class="section">
			<h2 class="ico_mug">Confirmation Email</h2>
		<div id="confirmation_email">
			<?
				if (isset($_REQUEST['action']) && $_REQUEST['action']!=""){
					$SQL = "UPDATE tbl_email SET email_subject='".$_REQUEST['email_subject']."', email_content='".$_REQUEST['email_content']."' WHERE email_key='confirmation';";
					$qry->queryExecute($SQL);
					echo "<script>alert('Changes saved.');</script>";
				}
				$SQL = "SELECT * FROM tbl_email WHERE email_key='confirmation';";
				$result = $qry->querySelectSingle($SQL);
				echo "<table>";
				echo "<tr><td align='left'>Email Subject :</td><td align='left'><input type='text' name='email_subject' value='".$result['email_subject']."' size='100'></td></tr>";
				echo "<tr><td align='left' valign='middle'>Email Content :</td><td align='left'><textarea name='email_content'>".htmlentities($result['email_content'], ENT_QUOTES)."</textarea></td></tr>";
				echo "</table>";
				echo "<input type='submit' name='action' value='Save Changes'>";
			?>
		<script type="text/javascript">
			CKEDITOR.replace( 'email_content');
		</script>
		</div>
		</div> <!-- end #tabledata -->
		<?include("footer.php");?>
</div><!-- end container -->
<input type="hidden" name="offset" value="0">
</form>
</body>
</html>
