<?php 

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

	if( isset($_POST['recordId']) && !isset($_POST['uncheck']) ){ 
		$query= "UPDATE menu_boards SET show_menu_images=1 WHERE recordkey=".$_POST['recordId'];
		mysql_query($query);   // query executed
		if( mysql_affected_rows() > 1 || mysql_affected_rows() == 1 ){
			echo json_encode( array( 'msg' => 1 ) );
		} else {
			echo mysql_error();
		}
	} else {
		$query= "UPDATE menu_boards SET show_menu_images=0 WHERE recordkey=".$_POST['recordId'];
		mysql_query($query);   // query executed
		if( mysql_affected_rows() > 1 || mysql_affected_rows() == 1 ){
			echo json_encode( array( 'msg' => 1 ) );
		} else {
			echo mysql_error();
		}
	}
?>