<?php
sleep(1);
session_start();
require_once('../conexion.php');
require_once('../include/sesiones.php');

if($_REQUEST) 
{ 
	$empl_cc=$_REQUEST['empl_cc'];
	$query=mysqli_query($con,"SELECT * from empleados where emp_cc = '".strtolower($empl_cc)."' and empresa='$empresa'") or die(mysqli_error($con));
	$results=mysqli_fetch_array($query);
	if(isset($results['emp_cc']))
    {
  		$numrows = $results['emp_cc'];
    }
    else
    {
    	$numrows='0';
    }
	
	if($numrows > 0)
		echo '<div class="" style="color:#FF0000; padding:0px;"">Num ya existente</div>';
	else
		echo '<div  class="" style="color:green;padding-botton:0px;"">Disponible</div>';
}
?>