<?php
 
session_start();
include("DMMYSQLG.php");
include("DSA1000.php");
include("DMMYSQLG.php");


//if ($_SESSION['tipo']==1){
	$pass=$_POST['Clave'];
	@$w=mysqli_query($GLOBALS['con'] ,"select codigo from ctmeser where cvpvta='".$_POST['txtpunto']."' order by nparte1");
		while (@$pas=mysqli_fetch_array($w)){
			if ($pas['codigo']==$pass)
			{
				@$mod=mysqli_query($GLOBALS['con'] ,"update ctemesas set status=1 where descripcion='".$_POST['txtpunto']."' and area='".$_POST['txtarea']."' ");
//				xajax_mod_rec(xajax.getFormValues('Keypad'));
				echo 
				"<script type='text/javascript'>
				window.open('PBR4000_PR.php?mesero=".$_POST['Clave'] ."&pt=".$_POST['txtpunto']."&ar=".$_POST['txtarea']."&ms=".$_POST['txtmesa']."','_blank');
				window.close();
				</script> ";
				
			}else {	}
		}
/*} elseif ($_SESSION['tipo']==2){
				echo 
				"<script type='text/javascript'>
alert ('no');				</script> ";

}*/	?>

