
<?php
header('Cache-Control: no-cache');
header('Pragma: no-cache'); 


include('../conexion.php'); 

?>

<script>


    function pon_prefijo() {

   	parent.document.formulario_lineas.numlinea.value=""; 
	parent.document.forms.formulario_lineas.action="frame_lineas_comanda.php";
	parent.document.getElementById("formulario_lineas").submit(); 	


 
		}



</script>

<?php


$codfactura=$_GET["codfacturatmp"];

$chksel=$_GET["chksel"];


$ip = $_SERVER['REMOTE_ADDR'] ;
 
/////////////////////////////////////AVERIGUA LA MAC /////////////////////////////////////////////
$ipAddress=$_SERVER['REMOTE_ADDR'];
$macAddr=false;

#run the external command, break output into lines
$arp=`arp -a $ipAddress`;
$lines=explode("\n", $arp);

#look for the output line describing our IP address
foreach($lines as $line)
{
   $cols=preg_split('/\s+/', trim($line));
   if ($cols[0]==$ipAddress)
   {
    $macAddr=$cols[1];
   }
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

 		
 
  
if ($macAddr=="94-be-46-9b-77-73"){ 

	$sel_act="UPDATE  pagos_parciales_lineas3 SET chkcom='$chksel' ";
	$mysqli->query($sel_act);


 } elseif ($macAddr=="94-be-46-b5-4f-8b") {

	$sel_act="UPDATE  pagos_parciales_lineas2 SET chkcom='$chksel' ";
	$mysqli->query($sel_act);

  }else {    /// SERVER 
  
	$sel_act="UPDATE  pagos_parciales_lineas SET chkcom='$chksel' ";
	$mysqli->query($sel_act);
  
  }  /// cierra el condicional maquina 



?>

	<script languaje="javascript">
	pon_prefijo();
	
	</script>

