<?php if (!isset($_SESSION['FirstName'])) {
	session_start();
}
include ('includes/db1config.php');
include ('../includes/mysql_connect.php');

if(isset($_GET['a'])) {
	$action = $_GET['a'];
	if ($action =="pcaton"){ //turn on pizza categories
	       $query = "Update menuCategory set active =1 where (categoryName='Pizza' or categoryName='Pizza Crust' or categoryName='Pizza Toppings' or categoryName='Pizza Sauce')";
	       mysql_query($query);          // query executed
				echo mysql_error();
			echo '1';
	}
	if ($action =="pcatoff"){ //turn off pizza categories
	       $query = "Update menuCategory set active =0 where (categoryName='Pizza' or categoryName='Pizza Crust' or categoryName='Pizza Toppings' or categoryName='Pizza Sauce')";
	       mysql_query($query);          // query executed
				echo mysql_error();
			echo '1';

	}
	if ($action =="fcaton"){ //turn on pizza categories
	       $query = "Update menuCategory set active =1 where categoryName='Fixings' ";
	       mysql_query($query);          // query executed
				echo mysql_error();
			echo '1';
	}
	if ($action =="fcatoff"){ //turn on pizza categories
	       $query = "Update menuCategory set active =0 where categoryName='Fixings' ";
	       mysql_query($query);          // query executed
				echo mysql_error();
			echo '1';
	}
	if ($action =="ocaton"){ //turn on pizza categories
	       $query = "Update menuCategory set active =1 where categoryName='Options' ";
	       mysql_query($query);          // query executed
				echo mysql_error();
			echo '1';
	}
	if ($action =="ocatoff"){ //turn on pizza categories
	       $query = "Update menuCategory set active =0 where categoryName='Options' ";
	       mysql_query($query);          // query executed
				echo mysql_error();
			echo '1';
	}

//Update flag if Built-in category update
 	include "monitorchanges.php";
}
?>