2011-04-04 15:16:10 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
/* Devuelve el nombre de un estado */
|
2011-05-19 08:46:58 +00:00
|
|
|
function nombre_estado($oid)
|
|
|
|
|
{
|
|
|
|
|
$consulta = "select nombre from candidatos_estados where cod='$oid'";
|
|
|
|
|
$resultado = mysql_query($consulta);
|
|
|
|
|
$rows = mysql_fetch_array($resultado);
|
|
|
|
|
return $rows["nombre"];
|
2011-04-04 15:16:10 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Devuelve el nombre de un estado de candidatura */
|
2011-05-19 08:46:58 +00:00
|
|
|
function nombre_estado_candidatura($orden)
|
|
|
|
|
{
|
|
|
|
|
$consulta = "select id from estado_candidatura where oid='$orden'";
|
|
|
|
|
$resultado = mysql_query($consulta);
|
|
|
|
|
$rows = mysql_fetch_array($resultado);
|
|
|
|
|
return $rows["id"];
|
2011-04-04 15:16:10 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Devuelve el nombre de un estado de pedido */
|
2011-05-19 08:46:58 +00:00
|
|
|
function nombre_estado_pedido($oid)
|
|
|
|
|
{
|
|
|
|
|
$consulta = "select nombre from pedidos_estados where cod='$oid'";
|
|
|
|
|
$resultado = mysql_query($consulta);
|
|
|
|
|
$rows = mysql_fetch_array($resultado);
|
|
|
|
|
return $rows["nombre"];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function nombre_estado_oferta($oid)
|
|
|
|
|
{
|
|
|
|
|
$consulta = "select nombre from candidaturas_estados where cod='$oid'";
|
|
|
|
|
$resultado = mysql_query($consulta);
|
|
|
|
|
$rows = mysql_fetch_array($resultado);
|
|
|
|
|
return $rows["nombre"];
|
2011-04-04 15:16:10 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Devuelve el nombre de una procedencia */
|
2011-05-19 08:46:58 +00:00
|
|
|
function nombre_procedencia($id)
|
|
|
|
|
{
|
|
|
|
|
$consulta = "select id from procedencia where num='$id'";
|
|
|
|
|
$resultado = mysql_query($consulta);
|
|
|
|
|
$rows = mysql_fetch_array($resultado);
|
|
|
|
|
return $rows["id"];
|
2011-04-04 15:16:10 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Devuelve el nombre de una procedencia */
|
2011-05-19 08:46:58 +00:00
|
|
|
function nombre_procedencia_cv($id)
|
|
|
|
|
{
|
|
|
|
|
$consulta = "select nombre from procedencia_cv where id='$id'";
|
|
|
|
|
$resultado = mysql_query($consulta);
|
|
|
|
|
$rows = mysql_fetch_array($resultado);
|
|
|
|
|
return $rows["nombre"];
|
2011-04-04 15:16:10 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Devuelve el nombre de una localidad */
|
2011-05-19 08:46:58 +00:00
|
|
|
function nombre_localidad($oid)
|
|
|
|
|
{
|
|
|
|
|
$consulta = "select id from localidades where oid='$oid'";
|
|
|
|
|
$resultado = mysql_query($consulta);
|
|
|
|
|
$rows = mysql_fetch_array($resultado);
|
|
|
|
|
return $rows["id"];
|
2011-04-04 15:16:10 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Devuelve el nombre de una provincia */
|
2011-05-19 08:46:58 +00:00
|
|
|
function nombre_provincia($oid)
|
|
|
|
|
{
|
|
|
|
|
$consulta = "select id from provincias where oid='$oid'";
|
|
|
|
|
$resultado = mysql_query($consulta);
|
|
|
|
|
$rows = mysql_fetch_array($resultado);
|
|
|
|
|
return $rows["id"];
|
2011-04-04 15:16:10 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Devuelve el nombre de un perfil */
|
2011-05-19 08:46:58 +00:00
|
|
|
function nombre_perfil($oid)
|
|
|
|
|
{
|
|
|
|
|
$consulta = "select id from perfil where oid='$oid'";
|
|
|
|
|
$resultado = mysql_query($consulta);
|
|
|
|
|
$rows = mysql_fetch_array($resultado);
|
|
|
|
|
return $rows["id"];
|
2011-04-04 15:16:10 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Devuelve el nombre de un rol */
|
2011-05-19 08:46:58 +00:00
|
|
|
function nombre_rol($oid)
|
|
|
|
|
{
|
|
|
|
|
$consulta = "select id from rol where oid='$oid'";
|
|
|
|
|
$resultado = mysql_query($consulta);
|
|
|
|
|
$rows = mysql_fetch_array($resultado);
|
|
|
|
|
return $rows["id"];
|
2011-04-04 15:16:10 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Devuelve el nombre de un cliente */
|
2011-05-19 08:46:58 +00:00
|
|
|
function nombre_cliente($oid)
|
|
|
|
|
{
|
|
|
|
|
$consulta = "select id from clientes where oid='$oid'";
|
|
|
|
|
$resultado = mysql_query($consulta);
|
|
|
|
|
$rows = mysql_fetch_array($resultado);
|
|
|
|
|
return $rows["id"];
|
2011-04-04 15:16:10 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Devuelve el perfil de un pedido */
|
2011-05-19 08:46:58 +00:00
|
|
|
function perfil_pedido($oid)
|
|
|
|
|
{
|
|
|
|
|
$consulta = "select perfil from pedidos where oid='$oid'";
|
|
|
|
|
$resultado = mysql_query($consulta);
|
|
|
|
|
$rows = mysql_fetch_array($resultado);
|
|
|
|
|
return $rows["perfil"];
|
2011-04-04 15:16:10 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Devuelve el nombre de un pedido */
|
2011-05-19 08:46:58 +00:00
|
|
|
function nombre_pedido($oid)
|
|
|
|
|
{
|
|
|
|
|
$consulta = "select nombre from pedidos where oid='$oid'";
|
|
|
|
|
$resultado = mysql_query($consulta);
|
|
|
|
|
$rows = mysql_fetch_array($resultado);
|
|
|
|
|
return $rows["nombre"];
|
2011-04-04 15:16:10 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Devuelve el nombre de un salario */
|
2011-05-19 08:46:58 +00:00
|
|
|
function nombre_salario($id)
|
|
|
|
|
{
|
|
|
|
|
$consulta = "SELECT nombre FROM salario WHERE id='$id'";
|
|
|
|
|
if ($resultado = mysql_query($consulta)) {
|
|
|
|
|
$rows = mysql_fetch_array($resultado);
|
|
|
|
|
return $rows["nombre"];
|
|
|
|
|
} else {
|
|
|
|
|
return "";
|
|
|
|
|
}
|
2011-04-04 15:16:10 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
?>
|