<?php if (!isset($_SESSION['FirstName'])) {

	session_start();

}

    include ('includes/db1config.php');

    include ('../includes/mysql_connect.php');

	include ('includes/admin-config.php');	//get site options



	if (isset($_GET['a']) && $_GET['a'] == 'details') {

		if (!isset($_GET['id'])) {

			die('0');

		}



		$id = $_GET['id'];



		$sql = "SELECT ItemName, description, categoryKey

				FROM menuItem

				WHERE itemKey = '".mysql_real_escape_string($id)."'";

		$result = mysql_query($sql) or die(mysql_error());



		if (mysql_num_rows($result) == 0) {

			die('0');

		}



		$menuItem = mysql_fetch_assoc($result);



		$details = array(

			'name' => $menuItem['ItemName'],

			'description' => $menuItem['description'],

			'category' => $menuItem['categoryKey']

		);



		echo json_encode($details);

		die();

	}

?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">



<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<meta http-equiv="content-type" content="text/html; charset=utf-8" />

<?php 

include('title.php'); 

echo'<link href="css/'.$styleheet.'" rel="stylesheet" type="text/css" media="screen" />';	

echo'<link href="css/print_style.css" rel="stylesheet" type="text/css" media="print" />';

?>



<link rel="stylesheet" type="text/css" href="css/cssverticalmenu.css" />

<link rel="stylesheet" href="includes/tinyaccordion/style.css" type="text/css" />



<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"> </script>

<link rel="stylesheet" href="//code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css">

<script src="//code.jquery.com/jquery-1.9.1.js"></script>

<script src="//code.jquery.com/ui/1.10.3/jquery-ui.js"></script>





<script type="text/javascript" src="../js/ddaccordion.js"></script>



<!-- for popup windows -->

<link href="css/popup-style.css" rel="stylesheet" type="text/css" media="all" />

<script type="text/javascript" src="js/script.js"></script>

 <!-- end popup script-->



<style type="text/css">

	.arrowlistmenu{

	width: 100%; /*width of accordion menu*/

	}



	.arrowlistmenu .menuheader{ /*CSS class for menu headers in general (expanding or not!)*/

	font:12px Verdana,Arial;width:95%; border:1px solid #467182; padding:7px; 

		font-weight:bold; margin-top:5px; cursor:pointer; 

	    -webkit-border-radius: 7px;

	    -moz-border-radius: 7px;

	    border-radius: 7px;

	    border: solid 1px #e8e8e8;

	    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 1px 1px rgba(0, 0, 0, 0.2);

	    -webkit-transition-duration: 0.2s;

	    -moz-transition-duration: 0.2s;

	    transition-duration: 0.2s;

	    -webkit-user-select:none;

	    -moz-user-select:none;

	    -ms-user-select:none;

	    user-select:none;

		color:#fff;

		background-color:#2077a1;

		padding-left:.5em;padding-right:.5em;

	}



	.arrowlistmenu .openheader{ /*CSS class to apply to expandable header when it's expanded*/

	background-image: url(titlebar-active.png);

	}



	.arrowlistmenu ul{ /*CSS for UL of each sub menu*/

	list-style-type: none;

	margin: 0;

	padding: 0;

	margin-bottom: 0px; /*bottom spacing between each UL and rest of content*/

	background: none;

	}



	.arrowlistmenu ul li{

	padding-bottom: 0px; /*bottom spacing between menu items*/

	}



	.arrowlistmenu ul li .opensubheader{ /*Open state CSS for sub menu header*/

	background: lightblue !important;

	}



	.arrowlistmenu ul li .closedsubheader{ /*Closed state CSS for sub menu header*/

	background: lightgreen !important;

	}



	.arrowlistmenu ul li a{

	color: #81BEF7;

	background: url(arrowbullet.png) no-repeat center left; /*custom bullet list image*/

	display: block;

	padding: 0px 0;

	padding-left: 19px; /*link text is indented 19px*/

	text-decoration: none;

	font-weight: bold;

	border-bottom: 1px solid #dadada;

	font-size: 90%;

	}



	.arrowlistmenu ul li a:visited{

	color: #81BEF7;

	}



	.arrowlistmenu ul li a:hover{ /*hover state CSS*/

	color: #FA5858;

	background-color: #FA5858;

	}



	.arrowlistmenu ul li a.subexpandable:hover{ /*hover state CSS for sub menu header*/

	background: lightblue;

	}

	html {

	    overflow-y: scroll;

	}
	


</style>



<script type="text/javascript">

ddaccordion.init({

	headerclass: "expandable", //Shared CSS class name of headers group that are expandable

	contentclass: "categoryitems", //Shared CSS class name of contents group

	revealtype: "click", //Reveal content when user clicks or onmouseover the header? Valid value: "click", "clickgo", or "mouseover"

	mouseoverdelay: 200, //if revealtype="mouseover", set delay in milliseconds before header expands onMouseover

	collapseprev: true, //Collapse previous content (so only one open at any time)? true/false 

	defaultexpanded: [0], //index of content(s) open by default [index1, index2, etc]. [] denotes no content

	onemustopen: false, //Specify whether at least one header should be open always (so never all headers closed)

	animatedefault: false, //Should contents open by default be animated into view?

	persiststate: true, //persist state of opened contents within browser session?

	toggleclass: ["", "openheader"], //Two CSS classes to be applied to the header when it's collapsed and expanded, respectively ["class1", "class2"]

	togglehtml: ["prefix", "", ""], //Additional HTML added to the header when it's collapsed and expanded, respectively  ["position", "html1", "html2"] (see docs)

	animatespeed: "fast", //speed of animation: integer in milliseconds (ie: 200), or keywords "fast", "normal", or "slow"

	oninit:function(headers, expandedindices){ //custom code to run when headers have initalized

		//do nothing

	},

	onopenclose:function(header, index, state, isuseractivated){ //custom code to run whenever a header is opened or closed

		//do nothing

	}

})



ddaccordion.init({ //2nd level headers initialization

	headerclass: "subexpandable", //Shared CSS class name of sub headers group that are expandable

	contentclass: "subcategoryitems", //Shared CSS class name of sub contents group

	revealtype: "click", //Reveal content when user clicks or onmouseover the header? Valid value: "click" or "mouseover

	mouseoverdelay: 200, //if revealtype="mouseover", set delay in milliseconds before header expands onMouseover

	collapseprev: true, //Collapse previous content (so only one open at any time)? true/false 

	defaultexpanded: [], //index of content(s) open by default [index1, index2, etc]. [] denotes no content

	onemustopen: false, //Specify whether at least one header should be open always (so never all headers closed)

	animatedefault: false, //Should contents open by default be animated into view?

	persiststate: true, //persist state of opened contents within browser session?

	toggleclass: ["opensubheader", "closedsubheader"], //Two CSS classes to be applied to the header when it's collapsed and expanded, respectively ["class1", "class2"]

	togglehtml: ["none", "", ""], //Additional HTML added to the header when it's collapsed and expanded, respectively  ["position", "html1", "html2"] (see docs)

	animatespeed: "fast", //speed of animation: integer in milliseconds (ie: 200), or keywords "fast", "normal", or "slow"

	oninit:function(headers, expandedindices){ //custom code to run when headers have initalized

		//do nothing

	},

	onopenclose:function(header, index, state, isuseractivated){ //custom code to run whenever a header is opened or closed

		//do nothing

	}

})

</script>



<style type="text/css">

	#wrapper.custom {

		-webkit-border-radius: none;

		-moz-border-radius: none;

	    border-radius: 0;

		border: none;

		background: none;

		width: 770px;

	}

</style>



</head>

<body>



<div id="wrapper" class="custom">







<!-- start page -->







<!-- start content -->

<div id="content">

<div id="main-content">

   

		<div class="post">

		  <div class="entry">

          

<br />



				<h1>Manage menu items</h1>

                

<?php 

if($_SESSION['adminkey']=="security"){

include "editmenuitemsub.php"; 

} else {

	echo '<font color="red"><div align="center">You are not authorized to view this page. <br>Please <a href="index.php"><font color="blue">login here</font></a>.</div></font>';

}

?>

            

 <br />



</div><!-- end entry-->



<br />



</div><!-- end post-->



</div><!-- end main-content-->



</div><!-- end content -->





<div style="clear: both;">&nbsp;</div>

<div id="page-bg-btm">

</div><!-- end page-bg-btm div -->











</div><!-- end wrapper div-->



<!-- end page -->





<!--footer-->







</body>

</html>

