<?
require('conexion.php');



if(ini_set("max_execution_time", "0"))
echo "Parámetro cambiado.<br><br>";

else
echo "Error al cambiar el parámetro.<br><br>";

if (isset($_GET['var'])) {
	echo "borramos".$_GET['var']."<br><br>";
}

/*
$sql="delete  FROM potenciales where email='fruiz#agenciacreativa.net'";

$result=odbc_exec($cid,$sql)or die(exit("Error en odbc_exec"));
*/
$sql="Select TOP 10 * from REG_DOCS_ENTRA  order by numero desc";

$result=odbc_exec($cid,$sql)or die(exit("Error en odbc_exec"));

print odbc_result_all($result,"border=1");



//$sql = "INSERT INTO REG_DOCS_ENTRA (NUMERO) values ('0900000276') ";
/*$sql = "DELETE FROM REG_DOCS_ENTRA WHERE NUMERO='0900000230' ";

$result=odbc_exec($cid,$sql)or die(exit("Error en odbc_exec"));

print odbc_result_all($result,"border=1");
*/
$sql="SELECT * FROM TIPODOCUMENTO ";

$result=odbc_exec($cid,$sql)or die(exit("Error en odbc_exec"));

print odbc_result_all($result,"border=1");

/*
$sql="select * FROM COMISIO where num_comi = '0231000'  ";
$result=odbc_exec($cid,$sql)or die(exit("Error en odbc_exec"));

print odbc_result_all($result,"border=1");
*/

/*
$sql="Select top 100 * from potenciales WHERE numero like '00%' order by chofer DESC ";
//$sql="Select top 20 * from potenciales";
$result=odbc_exec($cid,$sql)or die(exit("Error en odbc_exec"));
print odbc_result_all($result,"border=1");
*/
/*
$sql="Select top 20 * from MSN ORDER BY CODIGO DESC";
//$sql="Select top 20 * from potenciales";
$result=odbc_exec($cid,$sql)or die(exit("Error en odbc_exec"));
print odbc_result_all($result,"border=1");
*/
/*
$sql="Select * from CHOFERES WHERE COD_CHOF like '00%' ORDER BY COD_CHOF DESC";
//$sql="Select top 20 * from potenciales";
$result=odbc_exec($cid,$sql)or die(exit("Error en odbc_exec"));
print odbc_result_all($result,"border=1");
*/

/*
$sql="Select * from CONFI_EMP";
//$sql="Select top 20 * from PRESUP1 WHERE NUMERO_PRE like '00%' ORDER BY NUMERO_PRE DESC";
//$sql="Select * from PERSONAL WHERE COD_PERS like '07%'";
$result=odbc_exec($cid,$sql)or die(exit("Error en odbc_exec"));
print odbc_result_all($result,"border=1");

*/
/*
$sql="Select * from CONCEP_FACTUR";
$result=odbc_exec($cid,$sql)or die(exit("Error en odbc_exec"));
print odbc_result_all($result,"border=1");
*/


/*

$sql = "SELECT * FROM TARIFAS_PRECIOS";

$sql = "SELECT * FROM TARIFAS_PRECIOS WHERE (TARIFA = 'TARIDISPO8') AND (GRUPO = 'M') AND (CONCEPTO = '5')";
*/
/*
$sql="Select * from TARIFAS_PRECIOS";
$result=odbc_exec($cid,$sql)or die(exit("Error en odbc_exec"));
print odbc_result_all($result,"border=1");
*/

/*
$sql="Select top 20 * from PRESUP1 WHERE  NUMERO_PRE like '00%' ORDER BY NUMERO_PRE DESC";
$result=odbc_exec($cid,$sql)or die(exit("Error en odbc_exec"));
print odbc_result_all($result,"border=1");
*/
/*
$sql="Select top 20 * from PRESUP2 WHERE NUMERO_PRE like '00%' ORDER BY NUMERO_PRE DESC";
$result=odbc_exec($cid,$sql)or die(exit("Error en odbc_exec"));
print odbc_result_all($result,"border=1");
*/
/*
$sql="Select top 20 * from LIPRESUP WHERE NUMERO like '00%' ORDER BY NUMERO DESC";
$result=odbc_exec($cid,$sql)or die(exit("Error en odbc_exec"));
print odbc_result_all($result,"border=1");
*/
/*
$sql="Select * from POBLACIONES";
$result=odbc_exec($cid,$sql)or die(exit("Error en odbc_exec"));
print odbc_result_all($result,"border=1");

$sql="Select * from PROVINCIA";
$result=odbc_exec($cid,$sql)or die(exit("Error en odbc_exec"));
print odbc_result_all($result,"border=1");
*/
/*
$sql="Select * from POTENCIALES WHERE NUMERO LIKE'0001%' ORDER BY NUMERO DESC";
$result=odbc_exec($cid,$sql)or die(exit("Error en odbc_exec"));
print odbc_result_all($result,"border=1");

/*
$sql="Select top 100 * from PERSONAL WHERE COD_PERS like'07%' ORDER BY COD_PERS DESC";
$result=odbc_exec($cid,$sql)or die(exit("Error en odbc_exec"));
print odbc_result_all($result,"border=1");
*/
/*
$sql="Select TOP 30 * from COMISIO where NUM_COMI LIKE '0193%'";
$result=odbc_exec($cid,$sql)or die(exit("Error en odbc_exec"));
print odbc_result_all($result,"border=1");*/
/*
$sql="Select top 100 * from CHOFERES WHERE COD_CHOF like'07%' ORDER BY COD_CHOF DESC";
$result=odbc_exec($cid,$sql)or die(exit("Error en odbc_exec"));
print odbc_result_all($result,"border=1");

$sql="Select top 100 * from CHOFER_IDIOMAS WHERE CHOFER LIKE '07%' ORDER BY CHOFER DESC";
$result=odbc_exec($cid,$sql)or die(exit("Error en odbc_exec"));
print odbc_result_all($result,"border=1");
*/


/*
$email = 'jdavid#agenciacreativa.net';
$nif = '23264467J';

$sql="Select top 1 count(EMAIL) AS num_mail, count(NIF) AS num_nif from POTENCIALES WHERE EMAIL='$email' AND NIF='$nif'";
$result=odbc_exec($cid,$sql)or die(exit("Error en odbc_exec"));
while ($row = odbc_fetch_array($result)) {
	echo $row['num_mail'];
	echo '<br>';
	echo $row['num_nif'];
}


$sql="Select * from ntari WHERE NOPUBLICARWEB='0' ORDER BY ORDENWEB ASC";
$result=odbc_exec($cid,$sql)or die(exit("Error en odbc_exec"));
print odbc_result_all($result,"border=1");
/*
while ($row = odbc_fetch_array($result)) {
	
	echo $row['CODIGO'].' - '.$row['NOMBRE'].'<br />';
	
}
*/


/*
$sql="Select * from ntari";
$result=odbc_exec($cid,$sql)or die(exit("Error en odbc_exec"));
print odbc_result_all($result,"border=1");
*/
/*
$sql="Select * from CONCEP_FACTUR";
$result=odbc_exec($cid,$sql)or die(exit("Error en odbc_exec"));
print odbc_result_all($result,"border=1");
*/

/*
$sql="Select * from vehiculo1";
$result=odbc_exec($cid,$sql)or die(exit("Error en odbc_exec"));
print odbc_result_all($result,"border=1");
*/

/*
$sql="Select * from vehiculo2";
$result=odbc_exec($cid,$sql)or die(exit("Error en odbc_exec"));
print odbc_result_all($result,"border=1");
*/
/*
$sql="Select * from CONDICIONES";
$result=odbc_exec($cid,$sql)or die(exit("Error en odbc_exec"));
print odbc_result_all($result,"border=1");
*/
/*
$sql="Select * from TARI_COND";
$result=odbc_exec($cid,$sql)or die(exit("Error en odbc_exec"));
print odbc_result_all($result,"border=1");
*/
/*
$sql="Select * from IDIOMA_TRADUCCION";
$result=odbc_exec($cid,$sql)or die(exit("Error en odbc_exec"));
print odbc_result_all($result,"border=1");
*/
/*
$sql = "SELECT * FROM TARIFAS_PRECIOS";
$result=odbc_exec($cid,$sql)or die(exit("Error en odbc_exec"));
print odbc_result_all($result,"border=1");
/*
$sql="Select * from COMISIO";
$result=odbc_exec($cid,$sql)or die(exit("Error en odbc_exec"));
print odbc_result_all($result,"border=1");
*/

?>